mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
More code quality fixes
This commit is contained in:
@ -232,11 +232,11 @@ public class EditSessionBuilder {
|
||||
event.setExtent(extent);
|
||||
eventBus.post(event);
|
||||
if (event.isCancelled()) {
|
||||
return new NullExtent(extent, FaweCache.INSTANCE.getMANUAL());
|
||||
return new NullExtent(extent, FaweCache.INSTANCE.getManual());
|
||||
}
|
||||
final Extent toReturn = event.getExtent();
|
||||
if(toReturn instanceof com.sk89q.worldedit.extent.NullExtent) {
|
||||
return new NullExtent(toReturn, FaweCache.INSTANCE.getMANUAL());
|
||||
return new NullExtent(toReturn, FaweCache.INSTANCE.getManual());
|
||||
}
|
||||
// if (!(toReturn instanceof AbstractDelegateExtent)) {
|
||||
// Fawe.debug("Extent " + toReturn + " must be AbstractDelegateExtent");
|
||||
@ -316,7 +316,7 @@ public class EditSessionBuilder {
|
||||
if (Permission.hasPermission(player, "worldedit.fast")) {
|
||||
player.print(TranslatableComponent.of("fawe.info.worldedit.oom.admin"));
|
||||
}
|
||||
throw FaweCache.INSTANCE.getLOW_MEMORY();
|
||||
throw FaweCache.INSTANCE.getLowMemory();
|
||||
}
|
||||
}
|
||||
// this.originalLimit = limit;
|
||||
@ -420,7 +420,7 @@ public class EditSessionBuilder {
|
||||
FaweRegionExtent regionExtent = null;
|
||||
if (allowedRegions != null) {
|
||||
if (allowedRegions.length == 0) {
|
||||
regionExtent = new NullExtent(this.extent, FaweCache.INSTANCE.getNO_REGION());
|
||||
regionExtent = new NullExtent(this.extent, FaweCache.INSTANCE.getNoRegion());
|
||||
} else {
|
||||
// this.extent = new ProcessedWEExtent(this.extent, this.limit);
|
||||
if (allowedRegions.length == 1) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.boydti.fawe.util;
|
||||
|
||||
import kotlin.UInt;
|
||||
|
||||
public class MathMan {
|
||||
|
||||
/**
|
||||
@ -414,4 +416,10 @@ public class MathMan {
|
||||
public static boolean isPowerOfTwo(int x) {
|
||||
return (x & (x - 1)) == 0;
|
||||
}
|
||||
|
||||
public static int floor(double value) {
|
||||
int i = (int)value;
|
||||
return value < (double)i ? i - 1 : i;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user