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()) {
|
||||||
|
case LEFT_CLICK_BLOCK:
|
||||||
|
case LEFT_CLICK_AIR:
|
||||||
startSimulation(event.getPlayer());
|
startSimulation(event.getPlayer());
|
||||||
return;
|
break;
|
||||||
}
|
case RIGHT_CLICK_BLOCK:
|
||||||
if (event.getClickedBlock() == null) {
|
|
||||||
openSimulator(event.getPlayer());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Vector location = event.getClickedBlock().getLocation().toVector().add(event.getBlockFace().getDirection()).add(HALF);
|
Vector location = event.getClickedBlock().getLocation().toVector().add(event.getBlockFace().getDirection()).add(HALF);
|
||||||
TNTSpawn tntSpawn = new TNTSpawn(location);
|
TNTSpawn tntSpawn = new TNTSpawn(location);
|
||||||
addTNT(event.getPlayer(), tntSpawn);
|
addTNT(event.getPlayer(), tntSpawn);
|
||||||
editTNT(event.getPlayer(), tntSpawn);
|
editTNT(event.getPlayer(), tntSpawn);
|
||||||
|
break;
|
||||||
|
case RIGHT_CLICK_AIR:
|
||||||
|
openSimulator(event.getPlayer());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren