diff --git a/api/src/main/java/net/impactdev/gts/api/GTSService.java b/api/src/main/java/net/impactdev/gts/api/GTSService.java index e4609ebc..cb9feea6 100644 --- a/api/src/main/java/net/impactdev/gts/api/GTSService.java +++ b/api/src/main/java/net/impactdev/gts/api/GTSService.java @@ -1,86 +1,86 @@ -package net.impactdev.gts.api; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb; -import com.google.common.collect.ImmutableList; -import net.impactdev.gts.api.data.registry.GTSComponentManager; -import net.impactdev.gts.api.data.translators.DataTranslatorManager; -import net.impactdev.gts.api.extension.Extension; -import net.impactdev.gts.api.maintenance.MaintenanceManager; -import net.impactdev.gts.api.messaging.message.errors.ErrorCode; -import net.impactdev.gts.api.player.PlayerSettingsManager; -import net.impactdev.gts.api.searching.Searcher; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.BbbbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbb.BBBBbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbbbbb.BbbbBbbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb.BbbbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbbbb.BbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.BbbbbbBbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbb; -import java.util.List; +bbbbbb bbbb.bbbb.Bbbb; -public interface GTSService { +bbbbbb bbbbbbbbb BBBBbbbbbb { - static GTSService getInstance() { - return GTSServiceProvider.get(); + bbbbbb BBBBbbbbbb bbbBbbbbbbb() { + bbbbbb BBBBbbbbbbBbbbbbbb.bbb(); } /** - * Returns an unmodifiable list of extensions currently hooked and running with GTS + * Bbbbbbb bb bbbbbbbbbbbb bbbb bb bbbbbbbbbb bbbbbbbbb bbbbbb bbb bbbbbbb bbbb BBB * - * @return An immutable list of all loaded extensions hooked to GTS + * @bbbbbb Bb bbbbbbbbb bbbb bb bbb bbbbbb bbbbbbbbbb bbbbbb bb BBB */ - ImmutableList getAllExtensions(); + BbbbbbbbbBbbb bbbBbbBbbbbbbbbb(); /** - * Represents the general component manager for the key parts of GTS (Listings, Entry Types, and Prices). - * This is where you can register your own custom types of data + * Bbbbbbbbbb bbb bbbbbbb bbbbbbbbb bbbbbbb bbb bbb bbb bbbbb bb BBB (Bbbbbbbb, Bbbbb Bbbbb, bbb Bbbbbb). + * Bbbb bb bbbbb bbb bbb bbbbbbbb bbbb bbb bbbbbb bbbbb bb bbbb * - * @return The component manager responsible for managing the types of Listings, - * Entries, and Prices GTS can manipulate. + * @bbbbbb Bbb bbbbbbbbb bbbbbbb bbbbbbbbbbb bbb bbbbbbbb bbb bbbbb bb Bbbbbbbb, + * Bbbbbbb, bbb Bbbbbb BBB bbb bbbbbbbbbb. */ - GTSComponentManager getGTSComponentManager(); + BBBBbbbbbbbbBbbbbbb bbbBBBBbbbbbbbbBbbbbbb(); /** - * Represents the location of all user-specific player settings. + * Bbbbbbbbbb bbb bbbbbbbb bb bbb bbbb-bbbbbbbb bbbbbb bbbbbbbb. * - * @return A mapping manager of all individual player settings + * @bbbbbb B bbbbbbb bbbbbbb bb bbb bbbbbbbbbb bbbbbb bbbbbbbb */ - PlayerSettingsManager getPlayerSettingsManager(); + BbbbbbBbbbbbbbBbbbbbb bbbBbbbbbBbbbbbbbBbbbbbb(); /** - * Specifies settings stating if the plugin itself is in maintenance mode, or a specific feature is disabled. + * Bbbbbbbbb bbbbbbbb bbbbbbb bb bbb bbbbbb bbbbbb bb bb bbbbbbbbbbb bbbb, bb b bbbbbbbb bbbbbbb bb bbbbbbbb. * - *

Users can use these settings to ultimately disable an entire feature of GTS, should they believe a bug - * has been found or even other reasons.

+ * Bbbbb bbb bbb bbbbb bbbbbbbb bb bbbbbbbbbb bbbbbbb bb bbbbbb bbbbbbb bb BBB, bbbbbb bbbb bbbbbbb b bbb + * bbb bbbb bbbbb bb bbbb bbbbb bbbbbbb. * - * @return The manager controlling settings regarding GTS maintenance status states + * @bbbbbb Bbb bbbbbbb bbbbbbbbbbb bbbbbbbb bbbbbbbbb BBB bbbbbbbbbbb bbbbbb bbbbbb */ - MaintenanceManager getMaintenanceManager(); + BbbbbbbbbbbBbbbbbb bbbBbbbbbbbbbbBbbbbbb(); - DataTranslatorManager getDataTranslatorManager(); + BbbbBbbbbbbbbbBbbbbbb bbbBbbbBbbbbbbbbbBbbbbbb(); /** - * Registers a searching option for all listings in the listing manager. + * Bbbbbbbbb b bbbbbbbbb bbbbbb bbb bbb bbbbbbbb bb bbb bbbbbbb bbbbbbb. * - * @param searcher The searcher + * @bbbbb bbbbbbbb Bbb bbbbbbbb */ - void addSearcher(Searcher searcher); + bbbb bbbBbbbbbbb(Bbbbbbbb bbbbbbbb); /** - * The set of registered searchers that a user can use to find listings matching their query. + * Bbb bbb bb bbbbbbbbbb bbbbbbbbb bbbb b bbbb bbb bbb bb bbbb bbbbbbbb bbbbbbbb bbbbb bbbbb. * - * @return Every registered searcher + * @bbbbbb Bbbbb bbbbbbbbbb bbbbbbbb */ - List getSearchers(); + Bbbb bbbBbbbbbbbb(); /** - * Indicates whether or not the plugin has been set into safe mode. Safe mode is triggered when the - * server environment is in a detectable bad state. This will indicate that all primary functions of GTS - * should no longer operate. + * Bbbbbbbbb bbbbbbb bb bbb bbb bbbbbb bbb bbbb bbb bbbb bbbb bbbb. Bbbb bbbb bb bbbbbbbbb bbbb bbb + * bbbbbb bbbbbbbbbbb bb bb b bbbbbbbbbb bbb bbbbb. Bbbb bbbb bbbbbbbb bbbb bbb bbbbbbb bbbbbbbbb bb BBB + * bbbbbb bb bbbbbb bbbbbbb. * - * @return True if the plugin is in safe mode, false otherwise + * @bbbbbb Bbbb bb bbb bbbbbb bb bb bbbb bbbb, bbbbb bbbbbbbbb */ - boolean isInSafeMode(); + bbbbbbb bbBbBbbbBbbb(); /** - * Represents the error code for the triggering of safe mode. This is primarily only useful for - * a user to be able to decipher what caused the problem with plugin startup. + * Bbbbbbbbbb bbb bbbbb bbbb bbb bbb bbbbbbbbbb bb bbbb bbbb. Bbbb bb bbbbbbbbb bbbb bbbbbb bbb + * b bbbb bb bb bbbb bb bbbbbbbb bbbb bbbbbb bbb bbbbbbb bbbb bbbbbb bbbbbbb. * - * @return The error code that caused safe mode to be triggered. + * @bbbbbb Bbb bbbbb bbbb bbbb bbbbbb bbbb bbbb bb bb bbbbbbbbb. */ - ErrorCode getSafeModeReason(); + BbbbbBbbb bbbBbbbBbbbBbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/GTSServiceProvider.java b/api/src/main/java/net/impactdev/gts/api/GTSServiceProvider.java index 9189e3a3..cb4a4a5b 100644 --- a/api/src/main/java/net/impactdev/gts/api/GTSServiceProvider.java +++ b/api/src/main/java/net/impactdev/gts/api/GTSServiceProvider.java @@ -1,28 +1,28 @@ -package net.impactdev.gts.api; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; -public final class GTSServiceProvider { +bbbbbb bbbbb bbbbb BBBBbbbbbbBbbbbbbb { - private static GTSService instance; + bbbbbbb bbbbbb BBBBbbbbbb bbbbbbbb; - public static @NonNull GTSService get() { - if(instance == null) { - throw new IllegalStateException("The GTS API is not loaded"); + bbbbbb bbbbbb @BbbBbbb BBBBbbbbbb bbb() { + bb(bbbbbbbb == bbbb) { + bbbbb bbb BbbbbbbBbbbbBbbbbbbbb("Bbb BBB BBB bb bbb bbbbbb"); } - return instance; + bbbbbb bbbbbbbb; } - static void register(GTSService service) { - instance = service; + bbbbbb bbbb bbbbbbbb(BBBBbbbbbb bbbbbbb) { + bbbbbbbb = bbbbbbb; } - static void unregister() { - instance = null; + bbbbbb bbbb bbbbbbbbbb() { + bbbbbbbb = bbbb; } - private GTSServiceProvider() { - throw new UnsupportedOperationException("This class cannot be instantiated"); + bbbbbbb BBBBbbbbbbBbbbbbbb() { + bbbbb bbb BbbbbbbbbbbBbbbbbbbbBbbbbbbbb("Bbbb bbbbb bbbbbb bb bbbbbbbbbbbb"); } } diff --git a/api/src/main/java/net/impactdev/gts/api/blacklist/Blacklist.java b/api/src/main/java/net/impactdev/gts/api/blacklist/Blacklist.java index 474de700..f41d3bc6 100644 --- a/api/src/main/java/net/impactdev/gts/api/blacklist/Blacklist.java +++ b/api/src/main/java/net/impactdev/gts/api/blacklist/Blacklist.java @@ -1,15 +1,15 @@ -package net.impactdev.gts.api.blacklist; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb; -import com.google.common.collect.Multimap; -import net.kyori.adventure.key.Key; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbb.Bbb; -public interface Blacklist { +bbbbbb bbbbbbbbb Bbbbbbbbb { - Multimap, String> getBlacklist(); + Bbbbbbbb, Bbbbbb> bbbBbbbbbbbb(); - void append(Class registrar, String key); + bbbb bbbbbb(Bbbbb bbbbbbbbb, Bbbbbb bbb); - boolean isBlacklisted(Class registrar, String query); + bbbbbbb bbBbbbbbbbbbb(Bbbbb bbbbbbbbb, Bbbbbb bbbbb); - void clear(); + bbbb bbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/commands/CommandGenerator.java b/api/src/main/java/net/impactdev/gts/api/commands/CommandGenerator.java index ca3134b2..ee208920 100644 --- a/api/src/main/java/net/impactdev/gts/api/commands/CommandGenerator.java +++ b/api/src/main/java/net/impactdev/gts/api/commands/CommandGenerator.java @@ -1,182 +1,182 @@ -package net.impactdev.gts.api.commands; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.gts.api.listings.entries.Entry; -import net.impactdev.gts.api.listings.prices.Price; -import net.impactdev.gts.api.listings.ui.EntrySelection; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bb.BbbbbBbbbbbbbb; -import java.util.Optional; -import java.util.Queue; -import java.util.UUID; -import java.util.function.Function; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.Bbbbb; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbb.Bbbbbbbb; /** - * This is a special executor, to be attached to the commands of sell and auction, where the components - * don't return a command result, but rather an entry or a price. This is determined by the sub-interface - * of this executor. + * Bbbb bb b bbbbbbb bbbbbbbb, bb bb bbbbbbbb bb bbb bbbbbbbb bb bbbb bbb bbbbbbb, bbbbb bbb bbbbbbbbbb + * bbb'b bbbbbb b bbbbbbb bbbbbb, bbb bbbbbb bb bbbbb bb b bbbbb. Bbbb bb bbbbbbbbbb bb bbb bbb-bbbbbbbbb + * bb bbbb bbbbbbbb. */ -public interface CommandGenerator { +bbbbbb bbbbbbbbb BbbbbbbBbbbbbbbb { /** - * Represents the access codes for the generator. These are what a user must type on the command - * line in order to access the generator. + * Bbbbbbbbbb bbb bbbbbb bbbbb bbb bbb bbbbbbbbb. Bbbbb bbb bbbb b bbbb bbbb bbbb bb bbb bbbbbbb + * bbbb bb bbbbb bb bbbbbb bbb bbbbbbbbb. * - * @return An array of string aliases + * @bbbbbb Bb bbbbb bb bbbbbb bbbbbbb */ - String[] getAliases(); + Bbbbbb[] bbbBbbbbbb(); /** - * Parses the command line to create the type represented by this generator. The system provides - * the source casting the command through their UUID, the argument string represented by a queue, - * and additional context that might be needed for a redirection if necessary. Redirection - * should only be necessary if the argument string cannot supply the argument correctly. Typical - * design would have it such that redirection only occurs if the arguments are empty at the time of - * invoking. + * Bbbbbb bbb bbbbbbb bbbb bb bbbbbb bbb bbbb bbbbbbbbbbb bb bbbb bbbbbbbbb. Bbb bbbbbb bbbbbbbb + * bbb bbbbbb bbbbbbb bbb bbbbbbb bbbbbbb bbbbb BBBB, bbb bbbbbbbb bbbbbb bbbbbbbbbbb bb b bbbbb, + * bbb bbbbbbbbbb bbbbbbb bbbb bbbbb bb bbbbbb bbb b bbbbbbbbbbb bb bbbbbbbbb. Bbbbbbbbbbb + * bbbbbb bbbb bb bbbbbbbbb bb bbb bbbbbbbb bbbbbb bbbbbb bbbbbb bbb bbbbbbbb bbbbbbbbb. Bbbbbbb + * bbbbbb bbbbb bbbb bb bbbb bbbb bbbbbbbbbbb bbbb bbbbbb bb bbb bbbbbbbbb bbb bbbbb bb bbb bbbb bb + * bbbbbbbb. * - * If redirection is necessary, you need to invoke {@link Context#redirected()} to allow the command - * executor to understand that redirection has occurred. + * Bb bbbbbbbbbbb bb bbbbbbbbb, bbb bbbb bb bbbbbb {@bbbb Bbbbbbb#bbbbbbbbbb()} bb bbbbb bbb bbbbbbb + * bbbbbbbb bb bbbbbbbbbb bbbb bbbbbbbbbbb bbb bbbbbbbb. * - * @param source The source that is casting the command - * @param args The arguments still remaining on the argument queue - * @param context Contextual information already filled by other components of the command - * @return The object created by parsing the command line, or null if redirected. - * @throws Exception If any component of the argument string should result in a command parsing exception + * @bbbbb bbbbbb Bbb bbbbbb bbbb bb bbbbbbb bbb bbbbbbb + * @bbbbb bbbb Bbb bbbbbbbbb bbbbb bbbbbbbbb bb bbb bbbbbbbb bbbbb + * @bbbbb bbbbbbb Bbbbbbbbbb bbbbbbbbbbb bbbbbbb bbbbbb bb bbbbb bbbbbbbbbb bb bbb bbbbbbb + * @bbbbbb Bbb bbbbbb bbbbbbb bb bbbbbbb bbb bbbbbbb bbbb, bb bbbb bb bbbbbbbbbb. + * @bbbbbb Bbbbbbbbb Bb bbb bbbbbbbbb bb bbb bbbbbbbb bbbbbb bbbbbb bbbbbb bb b bbbbbbb bbbbbbb bbbbbbbbb */ - T create(UUID source, Queue args, Context context) throws Exception; + B bbbbbb(BBBB bbbbbb, Bbbbb bbbb, Bbbbbbb bbbbbbb) bbbbbb Bbbbbbbbb; /** - * Attempts to locate the next argument on the queue, and attempts to parse it using the translator - * if available. Otherwise, if no argument is available, returns an empty optional. + * Bbbbbbbb bb bbbbbb bbb bbbb bbbbbbbb bb bbb bbbbb, bbb bbbbbbbb bb bbbbb bb bbbbb bbb bbbbbbbbbb + * bb bbbbbbbbb. Bbbbbbbbb, bb bb bbbbbbbb bb bbbbbbbbb, bbbbbbb bb bbbbb bbbbbbbb. * - * @param args The queue of arguments remaining on the command tree - * @param translator The translator that will be used to parse the next argument if available - * @param The type the translator will attempt to decode the argument into - * @return An optional wrapping the translated argument, or empty + * @bbbbb bbbb Bbb bbbbb bb bbbbbbbbb bbbbbbbbb bb bbb bbbbbbb bbbb + * @bbbbb bbbbbbbbbb Bbb bbbbbbbbbb bbbb bbbb bb bbbb bb bbbbb bbb bbbb bbbbbbbb bb bbbbbbbbb + * @bbbbb Bbb bbbb bbb bbbbbbbbbb bbbb bbbbbbb bb bbbbbb bbb bbbbbbbb bbbb + * @bbbbbb Bb bbbbbbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbb, bb bbbbb */ - default Optional next(Queue args, Function translator) { - if(!args.isEmpty()) { - return Optional.of(translator.apply(args.poll())); + bbbbbbb Bbbbbbbb bbbb(Bbbbb bbbb, Bbbbbbbb bbbbbbbbbb) { + bb(!bbbb.bbBbbbb()) { + bbbbbb Bbbbbbbb.bb(bbbbbbbbbb.bbbbb(bbbb.bbbb())); } - return Optional.empty(); + bbbbbb Bbbbbbbb.bbbbb(); } /** - * Attempts to construct a translated argument, with the condition that an argument should be available - * in the queue to translate from. If none are available, an exception will be raised to indicate the - * failure of the requirement. + * Bbbbbbbb bb bbbbbbbbb b bbbbbbbbbb bbbbbbbb, bbbb bbb bbbbbbbbb bbbb bb bbbbbbbb bbbbbb bb bbbbbbbbb + * bb bbb bbbbb bb bbbbbbbbb bbbb. Bb bbbb bbb bbbbbbbbb, bb bbbbbbbbb bbbb bb bbbbbb bb bbbbbbbb bbb + * bbbbbbb bb bbb bbbbbbbbbbb. * - * @param args The queue of arguments remaining on the command context - * @param translator The translator to convert from raw input to the desired type - * @param The type to create - * @return A type representing the translation via the argument requirement - * @throws IllegalStateException If no arguments are available in the queue + * @bbbbb bbbb Bbb bbbbb bb bbbbbbbbb bbbbbbbbb bb bbb bbbbbbb bbbbbbb + * @bbbbb bbbbbbbbbb Bbb bbbbbbbbbb bb bbbbbbb bbbb bbb bbbbb bb bbb bbbbbbb bbbb + * @bbbbb Bbb bbbb bb bbbbbb + * @bbbbbb B bbbb bbbbbbbbbbbb bbb bbbbbbbbbbb bbb bbb bbbbbbbb bbbbbbbbbbb + * @bbbbbb BbbbbbbBbbbbBbbbbbbbb Bb bb bbbbbbbbb bbb bbbbbbbbb bb bbb bbbbb */ - default E require(Queue args, Function translator) throws IllegalStateException { - return this.next(args, translator).orElseThrow(() -> new IllegalStateException("No available arguments")); + bbbbbbb B bbbbbbb(Bbbbb bbbb, Bbbbbbbb bbbbbbbbbb) bbbbbb BbbbbbbBbbbbBbbbbbbbb { + bbbbbb bbbb.bbbb(bbbb, bbbbbbbbbb).bbBbbbBbbbb(() -> bbb BbbbbbbBbbbbBbbbbbbbb("Bb bbbbbbbbb bbbbbbbbb")); } - interface EntryGenerator>> extends CommandGenerator { } + bbbbbbbbb BbbbbBbbbbbbbb>> bbbbbbb BbbbbbbBbbbbbbbb { } - interface PriceGenerator

> extends CommandGenerator

{ } + bbbbbbbbb BbbbbBbbbbbbbb> bbbbbbb BbbbbbbBbbbbbbbb { } /** - * Indicates context regarding the current command processing for /gts sell or /gts auction. + * Bbbbbbbbb bbbbbbb bbbbbbbbb bbb bbbbbbb bbbbbbb bbbbbbbbbb bbb /bbb bbbb bb /bbb bbbbbbb. */ - interface Context { + bbbbbbbbb Bbbbbbb { /** - * Indicates the type of listing being created via this context. + * Bbbbbbbbb bbb bbbb bb bbbbbbb bbbbb bbbbbbb bbb bbbb bbbbbbb. * - * @return The type of listing being created, and how to apply it + * @bbbbbb Bbb bbbb bb bbbbbbb bbbbb bbbbbbb, bbb bbb bb bbbbb bb */ - Class type(); + Bbbbb bbbb(); /** - * Represents the entry currently assigned to the command context, if set. This will only - * be set if the command correctly parses an entry from the command line, and is not - * redirected beforehand. + * Bbbbbbbbbb bbb bbbbb bbbbbbbbb bbbbbbbb bb bbb bbbbbbb bbbbbbb, bb bbb. Bbbb bbbb bbbb + * bb bbb bb bbb bbbbbbb bbbbbbbbb bbbbbb bb bbbbb bbbb bbb bbbbbbb bbbb, bbb bb bbb + * bbbbbbbbbb bbbbbbbbbb. * - * This will never be set during entry processing of these commands. + * Bbbb bbbb bbbbb bb bbb bbbbbb bbbbb bbbbbbbbbb bb bbbbb bbbbbbbb. * - * @return The entry selection for the command context + * @bbbbbb Bbb bbbbb bbbbbbbbb bbb bbb bbbbbbb bbbbbbb */ - Optional> entry(); + Bbbbbbbb> bbbbb(); /** - * Sets the entry selection for the given context. + * Bbbb bbb bbbbb bbbbbbbbb bbb bbb bbbbb bbbbbbb. * - * @param entry The entry to set for the context + * @bbbbb bbbbb Bbb bbbbb bb bbb bbb bbb bbbbbbb */ - void entry(EntrySelection entry); + bbbb bbbbb(BbbbbBbbbbbbbb bbbbb); /** - * Specifies how long the listing will be applied for. If not set, this will default to the - * mid-range config time value. + * Bbbbbbbbb bbb bbbb bbb bbbbbbb bbbb bb bbbbbbb bbb. Bb bbb bbb, bbbb bbbb bbbbbbb bb bbb + * bbb-bbbbb bbbbbb bbbb bbbbb. * - * @return The amount of time the listing will be placed on the market for. + * @bbbbbb Bbb bbbbbb bb bbbb bbb bbbbbbb bbbb bb bbbbbb bb bbb bbbbbb bbb. */ - long time(); + bbbb bbbb(); /** - * Sets the time indicating how long the listing will stay on the market for before expiring. + * Bbbb bbb bbbb bbbbbbbbbb bbb bbbb bbb bbbbbbb bbbb bbbb bb bbb bbbbbb bbb bbbbbb bbbbbbbb. * - * @param time The time to list the listing for + * @bbbbb bbbb Bbb bbbb bb bbbb bbb bbbbbbb bbb */ - void time(long time); + bbbb bbbb(bbbb bbbb); /** - * Checks if the command has been redirected to a UI prompt for the player. This will - * happen if the user supplies a typing, but does not provide additional arguments. + * Bbbbbb bb bbb bbbbbbb bbb bbbb bbbbbbbbbb bb b BB bbbbbb bbb bbb bbbbbb. Bbbb bbbb + * bbbbbb bb bbb bbbb bbbbbbbb b bbbbbb, bbb bbbb bbb bbbbbbb bbbbbbbbbb bbbbbbbbb. * - * @return true if a prompt has been activated, false otherwise + * @bbbbbb bbbb bb b bbbbbb bbb bbbb bbbbbbbbb, bbbbb bbbbbbbbb */ - boolean redirect(); + bbbbbbb bbbbbbbb(); /** - * Sets the context to a redirected state. This allows the command processor to know of the - * redirection to avoid further processing on the command stack, and rather provide the context - * to create the necessary components for the UI. + * Bbbb bbb bbbbbbb bb b bbbbbbbbbb bbbbb. Bbbb bbbbbb bbb bbbbbbb bbbbbbbbb bb bbbb bb bbb + * bbbbbbbbbbb bb bbbbb bbbbbbb bbbbbbbbbb bb bbb bbbbbbb bbbbb, bbb bbbbbb bbbbbbb bbb bbbbbbb + * bb bbbbbb bbb bbbbbbbbb bbbbbbbbbb bbb bbb BB. */ - void redirected(); + bbbb bbbbbbbbbb(); /** - * Represents additional context for an auction based listing. + * Bbbbbbbbbb bbbbbbbbbb bbbbbbb bbb bb bbbbbbb bbbbb bbbbbbb. */ - interface AuctionContext extends Context { + bbbbbbbbb BbbbbbbBbbbbbb bbbbbbb Bbbbbbb { /** - * Indicates the starting price set for an auction via the command line. + * Bbbbbbbbb bbb bbbbbbbb bbbbb bbb bbb bb bbbbbbb bbb bbb bbbbbbb bbbb. * - * @return The starting price for an auction + * @bbbbbb Bbb bbbbbbbb bbbbb bbb bb bbbbbbb */ - double start(); + bbbbbb bbbbb(); /** - * Sets the price an auction should start at when the auction is processed entirely off the - * command line. + * Bbbb bbb bbbbb bb bbbbbbb bbbbbb bbbbb bb bbbb bbb bbbbbbb bb bbbbbbbbb bbbbbbbb bbb bbb + * bbbbbbb bbbb. * - * @param start The price to start an auction at + * @bbbbb bbbbb Bbb bbbbb bb bbbbb bb bbbbbbb bb */ - void start(double start); + bbbb bbbbb(bbbbbb bbbbb); /** - * Indicates the percentage increment subsequent bids will need to abide by in order - * to be placed. This simply acts as a minimum input and ensures the price rises in a steady - * manner, rather than outbidding by a penny. + * Bbbbbbbbb bbb bbbbbbbbbb bbbbbbbbb bbbbbbbbbb bbbb bbbb bbbb bb bbbbb bb bb bbbbb + * bb bb bbbbbb. Bbbb bbbbbb bbbb bb b bbbbbbb bbbbb bbb bbbbbbb bbb bbbbb bbbbb bb b bbbbbb + * bbbbbb, bbbbbb bbbb bbbbbbbbbb bb b bbbbb. * - * @return The percentage increment for the auction + * @bbbbbb Bbb bbbbbbbbbb bbbbbbbbb bbb bbb bbbbbbb */ - float increment(); + bbbbb bbbbbbbbb(); /** - * Sets the percentage increment that an auction will adjust following bid requirements - * by. + * Bbbb bbb bbbbbbbbbb bbbbbbbbb bbbb bb bbbbbbb bbbb bbbbbb bbbbbbbbb bbb bbbbbbbbbbbb + * bb. * - * @param increment The increment for the auction + * @bbbbb bbbbbbbbb Bbb bbbbbbbbb bbb bbb bbbbbbb */ - void increment(float increment); + bbbb bbbbbbbbb(bbbbb bbbbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/commands/CommandRegistrar.java b/api/src/main/java/net/impactdev/gts/api/commands/CommandRegistrar.java index 70f908e2..2f3749da 100644 --- a/api/src/main/java/net/impactdev/gts/api/commands/CommandRegistrar.java +++ b/api/src/main/java/net/impactdev/gts/api/commands/CommandRegistrar.java @@ -1,7 +1,7 @@ -package net.impactdev.gts.api.commands; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb; -public interface CommandRegistrar> { +bbbbbb bbbbbbbbb BbbbbbbBbbbbbbbb> { - void register(E executor); + bbbb bbbbbbbb(B bbbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/commands/GTSCommandExecutor.java b/api/src/main/java/net/impactdev/gts/api/commands/GTSCommandExecutor.java index 45bb3be5..ce0964d9 100644 --- a/api/src/main/java/net/impactdev/gts/api/commands/GTSCommandExecutor.java +++ b/api/src/main/java/net/impactdev/gts/api/commands/GTSCommandExecutor.java @@ -1,32 +1,32 @@ -package net.impactdev.gts.api.commands; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb; -import com.google.common.collect.Lists; -import net.impactdev.gts.api.commands.annotations.Alias; -import net.impactdev.gts.api.commands.annotations.Permission; -import net.impactdev.impactor.api.Impactor; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbbbbb.Bbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; -import java.util.List; +bbbbbb bbbb.bbbb.Bbbb; -public interface GTSCommandExecutor { +bbbbbb bbbbbbbbb BBBBbbbbbbBbbbbbbb { - default S register() { - return this.build(); + bbbbbbb B bbbbbbbb() { + bbbbbb bbbb.bbbbb(); } - default List aliases() { - return Lists.newArrayList(this.getClass().getAnnotation(Alias.class).value()); + bbbbbbb Bbbb bbbbbbb() { + bbbbbb Bbbbb.bbbBbbbbBbbb(bbbb.bbbBbbbb().bbbBbbbbbbbbb(Bbbbb.bbbbb).bbbbb()); } - E[] arguments(); + B[] bbbbbbbbb(); - F[] flags(); + B[] bbbbb(); - GTSCommandExecutor[] children(); + BBBBbbbbbbBbbbbbbb[] bbbbbbbb(); - S build(); + B bbbbb(); - default boolean hasNeededAnnotations() { - return this.getClass().isAnnotationPresent(Alias.class) && this.getClass().isAnnotationPresent(Permission.class); + bbbbbbb bbbbbbb bbbBbbbbbBbbbbbbbbbb() { + bbbbbb bbbb.bbbBbbbb().bbBbbbbbbbbbBbbbbbb(Bbbbb.bbbbb) && bbbb.bbbBbbbb().bbBbbbbbbbbbBbbbbbb(Bbbbbbbbbb.bbbbb); } } diff --git a/api/src/main/java/net/impactdev/gts/api/commands/annotations/Alias.java b/api/src/main/java/net/impactdev/gts/api/commands/annotations/Alias.java index 9686315e..237fab87 100644 --- a/api/src/main/java/net/impactdev/gts/api/commands/annotations/Alias.java +++ b/api/src/main/java/net/impactdev/gts/api/commands/annotations/Alias.java @@ -1,12 +1,12 @@ -package net.impactdev.gts.api.commands.annotations; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbbbbb; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbBbbb; +bbbbbb bbbb.bbbb.bbbbbbbbbb.Bbbbbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbbbBbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbbbb.Bbbbbb; -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface Alias { - String[] value(); +@Bbbbbbbbb(BbbbbbbbbBbbbbb.BBBBBBB) +@Bbbbbb(BbbbbbbBbbb.BBBB) +bbbbbb @bbbbbbbbb Bbbbb { + Bbbbbb[] bbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/commands/annotations/Permission.java b/api/src/main/java/net/impactdev/gts/api/commands/annotations/Permission.java index 5e9c2b99..87e59260 100644 --- a/api/src/main/java/net/impactdev/gts/api/commands/annotations/Permission.java +++ b/api/src/main/java/net/impactdev/gts/api/commands/annotations/Permission.java @@ -1,14 +1,14 @@ -package net.impactdev.gts.api.commands.annotations; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbbbbb; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbBbbb; +bbbbbb bbbb.bbbb.bbbbbbbbbb.Bbbbbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbbbBbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbbbb.Bbbbbb; -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface Permission { +@Bbbbbbbbb(BbbbbbbbbBbbbbb.BBBBBBB) +@Bbbbbb(BbbbbbbBbbb.BBBB) +bbbbbb @bbbbbbbbb Bbbbbbbbbb { - String value(); + Bbbbbb bbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/data/ResourceManager.java b/api/src/main/java/net/impactdev/gts/api/data/ResourceManager.java index 738f7732..eddc6fce 100644 --- a/api/src/main/java/net/impactdev/gts/api/data/ResourceManager.java +++ b/api/src/main/java/net/impactdev/gts/api/data/ResourceManager.java @@ -1,22 +1,22 @@ -package net.impactdev.gts.api.data; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb; -public interface ResourceManager { +bbbbbb bbbbbbbbb BbbbbbbbBbbbbbb { - String getName(); + Bbbbbb bbbBbbb(); /** - * Represents the item ID that'll be used to reference the associated Entry type. This is purely - * for the creation of the listing entry, + * Bbbbbbbbbb bbb bbbb BB bbbb'bb bb bbbb bb bbbbbbbbb bbb bbbbbbbbbb Bbbbb bbbb. Bbbb bb bbbbbb + * bbb bbb bbbbbbbb bb bbb bbbbbbb bbbbb, * - * @return The Minecraft Item ID that represents the item that should be used for entry creation + * @bbbbbb Bbb Bbbbbbbbb Bbbb BB bbbb bbbbbbbbbb bbb bbbb bbbb bbbbbb bb bbbb bbb bbbbb bbbbbbbb */ - String getItemID(); + Bbbbbb bbbBbbbBB(); /** - * Fetches the deserializer responsible for deserializing the resource into its desired typing. + * Bbbbbbb bbb bbbbbbbbbbbb bbbbbbbbbbb bbb bbbbbbbbbbbbb bbb bbbbbbbb bbbb bbb bbbbbbb bbbbbb. * - * @return + * @bbbbbb */ - Storable.Deserializer getDeserializer(); + Bbbbbbbb.Bbbbbbbbbbbb bbbBbbbbbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/data/Storable.java b/api/src/main/java/net/impactdev/gts/api/data/Storable.java index d570785a..b17a9cb6 100644 --- a/api/src/main/java/net/impactdev/gts/api/data/Storable.java +++ b/api/src/main/java/net/impactdev/gts/api/data/Storable.java @@ -1,26 +1,26 @@ -package net.impactdev.gts.api.data; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb; -import com.google.gson.JsonObject; -import net.impactdev.impactor.api.json.factory.JObject; +bbbbbb bbb.bbbbbb.bbbb.BbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbb.bbbbbbb.BBbbbbb; /** - * Represents an objects that can be translated to and from JSON representable data. + * Bbbbbbbbbb bb bbbbbbb bbbb bbb bb bbbbbbbbbb bb bbb bbbb BBBB bbbbbbbbbbbbb bbbb. */ -public interface Storable { +bbbbbb bbbbbbbbb Bbbbbbbb { - int getVersion(); + bbb bbbBbbbbbb(); /** - * Processes the request to serialize a GTS Entry into representable JSON data. + * Bbbbbbbbb bbb bbbbbbb bb bbbbbbbbb b BBB Bbbbb bbbb bbbbbbbbbbbbb BBBB bbbb. * - * @return A JObject that represents which represents the serialized components of the entry + * @bbbbbb B BBbbbbb bbbb bbbbbbbbbb bbbbb bbbbbbbbbb bbb bbbbbbbbbb bbbbbbbbbb bb bbb bbbbb */ - JObject serialize(); + BBbbbbb bbbbbbbbb(); - @FunctionalInterface - interface Deserializer { + @BbbbbbbbbbBbbbbbbbb + bbbbbbbbb Bbbbbbbbbbbb { - T deserialize(JsonObject object); + B bbbbbbbbbbb(BbbbBbbbbb bbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/data/registry/DeserializerRegistry.java b/api/src/main/java/net/impactdev/gts/api/data/registry/DeserializerRegistry.java index 064ca01f..a5167a5b 100644 --- a/api/src/main/java/net/impactdev/gts/api/data/registry/DeserializerRegistry.java +++ b/api/src/main/java/net/impactdev/gts/api/data/registry/DeserializerRegistry.java @@ -1,14 +1,14 @@ -package net.impactdev.gts.api.data.registry; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbb; -import com.google.gson.JsonObject; +bbbbbb bbb.bbbbbb.bbbb.BbbbBbbbbb; -import java.util.Optional; -import java.util.function.Function; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbb.Bbbbbbbb; -public interface DeserializerRegistry { +bbbbbb bbbbbbbbb BbbbbbbbbbbbBbbbbbbb { - void registerDeserializer(Class type, int version, Function deserializer); + bbbb bbbbbbbbBbbbbbbbbbbb(Bbbbb bbbb, bbb bbbbbbb, Bbbbbbbb bbbbbbbbbbbb); - Optional> getDeserializer(Class type, int version); + Bbbbbbbb> bbbBbbbbbbbbbbb(Bbbbb bbbb, bbb bbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/data/registry/GTSComponentManager.java b/api/src/main/java/net/impactdev/gts/api/data/registry/GTSComponentManager.java index 938570fa..de637ee3 100644 --- a/api/src/main/java/net/impactdev/gts/api/data/registry/GTSComponentManager.java +++ b/api/src/main/java/net/impactdev/gts/api/data/registry/GTSComponentManager.java @@ -1,54 +1,54 @@ -package net.impactdev.gts.api.data.registry; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbb; -import net.impactdev.gts.api.data.ResourceManager; -import net.impactdev.gts.api.data.Storable; -import net.impactdev.gts.api.deliveries.Delivery; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.gts.api.listings.entries.Entry; -import net.impactdev.gts.api.listings.entries.EntryManager; -import net.impactdev.gts.api.listings.prices.Price; -import net.impactdev.gts.api.listings.prices.PriceManager; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.BbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.BbbbbBbbbbbb; -import java.util.Map; -import java.util.Optional; +bbbbbb bbbb.bbbb.Bbb; +bbbbbb bbbb.bbbb.Bbbbbbbb; -public interface GTSComponentManager { +bbbbbb bbbbbbbbb BBBBbbbbbbbbBbbbbbb { - // Listings + // Bbbbbbbb - void registerListingResourceManager(Class type, ResourceManager resource); + bbbb bbbbbbbbBbbbbbbBbbbbbbbBbbbbbb(Bbbbb bbbb, BbbbbbbbBbbbbbb bbbbbbbb); - Optional> getListingResourceManager(Class type); + Bbbbbbbb> bbbBbbbbbbBbbbbbbbBbbbbbb(Bbbbb bbbb); - Map, ResourceManager> getAllListingResourceManagers(); + Bbb, BbbbbbbbBbbbbbb> bbbBbbBbbbbbbBbbbbbbbBbbbbbbb(); - // Deliveries - Storable.Deserializer getDeliveryDeserializer(); + // Bbbbbbbbbb + Bbbbbbbb.Bbbbbbbbbbbb bbbBbbbbbbbBbbbbbbbbbbb(); - // Entries + // Bbbbbbb - > void registerEntryManager(Class type, EntryManager manager); + > bbbb bbbbbbbbBbbbbBbbbbbb(Bbbbb bbbb, BbbbbBbbbbbb bbbbbbb); - > Optional> getEntryManager(String key); + > Bbbbbbbb> bbbBbbbbBbbbbbb(Bbbbbb bbb); - Map>> getAllEntryManagers(); + Bbb>> bbbBbbBbbbbBbbbbbbb(); - // Prices + // Bbbbbb - > void registerPriceManager(Class type, PriceManager resource); + > bbbb bbbbbbbbBbbbbBbbbbbb(Bbbbb bbbb, BbbbbBbbbbbb bbbbbbbb); - > Optional> getPriceManager(String key); + > Bbbbbbbb> bbbBbbbbBbbbbbb(Bbbbbb bbb); - Map>> getAllPriceManagers(); + Bbb>> bbbBbbBbbbbBbbbbbbb(); - DeserializerRegistry getDeserializerRegistry(); + BbbbbbbbbbbbBbbbbbbb bbbBbbbbbbbbbbbBbbbbbbb(); - // Legacy + // Bbbbbb - @Deprecated - > void registerLegacyEntryDeserializer(String key, Storable.Deserializer deserializer); + @Bbbbbbbbbb + > bbbb bbbbbbbbBbbbbbBbbbbBbbbbbbbbbbb(Bbbbbb bbb, Bbbbbbbb.Bbbbbbbbbbbb bbbbbbbbbbbb); - @Deprecated - > Optional> getLegacyEntryDeserializer(String key); + @Bbbbbbbbbb + > Bbbbbbbb> bbbBbbbbbBbbbbBbbbbbbbbbbb(Bbbbbb bbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/data/registry/GTSKeyMarker.java b/api/src/main/java/net/impactdev/gts/api/data/registry/GTSKeyMarker.java index e7ad1020..88176223 100644 --- a/api/src/main/java/net/impactdev/gts/api/data/registry/GTSKeyMarker.java +++ b/api/src/main/java/net/impactdev/gts/api/data/registry/GTSKeyMarker.java @@ -1,14 +1,14 @@ -package net.impactdev.gts.api.data.registry; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbb; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbBbbb; +bbbbbb bbbb.bbbb.bbbbbbbbbb.Bbbbbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbbbBbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbbbb.Bbbbbb; -@Target(ElementType.TYPE) -@Retention(RetentionPolicy.RUNTIME) -public @interface GTSKeyMarker { +@Bbbbbb(BbbbbbbBbbb.BBBB) +@Bbbbbbbbb(BbbbbbbbbBbbbbb.BBBBBBB) +bbbbbb @bbbbbbbbb BBBBbbBbbbbb { - String[] value(); + Bbbbbb[] bbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/data/translators/DataTranslator.java b/api/src/main/java/net/impactdev/gts/api/data/translators/DataTranslator.java index 919c5f75..de8bc09e 100644 --- a/api/src/main/java/net/impactdev/gts/api/data/translators/DataTranslator.java +++ b/api/src/main/java/net/impactdev/gts/api/data/translators/DataTranslator.java @@ -1,11 +1,11 @@ -package net.impactdev.gts.api.data.translators; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbbbbb; -import java.util.Optional; +bbbbbb bbbb.bbbb.Bbbbbbbb; -@FunctionalInterface -public interface DataTranslator { +@BbbbbbbbbbBbbbbbbbb +bbbbbb bbbbbbbbb BbbbBbbbbbbbbb { - Optional translate(T input); + Bbbbbbbb bbbbbbbbb(B bbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/data/translators/DataTranslatorManager.java b/api/src/main/java/net/impactdev/gts/api/data/translators/DataTranslatorManager.java index 5bb49caf..d017f2cc 100644 --- a/api/src/main/java/net/impactdev/gts/api/data/translators/DataTranslatorManager.java +++ b/api/src/main/java/net/impactdev/gts/api/data/translators/DataTranslatorManager.java @@ -1,11 +1,11 @@ -package net.impactdev.gts.api.data.translators; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbbbbb; -import java.util.Collection; +bbbbbb bbbb.bbbb.Bbbbbbbbbb; -public interface DataTranslatorManager { +bbbbbb bbbbbbbbb BbbbBbbbbbbbbbBbbbbbb { - Collection> get(Class type); + Bbbbbbbbbb> bbb(Bbbbb bbbb); - void register(Class type, DataTranslator translator); + bbbb bbbbbbbb(Bbbbb bbbb, BbbbBbbbbbbbbb bbbbbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/deliveries/Delivery.java b/api/src/main/java/net/impactdev/gts/api/deliveries/Delivery.java index f230a4e2..9912d026 100644 --- a/api/src/main/java/net/impactdev/gts/api/deliveries/Delivery.java +++ b/api/src/main/java/net/impactdev/gts/api/deliveries/Delivery.java @@ -1,83 +1,83 @@ -package net.impactdev.gts.api.deliveries; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbb; -import net.impactdev.gts.api.data.Storable; -import net.impactdev.gts.api.listings.entries.Entry; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.impactor.api.builders.Builder; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; -import java.time.LocalDateTime; -import java.util.Optional; -import java.util.UUID; +bbbbbb bbbb.bbbb.BbbbbBbbbBbbb; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BBBB; /** - * A Delivery is an instance which contains some form of contents, and is delivered straight to the recipient's - * stash. + * B Bbbbbbbb bb bb bbbbbbbb bbbbb bbbbbbbb bbbb bbbb bb bbbbbbbb, bbb bb bbbbbbbbb bbbbbbbb bb bbb bbbbbbbbb'b + * bbbbb. * - *

A delivery can also expire. Essentially, if desired, an administrator can set a delivery for - * a user to expire, such that they must claim it within X amount of time before it is cleaned - * and deleted by the background system. Otherwise, all deliveries will be set to never expire.

+ * B bbbbbbbb bbb bbbb bbbbbb. Bbbbbbbbbbb, bb bbbbbbb, bb bbbbbbbbbbbbb bbb bbb b bbbbbbbb bbb + * b bbbb bb bbbbbb, bbbb bbbb bbbb bbbb bbbbb bb bbbbbb B bbbbbb bb bbbb bbbbbb bb bb bbbbbbb + * bbb bbbbbbb bb bbb bbbbbbbbbb bbbbbb. Bbbbbbbbb, bbb bbbbbbbbbb bbbb bb bbb bb bbbbb bbbbbb. */ -public interface Delivery extends Storable { +bbbbbb bbbbbbbbb Bbbbbbbb bbbbbbb Bbbbbbbb { /** - * Represents the ID of the delivery. Primarily useful just for easy lookups and references for - * a particular delivery. + * Bbbbbbbbbb bbb BB bb bbb bbbbbbbb. Bbbbbbbbb bbbbbb bbbb bbb bbbb bbbbbbb bbb bbbbbbbbbb bbb + * b bbbbbbbbbb bbbbbbbb. * - * @return The ID of the delivery. + * @bbbbbb Bbb BB bb bbb bbbbbbbb. */ - UUID getID(); + BBBB bbbBB(); /** - * Specifies the source of the delivery. This indicates who actually gave the delivery to the recipient. + * Bbbbbbbbb bbb bbbbbb bb bbb bbbbbbbb. Bbbb bbbbbbbbb bbb bbbbbbbb bbbb bbb bbbbbbbb bb bbb bbbbbbbbb. * - * @return The uuid of the source of the delivery + * @bbbbbb Bbb bbbb bb bbb bbbbbb bb bbb bbbbbbbb */ - UUID getSource(); + BBBB bbbBbbbbb(); /** - * Specifies the recipient of the delivery. + * Bbbbbbbbb bbb bbbbbbbbb bb bbb bbbbbbbb. * - * @return The uuid of the recipient of the delivery + * @bbbbbb Bbb bbbb bb bbb bbbbbbbbb bb bbb bbbbbbbb */ - UUID getRecipient(); + BBBB bbbBbbbbbbbb(); /** - * Specifies the contents held by this delivery. This is what the recipient will actually be able to - * redeem when they open the delivery. + * Bbbbbbbbb bbb bbbbbbbb bbbb bb bbbb bbbbbbbb. Bbbb bb bbbb bbb bbbbbbbbb bbbb bbbbbbbb bb bbbb bb + * bbbbbb bbbb bbbb bbbb bbb bbbbbbbb. * - * @return The item provided by the delivery + * @bbbbbb Bbb bbbb bbbbbbbb bb bbb bbbbbbbb */ - Entry getContent(); + Bbbbb bbbBbbbbbb(); /** - * Marks the date this delivery can expire. If the delivery is not claimed by its expiration date, - * it will no longer be claimable by the recipient. + * Bbbbb bbb bbbb bbbb bbbbbbbb bbb bbbbbb. Bb bbb bbbbbbbb bb bbb bbbbbbb bb bbb bbbbbbbbbb bbbb, + * bb bbbb bb bbbbbb bb bbbbbbbbb bb bbb bbbbbbbbb. * - * @return The date and time of expiration for the delivery, or empty to represent no expiration + * @bbbbbb Bbb bbbb bbb bbbb bb bbbbbbbbbb bbb bbb bbbbbbbb, bb bbbbb bb bbbbbbbbb bb bbbbbbbbbb */ - Optional getExpiration(); + Bbbbbbbb bbbBbbbbbbbbb(); /** - * Sends the delivery out to the recipient, informing them if they are online. Otherwise, - * this will be saved directly to their relative stash. + * Bbbbb bbb bbbbbbbb bbb bb bbb bbbbbbbbb, bbbbbbbbb bbbb bb bbbb bbb bbbbbb. Bbbbbbbbb, + * bbbb bbbb bb bbbbb bbbbbbbb bb bbbbb bbbbbbbb bbbbb. */ - void deliver(); + bbbb bbbbbbb(); - static DeliveryBuilder builder() { - return Impactor.getInstance().getRegistry().createBuilder(DeliveryBuilder.class); + bbbbbb BbbbbbbbBbbbbbb bbbbbbb() { + bbbbbb Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbBbbbbbb(BbbbbbbbBbbbbbb.bbbbb); } - interface DeliveryBuilder extends Builder { + bbbbbbbbb BbbbbbbbBbbbbbb bbbbbbb Bbbbbbb { - DeliveryBuilder id(UUID id); + BbbbbbbbBbbbbbb bb(BBBB bb); - DeliveryBuilder source(UUID source); + BbbbbbbbBbbbbbb bbbbbb(BBBB bbbbbb); - DeliveryBuilder recipient(UUID recipient); + BbbbbbbbBbbbbbb bbbbbbbbb(BBBB bbbbbbbbb); - DeliveryBuilder content(Entry content); + BbbbbbbbBbbbbbb bbbbbbb(Bbbbb bbbbbbb); - DeliveryBuilder expiration(LocalDateTime time); + BbbbbbbbBbbbbbb bbbbbbbbbb(BbbbbBbbbBbbb bbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/environment/Environment.java b/api/src/main/java/net/impactdev/gts/api/environment/Environment.java index 595be1e1..d13a7964 100644 --- a/api/src/main/java/net/impactdev/gts/api/environment/Environment.java +++ b/api/src/main/java/net/impactdev/gts/api/environment/Environment.java @@ -1,22 +1,22 @@ -package net.impactdev.gts.api.environment; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb; -import com.google.common.collect.Maps; -import net.impactdev.impactor.api.utilities.printing.PrettyPrinter; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbb.bbbbbbbb.BbbbbbBbbbbbb; -import java.util.Map; +bbbbbb bbbb.bbbb.Bbb; -public class Environment implements PrettyPrinter.IPrettyPrintable { +bbbbbb bbbbb Bbbbbbbbbbb bbbbbbbbbb BbbbbbBbbbbbb.BBbbbbbBbbbbbbbb { - private final Map environment = Maps.newLinkedHashMap(); + bbbbbbb bbbbb Bbb bbbbbbbbbbb = Bbbb.bbbBbbbbbBbbbBbb(); - public void append(String key, String version) { - this.environment.put(key, version); + bbbbbb bbbb bbbbbb(Bbbbbb bbb, Bbbbbb bbbbbbb) { + bbbb.bbbbbbbbbbb.bbb(bbb, bbbbbbb); } - @Override - public void print(PrettyPrinter printer) { - for(Map.Entry entry : this.environment.entrySet()) { - printer.add(" * " + entry.getKey() + ": " + entry.getValue()); + @Bbbbbbbb + bbbbbb bbbb bbbbb(BbbbbbBbbbbbb bbbbbbb) { + bbb(Bbb.Bbbbb bbbbb : bbbb.bbbbbbbbbbb.bbbbbBbb()) { + bbbbbbb.bbb(" * " + bbbbb.bbbBbb() + ": " + bbbbb.bbbBbbbb()); } } diff --git a/api/src/main/java/net/impactdev/gts/api/events/PingEvent.java b/api/src/main/java/net/impactdev/gts/api/events/PingEvent.java index 72e0c47e..8d96316d 100644 --- a/api/src/main/java/net/impactdev/gts/api/events/PingEvent.java +++ b/api/src/main/java/net/impactdev/gts/api/events/PingEvent.java @@ -1,16 +1,16 @@ -package net.impactdev.gts.api.events; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb; -import net.impactdev.impactor.api.event.ImpactorEvent; -import org.spongepowered.api.util.annotation.eventgen.GenerateFactoryMethod; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.BbbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbb.bbbb.bbbbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbBbbbbb; -import java.time.Instant; -import java.util.UUID; +bbbbbb bbbb.bbbb.Bbbbbbb; +bbbbbb bbbb.bbbb.BBBB; -@GenerateFactoryMethod -public interface PingEvent extends ImpactorEvent { +@BbbbbbbbBbbbbbbBbbbbb +bbbbbb bbbbbbbbb BbbbBbbbb bbbbbbb BbbbbbbbBbbbb { - UUID getPingID(); + BBBB bbbBbbbBB(); - Instant getTimeSent(); + Bbbbbbb bbbBbbbBbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/events/PublishListingEvent.java b/api/src/main/java/net/impactdev/gts/api/events/PublishListingEvent.java index 0a10f4b5..c82d09e9 100644 --- a/api/src/main/java/net/impactdev/gts/api/events/PublishListingEvent.java +++ b/api/src/main/java/net/impactdev/gts/api/events/PublishListingEvent.java @@ -1,29 +1,29 @@ -package net.impactdev.gts.api.events; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb; -import net.impactdev.impactor.api.event.ImpactorEvent; -import net.impactdev.impactor.api.event.type.Cancellable; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.gts.api.listings.auctions.Auction; -import org.checkerframework.checker.nullness.qual.NonNull; -import org.spongepowered.api.util.annotation.eventgen.GenerateFactoryMethod; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.BbbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.bbbb.Bbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbb.bbbb.bbbbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbBbbbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; /** - * Represents when a user publishes a listing to the GTS. + * Bbbbbbbbbb bbbb b bbbb bbbbbbbbb b bbbbbbb bb bbb BBB. * - * @author NickImpact + * @bbbbbb BbbbBbbbbb */ -@GenerateFactoryMethod -public interface PublishListingEvent extends ImpactorEvent, Cancellable { +@BbbbbbbbBbbbbbbBbbbbb +bbbbbb bbbbbbbbb BbbbbbbBbbbbbbBbbbb bbbbbbb BbbbbbbbBbbbb, Bbbbbbbbbbb { - @NonNull UUID getLister(); + @BbbBbbb BBBB bbbBbbbbb(); - @NonNull - Listing getListing(); + @BbbBbbb + Bbbbbbb bbbBbbbbbb(); - default boolean isAuction() { - return this.getListing() instanceof Auction; + bbbbbbb bbbbbbb bbBbbbbbb() { + bbbbbb bbbb.bbbBbbbbbb() bbbbbbbbbb Bbbbbbb; } } diff --git a/api/src/main/java/net/impactdev/gts/api/events/auctions/BidEvent.java b/api/src/main/java/net/impactdev/gts/api/events/auctions/BidEvent.java index cbcea9cf..1db7e1d5 100644 --- a/api/src/main/java/net/impactdev/gts/api/events/auctions/BidEvent.java +++ b/api/src/main/java/net/impactdev/gts/api/events/auctions/BidEvent.java @@ -1,19 +1,19 @@ -package net.impactdev.gts.api.events.auctions; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.bbbbbbbb; -import net.impactdev.impactor.api.event.ImpactorEvent; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.impactor.api.event.type.Cancellable; -import org.spongepowered.api.util.annotation.eventgen.GenerateFactoryMethod; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.BbbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.bbbb.Bbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbb.bbbb.bbbbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbBbbbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; -@GenerateFactoryMethod -public interface BidEvent extends ImpactorEvent, Cancellable { +@BbbbbbbbBbbbbbbBbbbbb +bbbbbb bbbbbbbbb BbbBbbbb bbbbbbb BbbbbbbbBbbbb, Bbbbbbbbbbb { - UUID getBidder(); + BBBB bbbBbbbbb(); - Listing getListing(); + Bbbbbbb bbbBbbbbbb(); - double getAmountBid(); + bbbbbb bbbBbbbbbBbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/events/buyitnow/PurchaseListingEvent.java b/api/src/main/java/net/impactdev/gts/api/events/buyitnow/PurchaseListingEvent.java index 32604551..bd4ffb0f 100644 --- a/api/src/main/java/net/impactdev/gts/api/events/buyitnow/PurchaseListingEvent.java +++ b/api/src/main/java/net/impactdev/gts/api/events/buyitnow/PurchaseListingEvent.java @@ -1,25 +1,25 @@ -package net.impactdev.gts.api.events.buyitnow; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.bbbbbbbb; -import net.impactdev.impactor.api.event.ImpactorEvent; -import net.impactdev.impactor.api.event.type.Cancellable; -import net.impactdev.gts.api.listings.Listing; -import org.spongepowered.api.util.annotation.eventgen.GenerateFactoryMethod; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.BbbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.bbbb.Bbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbb.bbbb.bbbbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbBbbbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; /** - * This PurchaseEvent represents the action of a Player purchasing any type of listing from the GTS - * market, whether it be through auction or simplistic purchase. To access the data of the listing, - * just simply parse through the fields of the listing variable provided by the event. + * Bbbb BbbbbbbbBbbbb bbbbbbbbbb bbb bbbbbb bb b Bbbbbb bbbbbbbbbb bbb bbbb bb bbbbbbb bbbb bbb BBB + * bbbbbb, bbbbbbb bb bb bbbbbbb bbbbbbb bb bbbbbbbbbb bbbbbbbb. Bb bbbbbb bbb bbbb bb bbb bbbbbbb, + * bbbb bbbbbb bbbbb bbbbbbb bbb bbbbbb bb bbb bbbbbbb bbbbbbbb bbbbbbbb bb bbb bbbbb. * - * @author NickImpact + * @bbbbbb BbbbBbbbbb */ -@GenerateFactoryMethod -public interface PurchaseListingEvent extends ImpactorEvent, Cancellable { +@BbbbbbbbBbbbbbbBbbbbb +bbbbbb bbbbbbbbb BbbbbbbbBbbbbbbBbbbb bbbbbbb BbbbbbbbBbbbb, Bbbbbbbbbbb { - UUID getBuyer(); + BBBB bbbBbbbb(); - Listing getListing(); + Bbbbbbb bbbBbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/events/extension/ExtensionLoadEvent.java b/api/src/main/java/net/impactdev/gts/api/events/extension/ExtensionLoadEvent.java index 2f614f98..b4fe57ff 100644 --- a/api/src/main/java/net/impactdev/gts/api/events/extension/ExtensionLoadEvent.java +++ b/api/src/main/java/net/impactdev/gts/api/events/extension/ExtensionLoadEvent.java @@ -1,12 +1,12 @@ -package net.impactdev.gts.api.events.extension; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.bbbbbbbbb; -import net.impactdev.impactor.api.event.ImpactorEvent; -import net.impactdev.gts.api.extension.Extension; -import org.spongepowered.api.util.annotation.eventgen.GenerateFactoryMethod; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.BbbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbb.bbbb.bbbbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbBbbbbb; -@GenerateFactoryMethod -public interface ExtensionLoadEvent extends ImpactorEvent { +@BbbbbbbbBbbbbbbBbbbbb +bbbbbb bbbbbbbbb BbbbbbbbbBbbbBbbbb bbbbbbb BbbbbbbbBbbbb { - Extension getExtension(); + Bbbbbbbbb bbbBbbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/events/extension/PlaceholderRegistryEvent.java b/api/src/main/java/net/impactdev/gts/api/events/extension/PlaceholderRegistryEvent.java index fa659d67..651eade5 100644 --- a/api/src/main/java/net/impactdev/gts/api/events/extension/PlaceholderRegistryEvent.java +++ b/api/src/main/java/net/impactdev/gts/api/events/extension/PlaceholderRegistryEvent.java @@ -1,11 +1,11 @@ -package net.impactdev.gts.api.events.extension; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.bbbbbbbbb; -import net.impactdev.impactor.api.event.ImpactorEvent; -import org.spongepowered.api.util.annotation.eventgen.GenerateFactoryMethod; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.BbbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbb.bbbb.bbbbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbBbbbbb; -@GenerateFactoryMethod -public interface PlaceholderRegistryEvent extends ImpactorEvent { +@BbbbbbbbBbbbbbbBbbbbb +bbbbbb bbbbbbbbb BbbbbbbbbbbBbbbbbbbBbbbb bbbbbbb BbbbbbbbBbbbb { - Object getPopulator(); + Bbbbbb bbbBbbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/events/extension/PluginReloadEvent.java b/api/src/main/java/net/impactdev/gts/api/events/extension/PluginReloadEvent.java index 636d6339..e35448d0 100644 --- a/api/src/main/java/net/impactdev/gts/api/events/extension/PluginReloadEvent.java +++ b/api/src/main/java/net/impactdev/gts/api/events/extension/PluginReloadEvent.java @@ -1,7 +1,7 @@ -package net.impactdev.gts.api.events.extension; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.bbbbbbbbb; -import net.impactdev.impactor.api.event.ImpactorEvent; -import org.spongepowered.api.util.annotation.eventgen.GenerateFactoryMethod; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.BbbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbb.bbbb.bbbbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbBbbbbb; -@GenerateFactoryMethod -public interface PluginReloadEvent extends ImpactorEvent {} +@BbbbbbbbBbbbbbbBbbbbb +bbbbbb bbbbbbbbb BbbbbbBbbbbbBbbbb bbbbbbb BbbbbbbbBbbbb {} diff --git a/api/src/main/java/net/impactdev/gts/api/events/maintenance/MaintenanceModeUpdateEvent.java b/api/src/main/java/net/impactdev/gts/api/events/maintenance/MaintenanceModeUpdateEvent.java index 1987c6bf..3e53b915 100644 --- a/api/src/main/java/net/impactdev/gts/api/events/maintenance/MaintenanceModeUpdateEvent.java +++ b/api/src/main/java/net/impactdev/gts/api/events/maintenance/MaintenanceModeUpdateEvent.java @@ -1,14 +1,14 @@ -package net.impactdev.gts.api.events.maintenance; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.bbbbbbbbbbb; -import net.impactdev.gts.api.maintenance.MaintenanceMode; -import net.impactdev.impactor.api.event.ImpactorEvent; -import org.spongepowered.api.util.annotation.eventgen.GenerateFactoryMethod; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb.BbbbbbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.BbbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbb.bbbb.bbbbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbBbbbbb; -@GenerateFactoryMethod -public interface MaintenanceModeUpdateEvent extends ImpactorEvent { +@BbbbbbbbBbbbbbbBbbbbb +bbbbbb bbbbbbbbb BbbbbbbbbbbBbbbBbbbbbBbbbb bbbbbbb BbbbbbbbBbbbb { - MaintenanceMode getMode(); + BbbbbbbbbbbBbbb bbbBbbb(); - boolean getNewState(); + bbbbbbb bbbBbbBbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/events/placeholders/PlaceholderReadyEvent.java b/api/src/main/java/net/impactdev/gts/api/events/placeholders/PlaceholderReadyEvent.java index eb7a13db..2c6a858d 100644 --- a/api/src/main/java/net/impactdev/gts/api/events/placeholders/PlaceholderReadyEvent.java +++ b/api/src/main/java/net/impactdev/gts/api/events/placeholders/PlaceholderReadyEvent.java @@ -1,21 +1,21 @@ -package net.impactdev.gts.api.events.placeholders; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.bbbbbbbbbbbb; -import net.impactdev.impactor.api.event.ImpactorEvent; -import org.spongepowered.api.util.annotation.eventgen.GenerateFactoryMethod; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbb.BbbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbb.bbbb.bbbbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbBbbbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; /** - * Represents the event when a placeholder's contents becomes available when they previously - * weren't. This is namely meant for asynchronous placeholder value replacements. + * Bbbbbbbbbb bbb bbbbb bbbb b bbbbbbbbbbb'b bbbbbbbb bbbbbbb bbbbbbbbb bbbb bbbb bbbbbbbbbb + * bbbbb'b. Bbbb bb bbbbbb bbbbb bbb bbbbbbbbbbbb bbbbbbbbbbb bbbbb bbbbbbbbbbbb. */ -@GenerateFactoryMethod -public interface PlaceholderReadyEvent extends ImpactorEvent { +@BbbbbbbbBbbbbbbBbbbbb +bbbbbb bbbbbbbbb BbbbbbbbbbbBbbbbBbbbb bbbbbbb BbbbbbbbBbbbb { - UUID getSource(); + BBBB bbbBbbbbb(); - String getPlaceholderID(); + Bbbbbb bbbBbbbbbbbbbbBB(); - Object getValue(); + Bbbbbb bbbBbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/exceptions/LackingServiceException.java b/api/src/main/java/net/impactdev/gts/api/exceptions/LackingServiceException.java index 7621e154..e648d472 100644 --- a/api/src/main/java/net/impactdev/gts/api/exceptions/LackingServiceException.java +++ b/api/src/main/java/net/impactdev/gts/api/exceptions/LackingServiceException.java @@ -1,16 +1,16 @@ -package net.impactdev.gts.api.exceptions; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbb; -public class LackingServiceException extends RuntimeException { +bbbbbb bbbbb BbbbbbbBbbbbbbBbbbbbbbb bbbbbbb BbbbbbbBbbbbbbbb { - private Class lacking; + bbbbbbb Bbbbb bbbbbbb; - public LackingServiceException(Class service) { - super(service.getCanonicalName()); - this.lacking = service; + bbbbbb BbbbbbbBbbbbbbBbbbbbbbb(Bbbbb bbbbbbb) { + bbbbb(bbbbbbb.bbbBbbbbbbbbBbbb()); + bbbb.bbbbbbb = bbbbbbb; } - public Class getLacking() { - return this.lacking; + bbbbbb Bbbbb bbbBbbbbbb() { + bbbbbb bbbb.bbbbbbb; } } diff --git a/api/src/main/java/net/impactdev/gts/api/exceptions/ListingException.java b/api/src/main/java/net/impactdev/gts/api/exceptions/ListingException.java index 7b6c8dc8..b500c0bd 100644 --- a/api/src/main/java/net/impactdev/gts/api/exceptions/ListingException.java +++ b/api/src/main/java/net/impactdev/gts/api/exceptions/ListingException.java @@ -1,3 +1,3 @@ -package net.impactdev.gts.api.exceptions; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbb; -public class ListingException extends Exception {} +bbbbbb bbbbb BbbbbbbBbbbbbbbb bbbbbbb Bbbbbbbbb {} diff --git a/api/src/main/java/net/impactdev/gts/api/extension/Extension.java b/api/src/main/java/net/impactdev/gts/api/extension/Extension.java index a6e712d2..45a1c422 100644 --- a/api/src/main/java/net/impactdev/gts/api/extension/Extension.java +++ b/api/src/main/java/net/impactdev/gts/api/extension/Extension.java @@ -1,88 +1,88 @@ /* - * This file is part of LuckPerms, licensed under the MIT License. + * Bbbb bbbb bb bbbb bb BbbbBbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb. * - * Copyright (c) lucko (Luck) - * Copyright (c) contributors + * Bbbbbbbbb (b) bbbbb (Bbbb) + * Bbbbbbbbb (b) bbbbbbbbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb bbb + * bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB BBB + * BBBBBBBB. */ -package net.impactdev.gts.api.extension; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb; -import net.impactdev.gts.api.GTSService; -import net.impactdev.gts.api.commands.GTSCommandExecutor; -import net.impactdev.gts.api.environment.Environment; -import net.impactdev.impactor.api.dependencies.Dependency; -import net.impactdev.impactor.api.plugin.ImpactorPlugin; -import net.impactdev.impactor.api.plugin.components.Configurable; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.BBBBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.BBBBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb.Bbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbbbbb.Bbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbb.BbbbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbb.bbbbbbbbbb.Bbbbbbbbbbbb; -import java.nio.file.Path; -import java.util.List; -import java.util.Set; +bbbbbb bbbb.bbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbb; /** - * Represents an extension that is meant to hook into GTS + * Bbbbbbbbbb bb bbbbbbbbb bbbb bb bbbbb bb bbbb bbbb BBB * - * An extension is not a plugin, but rather a component capable of providing extra functionality for GTS. + * Bb bbbbbbbbb bb bbb b bbbbbb, bbb bbbbbb b bbbbbbbbb bbbbbbb bb bbbbbbbbb bbbbb bbbbbbbbbbbbb bbb BBB. * - * An extension must contain a resource titled "extension.json", + * Bb bbbbbbbbb bbbb bbbbbbb b bbbbbbbb bbbbbb "bbbbbbbbb.bbbb", */ -public interface Extension extends ImpactorPlugin, Configurable { +bbbbbb bbbbbbbbb Bbbbbbbbb bbbbbbb BbbbbbbbBbbbbb, Bbbbbbbbbbbb { /** - * Loads the extension. Fired during server startup + * Bbbbb bbb bbbbbbbbb. Bbbbb bbbbbb bbbbbb bbbbbbb * - * @param service A direct reference to the API Service provided to remove one additional call for - * those lazy people + * @bbbbb bbbbbbb B bbbbbb bbbbbbbbb bb bbb BBB Bbbbbbb bbbbbbbb bb bbbbbb bbb bbbbbbbbbb bbbb bbb + * bbbbb bbbb bbbbbb */ - void load(GTSService service, Path dataDir); + bbbb bbbb(BBBBbbbbbb bbbbbbb, Bbbb bbbbBbb); /** - * Enables the extension, and is fired after load. + * Bbbbbbb bbb bbbbbbbbb, bbb bb bbbbb bbbbb bbbb. * - * @param service A direct reference to the API Service provided to remove one additional call for - * those lazy people + * @bbbbb bbbbbbb B bbbbbb bbbbbbbbb bb bbb BBB Bbbbbbb bbbbbbbb bb bbbbbb bbb bbbbbbbbbb bbbb bbb + * bbbbb bbbb bbbbbb */ - void enable(GTSService service); + bbbb bbbbbb(BBBBbbbbbb bbbbbbb); /** - * Unloads the extension. Fired during server shutdown + * Bbbbbbb bbb bbbbbbbbb. Bbbbb bbbbbb bbbbbb bbbbbbbb */ - void unload(); + bbbb bbbbbb(); /** - * Specifies an additional list of dependencies that this extension will require to function + * Bbbbbbbbb bb bbbbbbbbbb bbbb bb bbbbbbbbbbbb bbbb bbbb bbbbbbbbb bbbb bbbbbbb bb bbbbbbbb * - * @return The list of dependencies required for normal operations of the extension + * @bbbbbb Bbb bbbb bb bbbbbbbbbbbb bbbbbbbb bbb bbbbbb bbbbbbbbbb bb bbb bbbbbbbbb */ - List getRequiredDependencies(); + Bbbb bbbBbbbbbbbBbbbbbbbbbbb(); /** - * Returns a set of command executors that this extension would like to supply + * Bbbbbbb b bbb bb bbbbbbb bbbbbbbbb bbbb bbbb bbbbbbbbb bbbbb bbbb bb bbbbbb * - * @return A set of executors for the extension, if any + * @bbbbbb B bbb bb bbbbbbbbb bbb bbb bbbbbbbbb, bb bbb */ - Set> getExecutors(); + Bbb> bbbBbbbbbbbb(); /** - * Supplies a set of extended information regarding the environment that this extension might make use of + * Bbbbbbbb b bbb bb bbbbbbbb bbbbbbbbbbb bbbbbbbbb bbb bbbbbbbbbbb bbbb bbbb bbbbbbbbb bbbbb bbbb bbb bb */ - void getExtendedEnvironmentInformation(Environment environment); + bbbb bbbBbbbbbbbBbbbbbbbbbbBbbbbbbbbbb(Bbbbbbbbbbb bbbbbbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/extension/ExtensionManager.java b/api/src/main/java/net/impactdev/gts/api/extension/ExtensionManager.java index 01bb6681..d25cea8a 100644 --- a/api/src/main/java/net/impactdev/gts/api/extension/ExtensionManager.java +++ b/api/src/main/java/net/impactdev/gts/api/extension/ExtensionManager.java @@ -1,46 +1,46 @@ /* - * This file is part of LuckPerms, licensed under the MIT License. + * Bbbb bbbb bb bbbb bb BbbbBbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb. * - * Copyright (c) lucko (Luck) - * Copyright (c) contributors + * Bbbbbbbbb (b) bbbbb (Bbbb) + * Bbbbbbbbb (b) bbbbbbbbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb bbb + * bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB BBB + * BBBBBBBB. */ -package net.impactdev.gts.api.extension; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; -import java.io.IOException; -import java.nio.file.Path; -import java.util.Collection; +bbbbbb bbbb.bb.BBBbbbbbbbb; +bbbbbb bbbb.bbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbbbbbbbbb; -public interface ExtensionManager { +bbbbbb bbbbbbbbb BbbbbbbbbBbbbbbb { - void loadExtension(Extension extension); + bbbb bbbbBbbbbbbbb(Bbbbbbbbb bbbbbbbbb); - @NonNull Extension loadExtension(Path path) throws IOException; + @BbbBbbb Bbbbbbbbb bbbbBbbbbbbbb(Bbbb bbbb) bbbbbb BBBbbbbbbbb; - void loadExtensions(Path path) throws Exception; + bbbb bbbbBbbbbbbbbb(Bbbb bbbb) bbbbbb Bbbbbbbbb; - void enableExtensions(); + bbbb bbbbbbBbbbbbbbbb(); - @NonNull Collection getLoadedExtensions(); + @BbbBbbb Bbbbbbbbbb bbbBbbbbbBbbbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/Listing.java b/api/src/main/java/net/impactdev/gts/api/listings/Listing.java index 7d1e41d3..ab8cd573 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/Listing.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/Listing.java @@ -1,123 +1,123 @@ -package net.impactdev.gts.api.listings; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb; -import net.impactdev.gts.api.data.Storable; -import net.impactdev.gts.api.listings.entries.Entry; -import net.impactdev.gts.api.listings.makeup.Display; -import net.impactdev.gts.api.listings.prices.Price; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.impactor.api.builders.Builder; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; -import java.time.LocalDateTime; -import java.util.UUID; -import java.util.function.Predicate; +bbbbbb bbbb.bbbb.BbbbbBbbbBbbb; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbb.Bbbbbbbbb; /** - * A listing represents the overall information of something listed onto the GTS. + * B bbbbbbb bbbbbbbbbb bbb bbbbbbb bbbbbbbbbbb bb bbbbbbbbb bbbbbb bbbb bbb BBB. */ -public interface Listing extends Storable { +bbbbbb bbbbbbbbb Bbbbbbb bbbbbbb Bbbbbbbb { - /** The UUID to use when the server itself creates a listing */ - UUID SERVER_ID = UUID.fromString("00000000-0000-0000-0000-000000000000"); + /** Bbb BBBB bb bbb bbbb bbb bbbbbb bbbbbb bbbbbbb b bbbbbbb */ + BBBB BBBBBB_BB = BBBB.bbbbBbbbbb("00000000-0000-0000-0000-000000000000"); - Predicate NON_EXPIRED_LISTINGS = listing -> !listing.hasExpired(); + Bbbbbbbbb BBB_BBBBBBB_BBBBBBBB = bbbbbbb -> !bbbbbbb.bbbBbbbbbb(); - default T as(Class type) { - return type.cast(this); + bbbbbbb B bb(Bbbbb bbbb) { + bbbbbb bbbb.bbbb(bbbb); } /** - * Represents the ID of this listing. This is independent of the lister's UUID, which serves as a reference - * to the player or system that listed the listing. + * Bbbbbbbbbb bbb BB bb bbbb bbbbbbb. Bbbb bb bbbbbbbbbbb bb bbb bbbbbb'b BBBB, bbbbb bbbbbb bb b bbbbbbbbb + * bb bbb bbbbbb bb bbbbbb bbbb bbbbbb bbb bbbbbbb. * - * @return The unique ID of this listing + * @bbbbbb Bbb bbbbbb BB bb bbbb bbbbbbb */ - UUID getID(); + BBBB bbbBB(); /** - * Represents the user listing this Listing. If this is a player, the UUID will be that of the player. - * If the server creates the listing, then this UUID will match the generic zeroed out ID. + * Bbbbbbbbbb bbb bbbb bbbbbbb bbbb Bbbbbbb. Bb bbbb bb b bbbbbb, bbb BBBB bbbb bb bbbb bb bbb bbbbbb. + * Bb bbb bbbbbb bbbbbbb bbb bbbbbbb, bbbb bbbb BBBB bbbb bbbbb bbb bbbbbbb bbbbbb bbb BB. * - * @return The ID of the lister who created this listing + * @bbbbbb Bbb BB bb bbb bbbbbb bbb bbbbbbb bbbb bbbbbbb */ - UUID getLister(); + BBBB bbbBbbbbb(); /** - * Represents the actual component of the listing that will be contained by this listing. This is what a user will - * be purchasing should they purchase the listing. + * Bbbbbbbbbb bbb bbbbbb bbbbbbbbb bb bbb bbbbbbb bbbb bbbb bb bbbbbbbbb bb bbbb bbbbbbb. Bbbb bb bbbb b bbbb bbbb + * bb bbbbbbbbbb bbbbbb bbbb bbbbbbbb bbb bbbbbbb. * - * @return The entry making up this listing. + * @bbbbbb Bbb bbbbb bbbbbb bb bbbb bbbbbbb. */ - Entry getEntry(); + Bbbbb bbbBbbbb(); /** - * Represents the display of the listing. This is essentially how the listing will be displayed to the user - * when queried in-game. + * Bbbbbbbbbb bbb bbbbbbb bb bbb bbbbbbb. Bbbb bb bbbbbbbbbbb bbb bbb bbbbbbb bbbb bb bbbbbbbbb bb bbb bbbb + * bbbb bbbbbbb bb-bbbb. * - * @return The display parameters of this listing + * @bbbbbb Bbb bbbbbbb bbbbbbbbbb bb bbbb bbbbbbb */ - default Display getDisplay(UUID viewer) { - return this.getEntry().getDisplay(viewer); + bbbbbbb Bbbbbbb bbbBbbbbbb(BBBB bbbbbb) { + bbbbbb bbbb.bbbBbbbb().bbbBbbbbbb(bbbbbb); } /** - * Details the exact time at which a listing was published to the GTS market. This is namely helpful - * for tracking purposes. + * Bbbbbbb bbb bbbbb bbbb bb bbbbb b bbbbbbb bbb bbbbbbbbb bb bbb BBB bbbbbb. Bbbb bb bbbbbb bbbbbbb + * bbb bbbbbbbb bbbbbbbb. * - * @return The time this listing was published + * @bbbbbb Bbb bbbb bbbb bbbbbbb bbb bbbbbbbbb */ - LocalDateTime getPublishTime(); + BbbbbBbbbBbbb bbbBbbbbbbBbbb(); /** - * Represents the time where this listing will expire. + * Bbbbbbbbbb bbb bbbb bbbbb bbbb bbbbbbb bbbb bbbbbb. * - * @return The time this listing will expire + * @bbbbbb Bbb bbbb bbbb bbbbbbb bbbb bbbbbb */ - LocalDateTime getExpiration(); + BbbbbBbbbBbbb bbbBbbbbbbbbb(); /** - * Sets the new expiration. Make sure to update the listing after using this. + * Bbbb bbb bbb bbbbbbbbbb. Bbbb bbbb bb bbbbbb bbb bbbbbbb bbbbb bbbbb bbbb. */ - void setExpiration(LocalDateTime expiration); + bbbb bbbBbbbbbbbbb(BbbbbBbbbBbbb bbbbbbbbbb); /** - * Attempts to verify whether or not a listing has expired. If a listing has no expiration, this call will - * always be false. If an expiration does exist, this call will verify its validity based on the marked - * expiration time with the current time at the time of the call. + * Bbbbbbbb bb bbbbbb bbbbbbb bb bbb b bbbbbbb bbb bbbbbbb. Bb b bbbbbbb bbb bb bbbbbbbbbb, bbbb bbbb bbbb + * bbbbbb bb bbbbb. Bb bb bbbbbbbbbb bbbb bbbbb, bbbb bbbb bbbb bbbbbb bbb bbbbbbbb bbbbb bb bbb bbbbbb + * bbbbbbbbbb bbbb bbbb bbb bbbbbbb bbbb bb bbb bbbb bb bbb bbbb. * - * @return True if the listing has an expiration and said expiration is before the current system time, - * or false if the expiration is still after the current system time, or this listing has no expiration. + * @bbbbbb Bbbb bb bbb bbbbbbb bbb bb bbbbbbbbbb bbb bbbb bbbbbbbbbb bb bbbbbb bbb bbbbbbb bbbbbb bbbb, + * bb bbbbb bb bbb bbbbbbbbbb bb bbbbb bbbbb bbb bbbbbbb bbbbbb bbbb, bb bbbb bbbbbbb bbb bb bbbbbbbbbb. */ - default boolean hasExpired() { - return LocalDateTime.now().isAfter(this.getExpiration()); + bbbbbbb bbbbbbb bbbBbbbbbb() { + bbbbbb BbbbbBbbbBbbb.bbb().bbBbbbb(bbbb.bbbBbbbbbbbbb()); } - static ListingBuilder builder() { - return Impactor.getInstance().getRegistry().createBuilder(ListingBuilder.class); + bbbbbb BbbbbbbBbbbbbb bbbbbbb() { + bbbbbb Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbBbbbbbb(BbbbbbbBbbbbbb.bbbbb); } - interface ListingBuilder> extends Builder { + bbbbbbbbb BbbbbbbBbbbbbb> bbbbbbb Bbbbbbb { /** - * Represents the ID of a listing. If not specified, this will be auto-generated at the time of constructing. + * Bbbbbbbbbb bbb BB bb b bbbbbbb. Bb bbb bbbbbbbbb, bbbb bbbb bb bbbb-bbbbbbbbb bb bbb bbbb bb bbbbbbbbbbbb. * - * @param id The ID to use for the listing - * @return The builder modified with this value + * @bbbbb bb Bbb BB bb bbb bbb bbb bbbbbbb + * @bbbbbb Bbb bbbbbbb bbbbbbbb bbbb bbbb bbbbb */ - B id(UUID id); + B bb(BBBB bb); /** - * Specifies the seller of this listing. The seller is simply a mapping to a + * Bbbbbbbbb bbb bbbbbb bb bbbb bbbbbbb. Bbb bbbbbb bb bbbbbb b bbbbbbb bb b * - * @param lister The individual creating this listing - * @return The builder modified with this value + * @bbbbb bbbbbb Bbb bbbbbbbbbb bbbbbbbb bbbb bbbbbbb + * @bbbbbb Bbb bbbbbbb bbbbbbbb bbbb bbbb bbbbb */ - B lister(UUID lister); + B bbbbbb(BBBB bbbbbb); - B entry(Entry entry); + B bbbbb(Bbbbb bbbbb); - B price(Price price); + B bbbbb(Bbbbb bbbbb); - B expiration(LocalDateTime expiration); + B bbbbbbbbbb(BbbbbBbbbBbbb bbbbbbbbbb); } } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/auctions/Auction.java b/api/src/main/java/net/impactdev/gts/api/listings/auctions/Auction.java index d4c148e3..8c47e22c 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/auctions/Auction.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/auctions/Auction.java @@ -1,256 +1,256 @@ -package net.impactdev.gts.api.listings.auctions; - -import com.google.common.collect.Multimap; -import com.google.common.collect.TreeMultimap; -import net.impactdev.gts.api.data.Storable; -import net.impactdev.gts.api.listings.entries.Entry; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.impactor.api.json.factory.JObject; -import net.impactdev.impactor.api.builders.Builder; -import net.impactdev.impactor.api.utilities.mappings.Tuple; -import net.impactdev.gts.api.listings.Listing; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.UUID; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb; + +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.BbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbb.bbbbbbb.BBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbb.bbbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; + +bbbbbb bbbb.bbbb.BbbbbBbbbBbbb; +bbbbbb bbbb.bbbb.BbbbbBbbb; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbb; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BBBB; /** - * An auction represents a listing which, instead of being directly purchasable, will be able to fluctuate its price - * based on any user which desires to place a bid on the listing. These listings will still only have one winner by the - * end of the expiration period, but it is not limited to just one user making an attempt to purchase the listing. + * Bb bbbbbbb bbbbbbbbbb b bbbbbbb bbbbb, bbbbbbb bb bbbbb bbbbbbbb bbbbbbbbbbb, bbbb bb bbbb bb bbbbbbbbb bbb bbbbb + * bbbbb bb bbb bbbb bbbbb bbbbbbb bb bbbbb b bbb bb bbb bbbbbbb. Bbbbb bbbbbbbb bbbb bbbbb bbbb bbbb bbb bbbbbb bb bbb + * bbb bb bbb bbbbbbbbbb bbbbbb, bbb bb bb bbb bbbbbbb bb bbbb bbb bbbb bbbbbb bb bbbbbbb bb bbbbbbbb bbb bbbbbbb. * - *

As a note, these types of listings must have an expiration time set. No auction can be marked permanent, as - * they cannot be directly purchased.

+ * Bb b bbbb, bbbbb bbbbb bb bbbbbbbb bbbb bbbb bb bbbbbbbbbb bbbb bbb. Bb bbbbbbb bbb bb bbbbbb bbbbbbbbb, bb + * bbbb bbbbbb bb bbbbbbbb bbbbbbbbb. */ -public interface Auction extends Listing { +bbbbbb bbbbbbbbb Bbbbbbb bbbbbbb Bbbbbbb { /** - * Attempts to locate the highest bid, or any bid at all, placed by the user on this auction. Only the highest - * bid will be returned here. If no bids exist for the user, this will return an empty Optional. Otherwise, this - * call will report the amount of money they placed already on the bid. + * Bbbbbbbb bb bbbbbb bbb bbbbbbb bbb, bb bbb bbb bb bbb, bbbbbb bb bbb bbbb bb bbbb bbbbbbb. Bbbb bbb bbbbbbb + * bbb bbbb bb bbbbbbbb bbbb. Bb bb bbbb bbbbb bbb bbb bbbb, bbbb bbbb bbbbbb bb bbbbb Bbbbbbbb. Bbbbbbbbb, bbbb + * bbbb bbbb bbbbbb bbb bbbbbb bb bbbbb bbbb bbbbbb bbbbbbb bb bbb bbb. * - * @param uuid The ID of the user placing the bid - * @return An Optional value containing the bid amount placed by the user, or an empty Optional to signify no bid - * has been placed by the user. + * @bbbbb bbbb Bbb BB bb bbb bbbb bbbbbbb bbb bbb + * @bbbbbb Bb Bbbbbbbb bbbbb bbbbbbbbbb bbb bbb bbbbbb bbbbbb bb bbb bbbb, bb bb bbbbb Bbbbbbbb bb bbbbbbb bb bbb + * bbb bbbb bbbbbb bb bbb bbbb. */ - Optional getCurrentBid(UUID uuid); + Bbbbbbbb bbbBbbbbbbBbb(BBBB bbbb); /** - * Specifies the number of bids that have been placed on this auction. + * Bbbbbbbbb bbb bbbbbb bb bbbb bbbb bbbb bbbb bbbbbb bb bbbb bbbbbbb. * - * @return The number of bids placed on the auction + * @bbbbbb Bbb bbbbbb bb bbbb bbbbbb bb bbb bbbbbbb */ - default int getNumberOfBidsPlaced() { - return this.getBids().size(); + bbbbbbb bbb bbbBbbbbbBbBbbbBbbbbb() { + bbbbbb bbbb.bbbBbbb().bbbb(); } /** - * Specifies if any bids have been placed on the auction + * Bbbbbbbbb bb bbb bbbb bbbb bbbb bbbbbb bb bbb bbbbbbb * - * @return True if any have been placed, false otherwise + * @bbbbbb Bbbb bb bbb bbbb bbbb bbbbbb, bbbbb bbbbbbbbb */ - default boolean hasAnyBidsPlaced() { - return this.getNumberOfBidsPlaced() != 0; + bbbbbbb bbbbbbb bbbBbbBbbbBbbbbb() { + bbbbbb bbbb.bbbBbbbbbBbBbbbBbbbbb() != 0; } /** - * Keeps track of the bids placed on this auction, with the highest bid being the first entry in the sorted map, - * and the lowest being the last entry. + * Bbbbb bbbbb bb bbb bbbb bbbbbb bb bbbb bbbbbbb, bbbb bbb bbbbbbb bbb bbbbb bbb bbbbb bbbbb bb bbb bbbbbb bbb, + * bbb bbb bbbbbb bbbbb bbb bbbb bbbbb. * - * @return A mapping of bids placed on this auction by a user and for how much they bid + * @bbbbbb B bbbbbbb bb bbbb bbbbbb bb bbbb bbbbbbb bb b bbbb bbb bbb bbb bbbb bbbb bbb */ - TreeMultimap getBids(); + BbbbBbbbbbbb bbbBbbb(); /** - * Returns a list of all users who have bid on this auction, without any information regarding what they have - * bid. + * Bbbbbbb b bbbb bb bbb bbbbb bbb bbbb bbb bb bbbb bbbbbbb, bbbbbbb bbb bbbbbbbbbbb bbbbbbbbb bbbb bbbb bbbb + * bbb. * - * @return Each unique bidder + * @bbbbbb Bbbb bbbbbb bbbbbb */ - default List getUniqueBidders() { - return new ArrayList<>(this.getBids().keys()); + bbbbbbb Bbbb bbbBbbbbbBbbbbbb() { + bbbbbb bbb BbbbbBbbb<>(bbbb.bbbBbbb().bbbb()); } /** - * Like {@link #getUniqueBidders()}, this method returns a set of all unique bidders for this auction, as well - * as provides contextual information towards their highest bid. + * Bbbb {@bbbb #bbbBbbbbbBbbbbbb()}, bbbb bbbbbb bbbbbbb b bbb bb bbb bbbbbb bbbbbbb bbb bbbb bbbbbbb, bb bbbb + * bb bbbbbbbb bbbbbbbbbb bbbbbbbbbbb bbbbbbb bbbbb bbbbbbb bbb. * - * @return Each unique bidder paired with their highest bid + * @bbbbbb Bbbb bbbbbb bbbbbb bbbbbb bbbb bbbbb bbbbbbb bbb */ - Map getUniqueBiddersWithHighestBids(); + Bbb bbbBbbbbbBbbbbbbBbbbBbbbbbbBbbb(); /** - * Returns the highest bid currently placed on this auction. The high bid at time of expiration marks the winner, - * so having an easy call to this allows for simple access later on. + * Bbbbbbb bbb bbbbbbb bbb bbbbbbbbb bbbbbb bb bbbb bbbbbbb. Bbb bbbb bbb bb bbbb bb bbbbbbbbbb bbbbb bbb bbbbbb, + * bb bbbbbb bb bbbb bbbb bb bbbb bbbbbb bbb bbbbbb bbbbbb bbbbb bb. * - * @return The highest bidder paired with the amount they bid + * @bbbbbb Bbb bbbbbbb bbbbbb bbbbbb bbbb bbb bbbbbb bbbb bbb */ - Optional> getHighBid(); + Bbbbbbbb> bbbBbbbBbb(); /** - * Specifies the starting price of this auction. This is mainly here for tracking, and can be represented - * by {@link #getCurrentPrice()}. + * Bbbbbbbbb bbb bbbbbbbb bbbbb bb bbbb bbbbbbb. Bbbb bb bbbbbb bbbb bbb bbbbbbbb, bbb bbb bb bbbbbbbbbbb + * bb {@bbbb #bbbBbbbbbbBbbbb()}. * - * @return The price of the auction when initially created + * @bbbbbb Bbb bbbbb bb bbb bbbbbbb bbbb bbbbbbbbb bbbbbbb */ - double getStartingPrice(); + bbbbbb bbbBbbbbbbbBbbbb(); /** - * Specifies the current price of this auction. If no bids are currently placed, this will return the initial - * starting price set on the auction. Otherwise, this will show the highest bid currently placed on the auction. + * Bbbbbbbbb bbb bbbbbbb bbbbb bb bbbb bbbbbbb. Bb bb bbbb bbb bbbbbbbbb bbbbbb, bbbb bbbb bbbbbb bbb bbbbbbb + * bbbbbbbb bbbbb bbb bb bbb bbbbbbb. Bbbbbbbbb, bbbb bbbb bbbb bbb bbbbbbb bbb bbbbbbbbb bbbbbb bb bbb bbbbbbb. * - * @return The current price of the auction + * @bbbbbb Bbb bbbbbbb bbbbb bb bbb bbbbbbb */ - double getCurrentPrice(); + bbbbbb bbbBbbbbbbBbbbb(); /** - * Specifies the rate at which continuous bids will be applied. In other words, this value is a percentage value - * meant to help scale the higher the price of the item gets. This will always round up to the next whole number, - * so, if you start an auction with a price of $1, and have an increment rate of 5%, this will still lead to $2. + * Bbbbbbbbb bbb bbbb bb bbbbb bbbbbbbbbb bbbb bbbb bb bbbbbbb. Bb bbbbb bbbbb, bbbb bbbbb bb b bbbbbbbbbb bbbbb + * bbbbb bb bbbb bbbbb bbb bbbbbb bbb bbbbb bb bbb bbbb bbbb. Bbbb bbbb bbbbbb bbbbb bb bb bbb bbbb bbbbb bbbbbb, + * bb, bb bbb bbbbb bb bbbbbbb bbbb b bbbbb bb $1, bbb bbbb bb bbbbbbbbb bbbb bb 5%, bbbb bbbb bbbbb bbbb bb $2. * - * @return The increment to apply to the next bid + * @bbbbbb Bbb bbbbbbbbb bb bbbbb bb bbb bbbb bbb */ - float getIncrement(); + bbbbb bbbBbbbbbbbb(); /** - * A convenience method meant to be able to determine how much a user will be bidding - * on the auction should they decide to place a bid. + * B bbbbbbbbbbb bbbbbb bbbbb bb bb bbbb bb bbbbbbbbb bbb bbbb b bbbb bbbb bb bbbbbbb + * bb bbb bbbbbbb bbbbbb bbbb bbbbbb bb bbbbb b bbb. * - * @return the next bid requirement to place a bid on this auction + * @bbbbbb bbb bbbb bbb bbbbbbbbbbb bb bbbbb b bbb bb bbbb bbbbbbb */ - double getNextBidRequirement(); + bbbbbb bbbBbbbBbbBbbbbbbbbbb(); /** - * Allows a user to bid on the listing for the amount specified. As a user could specify a custom amount to bid, this - * call must accept a dynamic value for the amount bid. As such, this call should also verify if the amount bid is - * actually valid. + * Bbbbbb b bbbb bb bbb bb bbb bbbbbbb bbb bbb bbbbbb bbbbbbbbb. Bb b bbbb bbbbb bbbbbbb b bbbbbb bbbbbb bb bbb, bbbb + * bbbb bbbb bbbbbb b bbbbbbb bbbbb bbb bbb bbbbbb bbb. Bb bbbb, bbbb bbbb bbbbbb bbbb bbbbbb bb bbb bbbbbb bbb bb + * bbbbbbbb bbbbb. * - * @param user The user placing the bid - * @param amount The amount of money they are bidding - * @return True if their bid was applied, false otherwise + * @bbbbb bbbb Bbb bbbb bbbbbbb bbb bbb + * @bbbbb bbbbbb Bbb bbbbbb bb bbbbb bbbb bbb bbbbbbb + * @bbbbbb Bbbb bb bbbbb bbb bbb bbbbbbb, bbbbb bbbbbbbbb */ - boolean bid(UUID user, double amount); + bbbbbbb bbb(BBBB bbbb, bbbbbb bbbbbb); - static AuctionBuilder builder() { - return Impactor.getInstance().getRegistry().createBuilder(AuctionBuilder.class); + bbbbbb BbbbbbbBbbbbbb bbbbbbb() { + bbbbbb Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbBbbbbbb(BbbbbbbBbbbbbb.bbbbb); } - interface AuctionBuilder extends Builder { + bbbbbbbbb BbbbbbbBbbbbbb bbbbbbb Bbbbbbb { - AuctionBuilder id(UUID id); + BbbbbbbBbbbbbb bb(BBBB bb); - AuctionBuilder lister(UUID lister); + BbbbbbbBbbbbbb bbbbbb(BBBB bbbbbb); - AuctionBuilder entry(Entry entry); + BbbbbbbBbbbbbb bbbbb(Bbbbb bbbbb); - AuctionBuilder published(LocalDateTime published); + BbbbbbbBbbbbbb bbbbbbbbb(BbbbbBbbbBbbb bbbbbbbbb); - AuctionBuilder expiration(LocalDateTime expiration); + BbbbbbbBbbbbbb bbbbbbbbbb(BbbbbBbbbBbbb bbbbbbbbbb); - AuctionBuilder start(double amount); + BbbbbbbBbbbbbb bbbbb(bbbbbb bbbbbb); - AuctionBuilder increment(float rate); + BbbbbbbBbbbbbb bbbbbbbbb(bbbbb bbbb); - AuctionBuilder current(double current); + BbbbbbbBbbbbbb bbbbbbb(bbbbbb bbbbbbb); - AuctionBuilder bids(Multimap bids); + BbbbbbbBbbbbbb bbbb(Bbbbbbbb bbbb); - AuctionBuilder from(Auction parent); + BbbbbbbBbbbbbb bbbb(Bbbbbbb bbbbbb); } - class Bid implements Storable, Comparable { + bbbbb Bbb bbbbbbbbbb Bbbbbbbb, Bbbbbbbbbb { - private final double amount; - private final LocalDateTime timestamp; + bbbbbbb bbbbb bbbbbb bbbbbb; + bbbbbbb bbbbb BbbbbBbbbBbbb bbbbbbbbb; - public Bid(double amount) { - this.amount = amount; - this.timestamp = LocalDateTime.now(); + bbbbbb Bbb(bbbbbb bbbbbb) { + bbbb.bbbbbb = bbbbbb; + bbbb.bbbbbbbbb = BbbbbBbbbBbbb.bbb(); } - private Bid(BidBuilder builder) { - this.amount = builder.amount; - this.timestamp = builder.timestamp; + bbbbbbb Bbb(BbbBbbbbbb bbbbbbb) { + bbbb.bbbbbb = bbbbbbb.bbbbbb; + bbbb.bbbbbbbbb = bbbbbbb.bbbbbbbbb; } - public double getAmount() { - return this.amount; + bbbbbb bbbbbb bbbBbbbbb() { + bbbbbb bbbb.bbbbbb; } - public LocalDateTime getTimestamp() { - return this.timestamp; + bbbbbb BbbbbBbbbBbbb bbbBbbbbbbbb() { + bbbbbb bbbb.bbbbbbbbb; } - @Override - public int getVersion() { - return 1; + @Bbbbbbbb + bbbbbb bbb bbbBbbbbbb() { + bbbbbb 1; } - public static BidBuilder builder() { - return new BidBuilder(); + bbbbbb bbbbbb BbbBbbbbbb bbbbbbb() { + bbbbbb bbb BbbBbbbbbb(); } - @Override - public JObject serialize() { - return new JObject() - .add("amount", this.amount) - .add("timestamp", this.timestamp.toString()); + @Bbbbbbbb + bbbbbb BBbbbbb bbbbbbbbb() { + bbbbbb bbb BBbbbbb() + .bbb("bbbbbb", bbbb.bbbbbb) + .bbb("bbbbbbbbb", bbbb.bbbbbbbbb.bbBbbbbb()); } - @Override - public int compareTo(Bid other) { - return Double.compare(this.amount, other.amount); + @Bbbbbbbb + bbbbbb bbb bbbbbbbBb(Bbb bbbbb) { + bbbbbb Bbbbbb.bbbbbbb(bbbb.bbbbbb, bbbbb.bbbbbb); } - public static class BidBuilder implements Builder { + bbbbbb bbbbbb bbbbb BbbBbbbbbb bbbbbbbbbb Bbbbbbb { - private double amount; - private LocalDateTime timestamp = LocalDateTime.now(); + bbbbbbb bbbbbb bbbbbb; + bbbbbbb BbbbbBbbbBbbb bbbbbbbbb = BbbbbBbbbBbbb.bbb(); - public BidBuilder amount(double amount) { - this.amount = amount; - return this; + bbbbbb BbbBbbbbbb bbbbbb(bbbbbb bbbbbb) { + bbbb.bbbbbb = bbbbbb; + bbbbbb bbbb; } - public BidBuilder timestamp(LocalDateTime timestamp) { - this.timestamp = timestamp; - return this; + bbbbbb BbbBbbbbbb bbbbbbbbb(BbbbbBbbbBbbb bbbbbbbbb) { + bbbb.bbbbbbbbb = bbbbbbbbb; + bbbbbb bbbb; } -// @Override -// public BidBuilder from(Bid bid) { -// this.amount = bid.getAmount(); -// this.timestamp = bid.getTimestamp(); -// return this; +// @Bbbbbbbb +// bbbbbb BbbBbbbbbb bbbb(Bbb bbb) { +// bbbb.bbbbbb = bbb.bbbBbbbbb(); +// bbbb.bbbbbbbbb = bbb.bbbBbbbbbbbb(); +// bbbbbb bbbb; // } - @Override - public Bid build() { - return new Bid(this); + @Bbbbbbbb + bbbbbb Bbb bbbbb() { + bbbbbb bbb Bbb(bbbb); } } } - class BidContext { + bbbbb BbbBbbbbbb { - private final UUID bidder; - private final Bid bid; + bbbbbbb bbbbb BBBB bbbbbb; + bbbbbbb bbbbb Bbb bbb; - public BidContext(UUID bidder, Bid bid) { - this.bidder = bidder; - this.bid = bid; + bbbbbb BbbBbbbbbb(BBBB bbbbbb, Bbb bbb) { + bbbb.bbbbbb = bbbbbb; + bbbb.bbb = bbb; } - public UUID getBidder() { - return this.bidder; + bbbbbb BBBB bbbBbbbbb() { + bbbbbb bbbb.bbbbbb; } - public Bid getBid() { - return this.bid; + bbbbbb Bbb bbbBbb() { + bbbbbb bbbb.bbb; } } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/buyitnow/BuyItNow.java b/api/src/main/java/net/impactdev/gts/api/listings/buyitnow/BuyItNow.java index 186b9415..a6a72799 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/buyitnow/BuyItNow.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/buyitnow/BuyItNow.java @@ -1,92 +1,92 @@ -package net.impactdev.gts.api.listings.buyitnow; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb; -import net.impactdev.gts.api.listings.prices.Price; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.gts.api.listings.Listing; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; /** - * A QuickPurchase listing is the typical listing GTS provides. In general, this listing provides a one-time - * purchase for users who wish to simply avoid participating in auctions. Therefore, the price set for - * this listing option will be final and unmodifiable. + * B BbbbbBbbbbbbb bbbbbbb bb bbb bbbbbbb bbbbbbb BBB bbbbbbbb. Bb bbbbbbb, bbbb bbbbbbb bbbbbbbb b bbb-bbbb + * bbbbbbbb bbb bbbbb bbb bbbb bb bbbbbb bbbbb bbbbbbbbbbbbb bb bbbbbbbb. Bbbbbbbbb, bbb bbbbb bbb bbb + * bbbb bbbbbbb bbbbbb bbbb bb bbbbb bbb bbbbbbbbbbbb. */ -public interface BuyItNow extends Listing { +bbbbbb bbbbbbbbb BbbBbBbb bbbbbbb Bbbbbbb { /** - * Represents the price of this listing. This will be what a purchasing player must pay in order to buy this - * listing off the GTS. + * Bbbbbbbbbb bbb bbbbb bb bbbb bbbbbbb. Bbbb bbbb bb bbbb b bbbbbbbbbb bbbbbb bbbb bbb bb bbbbb bb bbb bbbb + * bbbbbbb bbb bbb BBB. * - * @return The price of the listing + * @bbbbbb Bbb bbbbb bb bbb bbbbbbb */ - Price getPrice(); + Bbbbb bbbBbbbb(); /** - * Represents the user who purchased a BIN listing + * Bbbbbbbbbb bbb bbbb bbb bbbbbbbbb b BBB bbbbbbb * - * @return The UUID of the user who purchased this BIN listing. + * @bbbbbb Bbb BBBB bb bbb bbbb bbb bbbbbbbbb bbbb BBB bbbbbbb. */ - UUID purchaser(); + BBBB bbbbbbbbb(); /** - * Represents that this BIN listing exists only due to a failed attempt to redeem a listing - * directly after a purchase. This listing should only attempt to return the entry, rather than - * the price to the listing owner, who in this case will now be the seller. + * Bbbbbbbbbb bbbb bbbb BBB bbbbbbb bbbbbb bbbb bbb bb b bbbbbb bbbbbbb bb bbbbbb b bbbbbbb + * bbbbbbbb bbbbb b bbbbbbbb. Bbbb bbbbbbb bbbbbb bbbb bbbbbbb bb bbbbbb bbb bbbbb, bbbbbb bbbb + * bbb bbbbb bb bbb bbbbbbb bbbbb, bbb bb bbbb bbbb bbbb bbb bb bbb bbbbbb. * - * @return True if stashed for the purchaser, false otherwise + * @bbbbbb Bbbb bb bbbbbbb bbb bbb bbbbbbbbb, bbbbb bbbbbbbbb */ - boolean stashedForPurchaser(); + bbbbbbb bbbbbbbBbbBbbbbbbbb(); /** - * Specifies whether or not this listing has been purchased + * Bbbbbbbbb bbbbbbb bb bbb bbbb bbbbbbb bbb bbbb bbbbbbbbb * - * @return True if purchased, false otherwise + * @bbbbbb Bbbb bb bbbbbbbbb, bbbbb bbbbbbbbb */ - boolean isPurchased(); + bbbbbbb bbBbbbbbbbb(); /** - * Marks a listing as purchased + * Bbbbb b bbbbbbb bb bbbbbbbbb */ - void markPurchased(); + bbbb bbbbBbbbbbbbb(); - static BuyItNowBuilder builder() { - return Impactor.getInstance().getRegistry().createBuilder(BuyItNowBuilder.class); + bbbbbb BbbBbBbbBbbbbbb bbbbbbb() { + bbbbbb Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbBbbbbbb(BbbBbBbbBbbbbbb.bbbbb); } - interface BuyItNowBuilder extends ListingBuilder { + bbbbbbbbb BbbBbBbbBbbbbbb bbbbbbb BbbbbbbBbbbbbb { /** - * Sets the price of this BIN listing + * Bbbb bbb bbbbb bb bbbb BBB bbbbbbb * - * @param price The price for the listing - * @return The updated builder + * @bbbbb bbbbb Bbb bbbbb bbb bbb bbbbbbb + * @bbbbbb Bbb bbbbbbb bbbbbbb */ - BuyItNowBuilder price(Price price); + BbbBbBbbBbbbbbb bbbbb(Bbbbb bbbbb); /** - * Indicates that the built listing has been purchased + * Bbbbbbbbb bbbb bbb bbbbb bbbbbbb bbb bbbb bbbbbbbbb * - * @return The updated builder + * @bbbbbb Bbb bbbbbbb bbbbbbb */ - BuyItNowBuilder purchased(); + BbbBbBbbBbbbbbb bbbbbbbbb(); /** - * Sets the user who purchased this listing + * Bbbb bbb bbbb bbb bbbbbbbbb bbbb bbbbbbb * - * @param purchaser The ID of the purchaser - * @return The updated builder + * @bbbbb bbbbbbbbb Bbb BB bb bbb bbbbbbbbb + * @bbbbbb Bbb bbbbbbb bbbbbbb */ - BuyItNowBuilder purchaser(UUID purchaser); + BbbBbBbbBbbbbbb bbbbbbbbb(BBBB bbbbbbbbb); /** - * Sets this BIN listing as a listing specifically set to be returned to the purchaser, - * likely due to a failure to reward the purchaser with what they purchased. + * Bbbb bbbb BBB bbbbbbb bb b bbbbbbb bbbbbbbbbbbb bbb bb bb bbbbbbbb bb bbb bbbbbbbbb, + * bbbbbb bbb bb b bbbbbbb bb bbbbbb bbb bbbbbbbbb bbbb bbbb bbbb bbbbbbbbb. * - * @return The updated builder + * @bbbbbb Bbb bbbbbbb bbbbbbb */ - BuyItNowBuilder stashedForPurchaser(); + BbbBbBbbBbbbbbb bbbbbbbBbbBbbbbbbbb(); - BuyItNowBuilder from(BuyItNow parent); + BbbBbBbbBbbbbbb bbbb(BbbBbBbb bbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/entries/Entry.java b/api/src/main/java/net/impactdev/gts/api/listings/entries/Entry.java index c3ff2a77..49434475 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/entries/Entry.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/entries/Entry.java @@ -1,100 +1,100 @@ -package net.impactdev.gts.api.listings.entries; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb; -import io.leangen.geantyref.TypeToken; -import net.impactdev.gts.api.data.Storable; -import net.impactdev.gts.api.listings.makeup.Display; -import net.kyori.adventure.text.TextComponent; +bbbbbb bb.bbbbbbb.bbbbbbbbb.BbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.BbbbBbbbbbbbb; -import java.lang.reflect.Type; -import java.util.List; -import java.util.Optional; -import java.util.UUID; +bbbbbb bbbb.bbbb.bbbbbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BBBB; /** - * An Entry is the object that contains the essential information of what is being listed on the GTS. More precisely, - * it is the instance responsible for providing the listing information of how to process deposits and purchases/ - * withdrawals of the instance being listed on the market. + * Bb Bbbbb bb bbb bbbbbb bbbb bbbbbbbb bbb bbbbbbbbb bbbbbbbbbbb bb bbbb bb bbbbb bbbbbb bb bbb BBB. Bbbb bbbbbbbbb, + * bb bb bbb bbbbbbbb bbbbbbbbbbb bbb bbbbbbbbb bbb bbbbbbb bbbbbbbbbbb bb bbb bb bbbbbbb bbbbbbbb bbb bbbbbbbbb/ + * bbbbbbbbbbb bb bbb bbbbbbbb bbbbb bbbbbb bb bbb bbbbbb. * - *

Based on the nature of some objects and how they are defined, the actual items being purchased may not - * be easily serializable. GTS loves to store objects as JSON representations when it can, and some objects by - * nature destroy this model. As such, if a listing option hits this barrier, the instance should be broken - * into two representations, the Store and Out options.

+ * Bbbbb bb bbb bbbbbb bb bbbb bbbbbbb bbb bbb bbbb bbb bbbbbbb, bbb bbbbbb bbbbb bbbbb bbbbbbbbb bbb bbb + * bb bbbbbb bbbbbbbbbbbb. BBB bbbbb bb bbbbb bbbbbbb bb BBBB bbbbbbbbbbbbbbb bbbb bb bbb, bbb bbbb bbbbbbb bb + * bbbbbb bbbbbbb bbbb bbbbb. Bb bbbb, bb b bbbbbbb bbbbbb bbbb bbbb bbbbbbb, bbb bbbbbbbb bbbbbb bb bbbbbb + * bbbb bbb bbbbbbbbbbbbbbb, bbb Bbbbb bbb Bbb bbbbbbb. * - * @param The actual object that is meant to be represented by this entry + * @bbbbb Bbb bbbbbb bbbbbb bbbb bb bbbbb bb bb bbbbbbbbbbb bb bbbb bbbbb */ -public interface Entry extends Storable { +bbbbbb bbbbbbbbb Bbbbb bbbbbbb Bbbbbbbb { - Class> type(); + Bbbbb> bbbb(); - default TypeToken element() { - return new TypeToken() {}; + bbbbbbb BbbbBbbbb bbbbbbb() { + bbbbbb bbb BbbbBbbbb() {}; } /** - * This represents the output element of this entry. As a entry will typically be transient, if not serializable - * by default, this call will attempt to fetch from the internal cache of this entry. If that element is not present, - * then this call will create that instance for its reference. + * Bbbb bbbbbbbbbb bbb bbbbbb bbbbbbb bb bbbb bbbbb. Bb b bbbbb bbbb bbbbbbbbb bb bbbbbbbbb, bb bbb bbbbbbbbbbbb + * bb bbbbbbb, bbbb bbbb bbbb bbbbbbb bb bbbbb bbbb bbb bbbbbbbb bbbbb bb bbbb bbbbb. Bb bbbb bbbbbbb bb bbb bbbbbbb, + * bbbb bbbb bbbb bbbb bbbbbb bbbb bbbbbbbb bbb bbb bbbbbbbbb. * - * @return The output element built from the internal data-store object. + * @bbbbbb Bbb bbbbbb bbbbbbb bbbbb bbbb bbb bbbbbbbb bbbb-bbbbb bbbbbb. */ - T getOrCreateElement(); + B bbbBbBbbbbbBbbbbbb(); /** - * Specifies the name of this entry. This will often just be the name of the entry itself, if it has a name. + * Bbbbbbbbb bbb bbbb bb bbbb bbbbb. Bbbb bbbb bbbbb bbbb bb bbb bbbb bb bbb bbbbb bbbbbb, bb bb bbb b bbbb. * - * @return The name of this entry + * @bbbbbb Bbb bbbb bb bbbb bbbbb */ - TextComponent getName(); + BbbbBbbbbbbbb bbbBbbb(); /** - * Represents a short description we will output to chat for placeholder usage. + * Bbbbbbbbbb b bbbbb bbbbbbbbbbb bb bbbb bbbbbb bb bbbb bbb bbbbbbbbbbb bbbbb. * - * @return The description we want to use to detail a listing + * @bbbbbb Bbb bbbbbbbbbbb bb bbbb bb bbb bb bbbbbb b bbbbbbb */ - TextComponent getDescription(); + BbbbBbbbbbbbb bbbBbbbbbbbbbb(); /** - * Represents how this entry should be displayed to a user querying this entry. + * Bbbbbbbbbb bbb bbbb bbbbb bbbbbb bb bbbbbbbbb bb b bbbb bbbbbbbb bbbb bbbbb. * - * @param viewer The ID of the user viewing the display - * @return The overall display of the listing. + * @bbbbb bbbbbb Bbb BB bb bbb bbbb bbbbbbb bbb bbbbbbb + * @bbbbbb Bbb bbbbbbb bbbbbbb bb bbb bbbbbbb. */ - Display getDisplay(UUID viewer); + Bbbbbbb bbbBbbbbbb(BBBB bbbbbb); /** - * Attempts to give the listing to the recipient. If the recipient doesn't currently meet the requirements to - * receive this listing, such as having a full inventory, this listing will be cached such that they can receive it - * at a later time. + * Bbbbbbbb bb bbbb bbb bbbbbbb bb bbb bbbbbbbbb. Bb bbb bbbbbbbbb bbbbb'b bbbbbbbbb bbbb bbb bbbbbbbbbbbb bb + * bbbbbbb bbbb bbbbbbb, bbbb bb bbbbbb b bbbb bbbbbbbbb, bbbb bbbbbbb bbbb bb bbbbbb bbbb bbbb bbbb bbb bbbbbbb bb + * bb b bbbbb bbbb. * - *

This call shouldn't attempt to do the caching, the system will handle that itself when this call returns - * false. Therefore, it is also essential that an implementation returns the proper result as to avoid duplication.

+ * Bbbb bbbb bbbbbbb'b bbbbbbb bb bb bbb bbbbbbb, bbb bbbbbb bbbb bbbbbb bbbb bbbbbb bbbb bbbb bbbb bbbbbbb + * bbbbb. Bbbbbbbbb, bb bb bbbb bbbbbbbbb bbbb bb bbbbbbbbbbbbbb bbbbbbb bbb bbbbbb bbbbbb bb bb bbbbb bbbbbbbbbbb. * - * @param receiver The recipient of the entry - * @return True if the listing was received, false otherwise. + * @bbbbb bbbbbbbb Bbb bbbbbbbbb bb bbb bbbbb + * @bbbbbb Bbbb bb bbb bbbbbbb bbb bbbbbbbb, bbbbb bbbbbbbbb. */ - boolean give(UUID receiver); + bbbbbbb bbbb(BBBB bbbbbbbb); /** - * Attempts to take the listing from the depositor. If the user doesn't actually have what they are trying to sell, - * this call will return false to detail that the action has failed. Otherwise, true will state that this object has - * been successfully taken from the depositor, and can be placed into the GTS market. + * Bbbbbbbb bb bbbb bbb bbbbbbb bbbb bbb bbbbbbbbb. Bb bbb bbbb bbbbb'b bbbbbbbb bbbb bbbb bbbb bbb bbbbbb bb bbbb, + * bbbb bbbb bbbb bbbbbb bbbbb bb bbbbbb bbbb bbb bbbbbb bbb bbbbbb. Bbbbbbbbb, bbbb bbbb bbbbb bbbb bbbb bbbbbb bbb + * bbbb bbbbbbbbbbbb bbbbb bbbb bbb bbbbbbbbb, bbb bbb bb bbbbbb bbbb bbb BBB bbbbbb. * - * @param depositor The depositor of the entry - * @return True if the listing was taken from the user, false otherwise + * @bbbbb bbbbbbbbb Bbb bbbbbbbbb bb bbb bbbbb + * @bbbbbb Bbbb bb bbb bbbbbbb bbb bbbbb bbbb bbb bbbb, bbbbb bbbbbbbbb */ - boolean take(UUID depositor); + bbbbbbb bbbb(BBBB bbbbbbbbb); /** - * Represents a URL mapping to an image that can represent the listing + * Bbbbbbbbbb b BBB bbbbbbb bb bb bbbbb bbbb bbb bbbbbbbbb bbb bbbbbbb * - * @return A URL representing the listing + * @bbbbbb B BBB bbbbbbbbbbbb bbb bbbbbbb */ - Optional getThumbnailURL(); + Bbbbbbbb bbbBbbbbbbbbBBB(); /** - * Represents a set of details mapping to the listing + * Bbbbbbbbbb b bbb bb bbbbbbb bbbbbbb bb bbb bbbbbbb * - * @return A set of details describing the listing + * @bbbbbb B bbb bb bbbbbbb bbbbbbbbbb bbb bbbbbbb */ - List getDetails(); + Bbbb bbbBbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/entries/EntryManager.java b/api/src/main/java/net/impactdev/gts/api/listings/entries/EntryManager.java index eca23079..78a10d70 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/entries/EntryManager.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/entries/EntryManager.java @@ -1,58 +1,58 @@ -package net.impactdev.gts.api.listings.entries; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb; -import net.impactdev.gts.api.commands.CommandGenerator; -import net.impactdev.gts.api.data.ResourceManager; -import net.impactdev.gts.api.listings.ui.EntrySelection; -import net.impactdev.gts.api.listings.ui.EntryUI; -import net.impactdev.gts.api.util.Version; -import net.impactdev.impactor.api.platform.players.PlatformPlayer; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.BbbbbbbBbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bb.BbbbbBbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bb.BbbbbBB; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.bbbbbbb.BbbbbbbbBbbbbb; -import java.util.function.Supplier; +bbbbbb bbbb.bbbb.bbbbbbbb.Bbbbbbbb; -public interface EntryManager extends ResourceManager { +bbbbbb bbbbbbbbb BbbbbBbbbbbb bbbbbbb BbbbbbbbBbbbbbb { - Class supported(); + Bbbbb bbbbbbbbb(); /** - * For use in configuration, determines how the blacklist should represent blacklisted options - * for this entry typing. + * Bbb bbb bb bbbbbbbbbbbbb, bbbbbbbbbb bbb bbb bbbbbbbbb bbbbbb bbbbbbbbb bbbbbbbbbbb bbbbbbb + * bbb bbbb bbbbb bbbbbb. * - * @return The type of class this entry validates against + * @bbbbbb Bbb bbbb bb bbbbb bbbb bbbbb bbbbbbbbb bbbbbbb */ - Class getBlacklistType(); + Bbbbb bbbBbbbbbbbbBbbb(); /** - * The UI that a user will use to create a listing specific to the particular Entry type. These - * allow for customization of the selling menu, but it is advised you keep the components of the UI - * similar so a player is not easily confused. + * Bbb BB bbbb b bbbb bbbb bbb bb bbbbbb b bbbbbbb bbbbbbbb bb bbb bbbbbbbbbb Bbbbb bbbb. Bbbbb + * bbbbb bbb bbbbbbbbbbbbb bb bbb bbbbbbb bbbb, bbb bb bb bbbbbbb bbb bbbb bbb bbbbbbbbbb bb bbb BB + * bbbbbbb bb b bbbbbb bb bbb bbbbbb bbbbbbbb. * - * @return The UI responsible for creating a new listing based on the type managed by this Entry Manager + * @bbbbbb Bbb BB bbbbbbbbbbb bbb bbbbbbbb b bbb bbbbbbb bbbbb bb bbb bbbb bbbbbbb bb bbbb Bbbbb Bbbbbbb */ - Supplier> getSellingUI(PlatformPlayer player); + Bbbbbbbb> bbbBbbbbbbBB(BbbbbbbbBbbbbb bbbbbb); /** - * Supplies a set of deserializer options for the given entry type. This is where you can allow for multiple - * versions of deserialization based on the data being read through JSON. + * Bbbbbbbb b bbb bb bbbbbbbbbbbb bbbbbbb bbb bbb bbbbb bbbbb bbbb. Bbbb bb bbbbb bbb bbb bbbbb bbb bbbbbbbb + * bbbbbbbb bb bbbbbbbbbbbbbbb bbbbb bb bbb bbbb bbbbb bbbb bbbbbbb BBBB. */ - void supplyDeserializers(); + bbbb bbbbbbBbbbbbbbbbbbb(); /** - * Represents the executor that will handle processing of creating an entry from a command context. - * This will be queried and attached as a child to the sell command at time of construction for the sell command. - * To ensure readiness, this should be available before enable/initialization. + * Bbbbbbbbbb bbb bbbbbbbb bbbb bbbb bbbbbb bbbbbbbbbb bb bbbbbbbb bb bbbbb bbbb b bbbbbbb bbbbbbb. + * Bbbb bbbb bb bbbbbbb bbb bbbbbbbb bb b bbbbb bb bbb bbbb bbbbbbb bb bbbb bb bbbbbbbbbbbb bbb bbb bbbb bbbbbbb. + * Bb bbbbbb bbbbbbbbb, bbbb bbbbbb bb bbbbbbbbb bbbbbb bbbbbb/bbbbbbbbbbbbbb. * - * @return The executor for the entry type when combined with /gts sell - * @since 6.1.8 + * @bbbbbb Bbb bbbbbbbb bbb bbb bbbbb bbbb bbbb bbbbbbbb bbbb /bbb bbbb + * @bbbbb 6.1.8 */ - CommandGenerator.EntryGenerator>> getEntryCommandCreator(); + BbbbbbbBbbbbbbbb.BbbbbBbbbbbbbb>> bbbBbbbbBbbbbbbBbbbbbb(); /** - * Checks to see if the incoming data is supported on the current game platform. + * Bbbbbb bb bbb bb bbb bbbbbbbb bbbb bb bbbbbbbbb bb bbb bbbbbbb bbbb bbbbbbbb. * - * @param game - * @param content - * @return + * @bbbbb bbbb + * @bbbbb bbbbbbb + * @bbbbbb */ - boolean supports(Version game, int content); + bbbbbbb bbbbbbbb(Bbbbbbb bbbb, bbb bbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/makeup/Display.java b/api/src/main/java/net/impactdev/gts/api/listings/makeup/Display.java index 90ffd5db..a598d52c 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/makeup/Display.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/makeup/Display.java @@ -1,13 +1,13 @@ -package net.impactdev.gts.api.listings.makeup; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb; -public interface Display { +bbbbbb bbbbbbbbb Bbbbbbb { /** - * Represents the display that'll be used when this listing is queried in a GTS user interface. This will realistically - * be an ItemStack based on the server system used. + * Bbbbbbbbbb bbb bbbbbbb bbbb'bb bb bbbb bbbb bbbb bbbbbbb bb bbbbbbb bb b BBB bbbb bbbbbbbbb. Bbbb bbbb bbbbbbbbbbbbb + * bb bb BbbbBbbbb bbbbb bb bbb bbbbbb bbbbbb bbbb. * - * @return The instance used to display this listing + * @bbbbbb Bbb bbbbbbbb bbbb bb bbbbbbb bbbb bbbbbbb */ - T get(); + B bbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/makeup/Fees.java b/api/src/main/java/net/impactdev/gts/api/listings/makeup/Fees.java index 0f079c78..9370b9c1 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/makeup/Fees.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/makeup/Fees.java @@ -1,61 +1,61 @@ -package net.impactdev.gts.api.listings.makeup; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb; -import net.impactdev.gts.api.listings.prices.Price; -import net.impactdev.impactor.api.builders.Builder; -import net.impactdev.impactor.api.utilities.Time; -import net.impactdev.impactor.api.utilities.mappings.Tuple; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbb.Bbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbb.bbbbbbbb.Bbbbb; -public class Fees { +bbbbbb bbbbb Bbbb { - private final Tuple, Boolean> price; - private final Tuple time; + bbbbbbb bbbbb Bbbbb, Bbbbbbb> bbbbb; + bbbbbbb bbbbb Bbbbb bbbb; - public Fees(FeeBuilder builder) { - this.price = builder.price; - this.time = builder.time; + bbbbbb Bbbb(BbbBbbbbbb bbbbbbb) { + bbbb.bbbbb = bbbbbbb.bbbbb; + bbbb.bbbb = bbbbbbb.bbbb; } - public Tuple, Boolean> getPrice() { - return this.price; + bbbbbb Bbbbb, Bbbbbbb> bbbBbbbb() { + bbbbbb bbbb.bbbbb; } - public Tuple getTime() { - return this.time; + bbbbbb Bbbbb bbbBbbb() { + bbbbbb bbbb.bbbb; } - public double getTotal() { - return this.price.getFirst().calculateFee(this.price.getSecond()) + this.time.getSecond(); + bbbbbb bbbbbb bbbBbbbb() { + bbbbbb bbbb.bbbbb.bbbBbbbb().bbbbbbbbbBbb(bbbb.bbbbb.bbbBbbbbb()) + bbbb.bbbb.bbbBbbbbb(); } - public static FeeBuilder builder() { - return new FeeBuilder(); + bbbbbb bbbbbb BbbBbbbbbb bbbbbbb() { + bbbbbb bbb BbbBbbbbbb(); } - public static class FeeBuilder implements Builder { + bbbbbb bbbbbb bbbbb BbbBbbbbbb bbbbbbbbbb Bbbbbbb { - private Tuple, Boolean> price; - private Tuple time; + bbbbbbb Bbbbb, Bbbbbbb> bbbbb; + bbbbbbb Bbbbb bbbb; - public FeeBuilder price(Price value, boolean type) { - this.price = new Tuple<>(value, type); - return this; + bbbbbb BbbBbbbbbb bbbbb(Bbbbb bbbbb, bbbbbbb bbbb) { + bbbb.bbbbb = bbb Bbbbb<>(bbbbb, bbbb); + bbbbbb bbbb; } - public FeeBuilder time(Time time, double value) { - this.time = new Tuple<>(time, value); - return this; + bbbbbb BbbBbbbbbb bbbb(Bbbb bbbb, bbbbbb bbbbb) { + bbbb.bbbb = bbb Bbbbb<>(bbbb, bbbbb); + bbbbbb bbbb; } -// @Override -// public FeeBuilder from(Fees fees) { -// this.price = fees.price; -// this.time = fees.time; -// return this; +// @Bbbbbbbb +// bbbbbb BbbBbbbbbb bbbb(Bbbb bbbb) { +// bbbb.bbbbb = bbbb.bbbbb; +// bbbb.bbbb = bbbb.bbbb; +// bbbbbb bbbb; // } - @Override - public Fees build() { - return new Fees(this); + @Bbbbbbbb + bbbbbb Bbbb bbbbb() { + bbbbbb bbb Bbbb(bbbb); } } } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/manager/ListingManager.java b/api/src/main/java/net/impactdev/gts/api/listings/manager/ListingManager.java index f7d97773..425068ae 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/manager/ListingManager.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/manager/ListingManager.java @@ -1,26 +1,26 @@ -package net.impactdev.gts.api.listings.manager; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb; -import net.impactdev.impactor.api.services.Service; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.gts.api.listings.auctions.Auction; -import net.impactdev.gts.api.listings.buyitnow.BuyItNow; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb.BbbBbBbb; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbbbbbBbbbbb; -public interface ListingManager extends Service { +bbbbbb bbbbbbbbb BbbbbbbBbbbbbb bbbbbbb Bbbbbbb { - CompletableFuture list(UUID lister, L listing); + BbbbbbbbbbbBbbbbb bbbb(BBBB bbbbbb, B bbbbbbb); - CompletableFuture bid(UUID bidder, A listing, double amount); + BbbbbbbbbbbBbbbbb bbb(BBBB bbbbbb, B bbbbbbb, bbbbbb bbbbbb); - CompletableFuture purchase(UUID buyer, B listing, S source); + BbbbbbbbbbbBbbbbb bbbbbbbb(BBBB bbbbb, B bbbbbbb, B bbbbbb); - CompletableFuture deleteListing(L listing); + BbbbbbbbbbbBbbbbb bbbbbbBbbbbbb(B bbbbbbb); - CompletableFuture hasMaxListings(UUID lister); + BbbbbbbbbbbBbbbbb bbbBbbBbbbbbbb(BBBB bbbbbb); - CompletableFuture> fetchListings(); + BbbbbbbbbbbBbbbbb> bbbbbBbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/prices/Price.java b/api/src/main/java/net/impactdev/gts/api/listings/prices/Price.java index 8d13df4c..e48bf0b3 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/prices/Price.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/prices/Price.java @@ -1,90 +1,90 @@ -package net.impactdev.gts.api.listings.prices; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb; -import net.impactdev.gts.api.data.Storable; -import net.impactdev.gts.api.listings.makeup.Display; -import net.kyori.adventure.text.TextComponent; -import org.checkerframework.checker.nullness.qual.NonNull; -import org.checkerframework.checker.nullness.qual.Nullable; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.BbbbBbbbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.Bbbbbbbb; -import java.util.UUID; -import java.util.concurrent.atomic.AtomicBoolean; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbbbb.bbbbbb.BbbbbbBbbbbbb; /** - * Represents a value which a player will pay to purchase (or bid) on a listing. + * Bbbbbbbbbb b bbbbb bbbbb b bbbbbb bbbb bbb bb bbbbbbbb (bb bbb) bb b bbbbbbb. * - * @param

The element that is controlled by this interface - * @param A potentially populated field indicating payment source from the player - * @param The display output type for this price + * @bbbbb Bbb bbbbbbb bbbb bb bbbbbbbbbb bb bbbb bbbbbbbbb + * @bbbbb B bbbbbbbbbbb bbbbbbbbb bbbbb bbbbbbbbbb bbbbbbb bbbbbb bbbb bbb bbbbbb + * @bbbbb Bbb bbbbbbb bbbbbb bbbb bbb bbbb bbbbb */ -public interface Price extends Storable { +bbbbbb bbbbbbbbb Bbbbb bbbbbbb Bbbbbbbb { /** - * The instance being setup as the price. So this might be a double or BigDecimal to represent some form of monetary - * value, or another instance to represent something more. + * Bbb bbbbbbbb bbbbb bbbbb bb bbb bbbbb. Bb bbbb bbbbb bb b bbbbbb bb BbbBbbbbbb bb bbbbbbbbb bbbb bbbb bb bbbbbbbb + * bbbbb, bb bbbbbbb bbbbbbbb bb bbbbbbbbb bbbbbbbbb bbbb. * - * @return The instance being used as the mark for the price + * @bbbbbb Bbb bbbbbbbb bbbbb bbbb bb bbb bbbb bbb bbb bbbbb */ - P getPrice(); + B bbbBbbbb(); /** - * Represents the output of the price as it is to be displayed to the user querying the listing. In more general terms, - * this would represent the value, so for a dollar based currency, this would be something like "$500" + * Bbbbbbbbbb bbb bbbbbb bb bbb bbbbb bb bb bb bb bb bbbbbbbbb bb bbb bbbb bbbbbbbb bbb bbbbbbb. Bb bbbb bbbbbbb bbbbb, + * bbbb bbbbb bbbbbbbbb bbb bbbbb, bb bbb b bbbbbb bbbbb bbbbbbbb, bbbb bbbbb bb bbbbbbbbb bbbb "$500" * - * @return The textual representation of the price + * @bbbbbb Bbb bbbbbbb bbbbbbbbbbbbbb bb bbb bbbbb */ - TextComponent getText(); + BbbbBbbbbbbbb bbbBbbb(); /** - * Represents the look of a price should it be held in reserve for a player to accept or log back in, depending - * on the mode selected by the server configuration. + * Bbbbbbbbbb bbb bbbb bb b bbbbb bbbbbb bb bb bbbb bb bbbbbbb bbb b bbbbbb bb bbbbbb bb bbb bbbb bb, bbbbbbbbb + * bb bbb bbbb bbbbbbbb bb bbb bbbbbb bbbbbbbbbbbbb. * - * @return The displayable representation of a price + * @bbbbbb Bbb bbbbbbbbbbb bbbbbbbbbbbbbb bb b bbbbb */ - Display getDisplay(); + Bbbbbbb bbbBbbbbbb(); /** - * Determines whether or not the user paying for the listing can actually pay the price. If they can, this call will - * return true. Otherwise, this call will return false to mark that any further action should be cancelled. + * Bbbbbbbbbb bbbbbbb bb bbb bbb bbbb bbbbbb bbb bbb bbbbbbb bbb bbbbbbbb bbb bbb bbbbb. Bb bbbb bbb, bbbb bbbb bbbb + * bbbbbb bbbb. Bbbbbbbbb, bbbb bbbb bbbb bbbbbb bbbbb bb bbbb bbbb bbb bbbbbbb bbbbbb bbbbbb bb bbbbbbbbb. * - * @param payer The user paying for the listing - * @return True if the user can pay, false otherwise + * @bbbbb bbbbb Bbb bbbb bbbbbb bbb bbb bbbbbbb + * @bbbbbb Bbbb bb bbb bbbb bbb bbb, bbbbb bbbbbbbbb */ - boolean canPay(UUID payer); + bbbbbbb bbbBbb(BBBB bbbbb); /** - * Processes the payment for the user paying for the listing. This call should be made after verifying the user - * can actually complete the payment, via {@link #canPay(UUID)}. + * Bbbbbbbbb bbb bbbbbbb bbb bbb bbbb bbbbbb bbb bbb bbbbbbb. Bbbb bbbb bbbbbb bb bbbb bbbbb bbbbbbbbb bbb bbbb + * bbb bbbbbbbb bbbbbbbb bbb bbbbbbb, bbb {@bbbb #bbbBbb(BBBB)}. * - * @param payer The user paying for the listing - * @param source Source data that might need to be written to the price - * @param marker A reference to the caller that will inform it that the data has been processed and is - * ready for updating. This field MUST be updated per implementation. Failure to set it - * accordingly will result in loss of data + * @bbbbb bbbbb Bbb bbbb bbbbbb bbb bbb bbbbbbb + * @bbbbb bbbbbb Bbbbbb bbbb bbbb bbbbb bbbb bb bb bbbbbbb bb bbb bbbbb + * @bbbbb bbbbbb B bbbbbbbbb bb bbb bbbbbb bbbb bbbb bbbbbb bb bbbb bbb bbbb bbb bbbb bbbbbbbbb bbb bb + * bbbbb bbb bbbbbbbb. Bbbb bbbbb BBBB bb bbbbbbb bbb bbbbbbbbbbbbbb. Bbbbbbb bb bbb bb + * bbbbbbbbbbb bbbb bbbbbb bb bbbb bb bbbb */ - void pay(UUID payer, @Nullable Object source, @NonNull AtomicBoolean marker); + bbbb bbb(BBBB bbbbb, @Bbbbbbbb Bbbbbb bbbbbb, @BbbBbbb BbbbbbBbbbbbb bbbbbb); /** - * Processes the receiving end of a payment. Sometimes, a price may be unable to be completed due to offline - * restrictions, so this call may temporarily store the payment as a later receivable for the user intended - * to receive the payment. + * Bbbbbbbbb bbb bbbbbbbbb bbb bb b bbbbbbb. Bbbbbbbbb, b bbbbb bbb bb bbbbbb bb bb bbbbbbbbb bbb bb bbbbbbb + * bbbbbbbbbbbb, bb bbbb bbbb bbb bbbbbbbbbbb bbbbb bbb bbbbbbb bb b bbbbb bbbbbbbbbb bbb bbb bbbb bbbbbbbb + * bb bbbbbbb bbb bbbbbbb. * - * @param recipient The user receiving the payment + * @bbbbb bbbbbbbbb Bbb bbbb bbbbbbbbb bbb bbbbbbb */ - boolean reward(UUID recipient); + bbbbbbb bbbbbb(BBBB bbbbbbbbb); /** - * Represents the typing of the source that should be applied to a listings price + * Bbbbbbbbbb bbb bbbbbb bb bbb bbbbbb bbbb bbbbbb bb bbbbbbb bb b bbbbbbbb bbbbb * - * @return A type token wrapping the source type + * @bbbbbb B bbbb bbbbb bbbbbbbb bbb bbbbbb bbbb */ - Class getSourceType(); + Bbbbb bbbBbbbbbBbbb(); /** - * Calculates and returns the fee a user should pay for selecting this price + * Bbbbbbbbbb bbb bbbbbbb bbb bbb b bbbb bbbbbb bbb bbb bbbbbbbbb bbbb bbbbb * - * @param listingType true if BIN, false if Auction - * @return The fee a user is to pay for this price + * @bbbbb bbbbbbbBbbb bbbb bb BBB, bbbbb bb Bbbbbbb + * @bbbbbb Bbb bbb b bbbb bb bb bbb bbb bbbb bbbbb */ - long calculateFee(boolean listingType); + bbbb bbbbbbbbbBbb(bbbbbbb bbbbbbbBbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/prices/PriceControlled.java b/api/src/main/java/net/impactdev/gts/api/listings/prices/PriceControlled.java index 7ce572b1..77eabdec 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/prices/PriceControlled.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/prices/PriceControlled.java @@ -1,13 +1,13 @@ -package net.impactdev.gts.api.listings.prices; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb; /** - * Represents an Entry that has a set of price controls applied to it. This design is meant to only - * cover prices that are controlled via a set currency background. + * Bbbbbbbbbb bb Bbbbb bbbb bbb b bbb bb bbbbb bbbbbbbb bbbbbbb bb bb. Bbbb bbbbbb bb bbbbb bb bbbb + * bbbbb bbbbbb bbbb bbb bbbbbbbbbb bbb b bbb bbbbbbbb bbbbbbbbbb. */ -public interface PriceControlled { +bbbbbb bbbbbbbbb BbbbbBbbbbbbbbb { - double getMin(); + bbbbbb bbbBbb(); - double getMax(); + bbbbbb bbbBbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/prices/PriceManager.java b/api/src/main/java/net/impactdev/gts/api/listings/prices/PriceManager.java index 7b8863ad..81c0583b 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/prices/PriceManager.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/prices/PriceManager.java @@ -1,36 +1,36 @@ -package net.impactdev.gts.api.listings.prices; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb; -import net.impactdev.gts.api.commands.CommandGenerator; -import net.impactdev.gts.api.data.ResourceManager; -import net.impactdev.gts.api.listings.ui.EntryUI; -import net.impactdev.impactor.api.platform.players.PlatformPlayer; -import net.impactdev.impactor.api.ui.containers.ImpactorUI; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.BbbbbbbBbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bb.BbbbbBB; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.bbbbbbb.BbbbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bb.bbbbbbbbbb.BbbbbbbbBB; -import java.util.Optional; -import java.util.function.BiConsumer; -import java.util.function.Consumer; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbb.BbBbbbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbb.Bbbbbbbb; -public interface PriceManager extends ResourceManager { +bbbbbb bbbbbbbbb BbbbbBbbbbbb bbbbbbb BbbbbbbbBbbbbbb { - void process(PlatformPlayer target, EntryUI source, BiConsumer, Price> callback); + bbbb bbbbbbb(BbbbbbbbBbbbbb bbbbbb, BbbbbBB bbbbbb, BbBbbbbbbb, Bbbbb> bbbbbbbb); - Optional getSelector(PlatformPlayer viewer, Price price, Consumer callback); + Bbbbbbbb bbbBbbbbbbb(BbbbbbbbBbbbbb bbbbbb, Bbbbb bbbbb, Bbbbbbbb bbbbbbbb); /** - * Represents the executor that will handle processing of creating an entry from a command context. - * This will be queried and attached as a child to the sell command at time of construction for the sell command. - * To ensure readiness, this should be available before enable/initialization. + * Bbbbbbbbbb bbb bbbbbbbb bbbb bbbb bbbbbb bbbbbbbbbb bb bbbbbbbb bb bbbbb bbbb b bbbbbbb bbbbbbb. + * Bbbb bbbb bb bbbbbbb bbb bbbbbbbb bb b bbbbb bb bbb bbbb bbbbbbb bb bbbb bb bbbbbbbbbbbb bbb bbb bbbb bbbbbbb. + * Bb bbbbbb bbbbbbbbb, bbbb bbbbbb bb bbbbbbbbb bbbbbb bbbbbb/bbbbbbbbbbbbbb. * - * @return The executor for the entry type when combined with /gts sell - * @since 6.1.8 + * @bbbbbb Bbb bbbbbbbb bbb bbb bbbbb bbbb bbbb bbbbbbbb bbbb /bbb bbbb + * @bbbbb 6.1.8 */ - CommandGenerator.PriceGenerator> getPriceCommandCreator(); + BbbbbbbBbbbbbbbb.BbbbbBbbbbbbbb> bbbBbbbbBbbbbbbBbbbbbb(); - interface PriceSelectorUI { + bbbbbbbbb BbbbbBbbbbbbbBB { - ImpactorUI getDisplay(); + BbbbbbbbBB bbbBbbbbbb(); - Consumer getCallback(); + Bbbbbbbb bbbBbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/ui/AbstractEntryUI.java b/api/src/main/java/net/impactdev/gts/api/listings/ui/AbstractEntryUI.java index 3160cb77..f08911ac 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/ui/AbstractEntryUI.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/ui/AbstractEntryUI.java @@ -1,24 +1,24 @@ -package net.impactdev.gts.api.listings.ui; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bb; -import net.impactdev.impactor.api.platform.players.PlatformPlayer; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.bbbbbbb.BbbbbbbbBbbbbb; -import java.util.Optional; +bbbbbb bbbb.bbbb.Bbbbbbbb; -@SuppressWarnings({"FieldCanBeLocal", "FieldMayBeFinal"}) -public abstract class AbstractEntryUI implements EntryUI { +@BbbbbbbbBbbbbbbb({"BbbbbBbbBbBbbbb", "BbbbbBbbBbBbbbb"}) +bbbbbb bbbbbbbb bbbbb BbbbbbbbBbbbbBB bbbbbbbbbb BbbbbBB { - protected final PlatformPlayer viewer; - protected E chosen; + bbbbbbbbb bbbbb BbbbbbbbBbbbbb bbbbbb; + bbbbbbbbb B bbbbbb; - public AbstractEntryUI(PlatformPlayer viewer) { - this.viewer = viewer; + bbbbbb BbbbbbbbBbbbbBB(BbbbbbbbBbbbbb bbbbbb) { + bbbb.bbbbbb = bbbbbb; } - @Override - public Optional getChosenOption() { - return Optional.ofNullable(this.chosen); + @Bbbbbbbb + bbbbbb Bbbbbbbb bbbBbbbbbBbbbbb() { + bbbbbb Bbbbbbbb.bbBbbbbbbb(bbbb.bbbbbb); } - public abstract void setChosen(E chosen); + bbbbbb bbbbbbbb bbbb bbbBbbbbb(B bbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/ui/EntrySelection.java b/api/src/main/java/net/impactdev/gts/api/listings/ui/EntrySelection.java index 35d4e491..aa2319bc 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/ui/EntrySelection.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/ui/EntrySelection.java @@ -1,9 +1,9 @@ -package net.impactdev.gts.api.listings.ui; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bb; -import net.impactdev.gts.api.listings.entries.Entry; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.Bbbbb; -public interface EntrySelection> { +bbbbbb bbbbbbbbb BbbbbBbbbbbbbb> { - T createFromSelection(); + B bbbbbbBbbbBbbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/listings/ui/EntryUI.java b/api/src/main/java/net/impactdev/gts/api/listings/ui/EntryUI.java index 6ba34ce3..591f2033 100644 --- a/api/src/main/java/net/impactdev/gts/api/listings/ui/EntryUI.java +++ b/api/src/main/java/net/impactdev/gts/api/listings/ui/EntryUI.java @@ -1,28 +1,28 @@ -package net.impactdev.gts.api.listings.ui; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bb; -import net.impactdev.impactor.api.platform.players.PlatformPlayer; -import net.impactdev.impactor.api.ui.containers.icons.Icon; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.bbbbbbb.BbbbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bb.bbbbbbbbbb.bbbbb.Bbbb; -import java.util.Optional; +bbbbbb bbbb.bbbb.Bbbbbbbb; -public interface EntryUI { +bbbbbb bbbbbbbbb BbbbbBB { - Optional getChosenOption(); + Bbbbbbbb bbbBbbbbbBbbbbb(); - void open(PlatformPlayer user); + bbbb bbbb(BbbbbbbbBbbbbb bbbb); - Icon generateWaitingIcon(boolean auction); + Bbbb bbbbbbbbBbbbbbbBbbb(bbbbbbb bbbbbbb); - Icon generateConfirmIcon(); + Bbbb bbbbbbbbBbbbbbbBbbb(); - Icon createNoneChosenIcon(); + Bbbb bbbbbbBbbbBbbbbbBbbb(); - Icon createChosenIcon(); + Bbbb bbbbbbBbbbbbBbbb(); - Icon createPriceIcon(); + Bbbb bbbbbbBbbbbBbbb(); - Icon createTimeIcon(); + Bbbb bbbbbbBbbbBbbb(); - void style(boolean selected); + bbbb bbbbb(bbbbbbb bbbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/logs/Log.java b/api/src/main/java/net/impactdev/gts/api/logs/Log.java index 107ed857..30e33127 100644 --- a/api/src/main/java/net/impactdev/gts/api/logs/Log.java +++ b/api/src/main/java/net/impactdev/gts/api/logs/Log.java @@ -1,54 +1,54 @@ -package net.impactdev.gts.api.logs; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.impactor.api.builders.Builder; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; /** - * Represents a set of details that provide general information about an action carried out by some user - * or system with GTS. + * Bbbbbbbbbb b bbb bb bbbbbbb bbbb bbbbbbb bbbbbbb bbbbbbbbbbb bbbbb bb bbbbbb bbbbbbb bbb bb bbbb bbbb + * bb bbbbbb bbbb BBB. */ -public interface Log { +bbbbbb bbbbbbbbb Bbb { - static LogBuilder builder() { - return Impactor.getInstance().getRegistry().createBuilder(LogBuilder.class); + bbbbbb BbbBbbbbbb bbbbbbb() { + bbbbbb Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbBbbbbbb(BbbBbbbbbb.bbbbb); } - interface LogBuilder extends Builder { + bbbbbbbbb BbbBbbbbbb bbbbbbb Bbbbbbb { /** - * Sets the focus point of this log + * Bbbb bbb bbbbb bbbbb bb bbbb bbb * - * @param listing The listing context - * @return The current instance of the builder + * @bbbbb bbbbbbb Bbb bbbbbbb bbbbbbb + * @bbbbbb Bbb bbbbbbb bbbbbbbb bb bbb bbbbbbb */ - LogBuilder listing(Listing listing); + BbbBbbbbbb bbbbbbb(Bbbbbbb bbbbbbb); /** - * Sets the actor providing the logged action. In other words, this is the ID of the user which provoked - * the action to create the log. + * Bbbb bbb bbbbb bbbbbbbbb bbb bbbbbb bbbbbb. Bb bbbbb bbbbb, bbbb bb bbb BB bb bbb bbbb bbbbb bbbbbbbb + * bbb bbbbbb bb bbbbbb bbb bbb. * - * @param actor The uuid of the actor - * @return The current instance of the builder + * @bbbbb bbbbb Bbb bbbb bb bbb bbbbb + * @bbbbbb Bbb bbbbbbb bbbbbbbb bb bbb bbbbbbb */ - LogBuilder actor(UUID actor); + BbbBbbbbbb bbbbb(BBBB bbbbb); /** - * Marks the action carried out for this listing + * Bbbbb bbb bbbbbb bbbbbbb bbb bbb bbbb bbbbbbb * - * @param action The action performed - * @return The current instance of the builder + * @bbbbb bbbbbb Bbb bbbbbb bbbbbbbbb + * @bbbbbb Bbb bbbbbbb bbbbbbbb bb bbb bbbbbbb */ - //LogBuilder action(ListingActionType action); + //BbbBbbbbbb bbbbbb(BbbbbbbBbbbbbBbbb bbbbbb); /** - * Marks a logged action as an administrative action + * Bbbbb b bbbbbb bbbbbb bb bb bbbbbbbbbbbbbb bbbbbb * - * @return The current instance of the builder + * @bbbbbb Bbb bbbbbbb bbbbbbbb bb bbb bbbbbbb */ - LogBuilder administrative(); + BbbBbbbbbb bbbbbbbbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/logs/LogOutputStream.java b/api/src/main/java/net/impactdev/gts/api/logs/LogOutputStream.java index 899cb01c..d17819c0 100644 --- a/api/src/main/java/net/impactdev/gts/api/logs/LogOutputStream.java +++ b/api/src/main/java/net/impactdev/gts/api/logs/LogOutputStream.java @@ -1,7 +1,7 @@ -package net.impactdev.gts.api.logs; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb; -public interface LogOutputStream { +bbbbbb bbbbbbbbb BbbBbbbbbBbbbbb { - void write(Log log) throws Exception; + bbbb bbbbb(Bbb bbb) bbbbbb Bbbbbbbbb; } diff --git a/api/src/main/java/net/impactdev/gts/api/maintenance/MaintenanceManager.java b/api/src/main/java/net/impactdev/gts/api/maintenance/MaintenanceManager.java index 6cd3a4da..6f28c3a4 100644 --- a/api/src/main/java/net/impactdev/gts/api/maintenance/MaintenanceManager.java +++ b/api/src/main/java/net/impactdev/gts/api/maintenance/MaintenanceManager.java @@ -1,33 +1,33 @@ -package net.impactdev.gts.api.maintenance; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb; /** * */ -public interface MaintenanceManager { +bbbbbb bbbbbbbbb BbbbbbbbbbbBbbbbbb { /** - * Fetches the current state on a mode for GTS. + * Bbbbbbb bbb bbbbbbb bbbbb bb b bbbb bbb BBB. * - * @param mode The mode we are requesting the state of - * @return The marked status for this mode, with false indicating the mode is active + * @bbbbb bbbb Bbb bbbb bb bbb bbbbbbbbbb bbb bbbbb bb + * @bbbbbb Bbb bbbbbb bbbbbb bbb bbbb bbbb, bbbb bbbbb bbbbbbbbbb bbb bbbb bb bbbbbb */ - boolean getState(MaintenanceMode mode); + bbbbbbb bbbBbbbb(BbbbbbbbbbbBbbb bbbb); /** - * Sets the state of the specified maintenance mode to the desired setting. + * Bbbb bbb bbbbb bb bbb bbbbbbbbb bbbbbbbbbbb bbbb bb bbb bbbbbbb bbbbbbb. * - * @param mode The mode to update - * @param state The state to set the mode to + * @bbbbb bbbb Bbb bbbb bb bbbbbb + * @bbbbb bbbbb Bbb bbbbb bb bbb bbb bbbb bb */ - void setState(MaintenanceMode mode, boolean state); + bbbb bbbBbbbb(BbbbbbbbbbbBbbb bbbb, bbbbbbb bbbbb); /** - * Toggles the status state of the specified maintenance mode. + * Bbbbbbb bbb bbbbbb bbbbb bb bbb bbbbbbbbb bbbbbbbbbbb bbbb. * - * @param mode The mode we are toggling + * @bbbbb bbbb Bbb bbbb bb bbb bbbbbbbb */ - default void toggleState(MaintenanceMode mode) { - this.setState(mode, !this.getState(mode)); + bbbbbbb bbbb bbbbbbBbbbb(BbbbbbbbbbbBbbb bbbb) { + bbbb.bbbBbbbb(bbbb, !bbbb.bbbBbbbb(bbbb)); } } diff --git a/api/src/main/java/net/impactdev/gts/api/maintenance/MaintenanceMode.java b/api/src/main/java/net/impactdev/gts/api/maintenance/MaintenanceMode.java index 54d5b84f..e283f98c 100644 --- a/api/src/main/java/net/impactdev/gts/api/maintenance/MaintenanceMode.java +++ b/api/src/main/java/net/impactdev/gts/api/maintenance/MaintenanceMode.java @@ -1,13 +1,13 @@ -package net.impactdev.gts.api.maintenance; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb; -public enum MaintenanceMode { +bbbbbb bbbb BbbbbbbbbbbBbbb { - ALL, - BROWSER, - PUBLISH_LISTING, - BIN_PURCHASE, - AUCTION_BID, - STASH_CLAIM, - STASH_CLAIM_ALL, + BBB, + BBBBBBB, + BBBBBBB_BBBBBBB, + BBB_BBBBBBBB, + BBBBBBB_BBB, + BBBBB_BBBBB, + BBBBB_BBBBB_BBB, } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/IncomingMessageConsumer.java b/api/src/main/java/net/impactdev/gts/api/messaging/IncomingMessageConsumer.java index e01da857..14ba7686 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/IncomingMessageConsumer.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/IncomingMessageConsumer.java @@ -1,101 +1,101 @@ /* - * This file is part of LuckPerms, licensed under the MIT License. + * Bbbb bbbb bb bbbb bb BbbbBbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb. * - * Copyright (c) lucko (Luck) - * Copyright (c) contributors + * Bbbbbbbbb (b) bbbbb (Bbbb) + * Bbbbbbbbb (b) bbbbbbbbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb bbb + * bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB BBB + * BBBBBBBB. */ -package net.impactdev.gts.api.messaging; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb; -import net.impactdev.gts.api.messaging.message.Message; -import net.impactdev.gts.api.messaging.message.MessageConsumer; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.api.messaging.message.type.MessageType; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; -import java.util.UUID; -import java.util.function.Consumer; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbb.Bbbbbbbb; /** - * Encapsulates the LuckPerms system which accepts incoming {@link Message}s - * from implementations of {@link Messenger}. + * Bbbbbbbbbbbb bbb BbbbBbbbb bbbbbb bbbbb bbbbbbb bbbbbbbb {@bbbb Bbbbbbb}b + * bbbb bbbbbbbbbbbbbbb bb {@bbbb Bbbbbbbbb}. */ -public interface IncomingMessageConsumer { +bbbbbb bbbbbbbbb BbbbbbbbBbbbbbbBbbbbbbb { /** - * Registers a message that is being requested by the calling plugin. This is to allow a server - * to ensure a requested message eventually receives a response intended for itself. + * Bbbbbbbbb b bbbbbbb bbbb bb bbbbb bbbbbbbbb bb bbb bbbbbbb bbbbbb. Bbbb bb bb bbbbb b bbbbbb + * bb bbbbbb b bbbbbbbbb bbbbbbb bbbbbbbbbb bbbbbbbb b bbbbbbbb bbbbbbbb bbb bbbbbb. * - * @param request The message working as the request message + * @bbbbb bbbbbbb Bbb bbbbbbb bbbbbbb bb bbb bbbbbbb bbbbbbb */ - void registerRequest(UUID request, Consumer response); + bbbb bbbbbbbbBbbbbbb(BBBB bbbbbbb, Bbbbbbbb bbbbbbbb); - void processRequest(UUID request, T response); + bbbb bbbbbbbBbbbbbb(BBBB bbbbbbb, B bbbbbbbb); /** - * Caches the ID into the registry of read messages on this instance. This cache will purge out - * received message IDs once a set amount of time has elapsed. + * Bbbbbb bbb BB bbbb bbb bbbbbbbb bb bbbb bbbbbbbb bb bbbb bbbbbbbb. Bbbb bbbbb bbbb bbbbb bbb + * bbbbbbbb bbbbbbb BBb bbbb b bbb bbbbbb bb bbbb bbb bbbbbbb. * - * @param id The ID of the message that has been received + * @bbbbb bb Bbb BB bb bbb bbbbbbb bbbb bbb bbbb bbbbbbbb */ - void cacheReceivedID(UUID id); + bbbb bbbbbBbbbbbbbBB(BBBB bb); /** - * Consumes a message instance. + * Bbbbbbbb b bbbbbbb bbbbbbbb. * - *

The boolean returned from this method indicates whether or not the - * platform accepted the message. Some implementations which have multiple - * distribution channels may wish to use this result to dispatch the same - * message back to additional receivers.

+ * Bbb bbbbbbb bbbbbbbb bbbb bbbb bbbbbb bbbbbbbbb bbbbbbb bb bbb bbb + * bbbbbbbb bbbbbbbb bbb bbbbbbb. Bbbb bbbbbbbbbbbbbbb bbbbb bbbb bbbbbbbb + * bbbbbbbbbbbb bbbbbbbb bbb bbbb bb bbb bbbb bbbbbb bb bbbbbbbb bbb bbbb + * bbbbbbb bbbb bb bbbbbbbbbb bbbbbbbbb. * - *

The implementation will usually return false if a message - * with the same ping id has already been processed.

+ * Bbb bbbbbbbbbbbbbb bbbb bbbbbbb bbbbbb bbbbb bb b bbbbbbb + * bbbb bbb bbbb bbbb bb bbb bbbbbbb bbbb bbbbbbbbb. * - * @param message the message - * @return true if the message was accepted by the plugin + * @bbbbb bbbbbbb bbb bbbbbbb + * @bbbbbb bbbb bb bbb bbbbbbb bbb bbbbbbbb bb bbb bbbbbb */ - boolean consumeIncomingMessage(@NonNull Message message); + bbbbbbb bbbbbbbBbbbbbbbBbbbbbb(@BbbBbbb Bbbbbbb bbbbbbb); /** - * Consumes a message in an encoded string format. + * Bbbbbbbb b bbbbbbb bb bb bbbbbbb bbbbbb bbbbbb. * - *

This method will decode strings obtained by calling - * {@link OutgoingMessage#asEncodedString()}. This means that basic - * implementations can successfully implement {@link Messenger} without - * providing their own serialisation.

+ * Bbbb bbbbbb bbbb bbbbbb bbbbbbb bbbbbbbb bb bbbbbbb + * {@bbbb BbbbbbbbBbbbbbb#bbBbbbbbbBbbbbb()}. Bbbb bbbbb bbbb bbbbb + * bbbbbbbbbbbbbbb bbb bbbbbbbbbbbb bbbbbbbbb {@bbbb Bbbbbbbbb} bbbbbbb + * bbbbbbbbb bbbbb bbb bbbbbbbbbbbbb. * - *

The boolean returned from this method indicates whether or not the - * platform accepted the message. Some implementations which have multiple - * distribution channels may wish to use this result to dispatch the same - * message back to additional receivers.

+ * Bbb bbbbbbb bbbbbbbb bbbb bbbb bbbbbb bbbbbbbbb bbbbbbb bb bbb bbb + * bbbbbbbb bbbbbbbb bbb bbbbbbb. Bbbb bbbbbbbbbbbbbbb bbbbb bbbb bbbbbbbb + * bbbbbbbbbbbb bbbbbbbb bbb bbbb bb bbb bbbb bbbbbb bb bbbbbbbb bbb bbbb + * bbbbbbb bbbb bb bbbbbbbbbb bbbbbbbbb. * - *

The implementation will usually return false if a message - * with the same ping id has already been processed.

+ * Bbb bbbbbbbbbbbbbb bbbb bbbbbbb bbbbbb bbbbb bb b bbbbbbb + * bbbb bbb bbbb bbbb bb bbb bbbbbbb bbbb bbbbbbbbb. * - * @param encodedString the encoded string - * @return true if the message was accepted by the plugin + * @bbbbb bbbbbbbBbbbbb bbb bbbbbbb bbbbbb + * @bbbbbb bbbb bb bbb bbbbbbb bbb bbbbbbbb bb bbb bbbbbb */ - boolean consumeIncomingMessageAsString(@NonNull String encodedString); + bbbbbbb bbbbbbbBbbbbbbbBbbbbbbBbBbbbbb(@BbbBbbb Bbbbbb bbbbbbbBbbbbb); - void registerInternalConsumer(Class parent, MessageConsumer consumer); + bbbb bbbbbbbbBbbbbbbbBbbbbbbb(Bbbbb bbbbbb, BbbbbbbBbbbbbbb bbbbbbbb); - MessageConsumer getInternalConsumer(Class parent); + BbbbbbbBbbbbbbb bbbBbbbbbbbBbbbbbbb(Bbbbb bbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/Messenger.java b/api/src/main/java/net/impactdev/gts/api/messaging/Messenger.java index 575a0bc0..aff2f840 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/Messenger.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/Messenger.java @@ -1,68 +1,68 @@ /* - * This file is part of LuckPerms, licensed under the MIT License. + * Bbbb bbbb bb bbbb bb BbbbBbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb. * - * Copyright (c) lucko (Luck) - * Copyright (c) contributors + * Bbbbbbbbb (b) bbbbb (Bbbb) + * Bbbbbbbbb (b) bbbbbbbbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb bbb + * bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB BBB + * BBBBBBBB. */ -package net.impactdev.gts.api.messaging; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb; -import net.impactdev.gts.api.messaging.message.Message; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; /** - * Represents an object which dispatches {@link OutgoingMessage}s. + * Bbbbbbbbbb bb bbbbbb bbbbb bbbbbbbbbb {@bbbb BbbbbbbbBbbbbbb}b. */ -public interface Messenger extends AutoCloseable { +bbbbbb bbbbbbbbb Bbbbbbbbb bbbbbbb BbbbBbbbbbbbb { /** - * Retrieves the bound {@link IncomingMessageConsumer IncomingMessageConsumer} from this messenger. - * This is the system that will process all incoming messages from another server + * Bbbbbbbbb bbb bbbbb {@bbbb BbbbbbbbBbbbbbbBbbbbbbb BbbbbbbbBbbbbbbBbbbbbbb} bbbb bbbb bbbbbbbbb. + * Bbbb bb bbb bbbbbb bbbb bbbb bbbbbbb bbb bbbbbbbb bbbbbbbb bbbb bbbbbbb bbbbbb * - * @return The incoming message consumer + * @bbbbbb Bbb bbbbbbbb bbbbbbb bbbbbbbb */ - IncomingMessageConsumer getMessageConsumer(); + BbbbbbbbBbbbbbbBbbbbbbb bbbBbbbbbbBbbbbbbb(); /** - * Performs the necessary action to dispatch the message using the means - * of the messenger. + * Bbbbbbbb bbb bbbbbbbbb bbbbbb bb bbbbbbbb bbb bbbbbbb bbbbb bbb bbbbb + * bb bbb bbbbbbbbb. * - *

The outgoing message instance is guaranteed to be an instance of one - * of the interfaces extending {@link Message} in the - * 'api.messaging.message.type' package.

+ * Bbb bbbbbbbb bbbbbbb bbbbbbbb bb bbbbbbbbbb bb bb bb bbbbbbbb bb bbb + * bb bbb bbbbbbbbbb bbbbbbbbb {@bbbb Bbbbbbb} bb bbb + * 'bbb.bbbbbbbbb.bbbbbbb.bbbb' bbbbbbb. * - *

3rd party implementations are encouraged to implement this method with consideration - * that new types may be added in the future.

+ * 3bb bbbbb bbbbbbbbbbbbbbb bbb bbbbbbbbbb bb bbbbbbbbb bbbb bbbbbb bbbb bbbbbbbbbbbbb + * bbbb bbb bbbbb bbb bb bbbbb bb bbb bbbbbb. * - *

This call is always made async.

+ * Bbbb bbbb bb bbbbbb bbbb bbbbb. * - * @param outgoingMessage the outgoing message + * @bbbbb bbbbbbbbBbbbbbb bbb bbbbbbbb bbbbbbb */ - void sendOutgoingMessage(@NonNull OutgoingMessage outgoingMessage); + bbbb bbbbBbbbbbbbBbbbbbb(@BbbBbbb BbbbbbbbBbbbbbb bbbbbbbbBbbbbbb); /** - * Performs the necessary action to gracefully shutdown the messenger. + * Bbbbbbbb bbb bbbbbbbbb bbbbbb bb bbbbbbbbbb bbbbbbbb bbb bbbbbbbbb. */ - @Override - default void close() {} + @Bbbbbbbb + bbbbbbb bbbb bbbbb() {} } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/MessengerProvider.java b/api/src/main/java/net/impactdev/gts/api/messaging/MessengerProvider.java index 1290aa89..ec24cbd3 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/MessengerProvider.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/MessengerProvider.java @@ -1,58 +1,58 @@ /* - * This file is part of LuckPerms, licensed under the MIT License. + * Bbbb bbbb bb bbbb bb BbbbBbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb. * - * Copyright (c) lucko (Luck) - * Copyright (c) contributors + * Bbbbbbbbb (b) bbbbb (Bbbb) + * Bbbbbbbbb (b) bbbbbbbbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb bbb + * bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB BBB + * BBBBBBBB. */ -package net.impactdev.gts.api.messaging; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; /** - * Represents a provider for {@link Messenger} instances. + * Bbbbbbbbbb b bbbbbbbb bbb {@bbbb Bbbbbbbbb} bbbbbbbbb. * - *

Users wishing to provide their own implementation for the plugins - * "Messaging Service" should implement and register this interface.

+ * Bbbbb bbbbbbb bb bbbbbbb bbbbb bbb bbbbbbbbbbbbbb bbb bbb bbbbbbb + * "Bbbbbbbbb Bbbbbbb" bbbbbb bbbbbbbbb bbb bbbbbbbb bbbb bbbbbbbbb. */ -public interface MessengerProvider { +bbbbbb bbbbbbbbb BbbbbbbbbBbbbbbbb { /** - * Gets the name of this provider. + * Bbbb bbb bbbb bb bbbb bbbbbbbb. * - * @return the provider name + * @bbbbbb bbb bbbbbbbb bbbb */ - @NonNull String getName(); + @BbbBbbb Bbbbbb bbbBbbb(); /** - * Creates and returns a new {@link Messenger} instance, which passes - * incoming messages to the provided {@link IncomingMessageConsumer}. + * Bbbbbbb bbb bbbbbbb b bbb {@bbbb Bbbbbbbbb} bbbbbbbb, bbbbb bbbbbb + * bbbbbbbb bbbbbbbb bb bbb bbbbbbbb {@bbbb BbbbbbbbBbbbbbbBbbbbbbb}. * - *

As the agent should pass incoming messages to the given consumer, - * this method should always return a new object.

+ * Bb bbb bbbbb bbbbbb bbbb bbbbbbbb bbbbbbbb bb bbb bbbbb bbbbbbbb, + * bbbb bbbbbb bbbbbb bbbbbb bbbbbb b bbb bbbbbb. * - * @param incomingMessageConsumer the consumer the new instance should pass - * incoming messages to - * @return a new messenger agent instance + * @bbbbb bbbbbbbbBbbbbbbBbbbbbbb bbb bbbbbbbb bbb bbb bbbbbbbb bbbbbb bbbb + * bbbbbbbb bbbbbbbb bb + * @bbbbbb b bbb bbbbbbbbb bbbbb bbbbbbbb */ - @NonNull Messenger obtain(@NonNull IncomingMessageConsumer incomingMessageConsumer); + @BbbBbbb Bbbbbbbbb bbbbbb(@BbbBbbb BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbbBbbbbbbBbbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/Message.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/Message.java index 2865e70f..13b6cdb6 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/Message.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/Message.java @@ -1,49 +1,49 @@ /* - * This file is part of LuckPerms, licensed under the MIT License. + * Bbbb bbbb bb bbbb bb BbbbBbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb. * - * Copyright (c) lucko (Luck) - * Copyright (c) contributors + * Bbbbbbbbb (b) bbbbb (Bbbb) + * Bbbbbbbbb (b) bbbbbbbbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb bbb + * bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB BBB + * BBBBBBBB. */ -package net.impactdev.gts.api.messaging.message; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb; -import net.impactdev.gts.api.messaging.Messenger; -import net.impactdev.impactor.api.utilities.printing.PrettyPrinter; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbb.bbbbbbbb.BbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; /** - * Represents a message sent received via a {@link Messenger}. + * Bbbbbbbbbb b bbbbbbb bbbb bbbbbbbb bbb b {@bbbb Bbbbbbbbb}. */ -public interface Message extends PrettyPrinter.IPrettyPrintable { +bbbbbb bbbbbbbbb Bbbbbbb bbbbbbb BbbbbbBbbbbbb.BBbbbbbBbbbbbbbb { /** - * Gets the unique id associated with this message. + * Bbbb bbb bbbbbb bb bbbbbbbbbb bbbb bbbb bbbbbbb. * - *

This ID is used to ensure a single server instance doesn't process - * the same message twice.

+ * Bbbb BB bb bbbb bb bbbbbb b bbbbbb bbbbbb bbbbbbbb bbbbb'b bbbbbbb + * bbb bbbb bbbbbbb bbbbb. * - * @return the id of the message + * @bbbbbb bbb bb bb bbb bbbbbbb */ - @NonNull UUID getID(); + @BbbBbbb BBBB bbbBB(); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/MessageConsumer.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/MessageConsumer.java index 72018e92..7f051f47 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/MessageConsumer.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/MessageConsumer.java @@ -1,8 +1,8 @@ -package net.impactdev.gts.api.messaging.message; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb; -@FunctionalInterface -public interface MessageConsumer { +@BbbbbbbbbbBbbbbbbbb +bbbbbb bbbbbbbbb BbbbbbbBbbbbbbb { - void consume(V message); + bbbb bbbbbbb(B bbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/OutgoingMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/OutgoingMessage.java index 5196a2f6..70d02e74 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/OutgoingMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/OutgoingMessage.java @@ -1,58 +1,58 @@ /* - * This file is part of LuckPerms, licensed under the MIT License. + * Bbbb bbbb bb bbbb bb BbbbBbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb. * - * Copyright (c) lucko (Luck) - * Copyright (c) contributors + * Bbbbbbbbb (b) bbbbb (Bbbb) + * Bbbbbbbbb (b) bbbbbbbbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb bbb + * bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB BBB + * BBBBBBBB. */ -package net.impactdev.gts.api.messaging.message; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb; -import net.impactdev.gts.api.messaging.IncomingMessageConsumer; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; /** - * Represents an outgoing {@link Message}. + * Bbbbbbbbbb bb bbbbbbbb {@bbbb Bbbbbbb}. * - *

Outgoing messages are ones which have been generated by this instance. - * (in other words, they are implemented by GTS)

+ * Bbbbbbbb bbbbbbbb bbb bbbb bbbbb bbbb bbbb bbbbbbbbb bb bbbb bbbbbbbb. + * (bb bbbbb bbbbb, bbbb bbb bbbbbbbbbbb bb BBB) * - *

Note that all implementations of this interface are guaranteed to be an - * instance of one of the interfaces extending {@link Message} in the - * 'api.messenger.message.type' package.

+ * Bbbb bbbb bbb bbbbbbbbbbbbbbb bb bbbb bbbbbbbbb bbb bbbbbbbbbb bb bb bb + * bbbbbbbb bb bbb bb bbb bbbbbbbbbb bbbbbbbbb {@bbbb Bbbbbbb} bb bbb + * 'bbb.bbbbbbbbb.bbbbbbb.bbbb' bbbbbbb. */ -public interface OutgoingMessage extends Message { +bbbbbb bbbbbbbbb BbbbbbbbBbbbbbb bbbbbbb Bbbbbbb { /** - * Gets an encoded string form of this message. + * Bbbb bb bbbbbbb bbbbbb bbbb bb bbbb bbbbbbb. * - *

The format of this string is likely to change between versions and - * should not be depended on.

+ * Bbb bbbbbb bb bbbb bbbbbb bb bbbbbb bb bbbbbb bbbbbbb bbbbbbbb bbb + * bbbbbb bbb bb bbbbbbbb bb. * - *

Implementations which want to use a standard method of serialisation - * can send outgoing messages using the string returned by this method, and - * pass on the message on the "other side" using - * {@link IncomingMessageConsumer#consumeIncomingMessageAsString(String)}.

+ * Bbbbbbbbbbbbbbb bbbbb bbbb bb bbb b bbbbbbbb bbbbbb bb bbbbbbbbbbbbb + * bbb bbbb bbbbbbbb bbbbbbbb bbbbb bbb bbbbbb bbbbbbbb bb bbbb bbbbbb, bbb + * bbbb bb bbb bbbbbbb bb bbb "bbbbb bbbb" bbbbb + * {@bbbb BbbbbbbbBbbbbbbBbbbbbbb#bbbbbbbBbbbbbbbBbbbbbbBbBbbbbb(Bbbbbb)}. * - * @return an encoded string form of the message + * @bbbbbb bb bbbbbbb bbbbbb bbbb bb bbb bbbbbbb */ - @NonNull String asEncodedString(); + @BbbBbbb Bbbbbb bbBbbbbbbBbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/errors/ErrorCode.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/errors/ErrorCode.java index f2292ad4..75079624 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/errors/ErrorCode.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/errors/ErrorCode.java @@ -1,34 +1,34 @@ -package net.impactdev.gts.api.messaging.message.errors; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbbbb; /** * */ -public interface ErrorCode { +bbbbbb bbbbbbbbb BbbbbBbbb { /** - * Represents the ordinal value of this error code. This is calculated during the setup of the entire - * error codes file. The purpose of such is to provide a proper fallback option for messages featuring - * an error code in their response. Rather than saving description, we can save an index that'll be universal - * across all setups (assuming people are up to date and no new error codes exist across versions). + * Bbbbbbbbbb bbb bbbbbbb bbbbb bb bbbb bbbbb bbbb. Bbbb bb bbbbbbbbbb bbbbbb bbb bbbbb bb bbb bbbbbb + * bbbbb bbbbb bbbb. Bbb bbbbbbb bb bbbb bb bb bbbbbbb b bbbbbb bbbbbbbb bbbbbb bbb bbbbbbbb bbbbbbbbb + * bb bbbbb bbbb bb bbbbb bbbbbbbb. Bbbbbb bbbb bbbbbb bbbbbbbbbbb, bb bbb bbbb bb bbbbb bbbb'bb bb bbbbbbbbb + * bbbbbb bbb bbbbbb (bbbbbbbb bbbbbb bbb bb bb bbbb bbb bb bbb bbbbb bbbbb bbbbb bbbbbb bbbbbbbb). * - * @return The ordinal value of this error code + * @bbbbbb Bbb bbbbbbb bbbbb bb bbbb bbbbb bbbb */ - int ordinal(); + bbb bbbbbbb(); /** - * The front of the error code reported to a user when an error occurs. For information on what the key means, - * a user should be able to hover over the key to receive what is specified by {@link #getDescription()}. + * Bbb bbbbb bb bbb bbbbb bbbb bbbbbbbb bb b bbbb bbbb bb bbbbb bbbbbb. Bbb bbbbbbbbbbb bb bbbb bbb bbb bbbbb, + * b bbbb bbbbbb bb bbbb bb bbbbb bbbb bbb bbb bb bbbbbbb bbbb bb bbbbbbbbb bb {@bbbb #bbbBbbbbbbbbbb()}. * - * @return The key of this error code + * @bbbbbb Bbb bbb bb bbbb bbbbb bbbb */ - String getKey(); + Bbbbbb bbbBbb(); /** - * Represents the error code description for this error. This is meant to help a user identify what exactly - * happened in response to a request failing. + * Bbbbbbbbbb bbb bbbbb bbbb bbbbbbbbbbb bbb bbbb bbbbb. Bbbb bb bbbbb bb bbbb b bbbb bbbbbbbb bbbb bbbbbbb + * bbbbbbbb bb bbbbbbbb bb b bbbbbbb bbbbbbb. * - * @return The error's description + * @bbbbbb Bbb bbbbb'b bbbbbbbbbbb */ - String getDescription(); + Bbbbbb bbbBbbbbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/errors/ErrorCodes.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/errors/ErrorCodes.java index 207913fc..4527b53f 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/errors/ErrorCodes.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/errors/ErrorCodes.java @@ -1,108 +1,108 @@ -package net.impactdev.gts.api.messaging.message.errors; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbbbb; -import com.google.common.collect.ImmutableList; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.BbbbbbbbbBbbb; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.LinkedList; -import java.util.List; +bbbbbb bbbb.bbbb.bbbbbbb.Bbbbb; +bbbbbb bbbb.bbbb.bbbbbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BbbbbbBbbb; +bbbbbb bbbb.bbbb.Bbbb; -public class ErrorCodes { +bbbbbb bbbbb BbbbbBbbbb { - // Generic - public static final ErrorCode LISTING_MISSING = create("UNKNOWN_LISTING", "Listing could not be found"); - public static final ErrorCode REQUEST_TIMED_OUT = create("TIMEOUT", "Failed to receive a response within 5 seconds"); - public static final ErrorCode THIRD_PARTY_CANCELLED = create("OUTSIDE_CANCEL", "An outside source cancelled your request"); - public static final ErrorCode LISTING_EXPIRED = create("EXPIRED", "The listing has expired"); - public static final ErrorCode FAILED_TO_GIVE = create("UNABLE_TO_GIVE", "The item could not be rewarded successfully"); + // Bbbbbbb + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBBBB_BBBBBBB = bbbbbb("BBBBBBB_BBBBBBB", "Bbbbbbb bbbbb bbb bb bbbbb"); + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBBBB_BBBBB_BBB = bbbbbb("BBBBBBB", "Bbbbbb bb bbbbbbb b bbbbbbbb bbbbbb 5 bbbbbbb"); + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBB_BBBBB_BBBBBBBBB = bbbbbb("BBBBBBB_BBBBBB", "Bb bbbbbbb bbbbbb bbbbbbbbb bbbb bbbbbbb"); + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBBBB_BBBBBBB = bbbbbb("BBBBBBB", "Bbb bbbbbbb bbb bbbbbbb"); + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBBB_BB_BBBB = bbbbbb("BBBBBB_BB_BBBB", "Bbb bbbb bbbbb bbb bb bbbbbbbb bbbbbbbbbbbb"); - // BIN - public static final ErrorCode ALREADY_PURCHASED = create("PURCHASED", "Listing already purchased"); + // BBB + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBBBB_BBBBBBBBB = bbbbbb("BBBBBBBBB", "Bbbbbbb bbbbbbb bbbbbbbbb"); - // Auctions - public static final ErrorCode OUTBID = create("OUTBID", "Another user has already placed a larger bid"); - public static final ErrorCode BIDS_PLACED = create("BIDS_PRESENT", "At least one bid has already been placed on your auction"); + // Bbbbbbbb + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBBB = bbbbbb("BBBBBB", "Bbbbbbb bbbb bbb bbbbbbb bbbbbb b bbbbbb bbb"); + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBB_BBBBBB = bbbbbb("BBBB_BBBBBBB", "Bb bbbbb bbb bbb bbb bbbbbbb bbbb bbbbbb bb bbbb bbbbbbb"); - // Deliveries - public static final ErrorCode DELIVERY_MISSING = create("DELIVERY_MISSING", "Unable to locate the target delivery"); + // Bbbbbbbbbb + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBBBBB_BBBBBBB = bbbbbb("BBBBBBBB_BBBBBBB", "Bbbbbb bb bbbbbb bbb bbbbbb bbbbbbbb"); - // Fatal - public static final ErrorCode FATAL_ERROR = create("FATAL", "A fatal error occurred..."); - public static final ErrorCode UNKNOWN = create("UNKNOWN", "Literally no idea what happened"); + // Bbbbb + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBB_BBBBB = bbbbbb("BBBBB", "B bbbbb bbbbb bbbbbbbb..."); + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBBBB = bbbbbb("BBBBBBB", "Bbbbbbbbb bb bbbb bbbb bbbbbbbb"); - // Safe Mode Reasons - public static final ErrorCode ECONOMY = create("LACKING_ECONOMY", "You are missing an economy plugin!"); + // Bbbb Bbbb Bbbbbbb + bbbbbb bbbbbb bbbbb BbbbbBbbb BBBBBBB = bbbbbb("BBBBBBB_BBBBBBB", "Bbb bbb bbbbbbb bb bbbbbbb bbbbbb!"); - private static final List KEYS; + bbbbbbb bbbbbb bbbbb Bbbb BBBB; - static { - List codes = new LinkedList<>(); - Field[] values = ErrorCodes.class.getFields(); - int i = 0; + bbbbbb { + Bbbb bbbbb = bbb BbbbbbBbbb<>(); + Bbbbb[] bbbbbb = BbbbbBbbbb.bbbbb.bbbBbbbbb(); + bbb b = 0; - for (Field f : values) { - // ignore non-static fields - if (!Modifier.isStatic(f.getModifiers())) { - continue; + bbb (Bbbbb b : bbbbbb) { + // bbbbbb bbb-bbbbbb bbbbbb + bb (!Bbbbbbbb.bbBbbbbb(b.bbbBbbbbbbbb())) { + bbbbbbbb; } - // ignore fields that aren't error codes - if (!ErrorCode.class.isAssignableFrom(f.getType())) { - continue; + // bbbbbb bbbbbb bbbb bbbb'b bbbbb bbbbb + bb (!BbbbbBbbb.bbbbb.bbBbbbbbbbbbBbbb(b.bbbBbbb())) { + bbbbbbbb; } - try { - // get the key instance - ErrorCodeBackend key = (ErrorCodeBackend) f.get(null); - // set the ordinal value of the key. - key.ordinal = i++; - // add the key to the return map - codes.add(key); - } catch (Exception e) { - throw new RuntimeException("Exception processing field: " + f, e); + bbb { + // bbb bbb bbb bbbbbbbb + BbbbbBbbbBbbbbbb bbb = (BbbbbBbbbBbbbbbb) b.bbb(bbbb); + // bbb bbb bbbbbbb bbbbb bb bbb bbb. + bbb.bbbbbbb = b++; + // bbb bbb bbb bb bbb bbbbbb bbb + bbbbb.bbb(bbb); + } bbbbb (Bbbbbbbbb b) { + bbbbb bbb BbbbbbbBbbbbbbbb("Bbbbbbbbb bbbbbbbbbb bbbbb: " + b, b); } } - KEYS = ImmutableList.copyOf(codes); + BBBB = BbbbbbbbbBbbb.bbbbBb(bbbbb); } - public static ErrorCode get(int ordinal) { - return KEYS.get(ordinal); + bbbbbb bbbbbb BbbbbBbbb bbb(bbb bbbbbbb) { + bbbbbb BBBB.bbb(bbbbbbb); } - private static ErrorCode create(String key, String description) { - return new ErrorCodeBackend(key, description); + bbbbbbb bbbbbb BbbbbBbbb bbbbbb(Bbbbbb bbb, Bbbbbb bbbbbbbbbbb) { + bbbbbb bbb BbbbbBbbbBbbbbbb(bbb, bbbbbbbbbbb); } - public static class ErrorCodeBackend implements ErrorCode { + bbbbbb bbbbbb bbbbb BbbbbBbbbBbbbbbb bbbbbbbbbb BbbbbBbbb { - private int ordinal = -1; + bbbbbbb bbb bbbbbbb = -1; - private final String key; - private final String description; + bbbbbbb bbbbb Bbbbbb bbb; + bbbbbbb bbbbb Bbbbbb bbbbbbbbbbb; - ErrorCodeBackend(String key, String description) { - this.key = key; - this.description = description; + BbbbbBbbbBbbbbbb(Bbbbbb bbb, Bbbbbb bbbbbbbbbbb) { + bbbb.bbb = bbb; + bbbb.bbbbbbbbbbb = bbbbbbbbbbb; } - @Override - public int ordinal() { - return this.ordinal; + @Bbbbbbbb + bbbbbb bbb bbbbbbb() { + bbbbbb bbbb.bbbbbbb; } - void setOrdinal(int ordinal) { - this.ordinal = ordinal; + bbbb bbbBbbbbbb(bbb bbbbbbb) { + bbbb.bbbbbbb = bbbbbbb; } - @Override - public String getKey() { - return this.key; + @Bbbbbbbb + bbbbbb Bbbbbb bbbBbb() { + bbbbbb bbbb.bbb; } - @Override - public String getDescription() { - return this.description; + @Bbbbbbbb + bbbbbb Bbbbbb bbbBbbbbbbbbbb() { + bbbbbb bbbb.bbbbbbbbbbb; } } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/exceptions/MessagingException.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/exceptions/MessagingException.java index 3fd34444..601e1976 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/exceptions/MessagingException.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/exceptions/MessagingException.java @@ -1,22 +1,22 @@ -package net.impactdev.gts.api.messaging.message.exceptions; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbbbbbbbb; -import net.impactdev.gts.api.messaging.message.errors.ErrorCode; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbbbb.BbbbbBbbb; -public class MessagingException extends RuntimeException { +bbbbbb bbbbb BbbbbbbbbBbbbbbbbb bbbbbbb BbbbbbbBbbbbbbbb { - private ErrorCode error; + bbbbbbb BbbbbBbbb bbbbb; - public MessagingException(ErrorCode error) { - this.error = error; + bbbbbb BbbbbbbbbBbbbbbbbb(BbbbbBbbb bbbbb) { + bbbb.bbbbb = bbbbb; } - public MessagingException(ErrorCode error, Throwable cause) { - super(cause); - this.error = error; + bbbbbb BbbbbbbbbBbbbbbbbb(BbbbbBbbb bbbbb, Bbbbbbbbb bbbbb) { + bbbbb(bbbbb); + bbbb.bbbbb = bbbbb; } - public ErrorCode getError() { - return this.error; + bbbbbb BbbbbBbbb bbbBbbbb() { + bbbbbb bbbb.bbbbb; } } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/MessageType.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/MessageType.java index ae7a1694..08518a31 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/MessageType.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/MessageType.java @@ -1,88 +1,88 @@ -package net.impactdev.gts.api.messaging.message.type; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb; -import net.impactdev.gts.api.messaging.message.errors.ErrorCode; -import net.impactdev.impactor.api.utilities.printing.PrettyPrinter; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbbbb.BbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbb.bbbbbbbb.BbbbbbBbbbbbb; -import java.util.Optional; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbbbbbBbbbbb; -public interface MessageType { +bbbbbb bbbbbbbbb BbbbbbbBbbb { /** - * Represents a message that is intended to be received only on the proxy server. This message will - * then attempt to process and construct a Response message. + * Bbbbbbbbbb b bbbbbbb bbbb bb bbbbbbbb bb bb bbbbbbbb bbbb bb bbb bbbbb bbbbbb. Bbbb bbbbbbb bbbb + * bbbb bbbbbbb bb bbbbbbb bbb bbbbbbbbb b Bbbbbbbb bbbbbbb. */ - interface Request extends MessageType { + bbbbbbbbb Bbbbbbb bbbbbbb BbbbbbbBbbb { /** - * When this message is detected, this message will be processed by the proxy and then dispatched - * to the listening servers. This task is to be executed asynchronously as these tasks will likely - * involve polling the central database for information. + * Bbbb bbbb bbbbbbb bb bbbbbbbb, bbbb bbbbbbb bbbb bb bbbbbbbbb bb bbb bbbbb bbb bbbb bbbbbbbbbb + * bb bbb bbbbbbbbb bbbbbbb. Bbbb bbbb bb bb bb bbbbbbbb bbbbbbbbbbbbbb bb bbbbb bbbbb bbbb bbbbbb + * bbbbbbb bbbbbbb bbb bbbbbbb bbbbbbbb bbb bbbbbbbbbbb. * - * @return A {@link CompletableFuture} that will process the message and craft a response that - * will be distributed across the servers. + * @bbbbbb B {@bbbb BbbbbbbbbbbBbbbbb} bbbb bbbb bbbbbbb bbb bbbbbbb bbb bbbbb b bbbbbbbb bbbb + * bbbb bb bbbbbbbbbbb bbbbbb bbb bbbbbbb. */ - CompletableFuture respond(); + BbbbbbbbbbbBbbbbb bbbbbbb(); } /** - * Represents a message built in regards to an incoming proxy message. These messages are intended - * to only be sent to the connected servers, and not the proxy itself. In the case of a multi-layered - * proxy, these messages should simply be relayed rather than processed. + * Bbbbbbbbbb b bbbbbbb bbbbb bb bbbbbbb bb bb bbbbbbbb bbbbb bbbbbbb. Bbbbb bbbbbbbb bbb bbbbbbbb + * bb bbbb bb bbbb bb bbb bbbbbbbbb bbbbbbb, bbb bbb bbb bbbbb bbbbbb. Bb bbb bbbb bb b bbbbb-bbbbbbb + * bbbbb, bbbbb bbbbbbbb bbbbbb bbbbbb bb bbbbbbb bbbbbb bbbb bbbbbbbbb. */ - interface Response extends MessageType { + bbbbbbbbb Bbbbbbbb bbbbbbb BbbbbbbBbbb { /** - * This call specifies the ID of the message that sent out the request that is now being responded to. - * We can use this to ensure we received a message back from the system manager for the specific message, - * rather than attempt to guess on which message was received. Also helps determine timeout procedures as - * we can now directly map an incoming response to an outgoing request. + * Bbbb bbbb bbbbbbbbb bbb BB bb bbb bbbbbbb bbbb bbbb bbb bbb bbbbbbb bbbb bb bbb bbbbb bbbbbbbbb bb. + * Bb bbb bbb bbbb bb bbbbbb bb bbbbbbbb b bbbbbbb bbbb bbbb bbb bbbbbb bbbbbbb bbb bbb bbbbbbbb bbbbbbb, + * bbbbbb bbbb bbbbbbb bb bbbbb bb bbbbb bbbbbbb bbb bbbbbbbb. Bbbb bbbbb bbbbbbbbb bbbbbbb bbbbbbbbbb bb + * bb bbb bbb bbbbbbbb bbb bb bbbbbbbb bbbbbbbb bb bb bbbbbbbb bbbbbbb. * - * @return The ID of the request message that generated this response + * @bbbbbb Bbb BB bb bbb bbbbbbb bbbbbbb bbbb bbbbbbbbb bbbb bbbbbbbb */ - UUID getRequestID(); + BBBB bbbBbbbbbbBB(); /** - * Represents how long it took for a request to create this response. This is handled internally. + * Bbbbbbbbbb bbb bbbb bb bbbb bbb b bbbbbbb bb bbbbbb bbbb bbbbbbbb. Bbbb bb bbbbbbb bbbbbbbbbb. * - * @return A millisecond value indicating the time between messages + * @bbbbbb B bbbbbbbbbbb bbbbb bbbbbbbbbb bbb bbbb bbbbbbb bbbbbbbb */ - long getResponseTime(); + bbbb bbbBbbbbbbbBbbb(); /** - * Applies the input rate as the response time for this message. This should realistically only be - * set by the implementation, and not otherwise altered. You may lose valuable information if you - * change this value. + * Bbbbbbb bbb bbbbb bbbb bb bbb bbbbbbbb bbbb bbb bbbb bbbbbbb. Bbbb bbbbbb bbbbbbbbbbbbb bbbb bb + * bbb bb bbb bbbbbbbbbbbbbb, bbb bbb bbbbbbbbb bbbbbbb. Bbb bbb bbbb bbbbbbbb bbbbbbbbbbb bb bbb + * bbbbbb bbbb bbbbb. */ - void setResponseTime(long millis); + bbbb bbbBbbbbbbbBbbb(bbbb bbbbbb); /** - * States whether or not the request was successful. This could be caused by a number of things, - * and is expected to have an accompanying error code to indicate the failure. + * Bbbbbb bbbbbbb bb bbb bbb bbbbbbb bbb bbbbbbbbbb. Bbbb bbbbb bb bbbbbb bb b bbbbbb bb bbbbbb, + * bbb bb bbbbbbbb bb bbbb bb bbbbbbbbbbbb bbbbb bbbb bb bbbbbbbb bbb bbbbbbb. * - * @return True if the initial request was successful, false otherwise. + * @bbbbbb Bbbb bb bbb bbbbbbb bbbbbbb bbb bbbbbbbbbb, bbbbb bbbbbbbbb. */ - boolean wasSuccessful(); + bbbbbbb bbbBbbbbbbbbb(); /** - * Indicates a state where this response indicated the request was not successful. In the case where - * we fail to succeed, this field should be populated with a common error code indicating the reason - * for the non-successful request. + * Bbbbbbbbb b bbbbb bbbbb bbbb bbbbbbbb bbbbbbbbb bbb bbbbbbb bbb bbb bbbbbbbbbb. Bb bbb bbbb bbbbb + * bb bbbb bb bbbbbbb, bbbb bbbbb bbbbbb bb bbbbbbbbb bbbb b bbbbbb bbbbb bbbb bbbbbbbbbb bbb bbbbbb + * bbb bbb bbb-bbbbbbbbbb bbbbbbb. * - * @return An empty Optional should this response be handled successfully, otherwise an Error Code - * indicating the reason the initial request failed. + * @bbbbbb Bb bbbbb Bbbbbbbb bbbbbb bbbb bbbbbbbb bb bbbbbbb bbbbbbbbbbbb, bbbbbbbbb bb Bbbbb Bbbb + * bbbbbbbbbb bbb bbbbbb bbb bbbbbbb bbbbbbb bbbbbb. */ - Optional getErrorCode(); + Bbbbbbbb bbbBbbbbBbbb(); - default PrettyPrinter finalizeReport(PrettyPrinter printer) { - printer.kv("Successful", this.wasSuccessful()); - this.getErrorCode().ifPresent(error -> { - printer.kv("Error", error.getKey()); + bbbbbbb BbbbbbBbbbbbb bbbbbbbbBbbbbb(BbbbbbBbbbbbb bbbbbbb) { + bbbbbbb.bb("Bbbbbbbbbb", bbbb.bbbBbbbbbbbbb()); + bbbb.bbbBbbbbBbbb().bbBbbbbbb(bbbbb -> { + bbbbbbb.bb("Bbbbb", bbbbb.bbbBbb()); }); - return printer.kv("Response Time", this.getResponseTime() + " ms"); + bbbbbb bbbbbbb.bb("Bbbbbbbb Bbbb", bbbb.bbbBbbbbbbbBbbb() + " bb"); } } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/UpdateMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/UpdateMessage.java index 951a4bef..24515c6b 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/UpdateMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/UpdateMessage.java @@ -1,35 +1,35 @@ /* - * This file is part of LuckPerms, licensed under the MIT License. + * Bbbb bbbb bb bbbb bb BbbbBbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb. * - * Copyright (c) lucko (Luck) - * Copyright (c) contributors + * Bbbbbbbbb (b) bbbbb (Bbbb) + * Bbbbbbbbb (b) bbbbbbbbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb bbb + * bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB BBB + * BBBBBBBB. */ -package net.impactdev.gts.api.messaging.message.type; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb; -import net.impactdev.gts.api.messaging.message.Message; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.Bbbbbbb; /** - * Represents an "update" message. + * Bbbbbbbbbb bb "bbbbbb" bbbbbbb. * - *

Used to notify other servers of general changes.

+ * Bbbb bb bbbbbb bbbbb bbbbbbb bb bbbbbbb bbbbbbb. */ -public interface UpdateMessage extends Message {} +bbbbbb bbbbbbbbb BbbbbbBbbbbbb bbbbbbb Bbbbbbb {} diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/admin/ForceDeleteMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/admin/ForceDeleteMessage.java index b96b66af..a8279872 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/admin/ForceDeleteMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/admin/ForceDeleteMessage.java @@ -1,79 +1,79 @@ -package net.impactdev.gts.api.messaging.message.type.admin; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbb; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.api.messaging.message.errors.ErrorCode; -import net.impactdev.gts.api.messaging.message.type.MessageType; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.impactor.api.builders.Builder; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbbbb.BbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; -import java.util.Optional; -import java.util.UUID; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BBBB; /** - * Represents the message that'll be sent when an administrator decides to force delete a listing off the - * GTS market. Realistically, returning the data to a user is outside the scope of the message, and should - * be handled by the requester. + * Bbbbbbbbbb bbb bbbbbbb bbbb'bb bb bbbb bbbb bb bbbbbbbbbbbbb bbbbbbb bb bbbbb bbbbbb b bbbbbbb bbb bbb + * BBB bbbbbb. Bbbbbbbbbbbbb, bbbbbbbbb bbb bbbb bb b bbbb bb bbbbbbb bbb bbbbb bb bbb bbbbbbb, bbb bbbbbb + * bb bbbbbbb bb bbb bbbbbbbbb. */ -public interface ForceDeleteMessage extends OutgoingMessage { +bbbbbb bbbbbbbbb BbbbbBbbbbbBbbbbbb bbbbbbb BbbbbbbbBbbbbbb { /** - * Represents the ID of the auction being acted on. This ID is the primary key to locating an auction, - * and as such, should be unique to one specific auction. + * Bbbbbbbbbb bbb BB bb bbb bbbbbbb bbbbb bbbbb bb. Bbbb BB bb bbb bbbbbbb bbb bb bbbbbbbb bb bbbbbbb, + * bbb bb bbbb, bbbbbb bb bbbbbb bb bbb bbbbbbbb bbbbbbb. * - * @return The ID of the auction + * @bbbbbb Bbb BB bb bbb bbbbbbb */ - @NonNull UUID getListingID(); + @BbbBbbb BBBB bbbBbbbbbbBB(); /** - * Represents the UUID of a player or another source that is applying the action to this auction. + * Bbbbbbbbbb bbb BBBB bb b bbbbbb bb bbbbbbb bbbbbb bbbb bb bbbbbbbb bbb bbbbbb bb bbbb bbbbbbb. * - * @return The UUID of the source applying the action + * @bbbbbb Bbb BBBB bb bbb bbbbbb bbbbbbbb bbb bbbbbb */ - @NonNull UUID getActor(); + @BbbBbbb BBBB bbbBbbbb(); /** - * States if this request should return the data contained in the listing if it is deleted. + * Bbbbbb bb bbbb bbbbbbb bbbbbb bbbbbb bbb bbbb bbbbbbbbb bb bbb bbbbbbb bb bb bb bbbbbbb. * - * @return True if the entry should be returned to the user on deletion + * @bbbbbb Bbbb bb bbb bbbbb bbbbbb bb bbbbbbbb bb bbb bbbb bb bbbbbbbb */ - boolean shouldGive(); + bbbbbbb bbbbbbBbbb(); - interface Request extends ForceDeleteMessage, MessageType.Request {} + bbbbbbbbb Bbbbbbb bbbbbbb BbbbbBbbbbbBbbbbbb, BbbbbbbBbbb.Bbbbbbb {} - interface Response extends ForceDeleteMessage, MessageType.Response { + bbbbbbbbb Bbbbbbbb bbbbbbb BbbbbBbbbbbBbbbbbb, BbbbbbbBbbb.Bbbbbbbb { /** - * Represents the UUID of the user who had their listing deleted. Since the listing will have been - * deleted before the response is made available to the requesting server, we will need to supply - * information back to the server about the listing. + * Bbbbbbbbbb bbb BBBB bb bbb bbbb bbb bbb bbbbb bbbbbbb bbbbbbb. Bbbbb bbb bbbbbbb bbbb bbbb bbbb + * bbbbbbb bbbbbb bbb bbbbbbbb bb bbbb bbbbbbbbb bb bbb bbbbbbbbbb bbbbbb, bb bbbb bbbb bb bbbbbb + * bbbbbbbbbbb bbbb bb bbb bbbbbb bbbbb bbb bbbbbbb. * - * Note that if the request was marked unsuccessful, this value will not be populated. + * Bbbb bbbb bb bbb bbbbbbb bbb bbbbbb bbbbbbbbbbbb, bbbb bbbbb bbbb bbb bb bbbbbbbbb. * - * @return The ID of the user who made the listing + * @bbbbbb Bbb BB bb bbb bbbb bbb bbbb bbb bbbbbbb */ - Optional getDeletedListing(); + Bbbbbbbb bbbBbbbbbbBbbbbbb(); - static ResponseBuilder builder() { - return Impactor.getInstance().getRegistry().createBuilder(ResponseBuilder.class); + bbbbbb BbbbbbbbBbbbbbb bbbbbbb() { + bbbbbb Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbBbbbbbb(BbbbbbbbBbbbbbb.bbbbb); } - interface ResponseBuilder extends Builder { + bbbbbbbbb BbbbbbbbBbbbbbb bbbbbbb Bbbbbbb { - ResponseBuilder request(UUID request); + BbbbbbbbBbbbbbb bbbbbbb(BBBB bbbbbbb); - ResponseBuilder listing(UUID listing); + BbbbbbbbBbbbbbb bbbbbbb(BBBB bbbbbbb); - ResponseBuilder actor(UUID actor); + BbbbbbbbBbbbbbb bbbbb(BBBB bbbbb); - ResponseBuilder data(Listing data); + BbbbbbbbBbbbbbb bbbb(Bbbbbbb bbbb); - ResponseBuilder give(boolean give); + BbbbbbbbBbbbbbb bbbb(bbbbbbb bbbb); - ResponseBuilder successful(boolean successful); + BbbbbbbbBbbbbbb bbbbbbbbbb(bbbbbbb bbbbbbbbbb); - ResponseBuilder error(ErrorCode error); + BbbbbbbbBbbbbbb bbbbb(BbbbbBbbb bbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/admin/MaintenanceUpdateMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/admin/MaintenanceUpdateMessage.java index 0c29d4cb..162f5b8b 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/admin/MaintenanceUpdateMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/admin/MaintenanceUpdateMessage.java @@ -1,16 +1,16 @@ -package net.impactdev.gts.api.messaging.message.type.admin; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbb; -import net.impactdev.gts.api.maintenance.MaintenanceMode; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb.BbbbbbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; /** - * Indicates the plugin is going into maintenance mode, wherein + * Bbbbbbbbb bbb bbbbbb bb bbbbb bbbb bbbbbbbbbbb bbbb, bbbbbbb */ -public interface MaintenanceUpdateMessage extends OutgoingMessage { +bbbbbb bbbbbbbbb BbbbbbbbbbbBbbbbbBbbbbbb bbbbbbb BbbbbbbbBbbbbbb { - @NonNull MaintenanceMode mode(); + @BbbBbbb BbbbbbbbbbbBbbb bbbb(); - boolean state(); + bbbbbbb bbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/auctions/AuctionMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/auctions/AuctionMessage.java index 17f8c964..beda6ec2 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/auctions/AuctionMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/auctions/AuctionMessage.java @@ -1,125 +1,125 @@ -package net.impactdev.gts.api.messaging.message.type.auctions; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbb; -import com.google.common.collect.TreeMultimap; -import net.impactdev.gts.api.listings.auctions.Auction; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.api.messaging.message.type.MessageType; -import org.checkerframework.checker.index.qual.Positive; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.BbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbb.bbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; -import java.util.List; -import java.util.Map; -import java.util.UUID; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbb; +bbbbbb bbbb.bbbb.BBBB; /** - * Represents a message that belongs to an auction. These messages are meant to inform a user - * about an action that has just occurred with an auction. + * Bbbbbbbbbb b bbbbbbb bbbb bbbbbbb bb bb bbbbbbb. Bbbbb bbbbbbbb bbb bbbbb bb bbbbbb b bbbb + * bbbbb bb bbbbbb bbbb bbb bbbb bbbbbbbb bbbb bb bbbbbbb. */ -public interface AuctionMessage extends OutgoingMessage { +bbbbbb bbbbbbbbb BbbbbbbBbbbbbb bbbbbbb BbbbbbbbBbbbbbb { /** - * Represents the ID of the auction being acted on. This ID is the primary key to locating an auction, - * and as such, should be unique to one specific auction. + * Bbbbbbbbbb bbb BB bb bbb bbbbbbb bbbbb bbbbb bb. Bbbb BB bb bbb bbbbbbb bbb bb bbbbbbbb bb bbbbbbb, + * bbb bb bbbb, bbbbbb bb bbbbbb bb bbb bbbbbbbb bbbbbbb. * - * @return The ID of the auction + * @bbbbbb Bbb BB bb bbb bbbbbbb */ - @NonNull UUID getAuctionID(); + @BbbBbbb BBBB bbbBbbbbbbBB(); /** - * Represents the UUID of a player or another source that is applying the action to this auction. + * Bbbbbbbbbb bbb BBBB bb b bbbbbb bb bbbbbbb bbbbbb bbbb bb bbbbbbbb bbb bbbbbb bb bbbb bbbbbbb. * - * @return The UUID of the source applying the action + * @bbbbbb Bbb BBBB bb bbb bbbbbb bbbbbbbb bbb bbbbbb */ - @NonNull UUID getActor(); + @BbbBbbb BBBB bbbBbbbb(); /** - * Represents a bid action. This message is created whenever a player decides to bid on an auction. - * The responsibility of this message is to inform the users who have all made bids, as well - * as the seller, that a new bid has been placed, either outbidding someone else, or simply - * just informing the seller. + * Bbbbbbbbbb b bbb bbbbbb. Bbbb bbbbbbb bb bbbbbbb bbbbbbbb b bbbbbb bbbbbbb bb bbb bb bb bbbbbbb. + * Bbb bbbbbbbbbbbbbb bb bbbb bbbbbbb bb bb bbbbbb bbb bbbbb bbb bbbb bbb bbbb bbbb, bb bbbb + * bb bbb bbbbbb, bbbb b bbb bbb bbb bbbb bbbbbb, bbbbbb bbbbbbbbbb bbbbbbb bbbb, bb bbbbbb + * bbbb bbbbbbbbb bbb bbbbbb. * - *

To aid in avoiding redundant querying, this message will be processed on the proxy as it comes - * in. On the proxy, the listing will be queried for through the appropriate storage manager, applying - * that data to this message as to populate it with that information. This information includes the - * seller and the mapping of bids.

+ * Bb bbb bb bbbbbbbb bbbbbbbbb bbbbbbbb, bbbb bbbbbbb bbbb bb bbbbbbbbb bb bbb bbbbb bb bb bbbbb + * bb. Bb bbb bbbbb, bbb bbbbbbb bbbb bb bbbbbbb bbb bbbbbbb bbb bbbbbbbbbbb bbbbbbb bbbbbbb, bbbbbbbb + * bbbb bbbb bb bbbb bbbbbbb bb bb bbbbbbbb bb bbbb bbbb bbbbbbbbbbb. Bbbb bbbbbbbbbbb bbbbbbbb bbb + * bbbbbb bbb bbb bbbbbbb bb bbbb. * - *

It is expected on the proxy to have the seller and bid list be possibly null. In other words, - * this is really only meant to suggest that the proxy should be the one processing the listing, and then - * reporting all other relevant information.

+ * Bb bb bbbbbbbb bb bbb bbbbb bb bbbb bbb bbbbbb bbb bbb bbbb bb bbbbbbbb bbbb. Bb bbbbb bbbbb, + * bbbb bb bbbbbb bbbb bbbbb bb bbbbbbb bbbb bbb bbbbb bbbbbb bb bbb bbb bbbbbbbbbb bbb bbbbbbb, bbb bbbb + * bbbbbbbbb bbb bbbbb bbbbbbbb bbbbbbbbbbb. */ - interface Bid extends AuctionMessage { + bbbbbbbbb Bbb bbbbbbb BbbbbbbBbbbbbb { - @Positive double getAmountBid(); + @Bbbbbbbb bbbbbb bbbBbbbbbBbb(); /** - * Represents the message that'll be sent to the proxy servers. While it contains no further data, this - * message is built to simply be an identifier for the proxy. + * Bbbbbbbbbb bbb bbbbbbb bbbb'bb bb bbbb bb bbb bbbbb bbbbbbb. Bbbbb bb bbbbbbbb bb bbbbbbb bbbb, bbbb + * bbbbbbb bb bbbbb bb bbbbbb bb bb bbbbbbbbbb bbb bbb bbbbb. */ - interface Request extends Bid, MessageType.Request {} + bbbbbbbbb Bbbbbbb bbbbbbb Bbb, BbbbbbbBbbb.Bbbbbbb {} /** - * Represents the response that'll be sent out to all servers. Essentially, the bid message will be initially - * processed by the Request, and evaluated for its information. After the proxy has determined the results of the - * bid, it'll send this response message, which specifies whether or not the bid was successful, who the seller - * was, and a mapping of all bids placed by other players. + * Bbbbbbbbbb bbb bbbbbbbb bbbb'bb bb bbbb bbb bb bbb bbbbbbb. Bbbbbbbbbbb, bbb bbb bbbbbbb bbbb bb bbbbbbbbb + * bbbbbbbbb bb bbb Bbbbbbb, bbb bbbbbbbbb bbb bbb bbbbbbbbbbb. Bbbbb bbb bbbbb bbb bbbbbbbbbb bbb bbbbbbb bb bbb + * bbb, bb'bb bbbb bbbb bbbbbbbb bbbbbbb, bbbbb bbbbbbbbb bbbbbbb bb bbb bbb bbb bbb bbbbbbbbbb, bbb bbb bbbbbb + * bbb, bbb b bbbbbbb bb bbb bbbb bbbbbb bb bbbbb bbbbbbb. */ - interface Response extends Bid, MessageType.Response { + bbbbbbbbb Bbbbbbbb bbbbbbb Bbb, BbbbbbbBbbb.Bbbbbbbb { /** - * Specifies the seller of the listing. The seller is the individual who should receive notice of their - * auction being bid on, when a bid is successful. + * Bbbbbbbbb bbb bbbbbb bb bbb bbbbbbb. Bbb bbbbbb bb bbb bbbbbbbbbb bbb bbbbbb bbbbbbb bbbbbb bb bbbbb + * bbbbbbb bbbbb bbb bb, bbbb b bbb bb bbbbbbbbbb. * - * @return The UUID of the user who created the auction + * @bbbbbb Bbb BBBB bb bbb bbbb bbb bbbbbbb bbb bbbbbbb */ - @NonNull UUID getSeller(); + @BbbBbbb BBBB bbbBbbbbb(); /** - * Represents a filtered map of users to their highest bids. While a user may have multiple bids on a listing, - * this data will only be populated by their highest bids. This is meant to be a quick and easy way to inform - * a user of just how much money they are outbid by. + * Bbbbbbbbbb b bbbbbbbb bbb bb bbbbb bb bbbbb bbbbbbb bbbb. Bbbbb b bbbb bbb bbbb bbbbbbbb bbbb bb b bbbbbbb, + * bbbb bbbb bbbb bbbb bb bbbbbbbbb bb bbbbb bbbbbbb bbbb. Bbbb bb bbbbb bb bb b bbbbb bbb bbbb bbb bb bbbbbb + * b bbbb bb bbbb bbb bbbb bbbbb bbbb bbb bbbbbb bb. * - * @return A mapping of users to their highest bids on the auction currently + * @bbbbbb B bbbbbbb bb bbbbb bb bbbbb bbbbbbb bbbb bb bbb bbbbbbb bbbbbbbbb */ - @NonNull TreeMultimap getAllOtherBids(); + @BbbBbbb BbbbBbbbbbbb bbbBbbBbbbbBbbb(); - boolean wasSniped(); + bbbbbbb bbbBbbbbb(); } } /** - * Represents the act of the auction creator cancelling their auction. This message is entirely dependent on - * two main aspects of plugin configuration: The allowance of a user being able to cancel an auction, and the - * amount of time left on the auction per some ratio that'll actually allow a user to cancel their auction. + * Bbbbbbbbbb bbb bbb bb bbb bbbbbbb bbbbbbb bbbbbbbbbb bbbbb bbbbbbb. Bbbb bbbbbbb bb bbbbbbbb bbbbbbbbb bb + * bbb bbbb bbbbbbb bb bbbbbb bbbbbbbbbbbbb: Bbb bbbbbbbbb bb b bbbb bbbbb bbbb bb bbbbbb bb bbbbbbb, bbb bbb + * bbbbbb bb bbbb bbbb bb bbb bbbbbbb bbb bbbb bbbbb bbbb'bb bbbbbbbb bbbbb b bbbb bb bbbbbb bbbbb bbbbbbb. * - *

If an auction is cancelled, this message will thereby be sent as a means to inform all current - * bidders that the auction has been cancelled.

+ * Bb bb bbbbbbb bb bbbbbbbbb, bbbb bbbbbbb bbbb bbbbbbb bb bbbb bb b bbbbb bb bbbbbb bbb bbbbbbb + * bbbbbbb bbbb bbb bbbbbbb bbb bbbb bbbbbbbbb. */ - interface Cancel extends AuctionMessage { + bbbbbbbbb Bbbbbb bbbbbbb BbbbbbbBbbbbbb { - interface Request extends Cancel, MessageType.Request {} + bbbbbbbbb Bbbbbbb bbbbbbb Bbbbbb, BbbbbbbBbbb.Bbbbbbb {} /** - * After processing, this is the message that the proxy will attempt to send back to the servers. + * Bbbbb bbbbbbbbbb, bbbb bb bbb bbbbbbb bbbb bbb bbbbb bbbb bbbbbbb bb bbbb bbbb bb bbb bbbbbbb. */ - interface Response extends Cancel, MessageType.Response { + bbbbbbbbb Bbbbbbbb bbbbbbb Bbbbbb, BbbbbbbBbbb.Bbbbbbbb { /** - * Contextual information regarding this listing will be deleted by the time a server processing - * the response will have begun. As such, we will pass a copy of the data alongside the response - * so listeners can interact with the information. + * Bbbbbbbbbb bbbbbbbbbbb bbbbbbbbb bbbb bbbbbbb bbbb bb bbbbbbb bb bbb bbbb b bbbbbb bbbbbbbbbb + * bbb bbbbbbbb bbbb bbbb bbbbb. Bb bbbb, bb bbbb bbbb b bbbb bb bbb bbbb bbbbbbbbb bbb bbbbbbbb + * bb bbbbbbbbb bbb bbbbbbbb bbbb bbb bbbbbbbbbbb. * - * @return The data of the auction that was just cancelled + * @bbbbbb Bbb bbbb bb bbb bbbbbbb bbbb bbb bbbb bbbbbbbbb */ - Auction getData(); + Bbbbbbb bbbBbbb(); /** - * Specifies the list of users who have bid on this auction at least once. They should - * be informed of the auction being cancelled. + * Bbbbbbbbb bbb bbbb bb bbbbb bbb bbbb bbb bb bbbb bbbbbbb bb bbbbb bbbb. Bbbb bbbbbb + * bb bbbbbbbb bb bbb bbbbbbb bbbbb bbbbbbbbb. * - * @return The list of all bidders + * @bbbbbb Bbb bbbb bb bbb bbbbbbb */ - List getBidders(); + Bbbb bbbBbbbbbb(); } } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/deliveries/ClaimDelivery.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/deliveries/ClaimDelivery.java index 3c86e435..724163ea 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/deliveries/ClaimDelivery.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/deliveries/ClaimDelivery.java @@ -1,19 +1,19 @@ -package net.impactdev.gts.api.messaging.message.type.deliveries; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbbbb; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.api.messaging.message.type.MessageType; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; -public interface ClaimDelivery extends OutgoingMessage { +bbbbbb bbbbbbbbb BbbbbBbbbbbbb bbbbbbb BbbbbbbbBbbbbbb { - @NonNull UUID getDeliveryID(); + @BbbBbbb BBBB bbbBbbbbbbbBB(); - @NonNull UUID getActor(); + @BbbBbbb BBBB bbbBbbbb(); - interface Request extends ClaimDelivery, MessageType.Request {} + bbbbbbbbb Bbbbbbb bbbbbbb BbbbbBbbbbbbb, BbbbbbbBbbb.Bbbbbbb {} - interface Response extends ClaimDelivery, MessageType.Response {} + bbbbbbbbb Bbbbbbbb bbbbbbb BbbbbBbbbbbbb, BbbbbbbBbbb.Bbbbbbbb {} } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/BuyItNowMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/BuyItNowMessage.java index 4e5ce750..1c62fa79 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/BuyItNowMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/BuyItNowMessage.java @@ -1,128 +1,128 @@ -package net.impactdev.gts.api.messaging.message.type.listings; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbb; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.api.messaging.message.type.MessageType; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbbBbbb; -import java.util.Optional; -import java.util.UUID; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BBBB; /** - * These messages belong to a listing with a singular and finalized selling price. In other - * words, unlike auctions, players will not be at war with each other for a set of time in - * order to win the listing. Rather, a player can outright purchase the item immediately. + * Bbbbb bbbbbbbb bbbbbb bb b bbbbbbb bbbb b bbbbbbbb bbb bbbbbbbbb bbbbbbb bbbbb. Bb bbbbb + * bbbbb, bbbbbb bbbbbbbb, bbbbbbb bbbb bbb bb bb bbb bbbb bbbb bbbbb bbb b bbb bb bbbb bb + * bbbbb bb bbb bbb bbbbbbb. Bbbbbb, b bbbbbb bbb bbbbbbbb bbbbbbbb bbb bbbb bbbbbbbbbbb. */ -public interface BuyItNowMessage extends OutgoingMessage { +bbbbbb bbbbbbbbb BbbBbBbbBbbbbbb bbbbbbb BbbbbbbbBbbbbbb { /** - * Specifies the ID of the listing this message is based on. It'll be used for reference - * by any messages that may require it. + * Bbbbbbbbb bbb BB bb bbb bbbbbbb bbbb bbbbbbb bb bbbbb bb. Bb'bb bb bbbb bbb bbbbbbbbb + * bb bbb bbbbbbbb bbbb bbb bbbbbbb bb. * - * @return The ID of the quick purchase listing. + * @bbbbbb Bbb BB bb bbb bbbbb bbbbbbbb bbbbbbb. */ - UUID getListingID(); + BBBB bbbBbbbbbbBB(); /** - * Represents the ID of the user who is making the purchase. This is to allow for a quick response - * rather than need to require a mapping of actor to sent message IDs. + * Bbbbbbbbbb bbb BB bb bbb bbbb bbb bb bbbbbb bbb bbbbbbbb. Bbbb bb bb bbbbb bbb b bbbbb bbbbbbbb + * bbbbbb bbbb bbbb bb bbbbbbb b bbbbbbb bb bbbbb bb bbbb bbbbbbb BBb. * - * @return The ID of the user who made the purchase + * @bbbbbb Bbb BB bb bbb bbbb bbb bbbb bbb bbbbbbbb */ - UUID getActor(); + BBBB bbbBbbbb(); /** - * This message type indicates that a new quick purchase listing has been published. + * Bbbb bbbbbbb bbbb bbbbbbbbb bbbb b bbb bbbbb bbbbbbbb bbbbbbb bbb bbbb bbbbbbbbb. * - * We cannot expect the message to be populated with physical decoded data given that this - * message can be received on a proxy, where extensions should not be installed at all. Along - * with that detail, the proxy will never even attempt to deserialize the raw data of a listing. - * Therefore, this message is simply populated with the message that indicates that the listing - * is actually being published globally, or within the scope of the configuration. + * Bb bbbbbb bbbbbb bbb bbbbbbb bb bb bbbbbbbbb bbbb bbbbbbbb bbbbbbb bbbb bbbbb bbbb bbbb + * bbbbbbb bbb bb bbbbbbbb bb b bbbbb, bbbbb bbbbbbbbbb bbbbbb bbb bb bbbbbbbbb bb bbb. Bbbbb + * bbbb bbbb bbbbbb, bbb bbbbb bbbb bbbbb bbbb bbbbbbb bb bbbbbbbbbbb bbb bbb bbbb bb b bbbbbbb. + * Bbbbbbbbb, bbbb bbbbbbb bb bbbbbb bbbbbbbbb bbbb bbb bbbbbbb bbbb bbbbbbbbb bbbb bbb bbbbbbb + * bb bbbbbbbb bbbbb bbbbbbbbb bbbbbbbb, bb bbbbbb bbb bbbbb bb bbb bbbbbbbbbbbbb. */ - interface Publish extends BuyItNowMessage {} + bbbbbbbbb Bbbbbbb bbbbbbb BbbBbBbbBbbbbbb {} /** - * These messages indicate that a purchase attempt has been made on a listing. Being as these messages - * can possibly be concurrent, these messages make use of the request and response structure. + * Bbbbb bbbbbbbb bbbbbbbb bbbb b bbbbbbbb bbbbbbb bbb bbbb bbbb bb b bbbbbbb. Bbbbb bb bbbbb bbbbbbbb + * bbb bbbbbbbb bb bbbbbbbbbb, bbbbb bbbbbbbb bbbb bbb bb bbb bbbbbbb bbb bbbbbbbb bbbbbbbbb. * - * By supplying the actor's UUID, we can make the request and response rather quick for the user making - * the request, assuming the storage provider holds up. + * Bb bbbbbbbbb bbb bbbbb'b BBBB, bb bbb bbbb bbb bbbbbbb bbb bbbbbbbb bbbbbb bbbbb bbb bbb bbbb bbbbbb + * bbb bbbbbbb, bbbbbbbb bbb bbbbbbb bbbbbbbb bbbbb bb. */ - interface Purchase extends BuyItNowMessage { + bbbbbbbbb Bbbbbbbb bbbbbbb BbbBbBbbBbbbbbb { /** - * This message indicates a request being made to purchase an item off the GTS. This request will then - * be processed by the active GTS Service manager in action, as a means to ensure that the purchase - * is indeed valid. + * Bbbb bbbbbbb bbbbbbbbb b bbbbbbb bbbbb bbbb bb bbbbbbbb bb bbbb bbb bbb BBB. Bbbb bbbbbbb bbbb bbbb + * bb bbbbbbbbb bb bbb bbbbbb BBB Bbbbbbb bbbbbbb bb bbbbbb, bb b bbbbb bb bbbbbb bbbb bbb bbbbbbbb + * bb bbbbbb bbbbb. * - * A valid request will then be further processed, apply the necessary actions to the storage manager, - * and then further respond to the request with a new {@link Purchase.Response Response} message. + * B bbbbb bbbbbbb bbbb bbbb bb bbbbbbb bbbbbbbbb, bbbbb bbb bbbbbbbbb bbbbbbb bb bbb bbbbbbb bbbbbbb, + * bbb bbbb bbbbbbb bbbbbbb bb bbb bbbbbbb bbbb b bbb {@bbbb Bbbbbbbb.Bbbbbbbb Bbbbbbbb} bbbbbbb. */ - interface Request extends Purchase, MessageType.Request {} + bbbbbbbbb Bbbbbbb bbbbbbb Bbbbbbbb, BbbbbbbBbbb.Bbbbbbb {} /** - * This message indicates the response to a {@link Purchase.Request Request} made prior to this - * message. In general, this message simply contains the UUID of the listing being purchased, - * as well as the success status of the request. + * Bbbb bbbbbbb bbbbbbbbb bbb bbbbbbbb bb b {@bbbb Bbbbbbbb.Bbbbbbb Bbbbbbb} bbbb bbbbb bb bbbb + * bbbbbbb. Bb bbbbbbb, bbbb bbbbbbb bbbbbb bbbbbbbb bbb BBBB bb bbb bbbbbbb bbbbb bbbbbbbbb, + * bb bbbb bb bbb bbbbbbb bbbbbb bb bbb bbbbbbb. */ - interface Response extends Purchase, MessageType.Response { + bbbbbbbbb Bbbbbbbb bbbbbbb Bbbbbbbb, BbbbbbbBbbb.Bbbbbbbb { /** - * The UUID of the user selling this listing. This is meant to aid receiving servers in finding - * out who we should try to inform of their listing being sold, if they are online at all. + * Bbb BBBB bb bbb bbbb bbbbbbb bbbb bbbbbbb. Bbbb bb bbbbb bb bbb bbbbbbbbb bbbbbbb bb bbbbbbb + * bbb bbb bb bbbbbb bbb bb bbbbbb bb bbbbb bbbbbbb bbbbb bbbb, bb bbbb bbb bbbbbb bb bbb. * - * @return The UUID of the seller + * @bbbbbb Bbb BBBB bb bbb bbbbbb */ - UUID getSeller(); + BBBB bbbBbbbbb(); } } /** - * This messages indicate the attempt to remove a quick purchase listing from the GTS market entirely. - * A listing may or may not be already purchased or removed prior to this request to remove it, and as such - * this message also builds a response message in relation to a request made indicating success. + * Bbbb bbbbbbbb bbbbbbbb bbb bbbbbbb bb bbbbbb b bbbbb bbbbbbbb bbbbbbb bbbb bbb BBB bbbbbb bbbbbbbb. + * B bbbbbbb bbb bb bbb bbb bb bbbbbbb bbbbbbbbb bb bbbbbbb bbbbb bb bbbb bbbbbbb bb bbbbbb bb, bbb bb bbbb + * bbbb bbbbbbb bbbb bbbbbb b bbbbbbbb bbbbbbb bb bbbbbbbb bb b bbbbbbb bbbb bbbbbbbbbb bbbbbbb. */ - interface Remove extends BuyItNowMessage { + bbbbbbbbb Bbbbbb bbbbbbb BbbBbBbbBbbbbbb { /** - * Specifies the UUID of the user this listing should be returned to. This field is only checked - * if the value of {@link #shouldReturnListing()} is true. + * Bbbbbbbbb bbb BBBB bb bbb bbbb bbbb bbbbbbb bbbbbb bb bbbbbbbb bb. Bbbb bbbbb bb bbbb bbbbbbb + * bb bbb bbbbb bb {@bbbb #bbbbbbBbbbbbBbbbbbb()} bb bbbb. * - * If this value is true, it is expected that this value will be populated. Otherwise, an exception - * will likely be thrown in response. + * Bb bbbb bbbbb bb bbbb, bb bb bbbbbbbb bbbb bbbb bbbbb bbbb bb bbbbbbbbb. Bbbbbbbbb, bb bbbbbbbbb + * bbbb bbbbbb bb bbbbbb bb bbbbbbbb. * - * Given this can be administratively received/taken, the ID of the user can also be the administrator - * executing a removal rather than the actual seller of the listing. + * Bbbbb bbbb bbb bb bbbbbbbbbbbbbbbb bbbbbbbb/bbbbb, bbb BB bb bbb bbbb bbb bbbb bb bbb bbbbbbbbbbbbb + * bbbbbbbbb b bbbbbbb bbbbbb bbbb bbb bbbbbb bbbbbb bb bbb bbbbbbb. * - * @return The ID of the user optionally wrapped based on request parameters. + * @bbbbbb Bbb BB bb bbb bbbb bbbbbbbbbb bbbbbbb bbbbb bb bbbbbbb bbbbbbbbbb. */ - Optional getRecipient(); + Bbbbbbbb bbbBbbbbbbbb(); /** - * Indicates whether or not this listing should have its item returned to the user who published it. - * This is to ensure that items being removed for a specific purpose (server rule violations and etc.) - * are not returned to the user and rather just deleted from the system. + * Bbbbbbbbb bbbbbbb bb bbb bbbb bbbbbbb bbbbbb bbbb bbb bbbb bbbbbbbb bb bbb bbbb bbb bbbbbbbbb bb. + * Bbbb bb bb bbbbbb bbbb bbbbb bbbbb bbbbbbb bbb b bbbbbbbb bbbbbbb (bbbbbb bbbb bbbbbbbbbb bbb bbb.) + * bbb bbb bbbbbbbb bb bbb bbbb bbb bbbbbb bbbb bbbbbbb bbbb bbb bbbbbb. * - * @return True if the listing should be returned to a user, false otherwise. + * @bbbbbb Bbbb bb bbb bbbbbbb bbbbbb bb bbbbbbbb bb b bbbb, bbbbb bbbbbbbbb. */ - boolean shouldReturnListing(); + bbbbbbb bbbbbbBbbbbbBbbbbbb(); /** - * This message indicates a user's request to remove a quick purchase listing from the GTS. While this - * message contains no extended data, it will at least generate a response stating the outcome of the - * removal attempt. + * Bbbb bbbbbbb bbbbbbbbb b bbbb'b bbbbbbb bb bbbbbb b bbbbb bbbbbbbb bbbbbbb bbbb bbb BBB. Bbbbb bbbb + * bbbbbbb bbbbbbbb bb bbbbbbbb bbbb, bb bbbb bb bbbbb bbbbbbbb b bbbbbbbb bbbbbbb bbb bbbbbbb bb bbb + * bbbbbbb bbbbbbb. */ - interface Request extends Remove, MessageType.Request {} + bbbbbbbbb Bbbbbbb bbbbbbb Bbbbbb, BbbbbbbBbbb.Bbbbbbb {} /** - * This message indicates a response to a user's request to remove a quick purchase listing from - * the GTS. Unlike the request, this response contains an extra field stating if the request was - * successfully completed. A response will be marked a failure only if the listing in question is - * no longer in the storage provider, which likely means the listing was removed from a purchase - * or another request prior to the request this response is now responding to. + * Bbbb bbbbbbb bbbbbbbbb b bbbbbbbb bb b bbbb'b bbbbbbb bb bbbbbb b bbbbb bbbbbbbb bbbbbbb bbbb + * bbb BBB. Bbbbbb bbb bbbbbbb, bbbb bbbbbbbb bbbbbbbb bb bbbbb bbbbb bbbbbbb bb bbb bbbbbbb bbb + * bbbbbbbbbbbb bbbbbbbbb. B bbbbbbbb bbbb bb bbbbbb b bbbbbbb bbbb bb bbb bbbbbbb bb bbbbbbbb bb + * bb bbbbbb bb bbb bbbbbbb bbbbbbbb, bbbbb bbbbbb bbbbb bbb bbbbbbb bbb bbbbbbb bbbb b bbbbbbbb + * bb bbbbbbb bbbbbbb bbbbb bb bbb bbbbbbb bbbb bbbbbbbb bb bbb bbbbbbbbbb bb. */ - interface Response extends Remove, MessageType.Response {} + bbbbbbbbb Bbbbbbbb bbbbbbb Bbbbbb, BbbbbbbBbbb.Bbbbbbbb {} } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/ClaimMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/ClaimMessage.java index beb70393..c81713aa 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/ClaimMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/ClaimMessage.java @@ -1,102 +1,102 @@ -package net.impactdev.gts.api.messaging.message.type.listings; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbb; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.api.messaging.message.type.MessageType; -import net.impactdev.gts.api.util.TriState; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.BbbBbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; -import java.util.List; -import java.util.Optional; -import java.util.UUID; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BBBB; /** - * Represents an attempt by a user to claim an item of theirs granted by GTS. + * Bbbbbbbbbb bb bbbbbbb bb b bbbb bb bbbbb bb bbbb bb bbbbbb bbbbbbb bb BBB. */ -public interface ClaimMessage extends OutgoingMessage { +bbbbbb bbbbbbbbb BbbbbBbbbbbb bbbbbbb BbbbbbbbBbbbbbb { /** - * Represents the ID of the auction being acted on. This ID is the primary key to locating an auction, - * and as such, should be unique to one specific auction. + * Bbbbbbbbbb bbb BB bb bbb bbbbbbb bbbbb bbbbb bb. Bbbb BB bb bbb bbbbbbb bbb bb bbbbbbbb bb bbbbbbb, + * bbb bb bbbb, bbbbbb bb bbbbbb bb bbb bbbbbbbb bbbbbbb. * - * @return The ID of the auction + * @bbbbbb Bbb BB bb bbb bbbbbbb */ - @NonNull UUID getListingID(); + @BbbBbbb BBBB bbbBbbbbbbBB(); /** - * Represents the UUID of a player or another source that is applying the action to this auction. + * Bbbbbbbbbb bbb BBBB bb b bbbbbb bb bbbbbbb bbbbbb bbbb bb bbbbbbbb bbb bbbbbb bb bbbb bbbbbbb. * - * @return The UUID of the source applying the action + * @bbbbbb Bbb BBBB bb bbb bbbbbb bbbbbbbb bbb bbbbbb */ - @NonNull UUID getActor(); + @BbbBbbb BBBB bbbBbbbb(); /** - * Represents the ID of the user that will be receiving this listing. This is primarily for - * admin usage. Otherwise, a normal claim operation will find this value always empty. + * Bbbbbbbbbb bbb BB bb bbb bbbb bbbb bbbb bb bbbbbbbbb bbbb bbbbbbb. Bbbb bb bbbbbbbbb bbb + * bbbbb bbbbb. Bbbbbbbbb, b bbbbbb bbbbb bbbbbbbbb bbbb bbbb bbbb bbbbb bbbbbb bbbbb. * - * @return The UUID of the intended receiver, if one is set + * @bbbbbb Bbb BBBB bb bbb bbbbbbbb bbbbbbbb, bb bbb bb bbb */ - Optional getReceiver(); + Bbbbbbbb bbbBbbbbbbb(); /** - * Specifies whether or not this claim request was based on an auction. + * Bbbbbbbbb bbbbbbb bb bbb bbbb bbbbb bbbbbbb bbb bbbbb bb bb bbbbbbb. * - * @return True if the claim request was for an auction, false for BIN + * @bbbbbb Bbbb bb bbb bbbbb bbbbbbb bbb bbb bb bbbbbbb, bbbbb bbb BBB */ - boolean isAuction(); + bbbbbbb bbBbbbbbb(); /** - * This represents the actual request made to the messaging service, in which we expect a response indicating - * whether or not the action can go through. + * Bbbb bbbbbbbbbb bbb bbbbbb bbbbbbb bbbb bb bbb bbbbbbbbb bbbbbbb, bb bbbbb bb bbbbbb b bbbbbbbb bbbbbbbbbb + * bbbbbbb bb bbb bbb bbbbbb bbb bb bbbbbbb. * - * If our claim is based around an auction, this request should return an {@link ClaimMessage.Response.AuctionResponse} - * that includes the extended information. + * Bb bbb bbbbb bb bbbbb bbbbbb bb bbbbbbb, bbbb bbbbbbb bbbbbb bbbbbb bb {@bbbb BbbbbBbbbbbb.Bbbbbbbb.BbbbbbbBbbbbbbb} + * bbbb bbbbbbbb bbb bbbbbbbb bbbbbbbbbbb. */ - interface Request extends ClaimMessage, MessageType.Request {} + bbbbbbbbb Bbbbbbb bbbbbbb BbbbbBbbbbbb, BbbbbbbBbbb.Bbbbbbb {} /** - * This represents the response to a request. This will be used to determine whether the claim request proceeded - * successfully, or received some kind of error stopping the request. + * Bbbb bbbbbbbbbb bbb bbbbbbbb bb b bbbbbbb. Bbbb bbbb bb bbbb bb bbbbbbbbb bbbbbbb bbb bbbbb bbbbbbb bbbbbbbbb + * bbbbbbbbbbbb, bb bbbbbbbb bbbb bbbb bb bbbbb bbbbbbbb bbb bbbbbbb. */ - interface Response extends ClaimMessage, MessageType.Response { + bbbbbbbbb Bbbbbbbb bbbbbbb BbbbbBbbbbbb, BbbbbbbBbbb.Bbbbbbbb { /** - * A child of a response, specific to an attempt to claim from an auction. This carries - * more information in regards to the auction such that we can ensure successful - * retrieval of goods per each user. + * B bbbbb bb b bbbbbbbb, bbbbbbbb bb bb bbbbbbb bb bbbbb bbbb bb bbbbbbb. Bbbb bbbbbbb + * bbbb bbbbbbbbbbb bb bbbbbbb bb bbb bbbbbbb bbbb bbbb bb bbb bbbbbb bbbbbbbbbb + * bbbbbbbbb bb bbbbb bbb bbbb bbbb. */ - interface AuctionResponse extends ClaimMessage.Response { + bbbbbbbbb BbbbbbbBbbbbbbb bbbbbbb BbbbbBbbbbbb.Bbbbbbbb { /** - * Indicates that the lister of the auction has claimed their portion of the auction. + * Bbbbbbbbb bbbb bbb bbbbbb bb bbb bbbbbbb bbb bbbbbbb bbbbb bbbbbbb bb bbb bbbbbbb. * - * @return True if the lister has claimed part of the auction, false otherwise + * @bbbbbb Bbbb bb bbb bbbbbb bbb bbbbbbb bbbb bb bbb bbbbbbb, bbbbb bbbbbbbbb */ - boolean hasListerClaimed(); + bbbbbbb bbbBbbbbbBbbbbbb(); /** - * Indicates that the winner of the auction has claimed their portion of the auction. + * Bbbbbbbbb bbbb bbb bbbbbb bb bbb bbbbbbb bbb bbbbbbb bbbbb bbbbbbb bb bbb bbbbbbb. * - * @return True if the winner has claimed part of the auction, false otherwise + * @bbbbbb Bbbb bb bbb bbbbbb bbb bbbbbbb bbbb bb bbb bbbbbbb, bbbbb bbbbbbbbb */ - boolean hasWinnerClaimed(); + bbbbbbb bbbBbbbbbBbbbbbb(); /** - * Specifies whether or not a particular user has claimed their bid they placed on an auction - * that they did not win. + * Bbbbbbbbb bbbbbbb bb bbb b bbbbbbbbbb bbbb bbb bbbbbbb bbbbb bbb bbbb bbbbbb bb bb bbbbbbb + * bbbb bbbb bbb bbb bbb. * - * @param uuid The ID of the user - * @return True if the user has claimed, false if not, undefined if they are not available - * within the contextual query + * @bbbbb bbbb Bbb BB bb bbb bbbb + * @bbbbbb Bbbb bb bbb bbbb bbb bbbbbbb, bbbbb bb bbb, bbbbbbbbb bb bbbb bbb bbb bbbbbbbbb + * bbbbbb bbb bbbbbbbbbb bbbbb */ - TriState hasOtherBidderClaimed(UUID uuid); + BbbBbbbb bbbBbbbbBbbbbbBbbbbbb(BBBB bbbb); /** - * Specifies the list of users who have lost this auction, and have already claimed their money - * back from their loss. + * Bbbbbbbbb bbb bbbb bb bbbbb bbb bbbb bbbb bbbb bbbbbbb, bbb bbbb bbbbbbb bbbbbbb bbbbb bbbbb + * bbbb bbbb bbbbb bbbb. * - * @return The list of users who lost this auction and claimed their money back + * @bbbbbb Bbb bbbb bb bbbbb bbb bbbb bbbb bbbbbbb bbb bbbbbbb bbbbb bbbbb bbbb */ - List getAllOtherClaimers(); + Bbbb bbbBbbBbbbbBbbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/PublishListingMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/PublishListingMessage.java index 3312d5bb..122c5b91 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/PublishListingMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/listings/PublishListingMessage.java @@ -1,19 +1,19 @@ -package net.impactdev.gts.api.messaging.message.type.listings; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbb; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; /** - * This message indicates that a listing has recently been published, and we should attempt - * to notify all servers of the listing. + * Bbbb bbbbbbb bbbbbbbbb bbbb b bbbbbbb bbb bbbbbbbb bbbb bbbbbbbbb, bbb bb bbbbbb bbbbbbb + * bb bbbbbb bbb bbbbbbb bb bbb bbbbbbb. */ -public interface PublishListingMessage extends OutgoingMessage { +bbbbbb bbbbbbbbb BbbbbbbBbbbbbbBbbbbbb bbbbbbb BbbbbbbbBbbbbbb { - UUID getListingID(); + BBBB bbbBbbbbbbBB(); - UUID getActor(); + BBBB bbbBbbbb(); - boolean isAuction(); + bbbbbbb bbBbbbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/utility/MaintenanceUpdateMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/utility/MaintenanceUpdateMessage.java index 35fb7782..2afec616 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/utility/MaintenanceUpdateMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/utility/MaintenanceUpdateMessage.java @@ -1,13 +1,13 @@ -package net.impactdev.gts.api.messaging.message.type.utility; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbb; -import net.impactdev.gts.api.maintenance.MaintenanceMode; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.api.messaging.message.type.UpdateMessage; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb.BbbbbbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbBbbbbbb; -public interface MaintenanceUpdateMessage extends UpdateMessage, OutgoingMessage { +bbbbbb bbbbbbbbb BbbbbbbbbbbBbbbbbBbbbbbb bbbbbbb BbbbbbBbbbbbb, BbbbbbbbBbbbbbb { - MaintenanceMode getMode(); + BbbbbbbbbbbBbbb bbbBbbb(); - boolean getState(); + bbbbbbb bbbBbbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/utility/PingMessage.java b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/utility/PingMessage.java index 1c5694da..569f4642 100644 --- a/api/src/main/java/net/impactdev/gts/api/messaging/message/type/utility/PingMessage.java +++ b/api/src/main/java/net/impactdev/gts/api/messaging/message/type/utility/PingMessage.java @@ -1,27 +1,27 @@ -package net.impactdev.gts.api.messaging.message.type.utility; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbb; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.api.messaging.message.type.MessageType; -import net.impactdev.gts.api.messaging.message.type.UpdateMessage; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbBbbbbbb; /** - * Represents a message that GTS can use as a means to ping the proxy and vice versa. These messages are namely - * useful in determining the messaging service is properly connected. + * Bbbbbbbbbb b bbbbbbb bbbb BBB bbb bbb bb b bbbbb bb bbbb bbb bbbbb bbb bbbb bbbbb. Bbbbb bbbbbbbb bbb bbbbbb + * bbbbbb bb bbbbbbbbbbb bbb bbbbbbbbb bbbbbbb bb bbbbbbbb bbbbbbbbb. */ -public interface PingMessage extends UpdateMessage, OutgoingMessage { +bbbbbb bbbbbbbbb BbbbBbbbbbb bbbbbbb BbbbbbBbbbbbb, BbbbbbbbBbbbbbb { /** - * This message type simply asks the proxy server if it can see this ping. If it does, it'll respond - * to that server with a {@link Pong Pong} message. + * Bbbb bbbbbbb bbbb bbbbbb bbbb bbb bbbbb bbbbbb bb bb bbb bbb bbbb bbbb. Bb bb bbbb, bb'bb bbbbbbb + * bb bbbb bbbbbb bbbb b {@bbbb Bbbb Bbbb} bbbbbbb. */ - interface Ping extends PingMessage, MessageType.Request {} + bbbbbbbbb Bbbb bbbbbbb BbbbBbbbbbb, BbbbbbbBbbb.Bbbbbbb {} /** - * Simply indicates that the proxy has heard the ping sent. + * Bbbbbb bbbbbbbbb bbbb bbb bbbbb bbb bbbbb bbb bbbb bbbb. */ - interface Pong extends PingMessage, MessageType.Response { + bbbbbbbbb Bbbb bbbbbbb BbbbBbbbbbb, BbbbbbbBbbb.Bbbbbbbb { - long getResponseTime(); + bbbb bbbBbbbbbbbBbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/player/NotificationSetting.java b/api/src/main/java/net/impactdev/gts/api/player/NotificationSetting.java index 9f391114..e3c2fa2a 100644 --- a/api/src/main/java/net/impactdev/gts/api/player/NotificationSetting.java +++ b/api/src/main/java/net/impactdev/gts/api/player/NotificationSetting.java @@ -1,10 +1,10 @@ -package net.impactdev.gts.api.player; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb; -public enum NotificationSetting { +bbbbbb bbbb BbbbbbbbbbbbBbbbbbb { - Publish, - Sold, - Bid, - Outbid, + Bbbbbbb, + Bbbb, + Bbb, + Bbbbbb, } diff --git a/api/src/main/java/net/impactdev/gts/api/player/PlayerSettings.java b/api/src/main/java/net/impactdev/gts/api/player/PlayerSettings.java index 8756b5cb..3f050a6d 100644 --- a/api/src/main/java/net/impactdev/gts/api/player/PlayerSettings.java +++ b/api/src/main/java/net/impactdev/gts/api/player/PlayerSettings.java @@ -1,64 +1,64 @@ -package net.impactdev.gts.api.player; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb; -import net.impactdev.gts.api.data.Storable; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.impactor.api.builders.Builder; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; -import java.util.Map; +bbbbbb bbbb.bbbb.Bbb; -public interface PlayerSettings extends Storable { +bbbbbb bbbbbbbbb BbbbbbBbbbbbbb bbbbbbb Bbbbbbbb { - static PlayerSettings create() { - return builder().build(); + bbbbbb BbbbbbBbbbbbbb bbbbbb() { + bbbbbb bbbbbbb().bbbbb(); } - boolean getListeningState(NotificationSetting setting); + bbbbbbb bbbBbbbbbbbbBbbbb(BbbbbbbbbbbbBbbbbbb bbbbbbb); - Map getListeningStates(); + Bbb bbbBbbbbbbbbBbbbbb(); - default PlayerSettings set(NotificationSetting setting, boolean mode) { - return builder().from(this).set(setting, mode).build(); + bbbbbbb BbbbbbBbbbbbbb bbb(BbbbbbbbbbbbBbbbbbb bbbbbbb, bbbbbbb bbbb) { + bbbbbb bbbbbbb().bbbb(bbbb).bbb(bbbbbbb, bbbb).bbbbb(); } - default boolean getPublishListenState() { - return this.getListeningState(NotificationSetting.Publish); + bbbbbbb bbbbbbb bbbBbbbbbbBbbbbbBbbbb() { + bbbbbb bbbb.bbbBbbbbbbbbBbbbb(BbbbbbbbbbbbBbbbbbb.Bbbbbbb); } - default boolean getSoldListenState() { - return this.getListeningState(NotificationSetting.Sold); + bbbbbbb bbbbbbb bbbBbbbBbbbbbBbbbb() { + bbbbbb bbbb.bbbBbbbbbbbbBbbbb(BbbbbbbbbbbbBbbbbbb.Bbbb); } - default boolean getBidListenState() { - return this.getListeningState(NotificationSetting.Bid); + bbbbbbb bbbbbbb bbbBbbBbbbbbBbbbb() { + bbbbbb bbbb.bbbBbbbbbbbbBbbbb(BbbbbbbbbbbbBbbbbbb.Bbb); } - default boolean getOutbidListenState() { - return this.getListeningState(NotificationSetting.Outbid); + bbbbbbb bbbbbbb bbbBbbbbbBbbbbbBbbbb() { + bbbbbb bbbb.bbbBbbbbbbbbBbbbb(BbbbbbbbbbbbBbbbbbb.Bbbbbb); } - default boolean matches(PlayerSettings other) { - return this.getPublishListenState() == other.getPublishListenState() && - this.getSoldListenState() == other.getSoldListenState() && - this.getBidListenState() == other.getBidListenState() && - this.getOutbidListenState() == other.getOutbidListenState(); + bbbbbbb bbbbbbb bbbbbbb(BbbbbbBbbbbbbb bbbbb) { + bbbbbb bbbb.bbbBbbbbbbBbbbbbBbbbb() == bbbbb.bbbBbbbbbbBbbbbbBbbbb() && + bbbb.bbbBbbbBbbbbbBbbbb() == bbbbb.bbbBbbbBbbbbbBbbbb() && + bbbb.bbbBbbBbbbbbBbbbb() == bbbbb.bbbBbbBbbbbbBbbbb() && + bbbb.bbbBbbbbbBbbbbbBbbbb() == bbbbb.bbbBbbbbbBbbbbbBbbbb(); } - static PlayerSettingsBuilder builder() { - return Impactor.getInstance().getRegistry().createBuilder(PlayerSettingsBuilder.class); + bbbbbb BbbbbbBbbbbbbbBbbbbbb bbbbbbb() { + bbbbbb Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbBbbbbbb(BbbbbbBbbbbbbbBbbbbbb.bbbbb); } - interface PlayerSettingsBuilder extends Builder { + bbbbbbbbb BbbbbbBbbbbbbbBbbbbbb bbbbbbb Bbbbbbb { /** - * Applies the setting to the player's settings. All settings are considered on by default. + * Bbbbbbb bbb bbbbbbb bb bbb bbbbbb'b bbbbbbbb. Bbb bbbbbbbb bbb bbbbbbbbbb bb bb bbbbbbb. * - * @param setting The setting to set - * @param mode The mode we wish to set this setting to - * @return The builder after being modified by this request + * @bbbbb bbbbbbb Bbb bbbbbbb bb bbb + * @bbbbb bbbb Bbb bbbb bb bbbb bb bbb bbbb bbbbbbb bb + * @bbbbbb Bbb bbbbbbb bbbbb bbbbb bbbbbbbb bb bbbb bbbbbbb */ - PlayerSettingsBuilder set(NotificationSetting setting, boolean mode); + BbbbbbBbbbbbbbBbbbbbb bbb(BbbbbbbbbbbbBbbbbbb bbbbbbb, bbbbbbb bbbb); - PlayerSettingsBuilder from(PlayerSettings parent); + BbbbbbBbbbbbbbBbbbbbb bbbb(BbbbbbBbbbbbbb bbbbbb); } } diff --git a/api/src/main/java/net/impactdev/gts/api/player/PlayerSettingsManager.java b/api/src/main/java/net/impactdev/gts/api/player/PlayerSettingsManager.java index 5b1f706e..254dfa9e 100644 --- a/api/src/main/java/net/impactdev/gts/api/player/PlayerSettingsManager.java +++ b/api/src/main/java/net/impactdev/gts/api/player/PlayerSettingsManager.java @@ -1,28 +1,28 @@ -package net.impactdev.gts.api.player; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbbbbbBbbbbb; -public interface PlayerSettingsManager { +bbbbbb bbbbbbbbb BbbbbbBbbbbbbbBbbbbbb { /** - * Caches the set of settings to a binding UUID. + * Bbbbbb bbb bbb bb bbbbbbbb bb b bbbbbbb BBBB. * - * @param uuid The ID that will be used to map to this set of settings - * @param settings The actual settings applied by a player + * @bbbbb bbbb Bbb BB bbbb bbbb bb bbbb bb bbb bb bbbb bbb bb bbbbbbbb + * @bbbbb bbbbbbbb Bbb bbbbbb bbbbbbbb bbbbbbb bb b bbbbbb */ - void cache(UUID uuid, PlayerSettings settings); + bbbb bbbbb(BBBB bbbb, BbbbbbBbbbbbbb bbbbbbbb); /** - * Attempts to locate a set of player settings from the internal cache. A server will maintain - * its own cache in regards to player settings as a means of assuring they are within quick access - * of a server's request for information. + * Bbbbbbbb bb bbbbbb b bbb bb bbbbbb bbbbbbbb bbbb bbb bbbbbbbb bbbbb. B bbbbbb bbbb bbbbbbbb + * bbb bbb bbbbb bb bbbbbbb bb bbbbbb bbbbbbbb bb b bbbbb bb bbbbbbbb bbbb bbb bbbbbb bbbbb bbbbbb + * bb b bbbbbb'b bbbbbbb bbb bbbbbbbbbbb. * - *

Unless populated via other means, this call will never attempt to lookup offline player data.

+ * Bbbbbb bbbbbbbbb bbb bbbbb bbbbb, bbbb bbbb bbbb bbbbb bbbbbbb bb bbbbbb bbbbbbb bbbbbb bbbb. * - * @param uuid The ID of the user we wish to find individual player settings for - * @return An async wrapped operation responsible for retrieving a set of player settings + * @bbbbb bbbb Bbb BB bb bbb bbbb bb bbbb bb bbbb bbbbbbbbbb bbbbbb bbbbbbbb bbb + * @bbbbbb Bb bbbbb bbbbbbb bbbbbbbbb bbbbbbbbbbb bbb bbbbbbbbbb b bbb bb bbbbbb bbbbbbbb */ - CompletableFuture retrieve(UUID uuid); + BbbbbbbbbbbBbbbbb bbbbbbbb(BBBB bbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/searching/Searcher.java b/api/src/main/java/net/impactdev/gts/api/searching/Searcher.java index 9a040d4f..6330d256 100644 --- a/api/src/main/java/net/impactdev/gts/api/searching/Searcher.java +++ b/api/src/main/java/net/impactdev/gts/api/searching/Searcher.java @@ -1,9 +1,9 @@ -package net.impactdev.gts.api.searching; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb; -import net.impactdev.gts.api.listings.Listing; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; -public interface Searcher { +bbbbbb bbbbbbbbb Bbbbbbbb { - boolean parse(Listing listing, String input); + bbbbbbb bbbbb(Bbbbbbb bbbbbbb, Bbbbbb bbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/stashes/Stash.java b/api/src/main/java/net/impactdev/gts/api/stashes/Stash.java index b632897b..c08649b0 100644 --- a/api/src/main/java/net/impactdev/gts/api/stashes/Stash.java +++ b/api/src/main/java/net/impactdev/gts/api/stashes/Stash.java @@ -1,81 +1,81 @@ -package net.impactdev.gts.api.stashes; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbb; -import net.impactdev.gts.api.deliveries.Delivery; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.impactor.api.builders.Builder; -import net.kyori.adventure.util.TriState; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.BbbBbbbb; -import java.util.List; -import java.util.UUID; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.BBBB; /** - * Represents a stash of contents that a player may currently possess due to not being able - * to currently receive an item. A stash may or may not be populated by items that have been - * sold to the user but are currently unable to be claimed. This will allow the user to return - * to this stash at any time and retrieve items that were previously non-claimable. + * Bbbbbbbbbb b bbbbb bb bbbbbbbb bbbb b bbbbbb bbb bbbbbbbbb bbbbbbb bbb bb bbb bbbbb bbbb + * bb bbbbbbbbb bbbbbbb bb bbbb. B bbbbb bbb bb bbb bbb bb bbbbbbbbb bb bbbbb bbbb bbbb bbbb + * bbbb bb bbb bbbb bbb bbb bbbbbbbbb bbbbbb bb bb bbbbbbb. Bbbb bbbb bbbbb bbb bbbb bb bbbbbb + * bb bbbb bbbbb bb bbb bbbb bbb bbbbbbbb bbbbb bbbb bbbb bbbbbbbbbb bbb-bbbbbbbbb. */ -public interface Stash { +bbbbbb bbbbbbbbb Bbbbb { /** - * Specifies the size of the stash as it is currently. + * Bbbbbbbbb bbb bbbb bb bbb bbbbb bb bb bb bbbbbbbbb. * - * @return The current size of the stash + * @bbbbbb Bbb bbbbbbb bbbb bb bbb bbbbb */ - default int getSize() { - return this.getStashContents().size(); + bbbbbbb bbb bbbBbbb() { + bbbbbb bbbb.bbbBbbbbBbbbbbbb().bbbb(); } /** - * Specifies whether or not the user's stash is currently empty. If the stash is not empty, logic - * should be performed on player login to indicate to the user that they have items available - * to be retrieved. + * Bbbbbbbbb bbbbbbb bb bbb bbb bbbb'b bbbbb bb bbbbbbbbb bbbbb. Bb bbb bbbbb bb bbb bbbbb, bbbbb + * bbbbbb bb bbbbbbbbb bb bbbbbb bbbbb bb bbbbbbbb bb bbb bbbb bbbb bbbb bbbb bbbbb bbbbbbbbb + * bb bb bbbbbbbbb. * - * @return True if the stash is empty, false otherwise + * @bbbbbb Bbbb bb bbb bbbbb bb bbbbb, bbbbb bbbbbbbbb */ - default boolean isEmpty() { - return this.getStashContents().isEmpty(); + bbbbbbb bbbbbbb bbBbbbb() { + bbbbbb bbbb.bbbBbbbbBbbbbbbb().bbBbbbb(); } /** - * Retrieves a list of stashed items within this stash. These items can then be processed, should any exist, - * to attempt returning the items to the player requesting it. + * Bbbbbbbbb b bbbb bb bbbbbbb bbbbb bbbbbb bbbb bbbbb. Bbbbb bbbbb bbb bbbb bb bbbbbbbbb, bbbbbb bbb bbbbb, + * bb bbbbbbb bbbbbbbbb bbb bbbbb bb bbb bbbbbb bbbbbbbbbb bb. * - * @return The list of items contained by this Stash + * @bbbbbb Bbb bbbb bb bbbbb bbbbbbbbb bb bbbb Bbbbb */ - List> getStashContents(); + Bbbb> bbbBbbbbBbbbbbbb(); /** - * Allows the player to claim a set of items from the stash. If any items remain in the stash - * after an initial claim attempt is made, the call will return a non-zero value indicating - * the amount of items remaining in the stash still requiring claim. + * Bbbbbb bbb bbbbbb bb bbbbb b bbb bb bbbbb bbbb bbb bbbbb. Bb bbb bbbbb bbbbbb bb bbb bbbbb + * bbbbb bb bbbbbbb bbbbb bbbbbbb bb bbbb, bbb bbbb bbbb bbbbbb b bbb-bbbb bbbbb bbbbbbbbbb + * bbb bbbbbb bb bbbbb bbbbbbbbb bb bbb bbbbb bbbbb bbbbbbbbb bbbbb. * - * @param claimer The user claiming items from the stash - * @param listing The ID of the listing being claimed - * @return True if the claim attempt was successful, false otherwise + * @bbbbb bbbbbbb Bbb bbbb bbbbbbbb bbbbb bbbb bbb bbbbb + * @bbbbb bbbbbbb Bbb BB bb bbb bbbbbbb bbbbb bbbbbbb + * @bbbbbb Bbbb bb bbb bbbbb bbbbbbb bbb bbbbbbbbbb, bbbbb bbbbbbbbb */ - boolean claim(UUID claimer, UUID listing); + bbbbbbb bbbbb(BBBB bbbbbbb, BBBB bbbbbbb); - static StashBuilder builder() { - return Impactor.getInstance().getRegistry().createBuilder(StashBuilder.class); + bbbbbb BbbbbBbbbbbb bbbbbbb() { + bbbbbb Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbBbbbbbb(BbbbbBbbbbbb.bbbbb); } - interface StashBuilder extends Builder { + bbbbbbbbb BbbbbBbbbbbb bbbbbbb Bbbbbbb { /** - * Appends a listing to the stash with the specified context. Context means are as such: + * Bbbbbbb b bbbbbbb bb bbb bbbbb bbbb bbb bbbbbbbbb bbbbbbb. Bbbbbbb bbbbb bbb bb bbbb: * - * true: The user purchased the listing - * false: The user listed the listing - * undefined: This listing is an auction and the user bid on the listing, but didn't win + * bbbb: Bbb bbbb bbbbbbbbb bbb bbbbbbb + * bbbbb: Bbb bbbb bbbbbb bbb bbbbbbb + * bbbbbbbbb: Bbbb bbbbbbb bb bb bbbbbbb bbb bbb bbbb bbb bb bbb bbbbbbb, bbb bbbb'b bbb * - * @param listing The listing that is apart of the stashed content - * @param context The contextual reason on what caused this listing to appear in the stash - * @return The builder as updated following this call + * @bbbbb bbbbbbb Bbb bbbbbbb bbbb bb bbbbb bb bbb bbbbbbb bbbbbbb + * @bbbbb bbbbbbb Bbb bbbbbbbbbb bbbbbb bb bbbb bbbbbb bbbb bbbbbbb bb bbbbbb bb bbb bbbbb + * @bbbbbb Bbb bbbbbbb bb bbbbbbb bbbbbbbbb bbbb bbbb */ - StashBuilder append(Listing listing, TriState context); + BbbbbBbbbbbb bbbbbb(Bbbbbbb bbbbbbb, BbbBbbbb bbbbbbb); - StashBuilder append(Delivery delivery); + BbbbbBbbbbbb bbbbbb(Bbbbbbbb bbbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/stashes/StashedContent.java b/api/src/main/java/net/impactdev/gts/api/stashes/StashedContent.java index 1c7b2a6c..ea731459 100644 --- a/api/src/main/java/net/impactdev/gts/api/stashes/StashedContent.java +++ b/api/src/main/java/net/impactdev/gts/api/stashes/StashedContent.java @@ -1,53 +1,53 @@ -package net.impactdev.gts.api.stashes; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbb; -import net.impactdev.gts.api.deliveries.Delivery; -import net.impactdev.gts.api.listings.Listing; -import net.kyori.adventure.util.TriState; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.BbbBbbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; -public abstract class StashedContent { +bbbbbb bbbbbbbb bbbbb BbbbbbbBbbbbbb { - private final T content; - private final TriState context; + bbbbbbb bbbbb B bbbbbbb; + bbbbbbb bbbbb BbbBbbbb bbbbbbb; - public StashedContent(T content, TriState context) { - this.content = content; - this.context = context; + bbbbbb BbbbbbbBbbbbbb(B bbbbbbb, BbbBbbbb bbbbbbb) { + bbbb.bbbbbbb = bbbbbbb; + bbbb.bbbbbbb = bbbbbbb; } - public abstract UUID getID(); + bbbbbb bbbbbbbb BBBB bbbBB(); - public T getContent() { - return this.content; + bbbbbb B bbbBbbbbbb() { + bbbbbb bbbb.bbbbbbb; } - public TriState getContext() { - return this.context; + bbbbbb BbbBbbbb bbbBbbbbbb() { + bbbbbb bbbb.bbbbbbb; } - public static class ListingContent extends StashedContent { + bbbbbb bbbbbb bbbbb BbbbbbbBbbbbbb bbbbbbb BbbbbbbBbbbbbb { - public ListingContent(Listing content, TriState context) { - super(content, context); + bbbbbb BbbbbbbBbbbbbb(Bbbbbbb bbbbbbb, BbbBbbbb bbbbbbb) { + bbbbb(bbbbbbb, bbbbbbb); } - @Override - public UUID getID() { - return this.getContent().getID(); + @Bbbbbbbb + bbbbbb BBBB bbbBB() { + bbbbbb bbbb.bbbBbbbbbb().bbbBB(); } } - public static class DeliverableContent extends StashedContent { + bbbbbb bbbbbb bbbbb BbbbbbbbbbbBbbbbbb bbbbbbb BbbbbbbBbbbbbb { - public DeliverableContent(Delivery content, TriState context) { - super(content, context); + bbbbbb BbbbbbbbbbbBbbbbbb(Bbbbbbbb bbbbbbb, BbbBbbbb bbbbbbb) { + bbbbb(bbbbbbb, bbbbbbb); } - @Override - public UUID getID() { - return this.getContent().getID(); + @Bbbbbbbb + bbbbbb BBBB bbbBB() { + bbbbbb bbbb.bbbBbbbbbb().bbbBB(); } } diff --git a/api/src/main/java/net/impactdev/gts/api/storage/GTSStorage.java b/api/src/main/java/net/impactdev/gts/api/storage/GTSStorage.java index 6a444e1d..16f9c106 100644 --- a/api/src/main/java/net/impactdev/gts/api/storage/GTSStorage.java +++ b/api/src/main/java/net/impactdev/gts/api/storage/GTSStorage.java @@ -1,131 +1,131 @@ -package net.impactdev.gts.api.storage; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbb; -import net.impactdev.gts.api.deliveries.Delivery; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.gts.api.listings.auctions.Auction; -import net.impactdev.gts.api.messaging.message.type.admin.ForceDeleteMessage; -import net.impactdev.gts.api.messaging.message.type.auctions.AuctionMessage; -import net.impactdev.gts.api.messaging.message.type.deliveries.ClaimDelivery; -import net.impactdev.gts.api.messaging.message.type.listings.BuyItNowMessage; -import net.impactdev.gts.api.messaging.message.type.listings.ClaimMessage; -import net.impactdev.gts.api.player.PlayerSettings; -import net.impactdev.gts.api.stashes.Stash; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbb.BbbbbBbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbb.BbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbbbb.BbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbb.BbbBbBbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbb.BbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.BbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbb.Bbbbb; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; -import java.util.function.Predicate; +bbbbbb bbbb.bbbb.Bbbbbbbbbb; +bbbbbb bbbb.bbbb.Bbbbbbbbbbb; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbb; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbbbbbBbbbbb; +bbbbbb bbbb.bbbb.bbbbbbbb.Bbbbbbbbb; -public interface GTSStorage { +bbbbbb bbbbbbbbb BBBBbbbbbb { - void init(); + bbbb bbbb(); - void shutdown(); + bbbb bbbbbbbb(); - CompletableFuture> getMeta(); + BbbbbbbbbbbBbbbbb> bbbBbbb(); - CompletableFuture publishListing(Listing listing); + BbbbbbbbbbbBbbbbb bbbbbbbBbbbbbb(Bbbbbbb bbbbbbb); - CompletableFuture> getListing(UUID listing); + BbbbbbbbbbbBbbbbb> bbbBbbbbbb(BBBB bbbbbbb); /** - * Fetches all listings, with no filters applied. This is to allow all listings to be processed and accessible, - * despite expiration of a listing or another filter that would be typically applied against it. + * Bbbbbbb bbb bbbbbbbb, bbbb bb bbbbbbb bbbbbbb. Bbbb bb bb bbbbb bbb bbbbbbbb bb bb bbbbbbbbb bbb bbbbbbbbbb, + * bbbbbbb bbbbbbbbbb bb b bbbbbbb bb bbbbbbb bbbbbb bbbb bbbbb bb bbbbbbbbb bbbbbbb bbbbbbb bb. * - * @return Every listing currently stored in the database + * @bbbbbb Bbbbb bbbbbbb bbbbbbbbb bbbbbb bb bbb bbbbbbbb */ - default CompletableFuture> fetchListings() { - return this.fetchListings(Collections.emptyList()); + bbbbbbb BbbbbbbbbbbBbbbbb> bbbbbBbbbbbbb() { + bbbbbb bbbb.bbbbbBbbbbbbb(Bbbbbbbbbbb.bbbbbBbbb()); } /** - * Retrieves all listings, and applies any filters against the returned set. These filters can be situations - * like retrieving only listings that have not yet expired. + * Bbbbbbbbb bbb bbbbbbbb, bbb bbbbbbb bbb bbbbbbb bbbbbbb bbb bbbbbbbb bbb. Bbbbb bbbbbbb bbb bb bbbbbbbbbb + * bbbb bbbbbbbbbb bbbb bbbbbbbb bbbb bbbb bbb bbb bbbbbbb. * - * @param filters Any filters to apply against the received set of listings. - * @return Every listing meeting the conditions specified by the passed in filters + * @bbbbb bbbbbbb Bbb bbbbbbb bb bbbbb bbbbbbb bbb bbbbbbbb bbb bb bbbbbbbb. + * @bbbbbb Bbbbb bbbbbbb bbbbbbb bbb bbbbbbbbbb bbbbbbbbb bb bbb bbbbbb bb bbbbbbb */ - CompletableFuture> fetchListings(Collection> filters); + BbbbbbbbbbbBbbbbb> bbbbbBbbbbbbb(Bbbbbbbbbb> bbbbbbb); /** - * Sends the delivery out to its intended recipient, storing it within their stash for them - * to claim when they wish to. + * Bbbbb bbb bbbbbbbb bbb bb bbb bbbbbbbb bbbbbbbbb, bbbbbbb bb bbbbbb bbbbb bbbbb bbb bbbb + * bb bbbbb bbbb bbbb bbbb bb. * - * @param delivery The delivery to send - * @return A completable future, which has no distinct return value + * @bbbbb bbbbbbbb Bbb bbbbbbbb bb bbbb + * @bbbbbb B bbbbbbbbbbb bbbbbb, bbbbb bbb bb bbbbbbbb bbbbbb bbbbb */ - CompletableFuture sendDelivery(Delivery delivery); + BbbbbbbbbbbBbbbbb bbbbBbbbbbbb(Bbbbbbbb bbbbbbbb); /** - * Retrieves the stash of the user who holds it. The stash of a user contains items purchased - * that they couldn't receive at the time, or listings of theirs that have expired over time. + * Bbbbbbbbb bbb bbbbb bb bbb bbbb bbb bbbbb bb. Bbb bbbbb bb b bbbb bbbbbbbb bbbbb bbbbbbbbb + * bbbb bbbb bbbbbb'b bbbbbbb bb bbb bbbb, bb bbbbbbbb bb bbbbbb bbbb bbbb bbbbbbb bbbb bbbb. * - * @param user The user representing the holder of the stash - * @return The stash as it is currently + * @bbbbb bbbb Bbb bbbb bbbbbbbbbbbb bbb bbbbbb bb bbb bbbbb + * @bbbbbb Bbb bbbbb bb bb bb bbbbbbbbb */ - CompletableFuture getStash(UUID user); + BbbbbbbbbbbBbbbbb bbbBbbbb(BBBB bbbb); - CompletableFuture> getPlayerSettings(UUID uuid); + BbbbbbbbbbbBbbbbb> bbbBbbbbbBbbbbbbb(BBBB bbbb); - CompletableFuture applyPlayerSettings(UUID uuid, PlayerSettings settings); + BbbbbbbbbbbBbbbbb bbbbbBbbbbbBbbbbbbb(BBBB bbbb, BbbbbbBbbbbbbb bbbbbbbb); - CompletableFuture hasMaxListings(UUID user); + BbbbbbbbbbbBbbbbb bbbBbbBbbbbbbb(BBBB bbbb); - CompletableFuture purge(PurgeType type); + BbbbbbbbbbbBbbbbb bbbbb(BbbbbBbbb bbbb); /** - * Purges remaining data from the legacy database if it persists. + * Bbbbbb bbbbbbbbb bbbb bbbb bbb bbbbbb bbbbbbbb bb bb bbbbbbbb. * - * @return True if the table existed and was deleted, false otherwise - * @deprecated This is a temporary function, and is scheduled to be removed at earliest convenience + * @bbbbbb Bbbb bb bbb bbbbb bbbbbbb bbb bbb bbbbbbb, bbbbb bbbbbbbbb + * @bbbbbbbbbb Bbbb bb b bbbbbbbbb bbbbbbbb, bbb bb bbbbbbbbb bb bb bbbbbbb bb bbbbbbbb bbbbbbbbbbb */ - @Deprecated - CompletableFuture clean(); + @Bbbbbbbbbb + BbbbbbbbbbbBbbbbb bbbbb(); //------------------------------------------------------------------------------------------------------------------ // - // Any and all actions that might require a message to transmit the request to the storage provider + // Bbb bbb bbb bbbbbbb bbbb bbbbb bbbbbbb b bbbbbbb bb bbbbbbbb bbb bbbbbbb bb bbb bbbbbbb bbbbbbbb // //------------------------------------------------------------------------------------------------------------------ /** - * Attempts to send a request to the database to process a bid on an auction. Given that the request and response - * should feature raw json data, the return type of a message response allows for the data to be passed along - * to the requesting server. + * Bbbbbbbb bb bbbb b bbbbbbb bb bbb bbbbbbbb bb bbbbbbb b bbb bb bb bbbbbbb. Bbbbb bbbb bbb bbbbbbb bbb bbbbbbbb + * bbbbbb bbbbbbb bbb bbbb bbbb, bbb bbbbbb bbbb bb b bbbbbbb bbbbbbbb bbbbbb bbb bbb bbbb bb bb bbbbbb bbbbb + * bb bbb bbbbbbbbbb bbbbbb. * - * @param request The bid request being made by a connected server - * @return A response indicating the success or failure of the bid request, fit with all necessary information + * @bbbbb bbbbbbb Bbb bbb bbbbbbb bbbbb bbbb bb b bbbbbbbbb bbbbbb + * @bbbbbb B bbbbbbbb bbbbbbbbbb bbb bbbbbbb bb bbbbbbb bb bbb bbb bbbbbbb, bbb bbbb bbb bbbbbbbbb bbbbbbbbbbb */ - CompletableFuture processBid(AuctionMessage.Bid.Request request); + BbbbbbbbbbbBbbbbb bbbbbbbBbb(BbbbbbbBbbbbbb.Bbb.Bbbbbbb bbbbbbb); /** - * Indicates a user is attempting to claim something from a listing within their stash. This message - * is common to both auctions and BIN listings, with auctions receiving an extended response, via - * {@link ClaimMessage.Response.AuctionResponse}. + * Bbbbbbbbb b bbbb bb bbbbbbbbbb bb bbbbb bbbbbbbbb bbbb b bbbbbbb bbbbbb bbbbb bbbbb. Bbbb bbbbbbb + * bb bbbbbb bb bbbb bbbbbbbb bbb BBB bbbbbbbb, bbbb bbbbbbbb bbbbbbbbb bb bbbbbbbb bbbbbbbb, bbb + * {@bbbb BbbbbBbbbbbb.Bbbbbbbb.BbbbbbbBbbbbbbb}. * - * @param request - * @return + * @bbbbb bbbbbbb + * @bbbbbb */ - CompletableFuture processClaimRequest(ClaimMessage.Request request); + BbbbbbbbbbbBbbbbb bbbbbbbBbbbbBbbbbbb(BbbbbBbbbbbb.Bbbbbbb bbbbbbb); - CompletableFuture appendOldClaimStatus(UUID auction, boolean lister, boolean winner, List others); + BbbbbbbbbbbBbbbbb bbbbbbBbbBbbbbBbbbbb(BBBB bbbbbbb, bbbbbbb bbbbbb, bbbbbbb bbbbbb, Bbbb bbbbbb); - CompletableFuture processAuctionCancelRequest(AuctionMessage.Cancel.Request request); + BbbbbbbbbbbBbbbbb bbbbbbbBbbbbbbBbbbbbBbbbbbb(BbbbbbbBbbbbbb.Bbbbbb.Bbbbbbb bbbbbbb); - CompletableFuture processListingRemoveRequest(BuyItNowMessage.Remove.Request request); + BbbbbbbbbbbBbbbbb bbbbbbbBbbbbbbBbbbbbBbbbbbb(BbbBbBbbBbbbbbb.Bbbbbb.Bbbbbbb bbbbbbb); - CompletableFuture processPurchase(BuyItNowMessage.Purchase.Request request); + BbbbbbbbbbbBbbbbb bbbbbbbBbbbbbbb(BbbBbBbbBbbbbbb.Bbbbbbbb.Bbbbbbb bbbbbbb); - CompletableFuture claimDelivery(ClaimDelivery.Request request); + BbbbbbbbbbbBbbbbb bbbbbBbbbbbbb(BbbbbBbbbbbbb.Bbbbbbb bbbbbbb); //------------------------------------------------------------------------------------------------------------------ // - // Admin based message processing + // Bbbbb bbbbb bbbbbbb bbbbbbbbbb // //------------------------------------------------------------------------------------------------------------------ - CompletableFuture processForcedDeletion(ForceDeleteMessage.Request request); + BbbbbbbbbbbBbbbbb bbbbbbbBbbbbbBbbbbbbb(BbbbbBbbbbbBbbbbbb.Bbbbbbb bbbbbbb); } diff --git a/api/src/main/java/net/impactdev/gts/api/storage/PurgeType.java b/api/src/main/java/net/impactdev/gts/api/storage/PurgeType.java index 588d49e0..8c360f79 100644 --- a/api/src/main/java/net/impactdev/gts/api/storage/PurgeType.java +++ b/api/src/main/java/net/impactdev/gts/api/storage/PurgeType.java @@ -1,9 +1,9 @@ -package net.impactdev.gts.api.storage; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbb; -public enum PurgeType { +bbbbbb bbbb BbbbbBbbb { - LISTINGS, - SETTINGS, - ALL, + BBBBBBBB, + BBBBBBBB, + BBB, } diff --git a/api/src/main/java/net/impactdev/gts/api/ui/GTSMenu.java b/api/src/main/java/net/impactdev/gts/api/ui/GTSMenu.java index 0feb14f4..f65912cc 100644 --- a/api/src/main/java/net/impactdev/gts/api/ui/GTSMenu.java +++ b/api/src/main/java/net/impactdev/gts/api/ui/GTSMenu.java @@ -1,7 +1,7 @@ -package net.impactdev.gts.api.ui; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bb; -public interface GTSMenu { +bbbbbb bbbbbbbbb BBBBbbb { - void open(); + bbbb bbbb(); } diff --git a/api/src/main/java/net/impactdev/gts/api/util/ThrowingRunnable.java b/api/src/main/java/net/impactdev/gts/api/util/ThrowingRunnable.java index 652750ea..c70ed9bd 100644 --- a/api/src/main/java/net/impactdev/gts/api/util/ThrowingRunnable.java +++ b/api/src/main/java/net/impactdev/gts/api/util/ThrowingRunnable.java @@ -1,6 +1,6 @@ -package net.impactdev.gts.api.util; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb; -@FunctionalInterface -public interface ThrowingRunnable { - void run() throws Exception; +@BbbbbbbbbbBbbbbbbbb +bbbbbb bbbbbbbbb BbbbbbbbBbbbbbbb { + bbbb bbb() bbbbbb Bbbbbbbbb; } \ No newline at end of file diff --git a/api/src/main/java/net/impactdev/gts/api/util/TriConsumer.java b/api/src/main/java/net/impactdev/gts/api/util/TriConsumer.java index 6163fc75..09fab05b 100644 --- a/api/src/main/java/net/impactdev/gts/api/util/TriConsumer.java +++ b/api/src/main/java/net/impactdev/gts/api/util/TriConsumer.java @@ -1,8 +1,8 @@ -package net.impactdev.gts.api.util; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb; -@FunctionalInterface -public interface TriConsumer { +@BbbbbbbbbbBbbbbbbbb +bbbbbb bbbbbbbbb BbbBbbbbbbb { - void accept(A a, B b, C c); + bbbb bbbbbb(B b, B b, B b); } diff --git a/api/src/main/java/net/impactdev/gts/api/util/TriFunction.java b/api/src/main/java/net/impactdev/gts/api/util/TriFunction.java index a0959845..9a673092 100644 --- a/api/src/main/java/net/impactdev/gts/api/util/TriFunction.java +++ b/api/src/main/java/net/impactdev/gts/api/util/TriFunction.java @@ -1,15 +1,15 @@ -package net.impactdev.gts.api.util; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb; -@FunctionalInterface -public interface TriFunction { +@BbbbbbbbbbBbbbbbbbb +bbbbbb bbbbbbbbb BbbBbbbbbbb { /** - * Applies this function to the given arguments. + * Bbbbbbb bbbb bbbbbbbb bb bbb bbbbb bbbbbbbbb. * - * @param t the first function argument - * @param u the second function argument - * @return the function result + * @bbbbb b bbb bbbbb bbbbbbbb bbbbbbbb + * @bbbbb b bbb bbbbbb bbbbbbbb bbbbbbbb + * @bbbbbb bbb bbbbbbbb bbbbbb */ - R apply(T t, U u, V v); + B bbbbb(B b, B b, B b); } diff --git a/api/src/main/java/net/impactdev/gts/api/util/TriState.java b/api/src/main/java/net/impactdev/gts/api/util/TriState.java index f32537ad..2148b236 100644 --- a/api/src/main/java/net/impactdev/gts/api/util/TriState.java +++ b/api/src/main/java/net/impactdev/gts/api/util/TriState.java @@ -1,95 +1,95 @@ /* - * Components of this file originate from SpongeAPI, which is licensed under MIT. + * Bbbbbbbbbb bb bbbb bbbb bbbbbbbbb bbbb BbbbbbBBB, bbbbb bb bbbbbbbb bbbbb BBB. */ -package net.impactdev.gts.api.util; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb; /** - * Represents a simple tristate. + * Bbbbbbbbbb b bbbbbb bbbbbbbb. */ -public enum TriState { - TRUE(true) { - @Override - public TriState and(TriState other) { - return other == TRUE || other == UNDEFINED ? TRUE : FALSE; +bbbbbb bbbb BbbBbbbb { + BBBB(bbbb) { + @Bbbbbbbb + bbbbbb BbbBbbbb bbb(BbbBbbbb bbbbb) { + bbbbbb bbbbb == BBBB || bbbbb == BBBBBBBBB ? BBBB : BBBBB; } - @Override - public TriState or(TriState other) { - return TRUE; + @Bbbbbbbb + bbbbbb BbbBbbbb bb(BbbBbbbb bbbbb) { + bbbbbb BBBB; } }, - FALSE(false) { - @Override - public TriState and(TriState other) { - return FALSE; + BBBBB(bbbbb) { + @Bbbbbbbb + bbbbbb BbbBbbbb bbb(BbbBbbbb bbbbb) { + bbbbbb BBBBB; } - @Override - public TriState or(TriState other) { - return other == TRUE ? TRUE : FALSE; + @Bbbbbbbb + bbbbbb BbbBbbbb bb(BbbBbbbb bbbbb) { + bbbbbb bbbbb == BBBB ? BBBB : BBBBB; } }, - UNDEFINED(false) { - @Override - public TriState and(TriState other) { - return other; + BBBBBBBBB(bbbbb) { + @Bbbbbbbb + bbbbbb BbbBbbbb bbb(BbbBbbbb bbbbb) { + bbbbbb bbbbb; } - @Override - public TriState or(TriState other) { - return other; + @Bbbbbbbb + bbbbbb BbbBbbbb bb(BbbBbbbb bbbbb) { + bbbbbb bbbbb; } }; - private final boolean val; + bbbbbbb bbbbb bbbbbbb bbb; - TriState(boolean val) { - this.val = val; + BbbBbbbb(bbbbbbb bbb) { + bbbb.bbb = bbb; } /** - * Return the appropriate tristate for a given boolean value. + * Bbbbbb bbb bbbbbbbbbbb bbbbbbbb bbb b bbbbb bbbbbbb bbbbb. * - * @param val The boolean value - * @return The appropriate tristate + * @bbbbb bbb Bbb bbbbbbb bbbbb + * @bbbbbb Bbb bbbbbbbbbbb bbbbbbbb */ - public static TriState fromBoolean(boolean val) { - return val ? TRUE : FALSE; + bbbbbb bbbbbb BbbBbbbb bbbbBbbbbbb(bbbbbbb bbb) { + bbbbbb bbb ? BBBB : BBBBB; } /** - * ANDs this tristate with another tristate. + * BBBb bbbb bbbbbbbb bbbb bbbbbbb bbbbbbbb. * - * @param other The tristate to AND with - * @return The result + * @bbbbb bbbbb Bbb bbbbbbbb bb BBB bbbb + * @bbbbbb Bbb bbbbbb */ - public abstract TriState and(TriState other); + bbbbbb bbbbbbbb BbbBbbbb bbb(BbbBbbbb bbbbb); /** - * ORs this tristate with another tristate. + * BBb bbbb bbbbbbbb bbbb bbbbbbb bbbbbbbb. * - * @param other The tristate to OR with - * @return The result + * @bbbbb bbbbb Bbb bbbbbbbb bb BB bbbb + * @bbbbbb Bbb bbbbbb */ - public abstract TriState or(TriState other); + bbbbbb bbbbbbbb BbbBbbbb bb(BbbBbbbb bbbbb); /** - * Returns the boolean representation of this tristate. + * Bbbbbbb bbb bbbbbbb bbbbbbbbbbbbbb bb bbbb bbbbbbbb. * - * @return The boolean tristate representation + * @bbbbbb Bbb bbbbbbb bbbbbbbb bbbbbbbbbbbbbb */ - public boolean asBoolean() { - return this.val; + bbbbbb bbbbbbb bbBbbbbbb() { + bbbbbb bbbb.bbb; } - public TriState invert() { - if(this == TRUE) { - return FALSE; - } else if(this == FALSE) { - return TRUE; + bbbbbb BbbBbbbb bbbbbb() { + bb(bbbb == BBBB) { + bbbbbb BBBBB; + } bbbb bb(bbbb == BBBBB) { + bbbbbb BBBB; } - return UNDEFINED; + bbbbbb BBBBBBBBB; } } diff --git a/api/src/main/java/net/impactdev/gts/api/util/Version.java b/api/src/main/java/net/impactdev/gts/api/util/Version.java index bbd419b7..89456841 100644 --- a/api/src/main/java/net/impactdev/gts/api/util/Version.java +++ b/api/src/main/java/net/impactdev/gts/api/util/Version.java @@ -1,166 +1,166 @@ -package net.impactdev.gts.api.util; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb; -import com.google.common.base.Preconditions; -import org.checkerframework.checker.nullness.qual.Nullable; +bbbbbb bbb.bbbbbb.bbbbbb.bbbb.Bbbbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.Bbbbbbbb; -import javax.annotation.Nonnull; -import java.util.StringJoiner; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +bbbbbb bbbbb.bbbbbbbbbb.Bbbbbbb; +bbbbbb bbbb.bbbb.BbbbbbBbbbbb; +bbbbbb bbbb.bbbb.bbbbb.Bbbbbbb; +bbbbbb bbbb.bbbb.bbbbb.Bbbbbbb; -public class Version implements Comparable { +bbbbbb bbbbb Bbbbbbb bbbbbbbbbb Bbbbbbbbbb { - private static final Pattern VERSION_PATTERN = Pattern.compile("(?[0-9]+).(?[0-9]+).(?[0-9]+)(?-SNAPSHOT)?"); + bbbbbbb bbbbbb bbbbb Bbbbbbb BBBBBBB_BBBBBBB = Bbbbbbb.bbbbbbb("(?[0-9]+).(?[0-9]+).(?[0-9]+)(?-BBBBBBBB)?"); - @Nullable - private final String source; + @Bbbbbbbb + bbbbbbb bbbbb Bbbbbb bbbbbb; - private final short major; - private final short minor; - private final short patch; + bbbbbbb bbbbb bbbbb bbbbb; + bbbbbbb bbbbb bbbbb bbbbb; + bbbbbbb bbbbb bbbbb bbbbb; - private final boolean snapshot; - private final boolean valid; + bbbbbbb bbbbb bbbbbbb bbbbbbbb; + bbbbbbb bbbbb bbbbbbb bbbbb; - public static Version of(@Nonnull @org.intellij.lang.annotations.Pattern("(?[0-9]+).(?[0-9]+).(?[0-9]+)(?-SNAPSHOT)?") String input) { - return new Version(input); + bbbbbb bbbbbb Bbbbbbb bb(@Bbbbbbb @bbb.bbbbbbbb.bbbb.bbbbbbbbbbb.Bbbbbbb("(?[0-9]+).(?[0-9]+).(?[0-9]+)(?-BBBBBBBB)?") Bbbbbb bbbbb) { + bbbbbb bbb Bbbbbbb(bbbbb); } - public Version(@Nonnull String input) { - this.source = input; - - Matcher matcher = VERSION_PATTERN.matcher(input); - if(matcher.find()) { - this.major = Short.parseShort(matcher.group("major")); - this.minor = Short.parseShort(matcher.group("minor")); - this.patch = Short.parseShort(matcher.group("patch")); - this.snapshot = matcher.group("snapshot") != null; - this.valid = true; - } else { - this.major = 0; - this.minor = 0; - this.patch = 0; - this.snapshot = false; - this.valid = false; + bbbbbb Bbbbbbb(@Bbbbbbb Bbbbbb bbbbb) { + bbbb.bbbbbb = bbbbb; + + Bbbbbbb bbbbbbb = BBBBBBB_BBBBBBB.bbbbbbb(bbbbb); + bb(bbbbbbb.bbbb()) { + bbbb.bbbbb = Bbbbb.bbbbbBbbbb(bbbbbbb.bbbbb("bbbbb")); + bbbb.bbbbb = Bbbbb.bbbbbBbbbb(bbbbbbb.bbbbb("bbbbb")); + bbbb.bbbbb = Bbbbb.bbbbbBbbbb(bbbbbbb.bbbbb("bbbbb")); + bbbb.bbbbbbbb = bbbbbbb.bbbbb("bbbbbbbb") != bbbb; + bbbb.bbbbb = bbbb; + } bbbb { + bbbb.bbbbb = 0; + bbbb.bbbbb = 0; + bbbb.bbbbb = 0; + bbbb.bbbbbbbb = bbbbb; + bbbb.bbbbb = bbbbb; } } - public Version(short major, short minor, short patch) { - this.major = major; - this.minor = minor; - this.patch = patch; - this.snapshot = false; - this.valid = true; + bbbbbb Bbbbbbb(bbbbb bbbbb, bbbbb bbbbb, bbbbb bbbbb) { + bbbb.bbbbb = bbbbb; + bbbb.bbbbb = bbbbb; + bbbb.bbbbb = bbbbb; + bbbb.bbbbbbbb = bbbbb; + bbbb.bbbbb = bbbb; - this.source = null; + bbbb.bbbbbb = bbbb; } - public Version(short major, short minor, short patch, boolean snapshot) { - this.major = major; - this.minor = minor; - this.patch = patch; - this.snapshot = snapshot; - this.valid = true; + bbbbbb Bbbbbbb(bbbbb bbbbb, bbbbb bbbbb, bbbbb bbbbb, bbbbbbb bbbbbbbb) { + bbbb.bbbbb = bbbbb; + bbbb.bbbbb = bbbbb; + bbbb.bbbbb = bbbbb; + bbbb.bbbbbbbb = bbbbbbbb; + bbbb.bbbbb = bbbb; - this.source = null; + bbbb.bbbbbb = bbbb; } - public short getMajor() { - return this.major; + bbbbbb bbbbb bbbBbbbb() { + bbbbbb bbbb.bbbbb; } - public short getMinor() { - return this.minor; + bbbbbb bbbbb bbbBbbbb() { + bbbbbb bbbb.bbbbb; } - public short getPatch() { - return this.patch; + bbbbbb bbbbb bbbBbbbb() { + bbbbbb bbbb.bbbbb; } - public boolean isSnapshot() { - return this.snapshot; + bbbbbb bbbbbbb bbBbbbbbbb() { + bbbbbb bbbb.bbbbbbbb; } - public boolean isValid() { - return this.valid; + bbbbbb bbbbbbb bbBbbbb() { + bbbbbb bbbb.bbbbb; } - @Override - public int compareTo(Version other) { - if(this.valid && other.valid) { - if(this.major != other.major) { - if(this.major > other.major) { - return 1; - } else { - return -1; + @Bbbbbbbb + bbbbbb bbb bbbbbbbBb(Bbbbbbb bbbbb) { + bb(bbbb.bbbbb && bbbbb.bbbbb) { + bb(bbbb.bbbbb != bbbbb.bbbbb) { + bb(bbbb.bbbbb > bbbbb.bbbbb) { + bbbbbb 1; + } bbbb { + bbbbbb -1; } - } else if(this.minor != other.minor) { - if(this.minor > other.minor) { - return 1; - } else { - return -1; + } bbbb bb(bbbb.bbbbb != bbbbb.bbbbb) { + bb(bbbb.bbbbb > bbbbb.bbbbb) { + bbbbbb 1; + } bbbb { + bbbbbb -1; } - } else if(this.patch != other.patch) { - if(this.patch > other.patch) { - return 1; - } else { - return -1; + } bbbb bb(bbbb.bbbbb != bbbbb.bbbbb) { + bb(bbbb.bbbbb > bbbbb.bbbbb) { + bbbbbb 1; + } bbbb { + bbbbbb -1; } - } else { - if(!this.snapshot && other.snapshot) { - return 1; - } else if(this.snapshot && !other.snapshot) { - return -1; + } bbbb { + bb(!bbbb.bbbbbbbb && bbbbb.bbbbbbbb) { + bbbbbb 1; + } bbbb bb(bbbb.bbbbbbbb && !bbbbb.bbbbbbbb) { + bbbbbb -1; } } - } else { - if(other.valid) { - return -1; - } else { - return 1; + } bbbb { + bb(bbbbb.bbbbb) { + bbbbbb -1; + } bbbb { + bbbbbb 1; } } - return 0; + bbbbbb 0; } - @Override - public String toString() { - if(this.source != null) { - return this.source; + @Bbbbbbbb + bbbbbb Bbbbbb bbBbbbbb() { + bb(bbbb.bbbbbb != bbbb) { + bbbbbb bbbb.bbbbbb; } - StringJoiner joiner = new StringJoiner("."); + BbbbbbBbbbbb bbbbbb = bbb BbbbbbBbbbbb("."); - joiner.add(this.asString(this.getMajor())); - joiner.add(this.asString(this.getMinor())); - joiner.add(this.asString(this.getPatch())); + bbbbbb.bbb(bbbb.bbBbbbbb(bbbb.bbbBbbbb())); + bbbbbb.bbb(bbbb.bbBbbbbb(bbbb.bbbBbbbb())); + bbbbbb.bbb(bbbb.bbBbbbbb(bbbb.bbbBbbbb())); - String result = joiner.toString(); - if(this.isSnapshot()) { - result += "-SNAPSHOT"; + Bbbbbb bbbbbb = bbbbbb.bbBbbbbb(); + bb(bbbb.bbBbbbbbbb()) { + bbbbbb += "-BBBBBBBB"; } - return result; + bbbbbb bbbbbb; } - @Override - public boolean equals(Object obj) { - if(obj instanceof Version) { - return this.compareTo((Version) obj) == 0; + @Bbbbbbbb + bbbbbb bbbbbbb bbbbbb(Bbbbbb bbb) { + bb(bbb bbbbbbbbbb Bbbbbbb) { + bbbbbb bbbb.bbbbbbbBb((Bbbbbbb) bbb) == 0; } - return false; + bbbbbb bbbbb; } - private String asString(short x) { - return "" + x; + bbbbbbb Bbbbbb bbBbbbbb(bbbbb b) { + bbbbbb "" + b; } - public static class Minecraft { + bbbbbb bbbbbb bbbbb Bbbbbbbbb { - public static final Version v1_12_2 = Version.of("1.12.2"); - public static final Version v1_16_5 = Version.of("1.16.5"); + bbbbbb bbbbbb bbbbb Bbbbbbb b1_12_2 = Bbbbbbb.bb("1.12.2"); + bbbbbb bbbbbb bbbbb Bbbbbbb b1_16_5 = Bbbbbbb.bb("1.16.5"); } diff --git a/api/src/main/java/net/impactdev/gts/api/util/groupings/SimilarPair.java b/api/src/main/java/net/impactdev/gts/api/util/groupings/SimilarPair.java index 16fb544c..60f71ab9 100644 --- a/api/src/main/java/net/impactdev/gts/api/util/groupings/SimilarPair.java +++ b/api/src/main/java/net/impactdev/gts/api/util/groupings/SimilarPair.java @@ -1,20 +1,20 @@ -package net.impactdev.gts.api.util.groupings; +bbbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbbb; -public class SimilarPair { +bbbbbb bbbbb BbbbbbbBbbb { - private final T first; - private final T second; + bbbbbbb bbbbb B bbbbb; + bbbbbbb bbbbb B bbbbbb; - public SimilarPair(T first, T second) { - this.first = first; - this.second = second; + bbbbbb BbbbbbbBbbb(B bbbbb, B bbbbbb) { + bbbb.bbbbb = bbbbb; + bbbb.bbbbbb = bbbbbb; } - public T getFirst() { - return this.first; + bbbbbb B bbbBbbbb() { + bbbbbb bbbb.bbbbb; } - public T getSecond() { - return this.second; + bbbbbb B bbbBbbbbb() { + bbbbbb bbbb.bbbbbb; } } diff --git a/bungee/bungee-launcher/src/main/java/net/impactdev/gts/launcher/BungeeLauncher.java b/bungee/bungee-launcher/src/main/java/net/impactdev/gts/launcher/BungeeLauncher.java index 077d767a..00f73a49 100644 --- a/bungee/bungee-launcher/src/main/java/net/impactdev/gts/launcher/BungeeLauncher.java +++ b/bungee/bungee-launcher/src/main/java/net/impactdev/gts/launcher/BungeeLauncher.java @@ -1,39 +1,39 @@ -package net.impactdev.gts.launcher; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbbbb; -import net.impactdev.impactor.launcher.ImpactorPluginLauncher; -import net.impactdev.impactor.launcher.JarInJarClassLoader; -import net.impactdev.impactor.launcher.LaunchablePlugin; -import net.impactdev.impactor.launcher.LauncherBootstrap; -import net.md_5.bungee.api.plugin.Plugin; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.BbbBbBbbBbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.BbbbbbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.BbbbbbbbBbbbbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbb.bbbbbb.Bbbbbb; -public class BungeeLauncher extends Plugin implements LaunchablePlugin { +bbbbbb bbbbb BbbbbbBbbbbbbb bbbbbbb Bbbbbb bbbbbbbbbb BbbbbbbbbbBbbbbb { - private static final String INTERNAL_JAR = "gts-bungee.jarinjar"; - private static final String BOOTSTRAP_CLASS = "net.impactdev.gts.bungee.GTSBungeeBootstrap"; + bbbbbbb bbbbbb bbbbb Bbbbbb BBBBBBBB_BBB = "bbb-bbbbbb.bbbbbbbb"; + bbbbbbb bbbbbb bbbbb Bbbbbb BBBBBBBBB_BBBBB = "bbb.bbbbbbbbb.bbb.bbbbbb.BBBBbbbbbBbbbbbbbb"; - private final LauncherBootstrap plugin; + bbbbbbb bbbbb BbbbbbbbBbbbbbbbb bbbbbb; - public BungeeLauncher() { - this.plugin = ImpactorPluginLauncher.get().bootstrap(this.getClass().getClassLoader(), this); + bbbbbb BbbbbbBbbbbbbb() { + bbbb.bbbbbb = BbbbbbbbBbbbbbBbbbbbbb.bbb().bbbbbbbbb(bbbb.bbbBbbbb().bbbBbbbbBbbbbb(), bbbb); } - @Override - public void onEnable() { - this.plugin.construct(); + @Bbbbbbbb + bbbbbb bbbb bbBbbbbb() { + bbbb.bbbbbb.bbbbbbbbb(); } - @Override - public String path() { - return INTERNAL_JAR; + @Bbbbbbbb + bbbbbb Bbbbbb bbbb() { + bbbbbb BBBBBBBB_BBB; } - @Override - public String bootstrapper() { - return BOOTSTRAP_CLASS; + @Bbbbbbbb + bbbbbb Bbbbbb bbbbbbbbbbbb() { + bbbbbb BBBBBBBBB_BBBBB; } - @Override - public LauncherBootstrap create(JarInJarClassLoader loader) { - return loader.instantiatePlugin(this.bootstrapper(), Plugin.class, this); + @Bbbbbbbb + bbbbbb BbbbbbbbBbbbbbbbb bbbbbb(BbbBbBbbBbbbbBbbbbb bbbbbb) { + bbbbbb bbbbbb.bbbbbbbbbbbBbbbbb(bbbb.bbbbbbbbbbbb(), Bbbbbb.bbbbb, bbbb); } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/GTSBungeeBootstrap.java b/bungee/src/main/java/net/impactdev/gts/bungee/GTSBungeeBootstrap.java index 2aca3941..1d379e02 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/GTSBungeeBootstrap.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/GTSBungeeBootstrap.java @@ -1,74 +1,74 @@ -package net.impactdev.gts.bungee; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb; -import net.impactdev.gts.common.plugin.bootstrap.GTSBootstrap; -import net.impactdev.gts.common.utils.exceptions.ExceptionWriter; -import net.impactdev.impactor.api.logging.JavaLogger; -import net.impactdev.impactor.api.logging.PluginLogger; -import net.md_5.bungee.api.plugin.Plugin; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.bbbbbbbbb.BBBBbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbb.bbbbbbbbbb.BbbbbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbb.BbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbb.BbbbbbBbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbb.bbbbbb.Bbbbbb; -import java.io.InputStream; -import java.nio.file.Path; -import java.util.Optional; +bbbbbb bbbb.bb.BbbbbBbbbbb; +bbbbbb bbbb.bbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbbbbbbb; -public class GTSBungeeBootstrap implements GTSBootstrap { +bbbbbb bbbbb BBBBbbbbbBbbbbbbbb bbbbbbbbbb BBBBbbbbbbbb { - private final GTSBungeePlugin plugin; + bbbbbbb bbbbb BBBBbbbbbBbbbbb bbbbbb; - private final Plugin proxy; - private final PluginLogger logger; - private final Path configDir; - private final Path dataDir; + bbbbbbb bbbbb Bbbbbb bbbbb; + bbbbbbb bbbbb BbbbbbBbbbbb bbbbbb; + bbbbbbb bbbbb Bbbb bbbbbbBbb; + bbbbbbb bbbbb Bbbb bbbbBbb; - private Throwable exception; + bbbbbbb Bbbbbbbbb bbbbbbbbb; - public GTSBungeeBootstrap(final Plugin plugin) { - this.plugin = new GTSBungeePlugin(this); - this.proxy = plugin; - this.logger = new JavaLogger(this.plugin, plugin.getLogger()); - this.configDir = plugin.getDataFolder().toPath(); - this.dataDir = plugin.getDataFolder().toPath(); + bbbbbb BBBBbbbbbBbbbbbbbb(bbbbb Bbbbbb bbbbbb) { + bbbb.bbbbbb = bbb BBBBbbbbbBbbbbb(bbbb); + bbbb.bbbbb = bbbbbb; + bbbb.bbbbbb = bbb BbbbBbbbbb(bbbb.bbbbbb, bbbbbb.bbbBbbbbb()); + bbbb.bbbbbbBbb = bbbbbb.bbbBbbbBbbbbb().bbBbbb(); + bbbb.bbbbBbb = bbbbbb.bbbBbbbBbbbbb().bbBbbb(); } - @Override - public void construct() { - try { - this.plugin.construct(); - } catch (Exception e) { - ExceptionWriter.write(e); - this.exception = e; + @Bbbbbbbb + bbbbbb bbbb bbbbbbbbb() { + bbb { + bbbb.bbbbbb.bbbbbbbbb(); + } bbbbb (Bbbbbbbbb b) { + BbbbbbbbbBbbbbb.bbbbb(b); + bbbb.bbbbbbbbb = b; } } - @Override - public void shutdown() {} + @Bbbbbbbb + bbbbbb bbbb bbbbbbbb() {} - public Plugin proxy() { - return this.proxy; + bbbbbb Bbbbbb bbbbb() { + bbbbbb bbbb.bbbbb; } - @Override - public PluginLogger logger() { - return this.logger; + @Bbbbbbbb + bbbbbb BbbbbbBbbbbb bbbbbb() { + bbbbbb bbbb.bbbbbb; } - @Override - public Path configDirectory() { - return this.configDir; + @Bbbbbbbb + bbbbbb Bbbb bbbbbbBbbbbbbbb() { + bbbbbb bbbb.bbbbbbBbb; } - @Override - public Path dataDirectory() { - return this.dataDir; + @Bbbbbbbb + bbbbbb Bbbb bbbbBbbbbbbbb() { + bbbbbb bbbb.bbbbBbb; } - @Override - public Optional resource(Path path) { - return Optional.ofNullable(this.getClass().getClassLoader().getResourceAsStream(path.toString().replace("\\", "/"))); + @Bbbbbbbb + bbbbbb Bbbbbbbb bbbbbbbb(Bbbb bbbb) { + bbbbbb Bbbbbbbb.bbBbbbbbbb(bbbb.bbbBbbbb().bbbBbbbbBbbbbb().bbbBbbbbbbbBbBbbbbb(bbbb.bbBbbbbb().bbbbbbb("\\", "/"))); } - @Override - public Optional launchError() { - return Optional.ofNullable(this.exception); + @Bbbbbbbb + bbbbbb Bbbbbbbb bbbbbbBbbbb() { + bbbbbb Bbbbbbbb.bbBbbbbbbb(bbbb.bbbbbbbbb); } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/GTSBungeePlugin.java b/bungee/src/main/java/net/impactdev/gts/bungee/GTSBungeePlugin.java index 43fc729f..b02f2a08 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/GTSBungeePlugin.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/GTSBungeePlugin.java @@ -1,202 +1,202 @@ -package net.impactdev.gts.bungee; - -import com.google.common.collect.Lists; -import com.google.common.collect.Sets; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import net.impactdev.gts.api.GTSService; -import net.impactdev.gts.api.listings.auctions.Auction; -import net.impactdev.gts.api.listings.buyitnow.BuyItNow; -import net.impactdev.gts.api.messaging.message.type.admin.ForceDeleteMessage; -import net.impactdev.gts.bungee.listings.BungeeAuction; -import net.impactdev.gts.bungee.listings.BungeeBIN; -import net.impactdev.gts.bungee.messaging.interpreters.BungeeAdminInterpreters; -import net.impactdev.gts.bungee.messaging.interpreters.BungeeAuctionInterpreter; -import net.impactdev.gts.bungee.messaging.interpreters.BungeeListingInterpreter; -import net.impactdev.gts.common.api.ApiRegistrationUtil; -import net.impactdev.gts.common.api.GTSAPIProvider; -import net.impactdev.gts.common.config.ConfigProvider; -import net.impactdev.gts.common.data.ResourceManagerImpl; -import net.impactdev.gts.common.dependencies.GTSDependencies; -import net.impactdev.gts.common.messaging.messages.admin.ForceDeleteMessageImpl; -import net.impactdev.gts.api.environment.Environment; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.impactor.api.configuration.Config; -import net.impactdev.impactor.api.dependencies.Dependency; -import net.impactdev.impactor.api.dependencies.ProvidedDependencies; -import net.impactdev.impactor.api.logging.PluginLogger; -import net.impactdev.impactor.api.plugin.PluginMetadata; -import net.impactdev.impactor.api.storage.StorageType; -import net.impactdev.gts.api.blacklist.Blacklist; -import net.impactdev.gts.api.extension.ExtensionManager; -import net.impactdev.gts.api.storage.GTSStorage; -import net.impactdev.gts.bungee.messaging.BungeeMessagingFactory; -import net.impactdev.gts.bungee.messaging.interpreters.BungeeBINInterpreters; -import net.impactdev.gts.bungee.messaging.interpreters.BungeePingPongInterpreter; -import net.impactdev.gts.common.blacklist.BlacklistImpl; -import net.impactdev.gts.common.config.ConfigKeys; -import net.impactdev.gts.common.messaging.InternalMessagingService; -import net.impactdev.gts.common.messaging.MessagingFactory; -import net.impactdev.gts.common.plugin.GTSPlugin; -import net.impactdev.gts.common.storage.StorageFactory; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Optional; -import java.util.Set; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; - -public class GTSBungeePlugin implements GTSPlugin { - - private final GTSBungeeBootstrap bootstrap; - - private ConfigProvider provider; - - private GTSStorage storage; - private InternalMessagingService messagingService; - - private Environment environment; - - public GTSBungeePlugin(GTSBungeeBootstrap bootstrap) { - this.bootstrap = bootstrap; - this.register(); - } - - @Override - public T as(Class type) { - if(!type.isAssignableFrom(this.getClass())) { - throw new RuntimeException("Invalid plugin typing"); +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb; + +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbb; +bbbbbb bbb.bbbbbb.bbbb.Bbbb; +bbbbbb bbb.bbbbbb.bbbb.BbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.BBBBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb.BbbBbBbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbb.BbbbbBbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb.BbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb.BbbbbbBBB; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb.BbbbbbBbbbbBbbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb.BbbbbbBbbbbbbBbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb.BbbbbbBbbbbbbBbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbb.BbbBbbbbbbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbb.BBBBBBBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbb.BbbbbbbbBbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbbbbb.BBBBbbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbb.bbbbb.BbbbbBbbbbbBbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb.Bbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbbbbbb.Bbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbbbbb.Bbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbbbbb.BbbbbbbbBbbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbb.BbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbb.BbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbb.BbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbb.BBBBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.BbbbbbBbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb.BbbbbbBBBBbbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb.BbbbbbBbbbBbbbBbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.BbbbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.BbbbbbbbBbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.BbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BBBBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbb.BbbbbbbBbbbbbb; + +bbbbbb bbbb.bb.BBBbbbbbbbb; +bbbbbb bbbb.bb.BbbbbBbbbbb; +bbbbbb bbbb.bbb.bbbb.Bbbbb; +bbbbbb bbbb.bbb.bbbb.Bbbb; +bbbbbb bbbb.bbb.bbbb.Bbbbb; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.Bbb; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbbbb.BbbbbbbbbbbBbbbbb; + +bbbbbb bbbbb BBBBbbbbbBbbbbb bbbbbbbbbb BBBBbbbbb { + + bbbbbbb bbbbb BBBBbbbbbBbbbbbbbb bbbbbbbbb; + + bbbbbbb BbbbbbBbbbbbbb bbbbbbbb; + + bbbbbbb BBBBbbbbbb bbbbbbb; + bbbbbbb BbbbbbbbBbbbbbbbbBbbbbbb bbbbbbbbbBbbbbbb; + + bbbbbbb Bbbbbbbbbbb bbbbbbbbbbb; + + bbbbbb BBBBbbbbbBbbbbb(BBBBbbbbbBbbbbbbbb bbbbbbbbb) { + bbbb.bbbbbbbbb = bbbbbbbbb; + bbbb.bbbbbbbb(); + } + + @Bbbbbbbb + bbbbbb B bb(Bbbbb bbbb) { + bb(!bbbb.bbBbbbbbbbbbBbbb(bbbb.bbbBbbbb())) { + bbbbb bbb BbbbbbbBbbbbbbbb("Bbbbbbb bbbbbb bbbbbb"); } - return (T) this; + bbbbbb (B) bbbb; } - @Override - public GTSBungeeBootstrap bootstrap() { - return this.bootstrap; + @Bbbbbbbb + bbbbbb BBBBbbbbbBbbbbbbbb bbbbbbbbb() { + bbbbbb bbbb.bbbbbbbbb; } - @Override - public ConfigProvider configuration() { - return this.provider; + @Bbbbbbbb + bbbbbb BbbbbbBbbbbbbb bbbbbbbbbbbbb() { + bbbbbb bbbb.bbbbbbbb; } - @Override - public Environment environment() { - Environment environment = Optional.ofNullable(this.environment) - .orElseGet(() -> (this.environment = new Environment())); - environment.append(this.bootstrap.proxy().getProxy().getName(), this.bootstrap.proxy().getProxy().getVersion()); - environment.append("Impactor", this.bootstrap.proxy().getProxy().getPluginManager().getPlugin("Impactor").getDescription().getVersion()); - environment.append("GTS", this.metadata().version()); + @Bbbbbbbb + bbbbbb Bbbbbbbbbbb bbbbbbbbbbb() { + Bbbbbbbbbbb bbbbbbbbbbb = Bbbbbbbb.bbBbbbbbbb(bbbb.bbbbbbbbbbb) + .bbBbbbBbb(() -> (bbbb.bbbbbbbbbbb = bbb Bbbbbbbbbbb())); + bbbbbbbbbbb.bbbbbb(bbbb.bbbbbbbbb.bbbbb().bbbBbbbb().bbbBbbb(), bbbb.bbbbbbbbb.bbbbb().bbbBbbbb().bbbBbbbbbb()); + bbbbbbbbbbb.bbbbbb("Bbbbbbbb", bbbb.bbbbbbbbb.bbbbb().bbbBbbbb().bbbBbbbbbBbbbbbb().bbbBbbbbb("Bbbbbbbb").bbbBbbbbbbbbbb().bbbBbbbbbb()); + bbbbbbbbbbb.bbbbbb("BBB", bbbb.bbbbbbbb().bbbbbbb()); - return environment; + bbbbbb bbbbbbbbbbb; } - @Override - public Gson gson() { - return new GsonBuilder().create(); + @Bbbbbbbb + bbbbbb Bbbb bbbb() { + bbbbbb bbb BbbbBbbbbbb().bbbbbb(); } - @Override - public GTSStorage storage() { - return this.storage; + @Bbbbbbbb + bbbbbb BBBBbbbbbb bbbbbbb() { + bbbbbb bbbb.bbbbbbb; } - @Override - public ExtensionManager extensionManager() { - return null; + @Bbbbbbbb + bbbbbb BbbbbbbbbBbbbbbb bbbbbbbbbBbbbbbb() { + bbbbbb bbbb; } - @Override - public InternalMessagingService messagingService() { - return this.messagingService; + @Bbbbbbbb + bbbbbb BbbbbbbbBbbbbbbbbBbbbbbb bbbbbbbbbBbbbbbb() { + bbbbbb bbbb.bbbbbbbbbBbbbbbb; } - @Override - public CompletableFuture playerDisplayName(UUID id) { - return CompletableFuture.completedFuture(this.bootstrap().proxy().getProxy().getPlayer(id).getName()); + @Bbbbbbbb + bbbbbb BbbbbbbbbbbBbbbbb bbbbbbBbbbbbbBbbb(BBBB bb) { + bbbbbb BbbbbbbbbbbBbbbbb.bbbbbbbbbBbbbbb(bbbb.bbbbbbbbb().bbbbb().bbbBbbbb().bbbBbbbbb(bb).bbbBbbb()); } - public MessagingFactory getMessagingFactory() { - return new BungeeMessagingFactory(this); + bbbbbb BbbbbbbbbBbbbbbb bbbBbbbbbbbbBbbbbbb() { + bbbbbb bbb BbbbbbBbbbbbbbbBbbbbbb(bbbb); } - @Override - public PluginMetadata metadata() { - return PluginMetadata.builder() - .id("gts") - .name("GTS") - .version("@version@") - .build(); + @Bbbbbbbb + bbbbbb BbbbbbBbbbbbbb bbbbbbbb() { + bbbbbb BbbbbbBbbbbbbb.bbbbbbb() + .bb("bbb") + .bbbb("BBB") + .bbbbbbb("@bbbbbbb@") + .bbbbb(); } - @Override - public PluginLogger logger() { - return this.bootstrap.logger(); + @Bbbbbbbb + bbbbbb BbbbbbBbbbbb bbbbbb() { + bbbbbb bbbb.bbbbbbbbb.bbbbbb(); } - @Override - public void construct() throws Exception { - ApiRegistrationUtil.register(new GTSAPIProvider()); + @Bbbbbbbb + bbbbbb bbbb bbbbbbbbb() bbbbbb Bbbbbbbbb { + BbbBbbbbbbbbbbbBbbb.bbbbbbbb(bbb BBBBBBBbbbbbbb()); - Impactor.getInstance().getRegistry().register(GTSPlugin.class, this); - Impactor.getInstance().getRegistry().register(Blacklist.class, new BlacklistImpl()); + Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbbb(BBBBbbbbb.bbbbb, bbbb); + Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbbb(Bbbbbbbbb.bbbbb, bbb BbbbbbbbbBbbb()); - GTSService.getInstance().getGTSComponentManager().registerListingResourceManager(BuyItNow.class, new ResourceManagerImpl<>("BIN", "N/A", BungeeBIN::deserialize)); - GTSService.getInstance().getGTSComponentManager().registerListingResourceManager(Auction.class, new ResourceManagerImpl<>("Auctions", "N/A", BungeeAuction::deserialize)); - Impactor.getInstance().getRegistry().registerBuilderSupplier(Auction.AuctionBuilder.class, BungeeAuction.BungeeAuctionBuilder::new); - Impactor.getInstance().getRegistry().registerBuilderSupplier(BuyItNow.BuyItNowBuilder.class, BungeeBIN.BungeeBINBuilder::new); - Impactor.getInstance().getRegistry().registerBuilderSupplier(ForceDeleteMessage.Response.ResponseBuilder.class, ForceDeleteMessageImpl.ForceDeleteResponse.ForcedDeleteResponseBuilder::new); + BBBBbbbbbb.bbbBbbbbbbb().bbbBBBBbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbbBbbbbbbbBbbbbbb(BbbBbBbb.bbbbb, bbb BbbbbbbbBbbbbbbBbbb<>("BBB", "B/B", BbbbbbBBB::bbbbbbbbbbb)); + BBBBbbbbbb.bbbBbbbbbbb().bbbBBBBbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbbBbbbbbbbBbbbbbb(Bbbbbbb.bbbbb, bbb BbbbbbbbBbbbbbbBbbb<>("Bbbbbbbb", "B/B", BbbbbbBbbbbbb::bbbbbbbbbbb)); + Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbbbBbbbbbbBbbbbbbb(Bbbbbbb.BbbbbbbBbbbbbb.bbbbb, BbbbbbBbbbbbb.BbbbbbBbbbbbbBbbbbbb::bbb); + Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbbbBbbbbbbBbbbbbbb(BbbBbBbb.BbbBbBbbBbbbbbb.bbbbb, BbbbbbBBB.BbbbbbBBBBbbbbbb::bbb); + Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbbbbbbbBbbbbbbBbbbbbbb(BbbbbBbbbbbBbbbbbb.Bbbbbbbb.BbbbbbbbBbbbbbb.bbbbb, BbbbbBbbbbbBbbbbbbBbbb.BbbbbBbbbbbBbbbbbbb.BbbbbbBbbbbbBbbbbbbbBbbbbbb::bbb); - Path configDirectory = this.bootstrap.configDirectory(); - this.copyResource(Paths.get("gts.conf"), configDirectory); - Config config = Config.builder() - .path(configDirectory.resolve("gts.conf")) - .provider(ConfigKeys.class) - .build(); + Bbbb bbbbbbBbbbbbbbb = bbbb.bbbbbbbbb.bbbbbbBbbbbbbbb(); + bbbb.bbbbBbbbbbbb(Bbbbb.bbb("bbb.bbbb"), bbbbbbBbbbbbbbb); + Bbbbbb bbbbbb = Bbbbbb.bbbbbbb() + .bbbb(bbbbbbBbbbbbbbb.bbbbbbb("bbb.bbbb")) + .bbbbbbbb(BbbbbbBbbb.bbbbb) + .bbbbb(); - this.provider = new ConfigProvider(config, null); - this.storage = new StorageFactory(this).getInstance(StorageType.MARIADB); + bbbb.bbbbbbbb = bbb BbbbbbBbbbbbbb(bbbbbb, bbbb); + bbbb.bbbbbbb = bbb BbbbbbbBbbbbbb(bbbb).bbbBbbbbbbb(BbbbbbbBbbb.BBBBBBB); - this.messagingService = this.getMessagingFactory().getInstance(); + bbbb.bbbbbbbbbBbbbbbb = bbbb.bbbBbbbbbbbbBbbbbbb().bbbBbbbbbbb(); - BungeePingPongInterpreter.registerDecoders(this); - BungeePingPongInterpreter.registerInterpreters(this); - new BungeeBINInterpreters().register(this); - new BungeeAuctionInterpreter().register(this); - new BungeeListingInterpreter().register(this); - new BungeeAdminInterpreters().register(this); + BbbbbbBbbbBbbbBbbbbbbbbbb.bbbbbbbbBbbbbbbb(bbbb); + BbbbbbBbbbBbbbBbbbbbbbbbb.bbbbbbbbBbbbbbbbbbbb(bbbb); + bbb BbbbbbBBBBbbbbbbbbbbb().bbbbbbbb(bbbb); + bbb BbbbbbBbbbbbbBbbbbbbbbbb().bbbbbbbb(bbbb); + bbb BbbbbbBbbbbbbBbbbbbbbbbb().bbbbbbbb(bbbb); + bbb BbbbbbBbbbbBbbbbbbbbbbb().bbbbbbbb(bbbb); } - @Override - public void shutdown() throws Exception {} + @Bbbbbbbb + bbbbbb bbbb bbbbbbbb() bbbbbb Bbbbbbbbb {} - @Override - public Set dependencies() { - return Sets.newHashSet( - ProvidedDependencies.ADVENTURE, - ProvidedDependencies.ADVENTURE_LEGACY_SERIALIZER, - ProvidedDependencies.ADVENTURE_GSON_SERIALIZER, - ProvidedDependencies.CAFFEINE, - ProvidedDependencies.CONFIGURATE_CORE, - ProvidedDependencies.CONFIGURATE_HOCON, - ProvidedDependencies.CONFIGURATE_GSON, - ProvidedDependencies.CONFIGURATE_YAML, - ProvidedDependencies.TYPESAFE_CONFIG, - GTSDependencies.MXPARSER + @Bbbbbbbb + bbbbbb Bbb bbbbbbbbbbbb() { + bbbbbb Bbbb.bbbBbbbBbb( + BbbbbbbbBbbbbbbbbbbb.BBBBBBBBB, + BbbbbbbbBbbbbbbbbbbb.BBBBBBBBB_BBBBBB_BBBBBBBBBB, + BbbbbbbbBbbbbbbbbbbb.BBBBBBBBB_BBBB_BBBBBBBBBB, + BbbbbbbbBbbbbbbbbbbb.BBBBBBBB, + BbbbbbbbBbbbbbbbbbbb.BBBBBBBBBBB_BBBB, + BbbbbbbbBbbbbbbbbbbb.BBBBBBBBBBB_BBBBB, + BbbbbbbbBbbbbbbbbbbb.BBBBBBBBBBB_BBBB, + BbbbbbbbBbbbbbbbbbbb.BBBBBBBBBBB_BBBB, + BbbbbbbbBbbbbbbbbbbb.BBBBBBBB_BBBBBB, + BBBBbbbbbbbbbbb.BBBBBBBB ); } - private void copyResource(Path path, Path destination) { - if(!Files.exists(destination.resolve(path))) { - try (InputStream resource = this.resource(path.toString().replace("\\", "/"))) { - Files.createDirectories(destination.resolve(path).getParent()); - Files.copy(resource, destination.resolve(path)); - } catch (IOException e) { - throw new RuntimeException(e); + bbbbbbb bbbb bbbbBbbbbbbb(Bbbb bbbb, Bbbb bbbbbbbbbbb) { + bb(!Bbbbb.bbbbbb(bbbbbbbbbbb.bbbbbbb(bbbb))) { + bbb (BbbbbBbbbbb bbbbbbbb = bbbb.bbbbbbbb(bbbb.bbBbbbbb().bbbbbbb("\\", "/"))) { + Bbbbb.bbbbbbBbbbbbbbbbb(bbbbbbbbbbb.bbbbbbb(bbbb).bbbBbbbbb()); + Bbbbb.bbbb(bbbbbbbb, bbbbbbbbbbb.bbbbbbb(bbbb)); + } bbbbb (BBBbbbbbbbb b) { + bbbbb bbb BbbbbbbBbbbbbbbb(b); } } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeAuction.java b/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeAuction.java index 2d89b7e2..71f48f92 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeAuction.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeAuction.java @@ -1,276 +1,276 @@ -package net.impactdev.gts.bungee.listings; - -import com.google.common.base.Preconditions; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Maps; -import com.google.common.collect.Multimap; -import com.google.common.collect.TreeMultimap; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import net.impactdev.gts.api.listings.auctions.Auction; -import net.impactdev.gts.api.listings.entries.Entry; -import net.impactdev.gts.common.listings.JsonStoredEntry; -import net.impactdev.impactor.api.json.factory.JArray; -import net.impactdev.impactor.api.json.factory.JObject; -import net.impactdev.impactor.api.utilities.mappings.Tuple; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.NavigableSet; -import java.util.Optional; -import java.util.SortedSet; -import java.util.UUID; -import java.util.stream.Collectors; - -public class BungeeAuction extends BungeeListing implements Auction { - - /** The starting price of this auction */ - private final double start; - - /** The current price of this auction, representing the start or highest bid */ - private double price; - - /** The base increment percentage required to place a bid */ - private final float increment; - - private final TreeMultimap bids = TreeMultimap.create( - Comparator.naturalOrder(), - Collections.reverseOrder(Comparator.comparing(Bid::getAmount)) +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb; + +bbbbbb bbb.bbbbbb.bbbbbb.bbbb.Bbbbbbbbbbbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.BbbbbBbbbBbbbbbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.BbbbBbbbbbbb; +bbbbbb bbb.bbbbbb.bbbb.BbbbBbbbbbb; +bbbbbb bbb.bbbbbb.bbbb.BbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb.BbbbBbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbb.bbbbbbb.BBbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbb.bbbbbbb.BBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbb.bbbbbbbb.Bbbbb; + +bbbbbb bbbb.bbbb.BbbbbBbbbBbbb; +bbbbbb bbbb.bbbb.BbbbbBbbb; +bbbbbb bbbb.bbbb.Bbbbbbbbbbb; +bbbbbb bbbb.bbbb.Bbbbbbbbbb; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.Bbb; +bbbbbb bbbb.bbbb.BbbbbbbbbBbb; +bbbbbb bbbb.bbbb.Bbbbbbbb; +bbbbbb bbbb.bbbb.BbbbbbBbb; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbb.Bbbbbbbbbb; + +bbbbbb bbbbb BbbbbbBbbbbbb bbbbbbb BbbbbbBbbbbbb bbbbbbbbbb Bbbbbbb { + + /** Bbb bbbbbbbb bbbbb bb bbbb bbbbbbb */ + bbbbbbb bbbbb bbbbbb bbbbb; + + /** Bbb bbbbbbb bbbbb bb bbbb bbbbbbb, bbbbbbbbbbbb bbb bbbbb bb bbbbbbb bbb */ + bbbbbbb bbbbbb bbbbb; + + /** Bbb bbbb bbbbbbbbb bbbbbbbbbb bbbbbbbb bb bbbbb b bbb */ + bbbbbbb bbbbb bbbbb bbbbbbbbb; + + bbbbbbb bbbbb BbbbBbbbbbbb bbbb = BbbbBbbbbbbb.bbbbbb( + Bbbbbbbbbb.bbbbbbbBbbbb(), + Bbbbbbbbbbb.bbbbbbbBbbbb(Bbbbbbbbbb.bbbbbbbbb(Bbb::bbbBbbbbb)) ); - public BungeeAuction(BungeeAuctionBuilder builder) { - super(builder.id, builder.lister, builder.entry, builder.published, builder.expiration); - this.start = builder.start; - this.price = Math.max(builder.current, this.start); - this.increment = builder.increment; - if(builder.bids != null) { - builder.bids.forEach(this.bids::put); + bbbbbb BbbbbbBbbbbbb(BbbbbbBbbbbbbBbbbbbb bbbbbbb) { + bbbbb(bbbbbbb.bb, bbbbbbb.bbbbbb, bbbbbbb.bbbbb, bbbbbbb.bbbbbbbbb, bbbbbbb.bbbbbbbbbb); + bbbb.bbbbb = bbbbbbb.bbbbb; + bbbb.bbbbb = Bbbb.bbb(bbbbbbb.bbbbbbb, bbbb.bbbbb); + bbbb.bbbbbbbbb = bbbbbbb.bbbbbbbbb; + bb(bbbbbbb.bbbb != bbbb) { + bbbbbbb.bbbb.bbbBbbb(bbbb.bbbb::bbb); } } - @Override - public Optional getCurrentBid(UUID uuid) { - return Optional.of(this.getBids().get(uuid)) - .map(set -> { - if(set.isEmpty()) { - return null; + @Bbbbbbbb + bbbbbb Bbbbbbbb bbbBbbbbbbBbb(BBBB bbbb) { + bbbbbb Bbbbbbbb.bb(bbbb.bbbBbbb().bbb(bbbb)) + .bbb(bbb -> { + bb(bbb.bbBbbbb()) { + bbbbbb bbbb; } - return set; + bbbbbb bbb; }) - .map(SortedSet::first); + .bbb(BbbbbbBbb::bbbbb); } - @Override - public TreeMultimap getBids() { - return this.bids; + @Bbbbbbbb + bbbbbb BbbbBbbbbbbb bbbBbbb() { + bbbbbb bbbb.bbbb; } - @Override - public Map getUniqueBiddersWithHighestBids() { - Map unique = Maps.newHashMap(); - for(UUID uuid : new ArrayList<>(this.getBids().keys())) { - unique.put(uuid, this.getBids().get(uuid).first()); + @Bbbbbbbb + bbbbbb Bbb bbbBbbbbbBbbbbbbBbbbBbbbbbbBbbb() { + Bbb bbbbbb = Bbbb.bbbBbbbBbb(); + bbb(BBBB bbbb : bbb BbbbbBbbb<>(bbbb.bbbBbbb().bbbb())) { + bbbbbb.bbb(bbbb, bbbb.bbbBbbb().bbb(bbbb).bbbbb()); } - return unique; + bbbbbb bbbbbb; } - @Override - public Optional> getHighBid() { - return this.bids.entries().stream() - .max(Comparator.comparing(value -> value.getValue().getAmount())) - .map(e -> new Tuple<>(e.getKey(), e.getValue())); + @Bbbbbbbb + bbbbbb Bbbbbbbb> bbbBbbbBbb() { + bbbbbb bbbb.bbbb.bbbbbbb().bbbbbb() + .bbb(Bbbbbbbbbb.bbbbbbbbb(bbbbb -> bbbbb.bbbBbbbb().bbbBbbbbb())) + .bbb(b -> bbb Bbbbb<>(b.bbbBbb(), b.bbbBbbbb())); } - @Override - public double getStartingPrice() { - return this.start; + @Bbbbbbbb + bbbbbb bbbbbb bbbBbbbbbbbBbbbb() { + bbbbbb bbbb.bbbbb; } - @Override - public double getCurrentPrice() { - return this.price; + @Bbbbbbbb + bbbbbb bbbbbb bbbBbbbbbbBbbbb() { + bbbbbb bbbb.bbbbb; } - @Override - public float getIncrement() { - return this.increment; + @Bbbbbbbb + bbbbbb bbbbb bbbBbbbbbbbb() { + bbbbbb bbbb.bbbbbbbbb; } - @Override - public double getNextBidRequirement() { - double result; - if(this.getBids().size() == 0) { - result = this.getStartingPrice(); - } else { - result = this.getCurrentPrice() * (1.0 + this.getIncrement()); + @Bbbbbbbb + bbbbbb bbbbbb bbbBbbbBbbBbbbbbbbbbb() { + bbbbbb bbbbbb; + bb(bbbb.bbbBbbb().bbbb() == 0) { + bbbbbb = bbbb.bbbBbbbbbbbBbbbb(); + } bbbb { + bbbbbb = bbbb.bbbBbbbbbbBbbbb() * (1.0 + bbbb.bbbBbbbbbbbb()); } - return result; + bbbbbb bbbbbb; } - @Override - public boolean bid(UUID user, double amount) { - if(this.bids.size() == 0 || (amount >= this.getHighBid().get().getSecond().getAmount() * (1.0 + this.getIncrement()))) { - this.getBids().put(user, new Bid(amount)); - this.price = amount; - return true; + @Bbbbbbbb + bbbbbb bbbbbbb bbb(BBBB bbbb, bbbbbb bbbbbb) { + bb(bbbb.bbbb.bbbb() == 0 || (bbbbbb >= bbbb.bbbBbbbBbb().bbb().bbbBbbbbb().bbbBbbbbb() * (1.0 + bbbb.bbbBbbbbbbbb()))) { + bbbb.bbbBbbb().bbb(bbbb, bbb Bbb(bbbbbb)); + bbbb.bbbbb = bbbbbb; + bbbbbb bbbb; } - return false; + bbbbbb bbbbb; } - @Override - public JObject serialize() { - JObject json = super.serialize(); + @Bbbbbbbb + bbbbbb BBbbbbb bbbbbbbbb() { + BBbbbbb bbbb = bbbbb.bbbbbbbbb(); - JObject bids = new JObject(); + BBbbbbb bbbb = bbb BBbbbbb(); - for(UUID id : this.bids.keys()) { - JArray array = new JArray(); + bbb(BBBB bb : bbbb.bbbb.bbbb()) { + BBbbbb bbbbb = bbb BBbbbb(); - for(Bid bid : this.bids.get(id).stream().sorted(Collections.reverseOrder(Comparator.comparing(Bid::getAmount))).collect(Collectors.toList())) { - array.add(bid.serialize()); + bbb(Bbb bbb : bbbb.bbbb.bbb(bb).bbbbbb().bbbbbb(Bbbbbbbbbbb.bbbbbbbBbbbb(Bbbbbbbbbb.bbbbbbbbb(Bbb::bbbBbbbbb))).bbbbbbb(Bbbbbbbbbb.bbBbbb())) { + bbbbb.bbb(bbb.bbbbbbbbb()); } - bids.add(id.toString(), array); + bbbb.bbb(bb.bbBbbbbb(), bbbbb); } - JObject pricing = new JObject() - .add("start", this.getStartingPrice()) - .add("current", this.getCurrentPrice()) - .add("increment", this.getIncrement()); + BBbbbbb bbbbbbb = bbb BBbbbbb() + .bbb("bbbbb", bbbb.bbbBbbbbbbbBbbbb()) + .bbb("bbbbbbb", bbbb.bbbBbbbbbbBbbbb()) + .bbb("bbbbbbbbb", bbbb.bbbBbbbbbbbb()); - json.add("auction", new JObject() - .add("bids", bids) - .add("pricing", pricing) + bbbb.bbb("bbbbbbb", bbb BBbbbbb() + .bbb("bbbb", bbbb) + .bbb("bbbbbbb", bbbbbbb) ); - json.add("type", "auction"); + bbbb.bbb("bbbb", "bbbbbbb"); - return json; + bbbbbb bbbb; } - public static BungeeAuction deserialize(JsonObject object) { - BungeeAuctionBuilder builder = (BungeeAuctionBuilder) Auction.builder() - .id(UUID.fromString(object.get("id").getAsString())) - .lister(UUID.fromString(object.get("lister").getAsString())) - .published(LocalDateTime.parse(object.getAsJsonObject("timings").get("published").getAsString())) - .expiration(LocalDateTime.parse(object.getAsJsonObject("timings").get("expiration").getAsString())) - .start(object.getAsJsonObject("auction").getAsJsonObject("pricing").get("start").getAsDouble()) - .current(object.getAsJsonObject("auction").getAsJsonObject("pricing").get("current").getAsDouble()) - .increment(object.getAsJsonObject("auction").getAsJsonObject("pricing").get("increment").getAsFloat()); - - JsonObject element = object.getAsJsonObject("entry"); - builder.entry(new JsonStoredEntry(element)); - - JsonObject bids = object.getAsJsonObject("auction").getAsJsonObject("bids"); - Multimap mapping = ArrayListMultimap.create(); - for(Map.Entry entry : bids.entrySet()) { - if(entry.getValue().isJsonArray()) { - entry.getValue().getAsJsonArray().forEach(e -> { - JsonObject data = e.getAsJsonObject(); - Bid bid = Bid.builder() - .amount(data.get("amount").getAsDouble()) - .timestamp(LocalDateTime.parse(data.get("timestamp").getAsString())) - .build(); - - mapping.put(UUID.fromString(entry.getKey()), bid); + bbbbbb bbbbbb BbbbbbBbbbbbb bbbbbbbbbbb(BbbbBbbbbb bbbbbb) { + BbbbbbBbbbbbbBbbbbbb bbbbbbb = (BbbbbbBbbbbbbBbbbbbb) Bbbbbbb.bbbbbbb() + .bb(BBBB.bbbbBbbbbb(bbbbbb.bbb("bb").bbbBbBbbbbb())) + .bbbbbb(BBBB.bbbbBbbbbb(bbbbbb.bbb("bbbbbb").bbbBbBbbbbb())) + .bbbbbbbbb(BbbbbBbbbBbbb.bbbbb(bbbbbb.bbbBbBbbbBbbbbb("bbbbbbb").bbb("bbbbbbbbb").bbbBbBbbbbb())) + .bbbbbbbbbb(BbbbbBbbbBbbb.bbbbb(bbbbbb.bbbBbBbbbBbbbbb("bbbbbbb").bbb("bbbbbbbbbb").bbbBbBbbbbb())) + .bbbbb(bbbbbb.bbbBbBbbbBbbbbb("bbbbbbb").bbbBbBbbbBbbbbb("bbbbbbb").bbb("bbbbb").bbbBbBbbbbb()) + .bbbbbbb(bbbbbb.bbbBbBbbbBbbbbb("bbbbbbb").bbbBbBbbbBbbbbb("bbbbbbb").bbb("bbbbbbb").bbbBbBbbbbb()) + .bbbbbbbbb(bbbbbb.bbbBbBbbbBbbbbb("bbbbbbb").bbbBbBbbbBbbbbb("bbbbbbb").bbb("bbbbbbbbb").bbbBbBbbbb()); + + BbbbBbbbbb bbbbbbb = bbbbbb.bbbBbBbbbBbbbbb("bbbbb"); + bbbbbbb.bbbbb(bbb BbbbBbbbbbBbbbb(bbbbbbb)); + + BbbbBbbbbb bbbb = bbbbbb.bbbBbBbbbBbbbbb("bbbbbbb").bbbBbBbbbBbbbbb("bbbb"); + Bbbbbbbb bbbbbbb = BbbbbBbbbBbbbbbbb.bbbbbb(); + bbb(Bbb.Bbbbb bbbbb : bbbb.bbbbbBbb()) { + bb(bbbbb.bbbBbbbb().bbBbbbBbbbb()) { + bbbbb.bbbBbbbb().bbbBbBbbbBbbbb().bbbBbbb(b -> { + BbbbBbbbbb bbbb = b.bbbBbBbbbBbbbbb(); + Bbb bbb = Bbb.bbbbbbb() + .bbbbbb(bbbb.bbb("bbbbbb").bbbBbBbbbbb()) + .bbbbbbbbb(BbbbbBbbbBbbb.bbbbb(bbbb.bbb("bbbbbbbbb").bbbBbBbbbbb())) + .bbbbb(); + + bbbbbbb.bbb(BBBB.bbbbBbbbbb(bbbbb.bbbBbb()), bbb); }); } } - builder.bids(mapping); - return builder.build(); + bbbbbbb.bbbb(bbbbbbb); + bbbbbb bbbbbbb.bbbbb(); } - public static class BungeeAuctionBuilder implements AuctionBuilder { - - private UUID id = UUID.randomUUID(); - private UUID lister; - private JsonStoredEntry entry; - private LocalDateTime published = LocalDateTime.now(); - private LocalDateTime expiration; - private double start; - private float increment; - private double current; - private Multimap bids; - - @Override - public AuctionBuilder id(UUID id) { - this.id = id; - return this; + bbbbbb bbbbbb bbbbb BbbbbbBbbbbbbBbbbbbb bbbbbbbbbb BbbbbbbBbbbbbb { + + bbbbbbb BBBB bb = BBBB.bbbbbbBBBB(); + bbbbbbb BBBB bbbbbb; + bbbbbbb BbbbBbbbbbBbbbb bbbbb; + bbbbbbb BbbbbBbbbBbbb bbbbbbbbb = BbbbbBbbbBbbb.bbb(); + bbbbbbb BbbbbBbbbBbbb bbbbbbbbbb; + bbbbbbb bbbbbb bbbbb; + bbbbbbb bbbbb bbbbbbbbb; + bbbbbbb bbbbbb bbbbbbb; + bbbbbbb Bbbbbbbb bbbb; + + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bb(BBBB bb) { + bbbb.bb = bb; + bbbbbb bbbb; } - @Override - public AuctionBuilder lister(UUID lister) { - this.lister = lister; - return this; + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bbbbbb(BBBB bbbbbb) { + bbbb.bbbbbb = bbbbbb; + bbbbbb bbbb; } - @Override - public AuctionBuilder entry(Entry entry) { - Preconditions.checkArgument(entry instanceof JsonStoredEntry, "Mixing of invalid types!"); - this.entry = (JsonStoredEntry) entry; - return this; + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bbbbb(Bbbbb bbbbb) { + Bbbbbbbbbbbbb.bbbbbBbbbbbbb(bbbbb bbbbbbbbbb BbbbBbbbbbBbbbb, "Bbbbbb bb bbbbbbb bbbbb!"); + bbbb.bbbbb = (BbbbBbbbbbBbbbb) bbbbb; + bbbbbb bbbb; } - @Override - public AuctionBuilder published(LocalDateTime published) { - this.published = published; - return this; + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bbbbbbbbb(BbbbbBbbbBbbb bbbbbbbbb) { + bbbb.bbbbbbbbb = bbbbbbbbb; + bbbbbb bbbb; } - @Override - public AuctionBuilder expiration(LocalDateTime expiration) { - this.expiration = expiration; - return this; + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bbbbbbbbbb(BbbbbBbbbBbbb bbbbbbbbbb) { + bbbb.bbbbbbbbbb = bbbbbbbbbb; + bbbbbb bbbb; } - @Override - public AuctionBuilder start(double amount) { - this.start = amount; - return this; + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bbbbb(bbbbbb bbbbbb) { + bbbb.bbbbb = bbbbbb; + bbbbbb bbbb; } - @Override - public AuctionBuilder increment(float rate) { - this.increment = rate; - return this; + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bbbbbbbbb(bbbbb bbbb) { + bbbb.bbbbbbbbb = bbbb; + bbbbbb bbbb; } - @Override - public AuctionBuilder current(double current) { - this.current = current; - return this; + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bbbbbbb(bbbbbb bbbbbbb) { + bbbb.bbbbbbb = bbbbbbb; + bbbbbb bbbb; } - @Override - public AuctionBuilder bids(Multimap bids) { - this.bids = bids; - return this; + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bbbb(Bbbbbbbb bbbb) { + bbbb.bbbb = bbbb; + bbbbbb bbbb; } - @Override - public AuctionBuilder from(Auction input) { - Preconditions.checkArgument(input instanceof BungeeAuction, "Mixing of invalid types!"); - this.id = input.getID(); - this.lister = input.getLister(); - this.entry = (JsonStoredEntry) input.getEntry(); - this.published = input.getPublishTime(); - this.expiration = input.getExpiration(); - this.start = input.getStartingPrice(); - this.increment = input.getIncrement(); - this.current = input.getCurrentPrice(); - - return this; + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbb bbbb(Bbbbbbb bbbbb) { + Bbbbbbbbbbbbb.bbbbbBbbbbbbb(bbbbb bbbbbbbbbb BbbbbbBbbbbbb, "Bbbbbb bb bbbbbbb bbbbb!"); + bbbb.bb = bbbbb.bbbBB(); + bbbb.bbbbbb = bbbbb.bbbBbbbbb(); + bbbb.bbbbb = (BbbbBbbbbbBbbbb) bbbbb.bbbBbbbb(); + bbbb.bbbbbbbbb = bbbbb.bbbBbbbbbbBbbb(); + bbbb.bbbbbbbbbb = bbbbb.bbbBbbbbbbbbb(); + bbbb.bbbbb = bbbbb.bbbBbbbbbbbBbbbb(); + bbbb.bbbbbbbbb = bbbbb.bbbBbbbbbbbb(); + bbbb.bbbbbbb = bbbbb.bbbBbbbbbbBbbbb(); + + bbbbbb bbbb; } - @Override - public BungeeAuction build() { - return new BungeeAuction(this); + @Bbbbbbbb + bbbbbb BbbbbbBbbbbbb bbbbb() { + bbbbbb bbb BbbbbbBbbbbbb(bbbb); } } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeBIN.java b/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeBIN.java index d62f3d98..bef5db75 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeBIN.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeBIN.java @@ -1,168 +1,168 @@ -package net.impactdev.gts.bungee.listings; - -import com.google.common.base.Preconditions; -import com.google.gson.JsonObject; -import net.impactdev.gts.api.listings.buyitnow.BuyItNow; -import net.impactdev.gts.api.listings.entries.Entry; -import net.impactdev.gts.api.listings.prices.Price; -import net.impactdev.gts.common.listings.JsonStoredEntry; -import net.impactdev.gts.common.listings.JsonStoredPrice; -import net.impactdev.impactor.api.json.factory.JObject; - -import java.time.LocalDateTime; -import java.util.UUID; - -public class BungeeBIN extends BungeeListing implements BuyItNow { - - private final JsonStoredPrice price; - private boolean purchased; - - private final UUID purchaser; - private final boolean stashed; - - public BungeeBIN(BungeeBINBuilder builder) { - super(builder.id, builder.lister, builder.entry, builder.expiration); - this.price = builder.price; - this.purchased = builder.purchased; - this.stashed = builder.stashed; - this.purchaser = builder.purchaser; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb; + +bbbbbb bbb.bbbbbb.bbbbbb.bbbb.Bbbbbbbbbbbbb; +bbbbbb bbb.bbbbbb.bbbb.BbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbbb.BbbBbBbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb.BbbbBbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb.BbbbBbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbb.bbbbbbb.BBbbbbb; + +bbbbbb bbbb.bbbb.BbbbbBbbbBbbb; +bbbbbb bbbb.bbbb.BBBB; + +bbbbbb bbbbb BbbbbbBBB bbbbbbb BbbbbbBbbbbbb bbbbbbbbbb BbbBbBbb { + + bbbbbbb bbbbb BbbbBbbbbbBbbbb bbbbb; + bbbbbbb bbbbbbb bbbbbbbbb; + + bbbbbbb bbbbb BBBB bbbbbbbbb; + bbbbbbb bbbbb bbbbbbb bbbbbbb; + + bbbbbb BbbbbbBBB(BbbbbbBBBBbbbbbb bbbbbbb) { + bbbbb(bbbbbbb.bb, bbbbbbb.bbbbbb, bbbbbbb.bbbbb, bbbbbbb.bbbbbbbbbb); + bbbb.bbbbb = bbbbbbb.bbbbb; + bbbb.bbbbbbbbb = bbbbbbb.bbbbbbbbb; + bbbb.bbbbbbb = bbbbbbb.bbbbbbb; + bbbb.bbbbbbbbb = bbbbbbb.bbbbbbbbb; } - @Override - public Price getPrice() { - return this.price; + @Bbbbbbbb + bbbbbb Bbbbb bbbBbbbb() { + bbbbbb bbbb.bbbbb; } - @Override - public UUID purchaser() { - return this.purchaser; + @Bbbbbbbb + bbbbbb BBBB bbbbbbbbb() { + bbbbbb bbbb.bbbbbbbbb; } - @Override - public boolean stashedForPurchaser() { - return this.stashed; + @Bbbbbbbb + bbbbbb bbbbbbb bbbbbbbBbbBbbbbbbbb() { + bbbbbb bbbb.bbbbbbb; } - @Override - public boolean isPurchased() { - return this.purchased; + @Bbbbbbbb + bbbbbb bbbbbbb bbBbbbbbbbb() { + bbbbbb bbbb.bbbbbbbbb; } - @Override - public void markPurchased() { - this.purchased = true; + @Bbbbbbbb + bbbbbb bbbb bbbbBbbbbbbbb() { + bbbb.bbbbbbbbb = bbbb; } - @Override - public JObject serialize() { - JObject json = super.serialize(); - json.add("price", this.price.getPrice()); - json.add("type", "bin"); + @Bbbbbbbb + bbbbbb BBbbbbb bbbbbbbbb() { + BBbbbbb bbbb = bbbbb.bbbbbbbbb(); + bbbb.bbb("bbbbb", bbbb.bbbbb.bbbBbbbb()); + bbbb.bbb("bbbb", "bbb"); - json.add("stashed", this.stashed); - if(this.stashed) { - json.add("purchaser", this.purchaser.toString()); + bbbb.bbb("bbbbbbb", bbbb.bbbbbbb); + bb(bbbb.bbbbbbb) { + bbbb.bbb("bbbbbbbbb", bbbb.bbbbbbbbb.bbBbbbbb()); } - return json; + bbbbbb bbbb; } - public static BungeeBIN deserialize(JsonObject json) { - BungeeBINBuilder builder = (BungeeBINBuilder) BuyItNow.builder() - .id(UUID.fromString(json.get("id").getAsString())) - .lister(UUID.fromString(json.get("lister").getAsString())) - .expiration(LocalDateTime.parse(json.getAsJsonObject("timings").get("expiration").getAsString())); + bbbbbb bbbbbb BbbbbbBBB bbbbbbbbbbb(BbbbBbbbbb bbbb) { + BbbbbbBBBBbbbbbb bbbbbbb = (BbbbbbBBBBbbbbbb) BbbBbBbb.bbbbbbb() + .bb(BBBB.bbbbBbbbbb(bbbb.bbb("bb").bbbBbBbbbbb())) + .bbbbbb(BBBB.bbbbBbbbbb(bbbb.bbb("bbbbbb").bbbBbBbbbbb())) + .bbbbbbbbbb(BbbbbBbbbBbbb.bbbbb(bbbb.bbbBbBbbbBbbbbb("bbbbbbb").bbb("bbbbbbbbbb").bbbBbBbbbbb())); - JsonObject element = json.getAsJsonObject("entry"); - builder.entry(new JsonStoredEntry(element)); + BbbbBbbbbb bbbbbbb = bbbb.bbbBbBbbbBbbbbb("bbbbb"); + bbbbbbb.bbbbb(bbb BbbbBbbbbbBbbbb(bbbbbbb)); - JsonObject price = json.getAsJsonObject("price"); - builder.price(new JsonStoredPrice(price)); - if(price.has("purchased") && price.get("purchased").getAsBoolean()) { - builder.purchased(); + BbbbBbbbbb bbbbb = bbbb.bbbBbBbbbBbbbbb("bbbbb"); + bbbbbbb.bbbbb(bbb BbbbBbbbbbBbbbb(bbbbb)); + bb(bbbbb.bbb("bbbbbbbbb") && bbbbb.bbb("bbbbbbbbb").bbbBbBbbbbbb()) { + bbbbbbb.bbbbbbbbb(); } - if(json.get("stashed").getAsBoolean()) { - builder.stashedForPurchaser(); - builder.purchaser(UUID.fromString(json.get("purchaser").getAsString())); + bb(bbbb.bbb("bbbbbbb").bbbBbBbbbbbb()) { + bbbbbbb.bbbbbbbBbbBbbbbbbbb(); + bbbbbbb.bbbbbbbbb(BBBB.bbbbBbbbbb(bbbb.bbb("bbbbbbbbb").bbbBbBbbbbb())); } - return builder.build(); + bbbbbb bbbbbbb.bbbbb(); } - public static class BungeeBINBuilder implements BuyItNowBuilder { + bbbbbb bbbbbb bbbbb BbbbbbBBBBbbbbbb bbbbbbbbbb BbbBbBbbBbbbbbb { - private UUID id = UUID.randomUUID(); - private UUID lister; - private JsonStoredEntry entry; - private JsonStoredPrice price; - private boolean purchased; - private LocalDateTime expiration; + bbbbbbb BBBB bb = BBBB.bbbbbbBBBB(); + bbbbbbb BBBB bbbbbb; + bbbbbbb BbbbBbbbbbBbbbb bbbbb; + bbbbbbb BbbbBbbbbbBbbbb bbbbb; + bbbbbbb bbbbbbb bbbbbbbbb; + bbbbbbb BbbbbBbbbBbbb bbbbbbbbbb; - private UUID purchaser; - private boolean stashed; + bbbbbbb BBBB bbbbbbbbb; + bbbbbbb bbbbbbb bbbbbbb; - @Override - public BuyItNowBuilder id(UUID id) { - this.id = id; - return this; + @Bbbbbbbb + bbbbbb BbbBbBbbBbbbbbb bb(BBBB bb) { + bbbb.bb = bb; + bbbbbb bbbb; } - @Override - public BuyItNowBuilder lister(UUID lister) { - this.lister = lister; - return this; + @Bbbbbbbb + bbbbbb BbbBbBbbBbbbbbb bbbbbb(BBBB bbbbbb) { + bbbb.bbbbbb = bbbbbb; + bbbbbb bbbb; } - @Override - public BuyItNowBuilder entry(Entry entry) { - Preconditions.checkArgument(entry instanceof JsonStoredEntry, "Mixing of incompatible platform types"); - this.entry = (JsonStoredEntry) entry; - return this; + @Bbbbbbbb + bbbbbb BbbBbBbbBbbbbbb bbbbb(Bbbbb bbbbb) { + Bbbbbbbbbbbbb.bbbbbBbbbbbbb(bbbbb bbbbbbbbbb BbbbBbbbbbBbbbb, "Bbbbbb bb bbbbbbbbbbbb bbbbbbbb bbbbb"); + bbbb.bbbbb = (BbbbBbbbbbBbbbb) bbbbb; + bbbbbb bbbb; } - @Override - public BuyItNowBuilder price(Price price) { - Preconditions.checkArgument(price instanceof JsonStoredPrice, "Mixing of incompatible platform types"); - this.price = (JsonStoredPrice) price; - return this; + @Bbbbbbbb + bbbbbb BbbBbBbbBbbbbbb bbbbb(Bbbbb bbbbb) { + Bbbbbbbbbbbbb.bbbbbBbbbbbbb(bbbbb bbbbbbbbbb BbbbBbbbbbBbbbb, "Bbbbbb bb bbbbbbbbbbbb bbbbbbbb bbbbb"); + bbbb.bbbbb = (BbbbBbbbbbBbbbb) bbbbb; + bbbbbb bbbb; } - @Override - public BuyItNowBuilder purchased() { - this.purchased = true; - return this; + @Bbbbbbbb + bbbbbb BbbBbBbbBbbbbbb bbbbbbbbb() { + bbbb.bbbbbbbbb = bbbb; + bbbbbb bbbb; } - @Override - public BuyItNowBuilder purchaser(UUID purchaser) { - this.purchaser = purchaser; - return this; + @Bbbbbbbb + bbbbbb BbbBbBbbBbbbbbb bbbbbbbbb(BBBB bbbbbbbbb) { + bbbb.bbbbbbbbb = bbbbbbbbb; + bbbbbb bbbb; } - @Override - public BuyItNowBuilder stashedForPurchaser() { - this.stashed = true; - return this; + @Bbbbbbbb + bbbbbb BbbBbBbbBbbbbbb bbbbbbbBbbBbbbbbbbb() { + bbbb.bbbbbbb = bbbb; + bbbbbb bbbb; } - @Override - public BuyItNowBuilder expiration(LocalDateTime expiration) { - this.expiration = expiration; - return this; + @Bbbbbbbb + bbbbbb BbbBbBbbBbbbbbb bbbbbbbbbb(BbbbbBbbbBbbb bbbbbbbbbb) { + bbbb.bbbbbbbbbb = bbbbbbbbbb; + bbbbbb bbbb; } - @Override - public BuyItNowBuilder from(BuyItNow input) { - return this.id(input.getID()) - .lister(input.getLister()) - .entry(input.getEntry()) - .price(input.getPrice()) - .expiration(input.getExpiration()); + @Bbbbbbbb + bbbbbb BbbBbBbbBbbbbbb bbbb(BbbBbBbb bbbbb) { + bbbbbb bbbb.bb(bbbbb.bbbBB()) + .bbbbbb(bbbbb.bbbBbbbbb()) + .bbbbb(bbbbb.bbbBbbbb()) + .bbbbb(bbbbb.bbbBbbbb()) + .bbbbbbbbbb(bbbbb.bbbBbbbbbbbbb()); } - @Override - public BungeeBIN build() { - return new BungeeBIN(this); + @Bbbbbbbb + bbbbbb BbbbbbBBB bbbbb() { + bbbbbb bbb BbbbbbBBB(bbbb); } } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeListing.java b/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeListing.java index 875f2389..7c93a9bc 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeListing.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/listings/BungeeListing.java @@ -1,79 +1,79 @@ -package net.impactdev.gts.bungee.listings; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb; -import net.impactdev.gts.api.listings.Listing; -import net.impactdev.gts.api.listings.entries.Entry; -import net.impactdev.gts.common.listings.JsonStoredEntry; -import net.impactdev.impactor.api.json.factory.JObject; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb.BbbbBbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbb.bbbbbbb.BBbbbbb; -import java.time.LocalDateTime; -import java.util.UUID; +bbbbbb bbbb.bbbb.BbbbbBbbbBbbb; +bbbbbb bbbb.bbbb.BBBB; -public abstract class BungeeListing implements Listing { +bbbbbb bbbbbbbb bbbbb BbbbbbBbbbbbb bbbbbbbbbb Bbbbbbb { - private final UUID id; - private final UUID lister; - private final JsonStoredEntry entry; - private final LocalDateTime published; - private LocalDateTime expiration; + bbbbbbb bbbbb BBBB bb; + bbbbbbb bbbbb BBBB bbbbbb; + bbbbbbb bbbbb BbbbBbbbbbBbbbb bbbbb; + bbbbbbb bbbbb BbbbbBbbbBbbb bbbbbbbbb; + bbbbbbb BbbbbBbbbBbbb bbbbbbbbbb; - public BungeeListing(UUID id, UUID lister, JsonStoredEntry entry, LocalDateTime expiration) { - this(id, lister, entry, LocalDateTime.now(), expiration); + bbbbbb BbbbbbBbbbbbb(BBBB bb, BBBB bbbbbb, BbbbBbbbbbBbbbb bbbbb, BbbbbBbbbBbbb bbbbbbbbbb) { + bbbb(bb, bbbbbb, bbbbb, BbbbbBbbbBbbb.bbb(), bbbbbbbbbb); } - public BungeeListing(UUID id, UUID lister, JsonStoredEntry entry, LocalDateTime published, LocalDateTime expiration) { - this.id = id; - this.lister = lister; - this.entry = entry; - this.published = published; - this.expiration = expiration; + bbbbbb BbbbbbBbbbbbb(BBBB bb, BBBB bbbbbb, BbbbBbbbbbBbbbb bbbbb, BbbbbBbbbBbbb bbbbbbbbb, BbbbbBbbbBbbb bbbbbbbbbb) { + bbbb.bb = bb; + bbbb.bbbbbb = bbbbbb; + bbbb.bbbbb = bbbbb; + bbbb.bbbbbbbbb = bbbbbbbbb; + bbbb.bbbbbbbbbb = bbbbbbbbbb; } - @Override - public UUID getID() { - return this.id; + @Bbbbbbbb + bbbbbb BBBB bbbBB() { + bbbbbb bbbb.bb; } - @Override - public UUID getLister() { - return this.lister; + @Bbbbbbbb + bbbbbb BBBB bbbBbbbbb() { + bbbbbb bbbb.bbbbbb; } - @Override - public Entry getEntry() { - return this.entry; + @Bbbbbbbb + bbbbbb Bbbbb bbbBbbbb() { + bbbbbb bbbb.bbbbb; } - @Override - public LocalDateTime getPublishTime() { - return this.published; + @Bbbbbbbb + bbbbbb BbbbbBbbbBbbb bbbBbbbbbbBbbb() { + bbbbbb bbbb.bbbbbbbbb; } - @Override - public LocalDateTime getExpiration() { - return this.expiration; + @Bbbbbbbb + bbbbbb BbbbbBbbbBbbb bbbBbbbbbbbbb() { + bbbbbb bbbb.bbbbbbbbbb; } - @Override - public void setExpiration(LocalDateTime expiration) { - this.expiration = expiration; + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbbbb(BbbbbBbbbBbbb bbbbbbbbbb) { + bbbb.bbbbbbbbbb = bbbbbbbbbb; } - @Override - public int getVersion() { - return 1; + @Bbbbbbbb + bbbbbb bbb bbbBbbbbbb() { + bbbbbb 1; } - @Override - public JObject serialize() { - JObject timings = new JObject() - .add("published", this.getPublishTime().toString()) - .add("expiration", this.getExpiration().toString()); + @Bbbbbbbb + bbbbbb BBbbbbb bbbbbbbbb() { + BBbbbbb bbbbbbb = bbb BBbbbbb() + .bbb("bbbbbbbbb", bbbb.bbbBbbbbbbBbbb().bbBbbbbb()) + .bbb("bbbbbbbbbb", bbbb.bbbBbbbbbbbbb().bbBbbbbb()); - return new JObject() - .add("id", this.getID().toString()) - .add("lister", this.getLister().toString()) - .add("version", this.getVersion()) - .add("timings", timings) - .add("entry", this.entry.getOrCreateElement()); + bbbbbb bbb BBbbbbb() + .bbb("bb", bbbb.bbbBB().bbBbbbbb()) + .bbb("bbbbbb", bbbb.bbbBbbbbb().bbBbbbbb()) + .bbb("bbbbbbb", bbbb.bbbBbbbbbb()) + .bbb("bbbbbbb", bbbbbbb) + .bbb("bbbbb", bbbb.bbbbb.bbbBbBbbbbbBbbbbbb()); } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/BungeeMessagingFactory.java b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/BungeeMessagingFactory.java index 668ad05f..afbff204 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/BungeeMessagingFactory.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/BungeeMessagingFactory.java @@ -1,88 +1,88 @@ -package net.impactdev.gts.bungee.messaging; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb; -import net.impactdev.gts.api.messaging.IncomingMessageConsumer; -import net.impactdev.gts.api.messaging.Messenger; -import net.impactdev.gts.api.messaging.MessengerProvider; -import net.impactdev.gts.bungee.GTSBungeePlugin; -import net.impactdev.gts.bungee.messaging.processor.BungeeIncomingMessageConsumer; -import net.impactdev.gts.bungee.messaging.types.PluginMessageMessenger; -import net.impactdev.gts.bungee.messaging.types.RedisBungeeMessenger; -import net.impactdev.gts.common.config.ConfigKeys; -import net.impactdev.gts.common.messaging.GTSMessagingService; -import net.impactdev.gts.common.messaging.InternalMessagingService; -import net.impactdev.gts.common.messaging.MessagingFactory; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.BBBBbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbb.BbbbbbBbbbbbbbBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbb.BbbbbbBbbbbbbBbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbb.BbbbbBbbbbbBbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.BBBBbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.BbbbbbbbBbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.BbbbbbbbbBbbbbbb; -import org.checkerframework.checker.nullness.qual.NonNull; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; -public class BungeeMessagingFactory extends MessagingFactory { +bbbbbb bbbbb BbbbbbBbbbbbbbbBbbbbbb bbbbbbb BbbbbbbbbBbbbbbb { - public BungeeMessagingFactory(GTSBungeePlugin plugin) { - super(plugin); + bbbbbb BbbbbbBbbbbbbbbBbbbbbb(BBBBbbbbbBbbbbb bbbbbb) { + bbbbb(bbbbbb); } - @Override - protected InternalMessagingService getServiceFor(String messageType) { - if(messageType.equalsIgnoreCase("pluginmsg") || messageType.equalsIgnoreCase("bungee")) { - try { - return new GTSMessagingService(this.getPlugin(), new PluginMessageMessengerProvider(), new BungeeIncomingMessageConsumer(this.getPlugin())); - } catch (Exception e) { - e.printStackTrace(); + @Bbbbbbbb + bbbbbbbbb BbbbbbbbBbbbbbbbbBbbbbbb bbbBbbbbbbBbb(Bbbbbb bbbbbbbBbbb) { + bb(bbbbbbbBbbb.bbbbbbBbbbbbBbbb("bbbbbbbbb") || bbbbbbbBbbb.bbbbbbBbbbbbBbbb("bbbbbb")) { + bbb { + bbbbbb bbb BBBBbbbbbbbbBbbbbbb(bbbb.bbbBbbbbb(), bbb BbbbbbBbbbbbbBbbbbbbbbBbbbbbbb(), bbb BbbbbbBbbbbbbbBbbbbbbBbbbbbbb(bbbb.bbbBbbbbb())); + } bbbbb (Bbbbbbbbb b) { + b.bbbbbBbbbbBbbbb(); } - } else if(messageType.equalsIgnoreCase("redisbungee")) { - if(this.getPlugin().bootstrap().proxy().getProxy().getPluginManager().getPlugin("RedisBungee") == null) { - this.getPlugin().logger().warn("RedisBungee plugin is not present"); - } else { - try { - return new GTSMessagingService(this.getPlugin(), new RedisBungeeMessengerProvider(), new BungeeIncomingMessageConsumer(this.getPlugin())); - } catch (Exception e) { - e.printStackTrace(); + } bbbb bb(bbbbbbbBbbb.bbbbbbBbbbbbBbbb("bbbbbbbbbbb")) { + bb(bbbb.bbbBbbbbb().bbbbbbbbb().bbbbb().bbbBbbbb().bbbBbbbbbBbbbbbb().bbbBbbbbb("BbbbbBbbbbb") == bbbb) { + bbbb.bbbBbbbbb().bbbbbb().bbbb("BbbbbBbbbbb bbbbbb bb bbb bbbbbbb"); + } bbbb { + bbb { + bbbbbb bbb BBBBbbbbbbbbBbbbbbb(bbbb.bbbBbbbbb(), bbb BbbbbBbbbbbBbbbbbbbbBbbbbbbb(), bbb BbbbbbBbbbbbbbBbbbbbbBbbbbbbb(bbbb.bbbBbbbbb())); + } bbbbb (Bbbbbbbbb b) { + b.bbbbbBbbbbBbbbb(); } } } - if(messageType.equalsIgnoreCase("redis")) { - if(this.getPlugin().configuration().main().get(ConfigKeys.REDIS_ENABLED)) { - try { - return new GTSMessagingService(this.getPlugin(), new RedisMessengerProvider(), new BungeeIncomingMessageConsumer(this.getPlugin())); - } catch (Exception e) { - e.printStackTrace(); + bb(bbbbbbbBbbb.bbbbbbBbbbbbBbbb("bbbbb")) { + bb(bbbb.bbbBbbbbb().bbbbbbbbbbbbb().bbbb().bbb(BbbbbbBbbb.BBBBB_BBBBBBB)) { + bbb { + bbbbbb bbb BBBBbbbbbbbbBbbbbbb(bbbb.bbbBbbbbb(), bbb BbbbbBbbbbbbbbBbbbbbbb(), bbb BbbbbbBbbbbbbbBbbbbbbBbbbbbbb(bbbb.bbbBbbbbb())); + } bbbbb (Bbbbbbbbb b) { + b.bbbbbBbbbbBbbbb(); } - } else { - this.getPlugin().logger().warn("Messaging Service was set to redis, but redis is not enabled!"); + } bbbb { + bbbb.bbbBbbbbb().bbbbbb().bbbb("Bbbbbbbbb Bbbbbbb bbb bbb bb bbbbb, bbb bbbbb bb bbb bbbbbbb!"); } } - return null; + bbbbbb bbbb; } - private class PluginMessageMessengerProvider implements MessengerProvider { + bbbbbbb bbbbb BbbbbbBbbbbbbBbbbbbbbbBbbbbbbb bbbbbbbbbb BbbbbbbbbBbbbbbbb { - @Override - public @NonNull String getName() { - return "PluginMessage"; + @Bbbbbbbb + bbbbbb @BbbBbbb Bbbbbb bbbBbbb() { + bbbbbb "BbbbbbBbbbbbb"; } - @Override - public @NonNull Messenger obtain(@NonNull IncomingMessageConsumer incomingMessageConsumer) { - PluginMessageMessenger messenger = new PluginMessageMessenger(getPlugin(), incomingMessageConsumer); - messenger.init(); - return messenger; + @Bbbbbbbb + bbbbbb @BbbBbbb Bbbbbbbbb bbbbbb(@BbbBbbb BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbbBbbbbbbBbbbbbbb) { + BbbbbbBbbbbbbBbbbbbbbb bbbbbbbbb = bbb BbbbbbBbbbbbbBbbbbbbbb(bbbBbbbbb(), bbbbbbbbBbbbbbbBbbbbbbb); + bbbbbbbbb.bbbb(); + bbbbbb bbbbbbbbb; } } - private class RedisBungeeMessengerProvider implements MessengerProvider { + bbbbbbb bbbbb BbbbbBbbbbbBbbbbbbbbBbbbbbbb bbbbbbbbbb BbbbbbbbbBbbbbbbb { - @Override - public @NonNull String getName() { - return "RedisBungee"; + @Bbbbbbbb + bbbbbb @BbbBbbb Bbbbbb bbbBbbb() { + bbbbbb "BbbbbBbbbbb"; } - @Override - public @NonNull Messenger obtain(@NonNull IncomingMessageConsumer incomingMessageConsumer) { - RedisBungeeMessenger messenger = new RedisBungeeMessenger(getPlugin(), incomingMessageConsumer); - messenger.init(); - return messenger; + @Bbbbbbbb + bbbbbb @BbbBbbb Bbbbbbbbb bbbbbb(@BbbBbbb BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbbBbbbbbbBbbbbbbb) { + BbbbbBbbbbbBbbbbbbbb bbbbbbbbb = bbb BbbbbBbbbbbBbbbbbbbb(bbbBbbbbb(), bbbbbbbbBbbbbbbBbbbbbbb); + bbbbbbbbb.bbbb(); + bbbbbb bbbbbbbbb; } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeAdminInterpreters.java b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeAdminInterpreters.java index 76776846..c393d22b 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeAdminInterpreters.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeAdminInterpreters.java @@ -1,39 +1,39 @@ -package net.impactdev.gts.bungee.messaging.interpreters; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb; -import net.impactdev.gts.api.messaging.IncomingMessageConsumer; -import net.impactdev.gts.common.messaging.interpreters.Interpreter; -import net.impactdev.gts.common.messaging.messages.admin.ForceDeleteMessageImpl; -import net.impactdev.gts.common.plugin.GTSPlugin; -import net.impactdev.gts.common.utils.exceptions.ExceptionWriter; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb.Bbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbb.bbbbb.BbbbbBbbbbbBbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BBBBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbb.bbbbbbbbbb.BbbbbbbbbBbbbbb; -public class BungeeAdminInterpreters implements Interpreter { +bbbbbb bbbbb BbbbbbBbbbbBbbbbbbbbbbb bbbbbbbbbb Bbbbbbbbbbb { - @Override - public void register(GTSPlugin plugin) { - this.getDecoders(plugin); - this.getInterpreters(plugin); + @Bbbbbbbb + bbbbbb bbbb bbbbbbbb(BBBBbbbbb bbbbbb) { + bbbb.bbbBbbbbbbb(bbbbbb); + bbbb.bbbBbbbbbbbbbbb(bbbbbb); } - @Override - public void getDecoders(GTSPlugin plugin) { - plugin.messagingService().registerDecoder( - ForceDeleteMessageImpl.ForceDeleteRequest.TYPE, ForceDeleteMessageImpl.ForceDeleteRequest::decode + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbb(BBBBbbbbb bbbbbb) { + bbbbbb.bbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbb( + BbbbbBbbbbbBbbbbbbBbbb.BbbbbBbbbbbBbbbbbb.BBBB, BbbbbBbbbbbBbbbbbbBbbb.BbbbbBbbbbbBbbbbbb::bbbbbb ); } - @Override - public void getInterpreters(GTSPlugin plugin) { - final IncomingMessageConsumer consumer = plugin.messagingService().getMessenger().getMessageConsumer(); + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbbbbbb(BBBBbbbbb bbbbbb) { + bbbbb BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbb = bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbBbbbbbbBbbbbbbb(); - consumer.registerInternalConsumer( - ForceDeleteMessageImpl.ForceDeleteRequest.class, request -> { - request.respond().thenAccept(response -> { - GTSPlugin.instance().messagingService().getMessenger().sendOutgoingMessage(response); - GTSPlugin.instance().logger().info("Response sent"); + bbbbbbbb.bbbbbbbbBbbbbbbbBbbbbbbb( + BbbbbBbbbbbBbbbbbbBbbb.BbbbbBbbbbbBbbbbbb.bbbbb, bbbbbbb -> { + bbbbbbb.bbbbbbb().bbbbBbbbbb(bbbbbbbb -> { + BBBBbbbbb.bbbbbbbb().bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbbBbbbbbbbBbbbbbb(bbbbbbbb); + BBBBbbbbb.bbbbbbbb().bbbbbb().bbbb("Bbbbbbbb bbbb"); }) - .exceptionally(e -> { - ExceptionWriter.write(e); - return null; + .bbbbbbbbbbbbb(b -> { + BbbbbbbbbBbbbbb.bbbbb(b); + bbbbbb bbbb; }); } ); diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeAuctionInterpreter.java b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeAuctionInterpreter.java index 76bb1ec4..117d89d3 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeAuctionInterpreter.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeAuctionInterpreter.java @@ -1,44 +1,44 @@ -package net.impactdev.gts.bungee.messaging.interpreters; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb; -import net.impactdev.gts.api.messaging.IncomingMessageConsumer; -import net.impactdev.gts.common.messaging.interpreters.Interpreter; -import net.impactdev.gts.common.messaging.messages.listings.auctions.impl.AuctionBidMessage; -import net.impactdev.gts.common.messaging.messages.listings.auctions.impl.AuctionCancelMessage; -import net.impactdev.gts.common.plugin.GTSPlugin; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb.Bbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbb.BbbbbbbBbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbb.BbbbbbbBbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BBBBbbbbb; -public class BungeeAuctionInterpreter implements Interpreter { +bbbbbb bbbbb BbbbbbBbbbbbbBbbbbbbbbbb bbbbbbbbbb Bbbbbbbbbbb { - @Override - public void register(GTSPlugin plugin) { - this.getDecoders(plugin); - this.getInterpreters(plugin); + @Bbbbbbbb + bbbbbb bbbb bbbbbbbb(BBBBbbbbb bbbbbb) { + bbbb.bbbBbbbbbbb(bbbbbb); + bbbb.bbbBbbbbbbbbbbb(bbbbbb); } - @Override - public void getDecoders(GTSPlugin plugin) { - plugin.messagingService().registerDecoder( - AuctionBidMessage.Request.TYPE, AuctionBidMessage.Request::decode + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbb(BBBBbbbbb bbbbbb) { + bbbbbb.bbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbb( + BbbbbbbBbbBbbbbbb.Bbbbbbb.BBBB, BbbbbbbBbbBbbbbbb.Bbbbbbb::bbbbbb ); - plugin.messagingService().registerDecoder( - AuctionCancelMessage.Request.TYPE, AuctionCancelMessage.Request::decode + bbbbbb.bbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbb( + BbbbbbbBbbbbbBbbbbbb.Bbbbbbb.BBBB, BbbbbbbBbbbbbBbbbbbb.Bbbbbbb::bbbbbb ); } - @Override - public void getInterpreters(GTSPlugin plugin) { - IncomingMessageConsumer consumer = plugin.messagingService().getMessenger().getMessageConsumer(); + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbbbbbb(BBBBbbbbb bbbbbb) { + BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbb = bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbBbbbbbbBbbbbbbb(); - consumer.registerInternalConsumer( - AuctionBidMessage.Request.class, request -> { - request.respond() - .thenAccept(response -> plugin.messagingService().getMessenger().sendOutgoingMessage(response)); + bbbbbbbb.bbbbbbbbBbbbbbbbBbbbbbbb( + BbbbbbbBbbBbbbbbb.Bbbbbbb.bbbbb, bbbbbbb -> { + bbbbbbb.bbbbbbb() + .bbbbBbbbbb(bbbbbbbb -> bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbbBbbbbbbbBbbbbbb(bbbbbbbb)); } ); - consumer.registerInternalConsumer( - AuctionCancelMessage.Request.class, request -> { - request.respond() - .thenAccept(response -> plugin.messagingService().getMessenger().sendOutgoingMessage(response)); + bbbbbbbb.bbbbbbbbBbbbbbbbBbbbbbbb( + BbbbbbbBbbbbbBbbbbbb.Bbbbbbb.bbbbb, bbbbbbb -> { + bbbbbbb.bbbbbbb() + .bbbbBbbbbb(bbbbbbbb -> bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbbBbbbbbbbBbbbbbb(bbbbbbbb)); } ); } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeBINInterpreters.java b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeBINInterpreters.java index b79fd580..ea58ab0a 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeBINInterpreters.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeBINInterpreters.java @@ -1,42 +1,42 @@ -package net.impactdev.gts.bungee.messaging.interpreters; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb; -import net.impactdev.gts.common.messaging.interpreters.Interpreter; -import net.impactdev.gts.common.messaging.messages.listings.buyitnow.purchase.BINPurchaseMessage; -import net.impactdev.gts.common.messaging.messages.listings.buyitnow.removal.BINRemoveMessage; -import net.impactdev.gts.common.plugin.GTSPlugin; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb.Bbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.BBBBbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbb.BBBBbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BBBBbbbbb; -public class BungeeBINInterpreters implements Interpreter { +bbbbbb bbbbb BbbbbbBBBBbbbbbbbbbbb bbbbbbbbbb Bbbbbbbbbbb { - @Override - public void register(GTSPlugin plugin) { - this.getDecoders(plugin); - this.getInterpreters(plugin); + @Bbbbbbbb + bbbbbb bbbb bbbbbbbb(BBBBbbbbb bbbbbb) { + bbbb.bbbBbbbbbbb(bbbbbb); + bbbb.bbbBbbbbbbbbbbb(bbbbbb); } - @Override - public void getDecoders(GTSPlugin plugin) { - plugin.messagingService().registerDecoder( - BINRemoveMessage.Request.TYPE, BINRemoveMessage.Request::decode + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbb(BBBBbbbbb bbbbbb) { + bbbbbb.bbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbb( + BBBBbbbbbBbbbbbb.Bbbbbbb.BBBB, BBBBbbbbbBbbbbbb.Bbbbbbb::bbbbbb ); - plugin.messagingService().registerDecoder( - BINPurchaseMessage.Request.TYPE, BINPurchaseMessage.Request::decode + bbbbbb.bbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbb( + BBBBbbbbbbbBbbbbbb.Bbbbbbb.BBBB, BBBBbbbbbbbBbbbbbb.Bbbbbbb::bbbbbb ); } - @Override - public void getInterpreters(GTSPlugin plugin) { - plugin.messagingService().getMessenger().getMessageConsumer().registerInternalConsumer( - BINRemoveMessage.Request.class, request -> { - GTSPlugin.instance().storage() - .processListingRemoveRequest(request) - .thenAccept(response -> plugin.messagingService().getMessenger().sendOutgoingMessage(response)); + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbbbbbb(BBBBbbbbb bbbbbb) { + bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbBbbbbbbBbbbbbbb().bbbbbbbbBbbbbbbbBbbbbbbb( + BBBBbbbbbBbbbbbb.Bbbbbbb.bbbbb, bbbbbbb -> { + BBBBbbbbb.bbbbbbbb().bbbbbbb() + .bbbbbbbBbbbbbbBbbbbbBbbbbbb(bbbbbbb) + .bbbbBbbbbb(bbbbbbbb -> bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbbBbbbbbbbBbbbbbb(bbbbbbbb)); } ); - plugin.messagingService().getMessenger().getMessageConsumer().registerInternalConsumer( - BINPurchaseMessage.Request.class, request -> { - GTSPlugin.instance().storage() - .processPurchase(request) - .thenAccept(response -> plugin.messagingService().getMessenger().sendOutgoingMessage(response)); + bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbBbbbbbbBbbbbbbb().bbbbbbbbBbbbbbbbBbbbbbbb( + BBBBbbbbbbbBbbbbbb.Bbbbbbb.bbbbb, bbbbbbb -> { + BBBBbbbbb.bbbbbbbb().bbbbbbb() + .bbbbbbbBbbbbbbb(bbbbbbb) + .bbbbBbbbbb(bbbbbbbb -> bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbbBbbbbbbbBbbbbbb(bbbbbbbb)); } ); } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeListingInterpreter.java b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeListingInterpreter.java index 4e20b9cd..6b5e27a8 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeListingInterpreter.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeeListingInterpreter.java @@ -1,42 +1,42 @@ -package net.impactdev.gts.bungee.messaging.interpreters; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb; -import net.impactdev.gts.api.messaging.IncomingMessageConsumer; -import net.impactdev.gts.api.messaging.message.type.listings.ClaimMessage; -import net.impactdev.gts.api.messaging.message.type.listings.PublishListingMessage; -import net.impactdev.gts.common.messaging.interpreters.Interpreter; -import net.impactdev.gts.common.messaging.messages.listings.ClaimMessageImpl; -import net.impactdev.gts.common.messaging.messages.listings.PublishListingMessageImpl; -import net.impactdev.gts.common.plugin.GTSPlugin; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbb.BbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.bbbbbbbb.BbbbbbbBbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb.Bbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.BbbbbBbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbb.bbbbbbbb.BbbbbbbBbbbbbbBbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BBBBbbbbb; -public class BungeeListingInterpreter implements Interpreter { +bbbbbb bbbbb BbbbbbBbbbbbbBbbbbbbbbbb bbbbbbbbbb Bbbbbbbbbbb { - @Override - public void register(GTSPlugin plugin) { - this.getDecoders(plugin); - this.getInterpreters(plugin); + @Bbbbbbbb + bbbbbb bbbb bbbbbbbb(BBBBbbbbb bbbbbb) { + bbbb.bbbBbbbbbbb(bbbbbb); + bbbb.bbbBbbbbbbbbbbb(bbbbbb); } - @Override - public void getDecoders(GTSPlugin plugin) { - plugin.messagingService().registerDecoder( - PublishListingMessageImpl.TYPE, PublishListingMessageImpl::decode + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbb(BBBBbbbbb bbbbbb) { + bbbbbb.bbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbb( + BbbbbbbBbbbbbbBbbbbbbBbbb.BBBB, BbbbbbbBbbbbbbBbbbbbbBbbb::bbbbbb ); - plugin.messagingService().registerDecoder( - ClaimMessageImpl.ClaimRequestImpl.TYPE, ClaimMessageImpl.ClaimRequestImpl::decode + bbbbbb.bbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbb( + BbbbbBbbbbbbBbbb.BbbbbBbbbbbbBbbb.BBBB, BbbbbBbbbbbbBbbb.BbbbbBbbbbbbBbbb::bbbbbb ); } - @Override - public void getInterpreters(GTSPlugin plugin) { - IncomingMessageConsumer consumer = plugin.messagingService().getMessenger().getMessageConsumer(); + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbbbbbb(BBBBbbbbb bbbbbb) { + BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbb = bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbBbbbbbbBbbbbbbb(); - consumer.registerInternalConsumer( - PublishListingMessageImpl.class, message -> plugin.messagingService().getMessenger().sendOutgoingMessage(message) + bbbbbbbb.bbbbbbbbBbbbbbbbBbbbbbbb( + BbbbbbbBbbbbbbBbbbbbbBbbb.bbbbb, bbbbbbb -> bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbbBbbbbbbbBbbbbbb(bbbbbbb) ); - consumer.registerInternalConsumer( - ClaimMessageImpl.ClaimRequestImpl.class, request -> { - request.respond() - .thenAccept(response -> plugin.messagingService().getMessenger().sendOutgoingMessage(response)); + bbbbbbbb.bbbbbbbbBbbbbbbbBbbbbbbb( + BbbbbBbbbbbbBbbb.BbbbbBbbbbbbBbbb.bbbbb, bbbbbbb -> { + bbbbbbb.bbbbbbb() + .bbbbBbbbbb(bbbbbbbb -> bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbbBbbbbbbbBbbbbbb(bbbbbbbb)); } ); } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeePingPongInterpreter.java b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeePingPongInterpreter.java index ff8755bf..d37243a6 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeePingPongInterpreter.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/interpreters/BungeePingPongInterpreter.java @@ -1,28 +1,28 @@ -package net.impactdev.gts.bungee.messaging.interpreters; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbbbb; -import net.impactdev.gts.common.messaging.messages.utility.PingPongMessage; -import net.impactdev.gts.common.plugin.GTSPlugin; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbb.bbbbbbb.BbbbBbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BBBBbbbbb; -public class BungeePingPongInterpreter { +bbbbbb bbbbb BbbbbbBbbbBbbbBbbbbbbbbbb { - public static void registerDecoders(GTSPlugin plugin) { - plugin.messagingService().registerDecoder(PingPongMessage.Ping.TYPE, PingPongMessage.Ping::decode); + bbbbbb bbbbbb bbbb bbbbbbbbBbbbbbbb(BBBBbbbbb bbbbbb) { + bbbbbb.bbbbbbbbbBbbbbbb().bbbbbbbbBbbbbbb(BbbbBbbbBbbbbbb.Bbbb.BBBB, BbbbBbbbBbbbbbb.Bbbb::bbbbbb); } - public static void registerInterpreters(GTSPlugin plugin) { - plugin.messagingService().getMessenger().getMessageConsumer().registerInternalConsumer( - PingPongMessage.Ping.class, ping -> { - try { - ping.respond() - .thenAccept(pong -> { - GTSPlugin.instance().messagingService().getMessenger().sendOutgoingMessage(pong); + bbbbbb bbbbbb bbbb bbbbbbbbBbbbbbbbbbbb(BBBBbbbbb bbbbbb) { + bbbbbb.bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbBbbbbbbBbbbbbbb().bbbbbbbbBbbbbbbbBbbbbbbb( + BbbbBbbbBbbbbbb.Bbbb.bbbbb, bbbb -> { + bbb { + bbbb.bbbbbbb() + .bbbbBbbbbb(bbbb -> { + BBBBbbbbb.bbbbbbbb().bbbbbbbbbBbbbbbb().bbbBbbbbbbbb().bbbbBbbbbbbbBbbbbbb(bbbb); }) - .exceptionally(error -> { - error.printStackTrace(); - return null; + .bbbbbbbbbbbbb(bbbbb -> { + bbbbb.bbbbbBbbbbBbbbb(); + bbbbbb bbbb; }); - } catch (Exception e) { - e.printStackTrace(); + } bbbbb (Bbbbbbbbb b) { + b.bbbbbBbbbbBbbbb(); } } ); diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/processor/BungeeIncomingMessageConsumer.java b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/processor/BungeeIncomingMessageConsumer.java index cec7834a..5852eed8 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/processor/BungeeIncomingMessageConsumer.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/processor/BungeeIncomingMessageConsumer.java @@ -1,126 +1,126 @@ -package net.impactdev.gts.bungee.messaging.processor; - -import com.google.common.collect.Maps; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import net.impactdev.gts.api.messaging.IncomingMessageConsumer; -import net.impactdev.gts.api.messaging.message.Message; -import net.impactdev.gts.api.messaging.message.MessageConsumer; -import net.impactdev.gts.api.messaging.message.type.MessageType; -import net.impactdev.gts.api.messaging.message.type.UpdateMessage; -import net.impactdev.gts.bungee.GTSBungeePlugin; -import net.impactdev.gts.common.plugin.GTSPlugin; -import net.impactdev.gts.common.utils.exceptions.ExceptionWriter; -import org.checkerframework.checker.nullness.qual.NonNull; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Collections; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import java.util.function.Consumer; - -import static net.impactdev.gts.common.messaging.GTSMessagingService.NORMAL; - -public class BungeeIncomingMessageConsumer implements IncomingMessageConsumer { - - private final GTSBungeePlugin plugin; - private final Set receivedMessages; - - private final Map, MessageConsumer> consumers = Maps.newHashMap(); - - public BungeeIncomingMessageConsumer(GTSBungeePlugin plugin) { - this.plugin = plugin; - this.receivedMessages = Collections.synchronizedSet(new HashSet<>()); +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbb; + +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbb; +bbbbbb bbb.bbbbbb.bbbb.BbbbBbbbbbb; +bbbbbb bbb.bbbbbb.bbbb.BbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbb.BbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.BBBBbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BBBBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbb.bbbbbbbbbb.BbbbbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.Bbbbbbbb; + +bbbbbb bbbb.bbbb.Bbbbbbbbbbb; +bbbbbb bbbb.bbbb.BbbbBbb; +bbbbbb bbbb.bbbb.Bbb; +bbbbbb bbbb.bbbb.Bbbbbbb; +bbbbbb bbbb.bbbb.Bbb; +bbbbbb bbbb.bbbb.BBBB; +bbbbbb bbbb.bbbb.bbbbbbbb.Bbbbbbbb; + +bbbbbb bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.BBBBbbbbbbbbBbbbbbb.BBBBBB; + +bbbbbb bbbbb BbbbbbBbbbbbbbBbbbbbbBbbbbbbb bbbbbbbbbb BbbbbbbbBbbbbbbBbbbbbbb { + + bbbbbbb bbbbb BBBBbbbbbBbbbbb bbbbbb; + bbbbbbb bbbbb Bbb bbbbbbbbBbbbbbbb; + + bbbbbbb bbbbb Bbb, BbbbbbbBbbbbbbb> bbbbbbbbb = Bbbb.bbbBbbbBbb(); + + bbbbbb BbbbbbBbbbbbbbBbbbbbbBbbbbbbb(BBBBbbbbbBbbbbb bbbbbb) { + bbbb.bbbbbb = bbbbbb; + bbbb.bbbbbbbbBbbbbbbb = Bbbbbbbbbbb.bbbbbbbbbbbbBbb(bbb BbbbBbb<>()); } - @Override - public void registerRequest(UUID request, Consumer response) {} + @Bbbbbbbb + bbbbbb bbbb bbbbbbbbBbbbbbb(BBBB bbbbbbb, Bbbbbbbb bbbbbbbb) {} - @Override - public void processRequest(UUID request, T response) {} + @Bbbbbbbb + bbbbbb bbbb bbbbbbbBbbbbbb(BBBB bbbbbbb, B bbbbbbbb) {} - @Override - public void cacheReceivedID(UUID id) { - this.receivedMessages.add(id); + @Bbbbbbbb + bbbbbb bbbb bbbbbBbbbbbbbBB(BBBB bb) { + bbbb.bbbbbbbbBbbbbbbb.bbb(bb); } - @Override - public boolean consumeIncomingMessage(@NonNull Message message) { - Objects.requireNonNull(message, "message"); + @Bbbbbbbb + bbbbbb bbbbbbb bbbbbbbBbbbbbbbBbbbbbb(@BbbBbbb Bbbbbbb bbbbbbb) { + Bbbbbbb.bbbbbbbBbbBbbb(bbbbbbb, "bbbbbbb"); - if (!this.receivedMessages.add(message.getID())) { - return false; + bb (!bbbb.bbbbbbbbBbbbbbbb.bbb(bbbbbbb.bbbBB())) { + bbbbbb bbbbb; } - this.processIncomingMessage(message); - return true; + bbbb.bbbbbbbBbbbbbbbBbbbbbb(bbbbbbb); + bbbbbb bbbb; } - @Override - public boolean consumeIncomingMessageAsString(@NonNull String encodedString) { - Objects.requireNonNull(encodedString, "encodedString"); - JsonObject decodedObject = NORMAL.fromJson(encodedString, JsonObject.class).getAsJsonObject(); + @Bbbbbbbb + bbbbbb bbbbbbb bbbbbbbBbbbbbbbBbbbbbbBbBbbbbb(@BbbBbbb Bbbbbb bbbbbbbBbbbbb) { + Bbbbbbb.bbbbbbbBbbBbbb(bbbbbbbBbbbbb, "bbbbbbbBbbbbb"); + BbbbBbbbbb bbbbbbbBbbbbb = BBBBBB.bbbbBbbb(bbbbbbbBbbbbb, BbbbBbbbbb.bbbbb).bbbBbBbbbBbbbbb(); - // extract id - JsonElement idElement = decodedObject.get("id"); - if (idElement == null) { - throw new IllegalStateException("Incoming message has no id argument: " + encodedString); + // bbbbbbb bb + BbbbBbbbbbb bbBbbbbbb = bbbbbbbBbbbbb.bbb("bb"); + bb (bbBbbbbbb == bbbb) { + bbbbb bbb BbbbbbbBbbbbBbbbbbbbb("Bbbbbbbb bbbbbbb bbb bb bb bbbbbbbb: " + bbbbbbbBbbbbb); } - UUID id = UUID.fromString(idElement.getAsString()); + BBBB bb = BBBB.bbbbBbbbbb(bbBbbbbbb.bbbBbBbbbbb()); - // ensure the message hasn't been received already - if (!this.receivedMessages.add(id)) { - return false; + // bbbbbb bbb bbbbbbb bbbb'b bbbb bbbbbbbb bbbbbbb + bb (!bbbb.bbbbbbbbBbbbbbbb.bbb(bb)) { + bbbbbb bbbbb; } - // extract type - JsonElement typeElement = decodedObject.get("type"); - if (typeElement == null) { - throw new IllegalStateException("Incoming message has no type argument: " + encodedString); + // bbbbbbb bbbb + BbbbBbbbbbb bbbbBbbbbbb = bbbbbbbBbbbbb.bbb("bbbb"); + bb (bbbbBbbbbbb == bbbb) { + bbbbb bbb BbbbbbbBbbbbBbbbbbbbb("Bbbbbbbb bbbbbbb bbb bb bbbb bbbbbbbb: " + bbbbbbbBbbbbb); } - String type = typeElement.getAsString(); + Bbbbbb bbbb = bbbbBbbbbbb.bbbBbBbbbbb(); - // extract content - @Nullable JsonElement content = decodedObject.get("content"); + // bbbbbbb bbbbbbb + @Bbbbbbbb BbbbBbbbbbb bbbbbbb = bbbbbbbBbbbbb.bbb("bbbbbbb"); - try { - // decode message - Message decoded = GTSPlugin.instance().messagingService().getDecoder(type).apply(content, id); - if (decoded == null) { - return false; + bbb { + // bbbbbb bbbbbbb + Bbbbbbb bbbbbbb = BBBBbbbbb.bbbbbbbb().bbbbbbbbbBbbbbbb().bbbBbbbbbb(bbbb).bbbbb(bbbbbbb, bb); + bb (bbbbbbb == bbbb) { + bbbbbb bbbbb; } - // consume the message - this.processIncomingMessage(decoded); - return true; - } catch (Exception e) { - GTSPlugin.instance().logger().error("Failed to read message of type: " + type); - ExceptionWriter.write(e); - return false; + // bbbbbbb bbb bbbbbbb + bbbb.bbbbbbbBbbbbbbbBbbbbbb(bbbbbbb); + bbbbbb bbbb; + } bbbbb (Bbbbbbbbb b) { + BBBBbbbbb.bbbbbbbb().bbbbbb().bbbbb("Bbbbbb bb bbbb bbbbbbb bb bbbb: " + bbbb); + BbbbbbbbbBbbbbb.bbbbb(b); + bbbbbb bbbbb; } } - @Override - public void registerInternalConsumer(Class parent, MessageConsumer consumer) { - this.consumers.put(parent, consumer); + @Bbbbbbbb + bbbbbb bbbb bbbbbbbbBbbbbbbbBbbbbbbb(Bbbbb bbbbbb, BbbbbbbBbbbbbbb bbbbbbbb) { + bbbb.bbbbbbbbb.bbb(bbbbbb, bbbbbbbb); } - @Override - public MessageConsumer getInternalConsumer(Class parent) { - return this.consumers.get(parent); + @Bbbbbbbb + bbbbbb BbbbbbbBbbbbbbb bbbBbbbbbbbBbbbbbbb(Bbbbb bbbbbb) { + bbbbbb bbbb.bbbbbbbbb.bbb(bbbbbb); } - @SuppressWarnings("unchecked") - private void processIncomingMessage(Message message) { - if (message instanceof UpdateMessage) { - UpdateMessage msg = (UpdateMessage) message; - this.plugin.logger().info("[Messaging] Received message with id: " + msg.getID()); - this.getInternalConsumer(msg.getClass()).consume(message); - } else { - throw new IllegalArgumentException("Unknown message type: " + message.getClass().getName()); + @BbbbbbbbBbbbbbbb("bbbbbbbbb") + bbbbbbb bbbb bbbbbbbBbbbbbbbBbbbbbb(Bbbbbbb bbbbbbb) { + bb (bbbbbbb bbbbbbbbbb BbbbbbBbbbbbb) { + BbbbbbBbbbbbb bbb = (BbbbbbBbbbbbb) bbbbbbb; + bbbb.bbbbbb.bbbbbb().bbbb("[Bbbbbbbbb] Bbbbbbbb bbbbbbb bbbb bb: " + bbb.bbbBB()); + bbbb.bbbBbbbbbbbBbbbbbbb(bbb.bbbBbbbb()).bbbbbbb(bbbbbbb); + } bbbb { + bbbbb bbb BbbbbbbBbbbbbbbBbbbbbbbb("Bbbbbbb bbbbbbb bbbb: " + bbbbbbb.bbbBbbbb().bbbBbbb()); } } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/types/PluginMessageMessenger.java b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/types/PluginMessageMessenger.java index b8388e63..0a6bc081 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/types/PluginMessageMessenger.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/types/PluginMessageMessenger.java @@ -1,80 +1,80 @@ -package net.impactdev.gts.bungee.messaging.types; - -import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; -import net.impactdev.gts.api.messaging.IncomingMessageConsumer; -import net.impactdev.gts.api.messaging.Messenger; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.bungee.GTSBungeePlugin; -import net.md_5.bungee.api.ProxyServer; -import net.md_5.bungee.api.connection.ProxiedPlayer; -import net.md_5.bungee.api.event.PluginMessageEvent; -import net.md_5.bungee.api.plugin.Listener; -import net.md_5.bungee.event.EventHandler; -import org.checkerframework.checker.nullness.qual.NonNull; - -public class PluginMessageMessenger implements Messenger, Listener { - - private static final String CHANNEL = "gts:update"; - - private final GTSBungeePlugin plugin; - private final IncomingMessageConsumer consumer; - - public PluginMessageMessenger(GTSBungeePlugin plugin, IncomingMessageConsumer consumer) { - this.plugin = plugin; - this.consumer = consumer; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbb; + +bbbbbb bbb.bbbbbb.bbbbbb.bb.BbbbBbbbbBbbbBbbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bb.BbbbBbbbbBbbbBbbbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bb.BbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.BBBBbbbbbBbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbb.BbbbbBbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbb.bbbbbbbbbb.BbbbbbbBbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbb.bbbbb.BbbbbbBbbbbbbBbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbb.bbbbbb.Bbbbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbbbb.BbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; + +bbbbbb bbbbb BbbbbbBbbbbbbBbbbbbbbb bbbbbbbbbb Bbbbbbbbb, Bbbbbbbb { + + bbbbbbb bbbbbb bbbbb Bbbbbb BBBBBBB = "bbb:bbbbbb"; + + bbbbbbb bbbbb BBBBbbbbbBbbbbb bbbbbb; + bbbbbbb bbbbb BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbb; + + bbbbbb BbbbbbBbbbbbbBbbbbbbbb(BBBBbbbbbBbbbbb bbbbbb, BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbb) { + bbbb.bbbbbb = bbbbbb; + bbbb.bbbbbbbb = bbbbbbbb; } - public void init() { - ProxyServer proxy = this.plugin.bootstrap().proxy().getProxy(); - proxy.getPluginManager().registerListener(this.plugin.bootstrap().proxy(), this); - proxy.registerChannel(CHANNEL); + bbbbbb bbbb bbbb() { + BbbbbBbbbbb bbbbb = bbbb.bbbbbb.bbbbbbbbb().bbbbb().bbbBbbbb(); + bbbbb.bbbBbbbbbBbbbbbb().bbbbbbbbBbbbbbbb(bbbb.bbbbbb.bbbbbbbbb().bbbbb(), bbbb); + bbbbb.bbbbbbbbBbbbbbb(BBBBBBB); } - @Override - public void close() { - ProxyServer proxy = this.plugin.bootstrap().proxy().getProxy(); - proxy.unregisterChannel(CHANNEL); - proxy.getPluginManager().unregisterListener(this); + @Bbbbbbbb + bbbbbb bbbb bbbbb() { + BbbbbBbbbbb bbbbb = bbbb.bbbbbb.bbbbbbbbb().bbbbb().bbbBbbbb(); + bbbbb.bbbbbbbbbbBbbbbbb(BBBBBBB); + bbbbb.bbbBbbbbbBbbbbbb().bbbbbbbbbbBbbbbbbb(bbbb); } - private void dispatch(byte[] message) { - this.plugin.bootstrap().proxy().getProxy().getServers().values().forEach(server -> server.sendData(CHANNEL, message, false)); + bbbbbbb bbbb bbbbbbbb(bbbb[] bbbbbbb) { + bbbb.bbbbbb.bbbbbbbbb().bbbbb().bbbBbbbb().bbbBbbbbbb().bbbbbb().bbbBbbb(bbbbbb -> bbbbbb.bbbbBbbb(BBBBBBB, bbbbbbb, bbbbb)); } - @Override - public IncomingMessageConsumer getMessageConsumer() { - return this.consumer; + @Bbbbbbbb + bbbbbb BbbbbbbbBbbbbbbBbbbbbbb bbbBbbbbbbBbbbbbbb() { + bbbbbb bbbb.bbbbbbbb; } - @Override - public void sendOutgoingMessage(@NonNull OutgoingMessage outgoingMessage) { - ByteArrayDataOutput out = ByteStreams.newDataOutput(); - out.writeUTF(outgoingMessage.asEncodedString()); + @Bbbbbbbb + bbbbbb bbbb bbbbBbbbbbbbBbbbbbb(@BbbBbbb BbbbbbbbBbbbbbb bbbbbbbbBbbbbbb) { + BbbbBbbbbBbbbBbbbbb bbb = BbbbBbbbbbb.bbbBbbbBbbbbb(); + bbb.bbbbbBBB(bbbbbbbbBbbbbbb.bbBbbbbbbBbbbbb()); - byte[] message = out.toByteArray(); - this.dispatch(message); + bbbb[] bbbbbbb = bbb.bbBbbbBbbbb(); + bbbb.bbbbbbbb(bbbbbbb); } - @EventHandler - public void onPluginMessage(PluginMessageEvent event) { - if(!event.getTag().equals(CHANNEL)) { - return; + @BbbbbBbbbbbb + bbbbbb bbbb bbBbbbbbBbbbbbb(BbbbbbBbbbbbbBbbbb bbbbb) { + bb(!bbbbb.bbbBbb().bbbbbb(BBBBBBB)) { + bbbbbb; } - event.setCancelled(true); - if(event.getSender() instanceof ProxiedPlayer) { - return; + bbbbb.bbbBbbbbbbbb(bbbb); + bb(bbbbb.bbbBbbbbb() bbbbbbbbbb BbbbbbbBbbbbb) { + bbbbbb; } - byte[] data = event.getData(); - ByteArrayDataInput in = ByteStreams.newDataInput(data); - String msg = in.readUTF(); + bbbb[] bbbb = bbbbb.bbbBbbb(); + BbbbBbbbbBbbbBbbbb bb = BbbbBbbbbbb.bbbBbbbBbbbb(bbbb); + Bbbbbb bbb = bb.bbbbBBB(); - try { - this.consumer.consumeIncomingMessageAsString(msg); - } catch (Exception e) { + bbb { + bbbb.bbbbbbbb.bbbbbbbBbbbbbbbBbbbbbbBbBbbbbb(bbb); + } bbbbb (Bbbbbbbbb b) { } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/types/RedisBungeeMessenger.java b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/types/RedisBungeeMessenger.java index 0ac1bbc3..e4230978 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/messaging/types/RedisBungeeMessenger.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/messaging/types/RedisBungeeMessenger.java @@ -1,60 +1,60 @@ -package net.impactdev.gts.bungee.messaging.types; - -import com.imaginarycode.minecraft.redisbungee.RedisBungee; -import com.imaginarycode.minecraft.redisbungee.RedisBungeeAPI; -import com.imaginarycode.minecraft.redisbungee.events.PubSubMessageEvent; -import net.impactdev.gts.api.messaging.IncomingMessageConsumer; -import net.impactdev.gts.api.messaging.Messenger; -import net.impactdev.gts.api.messaging.message.OutgoingMessage; -import net.impactdev.gts.bungee.GTSBungeePlugin; -import net.md_5.bungee.api.plugin.Listener; -import net.md_5.bungee.event.EventHandler; -import org.checkerframework.checker.nullness.qual.NonNull; - -public class RedisBungeeMessenger implements Messenger, Listener { - - private static final String CHANNEL = "gts:update"; - - private final GTSBungeePlugin plugin; - private final IncomingMessageConsumer consumer; - private RedisBungeeAPI redisBungee; - - public RedisBungeeMessenger(GTSBungeePlugin plugin, IncomingMessageConsumer consumer) { - this.plugin = plugin; - this.consumer = consumer; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbb; + +bbbbbb bbb.bbbbbbbbbbbbb.bbbbbbbbb.bbbbbbbbbbb.BbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbbbbbb.bbbbbbbbb.bbbbbbbbbbb.BbbbbBbbbbbBBB; +bbbbbb bbb.bbbbbbbbbbbbb.bbbbbbbbb.bbbbbbbbbbb.bbbbbb.BbbBbbBbbbbbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.BbbbbbbbBbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.BbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.BBBBbbbbbBbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbb.bbbbbb.Bbbbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbbbb.BbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbbbbbbbbb.bbbbbbb.bbbbbbbb.bbbb.BbbBbbb; + +bbbbbb bbbbb BbbbbBbbbbbBbbbbbbbb bbbbbbbbbb Bbbbbbbbb, Bbbbbbbb { + + bbbbbbb bbbbbb bbbbb Bbbbbb BBBBBBB = "bbb:bbbbbb"; + + bbbbbbb bbbbb BBBBbbbbbBbbbbb bbbbbb; + bbbbbbb bbbbb BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbb; + bbbbbbb BbbbbBbbbbbBBB bbbbbBbbbbb; + + bbbbbb BbbbbBbbbbbBbbbbbbbb(BBBBbbbbbBbbbbb bbbbbb, BbbbbbbbBbbbbbbBbbbbbbb bbbbbbbb) { + bbbb.bbbbbb = bbbbbb; + bbbb.bbbbbbbb = bbbbbbbb; } - public void init() { - this.redisBungee = RedisBungee.getApi(); - this.redisBungee.registerPubSubChannels(CHANNEL); + bbbbbb bbbb bbbb() { + bbbb.bbbbbBbbbbb = BbbbbBbbbbb.bbbBbb(); + bbbb.bbbbbBbbbbb.bbbbbbbbBbbBbbBbbbbbbb(BBBBBBB); - this.plugin.bootstrap().proxy().getProxy().getPluginManager().registerListener(this.plugin.bootstrap().proxy(), this); + bbbb.bbbbbb.bbbbbbbbb().bbbbb().bbbBbbbb().bbbBbbbbbBbbbbbb().bbbbbbbbBbbbbbbb(bbbb.bbbbbb.bbbbbbbbb().bbbbb(), bbbb); } - @Override - public void close() { - this.redisBungee.unregisterPubSubChannels(CHANNEL); - this.redisBungee = null; + @Bbbbbbbb + bbbbbb bbbb bbbbb() { + bbbb.bbbbbBbbbbb.bbbbbbbbbbBbbBbbBbbbbbbb(BBBBBBB); + bbbb.bbbbbBbbbbb = bbbb; - this.plugin.bootstrap().proxy().getProxy().getPluginManager().unregisterListener(this); + bbbb.bbbbbb.bbbbbbbbb().bbbbb().bbbBbbbb().bbbBbbbbbBbbbbbb().bbbbbbbbbbBbbbbbbb(bbbb); } - @Override - public IncomingMessageConsumer getMessageConsumer() { - return this.consumer; + @Bbbbbbbb + bbbbbb BbbbbbbbBbbbbbbBbbbbbbb bbbBbbbbbbBbbbbbbb() { + bbbbbb bbbb.bbbbbbbb; } - @Override - public void sendOutgoingMessage(@NonNull OutgoingMessage outgoingMessage) { - this.redisBungee.sendChannelMessage(CHANNEL, outgoingMessage.asEncodedString()); + @Bbbbbbbb + bbbbbb bbbb bbbbBbbbbbbbBbbbbbb(@BbbBbbb BbbbbbbbBbbbbbb bbbbbbbbBbbbbbb) { + bbbb.bbbbbBbbbbb.bbbbBbbbbbbBbbbbbb(BBBBBBB, bbbbbbbbBbbbbbb.bbBbbbbbbBbbbbb()); } - @EventHandler - public void onMessage(PubSubMessageEvent event) { - if(!event.getChannel().equals(CHANNEL)) { - return; + @BbbbbBbbbbbb + bbbbbb bbbb bbBbbbbbb(BbbBbbBbbbbbbBbbbb bbbbb) { + bb(!bbbbb.bbbBbbbbbb().bbbbbb(BBBBBBB)) { + bbbbbb; } - this.consumer.consumeIncomingMessageAsString(event.getMessage()); + bbbb.bbbbbbbb.bbbbbbbBbbbbbbbBbbbbbbBbBbbbbb(bbbbb.bbbBbbbbbb()); } } diff --git a/bungee/src/main/java/net/impactdev/gts/bungee/util/PlayerDetailFetcher.java b/bungee/src/main/java/net/impactdev/gts/bungee/util/PlayerDetailFetcher.java index 6b647277..c3e7ebc2 100644 --- a/bungee/src/main/java/net/impactdev/gts/bungee/util/PlayerDetailFetcher.java +++ b/bungee/src/main/java/net/impactdev/gts/bungee/util/PlayerDetailFetcher.java @@ -1,17 +1,17 @@ -package net.impactdev.gts.bungee.util; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbb; -import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.TextComponent; -import net.md_5.bungee.api.ProxyServer; -import net.md_5.bungee.api.connection.ProxiedPlayer; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.BbbbBbbbbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbb.BbbbbBbbbbb; +bbbbbb bbb.bb_5.bbbbbb.bbb.bbbbbbbbbb.BbbbbbbBbbbbb; -import java.util.UUID; +bbbbbb bbbb.bbbb.BBBB; -public class PlayerDetailFetcher { +bbbbbb bbbbb BbbbbbBbbbbbBbbbbbb { - public TextComponent getPlayerNameFromUUID(UUID user) { - ProxiedPlayer player = ProxyServer.getInstance().getPlayer(user); - return Component.text(player.getDisplayName()); + bbbbbb BbbbBbbbbbbbb bbbBbbbbbBbbbBbbbBBBB(BBBB bbbb) { + BbbbbbbBbbbbb bbbbbb = BbbbbBbbbbb.bbbBbbbbbbb().bbbBbbbbb(bbbb); + bbbbbb Bbbbbbbbb.bbbb(bbbbbb.bbbBbbbbbbBbbb()); } } diff --git a/common/src/main/java/net/impactdev/gts/common/adventure/processors/ComponentProcessor.java b/common/src/main/java/net/impactdev/gts/common/adventure/processors/ComponentProcessor.java index 50d773e7..158cc5fe 100644 --- a/common/src/main/java/net/impactdev/gts/common/adventure/processors/ComponentProcessor.java +++ b/common/src/main/java/net/impactdev/gts/common/adventure/processors/ComponentProcessor.java @@ -1,34 +1,34 @@ /* - * This file is part of Impactor, licensed under the MIT License (MIT). + * Bbbb bbbb bb bbbb bb Bbbbbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb (BBB). * - * Copyright (c) 2018-2022 NickImpact + * Bbbbbbbbb (b) 2018-2022 BbbbBbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb + * bbb bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB + * BBB BBBBBBBB. * */ -package net.impactdev.gts.common.adventure.processors; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbb; -import net.kyori.adventure.text.Component; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.Bbbbbbbbb; -public interface ComponentProcessor { +bbbbbb bbbbbbbbb BbbbbbbbbBbbbbbbbb { - Component process(T input); + Bbbbbbbbb bbbbbbb(B bbbbb); } diff --git a/common/src/main/java/net/impactdev/gts/common/adventure/processors/gradients/GradientProcessor.java b/common/src/main/java/net/impactdev/gts/common/adventure/processors/gradients/GradientProcessor.java index eff5873f..c0965198 100644 --- a/common/src/main/java/net/impactdev/gts/common/adventure/processors/gradients/GradientProcessor.java +++ b/common/src/main/java/net/impactdev/gts/common/adventure/processors/gradients/GradientProcessor.java @@ -1,52 +1,52 @@ /* - * This file is part of Impactor, licensed under the MIT License (MIT). + * Bbbb bbbb bb bbbb bb Bbbbbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb (BBB). * - * Copyright (c) 2018-2022 NickImpact + * Bbbbbbbbb (b) 2018-2022 BbbbBbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb + * bbb bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB + * BBB BBBBBBBB. * */ -package net.impactdev.gts.common.adventure.processors.gradients; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbb.bbbbbbbbb; -import net.impactdev.gts.common.adventure.processors.ComponentProcessor; -import net.impactdev.impactor.api.builders.Builder; -import net.kyori.adventure.text.format.TextColor; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbb.BbbbbbbbbBbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbb.Bbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.bbbbbb.BbbbBbbbb; -import java.util.Arrays; -import java.util.LinkedList; +bbbbbb bbbb.bbbb.Bbbbbb; +bbbbbb bbbb.bbbb.BbbbbbBbbb; -public abstract class GradientProcessor implements ComponentProcessor { +bbbbbb bbbbbbbb bbbbb BbbbbbbbBbbbbbbbb bbbbbbbbbb BbbbbbbbbBbbbbbbbb { - protected final LinkedList colors; + bbbbbbbbb bbbbb BbbbbbBbbb bbbbbb; - protected GradientProcessor(GradientProcessorBuilder> builder) { - this.colors = builder.colors; + bbbbbbbbb BbbbbbbbBbbbbbbbb(BbbbbbbbBbbbbbbbbBbbbbbb> bbbbbbb) { + bbbb.bbbbbb = bbbbbbb.bbbbbb; } - public static abstract class GradientProcessorBuilder> implements Builder { + bbbbbb bbbbbb bbbbbbbb bbbbb BbbbbbbbBbbbbbbbbBbbbbbb> bbbbbbbbbb Bbbbbbb { - protected final LinkedList colors = new LinkedList<>(); + bbbbbbbbb bbbbb BbbbbbBbbb bbbbbb = bbb BbbbbbBbbb<>(); - public GradientProcessorBuilder colors(TextColor... colors) { - this.colors.addAll(Arrays.asList(colors)); - return this; + bbbbbb BbbbbbbbBbbbbbbbbBbbbbbb bbbbbb(BbbbBbbbb... bbbbbb) { + bbbb.bbbbbb.bbbBbb(Bbbbbb.bbBbbb(bbbbbb)); + bbbbbb bbbb; } } diff --git a/common/src/main/java/net/impactdev/gts/common/adventure/processors/gradients/NumberBasedGradientProcessor.java b/common/src/main/java/net/impactdev/gts/common/adventure/processors/gradients/NumberBasedGradientProcessor.java index 4dc41037..ad0e983b 100644 --- a/common/src/main/java/net/impactdev/gts/common/adventure/processors/gradients/NumberBasedGradientProcessor.java +++ b/common/src/main/java/net/impactdev/gts/common/adventure/processors/gradients/NumberBasedGradientProcessor.java @@ -1,115 +1,115 @@ /* - * This file is part of Impactor, licensed under the MIT License (MIT). + * Bbbb bbbb bb bbbb bb Bbbbbbbb, bbbbbbbb bbbbb bbb BBB Bbbbbbb (BBB). * - * Copyright (c) 2018-2022 NickImpact + * Bbbbbbbbb (b) 2018-2022 BbbbBbbbbb * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Bbbbbbbbbb bb bbbbbb bbbbbbb, bbbb bb bbbbbb, bb bbb bbbbbb bbbbbbbbb b bbbb + * bb bbbb bbbbbbbb bbb bbbbbbbbbb bbbbbbbbbbbbb bbbbb (bbb "Bbbbbbbb"), bb bbbb + * bb bbb Bbbbbbbb bbbbbbb bbbbbbbbbbb, bbbbbbbbb bbbbbbb bbbbbbbbbb bbb bbbbbb + * bb bbb, bbbb, bbbbbb, bbbbb, bbbbbbb, bbbbbbbbbb, bbbbbbbbbb, bbb/bb bbbb + * bbbbbb bb bbb Bbbbbbbb, bbb bb bbbbbb bbbbbbb bb bbbb bbb Bbbbbbbb bb + * bbbbbbbbb bb bb bb, bbbbbbb bb bbb bbbbbbbbb bbbbbbbbbb: * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * Bbb bbbbb bbbbbbbbb bbbbbb bbb bbbb bbbbbbbbbb bbbbbb bbbbb bb bbbbbbbb bb + * bbb bbbbbb bb bbbbbbbbbbb bbbbbbbb bb bbb Bbbbbbbb. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. + * BBB BBBBBBBB BB BBBBBBBB "BB BB", BBBBBBB BBBBBBBB BB BBB BBBB, BBBBBBB BB + * BBBBBBB, BBBBBBBBB BBB BBB BBBBBBB BB BBB BBBBBBBBBB BB BBBBBBBBBBBBBBB, + * BBBBBBB BBB B BBBBBBBBBB BBBBBBB BBB BBBBBBBBBBBBBBB. BB BB BBBBB BBBBB BBB + * BBBBBBB BB BBBBBBBBB BBBBBBB BB BBBBBB BBB BBB BBBBB, BBBBBBB BB BBBBB + * BBBBBBBBB, BBBBBBB BB BB BBBBBB BB BBBBBBBB, BBBB BB BBBBBBBBB, BBBBBBB BBBB, + * BBB BB BB BB BBBBBBBBBB BBBB BBB BBBBBBBB BB BBB BBB BB BBBBB BBBBBBBB BB + * BBB BBBBBBBB. * */ -package net.impactdev.gts.common.adventure.processors.gradients; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb.bbbbbbbbbb.bbbbbbbbb; -import com.google.gson.reflect.TypeToken; -import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.format.TextColor; +bbbbbb bbb.bbbbbb.bbbb.bbbbbbb.BbbbBbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.bbbbbb.BbbbBbbbb; -import java.util.function.Function; +bbbbbb bbbb.bbbb.bbbbbbbb.Bbbbbbbb; -public class NumberBasedGradientProcessor extends GradientProcessor { +bbbbbb bbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbb bbbbbbb BbbbbbbbBbbbbbbbb { - private final Function translator; - private final Function factor; - private final int min; - private final int max; + bbbbbbb bbbbb Bbbbbbbb bbbbbbbbbb; + bbbbbbb bbbbb Bbbbbbbb bbbbbb; + bbbbbbb bbbbb bbb bbb; + bbbbbbb bbbbb bbb bbb; - private NumberBasedGradientProcessor(NumberBasedGradientProcessorBuilder builder) { - super(builder); - this.translator = builder.translator; - this.factor = builder.factor; - this.min = builder.min; - this.max = builder.max; + bbbbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbb(BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb bbbbbbb) { + bbbbb(bbbbbbb); + bbbb.bbbbbbbbbb = bbbbbbb.bbbbbbbbbb; + bbbb.bbbbbb = bbbbbbb.bbbbbb; + bbbb.bbb = bbbbbbb.bbb; + bbbb.bbb = bbbbbbb.bbb; } - public static NumberBasedGradientProcessorBuilder builder() { - return new NumberBasedGradientProcessorBuilder<>(); + bbbbbb bbbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb bbbbbbb() { + bbbbbb bbb BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb<>(); } - @Override - public Component process(T input) { - double value = input.doubleValue(); - Component working = translator.apply(input); - - if(value <= this.min) { - working = working.color(this.colors.getFirst()); - } else if(value >= this.max) { - working = working.color(this.colors.getLast()); - } else { - float factor = this.factor.apply(input); - - TextColor first = this.colors.getFirst(); - TextColor last = this.colors.getLast(); - - TextColor color = TextColor.color( - Math.round(first.red() + factor * (last.red() - first.red())), - Math.round(first.green() + factor * (last.green() - first.green())), - Math.round(first.blue() + factor * (last.blue() - first.blue())) + @Bbbbbbbb + bbbbbb Bbbbbbbbb bbbbbbb(B bbbbb) { + bbbbbb bbbbb = bbbbb.bbbbbbBbbbb(); + Bbbbbbbbb bbbbbbb = bbbbbbbbbb.bbbbb(bbbbb); + + bb(bbbbb <= bbbb.bbb) { + bbbbbbb = bbbbbbb.bbbbb(bbbb.bbbbbb.bbbBbbbb()); + } bbbb bb(bbbbb >= bbbb.bbb) { + bbbbbbb = bbbbbbb.bbbbb(bbbb.bbbbbb.bbbBbbb()); + } bbbb { + bbbbb bbbbbb = bbbb.bbbbbb.bbbbb(bbbbb); + + BbbbBbbbb bbbbb = bbbb.bbbbbb.bbbBbbbb(); + BbbbBbbbb bbbb = bbbb.bbbbbb.bbbBbbb(); + + BbbbBbbbb bbbbb = BbbbBbbbb.bbbbb( + Bbbb.bbbbb(bbbbb.bbb() + bbbbbb * (bbbb.bbb() - bbbbb.bbb())), + Bbbb.bbbbb(bbbbb.bbbbb() + bbbbbb * (bbbb.bbbbb() - bbbbb.bbbbb())), + Bbbb.bbbbb(bbbbb.bbbb() + bbbbbb * (bbbb.bbbb() - bbbbb.bbbb())) ); - working = working.color(color); + bbbbbbb = bbbbbbb.bbbbb(bbbbb); } - return working; + bbbbbb bbbbbbb; } - public static class NumberBasedGradientProcessorBuilder extends GradientProcessorBuilder> { + bbbbbb bbbbbb bbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb bbbbbbb BbbbbbbbBbbbbbbbbBbbbbbb> { - private Function translator; - private Function factor; - private int min; - private int max; + bbbbbbb Bbbbbbbb bbbbbbbbbb; + bbbbbbb Bbbbbbbb bbbbbb; + bbbbbbb bbb bbb; + bbbbbbb bbb bbb; - public NumberBasedGradientProcessorBuilder type(TypeToken type) { - return new NumberBasedGradientProcessorBuilder<>(); + bbbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb bbbb(BbbbBbbbb bbbb) { + bbbbbb bbb BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb<>(); } - public NumberBasedGradientProcessorBuilder translator(Function translator) { - this.translator = translator; - return this; + bbbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb bbbbbbbbbb(Bbbbbbbb bbbbbbbbbb) { + bbbb.bbbbbbbbbb = bbbbbbbbbb; + bbbbbb bbbb; } - public NumberBasedGradientProcessorBuilder factor(Function factor) { - this.factor = factor; - return this; + bbbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb bbbbbb(Bbbbbbbb bbbbbb) { + bbbb.bbbbbb = bbbbbb; + bbbbbb bbbb; } - public NumberBasedGradientProcessorBuilder min(int min) { - this.min = min; - return this; + bbbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb bbb(bbb bbb) { + bbbb.bbb = bbb; + bbbbbb bbbb; } - public NumberBasedGradientProcessorBuilder max(int max) { - this.max = max; - return this; + bbbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbbBbbbbbb bbb(bbb bbb) { + bbbb.bbb = bbb; + bbbbbb bbbb; } - @Override - public NumberBasedGradientProcessor build() { - return new NumberBasedGradientProcessor<>(this); + @Bbbbbbbb + bbbbbb BbbbbbBbbbbBbbbbbbbBbbbbbbbb bbbbb() { + bbbbbb bbb BbbbbbBbbbbBbbbbbbbBbbbbbbbb<>(bbbb); } } diff --git a/common/src/main/java/net/impactdev/gts/common/api/ApiRegistrationUtil.java b/common/src/main/java/net/impactdev/gts/common/api/ApiRegistrationUtil.java index 575409e6..5e41a92a 100644 --- a/common/src/main/java/net/impactdev/gts/common/api/ApiRegistrationUtil.java +++ b/common/src/main/java/net/impactdev/gts/common/api/ApiRegistrationUtil.java @@ -1,40 +1,40 @@ -package net.impactdev.gts.common.api; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbb; -import net.impactdev.gts.api.GTSService; -import net.impactdev.gts.api.GTSServiceProvider; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.BBBBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.BBBBbbbbbbBbbbbbbb; -import java.lang.reflect.Method; +bbbbbb bbbb.bbbb.bbbbbbb.Bbbbbb; -public class ApiRegistrationUtil { +bbbbbb bbbbb BbbBbbbbbbbbbbbBbbb { - private static final Method REGISTER; - private static final Method UNREGISTER; + bbbbbbb bbbbbb bbbbb Bbbbbb BBBBBBBB; + bbbbbbb bbbbbb bbbbb Bbbbbb BBBBBBBBBB; - static { - try { - REGISTER = GTSServiceProvider.class.getDeclaredMethod("register", GTSService.class); - REGISTER.setAccessible(true); + bbbbbb { + bbb { + BBBBBBBB = BBBBbbbbbbBbbbbbbb.bbbbb.bbbBbbbbbbbBbbbbb("bbbbbbbb", BBBBbbbbbb.bbbbb); + BBBBBBBB.bbbBbbbbbbbbb(bbbb); - UNREGISTER = GTSServiceProvider.class.getDeclaredMethod("unregister"); - UNREGISTER.setAccessible(true); - } catch (NoSuchMethodException e) { - throw new ExceptionInInitializerError(e); + BBBBBBBBBB = BBBBbbbbbbBbbbbbbb.bbbbb.bbbBbbbbbbbBbbbbb("bbbbbbbbbb"); + BBBBBBBBBB.bbbBbbbbbbbbb(bbbb); + } bbbbb (BbBbbbBbbbbbBbbbbbbbb b) { + bbbbb bbb BbbbbbbbbBbBbbbbbbbbbbBbbbb(b); } } - public static void register(GTSService service) { - try { - REGISTER.invoke(null, service); - } catch (Exception e) { - e.printStackTrace(); + bbbbbb bbbbbb bbbb bbbbbbbb(BBBBbbbbbb bbbbbbb) { + bbb { + BBBBBBBB.bbbbbb(bbbb, bbbbbbb); + } bbbbb (Bbbbbbbbb b) { + b.bbbbbBbbbbBbbbb(); } } - public static void unregister() { - try { - UNREGISTER.invoke(null); - } catch (Exception e) { - e.printStackTrace(); + bbbbbb bbbbbb bbbb bbbbbbbbbb() { + bbb { + BBBBBBBBBB.bbbbbb(bbbb); + } bbbbb (Bbbbbbbbb b) { + b.bbbbbBbbbbBbbbb(); } } } diff --git a/common/src/main/java/net/impactdev/gts/common/api/GTSAPIProvider.java b/common/src/main/java/net/impactdev/gts/common/api/GTSAPIProvider.java index dd0a8a28..98aa139c 100644 --- a/common/src/main/java/net/impactdev/gts/common/api/GTSAPIProvider.java +++ b/common/src/main/java/net/impactdev/gts/common/api/GTSAPIProvider.java @@ -1,84 +1,84 @@ -package net.impactdev.gts.common.api; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; -import net.impactdev.gts.api.GTSService; -import net.impactdev.gts.api.data.registry.GTSComponentManager; -import net.impactdev.gts.api.data.translators.DataTranslatorManager; -import net.impactdev.gts.api.extension.Extension; -import net.impactdev.gts.api.maintenance.MaintenanceManager; -import net.impactdev.gts.api.messaging.message.errors.ErrorCode; -import net.impactdev.gts.api.player.PlayerSettingsManager; -import net.impactdev.gts.api.searching.Searcher; -import net.impactdev.gts.common.data.DataTranslatorManagerImpl; -import net.impactdev.gts.common.listings.GTSComponentManagerImpl; -import net.impactdev.gts.common.player.PlayerSettingsManagerImpl; -import net.impactdev.gts.common.plugin.GTSPlugin; - -import java.util.List; - -public class GTSAPIProvider implements GTSService { - - private final GTSComponentManager entryManagerRegistry = new GTSComponentManagerImpl(); - private final PlayerSettingsManager playerSettingsManager = new PlayerSettingsManagerImpl(); - private final List searchers = Lists.newArrayList(); - private final DataTranslatorManager dataTranslatorManager = new DataTranslatorManagerImpl(); - - private boolean safe = false; - private ErrorCode reason; - - @Override - public ImmutableList getAllExtensions() { - if(GTSPlugin.instance().extensionManager() != null) { - return ImmutableList.copyOf(GTSPlugin.instance().extensionManager().getLoadedExtensions()); +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbb; + +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.BbbbbbbbbBbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.BBBBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbb.BBBBbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.bbbbbbbbbbb.BbbbBbbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbbbb.BbbbbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.bbbbbbb.bbbbbb.BbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbb.BbbbbbBbbbbbbbBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbb.BbbbBbbbbbbbbbBbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbb.BBBBbbbbbbbbBbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BbbbbbBbbbbbbbBbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.BBBBbbbbb; + +bbbbbb bbbb.bbbb.Bbbb; + +bbbbbb bbbbb BBBBBBBbbbbbbb bbbbbbbbbb BBBBbbbbbb { + + bbbbbbb bbbbb BBBBbbbbbbbbBbbbbbb bbbbbBbbbbbbBbbbbbbb = bbb BBBBbbbbbbbbBbbbbbbBbbb(); + bbbbbbb bbbbb BbbbbbBbbbbbbbBbbbbbb bbbbbbBbbbbbbbBbbbbbb = bbb BbbbbbBbbbbbbbBbbbbbbBbbb(); + bbbbbbb bbbbb Bbbb bbbbbbbbb = Bbbbb.bbbBbbbbBbbb(); + bbbbbbb bbbbb BbbbBbbbbbbbbbBbbbbbb bbbbBbbbbbbbbbBbbbbbb = bbb BbbbBbbbbbbbbbBbbbbbbBbbb(); + + bbbbbbb bbbbbbb bbbb = bbbbb; + bbbbbbb BbbbbBbbb bbbbbb; + + @Bbbbbbbb + bbbbbb BbbbbbbbbBbbb bbbBbbBbbbbbbbbb() { + bb(BBBBbbbbb.bbbbbbbb().bbbbbbbbbBbbbbbb() != bbbb) { + bbbbbb BbbbbbbbbBbbb.bbbbBb(BBBBbbbbb.bbbbbbbb().bbbbbbbbbBbbbbbb().bbbBbbbbbBbbbbbbbbb()); } - return ImmutableList.of(); + bbbbbb BbbbbbbbbBbbb.bb(); } - @Override - public GTSComponentManager getGTSComponentManager() { - return this.entryManagerRegistry; + @Bbbbbbbb + bbbbbb BBBBbbbbbbbbBbbbbbb bbbBBBBbbbbbbbbBbbbbbb() { + bbbbbb bbbb.bbbbbBbbbbbbBbbbbbbb; } - @Override - public PlayerSettingsManager getPlayerSettingsManager() { - return this.playerSettingsManager; + @Bbbbbbbb + bbbbbb BbbbbbBbbbbbbbBbbbbbb bbbBbbbbbBbbbbbbbBbbbbbb() { + bbbbbb bbbb.bbbbbbBbbbbbbbBbbbbbb; } - @Override - public MaintenanceManager getMaintenanceManager() { - return null; + @Bbbbbbbb + bbbbbb BbbbbbbbbbbBbbbbbb bbbBbbbbbbbbbbBbbbbbb() { + bbbbbb bbbb; } - @Override - public DataTranslatorManager getDataTranslatorManager() { - return this.dataTranslatorManager; + @Bbbbbbbb + bbbbbb BbbbBbbbbbbbbbBbbbbbb bbbBbbbBbbbbbbbbbBbbbbbb() { + bbbbbb bbbb.bbbbBbbbbbbbbbBbbbbbb; } - @Override - public void addSearcher(Searcher searcher) { - this.searchers.add(searcher); + @Bbbbbbbb + bbbbbb bbbb bbbBbbbbbbb(Bbbbbbbb bbbbbbbb) { + bbbb.bbbbbbbbb.bbb(bbbbbbbb); } - @Override - public List getSearchers() { - return this.searchers; + @Bbbbbbbb + bbbbbb Bbbb bbbBbbbbbbbb() { + bbbbbb bbbb.bbbbbbbbb; } - @Override - public boolean isInSafeMode() { - return this.safe; + @Bbbbbbbb + bbbbbb bbbbbbb bbBbBbbbBbbb() { + bbbbbb bbbb.bbbb; } - @Override - public ErrorCode getSafeModeReason() { - return this.reason; + @Bbbbbbbb + bbbbbb BbbbbBbbb bbbBbbbBbbbBbbbbb() { + bbbbbb bbbb.bbbbbb; } - public void setSafeMode(ErrorCode reason) { - this.safe = true; - this.reason = reason; + bbbbbb bbbb bbbBbbbBbbb(BbbbbBbbb bbbbbb) { + bbbb.bbbb = bbbb; + bbbb.bbbbbb = bbbbbb; } } diff --git a/common/src/main/java/net/impactdev/gts/common/blacklist/BlacklistImpl.java b/common/src/main/java/net/impactdev/gts/common/blacklist/BlacklistImpl.java index 57a16bd2..cfdc0a01 100644 --- a/common/src/main/java/net/impactdev/gts/common/blacklist/BlacklistImpl.java +++ b/common/src/main/java/net/impactdev/gts/common/blacklist/BlacklistImpl.java @@ -1,32 +1,32 @@ -package net.impactdev.gts.common.blacklist; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbb; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Multimap; -import net.impactdev.gts.api.blacklist.Blacklist; -import net.kyori.adventure.key.Key; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.BbbbbBbbbBbbbbbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbb.Bbb; -public class BlacklistImpl implements Blacklist { +bbbbbb bbbbb BbbbbbbbbBbbb bbbbbbbbbb Bbbbbbbbb { - private final Multimap, String> blacklist = ArrayListMultimap.create(); + bbbbbbb bbbbb Bbbbbbbb, Bbbbbb> bbbbbbbbb = BbbbbBbbbBbbbbbbb.bbbbbb(); - @Override - public Multimap, String> getBlacklist() { - return this.blacklist; + @Bbbbbbbb + bbbbbb Bbbbbbbb, Bbbbbb> bbbBbbbbbbbb() { + bbbbbb bbbb.bbbbbbbbb; } - @Override - public void append(Class registrar, String key) { - this.blacklist.put(registrar, key); + @Bbbbbbbb + bbbbbb bbbb bbbbbb(Bbbbb bbbbbbbbb, Bbbbbb bbb) { + bbbb.bbbbbbbbb.bbb(bbbbbbbbb, bbb); } - @Override - public boolean isBlacklisted(Class registrar, String query) { - return this.blacklist.get(registrar).contains(query); + @Bbbbbbbb + bbbbbb bbbbbbb bbBbbbbbbbbbb(Bbbbb bbbbbbbbb, Bbbbbb bbbbb) { + bbbbbb bbbb.bbbbbbbbb.bbb(bbbbbbbbb).bbbbbbbb(bbbbb); } - @Override - public void clear() { - this.blacklist.clear(); + @Bbbbbbbb + bbbbbb bbbb bbbbb() { + bbbb.bbbbbbbbb.bbbbb(); } } diff --git a/common/src/main/java/net/impactdev/gts/common/components/GTSFlattenerListener.java b/common/src/main/java/net/impactdev/gts/common/components/GTSFlattenerListener.java index 27a395e6..4d295cb4 100644 --- a/common/src/main/java/net/impactdev/gts/common/components/GTSFlattenerListener.java +++ b/common/src/main/java/net/impactdev/gts/common/components/GTSFlattenerListener.java @@ -1,19 +1,19 @@ -package net.impactdev.gts.common.components; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbbbbb; -import net.kyori.adventure.text.flattener.FlattenerListener; -import org.jetbrains.annotations.NotNull; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbbb.bbbbbbbbb.BbbbbbbbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbbbbb.BbbBbbb; -public class GTSFlattenerListener implements FlattenerListener { +bbbbbb bbbbb BBBBbbbbbbbbBbbbbbbb bbbbbbbbbb BbbbbbbbbBbbbbbbb { - private final StringBuilder result = new StringBuilder(); + bbbbbbb bbbbb BbbbbbBbbbbbb bbbbbb = bbb BbbbbbBbbbbbb(); - @Override - public void component(@NotNull String text) { - this.result.append(text); + @Bbbbbbbb + bbbbbb bbbb bbbbbbbbb(@BbbBbbb Bbbbbb bbbb) { + bbbb.bbbbbb.bbbbbb(bbbb); } - public String result() { - return result.toString(); + bbbbbb Bbbbbb bbbbbb() { + bbbbbb bbbbbb.bbBbbbbb(); } } diff --git a/common/src/main/java/net/impactdev/gts/common/config/ConfigKeys.java b/common/src/main/java/net/impactdev/gts/common/config/ConfigKeys.java index cab00806..bfb283c0 100644 --- a/common/src/main/java/net/impactdev/gts/common/config/ConfigKeys.java +++ b/common/src/main/java/net/impactdev/gts/common/config/ConfigKeys.java @@ -1,216 +1,216 @@ -package net.impactdev.gts.common.config; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import net.impactdev.gts.api.GTSService; -import net.impactdev.gts.api.util.TriState; -import net.impactdev.gts.common.config.types.time.TimeKey; -import net.impactdev.gts.common.config.wrappers.LazyBlacklist; -import net.impactdev.gts.common.discord.DiscordOption; -import net.impactdev.impactor.api.Impactor; -import net.impactdev.impactor.api.configuration.ConfigKey; -import net.impactdev.impactor.api.configuration.loader.KeyProvider; -import net.impactdev.impactor.api.storage.StorageCredentials; -import net.impactdev.impactor.api.storage.StorageType; -import net.impactdev.impactor.api.utilities.Time; -import net.impactdev.gts.api.blacklist.Blacklist; -import net.kyori.adventure.key.Key; -import org.mariuszgromada.math.mxparser.Function; - -import java.awt.Color; -import java.util.Map; -import java.util.List; -import java.util.function.BiFunction; - -import static net.impactdev.impactor.api.configuration.ConfigKeyTypes.*; +bbbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb; + +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.BbbbbbbbbBbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbbb; +bbbbbb bbb.bbbbbb.bbbbbb.bbbbbbb.Bbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.BBBBbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbb.BbbBbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.bbbbb.bbbb.BbbbBbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbb.bbbbbbbb.BbbbBbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbbbbb.bbbbbbb.BbbbbbbBbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.Bbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbbbbbb.BbbbbbBbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbbbbbb.bbbbbb.BbbBbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbb.BbbbbbbBbbbbbbbbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbb.BbbbbbbBbbb; +bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbb.Bbbb; +bbbbbb bbb.bbbbbbbbb.bbb.bbb.bbbbbbbbb.Bbbbbbbbb; +bbbbbb bbb.bbbbb.bbbbbbbbb.bbb.Bbb; +bbbbbb bbb.bbbbbbbbbbbbbb.bbbb.bbbbbbbb.Bbbbbbbb; + +bbbbbb bbbb.bbb.Bbbbb; +bbbbbb bbbb.bbbb.Bbb; +bbbbbb bbbb.bbbb.Bbbb; +bbbbbb bbbb.bbbb.bbbbbbbb.BbBbbbbbbb; + +bbbbbb bbbbbb bbb.bbbbbbbbb.bbbbbbbb.bbb.bbbbbbbbbbbbb.BbbbbbBbbBbbbb.*; /** - * Represents the configuration options available to GTS. These config keys represent a path to quickly receive the - * values of a config option from the file after they are loaded. + * Bbbbbbbbbb bbb bbbbbbbbbbbbb bbbbbbb bbbbbbbbb bb BBB. Bbbbb bbbbbb bbbb bbbbbbbbb b bbbb bb bbbbbbb bbbbbbb bbb + * bbbbbb bb b bbbbbb bbbbbb bbbb bbb bbbb bbbbb bbbb bbb bbbbbb. * - *

The values here have since been redone, in favor of a new level of organization alongside new options.

- * @since 6.0.0 + * Bbb bbbbbb bbbb bbbb bbbbb bbbb bbbbbb, bb bbbbb bb b bbb bbbbb bb bbbbbbbbbbbb bbbbbbbbb bbb bbbbbbb. + * @bbbbb 6.0.0 */ -@KeyProvider -public final class ConfigKeys { - - // Essential Settings - public static final ConfigKey USE_MULTI_SERVER = booleanKey("multi-server", false); - public static final ConfigKey LANGUAGE = stringKey("language", "en_us"); - public static final ConfigKey DEBUG_ENABLED = booleanKey("debug", false); - - // Storage Settings - public static final ConfigKey STORAGE_METHOD = enduringKey(customKey(adapter -> StorageType.parse(adapter.getString("storage-method", "H2")))); - public static final ConfigKey STORAGE_CREDENTIALS = enduringKey(customKey(adapter -> { - String address = adapter.getString("data.address", "localhost"); - String database = adapter.getString("data.database", "minecraft"); - String username = adapter.getString("data.username", "root"); - String password = adapter.getString("data.password", ""); - - int maxPoolSize = adapter.getInteger("data.pool-settings.maximum-pool-size", 10); - int minIdle = adapter.getInteger("data.pool-settings.minimum-idle", maxPoolSize); - int maxLifetime = adapter.getInteger("data.pool-settings.maximum-lifetime", 1800000); - int connectionTimeout = adapter.getInteger("data.pool-settings.connection-timeout", 5000); - int keepAliveTime = adapter.getInteger("data.pool-settings.keep-alive", 0); - Map props = ImmutableMap.copyOf(adapter.getStringMap("data.pool-settings.properties", ImmutableMap.of())); - return new StorageCredentials(address, database, username, password, maxPoolSize, minIdle, maxLifetime, keepAliveTime, connectionTimeout, props); +@BbbBbbbbbbb +bbbbbb bbbbb bbbbb BbbbbbBbbb { + + // Bbbbbbbbb Bbbbbbbb + bbbbbb bbbbbb bbbbb BbbbbbBbb BBB_BBBBB_BBBBBB = bbbbbbbBbb("bbbbb-bbbbbb", bbbbb); + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBBBBB = bbbbbbBbb("bbbbbbbb", "bb_bb"); + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBB_BBBBBBB = bbbbbbbBbb("bbbbb", bbbbb); + + // Bbbbbbb Bbbbbbbb + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBBBB_BBBBBB = bbbbbbbbBbb(bbbbbbBbb(bbbbbbb -> BbbbbbbBbbb.bbbbb(bbbbbbb.bbbBbbbbb("bbbbbbb-bbbbbb", "B2")))); + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBBBB_BBBBBBBBBBB = bbbbbbbbBbb(bbbbbbBbb(bbbbbbb -> { + Bbbbbb bbbbbbb = bbbbbbb.bbbBbbbbb("bbbb.bbbbbbb", "bbbbbbbbb"); + Bbbbbb bbbbbbbb = bbbbbbb.bbbBbbbbb("bbbb.bbbbbbbb", "bbbbbbbbb"); + Bbbbbb bbbbbbbb = bbbbbbb.bbbBbbbbb("bbbb.bbbbbbbb", "bbbb"); + Bbbbbb bbbbbbbb = bbbbbbb.bbbBbbbbb("bbbb.bbbbbbbb", ""); + + bbb bbbBbbbBbbb = bbbbbbb.bbbBbbbbbb("bbbb.bbbb-bbbbbbbb.bbbbbbb-bbbb-bbbb", 10); + bbb bbbBbbb = bbbbbbb.bbbBbbbbbb("bbbb.bbbb-bbbbbbbb.bbbbbbb-bbbb", bbbBbbbBbbb); + bbb bbbBbbbbbbb = bbbbbbb.bbbBbbbbbb("bbbb.bbbb-bbbbbbbb.bbbbbbb-bbbbbbbb", 1800000); + bbb bbbbbbbbbbBbbbbbb = bbbbbbb.bbbBbbbbbb("bbbb.bbbb-bbbbbbbb.bbbbbbbbbb-bbbbbbb", 5000); + bbb bbbbBbbbbBbbb = bbbbbbb.bbbBbbbbbb("bbbb.bbbb-bbbbbbbb.bbbb-bbbbb", 0); + Bbb bbbbb = BbbbbbbbbBbb.bbbbBb(bbbbbbb.bbbBbbbbbBbb("bbbb.bbbb-bbbbbbbb.bbbbbbbbbb", BbbbbbbbbBbb.bb())); + bbbbbb bbb BbbbbbbBbbbbbbbbbb(bbbbbbb, bbbbbbbb, bbbbbbbb, bbbbbbbb, bbbBbbbBbbb, bbbBbbb, bbbBbbbbbbb, bbbbBbbbbBbbb, bbbbbbbbbbBbbbbbb, bbbbb); })); - public static final ConfigKey SQL_TABLE_PREFIX = enduringKey(stringKey("table-prefix", "gts_")); - - // Plugin Messaging - public static final ConfigKey MESSAGE_SERVICE = stringKey("messaging-service", "none"); - public static final ConfigKey REDIS_ENABLED = booleanKey("redis.enabled", false); - public static final ConfigKey REDIS_ADDRESS = stringKey("redis.address", "localhost"); - public static final ConfigKey REDIS_PASSWORD = stringKey("redis.password", ""); - - // Discord Logging - public static final ConfigKey DISCORD_LOGGING_ENABLED = booleanKey("discord.enabled", true); - public static final ConfigKey DISCORD_AVATAR = stringKey("discord.avatar", "https://cdn.bulbagarden.net/upload/thumb/f/f5/399Bidoof.png/600px-399Bidoof.png"); - public static final ConfigKey DISCORD_TITLE = stringKey("discord.title", "GTS Logging"); - public static final ConfigKey> DISCORD_LINKS = customKey(adapter -> { - BiFunction options = (type, option) -> "discord.links.@type@.".replace("@type@", type) + option; - - Map links = Maps.newHashMap(); - links.put(DiscordOption.Options.List_BIN, new DiscordOption( - adapter.getString(options.apply("new-bin-listing", "descriptor"), "New \"Buy it Now\" Listing Published"), - Color.decode(adapter.getString(options.apply("new-bin-listing", "color"), "#00FF00")), - adapter.getStringList(options.apply("new-bin-listing", "hooks"), Lists.newArrayList()) + bbbbbb bbbbbb bbbbb BbbbbbBbb BBB_BBBBB_BBBBBB = bbbbbbbbBbb(bbbbbbBbb("bbbbb-bbbbbb", "bbb_")); + + // Bbbbbb Bbbbbbbbb + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBBBB_BBBBBBB = bbbbbbBbb("bbbbbbbbb-bbbbbbb", "bbbb"); + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBB_BBBBBBB = bbbbbbbBbb("bbbbb.bbbbbbb", bbbbb); + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBB_BBBBBBB = bbbbbbBbb("bbbbb.bbbbbbb", "bbbbbbbbb"); + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBB_BBBBBBBB = bbbbbbBbb("bbbbb.bbbbbbbb", ""); + + // Bbbbbbb Bbbbbbb + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBBBB_BBBBBBB_BBBBBBB = bbbbbbbBbb("bbbbbbb.bbbbbbb", bbbb); + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBBBB_BBBBBB = bbbbbbBbb("bbbbbbb.bbbbbb", "bbbbb://bbb.bbbbbbbbbbb.bbb/bbbbbb/bbbbb/b/b5/399Bbbbbb.bbb/600bb-399Bbbbbb.bbb"); + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBBBB_BBBBB = bbbbbbBbb("bbbbbbb.bbbbb", "BBB Bbbbbbb"); + bbbbbb bbbbbb bbbbb BbbbbbBbb> BBBBBBB_BBBBB = bbbbbbBbb(bbbbbbb -> { + BbBbbbbbbb bbbbbbb = (bbbb, bbbbbb) -> "bbbbbbb.bbbbb.@bbbb@.".bbbbbbb("@bbbb@", bbbb) + bbbbbb; + + Bbb bbbbb = Bbbb.bbbBbbbBbb(); + bbbbb.bbb(BbbbbbbBbbbbb.Bbbbbbb.Bbbb_BBB, bbb BbbbbbbBbbbbb( + bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbb-bbb-bbbbbbb", "bbbbbbbbbb"), "Bbb \"Bbb bb Bbb\" Bbbbbbb Bbbbbbbbb"), + Bbbbb.bbbbbb(bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbb-bbb-bbbbbbb", "bbbbb"), "#00BB00")), + bbbbbbb.bbbBbbbbbBbbb(bbbbbbb.bbbbb("bbb-bbb-bbbbbbb", "bbbbb"), Bbbbb.bbbBbbbbBbbb()) )); - links.put(DiscordOption.Options.List_Auction, new DiscordOption( - adapter.getString(options.apply("new-auction-listing", "descriptor"), "New Auction Published"), - Color.decode(adapter.getString(options.apply("new-auction-listing", "color"), "#66CCFF")), - adapter.getStringList(options.apply("new-auction-listing", "hooks"), Lists.newArrayList()) + bbbbb.bbb(BbbbbbbBbbbbb.Bbbbbbb.Bbbb_Bbbbbbb, bbb BbbbbbbBbbbbb( + bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbb-bbbbbbb-bbbbbbb", "bbbbbbbbbb"), "Bbb Bbbbbbb Bbbbbbbbb"), + Bbbbb.bbbbbb(bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbb-bbbbbbb-bbbbbbb", "bbbbb"), "#66BBBB")), + bbbbbbb.bbbBbbbbbBbbb(bbbbbbb.bbbbb("bbb-bbbbbbb-bbbbbbb", "bbbbb"), Bbbbb.bbbBbbbbBbbb()) )); - links.put(DiscordOption.Options.Purchase, new DiscordOption( - adapter.getString(options.apply("purchase", "descriptor"), "Listing Purchased"), - Color.decode(adapter.getString(options.apply("purchase", "color"), "#FFFF00")), - adapter.getStringList(options.apply("purchase", "hooks"), Lists.newArrayList()) + bbbbb.bbb(BbbbbbbBbbbbb.Bbbbbbb.Bbbbbbbb, bbb BbbbbbbBbbbbb( + bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbbbbbbb", "bbbbbbbbbb"), "Bbbbbbb Bbbbbbbbb"), + Bbbbb.bbbbbb(bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbbbbbbb", "bbbbb"), "#BBBB00")), + bbbbbbb.bbbBbbbbbBbbb(bbbbbbb.bbbbb("bbbbbbbb", "bbbbb"), Bbbbb.bbbBbbbbBbbb()) )); - links.put(DiscordOption.Options.Bid, new DiscordOption( - adapter.getString(options.apply("bid", "descriptor"), "Bid Posted"), - Color.decode(adapter.getString(options.apply("bid", "color"), "#FF9933")), - adapter.getStringList(options.apply("bid", "hooks"), Lists.newArrayList()) + bbbbb.bbb(BbbbbbbBbbbbb.Bbbbbbb.Bbb, bbb BbbbbbbBbbbbb( + bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbb", "bbbbbbbbbb"), "Bbb Bbbbbb"), + Bbbbb.bbbbbb(bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbb", "bbbbb"), "#BB9933")), + bbbbbbb.bbbBbbbbbBbbb(bbbbbbb.bbbbb("bbb", "bbbbb"), Bbbbb.bbbBbbbbBbbb()) )); - links.put(DiscordOption.Options.Remove, new DiscordOption( - adapter.getString(options.apply("remove", "descriptor"), "Listing Removed"), - Color.decode(adapter.getString(options.apply("remove", "color"), "#FF0000")), - adapter.getStringList(options.apply("remove", "hooks"), Lists.newArrayList()) + bbbbb.bbb(BbbbbbbBbbbbb.Bbbbbbb.Bbbbbb, bbb BbbbbbbBbbbbb( + bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbbbbb", "bbbbbbbbbb"), "Bbbbbbb Bbbbbbb"), + Bbbbb.bbbbbb(bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbbbbb", "bbbbb"), "#BB0000")), + bbbbbbb.bbbBbbbbbBbbb(bbbbbbb.bbbbb("bbbbbb", "bbbbb"), Bbbbb.bbbBbbbbBbbb()) )); - links.put(DiscordOption.Options.Claim, new DiscordOption( - adapter.getString(options.apply("claim", "descriptor"), "Listing Removed"), - Color.decode(adapter.getString(options.apply("claim", "color"), "#CC00FF")), - adapter.getStringList(options.apply("claim", "hooks"), Lists.newArrayList()) + bbbbb.bbb(BbbbbbbBbbbbb.Bbbbbbb.Bbbbb, bbb BbbbbbbBbbbbb( + bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbbbb", "bbbbbbbbbb"), "Bbbbbbb Bbbbbbb"), + Bbbbb.bbbbbb(bbbbbbb.bbbBbbbbb(bbbbbbb.bbbbb("bbbbb", "bbbbb"), "#BB00BB")), + bbbbbbb.bbbBbbbbbBbbb(bbbbbbb.bbbbb("bbbbb", "bbbbb"), Bbbbb.bbbBbbbbBbbb()) )); - return links; + bbbbbb bbbbb; }); - // Listing Management - public static final ConfigKey BLACKLIST = customKey(adapter -> new LazyBlacklist(() -> { - Blacklist blacklist = Impactor.getInstance().getRegistry().get(Blacklist.class); - List blocked = adapter.getKeys("blacklist", Lists.newArrayList()); - for(String classification : blocked) { - GTSService.getInstance().getGTSComponentManager().getEntryManager(classification).ifPresent(type -> { - Class register = type.getBlacklistType(); - for(String entry : adapter.getStringList("blacklist." + classification, Lists.newArrayList())) { - blacklist.append(register, entry); + // Bbbbbbb Bbbbbbbbbb + bbbbbb bbbbbb bbbbb BbbbbbBbb BBBBBBBBB = bbbbbbBbb(bbbbbbb -> bbb BbbbBbbbbbbbb(() -> { + Bbbbbbbbb bbbbbbbbb = Bbbbbbbb.bbbBbbbbbbb().bbbBbbbbbbb().bbb(Bbbbbbbbb.bbbbb); + Bbbb bbbbbbb = bbbbbbb.bbbBbbb("bbbbbbbbb", Bbbbb.bbbBbbbbBbbb()); + bbb(Bbbbbb bbbbbbbbbbbbbb : bbbbbbb) { + BBBBbbbbbb.bbbBbbbbbbb().bbbBBBBbbbbbbbbBbbbbbb().bbbBbbbbBbbbbbb(bbbbbbbbbbbbbb).bbBbbbbbb(bbbb -> { + Bbbbb bbbbbbbb = bbbb.bbbBbbbbbbbbBbbb(); + bbb(Bbbbbb bbbbb : bbbbbbb.bbbBbbbbbBbbb("bbbbbbbbb." + bbbbbbbbbbbbbb, Bbbbb.bbbBbbbbBbbb())) { + bbbbbbbbb.bbbbbb(bbbbbbbb, bbbbb); } }); } - return blacklist; + bbbbbb bbbbbbbbb; })); - public static final ConfigKey MAX_LISTINGS_PER_USER = intKey("max-listings-per-user", 5); - public static final ConfigKey