mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 06:36:44 +01:00
fix: Ignore the use flag for liquid placement/removal (#3375)
Fixes #3069
This commit is contained in:
parent
392ee9fa07
commit
92f41f43c5
@ -1239,13 +1239,6 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
);
|
);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
} else if (!plot.isAdded(pp.getUUID())) {
|
} else if (!plot.isAdded(pp.getUUID())) {
|
||||||
List<BlockTypeWrapper> use = plot.getFlag(UseFlag.class);
|
|
||||||
final BlockType blockType = BukkitAdapter.asBlockType(block.getType());
|
|
||||||
for (final BlockTypeWrapper blockTypeWrapper : use) {
|
|
||||||
if (blockTypeWrapper.accepts(blockType)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1311,14 +1304,6 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
);
|
);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
} else if (!plot.isAdded(plotPlayer.getUUID())) {
|
} else if (!plot.isAdded(plotPlayer.getUUID())) {
|
||||||
List<BlockTypeWrapper> use = plot.getFlag(UseFlag.class);
|
|
||||||
Block block = event.getBlockClicked();
|
|
||||||
final BlockType blockType = BukkitAdapter.asBlockType(block.getType());
|
|
||||||
for (final BlockTypeWrapper blockTypeWrapper : use) {
|
|
||||||
if (blockTypeWrapper.accepts(blockType)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
if (Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user