mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixes #1116
This commit is contained in:
parent
c70c2283a2
commit
64f3e8f79b
@ -188,9 +188,9 @@ public abstract class EventUtil {
|
|||||||
if (flagValue.isPresent()) {
|
if (flagValue.isPresent()) {
|
||||||
value = flagValue.get();
|
value = flagValue.get();
|
||||||
} else {
|
} else {
|
||||||
return true;
|
value = null;
|
||||||
}
|
}
|
||||||
if (!value.contains(PlotBlock.EVERYTHING) && !value.contains(block.getPlotBlock())) {
|
if (value == null || !value.contains(PlotBlock.EVERYTHING) && !value.contains(block.getPlotBlock())) {
|
||||||
return Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER.s(), notifyPerms) || !(!notifyPerms || MainUtil
|
return Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER.s(), notifyPerms) || !(!notifyPerms || MainUtil
|
||||||
.sendMessage(pp, C.FLAG_TUTORIAL_USAGE, C.FLAG_USE.s()));
|
.sendMessage(pp, C.FLAG_TUTORIAL_USAGE, C.FLAG_USE.s()));
|
||||||
}
|
}
|
||||||
@ -233,10 +233,13 @@ public abstract class EventUtil {
|
|||||||
if (flagValue.isPresent()) {
|
if (flagValue.isPresent()) {
|
||||||
value = flagValue.get();
|
value = flagValue.get();
|
||||||
} else {
|
} else {
|
||||||
|
value = null;
|
||||||
|
}
|
||||||
|
if (value == null || !value.contains(PlotBlock.EVERYTHING) && !value.contains(block.getPlotBlock())) {
|
||||||
|
if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_BUILD_OTHER.s(), false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!value.contains(PlotBlock.EVERYTHING) && !value.contains(block.getPlotBlock())) {
|
return false;
|
||||||
return true; //!(!false || MainUtil.sendMessage(pp, C.FLAG_TUTORIAL_USAGE, C.FLAG_USE.s() + "/" + C.FLAG_DEVICE_INTERACT.s()));
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -275,7 +278,6 @@ public abstract class EventUtil {
|
|||||||
if (plot.getFlag(Flags.MISC_INTERACT).or(false)) {
|
if (plot.getFlag(Flags.MISC_INTERACT).or(false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional<HashSet<PlotBlock>> flag = plot.getFlag(Flags.USE);
|
Optional<HashSet<PlotBlock>> flag = plot.getFlag(Flags.USE);
|
||||||
HashSet<PlotBlock> value;
|
HashSet<PlotBlock> value;
|
||||||
if (flag.isPresent()) {
|
if (flag.isPresent()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user