pshadoyan / ActionBar-PlotSquared

A simple spigot plugin to replace title and subtitle messages upon entering a plot.
2 stars 1 forks source link

Error when entering plots owned by offline players #1

Closed jonthesquirrel closed 7 years ago

jonthesquirrel commented 7 years ago

When entering plots owned by me the actionbar message shows fine and no error, when entering plots owned by someone else there is no actionbar message and this error happens:

[08:01:07 ERROR]: Could not pass event PlayerEnterPlotEvent to ActionBar v1.0
org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at com.plotsquared.bukkit.util.BukkitEventUtil.callEvent(BukkitEventUtil.java:47) [PlotSquared-Bukkit.jar:?]
        at com.plotsquared.bukkit.util.BukkitEventUtil.callEntry(BukkitEventUtil.java:98) [PlotSquared-Bukkit.jar:?]
        at com.plotsquared.listener.PlotListener.plotEntry(PlotListener.java:35) [PlotSquared-Bukkit.jar:?]
        at com.plotsquared.bukkit.listeners.PlayerEvents.playerMove(PlayerEvents.java:579) [PlotSquared-Bukkit.jar:?]
        at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:616) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at net.minecraft.server.v1_11_R1.PacketPlayInFlying.a(SourceFile:126) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at net.minecraft.server.v1_11_R1.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at net.minecraft.server.v1_11_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
        at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.lang.NullPointerException
        at me.patrick.actionbar.Utilities.getName(Utilities.java:54) ~[?:?]
        at me.patrick.actionbar.actionBar.plotEnter(actionBar.java:29) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor479.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot-1.11.2.jar:git-Spigot-3fb9445-2b6c9f4]
        ... 26 more

My plugins: Plugins (42): ActionBar, AntiHackedPotions, BannerMaker, BiomeTP, BooksWithoutBorders, BungeeTabListPlus, ChairStairs, CoreProtect, dynmap, Dynmap-Essentials, Essentials, EssentialsSpawn, FastAsyncVoxelSniper, FastAsyncWorldEdit, FreeBungeeChat, goBrush, goPaint, HeadsInventory, HeadsPlugin, LongCommands, Marriage, Multiverse-Core, MyCommand, NametagEdit, PermissionsEx, PlaceholderAPI, Plot2Dynmap, PlotSquared, PlugMan, ProtocolLib, SimpleAPI, SimpleArmorStandEdit, SimplePets, SimpleRename, StaffPunch, Vault, Voxelight-Place, VoxelSniper, WeatherMan, WorldBorder, WorldEdit, WorldGuard

jonthesquirrel commented 7 years ago

Update: the error happens when going into plots whose owner is offline. If other players are online and I go in their plots the message works fine.

pshadoyan commented 7 years ago

I'll add a fix when I get home, thank you!

pshadoyan commented 7 years ago

Should be fixed, let me know if you've got any more problem or suggestions, I'd be happy to add some little modifications.

Regards, Paddy

@jonthesquirrel

jonthesquirrel commented 7 years ago

@PaddyWagon works perfectly! Thanks for the responsiveness! :D