Updates README, and allows the un-setting of kill plane and obstacle blocks

This commit is contained in:
2024-05-16 15:34:53 +02:00
parent 901b052b25
commit f09dcbe7ff
3 changed files with 35 additions and 25 deletions

View File

@ -1,11 +1,13 @@
package net.knarcraft.minigames.command;
import net.knarcraft.minigames.config.DropperConfiguration;
import net.knarcraft.minigames.util.InputValidationHelper;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.command.CommandExecutor;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.HashSet;
import java.util.List;
@ -120,9 +122,13 @@ public abstract class EditArenaCommand implements CommandExecutor {
* @param input <p>The input string to get as a set</p>
* @return <p>The resulting string set</p>
*/
@NotNull
@Nullable
protected Set<String> asSet(@NotNull String input) {
return new HashSet<>(List.of(input.split(",")));
if (InputValidationHelper.isEmptyValue(input)) {
return null;
} else {
return new HashSet<>(List.of(input.split(",")));
}
}
}