grandwazir / StarterKit

A plugin for Bukkit to give items to new players
http://grandwazir.github.com/StarterKit
GNU General Public License v3.0
4 stars 5 forks source link

exceptions when granting items #14

Closed allaryin closed 12 years ago

allaryin commented 12 years ago

I set up a fairly simple kit - leather pants (equipped), a pick, and some basic materials. On initial login, the game throws an exception and the player is only given the pants. If the player issues /sk load, then they are given the full kit but another similar exception is thrown. I've changed the kit around a bit and observe the same problems every time.

Relevant portions of server log:

2012-06-16 14:24:18 [INFO] This server is running CraftBukkit version git-Bukkit-jenkins-CraftBukkit-91 (MC: 1.2.5) (Implementing API version 1.2.5-R1.3-MCPC-SNAPSHOT) 2012-06-16 14:24:18 [INFO] [PermissionsEx] sql backend registered! 2012-06-16 14:24:18 [INFO] [PermissionsEx] file backend registered! 2012-06-16 14:24:18 [INFO] [PermissionsEx] PermissionEx plugin initialized. 2012-06-16 14:24:19 [INFO] [StarterKit] Loading StarterKit v1.1.2 ... 2012-06-16 14:24:24 [INFO] [StarterKit] Enabling StarterKit v1.1.2 2012-06-16 14:24:24 [INFO] [StarterKit] The kit contains 8 entries. 2012-06-16 14:24:24 [FINE] Adding permission: starterkit.* (default: op) 2012-06-16 14:24:24 [FINE] Adding permission: starterkit.list (default: op) 2012-06-16 14:24:24 [FINE] Adding permission: starterkit.load (default: op) 2012-06-16 14:24:24 [FINE] Adding permission: starterkit.save (default: op) 2012-06-16 14:24:24 [INFO] [StarterKit] StarterKit has been enabled. ... 2012-06-16 14:25:26 [FINE] Granting kit to allaryin 2012-06-16 14:25:26 [SEVERE] Could not pass event PlayerJoinEvent to StarterKit org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459) at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:132) at forge.PacketHandlerServer.finishLogin(PacketHandlerServer.java:153) at forge.PacketHandlerServer.onModListResponse(PacketHandlerServer.java:98) at forge.PacketHandlerServer.onPacketData(PacketHandlerServer.java:37) at forge.MessageManager.dispatchIncomingMessage(MessageManager.java:419) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1469) at net.minecraft.server.Packet250CustomPayload.handle(SourceFile:46) at net.minecraft.server.NetworkManager.b(NetworkManager.java:234) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:121) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:556) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:453) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ArrayIndexOutOfBoundsException: 4 at net.minecraft.server.PlayerInventory.setItem(PlayerInventory.java:279) at org.bukkit.craftbukkit.inventory.CraftInventory.setItem(CraftInventory.java:75) at org.bukkit.craftbukkit.inventory.CraftInventory.clear(CraftInventory.java:371) at org.bukkit.craftbukkit.inventory.CraftInventoryPlayer.setArmorContents(CraftInventoryPlayer.java:85) at name.richardson.james.bukkit.starterkit.PlayerJoinListener.giveKit(PlayerJoinListener.java:82) at name.richardson.james.bukkit.starterkit.PlayerJoinListener.onPlayerJoin(PlayerJoinListener.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) ... 15 more 2012-06-16 14:25:26 [INFO] Sending serverside check to: allaryin ... 2012-06-16 14:25:44 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'sk' in plugin StarterKit v1.1.2 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166) at forge.bukkit.ForgeCommandMap.dispatch(ForgeCommandMap.java:54) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:490) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:917) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:873) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:855) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34) at net.minecraft.server.NetworkManager.b(NetworkManager.java:234) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:121) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:556) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:453) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ArrayIndexOutOfBoundsException: 4 at net.minecraft.server.PlayerInventory.setItem(PlayerInventory.java:279) at org.bukkit.craftbukkit.inventory.CraftInventory.setItem(CraftInventory.java:75) at org.bukkit.craftbukkit.inventory.CraftInventory.clear(CraftInventory.java:371) at org.bukkit.craftbukkit.inventory.CraftInventoryPlayer.setArmorContents(CraftInventoryPlayer.java:85) at name.richardson.james.bukkit.starterkit.management.LoadCommand.execute(LoadCommand.java:52) at name.richardson.james.bukkit.utilities.command.PluginCommand.onCommand(PluginCommand.java:138) at name.richardson.james.bukkit.utilities.command.CommandManager.onCommand(CommandManager.java:72) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 13 more

grandwazir commented 12 years ago

Could you upload your config.yml so I can narrow this done please.

allaryin commented 12 years ago

Of course. Blasted github removing formatting from comment.

https://gist.github.com/9c206a2f111b0d22d8d3