From 0867930623afc5592fe0fdb65463640715d9e98d Mon Sep 17 00:00:00 2001 From: snowleo Date: Tue, 26 Apr 2011 10:47:59 +0000 Subject: [PATCH] [trunk] /unlimited: - Reset durability on some data items to prevent second stacks - Double Step gives Step git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1275 e251c2fe-e539-e718-e476-b85c1f46cddb --- .../essentials/EssentialsBlockListener.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java index a7f2534f0..cf3017c7b 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java @@ -178,32 +178,48 @@ public class EssentialsBlockListener extends BlockListener switch(is.getType()) { case WOODEN_DOOR: is.setType(Material.WOOD_DOOR); + is.setDurability((short)0); break; case IRON_DOOR_BLOCK: is.setType(Material.IRON_DOOR); + is.setDurability((short)0); break; case SIGN_POST: case WALL_SIGN: is.setType(Material.SIGN); + is.setDurability((short)0); break; case CROPS: is.setType(Material.SEEDS); + is.setDurability((short)0); break; case CAKE_BLOCK: is.setType(Material.CAKE); + is.setDurability((short)0); break; case BED_BLOCK: is.setType(Material.BED); + is.setDurability((short)0); break; case REDSTONE_WIRE: is.setType(Material.REDSTONE); + is.setDurability((short)0); break; case REDSTONE_TORCH_OFF: + case REDSTONE_TORCH_ON: is.setType(Material.REDSTONE_TORCH_ON); + is.setDurability((short)0); break; case DIODE_BLOCK_OFF: case DIODE_BLOCK_ON: is.setType(Material.DIODE); + is.setDurability((short)0); + break; + case DOUBLE_STEP: + is.setType(Material.STEP); + break; + case TORCH: + is.setDurability((short)0); break; } boolean unlimitedForUser = user.hasUnlimited(is);