summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2012-02-21 17:33:46 +0100
committersnowleo <schneeleo@gmail.com>2012-02-21 17:33:46 +0100
commitf46948249e881688ead76add5478716bd410780e (patch)
treeb39086459a6f638ef9d75d1e44765cda734b3ebe /EssentialsProtect
parent3b81593ebba032193b267274ac66d8770223f394 (diff)
downloadEssentials-f46948249e881688ead76add5478716bd410780e.tar
Essentials-f46948249e881688ead76add5478716bd410780e.tar.gz
Essentials-f46948249e881688ead76add5478716bd410780e.tar.lz
Essentials-f46948249e881688ead76add5478716bd410780e.tar.xz
Essentials-f46948249e881688ead76add5478716bd410780e.zip
Updated Essentials to work with R5
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())
{