mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Fix untrusted-visit.
This commit is contained in:
parent
ae2867136a
commit
4ca7a81e96
2 changed files with 7 additions and 2 deletions
|
@ -143,11 +143,15 @@ public class Visit extends Command {
|
||||||
return CompletableFuture.completedFuture(false);
|
return CompletableFuture.completedFuture(false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_VISIT_OTHER) && !plot
|
if (!Permissions.hasPermission(player, Captions.PERMISSION_VISIT_OTHER)) {
|
||||||
.getFlag(UntrustedVisitFlag.class)) {
|
|
||||||
Captions.NO_PERMISSION.send(player, Captions.PERMISSION_VISIT_OTHER);
|
Captions.NO_PERMISSION.send(player, Captions.PERMISSION_VISIT_OTHER);
|
||||||
return CompletableFuture.completedFuture(false);
|
return CompletableFuture.completedFuture(false);
|
||||||
}
|
}
|
||||||
|
if (!plot.getFlag(UntrustedVisitFlag.class) &&
|
||||||
|
!Permissions.hasPermission(player, Captions.PERMISSION_ADMIN_VISIT_UNTRUSTED)) {
|
||||||
|
Captions.NO_PERMISSION.send(player, Captions.PERMISSION_ADMIN_VISIT_UNTRUSTED);
|
||||||
|
return CompletableFuture.completedFuture(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
confirm.run(this, () -> {
|
confirm.run(this, () -> {
|
||||||
if (plot.teleportPlayer(player, TeleportCause.COMMAND)) {
|
if (plot.teleportPlayer(player, TeleportCause.COMMAND)) {
|
||||||
|
|
|
@ -53,6 +53,7 @@ public enum Captions implements Caption {
|
||||||
PERMISSION_ADMIN_UPDATE_NOTIFICATION("plots.admin.update.notify", "static.permissions"),
|
PERMISSION_ADMIN_UPDATE_NOTIFICATION("plots.admin.update.notify", "static.permissions"),
|
||||||
PERMISSION_ADMIN_EXIT_DENIED("plots.admin.exit.denied", "static.permissions"),
|
PERMISSION_ADMIN_EXIT_DENIED("plots.admin.exit.denied", "static.permissions"),
|
||||||
PERMISSION_ADMIN_ENTRY_DENIED("plots.admin.entry.denied", "static.permissions"),
|
PERMISSION_ADMIN_ENTRY_DENIED("plots.admin.entry.denied", "static.permissions"),
|
||||||
|
PERMISSION_ADMIN_VISIT_UNTRUSTED("plots.admin.visit.untrusted", "static.permissions"),
|
||||||
PERMISSION_ADMIN_ENTRY_FORCEFIELD("plots.admin.entry.forcefield", "static.permissions"),
|
PERMISSION_ADMIN_ENTRY_FORCEFIELD("plots.admin.entry.forcefield", "static.permissions"),
|
||||||
PERMISSION_COMMANDS_CHAT("plots.admin.command.chat", "static.permissions"),
|
PERMISSION_COMMANDS_CHAT("plots.admin.command.chat", "static.permissions"),
|
||||||
PERMISSION_MERGE_OTHER("plots.merge.other", "static.permissions"),
|
PERMISSION_MERGE_OTHER("plots.merge.other", "static.permissions"),
|
||||||
|
|
Loading…
Reference in a new issue