mirror of
https://github.com/essentials/Essentials.git
synced 2025-09-30 16:19:11 +02:00
Removing the signs and rails protection from protect
Remove the antibuild functionality from protect
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
package net.ess3.protect;
|
||||
|
||||
import net.ess3.protect.data.IProtectedBlock;
|
||||
import java.util.logging.Filter;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
@@ -15,28 +11,9 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
public class EssentialsProtect extends JavaPlugin implements IProtect
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private static com.mchange.v2.log.MLogger C3P0logger;
|
||||
//private final transient Map<ProtectConfig, Boolean> settingsBoolean = new EnumMap<ProtectConfig, Boolean>(ProtectConfig.class);
|
||||
//private final transient Map<ProtectConfig, String> settingsString = new EnumMap<ProtectConfig, String>(ProtectConfig.class);
|
||||
//private final transient Map<ProtectConfig, List<Integer>> settingsList = new EnumMap<ProtectConfig, List<Integer>>(ProtectConfig.class);
|
||||
private transient IProtectedBlock storage = null;
|
||||
private transient EssentialsConnect ess = null;
|
||||
private transient ProtectHolder settings = null;
|
||||
private transient com.mchange.v2.c3p0.management.ActiveManagementCoordinator temp; // leave this here for maven
|
||||
|
||||
@Override
|
||||
public void onLoad()
|
||||
{
|
||||
C3P0logger = com.mchange.v2.log.MLog.getLogger(com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.class);
|
||||
C3P0logger.setFilter(new Filter()
|
||||
{
|
||||
public boolean isLoggable(final LogRecord lr)
|
||||
{
|
||||
return lr.getLevel() != Level.INFO;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
@@ -47,10 +24,7 @@ public class EssentialsProtect extends JavaPlugin implements IProtect
|
||||
enableEmergencyMode(pm);
|
||||
return;
|
||||
}
|
||||
ess = new EssentialsConnect(essPlugin, this);
|
||||
|
||||
final EssentialsProtectPlayerListener playerListener = new EssentialsProtectPlayerListener(this);
|
||||
pm.registerEvents(playerListener, this);
|
||||
ess = new EssentialsConnect(essPlugin, this);
|
||||
|
||||
final EssentialsProtectBlockListener blockListener = new EssentialsProtectBlockListener(this);
|
||||
pm.registerEvents(blockListener, this);
|
||||
@@ -74,74 +48,12 @@ public class EssentialsProtect extends JavaPlugin implements IProtect
|
||||
LOGGER.log(Level.SEVERE, "Essentials not installed or failed to load. Essenials Protect is in emergency mode now.");
|
||||
}
|
||||
|
||||
/*@Override
|
||||
public boolean checkProtectionItems(final ProtectConfig list, final int id)
|
||||
{
|
||||
final List<Integer> itemList = settingsList.get(list);
|
||||
return itemList != null && !itemList.isEmpty() && itemList.contains(id);
|
||||
}*/
|
||||
@Override
|
||||
public IProtectedBlock getStorage()
|
||||
{
|
||||
return storage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStorage(final IProtectedBlock pb)
|
||||
{
|
||||
storage = pb;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public EssentialsConnect getEssentialsConnect()
|
||||
{
|
||||
return ess;
|
||||
}
|
||||
|
||||
/*public Map<ProtectConfig, Boolean> getSettingsBoolean()
|
||||
{
|
||||
return settingsBoolean;
|
||||
}
|
||||
|
||||
public Map<ProtectConfig, String> getSettingsString()
|
||||
{
|
||||
return settingsString;
|
||||
}
|
||||
|
||||
public Map<ProtectConfig, List<Integer>> getSettingsList()
|
||||
{
|
||||
return settingsList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSettingBool(final ProtectConfig protectConfig)
|
||||
{
|
||||
final Boolean bool = settingsBoolean.get(protectConfig);
|
||||
return bool == null ? protectConfig.getDefaultValueBoolean() : bool;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSettingString(final ProtectConfig protectConfig)
|
||||
{
|
||||
final String str = settingsString.get(protectConfig);
|
||||
return str == null ? protectConfig.getDefaultValueString() : str;
|
||||
}*/
|
||||
@Override
|
||||
public void onDisable()
|
||||
{
|
||||
if (storage != null)
|
||||
{
|
||||
storage.onPluginDeactivation();
|
||||
}
|
||||
// Sleep for a second to allow the database to close.
|
||||
try
|
||||
{
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
catch (InterruptedException ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProtectHolder getSettings()
|
||||
|
Reference in New Issue
Block a user