mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-28 11:39:07 +00:00
Command stuffs
This commit is contained in:
20
.idea/workspace.xml
generated
20
.idea/workspace.xml
generated
@@ -114,10 +114,10 @@
|
||||
<screen x="0" y="0" width="1920" height="1050" />
|
||||
</state>
|
||||
<state x="410" y="171" width="1234" height="708" key="#com.intellij.execution.impl.EditConfigurationsDialog/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603832427608" />
|
||||
<state x="718" y="163" key="#com.intellij.ide.util.MemberChooser" timestamp="1603859002833">
|
||||
<state x="718" y="163" key="#com.intellij.ide.util.MemberChooser" timestamp="1603866145975">
|
||||
<screen x="0" y="0" width="1920" height="1050" />
|
||||
</state>
|
||||
<state x="718" y="163" key="#com.intellij.ide.util.MemberChooser/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603859002833" />
|
||||
<state x="718" y="163" key="#com.intellij.ide.util.MemberChooser/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603866145975" />
|
||||
<state x="675" y="394" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes" timestamp="1603856300756">
|
||||
<screen x="0" y="0" width="1920" height="1050" />
|
||||
</state>
|
||||
@@ -134,22 +134,22 @@
|
||||
<screen x="0" y="0" width="1920" height="1050" />
|
||||
</state>
|
||||
<state x="485" y="234" key="#com.intellij.structuralsearch.plugin.ui.StructuralSearchDialog/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603860057506" />
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.bottom" timestamp="1603862787765">
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.bottom" timestamp="1603875073016">
|
||||
<screen x="0" y="0" width="1920" height="1050" />
|
||||
</state>
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.bottom/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603862787765" />
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.center" timestamp="1603862787765">
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.bottom/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603875073016" />
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.center" timestamp="1603875073015">
|
||||
<screen x="0" y="0" width="1920" height="1050" />
|
||||
</state>
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.center/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603862787765" />
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.left" timestamp="1603862787764">
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.center/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603875073015" />
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.left" timestamp="1603875073015">
|
||||
<screen x="0" y="0" width="1920" height="1050" />
|
||||
</state>
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.left/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603862787764" />
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.right" timestamp="1603862787765">
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.left/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603875073015" />
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.right" timestamp="1603875073015">
|
||||
<screen x="0" y="0" width="1920" height="1050" />
|
||||
</state>
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.right/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603862787765" />
|
||||
<state width="1921" height="983" key="GridCell.Tab.0.right/-1920.0.1920.1050/1920.0.1920.1050/0.0.1920.1050@0.0.1920.1050" timestamp="1603875073015" />
|
||||
<state x="598" y="193" width="723" height="664" key="find.popup" timestamp="1603856657478">
|
||||
<screen x="0" y="0" width="1920" height="1050" />
|
||||
</state>
|
||||
|
||||
@@ -3109,7 +3109,7 @@ Class: public com.volmit.iris.command.PermissionIrisStudio NameNotChanged
|
||||
Class: public abstract com.volmit.iris.gen.ContextualChunkGenerator NameNotChanged
|
||||
Source: "ContextualChunkGenerator.java"
|
||||
FieldsOf: com.volmit.iris.gen.ContextualChunkGenerator
|
||||
private static com.volmit.iris.util.MortarPlugin[] a => e
|
||||
private static com.volmit.iris.util.VolmitPlugin[] a => e
|
||||
private com.volmit.iris.util.BlockPosition allowLoot => d
|
||||
private com.volmit.iris.gen.atomics.AtomicMulticache cache => b
|
||||
private com.volmit.iris.IrisDataManager data => a
|
||||
@@ -3134,8 +3134,8 @@ Class: public abstract com.volmit.iris.gen.ContextualChunkGenerator NameNotChang
|
||||
MethodsOf: com.volmit.iris.gen.ContextualChunkGenerator
|
||||
static void <clinit>() SignatureNotChanged
|
||||
public void <init>() SignatureNotChanged
|
||||
public static com.volmit.iris.util.MortarPlugin[] a() => b()
|
||||
public static void a(com.volmit.iris.util.MortarPlugin[]) => b(com.volmit.iris.util.MortarPlugin[])
|
||||
public static com.volmit.iris.util.VolmitPlugin[] a() => b()
|
||||
public static void a(com.volmit.iris.util.VolmitPlugin[]) => b(com.volmit.iris.util.VolmitPlugin[])
|
||||
private static java.lang.Throwable b(java.lang.Throwable) SignatureNotChanged
|
||||
protected boolean canEqual(java.lang.Object) SignatureNotChanged
|
||||
public boolean canSpawn(org.bukkit.World, int, int) SignatureNotChanged
|
||||
@@ -16012,9 +16012,9 @@ Class: public abstract com.volmit.iris.util.MortarPermission NameNotChanged
|
||||
91 => 23
|
||||
92 => 18
|
||||
|
||||
Class: public abstract com.volmit.iris.util.MortarPlugin NameNotChanged
|
||||
Class: public abstract com.volmit.iris.util.VolmitPlugin NameNotChanged
|
||||
Source: "MortarPlugin.java"
|
||||
FieldsOf: com.volmit.iris.util.MortarPlugin
|
||||
FieldsOf: com.volmit.iris.util.VolmitPlugin
|
||||
private static java.lang.String a => c
|
||||
public static boolean bad NameNotChanged
|
||||
private com.volmit.iris.util.KMap cachedClassControllers => a
|
||||
@@ -16023,7 +16023,7 @@ Class: public abstract com.volmit.iris.util.MortarPlugin NameNotChanged
|
||||
private com.volmit.iris.util.KMap commands => d
|
||||
private com.volmit.iris.util.KMap controllers => f
|
||||
private com.volmit.iris.util.KList permissionCache => g
|
||||
MethodsOf: com.volmit.iris.util.MortarPlugin
|
||||
MethodsOf: com.volmit.iris.util.VolmitPlugin
|
||||
static void <clinit>() SignatureNotChanged
|
||||
public void <init>() SignatureNotChanged
|
||||
public static java.lang.String a() => l()
|
||||
@@ -16069,7 +16069,7 @@ Class: public abstract com.volmit.iris.util.MortarPlugin NameNotChanged
|
||||
private void unregisterPermissions() => g()
|
||||
public void v(java.lang.Object) SignatureNotChanged
|
||||
public void w(java.lang.Object) SignatureNotChanged
|
||||
LineNumbersOf: com.volmit.iris.util.MortarPlugin
|
||||
LineNumbersOf: com.volmit.iris.util.VolmitPlugin
|
||||
26 => 176
|
||||
28 => 130
|
||||
43 => 191
|
||||
@@ -20093,7 +20093,7 @@ Class: public final org.zeroturnaround.zip.extra.ZipShort NameNotChanged
|
||||
AutoReflectionClass: com.volmit.iris.util.a
|
||||
|
||||
|
||||
TraceBackClass: com.volmit.iris.util.MortarPlugin Data: 33452 a3452 b3452 z
|
||||
TraceBackClass: com.volmit.iris.util.VolmitPlugin Data: 33452 a3452 b3452 z
|
||||
ForwardClass: com.volmit.iris.Iris Package: com.volmit.iris Data: 12115 a2114 b2115 c2116 N
|
||||
ForwardClass: com.volmit.iris.activation.IrisActivation2 Package: com.volmit.iris.activation Data: 24327 a4327 b4327 c4328 E
|
||||
ForwardClass: com.volmit.iris.command.PermissionIris Package: com.volmit.iris.command Data: 53961 a3961 b3961 r
|
||||
@@ -20388,7 +20388,7 @@ MemberClass: com.volmit.iris.util.MaxNumber Data: 2983
|
||||
MemberClass: com.volmit.iris.util.MinNumber Data: 2981
|
||||
MemberClass: com.volmit.iris.util.MortarCommand Data: 3404
|
||||
MemberClass: com.volmit.iris.util.MortarPermission Data: 3766
|
||||
MemberClass: com.volmit.iris.util.MortarPlugin Data: 3324
|
||||
MemberClass: com.volmit.iris.util.VolmitPlugin Data: 3324
|
||||
MemberClass: com.volmit.iris.util.MortarSender Data: 3310
|
||||
MemberClass: com.volmit.iris.util.NBTConstants Data: 3257
|
||||
MemberClass: com.volmit.iris.util.NBTInputStream Data: 3448
|
||||
|
||||
@@ -55,6 +55,6 @@
|
||||
public <methods>;
|
||||
}
|
||||
|
||||
-assumenosideeffects public class * extends com.volmit.iris.util.MortarPlugin {
|
||||
-assumenosideeffects public class * extends com.volmit.iris.util.VolmitPlugin {
|
||||
public <methods>;
|
||||
}
|
||||
|
||||
@@ -2840,7 +2840,7 @@
|
||||
<method old="run()V" new="run" s="297" e="298"/>
|
||||
<field old="val$g Lcom/volmit/iris/gen/IrisChunkGenerator;" new="ALLATORIxDEMOxanyValidIdentifierName"/>
|
||||
</class>
|
||||
<class old="com.volmit.iris.util.MortarPlugin" new="com.volmit.iris.util.MortarPlugin">
|
||||
<class old="com.volmit.iris.util.VolmitPlugin" new="com.volmit.iris.util.VolmitPlugin">
|
||||
<method old="chain(Lcom/volmit/iris/util/MortarCommand;Ljava/lang/String;Lorg/bukkit/configuration/file/FileConfiguration;)V" new="ALLATORIxDEMOxanyValidIdentifierName" s="138" e="147"/>
|
||||
<method old="chain(Lcom/volmit/iris/util/MortarPermission;Lorg/bukkit/configuration/file/FileConfiguration;)V" new="ALLATORIxDEMOxanyValidIdentifierName" s="107" e="122"/>
|
||||
<method old="computePermissions()Lcom/volmit/iris/util/KList;" new="hashCode" s="199" e="218"/>
|
||||
|
||||
@@ -15,7 +15,6 @@ import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.minelazz.epicworldgenerator.structures.StructureObject;
|
||||
import com.volmit.iris.command.CommandIris;
|
||||
import com.volmit.iris.command.PermissionIris;
|
||||
import com.volmit.iris.gen.IrisTerrainProvider;
|
||||
@@ -45,7 +44,7 @@ import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.M;
|
||||
import com.volmit.iris.util.MetricsLite;
|
||||
import com.volmit.iris.util.MortarPlugin;
|
||||
import com.volmit.iris.util.VolmitPlugin;
|
||||
import com.volmit.iris.util.NastyRunnable;
|
||||
import com.volmit.iris.util.Permission;
|
||||
import com.volmit.iris.util.Queue;
|
||||
@@ -54,7 +53,7 @@ import com.volmit.iris.util.ShurikenQueue;
|
||||
|
||||
import io.papermc.lib.PaperLib;
|
||||
|
||||
public class Iris extends MortarPlugin
|
||||
public class Iris extends VolmitPlugin
|
||||
{
|
||||
public static KList<GroupedExecutor> executors = new KList<>();
|
||||
public static Iris instance;
|
||||
|
||||
@@ -38,6 +38,10 @@ public class IrisSettings
|
||||
@Desc("More cpu for pregen gui but looks nice.")
|
||||
public boolean maxPregenGuiFPS = false;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Adds sound to commands.")
|
||||
public boolean commandSounds = true;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Compress parallax data in memory to reduce memory usage in exchange for more cpu usage.")
|
||||
public boolean parallaxCompression = true;
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.gen.v2.TestGen;
|
||||
import com.volmit.iris.util.Command;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -74,6 +75,11 @@ public class CommandIris extends MortarCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getArgsUsage()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -19,6 +20,14 @@ public class CommandIrisCTC extends MortarCommand
|
||||
setCategory("World");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
if(args.length == 0)
|
||||
{
|
||||
list.qadd("4").qadd("8").qadd("12").qadd("16").qadd("18").qadd("24").qadd("32");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -45,6 +45,11 @@ public class CommandIrisCapture extends MortarCommand
|
||||
setCategory("World");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.volmit.iris.command;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.WorldCreator;
|
||||
@@ -14,12 +15,6 @@ import com.volmit.iris.gen.provisions.ProvisionBukkit;
|
||||
import com.volmit.iris.gen.scaffold.IrisGenConfiguration;
|
||||
import com.volmit.iris.gen.scaffold.TerrainTarget;
|
||||
import com.volmit.iris.object.IrisDimension;
|
||||
import com.volmit.iris.util.Form;
|
||||
import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
import com.volmit.iris.util.O;
|
||||
import com.volmit.iris.util.PregenJob;
|
||||
|
||||
public class CommandIrisCreate extends MortarCommand
|
||||
{
|
||||
@@ -31,6 +26,11 @@ public class CommandIrisCreate extends MortarCommand
|
||||
setDescription("Create a new Iris World!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.C;
|
||||
import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
import com.volmit.iris.manager.ProjectManager;
|
||||
import com.volmit.iris.util.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class CommandIrisDownload extends MortarCommand
|
||||
{
|
||||
@@ -16,6 +16,11 @@ public class CommandIrisDownload extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -14,6 +15,11 @@ public class CommandIrisLMM extends MortarCommand
|
||||
setCategory("World");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -7,10 +8,6 @@ import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.gen.IrisTerrainProvider;
|
||||
import com.volmit.iris.gen.scaffold.IrisMetrics;
|
||||
import com.volmit.iris.gen.scaffold.IrisWorlds;
|
||||
import com.volmit.iris.util.C;
|
||||
import com.volmit.iris.util.Form;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
public class CommandIrisMetrics extends MortarCommand
|
||||
{
|
||||
@@ -22,6 +19,11 @@ public class CommandIrisMetrics extends MortarCommand
|
||||
setCategory("Metrics");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.Command;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -46,6 +47,11 @@ public class CommandIrisObject extends MortarCommand
|
||||
setDescription("Object Commands");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -7,10 +8,6 @@ import org.bukkit.entity.Player;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.manager.WandManager;
|
||||
import com.volmit.iris.util.Cuboid;
|
||||
import com.volmit.iris.util.Direction;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
public class CommandIrisObjectContract extends MortarCommand
|
||||
{
|
||||
@@ -22,6 +19,11 @@ public class CommandIrisObjectContract extends MortarCommand
|
||||
setDescription("Contract a selection based on your lookign direction");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -7,10 +8,6 @@ import org.bukkit.entity.Player;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.manager.WandManager;
|
||||
import com.volmit.iris.util.Cuboid;
|
||||
import com.volmit.iris.util.Direction;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
public class CommandIrisObjectExpand extends MortarCommand
|
||||
{
|
||||
@@ -22,6 +19,11 @@ public class CommandIrisObjectExpand extends MortarCommand
|
||||
setDescription("Expand based on looking direction");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.volmit.iris.command;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -23,6 +24,11 @@ public class CommandIrisObjectP1 extends MortarCommand
|
||||
setDescription("Set point 1 to pos (or look)");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.volmit.iris.command;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -23,6 +24,11 @@ public class CommandIrisObjectP2 extends MortarCommand
|
||||
setDescription("Set point 1 to pos (or look)");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
||||
import java.io.File;
|
||||
import java.util.Set;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@@ -27,6 +28,11 @@ public class CommandIrisObjectPaste extends MortarCommand
|
||||
setDescription("Paste an object");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.volmit.iris.command;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@@ -23,6 +24,11 @@ public class CommandIrisObjectSave extends MortarCommand
|
||||
setDescription("Save an object");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -7,10 +8,6 @@ import org.bukkit.entity.Player;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.manager.WandManager;
|
||||
import com.volmit.iris.util.Cuboid;
|
||||
import com.volmit.iris.util.Direction;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
public class CommandIrisObjectShift extends MortarCommand
|
||||
{
|
||||
@@ -22,6 +19,11 @@ public class CommandIrisObjectShift extends MortarCommand
|
||||
setDescription("Shift selection based on direction");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Sound;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -18,6 +19,11 @@ public class CommandIrisObjectWand extends MortarCommand
|
||||
setDescription("Get an Iris Wand for selecting objects");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@@ -24,6 +25,11 @@ public class CommandIrisObjectXAY extends MortarCommand
|
||||
setDescription("Auto select up, down and out");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@@ -24,6 +25,11 @@ public class CommandIrisObjectXPY extends MortarCommand
|
||||
setDescription("Auto select up and out");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -18,6 +19,19 @@ public class CommandIrisPregen extends MortarCommand
|
||||
setCategory("Pregen");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
list.add("stop");
|
||||
list.add("pause");
|
||||
list.add("resume");
|
||||
list.add("500");
|
||||
list.add("1000");
|
||||
list.add("10k");
|
||||
list.add("25k");
|
||||
list.add("chunksAcross=20");
|
||||
list.add("regionsAcross=8");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
@@ -69,7 +83,7 @@ public class CommandIrisPregen extends MortarCommand
|
||||
{
|
||||
Player p = sender.player();
|
||||
World world = p.getWorld();
|
||||
new PregenJob(world, Integer.valueOf(args[0]), sender, () ->
|
||||
new PregenJob(world, getVal(args[0]), sender, () ->
|
||||
{
|
||||
});
|
||||
|
||||
@@ -83,6 +97,28 @@ public class CommandIrisPregen extends MortarCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
private int getVal(String arg) {
|
||||
if(arg.toLowerCase().endsWith("k"))
|
||||
{
|
||||
return Integer.valueOf(arg.toLowerCase().replaceAll("\\Qk\\E", "")) * 1000;
|
||||
}
|
||||
|
||||
if(arg.toLowerCase().contains("chunksAcross="))
|
||||
{
|
||||
return Integer.valueOf(arg.toLowerCase().replaceAll("\\QchunksAcross=\\E", "")) * 16;
|
||||
}
|
||||
|
||||
if(arg.toLowerCase().endsWith("regionsAcross="))
|
||||
{
|
||||
return Integer.valueOf(arg.toLowerCase().replaceAll("\\QregionsAcross=\\E", "")) * 16;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return Integer.valueOf(arg.toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getArgsUsage()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -19,6 +20,13 @@ public class CommandIrisRegen extends MortarCommand
|
||||
setCategory("Regen");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
list.add("3");
|
||||
list.add("7");
|
||||
list.add("9");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -15,6 +16,11 @@ public class CommandIrisReload extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.Command;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -37,6 +38,11 @@ public class CommandIrisStructure extends MortarCommand
|
||||
setDescription("Structure Commands");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -18,6 +19,11 @@ public class CommandIrisStructureClose extends MortarCommand
|
||||
setDescription("Close a structure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -18,6 +19,11 @@ public class CommandIrisStructureCreate extends MortarCommand
|
||||
setDescription("Create a structure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args) {
|
||||
if (!IrisSettings.get().isStudio()) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -18,6 +19,11 @@ public class CommandIrisStructureExpand extends MortarCommand
|
||||
setDescription("Expand out more of the structure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -18,6 +19,11 @@ public class CommandIrisStructureMove extends MortarCommand
|
||||
setDescription("Load more of the structure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -19,6 +20,11 @@ public class CommandIrisStructureOpen extends MortarCommand
|
||||
setDescription("Open an existing structure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -18,6 +19,11 @@ public class CommandIrisStructureSave extends MortarCommand
|
||||
setDescription("Save a structure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -17,6 +18,11 @@ public class CommandIrisStructureVariants extends MortarCommand
|
||||
setDescription("Change or add variants in tile looking at");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.Command;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -60,6 +61,11 @@ public class CommandIrisStudio extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -19,6 +20,11 @@ public class CommandIrisStudioClose extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -15,6 +16,11 @@ public class CommandIrisStudioConvert extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.C;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -16,6 +17,11 @@ public class CommandIrisStudioCreate extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
||||
import java.awt.Desktop;
|
||||
import java.io.File;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -20,6 +21,11 @@ public class CommandIrisStudioEditBiome extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.gui.NoiseExplorer;
|
||||
import com.volmit.iris.util.Command;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -20,6 +21,11 @@ public class CommandIrisStudioExplorer extends MortarCommand
|
||||
setCategory("World");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.gui.NoiseExplorer;
|
||||
import com.volmit.iris.object.IrisGenerator;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -17,6 +18,11 @@ public class CommandIrisStudioExplorerGenerator extends MortarCommand
|
||||
setCategory("World");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -22,6 +23,14 @@ public class CommandIrisStudioGoto extends MortarCommand
|
||||
setCategory("World");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
if(args.length == 0 && sender.isPlayer() && IrisWorlds.isIrisWorld(sender.player().getWorld()))
|
||||
{
|
||||
list.add(IrisWorlds.getProvider(sender.player().getWorld()).getData().getBiomeLoader().getPreferredKeys());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -20,6 +21,11 @@ public class CommandIrisStudioHotload extends MortarCommand
|
||||
setCategory("World");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.io.File;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.object.IrisDimension;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -18,6 +19,11 @@ public class CommandIrisStudioList extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -27,6 +27,11 @@ public class CommandIrisStudioLoot extends MortarCommand
|
||||
setCategory("Loot");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.gen.IrisTerrainProvider;
|
||||
import com.volmit.iris.gui.IrisVision;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -17,6 +18,11 @@ public class CommandIrisStudioMap extends MortarCommand
|
||||
setCategory("World");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -15,6 +16,11 @@ public class CommandIrisStudioOpen extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -16,6 +17,11 @@ public class CommandIrisStudioPackage extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -21,6 +22,11 @@ public class CommandIrisStudioSummon extends MortarCommand
|
||||
setCategory("Summon");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -15,6 +16,11 @@ public class CommandIrisStudioTP extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.volmit.iris.command;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.manager.IrisProject;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -16,6 +17,11 @@ public class CommandIrisStudioUpdate extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.C;
|
||||
import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
import com.volmit.iris.util.*;
|
||||
|
||||
public class CommandIrisUpdateProject extends MortarCommand
|
||||
{
|
||||
@@ -16,6 +13,11 @@ public class CommandIrisUpdateProject extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -3,10 +3,7 @@ package com.volmit.iris.command;
|
||||
import java.io.File;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.C;
|
||||
import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
import com.volmit.iris.util.*;
|
||||
|
||||
public class CommandIrisUpdateWorld extends MortarCommand
|
||||
{
|
||||
@@ -18,6 +15,11 @@ public class CommandIrisUpdateWorld extends MortarCommand
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.Command;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
@@ -25,6 +26,11 @@ public class CommandIrisWhat extends MortarCommand
|
||||
setDescription("Figure out what stuff is");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -21,6 +22,11 @@ public class CommandIrisWhatBiome extends MortarCommand
|
||||
setDescription("What biome am I in");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.FluidCollisionMode;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.B;
|
||||
import com.volmit.iris.util.C;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
public class CommandIrisWhatBlock extends MortarCommand
|
||||
{
|
||||
@@ -21,6 +18,11 @@ public class CommandIrisWhatBlock extends MortarCommand
|
||||
setDescription("WAILA, WAWLA etc");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.util.KList;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -20,18 +21,36 @@ public class CommandIrisWhatHand extends MortarCommand
|
||||
setDescription("What block am I holding");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTabOptions(MortarSender sender, String[] args, KList<String> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
if(sender.isPlayer())
|
||||
{
|
||||
Player p = sender.player();
|
||||
BlockData bd = p.getInventory().getItemInMainHand().getType().createBlockData();
|
||||
if(!bd.getMaterial().equals(Material.AIR)) {
|
||||
sender.sendMessage("Material: " + C.GREEN + bd.getMaterial().name());
|
||||
sender.sendMessage("Full: " + C.WHITE + bd.getAsString(true));
|
||||
} else {
|
||||
sender.sendMessage("Please hold a block");
|
||||
try
|
||||
{
|
||||
BlockData bd = p.getInventory().getItemInMainHand().getType().createBlockData();
|
||||
if(!bd.getMaterial().equals(Material.AIR)) {
|
||||
sender.sendMessage("Material: " + C.GREEN + bd.getMaterial().name());
|
||||
sender.sendMessage("Full: " + C.WHITE + bd.getAsString(true));
|
||||
} else {
|
||||
sender.sendMessage("Please hold a block/item");
|
||||
}
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
Material bd = p.getInventory().getItemInMainHand().getType();
|
||||
if(!bd.equals(Material.AIR)) {
|
||||
sender.sendMessage("Material: " + C.GREEN + bd.name());
|
||||
} else {
|
||||
sender.sendMessage("Please hold a block/item");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,4 +50,6 @@ public interface ICommand
|
||||
* @return return true to mark it as handled
|
||||
*/
|
||||
public boolean handle(MortarSender sender, String[] args);
|
||||
|
||||
public KList<String> handleTab(MortarSender sender, String[] args);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.volmit.iris.util;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import org.bukkit.Sound;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
@@ -37,6 +41,35 @@ public abstract class MortarCommand implements ICommand
|
||||
description = "No Description";
|
||||
}
|
||||
|
||||
@Override
|
||||
public KList<String> handleTab(MortarSender sender, String[] args)
|
||||
{
|
||||
KList<String> v = new KList<>();
|
||||
if(args.length == 0)
|
||||
{
|
||||
for(MortarCommand i : getChildren())
|
||||
{
|
||||
v.add(i.getNode());
|
||||
}
|
||||
}
|
||||
|
||||
addTabOptions(sender, args, v);
|
||||
|
||||
if(v.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if(sender.isPlayer() && IrisSettings.get().commandSounds)
|
||||
{
|
||||
sender.player().getWorld().playSound(sender.player().getLocation(), Sound.ENTITY_ITEM_FRAME_ROTATE_ITEM, 0.25f, 1.7f);
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
public abstract void addTabOptions(MortarSender sender, String[] args, KList<String> list);
|
||||
|
||||
public void printHelp(MortarSender sender)
|
||||
{
|
||||
boolean b = false;
|
||||
@@ -60,6 +93,12 @@ public abstract class MortarCommand implements ICommand
|
||||
{
|
||||
sender.sendMessage("There are either no sub-commands or you do not have permission to use them.");
|
||||
}
|
||||
|
||||
if(sender.isPlayer() && IrisSettings.get().commandSounds)
|
||||
{
|
||||
sender.player().getWorld().playSound(sender.player().getLocation(), Sound.ITEM_BOOK_PAGE_TURN, 0.28f, 1.4f);
|
||||
sender.player().getWorld().playSound(sender.player().getLocation(), Sound.ITEM_AXE_STRIP, 0.35f, 1.7f);
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract String getArgsUsage();
|
||||
|
||||
@@ -2,7 +2,9 @@ package com.volmit.iris.util;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
@@ -78,7 +80,9 @@ public class VirtualCommand
|
||||
vs.setTag(tag);
|
||||
|
||||
if(label != null)
|
||||
{
|
||||
vs.setCommand(label);
|
||||
}
|
||||
|
||||
if(chain.isEmpty())
|
||||
{
|
||||
@@ -104,6 +108,11 @@ public class VirtualCommand
|
||||
c.remove(0);
|
||||
if(cmd.hit(sender, c, vs.getCommand()))
|
||||
{
|
||||
if(vs.isPlayer() && IrisSettings.get().commandSounds)
|
||||
{
|
||||
vs.player().getWorld().playSound(vs.player().getLocation(), Sound.ITEM_AXE_STRIP, 0.35f, 1.8f);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -118,6 +127,53 @@ public class VirtualCommand
|
||||
return command.handle(vs, chain.toArray(new String[chain.size()]));
|
||||
}
|
||||
|
||||
public KList<String> hitTab(CommandSender sender, KList<String> chain, String label)
|
||||
{
|
||||
MortarSender vs = new MortarSender(sender);
|
||||
vs.setTag(tag);
|
||||
|
||||
if(label != null)
|
||||
vs.setCommand(label);
|
||||
|
||||
if(chain.isEmpty())
|
||||
{
|
||||
if(!checkPermissions(sender, command))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return command.handleTab(vs, new String[0]);
|
||||
}
|
||||
|
||||
String nl = chain.get(0);
|
||||
|
||||
for(KList<String> i : children.k())
|
||||
{
|
||||
for(String j : i)
|
||||
{
|
||||
if(j.equalsIgnoreCase(nl))
|
||||
{
|
||||
vs.setCommand(chain.get(0));
|
||||
VirtualCommand cmd = children.get(i);
|
||||
KList<String> c = chain.copy();
|
||||
c.remove(0);
|
||||
KList<String> v = cmd.hitTab(sender, c, vs.getCommand());
|
||||
if(v != null)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!checkPermissions(sender, command))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return command.handleTab(vs, chain.toArray(new String[chain.size()]));
|
||||
}
|
||||
|
||||
private boolean checkPermissions(CommandSender sender, ICommand command2)
|
||||
{
|
||||
boolean failed = false;
|
||||
|
||||
@@ -6,9 +6,11 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandMap;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -16,14 +18,17 @@ import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.command.SimpleCommandMap;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class MortarPlugin extends JavaPlugin implements Listener
|
||||
public abstract class VolmitPlugin extends JavaPlugin implements Listener
|
||||
{
|
||||
public static boolean bad = false;
|
||||
private KMap<KList<String>, VirtualCommand> commands;
|
||||
@@ -471,6 +476,42 @@ public abstract class MortarPlugin extends JavaPlugin implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command,
|
||||
@NotNull String alias, @NotNull String[] args) {
|
||||
KList<String> chain = new KList<String>();
|
||||
|
||||
for(String i : args)
|
||||
{
|
||||
if(i.trim().isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
chain.add(i.trim());
|
||||
}
|
||||
|
||||
for(KList<String> i : commands.k())
|
||||
{
|
||||
for(String j : i)
|
||||
{
|
||||
if(j.equalsIgnoreCase(alias))
|
||||
{
|
||||
VirtualCommand cmd = commands.get(i);
|
||||
|
||||
List<String> v = cmd.hitTab(sender, chain.copy(), alias);
|
||||
if(v != null)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.onTabComplete(sender, command, alias, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, org.bukkit.command.Command command, String label, String[] args)
|
||||
{
|
||||
Reference in New Issue
Block a user