mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-10-29 23:09:38 +01:00
[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
This commit is contained in:
parent
e2ad9b41e8
commit
0867930623
@ -178,32 +178,48 @@ public class EssentialsBlockListener extends BlockListener
|
|||||||
switch(is.getType()) {
|
switch(is.getType()) {
|
||||||
case WOODEN_DOOR:
|
case WOODEN_DOOR:
|
||||||
is.setType(Material.WOOD_DOOR);
|
is.setType(Material.WOOD_DOOR);
|
||||||
|
is.setDurability((short)0);
|
||||||
break;
|
break;
|
||||||
case IRON_DOOR_BLOCK:
|
case IRON_DOOR_BLOCK:
|
||||||
is.setType(Material.IRON_DOOR);
|
is.setType(Material.IRON_DOOR);
|
||||||
|
is.setDurability((short)0);
|
||||||
break;
|
break;
|
||||||
case SIGN_POST:
|
case SIGN_POST:
|
||||||
case WALL_SIGN:
|
case WALL_SIGN:
|
||||||
is.setType(Material.SIGN);
|
is.setType(Material.SIGN);
|
||||||
|
is.setDurability((short)0);
|
||||||
break;
|
break;
|
||||||
case CROPS:
|
case CROPS:
|
||||||
is.setType(Material.SEEDS);
|
is.setType(Material.SEEDS);
|
||||||
|
is.setDurability((short)0);
|
||||||
break;
|
break;
|
||||||
case CAKE_BLOCK:
|
case CAKE_BLOCK:
|
||||||
is.setType(Material.CAKE);
|
is.setType(Material.CAKE);
|
||||||
|
is.setDurability((short)0);
|
||||||
break;
|
break;
|
||||||
case BED_BLOCK:
|
case BED_BLOCK:
|
||||||
is.setType(Material.BED);
|
is.setType(Material.BED);
|
||||||
|
is.setDurability((short)0);
|
||||||
break;
|
break;
|
||||||
case REDSTONE_WIRE:
|
case REDSTONE_WIRE:
|
||||||
is.setType(Material.REDSTONE);
|
is.setType(Material.REDSTONE);
|
||||||
|
is.setDurability((short)0);
|
||||||
break;
|
break;
|
||||||
case REDSTONE_TORCH_OFF:
|
case REDSTONE_TORCH_OFF:
|
||||||
|
case REDSTONE_TORCH_ON:
|
||||||
is.setType(Material.REDSTONE_TORCH_ON);
|
is.setType(Material.REDSTONE_TORCH_ON);
|
||||||
|
is.setDurability((short)0);
|
||||||
break;
|
break;
|
||||||
case DIODE_BLOCK_OFF:
|
case DIODE_BLOCK_OFF:
|
||||||
case DIODE_BLOCK_ON:
|
case DIODE_BLOCK_ON:
|
||||||
is.setType(Material.DIODE);
|
is.setType(Material.DIODE);
|
||||||
|
is.setDurability((short)0);
|
||||||
|
break;
|
||||||
|
case DOUBLE_STEP:
|
||||||
|
is.setType(Material.STEP);
|
||||||
|
break;
|
||||||
|
case TORCH:
|
||||||
|
is.setDurability((short)0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
boolean unlimitedForUser = user.hasUnlimited(is);
|
boolean unlimitedForUser = user.hasUnlimited(is);
|
||||||
|
Loading…
Reference in New Issue
Block a user