Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-27 03:12:37 +01:00
Commented out Lighting commands
Dieser Commit ist enthalten in:
Ursprung
49dbd4b76b
Commit
efbe1a737d
@ -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>
|
* 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>
|
* - 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()) {
|
if (!file.exists() || file.isDirectory()) {
|
||||||
throw new IllegalArgumentException("Not a file!");
|
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) {
|
if (Settings.IMP.HISTORY.USE_DISK) {
|
||||||
throw new IllegalArgumentException("History on disk not enabled!");
|
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);
|
String[] path = file.getPath().split(File.separator);
|
||||||
if (path.length < 3) {
|
if (path.length < 3) {
|
||||||
throw new IllegalArgumentException("Not in history directory!");
|
throw new IllegalArgumentException("Not in history directory!");
|
||||||
@ -277,8 +265,7 @@ public class FaweAPI {
|
|||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw new IllegalArgumentException("Invalid UUID from file path: " + uuidString);
|
throw new IllegalArgumentException("Invalid UUID from file path: " + uuidString);
|
||||||
}
|
}
|
||||||
DiskStorageHistory history = new DiskStorageHistory(world, uuid, Integer.parseInt(file.getName().split("\\.")[0]));
|
return new DiskStorageHistory(world, uuid, Integer.parseInt(file.getName().split("\\.")[0]));
|
||||||
return history;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -291,7 +278,7 @@ public class FaweAPI {
|
|||||||
* @param timediff - The max age of the file in milliseconds
|
* @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>
|
* @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
|
* 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) {
|
public static List<DiskStorageHistory> getBDFiles(Location origin, UUID user, int radius, long timediff, boolean shallow) {
|
||||||
Extent extent = origin.getExtent();
|
Extent extent = origin.getExtent();
|
||||||
|
@ -142,15 +142,16 @@ public class RegionCommands {
|
|||||||
)
|
)
|
||||||
@CommandPermissions("worldedit.light.fix")
|
@CommandPermissions("worldedit.light.fix")
|
||||||
public void fixLighting(Player player) throws WorldEditException {
|
public void fixLighting(Player player) throws WorldEditException {
|
||||||
final Location loc = player.getLocation();
|
player.print("Temporarily not working");
|
||||||
Region selection = player.getSelection();
|
// final Location loc = player.getLocation();
|
||||||
if (selection == null) {
|
// Region selection = player.getSelection();
|
||||||
final int cx = loc.getBlockX() >> 4;
|
// if (selection == null) {
|
||||||
final int cz = loc.getBlockZ() >> 4;
|
// final int cx = loc.getBlockX() >> 4;
|
||||||
selection = new CuboidRegion(BlockVector3.at(cx - 8, 0, cz - 8).multiply(16), BlockVector3.at(cx + 8, 0, cz + 8).multiply(16));
|
// 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));
|
// int count = FaweAPI.fixLighting(player.getWorld(), selection,null);
|
||||||
|
// player.print(Caption.of("fawe.info.lighting.propagate.selection" , count));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -171,14 +172,15 @@ public class RegionCommands {
|
|||||||
)
|
)
|
||||||
@CommandPermissions("worldedit.light.remove")
|
@CommandPermissions("worldedit.light.remove")
|
||||||
public void removeLighting(Player player) {
|
public void removeLighting(Player player) {
|
||||||
Region selection = player.getSelection();
|
player.print("Temporarily not working");
|
||||||
if (selection == null) {
|
// Region selection = player.getSelection();
|
||||||
final int cx = player.getLocation().getBlockX() >> 4;
|
// if (selection == null) {
|
||||||
final int cz = player.getLocation().getBlockZ() >> 4;
|
// final int cx = player.getLocation().getBlockX() >> 4;
|
||||||
selection = new CuboidRegion(BlockVector3.at(cx - 8, 0, cz - 8).multiply(16), BlockVector3.at(cx + 8, 0, cz + 8).multiply(16));
|
// 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));
|
// int count = FaweAPI.fixLighting(player.getWorld(), selection, null);
|
||||||
|
// player.print(Caption.of("fawe.info.updated.lighting.selection" , count));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -207,7 +209,7 @@ public class RegionCommands {
|
|||||||
)
|
)
|
||||||
@CommandPermissions("worldedit.light.set")
|
@CommandPermissions("worldedit.light.set")
|
||||||
public void setlighting(Player player, EditSession editSession, @Selection Region region, @Range(from = 0, to = 15) int value) {
|
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(
|
@Command(
|
||||||
@ -216,7 +218,7 @@ public class RegionCommands {
|
|||||||
)
|
)
|
||||||
@CommandPermissions("worldedit.light.set")
|
@CommandPermissions("worldedit.light.set")
|
||||||
public void setskylighting(Player player, @Selection Region region, @Range(from = 0, to= 15) int value) {
|
public void setskylighting(Player player, @Selection Region region, @Range(from = 0, to= 15) int value) {
|
||||||
// TODO NOT IMPLEMENTED
|
player.print("Temporarily not working");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren