SteamWar/SpigotCore
Archiviert
13
0

Simplify SWCommandBundle

Dieser Commit ist enthalten in:
jojo 2020-12-30 14:35:06 +01:00
Ursprung 085382296f
Commit 27b8bd43da

Datei anzeigen

@ -24,7 +24,6 @@ import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.function.BiConsumer;
public class SWCommandBundle {
@ -36,17 +35,6 @@ public class SWCommandBundle {
return this;
}
public SWCommandBundle addAll(SWCommandBundle swCommandBundle) {
if (swCommandBundle == null) return this;
swCommandList.addAll(swCommandBundle.swCommandList);
return this;
}
public SWCommandBundle addAll(BiConsumer<Player, ArgumentMap> executor, List<Argument<?>[]> arguments) {
arguments.forEach(args -> swCommandList.add(new SWCommand(executor, args)));
return this;
}
public boolean execute(Player player, String[] args) {
for (SWCommand swCommand : swCommandList) {
if (swCommand.execute(player, args)) return true;