Update java docs

This commit is contained in:
Ryder Belserion 2023-02-28 03:15:41 -05:00
parent cbda4e02a2
commit eae9691961
No known key found for this signature in database
GPG Key ID: 8FC2E6C54BBF05FE
29 changed files with 253 additions and 30 deletions

View File

@ -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;

View File

@ -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 {

View File

@ -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 {

View File

@ -9,5 +9,4 @@ public class CrazyManager {
public void load() {
}
}

View File

@ -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"),

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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"),

View File

@ -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();
/**

View File

@ -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();

View File

@ -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();

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {
/**

View File

@ -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

View File

@ -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

View File

@ -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 {
/**

View File

@ -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}");

View File

@ -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) {