1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-14 10:34:41 +02:00

Revert "Add option to disable jails entirely."

This reverts commit 58dfc03ab7.
This commit is contained in:
KHobbits
2012-04-14 23:18:20 +01:00
parent 6d111eb8d7
commit c90c447f01
6 changed files with 6 additions and 30 deletions

View File

@@ -232,11 +232,8 @@ public class Essentials extends JavaPlugin implements IEssentials
pm.registerEvents(worldListener, this);
//TODO: Check if this should be here, and not above before reload()
if (settings.isJailsEnabled())
{
jails = new Jails(this);
confList.add(jails);
}
pm.registerEvents(tntListener, this);
@@ -431,17 +428,10 @@ public class Essentials extends JavaPlugin implements IEssentials
}
@Override
public IJails getJails() throws UnsupportedOperationException
{
if (jails == null)
{
throw new UnsupportedOperationException("Jails are not enabled in your configuration");
}
else
public IJails getJails()
{
return jails;
}
}
@Override
public Warps getWarps()

View File

@@ -37,7 +37,7 @@ public interface IEssentials extends Plugin
BukkitScheduler getScheduler();
IJails getJails() throws UnsupportedOperationException;
IJails getJails();
Warps getWarps();

View File

@@ -173,6 +173,4 @@ public interface ISettings extends IConf
long getTeleportInvulnerability();
boolean isTeleportInvulnerability();
boolean isJailsEnabled();
}

View File

@@ -780,10 +780,4 @@ public class Settings implements ISettings
{
return teleportInvulnerability;
}
@Override
public boolean isJailsEnabled()
{
return config.getBoolean("enable-jails", true);
}
}

View File

@@ -171,9 +171,6 @@ public class MetricsStarter implements Runnable
metrics.start();
}
catch (UnsupportedOperationException ex)
{
}
catch (Exception ex)
{

View File

@@ -44,9 +44,6 @@ change-displayname: true
# Don't forget to remove the # infront of the line
#add-prefix-suffix: false
# Whether or not jails are activated
enable-jails: true
# The delay, in seconds, required between /home, /tp, etc.
teleport-cooldown: 0