From 3315019203f6ac217bcc8fc751e5067fa3b147c0 Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 20 Jan 2012 05:20:37 +0100 Subject: Update for new CraftBukkit Event Code EssentialsSpawn can't be updated yet, because the new event system lacks dynamic priorities. --- .../essentials/protect/EssentialsProtectWeatherListener.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java') diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java index e81efc72b..1b8dd19ff 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java @@ -1,12 +1,14 @@ package com.earth2me.essentials.protect; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; import org.bukkit.event.weather.LightningStrikeEvent; import org.bukkit.event.weather.ThunderChangeEvent; import org.bukkit.event.weather.WeatherChangeEvent; -import org.bukkit.event.weather.WeatherListener; -public class EssentialsProtectWeatherListener extends WeatherListener +public class EssentialsProtectWeatherListener implements Listener { private final transient IProtect prot; @@ -15,7 +17,7 @@ public class EssentialsProtectWeatherListener extends WeatherListener this.prot = prot; } - @Override + @EventHandler(priority = EventPriority.HIGHEST) public void onWeatherChange(final WeatherChangeEvent event) { if (!event.isCancelled() @@ -27,7 +29,7 @@ public class EssentialsProtectWeatherListener extends WeatherListener } - @Override + @EventHandler(priority = EventPriority.HIGHEST) public void onLightningStrike(final LightningStrikeEvent event) { if (!event.isCancelled() @@ -37,7 +39,7 @@ public class EssentialsProtectWeatherListener extends WeatherListener } } - @Override + @EventHandler(priority = EventPriority.HIGHEST) public void onThunderChange(final ThunderChangeEvent event) { if (!event.isCancelled() -- cgit v1.2.3