mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-12-01 06:53:26 +01:00
Fixed NPE in /dxl leave
This commit is contained in:
parent
cabbb35775
commit
2fe1c9d28a
@ -117,6 +117,7 @@ public class DPlayer {
|
|||||||
p.lives.remove(player);
|
p.lives.remove(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.isEditing) {
|
||||||
DConfig dConfig = GameWorld.get(world).config;
|
DConfig dConfig = GameWorld.get(world).config;
|
||||||
if (this.isFinished) {
|
if (this.isFinished) {
|
||||||
this.savePlayer.reset(dConfig.getKeepInventoryOnFinish());
|
this.savePlayer.reset(dConfig.getKeepInventoryOnFinish());
|
||||||
@ -124,6 +125,9 @@ public class DPlayer {
|
|||||||
else {
|
else {
|
||||||
this.savePlayer.reset(dConfig.getKeepInventoryOnEscape());
|
this.savePlayer.reset(dConfig.getKeepInventoryOnEscape());
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.savePlayer.reset(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isEditing) {
|
if (this.isEditing) {
|
||||||
EditWorld eworld = EditWorld.get(this.world);
|
EditWorld eworld = EditWorld.get(this.world);
|
||||||
|
@ -2,7 +2,6 @@ package com.dre.dungeonsxl.game;
|
|||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
@ -61,6 +61,9 @@ public class GameChest {
|
|||||||
msg = msg.substring(0, msg.length() - 1);
|
msg = msg.substring(0, msg.length() - 1);
|
||||||
|
|
||||||
P.p.msg(player, P.p.language.get("Player_LootAdded", msg));
|
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);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: DungeonsXL
|
name: DungeonsXL
|
||||||
main: com.dre.dungeonsxl.P
|
main: com.dre.dungeonsxl.P
|
||||||
version: 0.9.6-SNAPSHOT
|
version: 0.9.6
|
||||||
author: Frank Baumann
|
author: Frank Baumann
|
||||||
authors: [Frank Baumann, Milan Albrecht, Tobias Schmitz, Daniel Saukel]
|
authors: [Frank Baumann, Milan Albrecht, Tobias Schmitz, Daniel Saukel]
|
||||||
website: http://www.dre2n.ml
|
website: http://www.dre2n.ml
|
||||||
|
Loading…
Reference in New Issue
Block a user