mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
[trunk/protect] Adding warning for changes coming soon to protect in regards to worldguard
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1332 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
ee192afcc0
commit
11740c49bc
@ -21,6 +21,7 @@ public class EssentialsProtect extends JavaPlugin
|
||||
private EssentialsProtectPlayerListener playerListener = null;
|
||||
private EssentialsProtectEntityListener entityListener = null;
|
||||
private EssentialsProtectWeatherListener weatherListener = null;
|
||||
private EssentialsProtectServerListener serverListener = null;
|
||||
public static final String AUTHORS = Essentials.AUTHORS;
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
public static HashMap<String, Boolean> genSettings = null;
|
||||
@ -49,19 +50,31 @@ public class EssentialsProtect extends JavaPlugin
|
||||
blockListener = new EssentialsProtectBlockListener(this);
|
||||
entityListener = new EssentialsProtectEntityListener(this);
|
||||
weatherListener = new EssentialsProtectWeatherListener(this);
|
||||
serverListener = new EssentialsProtectServerListener(this);
|
||||
|
||||
pm.registerEvent(Type.PLAYER_INTERACT, playerListener, Priority.Low, this);
|
||||
|
||||
//blocklistener
|
||||
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);
|
||||
|
||||
//entitylistener
|
||||
pm.registerEvent(Type.ENTITY_EXPLODE, entityListener, Priority.Highest, this);
|
||||
pm.registerEvent(Type.ENTITY_DAMAGE, entityListener, Priority.Highest, this);
|
||||
pm.registerEvent(Type.ENTITY_TARGET, entityListener, Priority.Highest, this);
|
||||
pm.registerEvent(Type.BLOCK_BREAK, blockListener, Priority.Highest, this);
|
||||
pm.registerEvent(Type.CREATURE_SPAWN, entityListener, Priority.Highest, this);
|
||||
|
||||
//weatherlistener
|
||||
pm.registerEvent(Type.WEATHER_CHANGE, weatherListener, Priority.Highest, this);
|
||||
pm.registerEvent(Type.THUNDER_CHANGE, weatherListener, Priority.Highest, this);
|
||||
pm.registerEvent(Type.LIGHTNING_STRIKE, weatherListener, Priority.Highest, this);
|
||||
|
||||
//serverlistener
|
||||
pm.registerEvent(Type.PLUGIN_ENABLE, serverListener, Priority.Highest, this);
|
||||
|
||||
loadSettings();
|
||||
if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion()))
|
||||
{
|
||||
|
@ -12,9 +12,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
public class EssentialsProtectPlayerListener extends PlayerListener
|
||||
{
|
||||
private EssentialsProtect parent;
|
||||
private int signBlockX;
|
||||
private int signBlockY;
|
||||
private int signBlockZ;
|
||||
private EssentialsProtectData spData = null;
|
||||
|
||||
public EssentialsProtectPlayerListener(EssentialsProtect parent)
|
||||
|
@ -0,0 +1,34 @@
|
||||
package com.earth2me.essentials.protect;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.event.server.PluginEnableEvent;
|
||||
import org.bukkit.event.server.ServerListener;
|
||||
|
||||
|
||||
public class EssentialsProtectServerListener extends ServerListener
|
||||
{
|
||||
private EssentialsProtect parent;
|
||||
Logger log = Logger.getLogger("minecraft");
|
||||
|
||||
public EssentialsProtectServerListener(EssentialsProtect parent)
|
||||
{
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPluginEnable(PluginEnableEvent event)
|
||||
{
|
||||
if ("WorldGuard".equals(event.getPlugin().getDescription().getName()))
|
||||
{
|
||||
String[] features = new String[] {"disable water flow", "disable lava flow", "disable water bucket flow", "disable all fire spread", "disable tnt explosion", "disable creeper explosion", "disable all damage types"};
|
||||
log.log(Level.WARNING, "[EssentialsProtect] WorldGuard was detected, in the near future the following features of Protect will be disabled in favor of WorldGuard's versions");
|
||||
|
||||
for (String s : features)
|
||||
{
|
||||
log.log(Level.WARNING, s);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user