CitizensDev/Citizens — Issue #773: Enderpearl and Delivery Quests, and Wizard Teleporting w/o Money
Author: qwahchees
Created: 2012-02-06 03:58:04+00:00
State: open

Okay, first problem.
When I deliver the item to the NPC, (I set it as an Enderpearl, the reward), it hurts me and uses my Enderpearl.

Second problem, Wizard Teleportation without sufficient money teleports me but doesn't deduct any money. If the cost is 150, and I have 149, it won't deduct, but the message will appear telling me I don't have enough.

I believe this is at the RightClickHandler (WizardManager.java)

String econMsg = "";
if (Economy.useEconPlugin()) {
if (Economy.hasEnough(player, UtilityProperties.getPrice(op))) {
double paid = Economy.pay(player,
UtilityProperties.getPrice(op));
if (paid > 0) {
econMsg = ChatColor.GREEN + "Paid "
+ StringUtils.wrap(Economy.format(paid)) + ":";
}
} else {
player.sendMessage(MessageUtils.getNoMoneyMessage(player, op));
return;
}
}
if (Economy.useEconPlugin()) {
player.sendMessage(econMsg);
}
player.sendMessage(msg);
}

op isn't defined properly, and thus not working. My theory, I'm no Java expert.