diff --git a/src/main/java/noppes/npcs/NoppesUtilServer.java b/src/main/java/noppes/npcs/NoppesUtilServer.java index 384fab332..e6795de13 100644 --- a/src/main/java/noppes/npcs/NoppesUtilServer.java +++ b/src/main/java/noppes/npcs/NoppesUtilServer.java @@ -216,7 +216,7 @@ public class NoppesUtilServer { // Trim the command to remove leading/trailing spaces command = command.trim(); - String[] commands = command.split(";"); // Split the command by semicolon + String[] commands = command.split("@x"); // Split the command by @x // Create TileEntityCommandBlock instance outside the loop TileEntityCommandBlock tile = new TileEntityCommandBlock(); @@ -245,7 +245,7 @@ public class NoppesUtilServer { // Trim the command to remove leading/trailing spaces command = command.trim(); - String[] commands = command.split(";"); // Split the command by semicolon + String[] commands = command.split("@x"); // Split the command by @x CommandBlockLogic logic = tile.func_145993_a(); for (String cmd : commands) { logic.func_145752_a(cmd.trim()); // Trim the command to remove any leading/trailing spaces diff --git a/src/main/java/noppes/npcs/client/gui/SubGuiNpcCommand.java b/src/main/java/noppes/npcs/client/gui/SubGuiNpcCommand.java index 892856c0e..9e6df6db5 100644 --- a/src/main/java/noppes/npcs/client/gui/SubGuiNpcCommand.java +++ b/src/main/java/noppes/npcs/client/gui/SubGuiNpcCommand.java @@ -6,7 +6,7 @@ import noppes.npcs.client.gui.util.*; public class SubGuiNpcCommand extends SubGuiInterface implements ITextfieldListener { public String command; - + public SubGuiNpcCommand(String command) { this.command = command; @@ -19,17 +19,18 @@ public class SubGuiNpcCommand extends SubGuiInterface implements ITextfieldListe public void initGui() { super.initGui(); - this.addTextField(new GuiNpcTextField(4, this, this.fontRendererObj, guiLeft + 4, guiTop + 84, 248, 20, command)); + this.addLabel(new GuiNpcLabel(4, "advMode.command", guiLeft + 4, guiTop + 74)); + this.addTextField(new GuiNpcTextField(4, this, this.fontRendererObj, guiLeft + 4, guiTop + 84, 248, 20, command)); this.getTextField(4).setMaxStringLength(32767); - this.addLabel(new GuiNpcLabel(4, "advMode.command", guiLeft + 4, guiTop + 110)); - this.addLabel(new GuiNpcLabel(5, "advMode.nearestPlayer", guiLeft + 4, guiTop + 125)); - this.addLabel(new GuiNpcLabel(6, "advMode.randomPlayer", guiLeft + 4, guiTop + 140)); - this.addLabel(new GuiNpcLabel(7, "advMode.allPlayers", guiLeft + 4, guiTop + 155)); - this.addLabel(new GuiNpcLabel(8, "dialog.commandoptionplayer", guiLeft + 4, guiTop + 170)); + this.addLabel(new GuiNpcLabel(5, "advMode.nearestPlayer", guiLeft + 4, guiTop + 110)); + this.addLabel(new GuiNpcLabel(6, "advMode.randomPlayer", guiLeft + 4, guiTop + 125)); + this.addLabel(new GuiNpcLabel(7, "advMode.allPlayers", guiLeft + 4, guiTop + 140)); + this.addLabel(new GuiNpcLabel(8, "dialog.commandoptionplayer", guiLeft + 4, guiTop + 155)); + this.addLabel(new GuiNpcLabel(9, "dialog.commandmultiple", guiLeft + 4, guiTop + 170)); this.addButton(new GuiNpcButton(66, guiLeft + 82, guiTop + 190,98, 20, "gui.done")); - + } protected void actionPerformed(GuiButton guibutton) diff --git a/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogOption.java b/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogOption.java index 458be325a..f5d325102 100644 --- a/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogOption.java +++ b/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogOption.java @@ -51,11 +51,11 @@ public class SubGuiNpcDialogOption extends SubGuiInterface implements IGuiData, this.addTextField(new GuiNpcTextField(4, this, this.fontRendererObj, guiLeft + 4, guiTop + 84, 248, 20, option.command)); this.getTextField(4).setMaxStringLength(32767); - this.addLabel(new GuiNpcLabel(4, "advMode.command", guiLeft + 4, guiTop + 110)); - this.addLabel(new GuiNpcLabel(5, "advMode.nearestPlayer", guiLeft + 4, guiTop + 125)); - this.addLabel(new GuiNpcLabel(6, "advMode.randomPlayer", guiLeft + 4, guiTop + 140)); - this.addLabel(new GuiNpcLabel(7, "advMode.allPlayers", guiLeft + 4, guiTop + 155)); - this.addLabel(new GuiNpcLabel(8, "dialog.commandoptionplayer", guiLeft + 4, guiTop + 170)); + this.addLabel(new GuiNpcLabel(5, "advMode.nearestPlayer", guiLeft + 4, guiTop + 110)); + this.addLabel(new GuiNpcLabel(6, "advMode.randomPlayer", guiLeft + 4, guiTop + 125)); + this.addLabel(new GuiNpcLabel(7, "advMode.allPlayers", guiLeft + 4, guiTop + 140)); + this.addLabel(new GuiNpcLabel(8, "dialog.commandoptionplayer", guiLeft + 4, guiTop + 155)); + this.addLabel(new GuiNpcLabel(9, "dialog.commandmultiple", guiLeft + 4, guiTop + 170)); } this.addButton(new GuiNpcButton(66, guiLeft + 82, guiTop + 190,98, 20, "gui.done")); diff --git a/src/main/resources/assets/customnpcs/lang/en_US.lang b/src/main/resources/assets/customnpcs/lang/en_US.lang index 630f70cc5..9ad2ac0b1 100644 --- a/src/main/resources/assets/customnpcs/lang/en_US.lang +++ b/src/main/resources/assets/customnpcs/lang/en_US.lang @@ -548,6 +548,7 @@ dialog.option=Dialog Option dialog.roleoption=Role Option dialog.commandoption=Command Option dialog.commandoptionplayer=Use "@dp" to target the player using this +dialog.commandmultiple=Use "@x" to split the command to append multiple dialog.hideNPC=Hide NPC dialog.showWheel=Show Dialog Wheel dialog.disableEsc=Disable Esc