From c26c8a27dc0ace1e68c23bd10a77c68b7d7f9763 Mon Sep 17 00:00:00 2001 From: Kiran Hart Date: Thu, 18 Apr 2024 14:14:18 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A2=20fix=20for=20loop=20numbering?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Took 1 minute --- .../guis/AbstractPlaceholderGui.java | 48 ------------------- .../abstraction/AuctionUpdatingPagedGUI.java | 2 +- .../guis/confirmation/GUIConfirmBid.java | 2 +- .../guis/confirmation/GUIConfirmCancel.java | 2 +- .../guis/confirmation/GUIListingConfirm.java | 2 +- 5 files changed, 4 insertions(+), 52 deletions(-) diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/AbstractPlaceholderGui.java b/src/main/java/ca/tweetzy/auctionhouse/guis/AbstractPlaceholderGui.java index cfa7e7c..2d3fbb7 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/AbstractPlaceholderGui.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/AbstractPlaceholderGui.java @@ -78,53 +78,5 @@ public abstract class AbstractPlaceholderGui extends Gui { return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CLOSE_BTN_ITEM.getString(), Settings.GUI_CLOSE_BTN_NAME.getString(), Settings.GUI_CLOSE_BTN_LORE.getStringList(), null); } - protected ItemStack getIncreaseQtyButtonItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_INCREASE_QTY_ITEM.getString(), Settings.GUI_CONFIRM_INCREASE_QTY_NAME.getString(), Settings.GUI_CONFIRM_INCREASE_QTY_LORE.getStringList(), null); - } - - protected ItemStack getDecreaseQtyButtonItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_DECREASE_QTY_ITEM.getString(), Settings.GUI_CONFIRM_DECREASE_QTY_NAME.getString(), Settings.GUI_CONFIRM_DECREASE_QTY_LORE.getStringList(), null); - } - // confirms - protected ItemStack getConfirmCancelYesItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_CANCEL_YES_ITEM.getString(), Settings.GUI_CONFIRM_CANCEL_YES_NAME.getString(), Settings.GUI_CONFIRM_CANCEL_YES_LORE.getStringList(), null); - } - - protected ItemStack getConfirmCancelNoItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_CANCEL_NO_ITEM.getString(), Settings.GUI_CONFIRM_CANCEL_NO_NAME.getString(), Settings.GUI_CONFIRM_CANCEL_NO_LORE.getStringList(), null); - } - - protected ItemStack getConfirmBuyYesItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_BUY_YES_ITEM.getString(), Settings.GUI_CONFIRM_BUY_YES_NAME.getString(), Settings.GUI_CONFIRM_BUY_YES_LORE.getStringList(), null); - } - - protected ItemStack getConfirmBuyNoItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_BUY_NO_ITEM.getString(), Settings.GUI_CONFIRM_BUY_NO_NAME.getString(), Settings.GUI_CONFIRM_BUY_NO_LORE.getStringList(), null); - } - - protected ItemStack getConfirmRequestYesItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_REQUEST_YES_ITEM.getString(), Settings.GUI_CONFIRM_REQUEST_YES_NAME.getString(), Settings.GUI_CONFIRM_REQUEST_YES_LORE.getStringList(), null); - } - - protected ItemStack getConfirmRequestNoItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_REQUEST_NO_ITEM.getString(), Settings.GUI_CONFIRM_REQUEST_NO_NAME.getString(), Settings.GUI_CONFIRM_REQUEST_NO_LORE.getStringList(), null); - } - - - protected ItemStack getConfirmListingYesItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_LISTING_YES_ITEM.getString(), Settings.GUI_CONFIRM_LISTING_YES_NAME.getString(), Settings.GUI_CONFIRM_LISTING_YES_LORE.getStringList(), null); - } - - protected ItemStack getConfirmListingNoItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_LISTING_NO_ITEM.getString(), Settings.GUI_CONFIRM_LISTING_NO_NAME.getString(), Settings.GUI_CONFIRM_LISTING_NO_LORE.getStringList(), null); - } - - protected ItemStack getConfirmBidYesItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_BID_YES_ITEM.getString(), Settings.GUI_CONFIRM_BID_YES_NAME.getString(), Settings.GUI_CONFIRM_BID_YES_LORE.getStringList(), null); - } - - protected ItemStack getConfirmBidNoItem() { - return ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_CONFIRM_BID_NO_ITEM.getString(), Settings.GUI_CONFIRM_BID_NO_NAME.getString(), Settings.GUI_CONFIRM_BID_NO_LORE.getStringList(), null); - } } diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/abstraction/AuctionUpdatingPagedGUI.java b/src/main/java/ca/tweetzy/auctionhouse/guis/abstraction/AuctionUpdatingPagedGUI.java index ffc202e..4498208 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/abstraction/AuctionUpdatingPagedGUI.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/abstraction/AuctionUpdatingPagedGUI.java @@ -84,7 +84,7 @@ public abstract class AuctionUpdatingPagedGUI extends BaseGUI { protected void cancelTask() { if (this.task != null) { this.task.cancel(); - Common.log("Cancelled updating task in menu"); + Bukkit.getServer().getConsoleSender().sendMessage("Cancelled updating task in menu"); } } diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIConfirmBid.java b/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIConfirmBid.java index 087d947..b62f3e0 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIConfirmBid.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIConfirmBid.java @@ -73,7 +73,7 @@ public class GUIConfirmBid extends AuctionUpdatingPagedGUI { for (int i = 0; i < 4; i++) drawYes(i); - for (int i = 5; i < 8; i++) + for (int i = 5; i < 9; i++) drawNo(i); } diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIConfirmCancel.java b/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIConfirmCancel.java index 0c871ab..ef8a858 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIConfirmCancel.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIConfirmCancel.java @@ -60,7 +60,7 @@ public class GUIConfirmCancel extends AuctionBaseGUI { setItem(0, 4, this.auctionItem.getDisplayStack(AuctionStackType.ACTIVE_AUCTIONS_LIST)); - for (int i = 5; i < 8; i++) + for (int i = 5; i < 9; i++) drawNo(i); } diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIListingConfirm.java b/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIListingConfirm.java index 7f73972..c18ec3f 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIListingConfirm.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/confirmation/GUIListingConfirm.java @@ -90,7 +90,7 @@ public final class GUIListingConfirm extends AuctionBaseGUI { setItem(0, 4, this.auctionedItem.getDisplayStack(AuctionStackType.LISTING_PREVIEW)); - for (int i = 5; i < 8; i++) + for (int i = 5; i < 9; i++) drawNo(i); }