🧳 meteor client no packet close work around

Took 2 minutes
This commit is contained in:
Kiran Hart 2023-02-18 09:56:56 -05:00
parent 8d63a467ec
commit c91ace0804
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3

View File

@ -41,6 +41,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.inventory.PrepareAnvilEvent;
import org.bukkit.event.inventory.PrepareItemCraftEvent;
@ -188,6 +189,24 @@ public class PlayerListeners implements Listener {
event.setCancelled(true);
}
@EventHandler
public void onCommandDuringSell(final PlayerCommandPreprocessEvent event) {
final Player player = event.getPlayer();
if (AuctionHouse.getInstance().getAuctionPlayerManager().isInSellProcess(player))
event.setCancelled(true);
}
@EventHandler
public void onBuildDuringSell(final BlockPlaceEvent event) {
final Player player = event.getPlayer();
if (AuctionHouse.getInstance().getAuctionPlayerManager().isInSellProcess(player)) {
event.setBuild(false);
event.setCancelled(true);
}
}
@EventHandler
public void onInventoryClick(PrepareAnvilEvent event) {
ItemStack stack = event.getResult();