mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
Commands & Settings
This commit is contained in:
parent
b158ea9e78
commit
ef6036a7d0
@ -17,12 +17,26 @@ public class IrisHotloadManager
|
|||||||
|
|
||||||
public IrisHotloadManager()
|
public IrisHotloadManager()
|
||||||
{
|
{
|
||||||
w = new FolderWatcher(Iris.instance.getDataFolder("packs"));
|
if(!IrisSettings.get().studio)
|
||||||
|
{
|
||||||
|
w = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
w = new FolderWatcher(Iris.instance.getDataFolder("packs"));
|
||||||
|
}
|
||||||
|
|
||||||
latch = new ChronoLatch(3000);
|
latch = new ChronoLatch(3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void check(IrisContext ch)
|
public void check(IrisContext ch)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!latch.flip())
|
if(!latch.flip())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -155,9 +169,4 @@ public class IrisHotloadManager
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void track(File file)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,9 @@ import com.volmit.iris.util.IO;
|
|||||||
import com.volmit.iris.util.JSONException;
|
import com.volmit.iris.util.JSONException;
|
||||||
import com.volmit.iris.util.JSONObject;
|
import com.volmit.iris.util.JSONObject;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class IrisSettings
|
public class IrisSettings
|
||||||
{
|
{
|
||||||
public static transient IrisSettings settings;
|
public static transient IrisSettings settings;
|
||||||
@ -35,8 +38,12 @@ public class IrisSettings
|
|||||||
public boolean sharedCaching = true;
|
public boolean sharedCaching = true;
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Allows configs to be changed and hotloaded without reloading.")
|
@Desc("Allows Iris to use studio commands & design worlds.")
|
||||||
public boolean hotloading = true;
|
public boolean studio = false;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
|
@Desc("Allows iris to launch guis through the server process. Useful for local development.")
|
||||||
|
public boolean useServerLaunchedGuis = true;
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("When using studio open or create, open the codeworkspace automatically.")
|
@Desc("When using studio open or create, open the codeworkspace automatically.")
|
||||||
|
@ -7,20 +7,32 @@ import com.volmit.iris.util.MortarSender;
|
|||||||
|
|
||||||
public class CommandIris extends MortarCommand
|
public class CommandIris extends MortarCommand
|
||||||
{
|
{
|
||||||
|
@Command
|
||||||
|
private CommandIrisCreate create;
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
private CommandIrisStudio studio;
|
private CommandIrisStudio studio;
|
||||||
|
|
||||||
@Command
|
|
||||||
private CommandIrisWhat what;
|
|
||||||
|
|
||||||
@Command
|
|
||||||
private CommandIrisObject object;
|
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
private CommandIrisStructure structure;
|
private CommandIrisStructure structure;
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
private CommandIrisCreate create;
|
private CommandIrisObject object;
|
||||||
|
|
||||||
|
@Command
|
||||||
|
private CommandIrisWhat what;
|
||||||
|
|
||||||
|
@Command
|
||||||
|
private CommandIrisMetrics metrics;
|
||||||
|
|
||||||
|
@Command
|
||||||
|
private CommandIrisCTC ctc;
|
||||||
|
|
||||||
|
@Command
|
||||||
|
private CommandIrisLMM lmm;
|
||||||
|
|
||||||
|
@Command
|
||||||
|
private CommandIrisPregen pregen;
|
||||||
|
|
||||||
public CommandIris()
|
public CommandIris()
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.Command;
|
import com.volmit.iris.util.Command;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -48,6 +49,12 @@ public class CommandIrisObject extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
sender.sendMessage("Iris Object Commands");
|
sender.sendMessage("Iris Object Commands");
|
||||||
printHelp(sender);
|
printHelp(sender);
|
||||||
return true;
|
return true;
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.Sound;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.util.Cuboid;
|
import com.volmit.iris.util.Cuboid;
|
||||||
import com.volmit.iris.util.Direction;
|
import com.volmit.iris.util.Direction;
|
||||||
@ -24,6 +25,12 @@ public class CommandIrisObjectContract extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.Sound;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.util.Cuboid;
|
import com.volmit.iris.util.Cuboid;
|
||||||
import com.volmit.iris.util.Direction;
|
import com.volmit.iris.util.Direction;
|
||||||
@ -24,6 +25,12 @@ public class CommandIrisObjectExpand extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -26,6 +27,12 @@ public class CommandIrisObjectP1 extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -26,6 +27,12 @@ public class CommandIrisObjectP2 extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -10,6 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.object.IrisObject;
|
import com.volmit.iris.object.IrisObject;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
@ -28,6 +29,12 @@ public class CommandIrisObjectPaste extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.object.IrisObject;
|
import com.volmit.iris.object.IrisObject;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
@ -25,6 +26,12 @@ public class CommandIrisObjectSave extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.Sound;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.util.Cuboid;
|
import com.volmit.iris.util.Cuboid;
|
||||||
import com.volmit.iris.util.Direction;
|
import com.volmit.iris.util.Direction;
|
||||||
@ -24,6 +25,12 @@ public class CommandIrisObjectShift extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
|||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -20,6 +21,12 @@ public class CommandIrisObjectWand extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have an inventory");
|
sender.sendMessage("You don't have an inventory");
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.util.Cuboid;
|
import com.volmit.iris.util.Cuboid;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
@ -26,6 +27,12 @@ public class CommandIrisObjectXAY extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.WandManager;
|
import com.volmit.iris.WandManager;
|
||||||
import com.volmit.iris.util.Cuboid;
|
import com.volmit.iris.util.Cuboid;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
@ -26,6 +27,12 @@ public class CommandIrisObjectXPY extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Objects, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
package com.volmit.iris.command;
|
|
||||||
|
|
||||||
import org.bukkit.World;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
|
||||||
import com.volmit.iris.gen.IrisChunkGenerator;
|
|
||||||
import com.volmit.iris.util.MortarCommand;
|
|
||||||
import com.volmit.iris.util.MortarSender;
|
|
||||||
|
|
||||||
public class CommandIrisRetry extends MortarCommand {
|
|
||||||
public CommandIrisRetry() {
|
|
||||||
super("retry", "again", "rt");
|
|
||||||
setDescription("Retry generating in a failed state");
|
|
||||||
requiresPermission(Iris.perm.studio);
|
|
||||||
setCategory("World");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(MortarSender sender, String[] args) {
|
|
||||||
if (sender.isPlayer()) {
|
|
||||||
Player p = sender.player();
|
|
||||||
World world = p.getWorld();
|
|
||||||
|
|
||||||
if (!(world.getGenerator() instanceof IrisChunkGenerator)) {
|
|
||||||
sender.sendMessage("You must be in an iris world.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
IrisChunkGenerator g = (IrisChunkGenerator) world.getGenerator();
|
|
||||||
|
|
||||||
if (g.isFailing()) {
|
|
||||||
sender.sendMessage("Retrying. If the server is unresponsive, you may need to restart the server.");
|
|
||||||
g.retry();
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
sender.sendMessage("This generator is not failing.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
sender.sendMessage("Players only.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getArgsUsage() {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +1,7 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.Command;
|
import com.volmit.iris.util.Command;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -39,6 +40,12 @@ public class CommandIrisStructure extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Structures, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
sender.sendMessage("Iris Structure Commands");
|
sender.sendMessage("Iris Structure Commands");
|
||||||
printHelp(sender);
|
printHelp(sender);
|
||||||
return true;
|
return true;
|
||||||
|
@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
import com.volmit.iris.util.StructureTemplate;
|
import com.volmit.iris.util.StructureTemplate;
|
||||||
@ -20,6 +21,12 @@ public class CommandIrisStructureClose extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Structures, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
import com.volmit.iris.util.StructureTemplate;
|
import com.volmit.iris.util.StructureTemplate;
|
||||||
@ -20,6 +21,12 @@ public class CommandIrisStructureCreate extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Structures, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
import com.volmit.iris.util.StructureTemplate;
|
import com.volmit.iris.util.StructureTemplate;
|
||||||
@ -20,6 +21,12 @@ public class CommandIrisStructureExpand extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Structures, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
import com.volmit.iris.util.StructureTemplate;
|
import com.volmit.iris.util.StructureTemplate;
|
||||||
@ -20,6 +21,12 @@ public class CommandIrisStructureMore extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Structures, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.object.IrisStructure;
|
import com.volmit.iris.object.IrisStructure;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -21,6 +22,12 @@ public class CommandIrisStructureOpen extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Structures, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
import com.volmit.iris.util.StructureTemplate;
|
import com.volmit.iris.util.StructureTemplate;
|
||||||
@ -20,6 +21,12 @@ public class CommandIrisStructureSave extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Structures, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
|
|
||||||
@ -19,6 +20,12 @@ public class CommandIrisStructureVariants extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio Structures, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sender.isPlayer())
|
if(!sender.isPlayer())
|
||||||
{
|
{
|
||||||
sender.sendMessage("You don't have a wand");
|
sender.sendMessage("You don't have a wand");
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.Command;
|
import com.volmit.iris.util.Command;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -29,37 +30,22 @@ public class CommandIrisStudio extends MortarCommand
|
|||||||
private CommandIrisStudioUpdate update;
|
private CommandIrisStudioUpdate update;
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
private CommandIrisMap map;
|
private CommandIrisStudioMap map;
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
private CommandIrisStudioList list;
|
private CommandIrisStudioList list;
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
private CommandIrisGoto got0;
|
private CommandIrisStudioGoto got0;
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
private CommandIrisEditBiome ebiome;
|
private CommandIrisStudioEditBiome ebiome;
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
private CommandIrisMetrics metrics;
|
private CommandIrisStudioHotload hotload;
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
private CommandIrisPregen pregen;
|
private CommandIrisStudioLoot loot;
|
||||||
|
|
||||||
@Command
|
|
||||||
private CommandIrisPregen world;
|
|
||||||
|
|
||||||
@Command
|
|
||||||
private CommandIrisHotload hotload;
|
|
||||||
|
|
||||||
@Command
|
|
||||||
private CommandIrisCTC ctc;
|
|
||||||
|
|
||||||
@Command
|
|
||||||
private CommandIrisLMM lmm;
|
|
||||||
|
|
||||||
@Command
|
|
||||||
private CommandIrisLoot loot;
|
|
||||||
|
|
||||||
public CommandIrisStudio()
|
public CommandIrisStudio()
|
||||||
{
|
{
|
||||||
@ -71,6 +57,12 @@ public class CommandIrisStudio extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
sender.sendMessage("Iris Studio Commands");
|
sender.sendMessage("Iris Studio Commands");
|
||||||
printHelp(sender);
|
printHelp(sender);
|
||||||
return true;
|
return true;
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
|
|
||||||
@ -21,6 +22,12 @@ public class CommandIrisStudioClose extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!Iris.proj.isProjectOpen())
|
if(!Iris.proj.isProjectOpen())
|
||||||
{
|
{
|
||||||
sender.sendMessage("No open projects.");
|
sender.sendMessage("No open projects.");
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.C;
|
import com.volmit.iris.util.C;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -18,6 +19,12 @@ public class CommandIrisStudioCreate extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(args.length != 1)
|
if(args.length != 1)
|
||||||
{
|
{
|
||||||
sender.sendMessage("Please use a lowercase name with hyphens (-) for spaces.");
|
sender.sendMessage("Please use a lowercase name with hyphens (-) for spaces.");
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.C;
|
import com.volmit.iris.util.C;
|
||||||
import com.volmit.iris.util.J;
|
import com.volmit.iris.util.J;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
@ -19,6 +20,12 @@ public class CommandIrisStudioDownload extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(args.length < 1)
|
if(args.length < 1)
|
||||||
{
|
{
|
||||||
sender.sendMessage("/iris std dl " + C.BOLD + "<NAME>");
|
sender.sendMessage("/iris std dl " + C.BOLD + "<NAME>");
|
||||||
|
@ -6,12 +6,13 @@ import java.io.File;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
|
|
||||||
public class CommandIrisEditBiome extends MortarCommand
|
public class CommandIrisStudioEditBiome extends MortarCommand
|
||||||
{
|
{
|
||||||
public CommandIrisEditBiome()
|
public CommandIrisStudioEditBiome()
|
||||||
{
|
{
|
||||||
super("editbiome", "ebiome", "eb");
|
super("editbiome", "ebiome", "eb");
|
||||||
setDescription("Open this biome file in vscode");
|
setDescription("Open this biome file in vscode");
|
||||||
@ -22,6 +23,12 @@ public class CommandIrisEditBiome extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(sender.isPlayer())
|
if(sender.isPlayer())
|
||||||
{
|
{
|
||||||
Player p = sender.player();
|
Player p = sender.player();
|
@ -5,15 +5,16 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.gen.IrisChunkGenerator;
|
import com.volmit.iris.gen.IrisChunkGenerator;
|
||||||
import com.volmit.iris.object.IrisBiome;
|
import com.volmit.iris.object.IrisBiome;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
import com.volmit.iris.util.RNG;
|
import com.volmit.iris.util.RNG;
|
||||||
|
|
||||||
public class CommandIrisGoto extends MortarCommand
|
public class CommandIrisStudioGoto extends MortarCommand
|
||||||
{
|
{
|
||||||
public CommandIrisGoto()
|
public CommandIrisStudioGoto()
|
||||||
{
|
{
|
||||||
super("goto", "find");
|
super("goto", "find");
|
||||||
setDescription("Find any biome or a biome border");
|
setDescription("Find any biome or a biome border");
|
||||||
@ -24,6 +25,12 @@ public class CommandIrisGoto extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(args.length < 1)
|
if(args.length < 1)
|
||||||
{
|
{
|
||||||
sender.sendMessage("/iris world goto " + getArgsUsage());
|
sender.sendMessage("/iris world goto " + getArgsUsage());
|
@ -4,12 +4,15 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.gen.IrisChunkGenerator;
|
import com.volmit.iris.gen.IrisChunkGenerator;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
|
|
||||||
public class CommandIrisHotload extends MortarCommand {
|
public class CommandIrisStudioHotload extends MortarCommand
|
||||||
public CommandIrisHotload() {
|
{
|
||||||
|
public CommandIrisStudioHotload()
|
||||||
|
{
|
||||||
super("hotload", "hot", "h", "reload");
|
super("hotload", "hot", "h", "reload");
|
||||||
setDescription("Force a hotload");
|
setDescription("Force a hotload");
|
||||||
requiresPermission(Iris.perm.studio);
|
requiresPermission(Iris.perm.studio);
|
||||||
@ -17,12 +20,21 @@ public class CommandIrisHotload extends MortarCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args) {
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
if (sender.isPlayer()) {
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sender.isPlayer())
|
||||||
|
{
|
||||||
Player p = sender.player();
|
Player p = sender.player();
|
||||||
World world = p.getWorld();
|
World world = p.getWorld();
|
||||||
|
|
||||||
if (!(world.getGenerator() instanceof IrisChunkGenerator)) {
|
if(!(world.getGenerator() instanceof IrisChunkGenerator))
|
||||||
|
{
|
||||||
sender.sendMessage("You must be in an iris world.");
|
sender.sendMessage("You must be in an iris world.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -33,7 +45,8 @@ public class CommandIrisHotload extends MortarCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
sender.sendMessage("Players only.");
|
sender.sendMessage("Players only.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +54,8 @@ public class CommandIrisHotload extends MortarCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getArgsUsage() {
|
protected String getArgsUsage()
|
||||||
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.object.IrisDimension;
|
import com.volmit.iris.object.IrisDimension;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -20,6 +21,12 @@ public class CommandIrisStudioList extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for(File i : Iris.globaldata.getDimensionLoader().getFolders())
|
for(File i : Iris.globaldata.getDimensionLoader().getFolders())
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.event.inventory.InventoryType;
|
|||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.object.InventorySlotType;
|
import com.volmit.iris.object.InventorySlotType;
|
||||||
import com.volmit.iris.object.IrisLootTable;
|
import com.volmit.iris.object.IrisLootTable;
|
||||||
import com.volmit.iris.util.KList;
|
import com.volmit.iris.util.KList;
|
||||||
@ -14,9 +15,9 @@ import com.volmit.iris.util.MortarSender;
|
|||||||
import com.volmit.iris.util.O;
|
import com.volmit.iris.util.O;
|
||||||
import com.volmit.iris.util.RNG;
|
import com.volmit.iris.util.RNG;
|
||||||
|
|
||||||
public class CommandIrisLoot extends MortarCommand
|
public class CommandIrisStudioLoot extends MortarCommand
|
||||||
{
|
{
|
||||||
public CommandIrisLoot()
|
public CommandIrisStudioLoot()
|
||||||
{
|
{
|
||||||
super("loot");
|
super("loot");
|
||||||
setDescription("Show loot if a chest were right here");
|
setDescription("Show loot if a chest were right here");
|
||||||
@ -27,6 +28,12 @@ public class CommandIrisLoot extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(sender.isPlayer())
|
if(sender.isPlayer())
|
||||||
{
|
{
|
||||||
Player p = sender.player();
|
Player p = sender.player();
|
@ -1,14 +1,15 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.gen.IrisChunkGenerator;
|
import com.volmit.iris.gen.IrisChunkGenerator;
|
||||||
import com.volmit.iris.gui.IrisVision;
|
import com.volmit.iris.gui.IrisVision;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
|
|
||||||
public class CommandIrisMap extends MortarCommand
|
public class CommandIrisStudioMap extends MortarCommand
|
||||||
{
|
{
|
||||||
public CommandIrisMap()
|
public CommandIrisStudioMap()
|
||||||
{
|
{
|
||||||
super("map", "render");
|
super("map", "render");
|
||||||
setDescription("Render a map (gui outside of mc)");
|
setDescription("Render a map (gui outside of mc)");
|
||||||
@ -19,6 +20,18 @@ public class CommandIrisMap extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!IrisSettings.get().isUseServerLaunchedGuis())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Guis, please enable serverLaunchedGuis in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
IrisChunkGenerator g = Iris.proj.getCurrentProject();
|
IrisChunkGenerator g = Iris.proj.getCurrentProject();
|
||||||
IrisVision.launch(g);
|
IrisVision.launch(g);
|
||||||
sender.sendMessage("Opening Map!");
|
sender.sendMessage("Opening Map!");
|
@ -1,6 +1,7 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
|
|
||||||
@ -17,6 +18,12 @@ public class CommandIrisStudioOpen extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(args.length != 1)
|
if(args.length != 1)
|
||||||
{
|
{
|
||||||
sender.sendMessage("/iris std open <DIMENSION> (file name without .json)");
|
sender.sendMessage("/iris std open <DIMENSION> (file name without .json)");
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.J;
|
import com.volmit.iris.util.J;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -18,6 +19,12 @@ public class CommandIrisStudioPackage extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(args.length == 0)
|
if(args.length == 0)
|
||||||
{
|
{
|
||||||
sender.sendMessage("/iris std package <DIMENSION> [-o]");
|
sender.sendMessage("/iris std package <DIMENSION> [-o]");
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
|
|
||||||
public class CommandIrisStudioUpdate extends MortarCommand {
|
public class CommandIrisStudioUpdate extends MortarCommand
|
||||||
public CommandIrisStudioUpdate() {
|
{
|
||||||
|
public CommandIrisStudioUpdate()
|
||||||
|
{
|
||||||
super("update", "upd");
|
super("update", "upd");
|
||||||
requiresPermission(Iris.perm.studio);
|
requiresPermission(Iris.perm.studio);
|
||||||
setDescription("Update your dimension project.");
|
setDescription("Update your dimension project.");
|
||||||
@ -13,8 +16,16 @@ public class CommandIrisStudioUpdate extends MortarCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args) {
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
if (args.length == 0) {
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(args.length == 0)
|
||||||
|
{
|
||||||
sender.sendMessage("/iris std package <DIMENSION>");
|
sender.sendMessage("/iris std package <DIMENSION>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -25,7 +36,8 @@ public class CommandIrisStudioUpdate extends MortarCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getArgsUsage() {
|
protected String getArgsUsage()
|
||||||
|
{
|
||||||
return "[dimension]";
|
return "[dimension]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.util.KList;
|
import com.volmit.iris.util.KList;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
|
|
||||||
public class CommandIrisStudioVerify extends MortarCommand {
|
public class CommandIrisStudioVerify extends MortarCommand
|
||||||
public CommandIrisStudioVerify() {
|
{
|
||||||
|
public CommandIrisStudioVerify()
|
||||||
|
{
|
||||||
super("verify", "check", "v");
|
super("verify", "check", "v");
|
||||||
requiresPermission(Iris.perm.studio);
|
requiresPermission(Iris.perm.studio);
|
||||||
setDescription("Check project for warnings and issues");
|
setDescription("Check project for warnings and issues");
|
||||||
@ -14,8 +17,16 @@ public class CommandIrisStudioVerify extends MortarCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args) {
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
if (args.length != 1) {
|
{
|
||||||
|
if(!IrisSettings.get().isStudio())
|
||||||
|
{
|
||||||
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(args.length != 1)
|
||||||
|
{
|
||||||
sender.sendMessage("/iris std verify <DIMENSION> (file name without .json)");
|
sender.sendMessage("/iris std verify <DIMENSION> (file name without .json)");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,12 +36,15 @@ public class CommandIrisStudioVerify extends MortarCommand {
|
|||||||
int e = 0;
|
int e = 0;
|
||||||
int w = 0;
|
int w = 0;
|
||||||
|
|
||||||
for (String i : mm) {
|
for(String i : mm)
|
||||||
if (i.contains("ERROR")) {
|
{
|
||||||
|
if(i.contains("ERROR"))
|
||||||
|
{
|
||||||
e++;
|
e++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i.contains("WARN")) {
|
if(i.contains("WARN"))
|
||||||
|
{
|
||||||
w++;
|
w++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,7 +56,8 @@ public class CommandIrisStudioVerify extends MortarCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getArgsUsage() {
|
protected String getArgsUsage()
|
||||||
|
{
|
||||||
return "[dimension]";
|
return "[dimension]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@ public class IrisChunkGenerator extends PostBlockChunkGenerator implements IrisC
|
|||||||
@Override
|
@Override
|
||||||
public void onHotloaded()
|
public void onHotloaded()
|
||||||
{
|
{
|
||||||
if(!IrisSettings.get().hotloading)
|
if(!IrisSettings.get().isStudio())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,6 @@ public class ObjectResourceLoader extends ResourceLoader<IrisObject>
|
|||||||
IrisObject t = new IrisObject(0, 0, 0);
|
IrisObject t = new IrisObject(0, 0, 0);
|
||||||
t.read(j);
|
t.read(j);
|
||||||
loadCache.put(key, t);
|
loadCache.put(key, t);
|
||||||
Iris.hotloader.track(j);
|
|
||||||
J.a(() -> Iris.verbose("Loading " + resourceTypeName + ": " + j.getPath()));
|
J.a(() -> Iris.verbose("Loading " + resourceTypeName + ": " + j.getPath()));
|
||||||
t.setLoadKey(name);
|
t.setLoadKey(name);
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
@ -83,7 +83,6 @@ public class ResourceLoader<T extends IrisRegistrant>
|
|||||||
{
|
{
|
||||||
T t = new Gson().fromJson(IO.readAll(j), objectClass);
|
T t = new Gson().fromJson(IO.readAll(j), objectClass);
|
||||||
loadCache.put(key, t);
|
loadCache.put(key, t);
|
||||||
Iris.hotloader.track(j);
|
|
||||||
J.a(() -> Iris.verbose("Loading " + resourceTypeName + ": " + j.getPath()));
|
J.a(() -> Iris.verbose("Loading " + resourceTypeName + ": " + j.getPath()));
|
||||||
t.setLoadKey(name);
|
t.setLoadKey(name);
|
||||||
t.setLoadFile(j);
|
t.setLoadFile(j);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user