mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2025-01-20 21:21:21 +01:00
clear cache on quit
This commit is contained in:
parent
81149facc4
commit
a74d063392
@ -6,13 +6,25 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
public class MiscListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onInvClose(InventoryCloseEvent event) {
|
||||
public void onInventoryClose(InventoryCloseEvent event) {
|
||||
Player player = (Player) event.getPlayer();
|
||||
|
||||
if (event.getInventory().getHolder(false) instanceof BidMenu) HolderManager.removeBidding(player);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
||||
HolderManager.removeBidding(player);
|
||||
HolderManager.removeId(player);
|
||||
HolderManager.removeShopCategory(player);
|
||||
HolderManager.removeShopType(player);
|
||||
HolderManager.removePage(player);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user