mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-12-22 16:48:11 +01:00
Another NPE
NPE thrown when trying to cancel an Auction.
This commit is contained in:
parent
40cbb4574f
commit
5f6b5fe7c1
@ -1016,13 +1016,13 @@ public class GuiListener implements Listener {
|
|||||||
sellerPlayer.sendMessage(Messages.ADMIN_FORCE_CANCELLED_TO_PLAYER.getMessage(player));
|
sellerPlayer.sendMessage(Messages.ADMIN_FORCE_CANCELLED_TO_PLAYER.getMessage(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
AuctionCancelledEvent event = new AuctionCancelledEvent((sellerPlayer != null ? sellerPlayer : Methods.getOfflinePlayer(seller)), Methods.fromBase64(data.getString("Items." + ID + ".Item")), Reasons.ADMIN_FORCE_CANCEL);
|
AuctionCancelledEvent event = new AuctionCancelledEvent((sellerPlayer != null ? sellerPlayer : Methods.getOfflinePlayer(seller)), Methods.fromBase64(data.getString("Items." + i + ".Item")), Reasons.ADMIN_FORCE_CANCEL);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
data.set("OutOfTime/Cancelled." + num + ".Seller", data.getString("Items." + i + ".Seller"));
|
data.set("OutOfTime/Cancelled." + num + ".Seller", data.getString("Items." + i + ".Seller"));
|
||||||
data.set("OutOfTime/Cancelled." + num + ".Full-Time", data.getLong("Items." + i + ".Full-Time"));
|
data.set("OutOfTime/Cancelled." + num + ".Full-Time", data.getLong("Items." + i + ".Full-Time"));
|
||||||
data.set("OutOfTime/Cancelled." + num + ".StoreID", data.getInt("Items." + i + ".StoreID"));
|
data.set("OutOfTime/Cancelled." + num + ".StoreID", data.getInt("Items." + i + ".StoreID"));
|
||||||
data.set("OutOfTime/Cancelled." + num + ".Item", data.getString("Items." + ID + ".Item"));
|
data.set("OutOfTime/Cancelled." + num + ".Item", data.getString("Items." + i + ".Item"));
|
||||||
data.set("Items." + i, null);
|
data.set("Items." + i, null);
|
||||||
|
|
||||||
Files.data.save();
|
Files.data.save();
|
||||||
|
Loading…
Reference in New Issue
Block a user