summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src/com/earth2me/essentials
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsProtect/src/com/earth2me/essentials')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsConnect.java2
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java23
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java2
3 files changed, 5 insertions, 22 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsConnect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsConnect.java
index 569123cd5..7503c334c 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsConnect.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsConnect.java
@@ -32,8 +32,6 @@ public class EssentialsConnect
ProtectReloader pr = new ProtectReloader();
pr.reloadConfig();
ess.addReloadListener(pr);
- LOGGER.info(_("loadinfo", essProtect.getDescription().getName(), essProtect.getDescription().getVersion(), "essentials team"));
-
}
public void onDisable()
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
index 095296531..983ba0f80 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
@@ -9,8 +9,6 @@ import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import org.bukkit.entity.Player;
-import org.bukkit.event.Event.Priority;
-import org.bukkit.event.Event.Type;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
@@ -51,29 +49,16 @@ public class EssentialsProtect extends JavaPlugin implements IProtect
ess = new EssentialsConnect(essPlugin, this);
final EssentialsProtectPlayerListener playerListener = new EssentialsProtectPlayerListener(this);
- pm.registerEvent(Type.PLAYER_INTERACT, playerListener, Priority.Low, this);
+ pm.registerEvents(playerListener, this);
final EssentialsProtectBlockListener blockListener = new EssentialsProtectBlockListener(this);
- pm.registerEvent(Type.BLOCK_PLACE, blockListener, Priority.Highest, this);
- pm.registerEvent(Type.BLOCK_FROMTO, blockListener, Priority.Highest, this);
- pm.registerEvent(Type.BLOCK_IGNITE, blockListener, Priority.Highest, this);
- pm.registerEvent(Type.BLOCK_BURN, blockListener, Priority.Highest, this);
- pm.registerEvent(Type.BLOCK_BREAK, blockListener, Priority.Highest, this);
- pm.registerEvent(Type.BLOCK_PISTON_EXTEND, blockListener, Priority.Highest, this);
- pm.registerEvent(Type.BLOCK_PISTON_RETRACT, blockListener, Priority.Highest, this);
+ pm.registerEvents(blockListener, this);
final EssentialsProtectEntityListener entityListener = new EssentialsProtectEntityListener(this);
- pm.registerEvent(Type.ENTITY_EXPLODE, entityListener, Priority.Highest, this);
- pm.registerEvent(Type.ENTITY_DAMAGE, entityListener, Priority.Highest, this);
- pm.registerEvent(Type.CREATURE_SPAWN, entityListener, Priority.Highest, this);
- pm.registerEvent(Type.ENTITY_TARGET, entityListener, Priority.Highest, this);
- pm.registerEvent(Type.EXPLOSION_PRIME, entityListener, Priority.Highest, this);
- pm.registerEvent(Type.ENDERMAN_PICKUP, entityListener, Priority.Highest, this);
+ pm.registerEvents(entityListener, this);
final EssentialsProtectWeatherListener weatherListener = new EssentialsProtectWeatherListener(this);
- pm.registerEvent(Type.LIGHTNING_STRIKE, weatherListener, Priority.Highest, this);
- pm.registerEvent(Type.THUNDER_CHANGE, weatherListener, Priority.Highest, this);
- pm.registerEvent(Type.WEATHER_CHANGE, weatherListener, Priority.Highest, this);
+ pm.registerEvents(weatherListener, this);
}
private void enableEmergencyMode(final PluginManager pm)
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
index 6b49e70d8..401bf345d 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
@@ -24,7 +24,7 @@ public class EssentialsProtectPlayerListener implements Listener
this.ess = prot.getEssentialsConnect().getEssentials();
}
- @EventHandler(priority = EventPriority.HIGHEST)
+ @EventHandler(priority = EventPriority.LOW)
public void onPlayerInteract(final PlayerInteractEvent event)
{
// Do not return if cancelled, because the interact event has 2 cancelled states.