Commented out Lighting commands

Dieser Commit ist enthalten in:
MattBDev 2020-02-14 14:35:11 -05:00
Ursprung 49dbd4b76b
Commit efbe1a737d
2 geänderte Dateien mit 26 neuen und 37 gelöschten Zeilen

Datei anzeigen

@ -134,18 +134,6 @@ public class FaweAPI {
}
}
/**
* Create a command with the provided aliases and register all methods of the class as sub commands.<br>
* - You should try to register commands during startup
* - If no aliases are specified, all methods become root commands
*
* @param clazz The class containing all the sub command methods
* @param aliases The aliases to give the command (or none)
*/
public static void registerCommands(Object clazz, String... aliases) {
// PlatformCommandManager.getInstance().registerCommands(clazz, aliases); TODO NOT IMPLEMENTED
}
/**
* You can either use a IQueueExtent or an EditSession to change blocks<br>
* - The IQueueExtent skips a bit of overhead so it's marginally faster<br>
@ -255,12 +243,12 @@ public class FaweAPI {
if (!file.exists() || file.isDirectory()) {
throw new IllegalArgumentException("Not a file!");
}
if (!file.getName().toLowerCase().endsWith(".bd")) {
throw new IllegalArgumentException("Not a BD file!");
}
if (Settings.IMP.HISTORY.USE_DISK) {
throw new IllegalArgumentException("History on disk not enabled!");
}
if (!file.getName().toLowerCase().endsWith(".bd")) {
throw new IllegalArgumentException("Not a BD file!");
}
String[] path = file.getPath().split(File.separator);
if (path.length < 3) {
throw new IllegalArgumentException("Not in history directory!");
@ -277,8 +265,7 @@ public class FaweAPI {
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Invalid UUID from file path: " + uuidString);
}
DiskStorageHistory history = new DiskStorageHistory(world, uuid, Integer.parseInt(file.getName().split("\\.")[0]));
return history;
return new DiskStorageHistory(world, uuid, Integer.parseInt(file.getName().split("\\.")[0]));
}
/**
@ -291,7 +278,7 @@ public class FaweAPI {
* @param timediff - The max age of the file in milliseconds
* @param shallow - If shallow is true, FAWE will only read the first Settings.IMP.BUFFER_SIZE bytes to obtain history info<br>
* Reading only part of the file will result in unreliable bounds info for large edits
* @return
* @return a list of DiskStorageHistory Objects
*/
public static List<DiskStorageHistory> getBDFiles(Location origin, UUID user, int radius, long timediff, boolean shallow) {
Extent extent = origin.getExtent();

Datei anzeigen

@ -142,15 +142,16 @@ public class RegionCommands {
)
@CommandPermissions("worldedit.light.fix")
public void fixLighting(Player player) throws WorldEditException {
final Location loc = player.getLocation();
Region selection = player.getSelection();
if (selection == null) {
final int cx = loc.getBlockX() >> 4;
final int cz = loc.getBlockZ() >> 4;
selection = new CuboidRegion(BlockVector3.at(cx - 8, 0, cz - 8).multiply(16), BlockVector3.at(cx + 8, 0, cz + 8).multiply(16));
}
int count = FaweAPI.fixLighting(player.getWorld(), selection,null);
player.print(Caption.of("fawe.info.lighting.propagate.selection" , count));
player.print("Temporarily not working");
// final Location loc = player.getLocation();
// Region selection = player.getSelection();
// if (selection == null) {
// final int cx = loc.getBlockX() >> 4;
// final int cz = loc.getBlockZ() >> 4;
// selection = new CuboidRegion(BlockVector3.at(cx - 8, 0, cz - 8).multiply(16), BlockVector3.at(cx + 8, 0, cz + 8).multiply(16));
// }
// int count = FaweAPI.fixLighting(player.getWorld(), selection,null);
// player.print(Caption.of("fawe.info.lighting.propagate.selection" , count));
}
@Command(
@ -171,14 +172,15 @@ public class RegionCommands {
)
@CommandPermissions("worldedit.light.remove")
public void removeLighting(Player player) {
Region selection = player.getSelection();
if (selection == null) {
final int cx = player.getLocation().getBlockX() >> 4;
final int cz = player.getLocation().getBlockZ() >> 4;
selection = new CuboidRegion(BlockVector3.at(cx - 8, 0, cz - 8).multiply(16), BlockVector3.at(cx + 8, 0, cz + 8).multiply(16));
}
int count = FaweAPI.fixLighting(player.getWorld(), selection, null);
player.print(Caption.of("fawe.info.updated.lighting.selection" , count));
player.print("Temporarily not working");
// Region selection = player.getSelection();
// if (selection == null) {
// final int cx = player.getLocation().getBlockX() >> 4;
// final int cz = player.getLocation().getBlockZ() >> 4;
// selection = new CuboidRegion(BlockVector3.at(cx - 8, 0, cz - 8).multiply(16), BlockVector3.at(cx + 8, 0, cz + 8).multiply(16));
// }
// int count = FaweAPI.fixLighting(player.getWorld(), selection, null);
// player.print(Caption.of("fawe.info.updated.lighting.selection" , count));
}
@Command(
@ -207,7 +209,7 @@ public class RegionCommands {
)
@CommandPermissions("worldedit.light.set")
public void setlighting(Player player, EditSession editSession, @Selection Region region, @Range(from = 0, to = 15) int value) {
// TODO NOT IMPLEMENTED
player.print("Temporarily not working");
}
@Command(
@ -216,7 +218,7 @@ public class RegionCommands {
)
@CommandPermissions("worldedit.light.set")
public void setskylighting(Player player, @Selection Region region, @Range(from = 0, to= 15) int value) {
// TODO NOT IMPLEMENTED
player.print("Temporarily not working");
}
@Command(