Fix armour update on item break #1157

This commit is contained in:
Myles 2019-01-20 17:01:14 +00:00
parent c5ba5b4647
commit 9ba70424e8

View File

@ -9,6 +9,7 @@ import org.bukkit.event.block.Action;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerChangedWorldEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerItemBreakEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.inventory.CraftingInventory;
@ -91,6 +92,11 @@ public class ArmorListener extends ViaBukkitListener {
}
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onItemBreak(PlayerItemBreakEvent e) {
sendDelayedArmorUpdate(e.getPlayer());
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onJoin(PlayerJoinEvent e) {
sendDelayedArmorUpdate(e.getPlayer());