diff --git a/README.md b/README.md
index 7dff90f9..091328df 100644
--- a/README.md
+++ b/README.md
@@ -48,17 +48,17 @@ If you want to learn how to use DungeonsXL step by step, please have a look at t
## Compatibility
### Server
-DungeonsXL works with 1.8.8 and higher. However, support for 1.12.x / 1.11.x / 1.10.x / 1.9.x has a higher priority than support for 1.8.8. Old builds that support older versions are unusable for production environments. See [here](../../wiki/legacy-support) for detailed information. Some cosmetic features require the Spigot API and will therefore not work with CraftBukkit.
+DungeonsXL works with 1.8.8 and higher. However, support for 1.13 / 1.12.x / 1.11.x / 1.10.x / 1.9.x has a higher priority than support for 1.8.8. Old builds that support older versions are unusable for production environments. See [here](../../wiki/legacy-support) for detailed information. Some cosmetic features require the Spigot API and will therefore not work with CraftBukkit.
### Building information and dependencies
Building DungeonsXL from source requires [Apache Maven](https://maven.apache.org/).
Maven automatically fetches all dependencies and builds DungeonsXL; just run _build.bat_ or enter the command _mvn clean install_.
#### DRECommons
-[DRECommons](https://github.com/DRE2N/DRECommons) is a util library for common tasks. DungeonsXL contains DRECommons 4.2.
+[DRECommons](https://github.com/DRE2N/DRECommons) is a util library for common tasks. DungeonsXL contains DRECommons 4.2.1.
#### Caliburn API
-[Caliburn](https://github.com/DRE2N/CaliburnAPI) is an API to read custom items and mobs from config files. DungeonsXL contains Caliburn Beta 0.4.1.
+[Caliburn](https://github.com/DRE2N/CaliburnAPI) is an API to read custom items and mobs from config files. DungeonsXL contains Caliburn Beta 0.4.2.
### Java
Make sure that your server uses Java 8 or higher.
@@ -69,6 +69,7 @@ Supported.
### Known incompatibilities
* Towny
* Corpses
+* PerWorldInventory
Many incompatibilities can be fixed with [PerWorldPlugins](http://dev.bukkit.org/bukkit-plugins/perworldplugins/) ([fork for 1.8+](https://www.spigotmc.org/resources/perworldplugins-unofficial-update-version.6454/)).
Try to add the incompatible plugins only to the worlds where you need them.
diff --git a/pom.xml b/pom.xml
index 44330069..ec31a879 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,7 @@
de.erethon
caliburn
- 0.4.1
+ 0.4.2
compile
diff --git a/src/main/java/de/erethon/dungeonsxl/player/DGlobalPlayer.java b/src/main/java/de/erethon/dungeonsxl/player/DGlobalPlayer.java
index 2c238505..5dff9170 100644
--- a/src/main/java/de/erethon/dungeonsxl/player/DGlobalPlayer.java
+++ b/src/main/java/de/erethon/dungeonsxl/player/DGlobalPlayer.java
@@ -32,10 +32,12 @@ import java.io.File;
import java.util.List;
import java.util.UUID;
import org.bukkit.Bukkit;
+import org.bukkit.Location;
import org.bukkit.attribute.Attribute;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
+import org.bukkit.scheduler.BukkitRunnable;
/**
* Represents a player in the non-DXL worlds of the server.
@@ -322,7 +324,23 @@ public class DGlobalPlayer implements PlayerWrapper {
* Respawns the player at his old position before he was in a dungeon
*/
public void reset(boolean keepInventory) {
+ final Location tpLoc = data.getOldLocation().getWorld() != null ? data.getOldLocation() : Bukkit.getWorlds().get(0).getSpawnLocation();
+ if (player.isDead()) {
+ new BukkitRunnable() {
+ @Override
+ public void run() {
+ PlayerUtil.respawn(player);
+ reset(tpLoc, keepInventory);
+ }
+ }.runTaskLater(plugin, 1L);
+ } else {
+ reset(tpLoc, keepInventory);
+ }
+ }
+
+ private void reset(Location tpLoc, boolean keepInventory) {
try {
+ PlayerUtil.secureTeleport(player, tpLoc);
if (!keepInventory) {
while (data.getOldInventory().size() > 36) {
data.getOldInventory().remove(36);
@@ -348,12 +366,6 @@ public class DGlobalPlayer implements PlayerWrapper {
player.addPotionEffects(data.getOldPotionEffects());
}
- if (data.getOldLocation().getWorld() != null) {
- PlayerUtil.secureTeleport(player, data.getOldLocation());
- } else {
- PlayerUtil.secureTeleport(player, Bukkit.getWorlds().get(0).getSpawnLocation());
- }
-
} catch (NullPointerException exception) {
exception.printStackTrace();
player.setHealth(0);