SteamWar/FightSystem
Archiviert
13
1

Improve world freezing for MWG 1.15

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-04-01 12:30:36 +02:00
Ursprung 0a8e6c7923
Commit 01f9ffb6de

Datei anzeigen

@ -20,7 +20,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPhysicsEvent; import org.bukkit.event.block.*;
import org.bukkit.event.inventory.InventoryMoveItemEvent;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.PlayerInventory; import org.bukkit.inventory.PlayerInventory;
import org.bukkit.scoreboard.NameTagVisibility; import org.bukkit.scoreboard.NameTagVisibility;
@ -426,5 +427,35 @@ public class FightTeam implements IFightTeam{
public void onBlockPhysicsEvent(BlockPhysicsEvent e){ public void onBlockPhysicsEvent(BlockPhysicsEvent e){
e.setCancelled(true); e.setCancelled(true);
} }
@EventHandler
public void onPistonExtend(BlockPistonExtendEvent e){
e.setCancelled(true);
}
@EventHandler
public void onPistonRetract(BlockPistonRetractEvent e){
e.setCancelled(true);
}
@EventHandler
public void onBlockGrow(BlockGrowEvent e){
e.setCancelled(true);
}
@EventHandler
public void onRedstoneEvent(BlockRedstoneEvent e){
e.setNewCurrent(e.getOldCurrent());
}
@EventHandler
public void onBlockDispense(BlockDispenseEvent e){
e.setCancelled(true);
}
@EventHandler
public void onInventoryMoveEvent(InventoryMoveItemEvent e){
e.setCancelled(true);
}
} }
} }