Hotfix SmartPlaceListener
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
83acb13f73
Commit
db8f06d6cb
@ -62,6 +62,7 @@ public class SmartPlaceListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return;
|
if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return;
|
||||||
|
if (!Config.getInstance().get(event.getPlayer()).getPlainValueOrDefault("smartPlace", false)) return;
|
||||||
if (event.getPlayer().isSneaking()) {
|
if (event.getPlayer().isSneaking()) {
|
||||||
if (event.getClickedBlock().getType() == Material.REPEATER) {
|
if (event.getClickedBlock().getType() == Material.REPEATER) {
|
||||||
if (event.getItem() != null && event.getMaterial() != Material.REPEATER) {
|
if (event.getItem() != null && event.getMaterial() != Material.REPEATER) {
|
||||||
@ -77,7 +78,6 @@ public class SmartPlaceListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!event.getClickedBlock().getType().isInteractable()) return;
|
if (!event.getClickedBlock().getType().isInteractable()) return;
|
||||||
if (!Config.getInstance().get(event.getPlayer()).getPlainValueOrDefault("smartPlace", false)) return;
|
|
||||||
|
|
||||||
if (event.getItem() == null) return;
|
if (event.getItem() == null) return;
|
||||||
if (!event.getMaterial().isBlock()) return;
|
if (!event.getMaterial().isBlock()) return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren