From 347642a44610286f1a974a560badce2ef692446a Mon Sep 17 00:00:00 2001 From: DaniFoldi Date: Mon, 8 Nov 2021 23:08:08 +0000 Subject: [PATCH] Fix some issues --- .../com/danifoldi/bungeegui/gui/GuiItem.java | 1 + .../bungeegui/main/BungeeGuiLoader.java | 2 +- src/main/resources/bungee.yml | 2 +- src/main/resources/config.yml | 159 +++++++++--------- 4 files changed, 83 insertions(+), 81 deletions(-) diff --git a/src/main/java/com/danifoldi/bungeegui/gui/GuiItem.java b/src/main/java/com/danifoldi/bungeegui/gui/GuiItem.java index 9ee5d3f..3d8772b 100644 --- a/src/main/java/com/danifoldi/bungeegui/gui/GuiItem.java +++ b/src/main/java/com/danifoldi/bungeegui/gui/GuiItem.java @@ -108,6 +108,7 @@ public boolean isEnchanted() { propertiesTag = new CompoundTag(); } + textureTag.put("Value", new StringTag(Message.replace(data.getSecond(), Pair.of("player", player), Pair.of("target", target)))); texturesTag.add(textureTag); propertiesTag.put("textures", texturesTag); skullOwnerTag.put("Properties", propertiesTag); diff --git a/src/main/java/com/danifoldi/bungeegui/main/BungeeGuiLoader.java b/src/main/java/com/danifoldi/bungeegui/main/BungeeGuiLoader.java index 090673b..55bddf2 100644 --- a/src/main/java/com/danifoldi/bungeegui/main/BungeeGuiLoader.java +++ b/src/main/java/com/danifoldi/bungeegui/main/BungeeGuiLoader.java @@ -71,7 +71,6 @@ void load() { logger.setFilter(record -> config.getEnumOrElse("debugLevel", LogLevel.ALL, EnumGetMethod.NAME_IGNORECASE).level.intValue() >= record.getLevel().intValue()); - guiHandler.load(config); Message.setMessageProvider(config); if (config.getIntOrElse("configVersion", 0) < ConfigUtil.LATEST) { StringUtil.blockPrint(logger::warning, "BungeeGUI config.yml is built with an older version. Please see the plugin page for changes. Attempting automatic upgrade (backup saved as {file})".replace("{file}", ConfigUtil.backupAndUpgrade(config))); @@ -81,6 +80,7 @@ void load() { StringUtil.blockPrint(logger::warning, "BungeeGUI config.yml is built with a newer version. Compatibility is not guaranteed."); } + guiHandler.load(config); pluginManager.registerListener(plugin, listener); } catch (IOException e) { StringUtil.blockPrint(logger::severe, "Could not enable plugin, please see the error below"); diff --git a/src/main/resources/bungee.yml b/src/main/resources/bungee.yml index bedd06f..40c7b2f 100644 --- a/src/main/resources/bungee.yml +++ b/src/main/resources/bungee.yml @@ -4,7 +4,7 @@ description: Create GUIs that perform commands on behalf of the player version: ${version} author: DaniFoldi, HgeX depends: - - protocolize-plugin + - Protocolize softdepends: - LuckPerms - PremiumVanish diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index d7c69d6..26ac2fa 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -137,84 +137,85 @@ guis: volume: 0.4 name: '&cClose' commands: [ '' ] - sounds: - aliases: - - mobs - - sounds - title: '&5&lTest &d&lSounds' - items: - 'row0even,row5odd,column0even,column8even': - type: pink_stained_glass_pane - 'row0odd,row5even,column0odd,column8odd': - type: purple_stained_glass_pane - '10': - type: zombie_head - clickSound: - sound: entity.zombie.ambient - '12': - type: creeper_head - clickSound: - sound: entity.creeper.primed - '14': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTcxNTI4NzZiYzNhOTZkZDJhMjI5OTI0NWVkYjNiZWVmNjQ3YzhhNTZhYzg4NTNhNjg3YzNlN2I1ZDhiYiJ9fX0= - clickSound: - sound: entity.puffer_fish.blow_up - '16': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmNhNDQ1NzQ5MjUxYmRkODk4ZmI4M2Y2Njc4NDRlMzhhMWRmZjc5YTE1MjlmNzlhNDI0NDdhMDU5OTMxMGVhNCJ9fX0= - clickSound: - sound: entity.skeleton.ambient - '20': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzEzNWY1ODM4ZTUxNTg1ZTE1OTQyZThmMmYxY2MzNmRhOTYzMDcwZGRkNWJhMzVhZjk1ZWQzN2ViNmMzIn19fQ== - clickSound: - sound: entity.parrot.ambient - '22': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzQwMDk3MjcxYmI2ODBmZTk4MWU4NTllOGJhOTNmZWEyOGI4MTNiMTA0MmJkMjc3ZWEzMzI5YmVjNDkzZWVmMyJ9fX0= - clickSound: - sound: entity.cat.ambient - '24': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmU4OWQ3NDQ3NWIyZmMxYTJiMjE1Y2ZjY2ZkODY1NTkyYjg1ODQzYjkyNjBlZjY3MzA0YzJkYmNjNGJiMCJ9fX0= - clickSound: - sound: entity.wolf.howl - volume: 0.2 - '28': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjA3MmQ4Y2I4Mzk1YzJiYzg0NTQ3ZTZhYzliOGVkZWVkNzhjODY1OGMwZWQxYjg4M2M2MjljM2E3ZTkwIn19fQ== - clickSound: - sound: entity.polar_bear.warning - '30': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODk1YWVlYzZiODQyYWRhODY2OWY4NDZkNjViYzQ5NzYyNTk3ODI0YWI5NDRmMjJmNDViZjNiYmI5NDFhYmU2YyJ9fX0= - clickSound: - sound: entity.slime.jump - '32': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2YzN2Q1MjRjM2VlZDE3MWNlMTQ5ODg3ZWExZGVlNGVkMzk5OTA0NzI3ZDUyMTg2NTY4OGVjZTNiYWM3NWUifX19 - clickSound: - sound: entity.chicken.ambient - '34': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGJkYTFkZjgwYmZhMzE0ODUzMzhkOTYzMzgzZDhkZTI2ZjA1ZjI5MzRmODc1Njk2ODYyNDU0ZTdjNzBmNDVmNiJ9fX0= - clickSound: - sound: entity.cow.ambient - '38': - type: dragon_head - clickSound: - sound: entity.ender_dragon.ambient - '40': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjVjNGQyNGFmZmRkNDgxMDI2MjAzNjE1MjdkMjE1NmUxOGMyMjNiYWU1MTg5YWM0Mzk4MTU2NDNmM2NmZjlkIn19fQ== - clickSound: - sound: block.shulker_box.open - '42': - type: player_head - data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGYwMDg1ODkyNmNkOGNkZjNmMWNmNzFlMjEwY2RlNWRhZjg3MDgzMjA1NDdiZDZkZjU3OTU4NTljNjhkOWIzZiJ9fX0= - clickSound: - sound: entity.panda.worried_ambient + sounds: + aliases: + - mobs + - sounds + title: '&5&lTest &d&lSounds' + items: + 'row0even,row5odd,column0even,column8even': + type: pink_stained_glass_pane + 'row0odd,row5even,column0odd,column8odd': + type: purple_stained_glass_pane + '10': + type: zombie_head + clickSound: + sound: entity.zombie.ambient + '12': + type: creeper_head + clickSound: + sound: entity.creeper.primed + '14': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTcxNTI4NzZiYzNhOTZkZDJhMjI5OTI0NWVkYjNiZWVmNjQ3YzhhNTZhYzg4NTNhNjg3YzNlN2I1ZDhiYiJ9fX0= + clickSound: + sound: entity.puffer_fish.blow_up + '16': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmNhNDQ1NzQ5MjUxYmRkODk4ZmI4M2Y2Njc4NDRlMzhhMWRmZjc5YTE1MjlmNzlhNDI0NDdhMDU5OTMxMGVhNCJ9fX0= + clickSound: + sound: entity.skeleton.ambient + '20': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzEzNWY1ODM4ZTUxNTg1ZTE1OTQyZThmMmYxY2MzNmRhOTYzMDcwZGRkNWJhMzVhZjk1ZWQzN2ViNmMzIn19fQ== + clickSound: + sound: entity.parrot.ambient + '22': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzQwMDk3MjcxYmI2ODBmZTk4MWU4NTllOGJhOTNmZWEyOGI4MTNiMTA0MmJkMjc3ZWEzMzI5YmVjNDkzZWVmMyJ9fX0= + clickSound: + sound: entity.cat.ambient + '24': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmU4OWQ3NDQ3NWIyZmMxYTJiMjE1Y2ZjY2ZkODY1NTkyYjg1ODQzYjkyNjBlZjY3MzA0YzJkYmNjNGJiMCJ9fX0= + clickSound: + sound: entity.wolf.howl + volume: 0.2 + '28': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjA3MmQ4Y2I4Mzk1YzJiYzg0NTQ3ZTZhYzliOGVkZWVkNzhjODY1OGMwZWQxYjg4M2M2MjljM2E3ZTkwIn19fQ== + clickSound: + sound: entity.polar_bear.warning + '30': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODk1YWVlYzZiODQyYWRhODY2OWY4NDZkNjViYzQ5NzYyNTk3ODI0YWI5NDRmMjJmNDViZjNiYmI5NDFhYmU2YyJ9fX0= + clickSound: + sound: entity.slime.jump + '32': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2YzN2Q1MjRjM2VlZDE3MWNlMTQ5ODg3ZWExZGVlNGVkMzk5OTA0NzI3ZDUyMTg2NTY4OGVjZTNiYWM3NWUifX19 + clickSound: + sound: entity.chicken.ambient + '34': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGJkYTFkZjgwYmZhMzE0ODUzMzhkOTYzMzgzZDhkZTI2ZjA1ZjI5MzRmODc1Njk2ODYyNDU0ZTdjNzBmNDVmNiJ9fX0= + clickSound: + sound: entity.cow.ambient + '38': + type: dragon_head + clickSound: + sound: entity.ender_dragon.ambient + '40': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjVjNGQyNGFmZmRkNDgxMDI2MjAzNjE1MjdkMjE1NmUxOGMyMjNiYWU1MTg5YWM0Mzk4MTU2NDNmM2NmZjlkIn19fQ== + clickSound: + sound: block.shulker_box.open + '42': + type: player_head + data: texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGYwMDg1ODkyNmNkOGNkZjNmMWNmNzFlMjEwY2RlNWRhZjg3MDgzMjA1NDdiZDZkZjU3OTU4NTljNjhkOWIzZiJ9fX0= + clickSound: + sound: entity.panda.worried_ambient -configVersion: 3 +configVersion: 4 debugLevel: all +actions: {} \ No newline at end of file