mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
perm requirement for add/trust *
This commit is contained in:
parent
40e063e702
commit
7c12a20a2b
@ -43,7 +43,7 @@ public class Add extends SubCommand {
|
||||
return true;
|
||||
}
|
||||
UUID uuid;
|
||||
if (args[0].equalsIgnoreCase("*")) {
|
||||
if (args[0].equalsIgnoreCase("*") && (Permissions.hasPermission(plr, "plots.add.everyone") || Permissions.hasPermission(plr, "plots.admin.command.add"))) {
|
||||
uuid = DBFunc.everyone;
|
||||
} else {
|
||||
// TODO have a runnable for fetch
|
||||
|
@ -287,7 +287,12 @@ public class ListCmd extends SubCommand {
|
||||
C.COMMAND_SYNTAX.send(plr, "/plot list fuzzy <search...> [#]");
|
||||
return false;
|
||||
}
|
||||
String term = StringMan.join(Arrays.copyOfRange(args, 1, args.length - 2), " ");
|
||||
String term;
|
||||
if (MathMan.isInteger(args[args.length - 1])) {
|
||||
term = StringMan.join(Arrays.copyOfRange(args, 1, args.length - 1), " ");
|
||||
} else {
|
||||
term = StringMan.join(Arrays.copyOfRange(args, 1, args.length), " ");
|
||||
}
|
||||
plots = MainUtil.getPlotsBySearch(term);
|
||||
sort = false;
|
||||
break;
|
||||
|
@ -42,7 +42,7 @@ public class Trust extends SubCommand {
|
||||
return true;
|
||||
}
|
||||
UUID uuid;
|
||||
if (args[0].equalsIgnoreCase("*")) {
|
||||
if (args[0].equalsIgnoreCase("*") && (Permissions.hasPermission(plr, "plots.trust.everyone") || Permissions.hasPermission(plr, "plots.admin.command.trust"))) {
|
||||
uuid = DBFunc.everyone;
|
||||
} else {
|
||||
uuid = UUIDHandler.getUUID(args[0], null);
|
||||
|
@ -18,6 +18,7 @@ import com.intellectualcrafters.plot.object.RunnableVal2;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@ -259,7 +260,7 @@ public class ExpireManager {
|
||||
}
|
||||
|
||||
public boolean isExpired(Plot plot) {
|
||||
if (!plot.hasOwner() || DBFunc.everyone.equals(plot.owner) || UUIDHandler.getPlayer(plot.owner) != null || plot.getRunning() > 0) {
|
||||
if (!plot.hasOwner() || Objects.equals(DBFunc.everyone, plot.owner) || UUIDHandler.getPlayer(plot.owner) != null || plot.getRunning() > 0) {
|
||||
return false;
|
||||
}
|
||||
Flag keep = plot.getFlag("keep");
|
||||
|
Loading…
Reference in New Issue
Block a user