13
0

Hotfix: Remove Delete button on Public Schems
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2022-09-10 21:48:48 +02:00
Ursprung 6eef99db65
Commit ace8419e31

Datei anzeigen

@ -269,11 +269,13 @@ public class SchematicCommandUtils {
} }
} }
TextComponent delete = SchematicSystem.MESSAGE.parseToComponent("UTIL_INFO_ACTION_DELETE", false, player); if (node.getOwner() != 0) {
delete.setColor(ChatColor.DARK_RED); TextComponent delete = SchematicSystem.MESSAGE.parseToComponent("UTIL_INFO_ACTION_DELETE", false, player);
delete.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponent[]{SchematicSystem.MESSAGE.parseToComponent("UTIL_INFO_ACTION_DELETE_HOVER", false, player)})); delete.setColor(ChatColor.DARK_RED);
delete.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/schem delete " + node.generateBreadcrumbs(user))); delete.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponent[]{SchematicSystem.MESSAGE.parseToComponent("UTIL_INFO_ACTION_DELETE_HOVER", false, player)}));
base.addExtra(delete); delete.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/schem delete " + node.generateBreadcrumbs(user)));
base.addExtra(delete);
}
if (!base.getExtra().isEmpty()) { if (!base.getExtra().isEmpty()) {
player.spigot().sendMessage(base); player.spigot().sendMessage(base);