* Fixed bug while dropping your block.
This commit is contained in:
		@@ -220,6 +220,7 @@ public class ArenaHandler {
 | 
			
		||||
			W.pHealth.remove(player);
 | 
			
		||||
			player.setFoodLevel(W.pFood.get(player));
 | 
			
		||||
			W.pFood.remove(player);
 | 
			
		||||
			W.pBlock.remove(player);
 | 
			
		||||
 | 
			
		||||
			for (Player pl : Bukkit.getOnlinePlayers()) {
 | 
			
		||||
				pl.showPlayer(player);
 | 
			
		||||
 
 | 
			
		||||
@@ -122,6 +122,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
 | 
			
		||||
				+ W.pluginAutors);
 | 
			
		||||
 | 
			
		||||
		getServer().getScheduler().runTaskTimer(this, new Runnable() {
 | 
			
		||||
			@SuppressWarnings("deprecation")
 | 
			
		||||
			@Override
 | 
			
		||||
			public void run() {
 | 
			
		||||
				for (Arena arena : W.arenaList) {
 | 
			
		||||
@@ -227,6 +228,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
 | 
			
		||||
											blockCount);
 | 
			
		||||
									arenaPlayer.getInventory().setHelmet(
 | 
			
		||||
											new ItemStack(block));
 | 
			
		||||
									W.pBlock.put(arenaPlayer, block);
 | 
			
		||||
 | 
			
		||||
									if (block.getDurability() != 0) {
 | 
			
		||||
										MessageM.sendFMessage(
 | 
			
		||||
@@ -343,6 +345,14 @@ public class BlockHunt extends JavaPlugin implements Listener {
 | 
			
		||||
								ItemStack block = player.getInventory()
 | 
			
		||||
										.getItem(8);
 | 
			
		||||
 | 
			
		||||
								if (block == null) {
 | 
			
		||||
									if (W.pBlock.get(player) != null) {
 | 
			
		||||
										block = W.pBlock.get(player);
 | 
			
		||||
										player.getInventory().setItem(8, block);
 | 
			
		||||
										player.updateInventory();
 | 
			
		||||
									}
 | 
			
		||||
								}
 | 
			
		||||
 | 
			
		||||
								if (moveLoc != null) {
 | 
			
		||||
									if (moveLoc.getX() == pLoc.getX()
 | 
			
		||||
											&& moveLoc.getY() == pLoc.getY()
 | 
			
		||||
@@ -359,8 +369,6 @@ public class BlockHunt extends JavaPlugin implements Listener {
 | 
			
		||||
													for (Player pl : Bukkit
 | 
			
		||||
															.getOnlinePlayers()) {
 | 
			
		||||
														if (!pl.equals(player)) {
 | 
			
		||||
															// pl.hidePlayer(player);
 | 
			
		||||
															// W.dcAPI.undisguisePlayer(player);
 | 
			
		||||
															pl.hidePlayer(player);
 | 
			
		||||
															pl.sendBlockChange(
 | 
			
		||||
																	pBlock.getLocation(),
 | 
			
		||||
 
 | 
			
		||||
@@ -23,6 +23,7 @@ public class OnPlayerDeathEvent implements Listener {
 | 
			
		||||
				event.getDrops().clear();
 | 
			
		||||
				event.setDroppedExp(0);
 | 
			
		||||
				W.dcAPI.undisguisePlayer(player);
 | 
			
		||||
				W.pBlock.remove(player);
 | 
			
		||||
 | 
			
		||||
				if (!arena.seekers.contains(player)) {
 | 
			
		||||
					arena.seekers.add(player);
 | 
			
		||||
 
 | 
			
		||||
@@ -46,6 +46,7 @@ public class W {
 | 
			
		||||
	public static HashMap<Player, Integer> pEXPL = new HashMap<Player, Integer>();
 | 
			
		||||
	public static HashMap<Player, Double> pHealth = new HashMap<Player, Double>();
 | 
			
		||||
	public static HashMap<Player, Integer> pFood = new HashMap<Player, Integer>();
 | 
			
		||||
	public static HashMap<Player, ItemStack> pBlock = new HashMap<Player, ItemStack>();
 | 
			
		||||
 | 
			
		||||
	public static HashMap<Player, Location> moveLoc = new HashMap<Player, Location>();
 | 
			
		||||
	public static HashMap<Player, Location> hiddenLoc = new HashMap<Player, Location>();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user