summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect
diff options
context:
space:
mode:
authormd_5 <md_5@bigpond.com>2012-03-01 16:23:21 +1100
committermd_5 <md_5@bigpond.com>2012-03-01 16:23:21 +1100
commit3099855562b3223ec13b796dee2679c7a8e0411b (patch)
tree159c56ffea606e833c2a00ed7a99cf3c9d54a24f /EssentialsProtect
parent3f26d4ad9841b4ab30253222217edaaa60db3075 (diff)
parent833a5b2b552f297a9c5aeec3e11d58f0486c7e24 (diff)
downloadEssentials-3099855562b3223ec13b796dee2679c7a8e0411b.tar
Essentials-3099855562b3223ec13b796dee2679c7a8e0411b.tar.gz
Essentials-3099855562b3223ec13b796dee2679c7a8e0411b.tar.lz
Essentials-3099855562b3223ec13b796dee2679c7a8e0411b.tar.xz
Essentials-3099855562b3223ec13b796dee2679c7a8e0411b.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'EssentialsProtect')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyBlockListener.java36
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyEntityListener.java22
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyPlayerListener.java16
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java19
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java2
5 files changed, 3 insertions, 92 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyBlockListener.java
deleted file mode 100644
index 7ff17b381..000000000
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyBlockListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.earth2me.essentials.protect;
-
-import org.bukkit.event.block.BlockBreakEvent;
-import org.bukkit.event.block.BlockBurnEvent;
-import org.bukkit.event.block.BlockFromToEvent;
-import org.bukkit.event.block.BlockIgniteEvent;
-import org.bukkit.event.block.BlockListener;
-
-@Deprecated
-public class EmergencyBlockListener extends BlockListener
-{
-
- @Override
- public void onBlockBurn(final BlockBurnEvent event)
- {
- event.setCancelled(true);
- }
-
- @Override
- public void onBlockIgnite(final BlockIgniteEvent event)
- {
- event.setCancelled(true);
- }
-
- @Override
- public void onBlockFromTo(final BlockFromToEvent event)
- {
- event.setCancelled(true);
- }
-
- @Override
- public void onBlockBreak(final BlockBreakEvent event)
- {
- event.setCancelled(true);
- }
-}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyEntityListener.java
deleted file mode 100644
index 08b04aae1..000000000
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyEntityListener.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.earth2me.essentials.protect;
-
-import org.bukkit.event.entity.EntityDamageEvent;
-import org.bukkit.event.entity.EntityExplodeEvent;
-import org.bukkit.event.entity.EntityListener;
-
-@Deprecated
-public class EmergencyEntityListener extends EntityListener
-{
-
- @Override
- public void onEntityExplode(final EntityExplodeEvent event)
- {
- event.setCancelled(true);
- }
-
- @Override
- public void onEntityDamage(final EntityDamageEvent event)
- {
- event.setCancelled(true);
- }
-}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyPlayerListener.java
deleted file mode 100644
index 169e9af79..000000000
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EmergencyPlayerListener.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.earth2me.essentials.protect;
-
-import org.bukkit.event.player.PlayerJoinEvent;
-import org.bukkit.event.player.PlayerListener;
-
-@Deprecated
-public class EmergencyPlayerListener extends PlayerListener
-{
-
- @Override
- public void onPlayerJoin(PlayerJoinEvent event)
- {
- event.getPlayer().sendMessage("Essentials Protect is in emergency mode. Check your log for errors.");
- }
-
-}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
index af80647a6..9c257662d 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;
@@ -65,21 +63,8 @@ public class EssentialsProtect extends JavaPlugin implements IProtect
private void enableEmergencyMode(final PluginManager pm)
{
- //final EmergencyListener emListener = new EmergencyListener();
- //pm.registerEvents(emListener, this);
-
- //TODO: Remove deprecated listners in a few weeks.
-
- final EmergencyBlockListener emBlockListener = new EmergencyBlockListener();
- final EmergencyEntityListener emEntityListener = new EmergencyEntityListener();
- final EmergencyPlayerListener emPlayerListener = new EmergencyPlayerListener();
- pm.registerEvent(Type.PLAYER_JOIN, emPlayerListener, Priority.Low, this);
- pm.registerEvent(Type.BLOCK_BURN, emBlockListener, Priority.Low, this);
- pm.registerEvent(Type.BLOCK_IGNITE, emBlockListener, Priority.Low, this);
- pm.registerEvent(Type.BLOCK_FROMTO, emBlockListener, Priority.Low, this);
- pm.registerEvent(Type.BLOCK_BREAK, emBlockListener, Priority.Low, this);
- pm.registerEvent(Type.ENTITY_DAMAGE, emEntityListener, Priority.Low, this);
- pm.registerEvent(Type.ENTITY_EXPLODE, emEntityListener, Priority.Low, this);
+ final EmergencyListener emListener = new EmergencyListener();
+ pm.registerEvents(emListener, this);
for (Player player : getServer().getOnlinePlayers())
{
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
index 40167ec41..57302517f 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
@@ -328,7 +328,7 @@ public class EssentialsProtectEntityListener implements Listener
}
@EventHandler(priority = EventPriority.HIGHEST)
- public void onEndermanPickup(EndermanPickupEvent event)
+ public void onEntityChangeBlock(EntityChangeBlockEvent event)
{
if (event.isCancelled())
{