mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-28 19:49:06 +00:00
Move commands into folders
This commit is contained in:
@@ -2,7 +2,7 @@ package com.volmit.iris;
|
||||
|
||||
import com.volmit.iris.manager.*;
|
||||
import com.volmit.iris.manager.command.CommandIris;
|
||||
import com.volmit.iris.manager.command.CommandLocate;
|
||||
import com.volmit.iris.manager.command.world.CommandLocate;
|
||||
import com.volmit.iris.manager.command.PermissionIris;
|
||||
import com.volmit.iris.manager.link.BKLink;
|
||||
import com.volmit.iris.manager.link.CitizensLink;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.manager.command.jigsaw.CommandIrisJigsaw;
|
||||
import com.volmit.iris.manager.command.object.CommandIrisObject;
|
||||
import com.volmit.iris.manager.command.studio.CommandIrisStudio;
|
||||
import com.volmit.iris.manager.command.what.CommandIrisWhat;
|
||||
import com.volmit.iris.manager.command.world.*;
|
||||
import com.volmit.iris.util.Command;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
@@ -47,9 +52,6 @@ public class CommandIris extends MortarCommand
|
||||
@Command
|
||||
private CommandIrisReload reload;
|
||||
|
||||
@Command
|
||||
private CommandIrisCapture capture;
|
||||
|
||||
public CommandIris()
|
||||
{
|
||||
super("iris", "ir", "irs");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -48,7 +48,8 @@ public class CommandIrisJigsaw extends MortarCommand
|
||||
sender.sendMessage("Ingame only");
|
||||
return true;
|
||||
}
|
||||
sender.sendMessage("Iris Jigsaw Commands");
|
||||
|
||||
sender.sendMessage("Iris Jigsaw Commands:");
|
||||
printHelp(sender);
|
||||
return true;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -64,7 +64,7 @@ public class CommandIrisObject extends MortarCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
sender.sendMessage("Iris Object Commands");
|
||||
sender.sendMessage("Iris Object Commands:");
|
||||
printHelp(sender);
|
||||
return true;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.Location;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.Location;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.Location;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Sound;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Location;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.object;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Location;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -72,7 +72,7 @@ public class CommandIrisStudio extends MortarCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
sender.sendMessage("Iris Studio Commands");
|
||||
sender.sendMessage("Iris Studio Commands:");
|
||||
printHelp(sender);
|
||||
return true;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.manager.IrisDataManager;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.what;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.Command;
|
||||
@@ -17,6 +17,9 @@ public class CommandIrisWhat extends MortarCommand
|
||||
@Command
|
||||
private CommandIrisWhatBiome biome;
|
||||
|
||||
@Command
|
||||
private CommandIrisWhatObjects objects;
|
||||
|
||||
public CommandIrisWhat()
|
||||
{
|
||||
super("what", "w", "?");
|
||||
@@ -34,6 +37,7 @@ public class CommandIrisWhat extends MortarCommand
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
sender.sendMessage("Iris 'What' Commands:");
|
||||
printHelp(sender);
|
||||
return true;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.what;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.object.IrisBiome;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.what;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.FluidCollisionMode;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.what;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Material;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.what;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.object.IrisBiome;
|
||||
@@ -21,12 +21,13 @@ import java.nio.file.attribute.FileTime;
|
||||
import java.time.Duration;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
public class CommandIrisCapture extends MortarCommand
|
||||
public class CommandIrisWhatObjects extends MortarCommand
|
||||
{
|
||||
public CommandIrisCapture()
|
||||
public CommandIrisWhatObjects()
|
||||
{
|
||||
super("capture", "report", "capt");
|
||||
super("objects", "o", "obj", "capture", "capt");
|
||||
setDescription("Capture nearby information to help with reporting problems");
|
||||
requiresPermission(Iris.perm.studio);
|
||||
setCategory("World");
|
||||
@@ -80,10 +81,11 @@ public class CommandIrisCapture extends MortarCommand
|
||||
File ff = Iris.instance.getDataFile("reports/" + M.ms() + ".txt");
|
||||
PrintWriter pw = new PrintWriter(ff);
|
||||
pw.println("=== Iris Chunk Report ===");
|
||||
pw.println("== General Info ==");
|
||||
pw.println("Iris Version: " + Iris.instance.getDescription().getVersion());
|
||||
pw.println("Bukkit Version: " + Bukkit.getBukkitVersion());
|
||||
pw.println("MC Version: " + Bukkit.getVersion());
|
||||
pw.println("PaperSpigot: " + (PaperLib.isPaper() ? "Yup!" : "Not Paper"));
|
||||
pw.println("PaperSpigot: " + (PaperLib.isPaper() ? "Yup!" : "Nope!"));
|
||||
pw.println("Report Captured At: " + new Date().toString());
|
||||
pw.println("Chunks: (" + chunks.size() + "): ");
|
||||
|
||||
@@ -98,7 +100,7 @@ public class CommandIrisCapture extends MortarCommand
|
||||
|
||||
try
|
||||
{
|
||||
for(File i : new File(world.getWorldFolder(), "region").listFiles())
|
||||
for(File i : Objects.requireNonNull(new File(world.getWorldFolder(), "region").listFiles()))
|
||||
{
|
||||
if(i.isFile())
|
||||
{
|
||||
@@ -107,7 +109,7 @@ public class CommandIrisCapture extends MortarCommand
|
||||
}
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
catch(Throwable ignored)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -117,7 +119,7 @@ public class CommandIrisCapture extends MortarCommand
|
||||
FileTime creationTime = (FileTime) Files.getAttribute(world.getWorldFolder().toPath(), "creationTime");
|
||||
age = hrf(Duration.of(M.ms() - creationTime.toMillis(), ChronoUnit.MILLIS));
|
||||
}
|
||||
catch(IOException ex)
|
||||
catch(IOException ignored)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -130,18 +132,11 @@ public class CommandIrisCapture extends MortarCommand
|
||||
{
|
||||
for(int j = 0; j < 16; j += 3)
|
||||
{
|
||||
if(j >= 16)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for(int k = 0; k < 16; k += 3)
|
||||
{
|
||||
if(k >= 16)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
assert g != null;
|
||||
IrisBiome bb = g.getBiome((i.getX() * 16) + j, (i.getZ() * 16) + k);
|
||||
IrisBiome bxf = g.getCaveBiome((i.getX() * 16) + j, (i.getZ() * 16) + k);
|
||||
biomes.addIfMissing(bb.getName() + " [" + Form.capitalize(bb.getInferredType().name().toLowerCase()) + "] " + " (" + bb.getLoadFile().getName() + ")");
|
||||
@@ -152,16 +147,18 @@ public class CommandIrisCapture extends MortarCommand
|
||||
}
|
||||
}
|
||||
|
||||
regions = Objects.requireNonNull(new File(world.getWorldFolder().getPath() + "/region").list()).length;
|
||||
|
||||
pw.println();
|
||||
pw.println("====== World Info =======");
|
||||
pw.println("== World Info ==");
|
||||
pw.println("World Name: " + world.getName());
|
||||
pw.println("Age: " + age);
|
||||
pw.println("Folder: " + world.getWorldFolder().getPath());
|
||||
pw.println("Regions: " + Form.f(regions));
|
||||
pw.println("Chunks: <" + Form.f(regions * 32 * 32));
|
||||
pw.println("World Size: >" + Form.fileSize(size));
|
||||
pw.println("Chunks: max. " + Form.f(regions * 32 * 32));
|
||||
pw.println("World Size: min. " + Form.fileSize(size));
|
||||
pw.println();
|
||||
pw.println("===== Nearby Biomes =====");
|
||||
pw.println("== Biome Info ==");
|
||||
pw.println("Found " + biomes.size() + " Biome(s): ");
|
||||
|
||||
for(String i : biomes)
|
||||
@@ -170,16 +167,7 @@ public class CommandIrisCapture extends MortarCommand
|
||||
}
|
||||
pw.println();
|
||||
|
||||
pw.println("Found " + caveBiomes.size() + " Underground Biome(s): ");
|
||||
|
||||
for(String i : caveBiomes)
|
||||
{
|
||||
pw.println("- " + i);
|
||||
}
|
||||
|
||||
pw.println();
|
||||
|
||||
pw.println("======== Objects ========");
|
||||
pw.println("== Object Info ==");
|
||||
|
||||
for(String i : objects.k())
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.world;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
@@ -19,7 +19,7 @@ public class CommandIrisCreate extends MortarCommand
|
||||
{
|
||||
public CommandIrisCreate()
|
||||
{
|
||||
super("create", "new", "+");
|
||||
super("create", "c", "cr", "new", "+");
|
||||
requiresPermission(Iris.perm.studio);
|
||||
setCategory("Create");
|
||||
setDescription("Create a new Iris World!");
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.world;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.scaffold.IrisWorlds;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.world;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.pregen.Pregenerator;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.world;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.KList;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.world;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
package com.volmit.iris.manager.command.world;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.scaffold.IrisWorlds;
|
||||
Reference in New Issue
Block a user