nitan Posted July 23, 2013 Share Posted July 23, 2013 Hallo ich habe ein script geschrieben das unten ich ein kleiner teil davon er macht auch das was er soll er kopiert die items doch bekomme ich immer eine fehlermeldung in der console: 17:58:09 [SEVERE] nullorg.bukkit.command.CommandException: Unhandled exception executing command 'vk'in plugin warenhaus v0.1 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:189) at org.bukkit.craftbukkit.v1_5_R3.CraftServer.dispatchCommand(CraftServer.java:523) at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerConnection.java:971) at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:889) at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846) at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.v1_5_R3.NetworkManager.b(NetworkManager.java:292) at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:115) at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35) at net.minecraft.server.v1_5_R3.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:581) at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:226) at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:477) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:410) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at me.nitan.warenhaus.warenhaus.onCommand(warenhaus.java:89) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ... 15 more> srcipt: Player p = (Player) sender;int Anzahl = p.getItemInHand().getAmount();int Material = p.getItemInHand().getTypeId();byte xData = p.getItemInHand().getData().getData();short Haltbarkeit = p.getItemInHand().getDurability();ItemStack item =new ItemStack(Material, Anzahl, Haltbarkeit, xData);p.getInventory().addItem(item); Link to comment Share on other sites More sharing options...
TuxGamer Posted July 23, 2013 Share Posted July 23, 2013 Irgendwas ist null. Gucke mal bei allen Variablen, die du setzt, ob sie null sind, ober ob p.ItemInHand() null ist. Link to comment Share on other sites More sharing options...
nitan Posted July 23, 2013 Author Share Posted July 23, 2013 wie recht du hast die haltbarkeit wird durch data ersetzt Danke Link to comment Share on other sites More sharing options...
TuxGamer Posted July 23, 2013 Share Posted July 23, 2013 Huch? Wenn das bedeutet, dass es geht, ist das super Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now