Archiviert
13
0

Fix FreezeListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2024-05-16 17:27:36 +02:00
Ursprung 7957f1b5e4
Commit 5007add704

Datei anzeigen

@ -46,12 +46,12 @@ public class FreezeListener implements Listener {
Bukkit.getScheduler().runTaskTimer(Builder.getInstance(), () -> {
if (!freeze) return;
Bukkit.getOnlinePlayers().forEach(player -> {
Builder.MESSAGE.send("REGION_FREEZE_ENABLED", player, ChatMessageType.ACTION_BAR);
Builder.MESSAGE.sendPrefixless("REGION_FREEZE_ENABLED", player, ChatMessageType.ACTION_BAR);
});
}, 1, 1);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEntitySpawn(EntitySpawnEvent e) {
e.setCancelled(false);
if (!freeze) return;
@ -73,27 +73,27 @@ public class FreezeListener implements Listener {
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEntityChangeBlock(EntityChangeBlockEvent e) {
e.setCancelled(freeze);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPhysicsEvent(BlockPhysicsEvent e) {
e.setCancelled(freeze);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPistonExtend(BlockPistonExtendEvent e) {
e.setCancelled(freeze);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPistonRetract(BlockPistonRetractEvent e) {
e.setCancelled(freeze);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockGrow(BlockGrowEvent e) {
e.setCancelled(freeze);
}
@ -105,7 +105,7 @@ public class FreezeListener implements Listener {
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockDispense(BlockDispenseEvent e) {
e.setCancelled(freeze);
}
@ -146,27 +146,27 @@ public class FreezeListener implements Listener {
}
*/
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onFluidLevelChange(FluidLevelChangeEvent e) {
e.setCancelled(freeze);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockSpread(BlockSpreadEvent e) {
e.setCancelled(freeze);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockFromTo(BlockFromToEvent e) {
e.setCancelled(freeze);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onSpongeAbsorb(SpongeAbsorbEvent e) {
e.setCancelled(freeze);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockForm(BlockFormEvent e) {
e.setCancelled(freeze);
}
@ -184,7 +184,7 @@ public class FreezeListener implements Listener {
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockFade(BlockFadeEvent event) {
event.setCancelled(freeze);
}