mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +01:00
Fixed item durability disable for hoes.
This commit is contained in:
parent
2f12da6bc6
commit
2f6b51e811
@ -96,6 +96,14 @@ public void onPlayerItem(PlayerItemEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
Block block = event.getBlockClicked();
|
||||
ItemStack item = event.getItem();
|
||||
|
||||
if (!plugin.itemDurability) {
|
||||
// Hoes
|
||||
if (item.getTypeId() >= 290 && item.getTypeId() <= 294) {
|
||||
item.setDamage((byte)-1);
|
||||
player.setItemInHand(item);
|
||||
}
|
||||
}
|
||||
|
||||
if (plugin.useRegions && !event.isBlock() && block != null) {
|
||||
Vector pt = toVector(block.getRelative(event.getBlockFace()));
|
||||
|
Loading…
Reference in New Issue
Block a user