Fixed NPE in /dxl leave

This commit is contained in:
Daniel Saukel 2015-08-29 15:44:13 +02:00
parent cabbb35775
commit 2fe1c9d28a
4 changed files with 15 additions and 9 deletions

View File

@ -117,6 +117,7 @@ public class DPlayer {
p.lives.remove(player);
}
if (!this.isEditing) {
DConfig dConfig = GameWorld.get(world).config;
if (this.isFinished) {
this.savePlayer.reset(dConfig.getKeepInventoryOnFinish());
@ -124,6 +125,9 @@ public class DPlayer {
else {
this.savePlayer.reset(dConfig.getKeepInventoryOnEscape());
}
} else {
this.savePlayer.reset(false);
}
if (this.isEditing) {
EditWorld eworld = EditWorld.get(this.world);

View File

@ -2,7 +2,6 @@ package com.dre.dungeonsxl.game;
import java.util.Random;
import org.bukkit.Bukkit;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.inventory.ItemStack;

View File

@ -61,6 +61,9 @@ public class GameChest {
msg = msg.substring(0, msg.length() - 1);
P.p.msg(player, P.p.language.get("Player_LootAdded", msg));
if (moneyReward != 0) {
P.p.msg(player, P.p.language.get("Player_LootAdded", String.valueOf(moneyReward)));
}
}
}
}
@ -85,7 +88,7 @@ public class GameChest {
event.setCancelled(true);
}
} else {
P.p.msg(P.p.getServer().getPlayer(event.getPlayer().getName()), ChatColor.RED + "Diese Kiste wurde schon geöffnet!");
P.p.msg(P.p.getServer().getPlayer(event.getPlayer().getUniqueId()), ChatColor.RED + "Diese Kiste wurde schon geöffnet!");
event.setCancelled(true);
}
}

View File

@ -1,6 +1,6 @@
name: DungeonsXL
main: com.dre.dungeonsxl.P
version: 0.9.6-SNAPSHOT
version: 0.9.6
author: Frank Baumann
authors: [Frank Baumann, Milan Albrecht, Tobias Schmitz, Daniel Saukel]
website: http://www.dre2n.ml