mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
fix: Untrusted visit flag not working with untrusted visit permission
Fixes #3317 Co-authored-by: Alex <mc.cache@web.de>
This commit is contained in:
parent
e99c4e3289
commit
7263290bbe
@ -140,21 +140,16 @@ public class Visit extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_OTHER)) {
|
// allow visit, if UntrustedVisit flag is set, or if the player has either the plot.visit.other or
|
||||||
|
// plot.admin.visit.untrusted permission
|
||||||
|
if (!plot.getFlag(UntrustedVisitFlag.class) && !Permissions.hasPermission(player, Permission.PERMISSION_VISIT_OTHER)
|
||||||
|
&& !Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_VISIT_UNTRUSTED)) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("permission.no_permission"),
|
TranslatableCaption.of("permission.no_permission"),
|
||||||
Templates.of("node", "plots.visit.other")
|
Templates.of("node", "plots.visit.other")
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!plot.getFlag(UntrustedVisitFlag.class) && !Permissions
|
|
||||||
.hasPermission(player, Permission.PERMISSION_ADMIN_VISIT_UNTRUSTED)) {
|
|
||||||
player.sendMessage(
|
|
||||||
TranslatableCaption.of("permission.no_permission"),
|
|
||||||
Templates.of("node", "plots.admin.visit.untrusted")
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (plot.isDenied(player.getUUID())) {
|
if (plot.isDenied(player.getUUID())) {
|
||||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_DENIED)) {
|
if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_DENIED)) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
|
Loading…
Reference in New Issue
Block a user