SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix SmartPlaceListener

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-09-09 20:08:14 +02:00
Ursprung 2d97a425e9
Commit 83acb13f73

Datei anzeigen

@ -64,6 +64,9 @@ public class SmartPlaceListener implements Listener {
if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return;
if (event.getPlayer().isSneaking()) {
if (event.getClickedBlock().getType() == Material.REPEATER) {
if (event.getItem() != null && event.getMaterial() != Material.REPEATER) {
return;
}
Repeater repeater = (Repeater) event.getClickedBlock().getBlockData();
int i = repeater.getDelay() - 1;
if (i <= 0) i += 4;