translatable DeleteCommand

This commit is contained in:
LunarAkai 2024-05-15 19:12:31 +02:00
commit b7e97212ac
4 changed files with 11 additions and 3 deletions

View file

@ -2,6 +2,8 @@ package de.lunarakai.minecleaner.commands;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.command.Command; import org.bukkit.command.Command;
@ -18,6 +20,8 @@ import de.lunarakai.minecleaner.MinecleanerArena;
import de.lunarakai.minecleaner.MinecleanerPlugin; import de.lunarakai.minecleaner.MinecleanerPlugin;
import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.ChatColor;
import static de.lunarakai.minecleaner.utils.MinecleanerComponentUtils.createLangComponent;
public class DeleteCommand extends SubCommand { public class DeleteCommand extends SubCommand {
private final MinecleanerPlugin plugin; private final MinecleanerPlugin plugin;
@ -52,9 +56,9 @@ public class DeleteCommand extends SubCommand {
} }
if(arena != null) { if(arena != null) {
plugin.getArenaList().removeArena(arena); plugin.getArenaList().removeArena(arena);
sender.sendMessage(ChatColor.YELLOW + "Die " + plugin.getDisplayedPluginName() + "-Arena " + arena.getName() + " wurde gelöscht."); sender.sendMessage(createLangComponent("arena.delete.success", plugin.getDisplayedPluginName(), arena.getName(), NamedTextColor.YELLOW));
} else { } else {
sender.sendMessage(ChatColor.YELLOW + "Hier befindet sich keine " + plugin.getDisplayedPluginName() + "-Arena."); sender.sendMessage(createLangComponent("arena.delete.noarena", plugin.getDisplayedPluginName(), NamedTextColor.YELLOW));
} }
return true; return true;
} }

View file

@ -16,6 +16,8 @@ arena.create.lookAtCenter=Bitte gucke den Block an, der im Zentrum des {0}-Spiel
arena.create.lookAtSide=Bitte gucke die Seite des Blockes an, wo das {0}-Spielfeld erstellt werden soll. arena.create.lookAtSide=Bitte gucke die Seite des Blockes an, wo das {0}-Spielfeld erstellt werden soll.
arena.create.otherArena=An dieser Stelle befindet sich bereits eine Arena. arena.create.otherArena=An dieser Stelle befindet sich bereits eine Arena.
arena.create.success=Die Arena wurde erfolgreich angelegt. arena.create.success=Die Arena wurde erfolgreich angelegt.
arena.delete.success=Die {0}-Arena {1} wurde geloescht.
arena.delete.noarena=Hier befindet sich keine {0}-Arena.
arena.list=Angelegte {0}-Arenen arena.list=Angelegte {0}-Arenen
arena.list.none=(keine) arena.list.none=(keine)

View file

@ -16,6 +16,8 @@ arena.create.lookAtCenter=Please look at the block that should be in the center
arena.create.lookAtSide=Please look at the side of the block where the {0} field is to be created. arena.create.lookAtSide=Please look at the side of the block where the {0} field is to be created.
arena.create.otherArena=There is already an arena at this location. arena.create.otherArena=There is already an arena at this location.
arena.create.success=The arena has been created successfully. arena.create.success=The arena has been created successfully.
arena.delete.success=The {0}-arena {1} has been deleted.
arena.delete.noarena=There is no {0}-arena here.
arena.list=Created {0} arenas arena.list=Created {0} arenas
arena.list.none=(none) arena.list.none=(none)

View file

@ -1,7 +1,7 @@
name: Minecleaner name: Minecleaner
version: '${project.version}-${git.commit.id.abbrev}' version: '${project.version}-${git.commit.id.abbrev}'
author: LunarAkai author: LunarAkai
website: https://git.lunarakai.de/LunarAkai/NewMinecleaner website: https://github.com/LunarAkai/Minecleaner
main: de.lunarakai.minecleaner.MinecleanerPlugin main: de.lunarakai.minecleaner.MinecleanerPlugin
api-version: '1.20' api-version: '1.20'
depend: depend: