mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
refactor: improve adapter on Bukkit
This commit is contained in:
10 files changed
+100
-168
No files matched your search
@@ -23,6 +23,7 @@ import lombok.NoArgsConstructor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -99,7 +100,16 @@ public class World {
|
||||
OVERWORLD,
|
||||
NETHER,
|
||||
THE_END,
|
||||
CUSTOM
|
||||
CUSTOM;
|
||||
|
||||
public static Environment match(@NotNull String name) {
|
||||
return switch (name.toLowerCase(Locale.ENGLISH)) {
|
||||
case "overworld" -> OVERWORLD;
|
||||
case "nether" -> NETHER;
|
||||
case "the_end" -> THE_END;
|
||||
default -> CUSTOM;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user