1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-02 14:29:07 +01:00

Fix when boosted items cache is not removed after swap items (#1076)

This commit is contained in:
MrMacor 2021-02-07 08:53:45 -08:00 committed by GitHub
parent 66e6b1451e
commit 5d90a00ea2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,7 @@ import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
import org.bukkit.event.world.WorldLoadEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
@ -715,4 +716,9 @@ public class JobsListener implements Listener {
public void PlayerItemBreakEvent(InventoryClickEvent event) {
Jobs.getPlayerManager().resetiItemBonusCache(((Player) event.getWhoClicked()).getUniqueId());
}
@EventHandler
public void onPlayerHandSwap(PlayerSwapHandItemsEvent event) {
Jobs.getPlayerManager().resetiItemBonusCache(event.getPlayer().getUniqueId());
}
}