[18:28:07 WARN]: Exception in thread "Craft Scheduler Thread - 3"
[18:28:07 WARN]: org.apache.commons.lang.UnhandledException: Plugin CuthQuiz v1.0 generated an exception while executing task 15
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.next(ArrayList.java:851)
at me.cuthmf.quiz.Eventolib.verificar(Eventolib.java:389)
at me.cuthmf.quiz.Eventolib$4.run(Eventolib.java:304)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more
Pergunta
LuizB
Bem, por algum motivo o loop está parando, só ta levando só 1 player
Código:
for (String s : Main.participantes) { if (Bukkit.getServer().getPlayer(s).getLocation().subtract(0, 1, 0).getBlock().getType() == Material.WOOL && Bukkit.getServer().getPlayer(s).getLocation().subtract(0, 1, 0).getBlock().getData() == 5 && answer.equalsIgnoreCase("Verdadeira")) { } else if (Bukkit.getServer().getPlayer(s).getLocation().subtract(0, 1, 0).getBlock() .getType() == Material.WOOL && Bukkit.getServer().getPlayer(s).getLocation().subtract(0, 1, 0).getBlock().getData() == 14 && answer.equalsIgnoreCase("Falsa")) { } else { // *** --- *** // *** --- *** // *** --- *** // *** *** // *** *** Bukkit.getServer().getPlayer(s).sendMessage(plugin.errou.replace("&", "§")); World world = Bukkit .getWorld((String) plugin.cp.getConfig().getString("Eventolocal." + "Saida" + ".Mundo")); double x = plugin.cp.getConfig().getDouble("Eventolocal." + "Saida" + ".X"); double y = plugin.cp.getConfig().getDouble("Eventolocal." + "Saida" + ".Y"); double z = plugin.cp.getConfig().getDouble("Eventolocal." + "Saida" + ".Z"); float yy = (float) plugin.cp.getConfig().getDouble("Eventolocal." + "Saida" + ".Yaw"); float pp = (float) plugin.cp.getConfig().getDouble("Eventolocal." + "Saida" + ".Pitch"); Location wap = new Location(world, (double) x, (double) y, (double) z, (float) yy, (float) pp); Bukkit.getServer().getPlayer(s).teleport(wap); Main.participantes.remove(s); } // End of loop }Erro:
[18:28:07 WARN]: Exception in thread "Craft Scheduler Thread - 3" [18:28:07 WARN]: org.apache.commons.lang.UnhandledException: Plugin CuthQuiz v1.0 generated an exception while executing task 15 at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901) at java.util.ArrayList$Itr.next(ArrayList.java:851) at me.cuthmf.quiz.Eventolib.verificar(Eventolib.java:389) at me.cuthmf.quiz.Eventolib$4.run(Eventolib.java:304) at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) ... 3 moreLink para o comentário
Compartilhar em outros sites
8 respostass a esta questão
Posts Recomendados