Fixed CCE When Block is Changed #101
@ -81,7 +81,12 @@ public class Detonator implements Listener {
|
|||||||
Boolean powered;
|
Boolean powered;
|
||||||
if(activation.activation == -1) switch (Core.getVersion()) {
|
if(activation.activation == -1) switch (Core.getVersion()) {
|
||||||
case 15:
|
case 15:
|
||||||
|
try {
|
||||||
powered = AutoLoader_15.getLever(activation.location.getBlock());
|
powered = AutoLoader_15.getLever(activation.location.getBlock());
|
||||||
|
}catch (ClassCastException e) {
|
||||||
|
locs.remove(activation);
|
||||||
|
|||||||
|
return;
|
||||||
|
}
|
||||||
AutoLoader_15.setRedstone(activation.location, !powered);
|
AutoLoader_15.setRedstone(activation.location, !powered);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -111,7 +116,7 @@ public class Detonator implements Listener {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
switch (event.getAction()) {
|
switch (event.getAction()) {
|
||||||
case LEFT_CLICK_BLOCK:
|
case LEFT_CLICK_BLOCK:
|
||||||
Detoloader detoloader = null;
|
Detoloader detoloader;
|
||||||
switch(Core.getVersion()){
|
switch(Core.getVersion()){
|
||||||
case 15:
|
case 15:
|
||||||
detoloader = AutoLoader_15.onPlayerInteractLoader(event);
|
detoloader = AutoLoader_15.onPlayerInteractLoader(event);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Das dürfte eine ConcurrentModificationException werfen. Es gibt eine Funktion locs.removeIf() die sollte da verwendet werden.
Kleiner Denkfehler von meiner seite.