mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-04 00:46:08 +00:00
added evacuate
This commit is contained in:
parent
7c4568066f
commit
447d7596dc
@ -130,6 +130,19 @@ public class CommandWorldManager implements DecreeExecutor {
|
|||||||
checkForBukkitWorlds();
|
checkForBukkitWorlds();
|
||||||
sender().sendMessage(C.GREEN + world + " loaded successfully.");
|
sender().sendMessage(C.GREEN + world + " loaded successfully.");
|
||||||
|
|
||||||
|
}
|
||||||
|
@Decree(description = "Evacuate an iris world", origin = DecreeOrigin.PLAYER, sync = true)
|
||||||
|
public void evacuate(
|
||||||
|
@Param(description = "Evacuate the world")
|
||||||
|
World world
|
||||||
|
) {
|
||||||
|
if (!IrisToolbelt.isIrisWorld(world)) {
|
||||||
|
sender().sendMessage(C.RED + "This is not an Iris world. Iris worlds: " + String.join(", ", Bukkit.getServer().getWorlds().stream().filter(IrisToolbelt::isIrisWorld).map(World::getName).toList()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sender().sendMessage(C.GREEN + "Evacuating world" + world.getName());
|
||||||
|
IrisToolbelt.evacuate(world);
|
||||||
|
|
||||||
}
|
}
|
||||||
public static boolean doesWorldExist(String worldName) {
|
public static boolean doesWorldExist(String worldName) {
|
||||||
File worldContainer = Bukkit.getWorldContainer();
|
File worldContainer = Bukkit.getWorldContainer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user