diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/outpost/OutpostManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/outpost/OutpostManager.java index 4d50eeb19..57e174d48 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/outpost/OutpostManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/outpost/OutpostManager.java @@ -57,6 +57,10 @@ public class OutpostManager extends MiniPlugin { event.getBlock().setData((byte) Outpost.OUTPOST_BLOCK_DATA); } + else + { + event.setCancelled(true); + } } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/PlayerGear.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/PlayerGear.java index e5c9d2e11..a2592a9f6 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/PlayerGear.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/PlayerGear.java @@ -10,6 +10,10 @@ import org.bukkit.event.player.PlayerItemHeldEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; +import mineplex.core.common.util.C; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTextMiddle; import mineplex.game.clans.items.legendaries.LegendaryItem; import mineplex.minecraft.game.core.damage.CustomDamageEvent; @@ -56,6 +60,15 @@ public class PlayerGear LegendaryItem legendary = (LegendaryItem) item; legendary.preUpdate(getPlayer()); legendary.update(getPlayer()); + + if (legendary.OriginalOwner == null) + { + legendary.OriginalOwner = getPlayer().getUniqueId().toString(); + UtilServer.broadcast(F.main("Clans", F.elem(getPlayer().getName()) + " has picked up " + F.vowelAN(legendary.getDisplayName()) + " " + legendary.getDisplayName() + C.mBody + ".")); + UtilTextMiddle.display(C.cPurple + "Legendary", F.elem(getPlayer().getName()) + C.cWhite + " picked up " + F.vowelAN(legendary.getDisplayName()) + " " + legendary.getDisplayName() + C.cWhite + "."); + + getPlayer().setItemInHand(legendary.toItemStack()); + } } } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/LegendaryItem.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/LegendaryItem.java index e20ceaa54..f2e66865d 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/LegendaryItem.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/LegendaryItem.java @@ -63,13 +63,6 @@ public class LegendaryItem extends CustomItem _lastBlock = System.currentTimeMillis(); } - if (OriginalOwner == null) - { - OriginalOwner = event.getPlayer().getUniqueId().toString(); - UtilServer.broadcast(F.main("Clans", F.elem(event.getPlayer().getName()) + " has picked up " + F.vowelAN(getDisplayName()) + " " + getDisplayName() + C.mBody + ".")); - UtilTextMiddle.display(C.cPurple + "Legendary", F.elem(event.getPlayer().getName()) + C.cWhite + " picked up " + F.vowelAN(getDisplayName()) + " " + getDisplayName() + C.cWhite + "."); - } - super.onInteract(event); }