additional bits for release 1.7.5

Added option to kill player instead of teleporting to spawn.

Update BorderCheckTask.java

Update Config.java

Update Config.java

Update Config.java

e
This commit is contained in:
Brettflan 2013-07-12 02:25:36 -05:00 committed by Rourke750
parent 68bb624e20
commit 477c629ddb
4 changed files with 14 additions and 5 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.wimbli.WorldBorder</groupId>
<artifactId>WorldBorder</artifactId>
<version>1.7.3</version>
<version>1.7.5</version>
<name>WorldBorder</name>
<url>https://github.com/Brettflan/WorldBorder</url>
<issueManagement>
@ -30,7 +30,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.6.1-R0.1-SNAPSHOT</version>
<version>1.6.2-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.dynmap</groupId>

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();

View File

@ -113,7 +113,7 @@ public class WorldTrimTask implements Runnable
if (now > lastReport + 5000)
reportProgress();
// if this iteration has been running for 45ms (almost 1 tick) or more, stop to take a breather
// if this iteration has been running for 45ms (almost 1 tick) or more, stop to take a breather; shouldn't normally be possible with Trim, but just in case
if (now > loopStartTime + 45)
{
readyToGo = true;