mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Added a plot flag 'untrusted visit', that allows /plot visit for untrusted players without the permission plot.visit.other.
This commit is contained in:
parent
becac84e6e
commit
58dbe96bd8
@ -5,6 +5,7 @@ import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
|
||||
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
|
||||
import com.github.intellectualsites.plotsquared.plot.config.Captions;
|
||||
import com.github.intellectualsites.plotsquared.plot.config.Settings;
|
||||
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
||||
import com.github.intellectualsites.plotsquared.plot.object.*;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.MathMan;
|
||||
@ -129,7 +130,8 @@ import java.util.concurrent.CompletableFuture;
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
} else {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_VISIT_OTHER)) {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_VISIT_OTHER) &&
|
||||
!Flags.UNTRUSTED_VISIT.isTrue(plot)) {
|
||||
Captions.NO_PERMISSION.send(player, Captions.PERMISSION_VISIT_OTHER);
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
|
@ -121,6 +121,7 @@ public final class Flags {
|
||||
public static final BooleanFlag SLEEP = new BooleanFlag("sleep");
|
||||
public static final TeleportDenyFlag DENY_TELEPORT = new TeleportDenyFlag("deny-teleport");
|
||||
public static final BooleanFlag DENY_EXIT = new BooleanFlag("deny-exit");
|
||||
public static final BooleanFlag UNTRUSTED_VISIT = new BooleanFlag("untrusted-visit");
|
||||
|
||||
|
||||
private static final HashMap<String, Flag<?>> flags;
|
||||
|
Loading…
Reference in New Issue
Block a user