This commit is contained in:
rourke750 2013-09-01 23:07:00 -07:00
commit de4754b758
2 changed files with 11 additions and 2 deletions

View File

@ -131,7 +131,11 @@ public class BorderCheckTask implements Runnable
if (newLoc == null)
{
if (Config.Debug())
Config.LogWarn("Target new location unviable, using spawn.");
Config.LogWarn("Target new location unviable, using spawn or killing player.");
if (Config.getIfPlayerKill()){
player.setHealth(0.0);
return null;
}
newLoc = player.getWorld().getSpawnLocation();
}

View File

@ -45,6 +45,7 @@ public class Config
private static boolean dynmapEnable = true;
private static String dynmapMessage;
private static int remountDelayTicks = 0;
private static boolean killplayer = false;
// for monitoring plugin efficiency
// public static long timeUsed = 0;
@ -216,7 +217,9 @@ public class Config
{
return whooshEffect;
}
public static boolean getIfPlayerKill(){
return killplayer;
}
public static void showWhooshEffect(Location loc)
{
if (!whooshEffect())
@ -459,6 +462,7 @@ public class Config
dynmapEnable = cfg.getBoolean("dynmap-border-enabled", true);
dynmapMessage = cfg.getString("dynmap-border-message", "The border of the world.");
LogConfig("Using " + (ShapeName()) + " border, knockback of " + knockBack + " blocks, and timer delay of " + timerTicks + ".");
killplayer = cfg.getBoolean("player-killed-bad-spawn", false);
StartBorderTimer();
@ -543,6 +547,7 @@ public class Config
cfg.set("remount-delay-ticks", remountDelayTicks);
cfg.set("dynmap-border-enabled", dynmapEnable);
cfg.set("dynmap-border-message", dynmapMessage);
cfg.set("player-killed-bad-spawn", killplayer);
cfg.set("worlds", null);
Iterator world = borders.entrySet().iterator();