From 7d8e1b517d51fac40be6695951095e61d79a6f29 Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Thu, 19 Nov 2015 08:56:07 +0000 Subject: [PATCH] Fixed dropped gold stacking... --- .../mineplex/game/clans/economy/GoldManager.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/economy/GoldManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/economy/GoldManager.java index 14e999045..bcc54cf15 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/economy/GoldManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/economy/GoldManager.java @@ -19,6 +19,7 @@ import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.metadata.MetadataValue; import org.bukkit.util.Vector; @@ -268,8 +269,12 @@ public class GoldManager extends MiniPlugin { item.getItemStack().setItemMeta(Bukkit.getItemFactory().getItemMeta(item.getItemStack().getType())); } - - item.getItemStack().getItemMeta().setDisplayName(UUID.randomUUID().toString()); + + ItemMeta meta = item.getItemStack().getItemMeta(); + + meta.setDisplayName(UUID.randomUUID().toString()); + + item.getItemStack().setItemMeta(meta); // Velocity UtilAction.velocity(item, velocity, velMult, false, 0, 0.2, 0.2, false); @@ -286,7 +291,11 @@ public class GoldManager extends MiniPlugin item.getItemStack().setItemMeta(Bukkit.getItemFactory().getItemMeta(item.getItemStack().getType())); } - item.getItemStack().getItemMeta().setDisplayName(UUID.randomUUID().toString()); + ItemMeta meta = item.getItemStack().getItemMeta(); + + meta.setDisplayName(UUID.randomUUID().toString()); + + item.getItemStack().setItemMeta(meta); _itemSet.add(item);