mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Improve the performance
Former-commit-id: ef07915dd43bec174712f43a4077c74525fd61b5 [formerly b0405563167aaa713ad136d4a79347e421ddcf1f] Former-commit-id: f73b32ed9c671935122336fa8bc7db3fd64dddd8
This commit is contained in:
1 parent
af410bcce9
commit
49191cb546
1 file changed
+3
-4
@@ -85,6 +85,7 @@ public class PlayerListener implements Listener {
|
||||
HashMap<UUID, Info> actions = plugin.getShopManager().getActions();
|
||||
Info info = new Info(shop.getLocation(), ShopAction.BUY, null, null, shop);
|
||||
actions.put(p.getUniqueId(), info);
|
||||
e.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
// Handles creating shops
|
||||
@@ -143,8 +144,7 @@ public class PlayerListener implements Listener {
|
||||
MsgUtil.getMessage("how-much-to-trade-for", Util.getItemStackName(e.getItem())));
|
||||
e.setCancelled(true);
|
||||
}
|
||||
} else if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)
|
||||
&& Util.isWallSign(e.getClickedBlock().getType())) {
|
||||
} else if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK) && Util.isWallSign(e.getClickedBlock().getType())) {
|
||||
Block block;
|
||||
if (Util.isWallSign(e.getClickedBlock().getType())) {
|
||||
block = Util.getAttached(e.getClickedBlock());
|
||||
@@ -162,8 +162,8 @@ public class PlayerListener implements Listener {
|
||||
plugin.getShopManager().getShop(block.getLocation()));
|
||||
plugin.getShopManager().getShop(block.getLocation()).setSignText();
|
||||
}
|
||||
e.setCancelled(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||
@@ -192,7 +192,6 @@ public class PlayerListener implements Listener {
|
||||
public void onTeleport(PlayerTeleportEvent e) {
|
||||
PlayerMoveEvent me = new PlayerMoveEvent(e.getPlayer(), e.getFrom(), e.getTo());
|
||||
onMove(me);
|
||||
Util.inventoryCheck(e.getPlayer().getInventory());
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
|
||||
Reference in new issue
Block a user