mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-27 21:15:57 +01:00
Fixed item durability disable for hoes.
This commit is contained in:
parent
2f12da6bc6
commit
2f6b51e811
@ -97,6 +97,14 @@ public void onPlayerItem(PlayerItemEvent event) {
|
|||||||
Block block = event.getBlockClicked();
|
Block block = event.getBlockClicked();
|
||||||
ItemStack item = event.getItem();
|
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) {
|
if (plugin.useRegions && !event.isBlock() && block != null) {
|
||||||
Vector pt = toVector(block.getRelative(event.getBlockFace()));
|
Vector pt = toVector(block.getRelative(event.getBlockFace()));
|
||||||
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
||||||
|
Loading…
Reference in New Issue
Block a user