mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-26 02:19:48 -05:00
Set event not drop anythings
Former-commit-id: 92870506772f96ccd6da34f1b539a89f25a785df [formerly febf2ecfd51974d3fb1fb5720ab44e499657ef2a] Former-commit-id: 1a71be9b06f91794ed9533b2ff6717cfd33a3aa7
This commit is contained in:
1 parent
75f0314d55
commit
4d5372097e
1 file changed
+3
-1
@@ -44,7 +44,7 @@ public class PermissionChecker {
|
||||
if (!usePermissionChecker) {
|
||||
return true;
|
||||
}
|
||||
BlockEvent beMainHand;
|
||||
BlockBreakEvent beMainHand;
|
||||
// beMainHand = new BlockPlaceEvent(block, block.getState(), block.getRelative(0, -1, 0), player.getInventory()
|
||||
//getItemInMainHand(), player, true, EquipmentSlot.HAND);
|
||||
|
||||
@@ -53,6 +53,8 @@ public class PermissionChecker {
|
||||
Bukkit.getPluginManager().callEvent(new ShopProtectionCheckEvent(block.getLocation(),player, ProtectionCheckStatus.BEGIN,beMainHand));
|
||||
ListenerHelper.disableEvent(beMainHand.getClass());
|
||||
//Bukkit.getPluginManager().callEvent(beMainHand);
|
||||
beMainHand.setDropItems(false);
|
||||
beMainHand.setExpToDrop(-1);
|
||||
Plugin cancelPlugin = plugin.getQsEventManager().fireEvent(beMainHand);
|
||||
//Use our custom event caller.
|
||||
ListenerHelper.enableEvent(beMainHand.getClass());
|
||||
|
||||
Reference in new issue
Block a user