mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-22 05:25:11 +01:00
🧳 meteor client no packet close work around
Took 2 minutes
This commit is contained in:
parent
8d63a467ec
commit
c91ace0804
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user