-2
好的,我早些時候發佈了this thread,詢問如何在for循環中創建多個值。 經過一段時間我遇到了一個問題,至於我不知道如何解決,也不知道它爲什麼會發生。 這是我的代碼:Java代碼中的未知錯誤
for(int x = 0; x < con.length; x++)
{
maxS[x] = main.getConfig().getString("areas." + con[x] + ".max").split(", ").toString();
minS[x] = main.getConfig().getString("areas." + con[x] + ".min").split(", ").toString();
event.getPlayer().sendMessage("1");
for(int y = 0; y < maxS.length; y++)
{
maxV[y] = new Vector(Integer.parseInt(maxS[y]), Integer.parseInt(maxS[y+1]), Integer.parseInt(maxS[y+2]));
minV[y] = new Vector(Integer.parseInt(minS[y]), Integer.parseInt(minS[y+1]), Integer.parseInt(minS[y+2]));
event.getPlayer().sendMessage("2");
}
}
錯誤消息:
2013-07-29 20:32:12 [SEVERE] Could not pass event PlayerMoveEvent to FactionPlay v1.6.2 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:227) at net.minecraft.server.v1_6_R2.Packet10Flying.handle(SourceFile:136) at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296) at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116) at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582) Caused by: java.lang.NumberFormatException: For input string: " [Ljava.lang.String;@af7327" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at me.BlueJelly.FactionPlay_SP.PlayerListener.onPlayerMove(PlayerListener.java:191) at sun.reflect.GeneratedMethodAccessor89.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:425) ... 14 more
感謝您的幫助。
什麼是你遇到了什麼問題? – Floris
你能告訴我們錯誤嗎? – Bojan
沒有錯誤信息,我們都不能幫你。 – bas