mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Put in a tip about setting //limit.
This commit is contained in:
parent
92204ba623
commit
7827dfea9e
@ -57,19 +57,23 @@ public class GeneralCommands {
|
|||||||
EditSession editSession) throws WorldEditException {
|
EditSession editSession) throws WorldEditException {
|
||||||
|
|
||||||
LocalConfiguration config = we.getConfiguration();
|
LocalConfiguration config = we.getConfiguration();
|
||||||
|
boolean mayDisable = player.hasPermission("worldedit.limit.unrestricted");
|
||||||
|
|
||||||
int limit = Math.max(-1, args.getInteger(0));
|
int limit = Math.max(-1, args.getInteger(0));
|
||||||
if (!player.hasPermission("worldedit.limit.unrestricted")
|
if (!mayDisable && config.maxChangeLimit > -1) {
|
||||||
&& config.maxChangeLimit > -1) {
|
|
||||||
if (limit > config.maxChangeLimit) {
|
if (limit > config.maxChangeLimit) {
|
||||||
player.printError("Your maximum allowable limit is "
|
player.printError("Your maximum allowable limit is " + config.maxChangeLimit + ".");
|
||||||
+ config.maxChangeLimit + ".");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
session.setBlockChangeLimit(limit);
|
session.setBlockChangeLimit(limit);
|
||||||
player.print("Block change limit set to " + limit + ".");
|
|
||||||
|
if (limit != -1) {
|
||||||
|
player.print("Block change limit set to " + limit + ". (Use //limit -1 to go back to the default.)");
|
||||||
|
} else {
|
||||||
|
player.print("Block change limit set to " + limit + ".");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
|
Loading…
Reference in New Issue
Block a user