Zrips / Residence

Residence Bukkit Plugin
134 stars 85 forks source link

Unhandled exception executing command 'res' in plugin Residence v5.1.4.3 #1176

Closed celesteMoon closed 3 months ago

celesteMoon commented 3 months ago

Running residence v5.1.4.3 on paper 1.20.6 with cmilib 1.4.7.13 and protocollib build#689. I noticed the plugin failed to protect the residence area, so I tried to use "/res set" and this occurs. The other functions seemed to appear normal.

celesteMoon commented 3 months ago

switched to spigot 1.20.6 for another test and got this in the console:

[13:23:53] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'resadmin' in plugin Residence v5.1.4.3
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R4.CraftServer.dispatchCommand(CraftServer.java:888) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at org.bukkit.craftbukkit.v1_20_R4.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:50) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.a(SourceFile:29) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(SourceFile:13) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.commands.execution.UnboundEntryAction.a(SourceFile:8) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.commands.execution.CommandQueueEntry.a(SourceFile:8) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.commands.execution.ExecutionContext.a(SourceFile:107) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:416) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:338) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:325) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.network.PlayerConnection.b(PlayerConnection.java:1824) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$7(PlayerConnection.java:1800) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:162) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1242) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.util.thread.IAsyncTaskHandler.A(SourceFile:136) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.MinecraftServer.bu(MinecraftServer.java:1221) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.MinecraftServer.A(MinecraftServer.java:1214) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.util.thread.IAsyncTaskHandler.bA(SourceFile:121) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.MinecraftServer.v_(MinecraftServer.java:1185) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1071) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:311) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.clone()" because the return value of "com.bekvon.bukkit.residence.gui.FlagData.getItem(String)" is null
        at com.bekvon.bukkit.residence.gui.setFlagInfo.updateLook(setFlagInfo.java:321) ~[?:?]
        at com.bekvon.bukkit.residence.gui.setFlagInfo.recalculateResidence(setFlagInfo.java:149) ~[?:?]
        at com.bekvon.bukkit.residence.gui.setFlagInfo.recalculate(setFlagInfo.java:92) ~[?:?]
        at com.bekvon.bukkit.residence.gui.FlagUtil.openSetFlagGui(FlagUtil.java:111) ~[?:?]
        at com.bekvon.bukkit.residence.commands.set.perform(set.java:67) ~[?:?]
        at com.bekvon.bukkit.residence.ResidenceCommandListener.onCommand(ResidenceCommandListener.java:275) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        ... 27 more
celesteMoon commented 3 months ago

update: when running the /res set and /resadmin set command from the console it worked

celesteMoon commented 3 months ago

update: /res set [flags] works fine, it seems the problem is the gui

Zrips commented 3 months ago

b356a0339aaf7c36819bcf3888b361c21b016ade