9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-28 03:29:06 +00:00

Update Commands with patches

This commit is contained in:
CocoTheOwner
2021-08-28 17:59:56 +02:00
parent cf1f3677ae
commit 0465d047e7
10 changed files with 203 additions and 111 deletions

View File

@@ -56,6 +56,9 @@ public class BiomeHandler implements DecreeParameterHandler<IrisBiome> {
@Override
public IrisBiome parse(String in) throws DecreeParsingException, DecreeWhichException {
if (in.equals("null")) {
return null;
}
try {
KList<IrisBiome> options = getPossibilities(in);

View File

@@ -56,6 +56,9 @@ public class RegionHandler implements DecreeParameterHandler<IrisRegion> {
@Override
public IrisRegion parse(String in) throws DecreeParsingException, DecreeWhichException {
if (in.equals("null")) {
return null;
}
try {
KList<IrisRegion> options = getPossibilities(in);

View File

@@ -28,7 +28,13 @@ import org.bukkit.World;
public class WorldHandler implements DecreeParameterHandler<World> {
@Override
public KList<World> getPossibilities() {
return new KList<>(Bukkit.getWorlds());
KList<World> options = new KList<>();
for (World world : Bukkit.getWorlds()) {
if (!world.getName().toLowerCase().startsWith("iris/")){
options.add(world);
}
}
return options;
}
@Override