mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Added UseFlag check at Roads
This commit is contained in:
parent
01d2b0024f
commit
dc3f45acd4
@ -279,6 +279,12 @@ public class EventDispatcher {
|
|||||||
return true;
|
return true;
|
||||||
case INTERACT_BLOCK: {
|
case INTERACT_BLOCK: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
|
final List<BlockTypeWrapper> use = area.getRoadFlag(UseFlag.class);
|
||||||
|
for(final BlockTypeWrapper blockTypeWrapper : use) {
|
||||||
|
if (blockTypeWrapper.accepts(BlockTypes.AIR) || blockTypeWrapper.accepts(blockType)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return Permissions.hasPermission(player,
|
return Permissions.hasPermission(player,
|
||||||
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(), notifyPerms);
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(), notifyPerms);
|
||||||
}
|
}
|
||||||
@ -301,6 +307,12 @@ public class EventDispatcher {
|
|||||||
}
|
}
|
||||||
case TRIGGER_PHYSICAL: {
|
case TRIGGER_PHYSICAL: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
|
final List<BlockTypeWrapper> use = area.getRoadFlag(UseFlag.class);
|
||||||
|
for(final BlockTypeWrapper blockTypeWrapper : use) {
|
||||||
|
if (blockTypeWrapper.accepts(BlockTypes.AIR) || blockTypeWrapper.accepts(blockType)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return Permissions.hasPermission(player,
|
return Permissions.hasPermission(player,
|
||||||
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(), false);
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(), false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user