NametagEdit DEV

NametagEdit DEV

10.5k Downloads

Get api function returns null.

Ulgen9 opened this issue ยท 2 comments

commented

Bug Report

When i try to get nametag of a player by function of:

for(Player p : Bukkit.getOnlinePlayers()){
Nametag tag = NametagEdit.getApi().getNametag(p);
System.out.println(tag);
}

This error happens at console:

[14:42:17 WARN]: [PingTracker] Task #14 for PingTracker v1.0-SNAPSHOT generated an exception
java.lang.NullPointerException: Cannot invoke "com.nametagedit.plugin.api.INametagApi.getNametag(org.bukkit.entity.Player)" because the return value of "com.nametagedit.plugin.NametagEdit.getApi()" is null
at sakido.pingtracker.PingTracker$1.run(PingTracker.java:20) ~[?:?]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:81) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:400) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1179) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:394) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1127) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:966) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at java.lang.Thread.run(Thread.java:832) [?:?]

commented

Sam i get the same thing;
Cannot invoke "java.lang.reflect.Constructor.newInstance(Object[])" because "com.nametagedit.plugin.packets.PacketWrapper.ChatComponentText" is null

commented

Same thing java.lang.NullPointerException: Cannot invoke "com.nametagedit.plugin.api.INametagApi.setSuffix(org.bukkit.entity.Player, String)" because the return value of "com.nametagedit.plugin.NametagEdit.getApi()" is null