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:55:34 +02:00
Ursprung 83acb13f73
Commit db8f06d6cb

Datei anzeigen

@ -62,6 +62,7 @@ public class SmartPlaceListener implements Listener {
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return;
if (!Config.getInstance().get(event.getPlayer()).getPlainValueOrDefault("smartPlace", false)) return;
if (event.getPlayer().isSneaking()) {
if (event.getClickedBlock().getType() == Material.REPEATER) {
if (event.getItem() != null && event.getMaterial() != Material.REPEATER) {
@ -77,7 +78,6 @@ public class SmartPlaceListener implements Listener {
return;
}
if (!event.getClickedBlock().getType().isInteractable()) return;
if (!Config.getInstance().get(event.getPlayer()).getPlainValueOrDefault("smartPlace", false)) return;
if (event.getItem() == null) return;
if (!event.getMaterial().isBlock()) return;