diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandFlopyp.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandFlopyp.java index 4b9d3c2..fa614ed 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandFlopyp.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandFlopyp.java @@ -29,7 +29,11 @@ import java.util.List; public class WECommandFlopyp extends WECommand { public List onTabComplete(CommandSender sender, Command command, String s, String[] args) { - return manageList(Arrays.asList("-a", "-b", "-e", "-n", "-o", "-s", "-m"), args, args.length - 1); + List tabCompletes = Arrays.asList("-a", "-b", "-e", "-n", "-o", "-s", "-m"); + if (args.length == 0) { + return tabCompletes; + } + return manageList(tabCompletes, args, args.length - 1); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandPaste.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandPaste.java index ee3b940..90f0e0a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandPaste.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandPaste.java @@ -29,7 +29,11 @@ import java.util.List; public class WECommandPaste extends WECommand { public List onTabComplete(CommandSender sender, Command command, String s, String[] args) { - return manageList(Arrays.asList("-a", "-b", "-e", "-n", "-o", "-s", "-m"), args, args.length - 1); + List tabCompletes = Arrays.asList("-a", "-b", "-e", "-n", "-o", "-s", "-m"); + if (args.length == 0) { + return tabCompletes; + } + return manageList(tabCompletes, args, args.length - 1); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandReplace.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandReplace.java deleted file mode 100644 index 814a4c0..0000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandReplace.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 SteamWar.de-Serverteam - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -package de.steamwar.bausystem.commands.worldedit; - -import org.bukkit.command.Command; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -public class WECommandReplace extends WECommand { - - @Override - public boolean onCommand(CommandSender sender, Command command, String s, String[] args) { - if (!(sender instanceof Player)) return false; - performCommands((Player) sender, "/rep " + String.join(" ", args)); - return false; - } - -} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandSet.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandSet.java deleted file mode 100644 index 190918a..0000000 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/worldedit/WECommandSet.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 SteamWar.de-Serverteam - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -package de.steamwar.bausystem.commands.worldedit; - -import org.bukkit.command.Command; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -public class WECommandSet extends WECommand { - - @Override - public boolean onCommand(CommandSender sender, Command command, String s, String[] args) { - if (!(sender instanceof Player)) return false; - performCommands((Player) sender, "/set " + String.join(" ", args)); - return false; - } - -}