Add fall detection and fix access modifiers

- Added Y-coordinate fall detection (spawn.Y - 30)
- Players now respawn when falling below threshold
- Fixed fall() access modifier (protected -> public)
- Added debug logging for locale loading issues
This commit is contained in:
loki 2026-04-09 12:22:03 +02:00
parent c142d21a26
commit 03ee678b68
4 changed files with 34 additions and 7 deletions

View file

@ -90,9 +90,15 @@ public class Locales {
@NotNull
public static Item getItem(@NotNull String locale, @NotNull String path, String... replace) {
synchronized (locales) {
if (locales.isEmpty()) return new Item(Material.STONE, "");
if (locales.isEmpty()) {
LoParkour.getPlugin().getLogger().warning("Locales are empty! Returning STONE item for path: " + path);
return new Item(Material.STONE, "");
}
FileConfiguration config = locales.get(locale);
if (config == null) return new Item(Material.STONE, "");
if (config == null) {
LoParkour.getPlugin().getLogger().warning("Locale '" + locale + "' not found! Available: " + locales.keySet() + ". Returning STONE for path: " + path);
return new Item(Material.STONE, "");
}
return buildItem(config, path, replace);
}
}