Fixed crash if Resident is null at /sethome
This commit is contained in:
parent
47419c0925
commit
4fe8085de8
3 changed files with 2 additions and 2 deletions
Binary file not shown.
|
@ -471,7 +471,7 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (player.CurrentChannel.equals(Channel.AdminChat)) {
|
} else if (player.CurrentChannel.equals(Channel.AdminChat)) {
|
||||||
try {
|
try { // TODO: Put message JSON into it's structure
|
||||||
if (!event.getPlayer().isOp()) {
|
if (!event.getPlayer().isOp()) {
|
||||||
event.getPlayer().sendMessage(
|
event.getPlayer().sendMessage(
|
||||||
"§cYou need to be an OP to use this channel.");
|
"§cYou need to be an OP to use this channel.");
|
||||||
|
@ -665,7 +665,7 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
if (town.hasNation()) {
|
if (town.hasNation()) {
|
||||||
Resident res = tu.getResidentMap().get(
|
Resident res = tu.getResidentMap().get(
|
||||||
event.getPlayer().getName());
|
event.getPlayer().getName());
|
||||||
if (res.hasTown()) {
|
if (res != null && res.hasTown()) {
|
||||||
Town town2 = res.getTown();
|
Town town2 = res.getTown();
|
||||||
if (town2.hasNation()) {
|
if (town2.hasNation()) {
|
||||||
if (town.getNation().getEnemies()
|
if (town.getNation().getEnemies()
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue