This commit is contained in:
boy0001 2015-02-22 00:58:01 +11:00
parent 7bd99afa25
commit 670c0979c9
3 changed files with 6 additions and 4 deletions

View File

@ -102,7 +102,7 @@ public class Buy extends SubCommand {
EconHandler.withdrawPlayer(plr, price);
sendMessage(plr, C.REMOVED_BALANCE, price + "");
EconHandler.depositPlayer(UUIDHandler.uuidWrapper.getOfflinePlayer(plot.owner), initPrice);
final Player owner = UUIDHandler.uuidWrapper.getPlayer(plot.owner);
PlotPlayer owner = UUIDHandler.getPlayer(plot.owner);
if (owner != null) {
sendMessage(plr, C.PLOT_SOLD, plot.id + "", plr.getName(), initPrice + "");
}

View File

@ -14,10 +14,8 @@ import com.intellectualcrafters.plot.util.bukkit.BukkitUtil;
/**
* Created 2014-11-18 for PlotSquared
*
* @author Citymonstret
*/
@SuppressWarnings("unused")
public class InventoryListener implements Listener {
@EventHandler
public void onInventoryAction(final InventoryInteractEvent event) {
@ -31,7 +29,6 @@ public class InventoryListener implements Listener {
final Inventory inventory = event.getInventory();
final Player player = (Player) event.getWhoClicked();
if (inventory.getHolder() instanceof InfoInventory) {
// TODO: Do stuff
switch (event.getSlot()) {
case 3:
case 4:

View File

@ -1,6 +1,7 @@
package com.intellectualcrafters.plot.util;
import com.intellectualcrafters.plot.PlotSquared;
import com.intellectualcrafters.plot.object.OfflinePlotPlayer;
import com.intellectualcrafters.plot.object.PlotPlayer;
public class EconHandler {
@ -16,4 +17,8 @@ public class EconHandler {
public static void depositPlayer(PlotPlayer player, double amount) {
PlotSquared.economy.depositPlayer(player.getName(), amount);
}
public static void depositPlayer(OfflinePlotPlayer player, double amount) {
PlotSquared.economy.depositPlayer(player.getName(), amount);
}
}