project wide code reformat/cleanup

Took 37 seconds
This commit is contained in:
Kiran Hart 2022-07-11 17:06:58 -04:00
parent a53adb4d70
commit 2c74a50223
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3
39 changed files with 23 additions and 64 deletions

View File

@ -1,28 +1,31 @@
---
name: Report a Bug
about: Report an issue with the plugin
title: ''
labels: bug
assignees: ''
name: Report a Bug about: Report an issue with the plugin title: ''
labels: bug assignees: ''
---
**Describe Bug**
- Describe the bug in as much detail as possible, the more detailed, the chances of it being fixed is faster
**How to Reproduce**
- Describe how to reproduce this bug: EX.
1. Open the main menu
2. Click this button
3. Then do this... etc
**What should happen**
- Describe what the expected outcome should be, what should happen?
**Screenshots/Videos**
- If any, provide video or image links
**Server Information**
- Provide the server version
- Provide the server jar (ex. paper/spigot)
- Plugin Version

View File

@ -1,15 +1,14 @@
---
name: Request a Feature
about: Suggest a change/new feature for the plugin
title: ''
labels: enhancement
assignees: ''
name: Request a Feature about: Suggest a change/new feature for the plugin title: ''
labels: enhancement assignees: ''
---
**Describe Feature**
- Describe how this feature will work
**Additional Information**
- You can provide image links
- You can provide video links

View File

@ -265,12 +265,12 @@ public class AuctionAPI {
String itemName = MMOItemsHook.isEnabled() ? MMOItemsHook.getItemType(itemStack) : ChatColor.stripColor(getItemName(itemStack));
DiscordWebhook.EmbedObject embedObject = new DiscordWebhook.EmbedObject();
final String playerLost =AuctionHouse.getInstance().getLocale().getMessage("discord.player_lost").getMessage();
final String playerLost = AuctionHouse.getInstance().getLocale().getMessage("discord.player_lost").getMessage();
final String notSold = AuctionHouse.getInstance().getLocale().getMessage("discord.not_sold").getMessage();
final String noBuyer =AuctionHouse.getInstance().getLocale().getMessage("discord.no_buyer").getMessage();
final String noBuyer = AuctionHouse.getInstance().getLocale().getMessage("discord.no_buyer").getMessage();
final String wasNotBought = AuctionHouse.getInstance().getLocale().getMessage("discord.not_bought").getMessage();
final String isBidTrue =AuctionHouse.getInstance().getLocale().getMessage("discord.is_bid_true").getMessage();
final String isBidFalse =AuctionHouse.getInstance().getLocale().getMessage("discord.is_bid_false").getMessage();
final String isBidTrue = AuctionHouse.getInstance().getLocale().getMessage("discord.is_bid_true").getMessage();
final String isBidFalse = AuctionHouse.getInstance().getLocale().getMessage("discord.is_bid_false").getMessage();
final String isBidWin = AuctionHouse.getInstance().getLocale().getMessage("discord.sale_bid_win").getMessage();
final String immediateBuy = AuctionHouse.getInstance().getLocale().getMessage("discord.sale_immediate_buy").getMessage();

View File

@ -1,7 +1,7 @@
package ca.tweetzy.auctionhouse.api.events;
import ca.tweetzy.auctionhouse.auction.enums.AuctionSaleType;
import ca.tweetzy.auctionhouse.auction.AuctionedItem;
import ca.tweetzy.auctionhouse.auction.enums.AuctionSaleType;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.OfflinePlayer;

View File

@ -1,7 +1,6 @@
package ca.tweetzy.auctionhouse.api.hook;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import lombok.experimental.UtilityClass;
import me.clip.placeholderapi.PlaceholderAPI;

View File

@ -16,7 +16,6 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;

View File

@ -1,10 +1,8 @@
package ca.tweetzy.auctionhouse.commands;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.guis.GUIActiveAuctions;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.commands.AbstractCommand;
import ca.tweetzy.core.utils.TextUtils;
import org.bukkit.Bukkit;

View File

@ -61,7 +61,7 @@ public class CommandAdmin extends AbstractCommand {
if (target == null) {
for (OfflinePlayer offlinePlayer : Bukkit.getOfflinePlayers()) {
if (offlinePlayer.getName() != null && offlinePlayer.getName().equalsIgnoreCase(args[1])) {
target = offlinePlayer;
target = offlinePlayer;
}
}
}

View File

@ -1,10 +1,8 @@
package ca.tweetzy.auctionhouse.commands;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.commands.AbstractCommand;
import ca.tweetzy.core.utils.TextUtils;
import org.apache.commons.lang.StringUtils;

View File

@ -1,10 +1,8 @@
package ca.tweetzy.auctionhouse.commands;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.guis.GUIExpiredItems;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.commands.AbstractCommand;
import ca.tweetzy.core.utils.TextUtils;
import org.bukkit.Bukkit;

View File

@ -1,7 +1,6 @@
package ca.tweetzy.auctionhouse.commands;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.core.commands.AbstractCommand;
import ca.tweetzy.core.compatibility.ServerVersion;
import ca.tweetzy.core.compatibility.XMaterial;

View File

@ -1,10 +1,8 @@
package ca.tweetzy.auctionhouse.commands;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.commands.AbstractCommand;
import ca.tweetzy.core.utils.TextUtils;
import org.bukkit.Bukkit;

View File

@ -1,7 +1,6 @@
package ca.tweetzy.auctionhouse.commands;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.guis.GUIStats;
import ca.tweetzy.core.commands.AbstractCommand;
import org.bukkit.command.CommandSender;

View File

@ -1,7 +1,6 @@
package ca.tweetzy.auctionhouse.commands;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.guis.transaction.GUITransactionList;
import ca.tweetzy.auctionhouse.guis.transaction.GUITransactionType;
import ca.tweetzy.auctionhouse.settings.Settings;

View File

@ -1,8 +1,6 @@
package ca.tweetzy.auctionhouse.database.migrations;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.core.database.DataMigration;
import ca.tweetzy.core.database.MySQLConnector;
import java.sql.Connection;
import java.sql.SQLException;

View File

@ -1,8 +1,6 @@
package ca.tweetzy.auctionhouse.database.migrations;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.core.database.DataMigration;
import ca.tweetzy.core.database.MySQLConnector;
import java.sql.Connection;
import java.sql.SQLException;

View File

@ -2,13 +2,12 @@ package ca.tweetzy.auctionhouse.guis;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.auction.enums.AuctionStackType;
import ca.tweetzy.auctionhouse.auction.AuctionedItem;
import ca.tweetzy.auctionhouse.auction.enums.AuctionStackType;
import ca.tweetzy.auctionhouse.guis.confirmation.GUIConfirmCancel;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.managers.SoundManager;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.TextUtils;
import ca.tweetzy.core.utils.items.TItemBuilder;
import org.bukkit.Bukkit;

View File

@ -3,10 +3,8 @@ package ca.tweetzy.auctionhouse.guis;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.AuctionBan;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.TextUtils;
import ca.tweetzy.core.utils.TimeUtils;
import ca.tweetzy.core.utils.items.TItemBuilder;

View File

@ -8,7 +8,6 @@ import ca.tweetzy.auctionhouse.auction.AuctionedItem;
import ca.tweetzy.auctionhouse.guis.confirmation.GUIConfirmBid;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.hooks.EconomyManager;
import ca.tweetzy.core.input.PlayerChatInput;
import ca.tweetzy.core.utils.NumberUtils;

View File

@ -6,7 +6,6 @@ import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.compatibility.XMaterial;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.PlayerUtils;
import ca.tweetzy.core.utils.nms.NBTEditor;
import org.bukkit.ChatColor;

View File

@ -7,7 +7,6 @@ import ca.tweetzy.auctionhouse.auction.AuctionedItem;
import ca.tweetzy.auctionhouse.guis.confirmation.GUIConfirmPurchase;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.TextUtils;
import ca.tweetzy.core.utils.items.TItemBuilder;
import ca.tweetzy.core.utils.nms.NBTEditor;

View File

@ -6,7 +6,6 @@ import ca.tweetzy.auctionhouse.auction.AuctionedItem;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.managers.SoundManager;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.PlayerUtils;
import ca.tweetzy.core.utils.TextUtils;
import ca.tweetzy.core.utils.items.TItemBuilder;

View File

@ -5,7 +5,6 @@ import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.MinItemPrice;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.TextUtils;
import ca.tweetzy.core.utils.items.TItemBuilder;
import org.bukkit.entity.Player;

View File

@ -7,7 +7,6 @@ import ca.tweetzy.auctionhouse.auction.enums.AuctionSaleType;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.compatibility.XMaterial;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.gui.events.GuiClickEvent;
import ca.tweetzy.core.input.ChatPrompt;
import ca.tweetzy.core.input.PlayerChatInput;

View File

@ -6,7 +6,6 @@ import ca.tweetzy.auctionhouse.auction.AuctionStat;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.managers.AuctionStatManager;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import org.bukkit.entity.Player;
import java.util.HashMap;

View File

@ -1,7 +1,6 @@
package ca.tweetzy.auctionhouse.guis.admin;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.api.events.AuctionAdminEvent;
import ca.tweetzy.auctionhouse.auction.AuctionAdminLog;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
@ -11,7 +10,6 @@ import ca.tweetzy.auctionhouse.guis.AbstractPlaceholderGui;
import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.PlayerUtils;
import ca.tweetzy.core.utils.TextUtils;
import org.bukkit.Bukkit;

View File

@ -8,7 +8,6 @@ import ca.tweetzy.auctionhouse.auction.AuctionedItem;
import ca.tweetzy.auctionhouse.guis.AbstractPlaceholderGui;
import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.hooks.EconomyManager;
import ca.tweetzy.core.utils.TextUtils;
import ca.tweetzy.core.utils.items.TItemBuilder;

View File

@ -2,12 +2,11 @@ package ca.tweetzy.auctionhouse.guis.confirmation;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.auction.enums.AuctionStackType;
import ca.tweetzy.auctionhouse.auction.AuctionedItem;
import ca.tweetzy.auctionhouse.auction.enums.AuctionStackType;
import ca.tweetzy.auctionhouse.guis.AbstractPlaceholderGui;
import ca.tweetzy.auctionhouse.guis.GUIActiveAuctions;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.TextUtils;
import ca.tweetzy.core.utils.items.TItemBuilder;
import org.bukkit.event.inventory.ClickType;

View File

@ -4,7 +4,6 @@ import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.guis.AbstractPlaceholderGui;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.compatibility.CompatibleHand;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.PlayerUtils;
import ca.tweetzy.core.utils.TextUtils;
import ca.tweetzy.core.utils.items.TItemBuilder;

View File

@ -2,13 +2,12 @@ package ca.tweetzy.auctionhouse.guis.filter;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.enums.AuctionItemCategory;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.auction.enums.AuctionItemCategory;
import ca.tweetzy.auctionhouse.guis.AbstractPlaceholderGui;
import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.gui.GuiUtils;
import ca.tweetzy.core.input.ChatPrompt;
import ca.tweetzy.core.utils.TextUtils;

View File

@ -8,7 +8,6 @@ import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.auctionhouse.transaction.Transaction;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.TextUtils;
import ca.tweetzy.core.utils.items.TItemBuilder;
import org.bukkit.Bukkit;
@ -70,7 +69,7 @@ public class GUITransactionList extends AbstractPlaceholderGui {
List<Transaction> data = this.transactions.stream().sorted(Comparator.comparingLong(Transaction::getTransactionTime).reversed()).skip((page - 1) * 45L).limit(45).collect(Collectors.toList());
for (Transaction transaction : data) {
final ItemStack item = transaction.getItem().clone();
final ItemStack item = transaction.getItem().clone();
setButton(slot++, ConfigurationItemHelper.createConfigurationItem(item, Settings.GUI_TRANSACTIONS_ITEM_TRANSACTION_NAME.getString(), Settings.GUI_TRANSACTIONS_ITEM_TRANSACTION_LORE.getStringList(), new HashMap<String, Object>() {{
put("%transaction_id%", transaction.getId().toString());
put("%seller%", Bukkit.getOfflinePlayer(transaction.getSeller()).getName());

View File

@ -7,7 +7,6 @@ import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.auctionhouse.transaction.Transaction;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.input.PlayerChatInput;
import ca.tweetzy.core.utils.NumberUtils;
import ca.tweetzy.core.utils.TextUtils;

View File

@ -8,7 +8,6 @@ import ca.tweetzy.auctionhouse.guis.AbstractPlaceholderGui;
import ca.tweetzy.auctionhouse.helpers.ConfigurationItemHelper;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.auctionhouse.transaction.Transaction;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.gui.GuiUtils;
import ca.tweetzy.core.utils.TextUtils;
import org.bukkit.Bukkit;

View File

@ -10,7 +10,6 @@ import ca.tweetzy.auctionhouse.auction.AuctionStat;
import ca.tweetzy.auctionhouse.auction.enums.AuctionSaleType;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.auctionhouse.transaction.Transaction;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

View File

@ -1,10 +1,7 @@
package ca.tweetzy.auctionhouse.listeners;
import ca.tweetzy.core.utils.nms.NBTEditor;
import com.Zrips.CMI.CMI;
import com.Zrips.CMI.Modules.CmiItems.CMIItemStack;
import com.Zrips.CMI.events.CMIAnvilItemRepairEvent;
import com.Zrips.CMI.utils.CMINBTListType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;

View File

@ -1,6 +1,5 @@
package ca.tweetzy.auctionhouse.listeners;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
/**

View File

@ -4,7 +4,6 @@ import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.auction.AuctionStat;
import lombok.Getter;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

View File

@ -1,7 +1,6 @@
package ca.tweetzy.auctionhouse.managers;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.MinItemPrice;
import org.bukkit.inventory.ItemStack;

View File

@ -151,7 +151,7 @@ public class TickAuctionsTask extends BukkitRunnable {
// handle full inventory
if (auctionWinner.getPlayer().getInventory().firstEmpty() == -1) {
if (Settings.ALLOW_PURCHASE_IF_INVENTORY_FULL.getBoolean() ) {
if (Settings.ALLOW_PURCHASE_IF_INVENTORY_FULL.getBoolean()) {
if (Settings.SYNCHRONIZE_ITEM_ADD.getBoolean())
AuctionHouse.newChain().sync(() -> PlayerUtils.giveItem(auctionWinner.getPlayer(), itemStack)).execute();
else