feat: WorldEdit Integration, fix logic error

This commit is contained in:
JOO200 2021-12-14 17:08:49 +01:00 committed by Sekwah
parent fdb22ab8b5
commit e3021367ab

View File

@ -329,8 +329,8 @@ public class Listeners implements Listener {
}
if (player.hasPermission("advancedportals.createportal")) {
if (!plugin.getSettings().enabledWorldEditIntegration()) {
if (event.getItem() != null && event.getItem().getType() == WandMaterial // was type id
if (!plugin.getSettings().enabledWorldEditIntegration()
&& event.getItem() != null && event.getItem().getType() == WandMaterial // was type id
&& (!UseOnlyServerAxe || (checkItemForName(event.getItem()) && event.getItem().getItemMeta()
.getDisplayName().equals("\u00A7ePortal Region Selector")))) {
@ -371,8 +371,6 @@ public class Listeners implements Listener {
// Returns the event so no more code is executed(stops unnecessary code being
// executed)
}
}
} else if (checkItemForName(event.getItem())
&& event.getItem().getItemMeta().getDisplayName().equals("\u00A75Portal Block Placer")
&& event.getAction() == Action.LEFT_CLICK_BLOCK