fix an NPE and other changes
This commit is contained in:
@@ -24,8 +24,10 @@ public class CmdPaypalSee extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (context.args.size() == 0) {
|
||||
if (context.fPlayer.getFaction().getPaypal().isEmpty()) {
|
||||
if (context.fPlayer.getFaction().getPaypal() == null) {
|
||||
context.msg(TL.COMMAND_PAYPAL_NOTSET);
|
||||
} else {
|
||||
context.msg(TL.PAYPALSEE_PLAYER_PAYPAL, context.fPlayer.getFaction().getPaypal());
|
||||
@@ -34,7 +36,7 @@ public class CmdPaypalSee extends FCommand {
|
||||
if (context.fPlayer.isAdminBypassing()) {
|
||||
Faction faction = context.argAsFaction(0);
|
||||
if (faction != null) {
|
||||
if (faction.getPaypal().isEmpty()) {
|
||||
if (faction.getPaypal() == null) {
|
||||
context.msg(TL.COMMAND_PAYPALSEE_FACTION_NOTSET, faction.getTag());
|
||||
} else {
|
||||
context.msg(TL.COMMAND_PAYPALSEE_FACTION_PAYPAL.toString(), faction.getTag(), faction.getPaypal());
|
||||
@@ -44,7 +46,7 @@ public class CmdPaypalSee extends FCommand {
|
||||
context.msg(TL.GENERIC_NOPERMISSION, "see another factions paypal.");
|
||||
}
|
||||
} else {
|
||||
context.msg(FactionsPlugin.getInstance().cmdBase.cmdPaypalSee.getUseageTemplate(context));
|
||||
context.msg(FactionsPlugin.getInstance().cmdBase.cmdPaypalSee.getUsageTemplate(context));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user