diff --git a/resource/example_bottom.yml b/resource/example_bottom.yml index fe762ea..91c6d9d 100644 --- a/resource/example_bottom.yml +++ b/resource/example_bottom.yml @@ -1,6 +1,6 @@ # |------------------------------------------------------------------------ # | CommandPanels Example File -# | By RockyHawk v3.0 +# | By RockyHawk v3.1 # | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/ # |------------------------------------------------------------------------ panels: diff --git a/resource/example_middle_one.yml b/resource/example_middle_one.yml index d82b60e..1d54f6b 100644 --- a/resource/example_middle_one.yml +++ b/resource/example_middle_one.yml @@ -1,6 +1,6 @@ # |------------------------------------------------------------------------ # | CommandPanels Example File -# | By RockyHawk v3.0 +# | By RockyHawk v3.1 # | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/ # |------------------------------------------------------------------------ panels: @@ -20,102 +20,102 @@ panels: name: '' animate0: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '1': material: AIR stack: 1 name: '' animate1: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '2': material: AIR stack: 1 name: '' animate2: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '3': material: AIR stack: 1 name: '' animate3: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '5': material: AIR stack: 1 name: '' animate9: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '6': material: AIR stack: 1 name: '' animate10: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '7': material: AIR stack: 1 name: '' animate11: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '12': material: AIR stack: 1 name: '' animate4: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '14': material: AIR stack: 1 name: '' animate8: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '16': material: AIR stack: 1 name: '' animate12: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '21': material: AIR stack: 1 name: '' animate5: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '22': material: AIR stack: 1 name: '' animate6: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '23': material: AIR stack: 1 name: '' animate7: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '25': material: AIR stack: 1 name: '' animate13: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' '26': material: AIR stack: 1 name: '' animate14: material: PUFFERFISH - name: '&eHayley the Pufferfish' + name: '&eRhys the Pufferfish' diff --git a/resource/example_middle_two.yml b/resource/example_middle_two.yml index e9cf716..38ff8ae 100644 --- a/resource/example_middle_two.yml +++ b/resource/example_middle_two.yml @@ -1,6 +1,6 @@ # |------------------------------------------------------------------------ # | CommandPanels Example File -# | By RockyHawk v3.0 +# | By RockyHawk v3.1 # | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/ # |------------------------------------------------------------------------ panels: diff --git a/resource/example_top.yml b/resource/example_top.yml index 88681c9..ed7dbd9 100644 --- a/resource/example_top.yml +++ b/resource/example_top.yml @@ -1,6 +1,6 @@ # |------------------------------------------------------------------------ # | CommandPanels Example File -# | By RockyHawk v3.0 +# | By RockyHawk v3.1 # | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/ # |------------------------------------------------------------------------ panels: diff --git a/resource/plugin.yml b/resource/plugin.yml index 71616b6..def1ec8 100644 --- a/resource/plugin.yml +++ b/resource/plugin.yml @@ -1,4 +1,4 @@ -version: 3.17.2.1 +version: 3.17.2.2 main: me.rockyhawk.commandpanels.CommandPanels name: CommandPanels author: RockyHawk diff --git a/src/me/rockyhawk/commandpanels/playerinventoryhandler/InventorySaver.java b/src/me/rockyhawk/commandpanels/playerinventoryhandler/InventorySaver.java index 82a741f..8d0a740 100644 --- a/src/me/rockyhawk/commandpanels/playerinventoryhandler/InventorySaver.java +++ b/src/me/rockyhawk/commandpanels/playerinventoryhandler/InventorySaver.java @@ -70,7 +70,10 @@ public class InventorySaver implements Listener { public void addInventory(Player p){ if(!inventoryConfig.contains(p.getUniqueId().toString())){ inventoryConfig.set(p.getUniqueId().toString(),plugin.itemSerializer.itemStackArrayToBase64(p.getInventory().getContents())); - p.getInventory().clear(); + //will clear items except leave armour on the player while panels are open + ItemStack[] armorContents = p.getInventory().getArmorContents().clone(); //Clone armour slots + p.getInventory().clear(); //Clear inventory + p.getInventory().setArmorContents(armorContents); //Place armour back in slots } }