Giter Site home page Giter Site logo

NullPointerException about npclib HOT 7 CLOSED

tavonkelly avatar tavonkelly commented on September 6, 2024
NullPointerException

from npclib.

Comments (7)

Techcable avatar Techcable commented on September 6, 2024

Could i please see your code?
This is due to commit 1cddc52

from npclib.

tavonkelly avatar tavonkelly commented on September 6, 2024

Code: http://pastebin.com/d7MjxiFX

NPCController line 64 (from the error) is 'npc.spawn(location);'

from npclib.

Techcable avatar Techcable commented on September 6, 2024

Where is someValidUUID?
Also could you open a new issue for the wierd looking npcs?

from npclib.

tavonkelly avatar tavonkelly commented on September 6, 2024

someValidUUID is just a field with a UUID in it

from npclib.

tavonkelly avatar tavonkelly commented on September 6, 2024

I did attempt to find the cause of this issue, and I believed it to be that the lib was being rate-limited.

When you call setSkin(UUID uuid) which calls trySetSkin() it requests the skin from Mojang, but doesn't set it because the entity isn't spawned yet. When you call spawn(Location location) right after calling setSkin(UUID uuid) it requests the skin again, but Mojang rate-limits the request, so the PlayerProfile it returns is null, hence the NPE.

I decided to remove the trySetSkin() from the setSkin(UUID uuid) method and move the trySetSkin() in the spawn(Location location) to after the entity is spawned, but for some reason the skin still didn't work.

http://i.teg.pw/y52za.png

from npclib.

Sablednah avatar Sablednah commented on September 6, 2024

Hi,
I'm getting the same nullpointer error if I try and set a skin on Spigot v1_8_R2.
http://pastebin.com/smp4dvxs

from npclib.

Brunner2 avatar Brunner2 commented on September 6, 2024

Me either on 1.7.10

from npclib.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.