Update from Git Manager GUI
This commit is contained in:
@@ -281,7 +281,7 @@ public class FussballCommand implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
|
||||
// ── Hologramm-Verwaltung ─────────────────────────────────────────
|
||||
// /fb hologram set <id> goals|wins – Hologramm erstellen
|
||||
// /fb hologram set <id> goals|wins|match – Hologramm erstellen
|
||||
// /fb hologram remove – Nächstes Hologramm (< 5 Blöcke) entfernen
|
||||
// /fb hologram delete <id> – Hologramm nach ID löschen
|
||||
// /fb hologram reload – Alle Hologramme neu spawnen
|
||||
@@ -291,7 +291,7 @@ public class FussballCommand implements CommandExecutor, TabCompleter {
|
||||
if (!(sender instanceof Player player)) { sender.sendMessage("Nur für Spieler!"); return true; }
|
||||
if (args.length < 2) {
|
||||
player.sendMessage(MessageUtil.header("Hologramm-Befehle"));
|
||||
player.sendMessage("§e/fb hologram set <id> goals|wins §7– Hologramm setzen");
|
||||
player.sendMessage("§e/fb hologram set <id> goals|wins|match §7– Hologramm setzen");
|
||||
player.sendMessage("§e/fb hologram remove §7– Nächstes entfernen (< 5 Blöcke)");
|
||||
player.sendMessage("§e/fb hologram delete <id> §7– Nach ID löschen");
|
||||
player.sendMessage("§e/fb hologram reload §7– Alle neu laden");
|
||||
@@ -303,18 +303,27 @@ public class FussballCommand implements CommandExecutor, TabCompleter {
|
||||
switch (args[1].toLowerCase()) {
|
||||
case "set" -> {
|
||||
if (args.length < 4) {
|
||||
player.sendMessage(MessageUtil.error("Benutze: /fb hologram set <id> goals|wins"));
|
||||
player.sendMessage(MessageUtil.error("Benutze: /fb hologram set <id> goals|wins|match"));
|
||||
return true;
|
||||
}
|
||||
String id = args[2];
|
||||
FussballHologram.HoloType type = switch (args[3].toLowerCase()) {
|
||||
case "wins", "siege" -> FussballHologram.HoloType.WINS;
|
||||
case "match", "live", "game" -> FussballHologram.HoloType.MATCH;
|
||||
default -> FussballHologram.HoloType.GOALS;
|
||||
};
|
||||
plugin.getHologramManager().createHologram(id, player.getLocation(), type);
|
||||
String holoLabel = type == FussballHologram.HoloType.WINS ? "Top-10-Siege" : "Top-10-Tore";
|
||||
String holoLabel = switch (type) {
|
||||
case WINS -> "Top-10-Siege";
|
||||
case MATCH -> "Live-Match";
|
||||
default -> "Top-10-Tore";
|
||||
};
|
||||
player.sendMessage(MessageUtil.success("§e" + id + " §a(" + holoLabel + ") Hologramm gesetzt!"));
|
||||
player.sendMessage("§7§oRechtsklick auf das Hologramm wechselt zwischen Tore und Siege.");
|
||||
if (type == FussballHologram.HoloType.MATCH) {
|
||||
player.sendMessage("§7§oLive-Match-Hologramm aktualisiert sich automatisch bei Toren und Nachspielzeit.");
|
||||
} else {
|
||||
player.sendMessage("§7§oRechtsklick auf das Hologramm wechselt zwischen Tore und Siege.");
|
||||
}
|
||||
}
|
||||
case "remove" -> {
|
||||
String removed = plugin.getHologramManager().removeNearest(player.getLocation());
|
||||
@@ -346,7 +355,7 @@ public class FussballCommand implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
}
|
||||
}
|
||||
default -> player.sendMessage(MessageUtil.error("Gültig: set <id> goals|wins | remove | delete <id> | reload | list"));
|
||||
default -> player.sendMessage(MessageUtil.error("Gültig: set <id> goals|wins|match | remove | delete <id> | reload | list"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,7 +494,7 @@ public class FussballCommand implements CommandExecutor, TabCompleter {
|
||||
s.sendMessage("§e/fb history [n] §7- Letzte Spiele anzeigen");
|
||||
if (s.hasPermission("fussball.admin")) {
|
||||
s.sendMessage("§c§lAdmin: §ccreate / delete / setup / stop / debug / dropball");
|
||||
s.sendMessage("§c§lAdmin: §chologram set goals|wins / remove / reload");
|
||||
s.sendMessage("§c§lAdmin: §chologram set goals|wins|match / remove / reload");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,7 +528,7 @@ public class FussballCommand implements CommandExecutor, TabCompleter {
|
||||
} else if (args.length == 3 && args[0].equalsIgnoreCase("hologram") && args[1].equalsIgnoreCase("set")) {
|
||||
list.addAll(plugin.getArenaManager().getArenaNames()); // id-Vorschläge (frei wählbar, aber arena-namen passen)
|
||||
} else if (args.length == 4 && args[0].equalsIgnoreCase("hologram") && args[1].equalsIgnoreCase("set")) {
|
||||
list.addAll(List.of("goals", "wins"));
|
||||
list.addAll(List.of("goals", "wins", "match"));
|
||||
} else if (args.length == 3 && args[0].equalsIgnoreCase("hologram") && args[1].equalsIgnoreCase("delete")) {
|
||||
list.addAll(plugin.getHologramManager().getHologramIds());
|
||||
} else if (args.length == 3 && args[0].equalsIgnoreCase("setgk")) {
|
||||
|
||||
Reference in New Issue
Block a user