Remove BlockPhysics, it was a waste of CPU
This commit is contained in:
parent
7b00e6fefd
commit
4bac9dcd11
@ -1102,17 +1102,9 @@ public class Stargate extends JavaPlugin {
|
||||
Stargate.sendMessage(player, Stargate.getString("destroyMsg"), false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onBlockPhysics(BlockPhysicsEvent event) {
|
||||
Block block = event.getBlock();
|
||||
Portal portal = Portal.getByEntrance(block);
|
||||
if (portal != null) event.setCancelled(true);
|
||||
portal = Portal.getByControl(block);
|
||||
if (portal != null) event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onBlockFromTo(BlockFromToEvent event) {
|
||||
if (!Stargate.protectEntrance) return;
|
||||
Portal portal = Portal.getByEntrance(event.getBlock());
|
||||
|
||||
if (portal != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user