Patch Bomber dupe glitch in Bridges in a better fashion.
Fix MCL Head Hunter achievement.
This commit is contained in:
parent
35c7b9a2bd
commit
51fd23ff84
@ -47,7 +47,6 @@ import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.inventory.CraftingInventory;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
@ -219,11 +218,15 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
{
|
||||
return;
|
||||
}
|
||||
Inventory top = view.getTopInventory();
|
||||
if (top.getType() != InventoryType.CHEST)
|
||||
if(event.getClickedInventory() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(event.getClickedInventory().getType() == InventoryType.PLAYER)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,8 @@
|
||||
package nautilus.game.arcade.game.games.minecraftleague.variation.wither.data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilItem;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
@ -26,7 +12,6 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.minecraftleague.tracker.GrabSkullEvent;
|
||||
import nautilus.game.arcade.game.games.minecraftleague.variation.wither.WitherVariation;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
@ -34,12 +19,8 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftSkeleton;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
@ -56,6 +37,9 @@ import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class WitherMinionManager implements Listener
|
||||
{
|
||||
private WitherVariation _host;
|
||||
@ -371,23 +355,12 @@ public class WitherMinionManager implements Listener
|
||||
{
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Game", "You have the Wither Skull! Return the skull to your base and place it on your Altar to summon the Wither!"));
|
||||
UtilTextMiddle.display("", C.cGray + "You have picked up the Wither Skull!", event.getPlayer());
|
||||
Bukkit.getScheduler().runTaskLater(_host.Manager.getPlugin(), new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
UtilTextMiddle.display("", "Place the skull on top of", event.getPlayer());
|
||||
}
|
||||
}, 20 * 5);
|
||||
Bukkit.getScheduler().runTaskLater(_host.Manager.getPlugin(), new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
UtilTextMiddle.display("", "Your Altar's Soul Sand!", event.getPlayer());
|
||||
}
|
||||
}, 20 * 8);
|
||||
Bukkit.getScheduler().runTaskLater(_host.Manager.getPlugin(), () -> UtilTextMiddle.display("", "Place the skull on top of", event.getPlayer()), 20 * 5);
|
||||
Bukkit.getScheduler().runTaskLater(_host.Manager.getPlugin(), () -> UtilTextMiddle.display("", "Your Altar's Soul Sand!", event.getPlayer()), 20 * 8);
|
||||
//_host.Host.Objective.setPlayerObjective(event.getPlayer(), new ReturnSkullObjective());
|
||||
if (!event.getItem().hasMetadata("Dropped"))
|
||||
{
|
||||
event.getItem().setMetadata("Dropped", new FixedMetadataValue(Bukkit.getPluginManager().getPlugin("Arcade"), ""));
|
||||
Bukkit.getPluginManager().callEvent(new GrabSkullEvent(event.getPlayer()));
|
||||
UtilTextMiddle.display("", _host.Host.GetTeam(event.getPlayer()).GetColor() + _host.Host.GetTeam(event.getPlayer()).getDisplayName() + " has picked up a Wither Skull!", 20, 20 * 5, 20);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user