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:
parent
c142d21a26
commit
03ee678b68
4 changed files with 34 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue