You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/goldenshadow/displayentityeditor/events/InventoryClick.java
+31-7Lines changed: 31 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -38,9 +38,17 @@ public void inventoryClick(InventoryClickEvent event) {
38
38
if (event.isLeftClick()) {
39
39
player.closeInventory();
40
40
if (DisplayEntityEditor.alternateTextInput) {
41
-
player.spigot().sendMessage(Utilities.getCommandMessage("name <new_name>", "You can use '&' for color codes."));
41
+
if (DisplayEntityEditor.useMiniMessageFormat) {
42
+
player.spigot().sendMessage(Utilities.getCommandMessage("name <new_name>", "Use MiniMessage formatting to stylize your input."));
43
+
} else {
44
+
player.spigot().sendMessage(Utilities.getCommandMessage("name <new_name>", "You can use '&' for color codes."));
45
+
}
42
46
} else {
43
-
InputManager.createTextInput(player, "Please enter the new name it chat! You can use '&' for color codes.", newInputData(entity, InputType.NAME, null));
47
+
if (DisplayEntityEditor.useMiniMessageFormat) {
48
+
InputManager.createTextInput(player, "Please enter the new name it chat! Use MiniMessage formatting to stylize your input.", newInputData(entity, InputType.NAME, null));
49
+
} else {
50
+
InputManager.createTextInput(player, "Please enter the new name it chat! You can use '&' for color codes.", newInputData(entity, InputType.NAME, null));
51
+
}
44
52
}
45
53
} else {
46
54
entity.setCustomNameVisible(false);
@@ -374,18 +382,34 @@ public void inventoryClick(InventoryClickEvent event) {
374
382
player.closeInventory();
375
383
376
384
if (DisplayEntityEditor.alternateTextInput) {
377
-
player.spigot().sendMessage(Utilities.getCommandMessage("text <new_text>", "You can use '&' for color codes and \\n to create line breaks."));
378
-
} else {
379
-
InputManager.createTextInput(player, "Please enter the new text in chat! You can use '&' for color codes and \\n to create line breaks.", newInputData(entity, InputType.TEXT, null));
385
+
if (DisplayEntityEditor.useMiniMessageFormat) {
386
+
player.spigot().sendMessage(Utilities.getCommandMessage("text <new_text>", "Use MiniMessage formatting to stylize your input."));
387
+
} else {
388
+
player.spigot().sendMessage(Utilities.getCommandMessage("text <new_text>", "You can use '&' for color codes and \\n to create line breaks."));
389
+
}
390
+
} else {
391
+
if (DisplayEntityEditor.useMiniMessageFormat) {
392
+
InputManager.createTextInput(player, "Please enter the new text in chat! Use MiniMessage formatting to stylize your input.", newInputData(entity, InputType.TEXT, null));
393
+
} else {
394
+
InputManager.createTextInput(player, "Please enter the new text in chat! You can use '&' for color codes and \\n to create line breaks.", newInputData(entity, InputType.TEXT, null));
395
+
}
380
396
}
381
397
}
382
398
if (event.isRightClick()) {
383
399
player.closeInventory();
384
400
385
401
if (DisplayEntityEditor.alternateTextInput) {
386
-
player.spigot().sendMessage(Utilities.getCommandMessage("text_append <text_to_append>", "You can use '&' for color codes and \\n to create line breaks."));
402
+
if (DisplayEntityEditor.useMiniMessageFormat) {
403
+
player.spigot().sendMessage(Utilities.getCommandMessage("text_append <text_to_append>", "Use MiniMessage formatting to stylize your input."));
404
+
} else {
405
+
player.spigot().sendMessage(Utilities.getCommandMessage("text_append <text_to_append>", "You can use '&' for color codes and \\n to create line breaks."));
406
+
}
387
407
} else {
388
-
InputManager.createTextInput(player, "Please enter the text in chat that should be appended! You can use '&' for color codes and \\n to create line breaks.", newInputData(entity, InputType.TEXT_APPEND, null));
408
+
if (DisplayEntityEditor.useMiniMessageFormat) {
409
+
InputManager.createTextInput(player, "Please enter the text in chat that should be appended! Use MiniMessage formatting to stylize your input.", newInputData(entity, InputType.TEXT_APPEND, null));
410
+
} else {
411
+
InputManager.createTextInput(player, "Please enter the text in chat that should be appended! You can use '&' for color codes and \\n to create line breaks.", newInputData(entity, InputType.TEXT_APPEND, null));
0 commit comments