Player move optimization.

This commit is contained in:
Kneesnap
2019-09-22 12:09:48 -07:00
parent d9ca07b195
commit 0ecc238e6a
4 changed files with 56 additions and 34 deletions
@@ -13,6 +13,7 @@ import net.jitse.npclib.api.events.NPCShowEvent;
import net.jitse.npclib.api.skin.Skin;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
@@ -104,6 +105,11 @@ public abstract class SimpleNPC implements NPC, PacketHandler {
return location;
}
@Override
public World getWorld() {
return location != null ? location.getWorld() : null;
}
public int getEntityId() {
return entityId;
}