QOL #203
@ -90,10 +90,8 @@ public class LoaderRecorder implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockBreak(BlockBreakEvent event) {
|
public void onBlockBreak(BlockBreakEvent event) {
|
||||||
if (event.getPlayer() != player) return;
|
if (event.getPlayer() != player) return;
|
||||||
if (event.getBlock().getType() != Material.TNT) {
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
boolean removedOne = false;
|
||||||
for (int i = 0; i < loaderElementList.size(); i++) {
|
for (int i = 0; i < loaderElementList.size(); i++) {
|
||||||
LoaderElement element = loaderElementList.get(i);
|
LoaderElement element = loaderElementList.get(i);
|
||||||
if (!(element instanceof LoaderInteractionElement)) continue;
|
if (!(element instanceof LoaderInteractionElement)) continue;
|
||||||
@ -103,12 +101,18 @@ public class LoaderRecorder implements Listener {
|
|||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
loaderElementList.remove(i - 1);
|
loaderElementList.remove(i - 1);
|
||||||
}
|
}
|
||||||
|
removedOne = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (removedOne) {
|
||||||
|
if (event.getBlock().getType() != Material.TNT) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
SWUtils.sendToActionbar(player, BauSystem.MESSAGE.parse("LOADER_MESSAGE_UNINTERACT", player));
|
SWUtils.sendToActionbar(player, BauSystem.MESSAGE.parse("LOADER_MESSAGE_UNINTERACT", player));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren