mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-12 10:24:29 +01:00
Update java docs
This commit is contained in:
parent
cbda4e02a2
commit
eae9691961
@ -9,6 +9,16 @@ import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/28/2023
|
||||
* Time: 1:25 AM
|
||||
* Last Edited: 2/28/2023 @ 3:13 AM
|
||||
*
|
||||
* Description: The java plugin instance of our plugin where we handle post world startup tasks.
|
||||
*/
|
||||
public class CrazyAuctions extends JavaPlugin {
|
||||
|
||||
private static CrazyAuctions plugin;
|
||||
|
@ -8,6 +8,16 @@ import org.eclipse.aether.graph.Dependency;
|
||||
import org.eclipse.aether.repository.RemoteRepository;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/28/2023
|
||||
* Time: 1:25 AM
|
||||
* Last Edited: 2/28/2023 @ 3:13 AM
|
||||
*
|
||||
* Description: The class path resolver where we download dependencies at run-time
|
||||
*/
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public class CrazyLoader implements PluginLoader {
|
||||
|
||||
|
@ -15,6 +15,16 @@ import us.crazycrew.crazycore.paper.player.PaperPlayerRegistry;
|
||||
import java.io.File;
|
||||
import java.util.logging.LogManager;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/28/2023
|
||||
* Time: 1:25 AM
|
||||
* Last Edited: 2/28/2023 @ 3:13 AM
|
||||
*
|
||||
* Description: The starter class that thanks to paper is run directly at server startup and allows us to pass variables through the plugin class.
|
||||
*/
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public class Starter implements PluginBootstrap {
|
||||
|
||||
|
@ -9,5 +9,4 @@ public class CrazyManager {
|
||||
public void load() {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,15 @@
|
||||
package us.crazycrew.crazyauctions.api.auctionhouse.enums;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Defines the auction type to use
|
||||
*/
|
||||
public enum AuctionType {
|
||||
|
||||
BID("Bid"),
|
||||
|
@ -2,9 +2,18 @@ package us.crazycrew.crazyauctions.api.auctionhouse.interfaces;
|
||||
|
||||
import us.crazycrew.crazyauctions.api.auctionhouse.enums.AuctionType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/19/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Defines the auction type to use
|
||||
*/
|
||||
public interface AuctionItem {
|
||||
|
||||
UUID auctionID = UUID.randomUUID();
|
||||
|
@ -4,6 +4,16 @@ import us.crazycrew.crazyauctions.utils.ItemUtils;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import us.crazycrew.crazycore.paper.items.ItemBuilder;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/19/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Creates the auction buttons
|
||||
*/
|
||||
public class AuctionButtons {
|
||||
|
||||
private final ItemBuilder sellingItemsButton;
|
||||
|
@ -4,6 +4,16 @@ import org.bukkit.Material;
|
||||
import us.crazycrew.crazycore.paper.items.ItemBuilder;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/19/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Creates the auction categories
|
||||
*/
|
||||
public class AuctionCategory {
|
||||
|
||||
private String name;
|
||||
|
@ -14,6 +14,16 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/19/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Creates the main auction house menu
|
||||
*/
|
||||
public class AuctionHouse {
|
||||
|
||||
private String name;
|
||||
|
@ -2,6 +2,16 @@ package us.crazycrew.crazyauctions.api.auctionhouse.objects;
|
||||
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/19/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Creates the auction house inventory settings
|
||||
*/
|
||||
public class InventorySettings {
|
||||
|
||||
private final String title;
|
||||
|
@ -3,9 +3,18 @@ package us.crazycrew.crazyauctions.api.auctionhouse.objects.auctiontype;
|
||||
import us.crazycrew.crazyauctions.api.auctionhouse.enums.AuctionType;
|
||||
import us.crazycrew.crazyauctions.api.auctionhouse.interfaces.AuctionItem;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/19/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Creates the bidding auction type
|
||||
*/
|
||||
public class BiddingAuction implements AuctionItem {
|
||||
|
||||
AuctionType auctionType = AuctionType.BID;
|
||||
|
@ -6,6 +6,16 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/19/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Creates the selling auction type
|
||||
*/
|
||||
public class SellingAuction implements AuctionItem {
|
||||
|
||||
AuctionType auctionType = AuctionType.SELL;
|
||||
|
@ -1,5 +1,15 @@
|
||||
package us.crazycrew.crazyauctions.api.economy;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: This event is fired when an item is added to an auction house.
|
||||
*/
|
||||
public enum Currency {
|
||||
|
||||
VAULT("Vault"),
|
||||
|
@ -5,8 +5,20 @@ import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Defines what currency to use.
|
||||
*/
|
||||
public class CurrencyAPI {
|
||||
|
||||
// TODO() Add item support as a currency.
|
||||
|
||||
private final CrazyAuctions plugin = CrazyAuctions.getPlugin();
|
||||
|
||||
/**
|
||||
|
@ -4,6 +4,16 @@ import us.crazycrew.crazyauctions.CrazyAuctions;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Vault support related code.
|
||||
*/
|
||||
public class VaultSupport {
|
||||
|
||||
private final CrazyAuctions plugin = CrazyAuctions.getPlugin();
|
||||
|
@ -1,14 +1,22 @@
|
||||
package us.crazycrew.crazyauctions.api.enums;
|
||||
|
||||
import us.crazycrew.crazyauctions.CrazyAuctions;
|
||||
import us.crazycrew.crazyauctions.api.economy.vault.VaultSupport;
|
||||
import us.crazycrew.crazyauctions.utils.utilities.misc.ColorUtils;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Handles all our plugin support.
|
||||
*/
|
||||
public class PluginSupport {
|
||||
|
||||
private final CrazyAuctions plugin = CrazyAuctions.getPlugin();
|
||||
|
@ -11,11 +11,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* @author Ryder Belserion
|
||||
*
|
||||
* This event is fired when a item is added to a auction house.
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: This event is fired when an item is added to an auction house.
|
||||
*/
|
||||
public class AuctionAddEvent extends Event {
|
||||
|
||||
|
@ -9,11 +9,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* @author Ryder Belserion
|
||||
*
|
||||
* This event is fired when a player bids on an auction.
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: This event is fired when a player bids on an auction.
|
||||
*/
|
||||
public class AuctionBidEvent extends Event {
|
||||
|
||||
|
@ -10,11 +10,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* @author Ryder Belserion
|
||||
*
|
||||
* This event is fired when a player buys an item.
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: This event is fired when a player buys an item.
|
||||
*/
|
||||
public class AuctionBuyEvent extends Event {
|
||||
|
||||
|
@ -10,11 +10,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* @author Ryder Belserion
|
||||
*
|
||||
* This event is fired when an auction is cancelled.
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: This event is fired when an auction is cancelled.
|
||||
*/
|
||||
public class AuctionCancelEvent extends Event {
|
||||
|
||||
|
@ -9,11 +9,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* @author Ryder Belserion
|
||||
*
|
||||
* This event is fired when an auction expires.
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: This event is fired when an auction expires.
|
||||
*/
|
||||
public class AuctionExpireEvent extends Event {
|
||||
|
||||
|
@ -10,11 +10,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* @author Ryder Belserion
|
||||
*
|
||||
* This event is fired when a player bids on an auction.
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: This event is fired when a player lists an item.
|
||||
*/
|
||||
public class AuctionListEvent extends Event {
|
||||
|
||||
|
@ -10,11 +10,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* @author Ryder Belserion
|
||||
*
|
||||
* This event is fired when an auction has a winner.
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: This event is fired when an auction has a winner.
|
||||
*/
|
||||
public class AuctionWinEvent extends Event {
|
||||
|
||||
|
@ -8,6 +8,16 @@ import us.crazycrew.crazyauctions.data.UserCache;
|
||||
import java.nio.file.Path;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/28/2023
|
||||
* Time: 3:04 AM
|
||||
* Last Edited: 2/28/2023 @ 3:11 AM
|
||||
*
|
||||
* Description: Handles player data for auctions.
|
||||
*/
|
||||
public class StorageManager implements Universal, UserCache {
|
||||
|
||||
/**
|
||||
|
@ -6,6 +6,16 @@ import us.crazycrew.crazycore.files.FileExtension;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Date: 2/28/2023
|
||||
* Time: 2:28 AM
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: The default data type for CrazyAuctions.
|
||||
*/
|
||||
public class PlayerData extends FileExtension implements Universal {
|
||||
|
||||
@Expose
|
||||
|
@ -8,6 +8,15 @@ import us.crazycrew.crazycore.CrazyCore;
|
||||
import us.crazycrew.crazycore.CrazyLogger;
|
||||
import java.nio.file.Path;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Date: 2/28/2023
|
||||
* Time: 1:26 AM
|
||||
*
|
||||
* Description: Migrate old values to new values.
|
||||
*/
|
||||
public class PluginMigrationService extends PlainMigrationService {
|
||||
|
||||
@Override
|
||||
|
@ -1,10 +1,17 @@
|
||||
package us.crazycrew.crazyauctions.utils;
|
||||
|
||||
import us.crazycrew.crazyauctions.api.enums.ServerVersion;
|
||||
import org.bukkit.Material;
|
||||
import us.crazycrew.crazycore.paper.items.ItemBuilder;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Item utilities.
|
||||
*/
|
||||
public class ItemUtils {
|
||||
|
||||
/**
|
||||
|
@ -1,12 +1,21 @@
|
||||
package us.crazycrew.crazyauctions.utils.utilities.misc;
|
||||
|
||||
import us.crazycrew.crazyauctions.api.enums.ServerVersion;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Color utilities.
|
||||
*/
|
||||
public class ColorUtils {
|
||||
private static final Pattern HEX_PATTERN = Pattern.compile("#[a-fA-F\\d]{6}");
|
||||
|
||||
|
@ -1,5 +1,15 @@
|
||||
package us.crazycrew.crazyauctions.utils.utilities.misc;
|
||||
|
||||
/**
|
||||
* @author RyderBelserion
|
||||
* @author BadBones69
|
||||
*
|
||||
* Created: 2/18/2023
|
||||
* Time: Unknown
|
||||
* Last Edited: 2/28/2023 @ 3:04 AM
|
||||
*
|
||||
* Description: Number utilities.
|
||||
*/
|
||||
public class NumberUtils {
|
||||
|
||||
public static boolean isInt(String value) {
|
||||
|
Loading…
Reference in New Issue
Block a user