mirror of
https://github.com/songoda/EpicBosses.git
synced 2025-01-22 23:01:21 +01:00
1.0.0-SNAPSHOT-U113
+ Updated so that default items cannot be removed from the items.json + Updated so that all commands/messages panel handlers now split the message/command if it's greater then a specific amount of characters.
This commit is contained in:
parent
e2894bc081
commit
ac19dbe327
@ -11,7 +11,7 @@
|
||||
"type": "OAK_PRESSURE_PLATE",
|
||||
"name": "&c&lDefault Drop Table Menu Item"
|
||||
},
|
||||
"SelectedDropTableItem": {
|
||||
"DefaultSelectedDropTableItem": {
|
||||
"type": "LIGHT_WEIGHTED_PRESSURE_PLATE",
|
||||
"name": "&c&lSelected Defauult Drop Table Menu Item"
|
||||
},
|
||||
|
@ -66,6 +66,8 @@ public class CustomItemsPanel extends MainListPanelHandler {
|
||||
|
||||
if(timesUsed > 0) {
|
||||
Message.Boss_Items_CannotBeRemoved.msg(e.getWhoClicked(), timesUsed);
|
||||
} else if(name.contains("Default")) {
|
||||
Message.Boss_Items_DefaultCannotBeRemoved.msg(e.getWhoClicked(), timesUsed);
|
||||
} else {
|
||||
this.itemsFileManager.removeItemStack(name);
|
||||
currentItemStacks.remove(name);
|
||||
|
@ -106,7 +106,7 @@ public class DropsEditorPanel extends VariablePanelHandler<BossEntity> {
|
||||
ItemStackHolder itemStackHolder;
|
||||
|
||||
if(dropTableName.equalsIgnoreCase(name)) {
|
||||
itemStackHolder = BossAPI.getStoredItemStack("SelectedDropTableItem");
|
||||
itemStackHolder = BossAPI.getStoredItemStack("DefaultSelectedDropTableItem");
|
||||
} else {
|
||||
itemStackHolder = BossAPI.getStoredItemStack("DefaultDropTableMenuItem");
|
||||
}
|
||||
|
@ -119,7 +119,10 @@ public abstract class ListCommandListEditor<T> extends VariablePanelHandler<T> {
|
||||
for(String s : presetLore) {
|
||||
if(s.contains("{commands}")) {
|
||||
for(String message : messages) {
|
||||
newLore.add(StringUtils.get().translateColor("&7" + message));
|
||||
List<String> split = StringUtils.get().splitString(message, 45);
|
||||
|
||||
split.forEach(string -> newLore.add(StringUtils.get().translateColor("&7") + string));
|
||||
newLore.add(" ");
|
||||
}
|
||||
} else {
|
||||
newLore.add(StringUtils.get().translateColor(s));
|
||||
|
@ -119,7 +119,10 @@ public abstract class ListMessageListEditor<T> extends VariablePanelHandler<T> {
|
||||
for(String s : presetLore) {
|
||||
if(s.contains("{message}")) {
|
||||
for(String message : messages) {
|
||||
newLore.add(StringUtils.get().translateColor("&7" + message));
|
||||
List<String> split = StringUtils.get().splitString(message, 45);
|
||||
|
||||
split.forEach(string -> newLore.add(StringUtils.get().translateColor("&7") + string));
|
||||
newLore.add(" ");
|
||||
}
|
||||
} else {
|
||||
newLore.add(StringUtils.get().translateColor(s));
|
||||
|
@ -118,7 +118,10 @@ public abstract class SingleMessageListEditor<T> extends VariablePanelHandler<T>
|
||||
for(String s : presetLore) {
|
||||
if(s.contains("{message}")) {
|
||||
for(String message : messages) {
|
||||
newLore.add(StringUtils.get().translateColor("&7" + message));
|
||||
List<String> split = StringUtils.get().splitString(message, 45);
|
||||
|
||||
split.forEach(string -> newLore.add(StringUtils.get().translateColor("&7") + string));
|
||||
newLore.add(" ");
|
||||
}
|
||||
} else {
|
||||
newLore.add(StringUtils.get().translateColor(s));
|
||||
|
@ -94,6 +94,7 @@ public enum Message {
|
||||
|
||||
Boss_Items_NoPermission("&c&l(!) &cYou do not have access to this command."),
|
||||
Boss_Items_CannotBeRemoved("&c&l(!) &cThe selected item cannot be removed because it is still used in {0} different positions on the bosses."),
|
||||
Boss_Items_DefaultCannotBeRemoved("&c&l(!) &cThe selected item cannot be removed because it is the default item for something in one of the boss menu's."),
|
||||
Boss_Items_Removed("&b&lEpicBosses &8» &7The selected item has been removed from the EpicBosses custom items database."),
|
||||
Boss_Items_Added("&b&lEpicBosses &8» &7You have added an item to the EpicBosses custom items database."),
|
||||
Boss_Items_AlreadySet("&c&l(!) &cYou must take out the item you have set to add before you can add another."),
|
||||
|
2
pom.xml
2
pom.xml
@ -20,7 +20,7 @@
|
||||
|
||||
<properties>
|
||||
<!--<plugin.version>maven-version-number-SNAPSHOT-U90</plugin.version>-->
|
||||
<plugin.version>1.0.0-U112</plugin.version>
|
||||
<plugin.version>1.0.0-U113</plugin.version>
|
||||
<plugin.name>EpicBosses</plugin.name>
|
||||
<plugin.main>com.songoda.epicbosses.CustomBosses</plugin.main>
|
||||
<plugin.author>AMinecraftDev</plugin.author>
|
||||
|
Loading…
Reference in New Issue
Block a user