mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Expand certain FAWE limits to use Long instead of Integer. (#1382)
This commit is contained in:
parent
0674f39600
commit
2c56e480c3
@ -164,9 +164,9 @@ public class Settings extends Config {
|
||||
@Comment("Max actions that can be run concurrently (i.e. commands)")
|
||||
public int MAX_ACTIONS = 1;
|
||||
@Comment("Max number of block changes (e.g. by `//set stone`).")
|
||||
public int MAX_CHANGES = 50000000;
|
||||
public long MAX_CHANGES = 50000000;
|
||||
@Comment("Max number of blocks checked (e.g. `//count stone` which doesn't change blocks)")
|
||||
public int MAX_CHECKS = 50000000;
|
||||
public long MAX_CHECKS = 50000000;
|
||||
@Comment("Number of times a change can fail (e.g. if the player can't access that region)")
|
||||
public int MAX_FAILS = 50000000;
|
||||
@Comment("Allowed brush iterations (e.g. `//brush smooth`)")
|
||||
@ -616,7 +616,7 @@ public class Settings extends Config {
|
||||
);
|
||||
limit.MAX_CHANGES = Math.max(
|
||||
limit.MAX_CHANGES,
|
||||
newLimit.MAX_CHANGES != -1 ? newLimit.MAX_CHANGES : Integer.MAX_VALUE
|
||||
newLimit.MAX_CHANGES != -1 ? newLimit.MAX_CHANGES : Long.MAX_VALUE
|
||||
);
|
||||
limit.MAX_BLOCKSTATES = Math.max(
|
||||
limit.MAX_BLOCKSTATES,
|
||||
@ -624,7 +624,7 @@ public class Settings extends Config {
|
||||
);
|
||||
limit.MAX_CHECKS = Math.max(
|
||||
limit.MAX_CHECKS,
|
||||
newLimit.MAX_CHECKS != -1 ? newLimit.MAX_CHECKS : Integer.MAX_VALUE
|
||||
newLimit.MAX_CHECKS != -1 ? newLimit.MAX_CHECKS : Long.MAX_VALUE
|
||||
);
|
||||
limit.MAX_ENTITIES = Math.max(
|
||||
limit.MAX_ENTITIES,
|
||||
|
@ -7,9 +7,9 @@ import java.util.Set;
|
||||
public class FaweLimit {
|
||||
|
||||
public int MAX_ACTIONS = 0;
|
||||
public int MAX_CHANGES = 0;
|
||||
public long MAX_CHANGES = 0;
|
||||
public int MAX_FAILS = 0;
|
||||
public int MAX_CHECKS = 0;
|
||||
public long MAX_CHECKS = 0;
|
||||
public int MAX_ITERATIONS = 0;
|
||||
public int MAX_BLOCKSTATES = 0;
|
||||
public int MAX_ENTITIES = 0;
|
||||
@ -103,9 +103,9 @@ public class FaweLimit {
|
||||
MAX.SPEED_REDUCTION = 0;
|
||||
MAX.INVENTORY_MODE = 0;
|
||||
MAX.MAX_ACTIONS = 1;
|
||||
MAX.MAX_CHANGES = Integer.MAX_VALUE;
|
||||
MAX.MAX_CHANGES = Long.MAX_VALUE;
|
||||
MAX.MAX_FAILS = Integer.MAX_VALUE;
|
||||
MAX.MAX_CHECKS = Integer.MAX_VALUE;
|
||||
MAX.MAX_CHECKS = Long.MAX_VALUE;
|
||||
MAX.MAX_ITERATIONS = Integer.MAX_VALUE;
|
||||
MAX.MAX_BLOCKSTATES = Integer.MAX_VALUE;
|
||||
MAX.MAX_ENTITIES = Integer.MAX_VALUE;
|
||||
@ -229,9 +229,9 @@ public class FaweLimit {
|
||||
}
|
||||
|
||||
public boolean isUnlimited() {
|
||||
return MAX_CHANGES == Integer.MAX_VALUE
|
||||
return MAX_CHANGES == Long.MAX_VALUE
|
||||
&& MAX_FAILS == Integer.MAX_VALUE
|
||||
&& MAX_CHECKS == Integer.MAX_VALUE
|
||||
&& MAX_CHECKS == Long.MAX_VALUE
|
||||
&& MAX_ITERATIONS == Integer.MAX_VALUE
|
||||
&& MAX_BLOCKSTATES == Integer.MAX_VALUE
|
||||
&& MAX_ENTITIES == Integer.MAX_VALUE
|
||||
|
@ -532,7 +532,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
* @see #getLimit()
|
||||
*/
|
||||
@Deprecated
|
||||
public int getBlockChangeLimit() {
|
||||
public long getBlockChangeLimit() {
|
||||
return originalLimit.MAX_CHANGES;
|
||||
}
|
||||
|
||||
@ -541,7 +541,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
*
|
||||
* @param limit the limit (>= 0) or -1 for no limit
|
||||
*/
|
||||
public void setBlockChangeLimit(int limit) {
|
||||
public void setBlockChangeLimit(long limit) {
|
||||
this.limit.MAX_CHANGES = limit;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user