Fixed leave teleportation bug

This commit is contained in:
Daniel Saukel 2016-03-28 21:11:01 +02:00
parent f6bf75e051
commit 0afca982b2
3 changed files with 4 additions and 3 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.dre2n</groupId>
<artifactId>dungeonsxl</artifactId>
<version>0.11-SNAPSHOT-29</version>
<version>0.11-SNAPSHOT</version>
<packaging>jar</packaging>
<name>DungeonsXL</name>
<url>https://dre2n.github.io</url>

View File

@ -648,6 +648,7 @@ public class GameWorld {
if (bestTime == 0) {
return false;
} else if (worldConfig.getTimeLastPlayed() != 0) {
if (System.currentTimeMillis() - bestTime > worldConfig.getTimeLastPlayed() * (long) 3600000) {
return false;

View File

@ -499,6 +499,8 @@ public class DPlayer extends DGlobalPlayer {
}
public void leave() {
delete();
if (!editing) {
WorldConfig dConfig = GameWorld.getByWorld(world).getConfig();
if (finished) {
@ -603,8 +605,6 @@ public class DPlayer extends DGlobalPlayer {
}
}
}
delete();
}
public void ready() {