* Fixed bug not resetting solid counter.

This commit is contained in:
Steffion 2013-08-26 16:17:11 +02:00
parent 19b99743fc
commit dd95037786
3 changed files with 5 additions and 3 deletions

View File

@ -508,6 +508,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
}
}
} else {
block.setAmount(5);
if (!W.dcAPI.isDisguised(player)) {
SolidBlockHandler
.makePlayerUnsolid(player);

View File

@ -136,8 +136,7 @@ public class OnPlayerInteractEvent implements Listener {
0, 0, 0));
pl.getWorld().playSound(player.getLocation(),
Sound.HURT_FLESH, 1, 1);
ItemStack block = pl.getInventory().getItem(8);
SolidBlockHandler.makePlayerUnsolid(pl, block);
SolidBlockHandler.makePlayerUnsolid(pl);
}
}
}

View File

@ -17,12 +17,14 @@ import pgDev.bukkit.DisguiseCraft.disguise.Disguise;
import pgDev.bukkit.DisguiseCraft.disguise.DisguiseType;
public class SolidBlockHandler {
public static void makePlayerUnsolid(Player player, ItemStack block) {
public static void makePlayerUnsolid(Player player) {
ItemStack block = player.getInventory().getItem(8);
Block pBlock = player.getLocation().getBlock();
if (W.hiddenLoc.get(player) != null) {
pBlock = W.hiddenLoc.get(player).getBlock();
}
block.setAmount(5);
for (Player pl : Bukkit.getOnlinePlayers()) {
if (!pl.equals(player)) {