Add particles, sounds, and debug logging

- Added block particles (BLOCK_CRACK) when placing blocks
- Added block placement sounds
- Added extensive debug logging for locale item loading
- Will help diagnose why GUI shows stone items
This commit is contained in:
loki 2026-04-09 12:25:26 +02:00
parent 03ee678b68
commit dbe4e7786c
2 changed files with 28 additions and 4 deletions

View file

@ -204,9 +204,20 @@ public class Locales {
@NotNull
private static Item buildItem(@NotNull FileConfiguration config, @NotNull String path, String... replace) {
String material = config.getString("%s.material".formatted(path), "STONE");
String name = applyReplacements(config.getString("%s.name".formatted(path), ""), replace);
String lore = applyReplacements(config.getString("%s.lore".formatted(path), ""), replace);
String materialPath = "%s.material".formatted(path);
String namePath = "%s.name".formatted(path);
String lorePath = "%s.lore".formatted(path);
String material = config.getString(materialPath, "STONE");
String name = applyReplacements(config.getString(namePath, ""), replace);
String lore = applyReplacements(config.getString(lorePath, ""), replace);
// Debug logging
if ("STONE".equals(material)) {
LoParkour.getPlugin().getLogger().warning("Material defaulted to STONE for path: " + path);
LoParkour.getPlugin().getLogger().warning(" Tried: " + materialPath + " = " + config.getString(materialPath));
LoParkour.getPlugin().getLogger().warning(" Available keys: " + config.getKeys(true));
}
Material mat = Materials.parse(material);
if (mat == null) {