Fixed an NPE with iConomy handling
This commit is contained in:
@ -313,7 +313,9 @@ public class Stargate extends JavaPlugin {
|
||||
|
||||
boolean iConCharge = (iConomyHandler.useiConomy() && !portal.isFree() && !hasPerm(player, "stargate.free.use", player.isOp()));
|
||||
String target = (portal.getGate().getToOwner() ? portal.getOwner() : null);
|
||||
iConCharge = iConCharge && !target.equals(player.getName());
|
||||
if (target != null)
|
||||
iConCharge = iConCharge && !target.equals(player.getName());
|
||||
|
||||
if (!iConCharge || iConomyHandler.chargePlayer(player.getName(), target, portal.getGate().getUseCost())) {
|
||||
if (iConCharge && portal.getGate().getUseCost() > 0) {
|
||||
player.sendMessage(ChatColor.GREEN + "Deducted " + iConomyHandler.format(portal.getGate().getUseCost()));
|
||||
@ -372,7 +374,8 @@ public class Stargate extends JavaPlugin {
|
||||
|
||||
boolean iConCharge = (iConomyHandler.useiConomy() && !portal.isFree() && !hasPerm(player, "stargate.free.use", player.isOp()));
|
||||
String target = (portal.getGate().getToOwner() ? portal.getOwner() : null);
|
||||
iConCharge = iConCharge && !target.equals(player.getName());
|
||||
if (target != null)
|
||||
iConCharge = iConCharge && !target.equals(player.getName());
|
||||
|
||||
if (!iConCharge || iConomyHandler.chargePlayer(player.getName(), target, portal.getGate().getUseCost())) {
|
||||
if (iConCharge && portal.getGate().getUseCost() > 0) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: Stargate
|
||||
main: net.TheDgtl.Stargate.Stargate
|
||||
version: 0.4.5
|
||||
version: 0.4.6
|
||||
description: Stargate mod for Bukkit
|
||||
author: Drakia
|
||||
website: http://www.thedgtl.net
|
||||
|
Reference in New Issue
Block a user