mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
Add plots.visit.denied permission
This commit is contained in:
parent
7a203a12a3
commit
5b11175cf3
@ -141,6 +141,8 @@ permissions:
|
|||||||
default: false
|
default: false
|
||||||
plots.visit.other:
|
plots.visit.other:
|
||||||
default: false
|
default: false
|
||||||
|
plots.visit.denied:
|
||||||
|
default: false
|
||||||
plots.home:
|
plots.home:
|
||||||
default: false
|
default: false
|
||||||
plots.alias.remove:
|
plots.alias.remove:
|
||||||
|
@ -135,6 +135,13 @@ public class Visit extends Command {
|
|||||||
Templates.of("node", "plots.admin.visit.untrusted"));
|
Templates.of("node", "plots.admin.visit.untrusted"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (plot.isDenied(player.getUUID())) {
|
||||||
|
if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_DENIED)) {
|
||||||
|
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||||
|
Template.of("node", "plots.visit.denied"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
confirm.run(this, () -> plot.teleportPlayer(player, TeleportCause.COMMAND, result -> {
|
confirm.run(this, () -> plot.teleportPlayer(player, TeleportCause.COMMAND, result -> {
|
||||||
|
@ -147,6 +147,7 @@ public enum Permission {
|
|||||||
PERMISSION_VISIT_UNOWNED("plots.visit.unowned"),
|
PERMISSION_VISIT_UNOWNED("plots.visit.unowned"),
|
||||||
PERMISSION_VISIT_OWNED("plots.visit.owned"),
|
PERMISSION_VISIT_OWNED("plots.visit.owned"),
|
||||||
PERMISSION_SHARED("plots.visit.shared"),
|
PERMISSION_SHARED("plots.visit.shared"),
|
||||||
|
PERMISSION_VISIT_DENIED("plots.visit.denied"),
|
||||||
PERMISSION_VISIT_OTHER("plots.visit.other"),
|
PERMISSION_VISIT_OTHER("plots.visit.other"),
|
||||||
PERMISSION_HOME("plots.home"),
|
PERMISSION_HOME("plots.home"),
|
||||||
PERMISSION_ALIAS_SET("plots.alias.set"),
|
PERMISSION_ALIAS_SET("plots.alias.set"),
|
||||||
|
Loading…
Reference in New Issue
Block a user