Fix pr stuff
Dieser Commit ist enthalten in:
Ursprung
3f39066209
Commit
b523747394
@ -58,18 +58,23 @@ public class TNTSimulatorListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.LEFT_CLICK_AIR) {
|
switch (event.getAction()) {
|
||||||
startSimulation(event.getPlayer());
|
case LEFT_CLICK_BLOCK:
|
||||||
return;
|
case LEFT_CLICK_AIR:
|
||||||
|
startSimulation(event.getPlayer());
|
||||||
|
break;
|
||||||
|
case RIGHT_CLICK_BLOCK:
|
||||||
|
Vector location = event.getClickedBlock().getLocation().toVector().add(event.getBlockFace().getDirection()).add(HALF);
|
||||||
|
TNTSpawn tntSpawn = new TNTSpawn(location);
|
||||||
|
addTNT(event.getPlayer(), tntSpawn);
|
||||||
|
editTNT(event.getPlayer(), tntSpawn);
|
||||||
|
break;
|
||||||
|
case RIGHT_CLICK_AIR:
|
||||||
|
openSimulator(event.getPlayer());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (event.getClickedBlock() == null) {
|
|
||||||
openSimulator(event.getPlayer());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Vector location = event.getClickedBlock().getLocation().toVector().add(event.getBlockFace().getDirection()).add(HALF);
|
|
||||||
TNTSpawn tntSpawn = new TNTSpawn(location);
|
|
||||||
addTNT(event.getPlayer(), tntSpawn);
|
|
||||||
editTNT(event.getPlayer(), tntSpawn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren