mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2025-07-09 01:24:45 +02:00
Implements #37 and improves material tab-completion
This commit is contained in:
@ -7,6 +7,10 @@ import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* An abstract arena edit command, implementing input validation
|
||||
*/
|
||||
@ -110,4 +114,15 @@ public abstract class EditArenaCommand implements CommandExecutor {
|
||||
return material;
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits the given string on comma, and returns a set of its parts
|
||||
*
|
||||
* @param input <p>The input string to get as a set</p>
|
||||
* @return <p>The resulting string set</p>
|
||||
*/
|
||||
@NotNull
|
||||
protected Set<String> asSet(@NotNull String input) {
|
||||
return new HashSet<>(List.of(input.split(",")));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user