More Kotlin

This commit is contained in:
MattBDev
2020-01-21 14:30:13 -05:00
parent 0cad7f229b
commit 88359f0215
82 changed files with 867 additions and 1343 deletions

View File

@ -92,7 +92,7 @@ public final class BrushCache {
} else {
displayMap = ReflectionUtils.getMap(display.getValue());
}
displayMap.put("Lore", FaweCache.IMP.asTag(json.split("\\r?\\n")));
displayMap.put("Lore", FaweCache.INSTANCE.asTag(json.split("\\r?\\n")));
String primary = (String) tool.getPrimary().getSettings().get(BrushSettings.SettingType.BRUSH);
String secondary = (String) tool.getSecondary().getSettings().get(BrushSettings.SettingType.BRUSH);
if (primary == null) primary = secondary;

View File

@ -232,11 +232,11 @@ public class EditSessionBuilder {
event.setExtent(extent);
eventBus.post(event);
if (event.isCancelled()) {
return new NullExtent(extent, FaweCache.MANUAL);
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.MANUAL);
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.LOW_MEMORY;
throw FaweCache.INSTANCE.getLOW_MEMORY();
}
}
// 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.NO_REGION);
regionExtent = new NullExtent(this.extent, FaweCache.INSTANCE.getNO_REGION());
} else {
// this.extent = new ProcessedWEExtent(this.extent, this.limit);
if (allowedRegions.length == 1) {