From d3d9ecb7e4814fc0ae62853fbd22b8602364a732 Mon Sep 17 00:00:00 2001 From: andre Date: Sat, 9 Sep 2023 16:57:36 +0200 Subject: [PATCH] 09-09-Sat 04:57 --- pom.xml | 2 +- .../admin => Disabled commands}/CommandHologram.java | 7 +++++++ src/main/java/me/ghostdevelopment/kore/Functions.java | 10 +++++++++- src/main/resources/config.yml | 3 --- src/main/resources/lang/al.yml | 6 ------ src/main/resources/lang/cz.yml | 6 ------ src/main/resources/lang/de.yml | 8 +------- src/main/resources/lang/en.yml | 6 ------ src/main/resources/lang/es.yml | 6 ------ src/main/resources/lang/fr.yml | 8 +------- src/main/resources/lang/it.yml | 8 +------- src/main/resources/lang/ru.yml | 9 +-------- src/main/resources/plugin.yml | 6 ------ 13 files changed, 21 insertions(+), 64 deletions(-) rename src/main/{java/me/ghostdevelopment/kore/commands/commands/admin => Disabled commands}/CommandHologram.java (97%) diff --git a/pom.xml b/pom.xml index 61d2ca2..4486bb5 100644 --- a/pom.xml +++ b/pom.xml @@ -138,7 +138,7 @@ org.spigotmc - spigot + spigot-api 1.8.8-R0.1-SNAPSHOT provided diff --git a/src/main/java/me/ghostdevelopment/kore/commands/commands/admin/CommandHologram.java b/src/main/Disabled commands/CommandHologram.java similarity index 97% rename from src/main/java/me/ghostdevelopment/kore/commands/commands/admin/CommandHologram.java rename to src/main/Disabled commands/CommandHologram.java index 1072311..5489602 100644 --- a/src/main/java/me/ghostdevelopment/kore/commands/commands/admin/CommandHologram.java +++ b/src/main/Disabled commands/CommandHologram.java @@ -127,8 +127,15 @@ public void execute(CommandSender sender, String[] args) { Functions.removeHolo(name); }); return; + } else if (args[0].equalsIgnoreCase("addlines")) { + + + + } else if (args[0].equalsIgnoreCase("removeline")){ + // } + /* for (int i = 1; i < args.length; i++) { player.sendMessage(args[i]); diff --git a/src/main/java/me/ghostdevelopment/kore/Functions.java b/src/main/java/me/ghostdevelopment/kore/Functions.java index 729201c..6f2df0e 100644 --- a/src/main/java/me/ghostdevelopment/kore/Functions.java +++ b/src/main/java/me/ghostdevelopment/kore/Functions.java @@ -207,7 +207,15 @@ public static void addLines(String name, List lines){ String path = "holograms."+name+"."; - StorageFile.getFile().set(path+".lines", lines); + List cfgLines = new ArrayList<>(); + + cfgLines = StorageFile.getFile().getStringList(path+".lines"); + + for (String line : lines){ + cfgLines.add(line); + } + + StorageFile.getFile().set(path+".lines", cfgLines); StorageFile.save(); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index a8b05b5..adecf3b 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -34,9 +34,6 @@ killmobs: spawnmob: enabled: true async: true #recomanded: true -holograms: - enabled: true - line-distance: 0.38 chat: enabled: true format: "%sender%: %message%" diff --git a/src/main/resources/lang/al.yml b/src/main/resources/lang/al.yml index b82601e..bde1196 100644 --- a/src/main/resources/lang/al.yml +++ b/src/main/resources/lang/al.yml @@ -111,9 +111,3 @@ spawnmob: spawned: '%prefix% &a%num% krijesa u krijuan!' invalid: '%prefix% &cEntitet i pavlefshëm' usage: '%prefix% &cPërdorimi: /spawnmob [numër]' -holograms: - created: "%prefix% &aHologrami u krijua me emrin %name%" - line-added: "%prefix% &aRresht %n% u shtua" - deleted: "%prefix% &cHologrami me emrin %name% u fshi me sukses!" - line-delete: "%prefix% &cRreshti %n% u fshi" - usage: "%prefix% &cPërdorimi: /holo " diff --git a/src/main/resources/lang/cz.yml b/src/main/resources/lang/cz.yml index 1bdbd75..7b86838 100644 --- a/src/main/resources/lang/cz.yml +++ b/src/main/resources/lang/cz.yml @@ -111,9 +111,3 @@ spawnmob: spawned: '%prefix% &aBylo vytvořeno %num% mobů!' invalid: '%prefix% &cNeplatná entita' usage: '%prefix% &cPoužití: /spawnmob [počet]' -holograms: - created: "%prefix% &aHologram vytvořen s názvem %name%" - line-added: "%prefix% &aŘádek č.%n% byl přidán" - deleted: "%prefix% &cHologram s názvem %name% byl úspěšně smazán!" - line-delete: "%prefix% &cŘádek č.%n% byl smazán" - usage: "%prefix% &cPoužití: /holo " diff --git a/src/main/resources/lang/de.yml b/src/main/resources/lang/de.yml index 1a8ba4e..4e35df5 100644 --- a/src/main/resources/lang/de.yml +++ b/src/main/resources/lang/de.yml @@ -110,10 +110,4 @@ killmobs: spawnmob: spawned: '%prefix% &a%num% Mobs wurden erstellt!' invalid: '%prefix% &cUngültige Entität' - usage: '%prefix% &cVerwendung: /spawnmob [Anzahl]' -holograms: - created: "%prefix% &aHologramm wurde mit dem Namen %name% erstellt" - line-added: "%prefix% &aZeile Nr. %n% wurde hinzugefügt" - deleted: "%prefix% &cHologramm mit dem Namen %name% wurde erfolgreich gelöscht!" - line-delete: "%prefix% &cZeile Nr. %n% wurde gelöscht" - usage: "%prefix% &cVerwendung: /holo " + usage: '%prefix% &cVerwendung: /spawnmob [Anzahl]' \ No newline at end of file diff --git a/src/main/resources/lang/en.yml b/src/main/resources/lang/en.yml index 9d3596b..eef61e4 100644 --- a/src/main/resources/lang/en.yml +++ b/src/main/resources/lang/en.yml @@ -111,9 +111,3 @@ spawnmob: spawned: "prefix% &a%num% mobs have been spawned!" invalid: "%prefix% &cInvalid entity" usage: "%prefix% &cUsage: /spawnmob [num]" -holograms: - created: "%prefix% &aHologram was create with name %name%" - line-added: "%prefix% &aLine n.%n% was added" - deleted: "%prefix% &cHologram with name %name% was successfully deleted!" - lide-delete: "%prefix% &cLine n.%n% was deleted" - usage: "%prefix% &cUsage: /holo " diff --git a/src/main/resources/lang/es.yml b/src/main/resources/lang/es.yml index 5bed97c..63a2462 100644 --- a/src/main/resources/lang/es.yml +++ b/src/main/resources/lang/es.yml @@ -109,9 +109,3 @@ spawnmob: spawned: '%prefix% &a¡Se han creado %num% criaturas!' invalid: '%prefix% &cEntidad inválida' usage: '%prefix% &cUso: /spawnmob [num]' -holograms: - created: "%prefix% &aHolograma creado con el nombre %name%" - line-added: "%prefix% &aLínea n. %n% añadida" - deleted: "%prefix% &cHolograma con el nombre %name% eliminado exitosamente!" - line-delete: "%prefix% &cLínea n. %n% eliminada" - usage: "%prefix% &cUso: /holo " diff --git a/src/main/resources/lang/fr.yml b/src/main/resources/lang/fr.yml index d86f201..28e90a2 100644 --- a/src/main/resources/lang/fr.yml +++ b/src/main/resources/lang/fr.yml @@ -110,10 +110,4 @@ killmobs: spawnmob: spawned: '%prefix% &a%num% créatures ont été créées !' invalid: '%prefix% &cEntité invalide' - usage: '%prefix% &cUtilisation : /spawnmob [nombre]' -holograms: - created: "%prefix% &aHologramme créé avec le nom %name%" - line-added: "%prefix% &aLigne n°%n% ajoutée" - deleted: "%prefix% &cHologramme avec le nom %name% supprimé avec succès!" - line-delete: "%prefix% &cLigne n°%n% supprimée" - usage: "%prefix% &cUtilisation : /holo " + usage: '%prefix% &cUtilisation : /spawnmob [nombre]' \ No newline at end of file diff --git a/src/main/resources/lang/it.yml b/src/main/resources/lang/it.yml index c499681..cf59729 100644 --- a/src/main/resources/lang/it.yml +++ b/src/main/resources/lang/it.yml @@ -110,10 +110,4 @@ killmobs: spawnmob: spawned: "%prefix% &a%num% mobs sono stati creati!" invalid: "%prefix% &cEntità invalida" - usage: "%prefix% &cUso: /spawnmobs [num]" -holograms: - created: "%prefix% &aHologram creato con il nome %name%" - line-added: "%prefix% &aLinea n.%n% aggiunta" - deleted: "%prefix% &cHologram con il nome %name% eliminato con successo!" - line-delete: "%prefix% &cLinea n.%n% eliminata" - usage: "%prefix% &cUtilizzo: /holo " + usage: "%prefix% &cUso: /spawnmobs [num]" \ No newline at end of file diff --git a/src/main/resources/lang/ru.yml b/src/main/resources/lang/ru.yml index dd60ed9..ce82ae2 100644 --- a/src/main/resources/lang/ru.yml +++ b/src/main/resources/lang/ru.yml @@ -108,11 +108,4 @@ killmobs: spawnmob: spawned: '%prefix% &a%num% мобов было создано!' invalid: '%prefix% &cНедопустимая сущность' - usage: '%prefix% &cИспользование: /spawnmob <моб> [кол-во]' -holograms: - created: "%prefix% &aГолограмма создана с именем %name%" - line-added: "%prefix% &aЛиния №%n% была добавлена" - deleted: "%prefix% &cГолограмма с именем %name% была успешно удалена!" - line-delete: "%prefix% &cЛиния №%n% была удалена" - usage: "%prefix% &cИспользование: /holo <аргументы>" - + usage: '%prefix% &cИспользование: /spawnmob <моб> [кол-во]' \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 7993604..5e493b8 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -38,10 +38,6 @@ commands: speed: killmobs: spawnmob: - holo: - aliases: - - holograms - - hologram permissions: kore.*: @@ -100,5 +96,3 @@ permissions: description: "" kore.spawnmob: description: "" - kore.holo: - description: ""