clean some stuff up

This commit is contained in:
ajgeiss0702
2021-07-12 14:37:12 -07:00
parent 6f24594945
commit 0999c2dee4
29 changed files with 64 additions and 92 deletions
@@ -1,5 +1,6 @@
package us.ajg0702.queue.api;
@SuppressWarnings("unused")
public interface AliasManager {
/**
* Gets an alias from the server/group's name
@@ -4,7 +4,7 @@ import us.ajg0702.queue.api.players.AdaptedPlayer;
import us.ajg0702.queue.api.players.QueuePlayer;
import us.ajg0702.queue.api.queues.QueueServer;
import java.util.List;
@SuppressWarnings({"SameReturnValue", "unused"})
public interface Logic {
/**
@@ -15,7 +15,6 @@ public interface Logic {
/**
* The priority logic that is executed if the plugin is premium.
* @param list The current queue
* @param server The server/group name that is being queued for
* @param player The player that is being queued
*/
@@ -2,6 +2,7 @@ package us.ajg0702.queue.api;
import us.ajg0702.utils.common.Config;
@SuppressWarnings("unused")
public interface LogicGetter {
Logic constructLogic();
AliasManager constructAliasManager(Config config);
@@ -4,7 +4,6 @@ import us.ajg0702.queue.api.commands.ICommandSender;
import us.ajg0702.queue.api.players.AdaptedPlayer;
import us.ajg0702.queue.api.players.QueuePlayer;
import us.ajg0702.queue.api.queues.QueueServer;
import us.ajg0702.queue.api.server.AdaptedServer;
public interface PlatformMethods {
/**
@@ -22,6 +21,7 @@ public interface PlatformMethods {
* @param channel The (sub)channel
* @param data The data
*/
@SuppressWarnings("EmptyMethod")
void sendPluginMessage(AdaptedPlayer player, String channel, String... data);
/**
@@ -21,6 +21,7 @@ public interface QueueManager {
* @param serverName The name of the server or group to add the player too
* @return True if adding was successfull, false if not.
*/
@SuppressWarnings("UnusedReturnValue")
boolean addToQueue(AdaptedPlayer player, String serverName);
/**
@@ -5,6 +5,7 @@ import us.ajg0702.utils.common.Messages;
import java.util.List;
@SuppressWarnings("unused")
public interface IBaseCommand {
String getName();
@@ -1,8 +1,4 @@
package us.ajg0702.queue.api.commands;
import com.google.common.collect.ImmutableList;
import java.util.List;
public interface ISubCommand extends IBaseCommand {
}
@@ -2,6 +2,7 @@ package us.ajg0702.queue.api.players;
import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.text.Component;
import org.jetbrains.annotations.NotNull;
import us.ajg0702.queue.api.server.AdaptedServer;
import us.ajg0702.queue.api.util.Handle;
@@ -10,25 +11,27 @@ import java.util.UUID;
/**
* Represents a cross-platform player
*/
@SuppressWarnings("unused")
public interface AdaptedPlayer extends Handle, Audience {
/**
* Check if the plauer is currently connected
* @return True if connected, false if not
*/
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
boolean isConnected();
/**
* Send a player a message from a Component
* @param message The message to send
*/
void sendMessage(Component message);
void sendMessage(@NotNull Component message);
/**
* Sends an actionbar message to the player
* @param message The message to send
*/
void sendActionBar(Component message);
void sendActionBar(@NotNull Component message);
/**
* Send a player a message from a string
@@ -13,6 +13,7 @@ import java.util.UUID;
/**
* Represents a server or a group that can be queued for
*/
@SuppressWarnings("unused")
public interface QueueServer {
/**
@@ -52,6 +53,12 @@ public interface QueueServer {
*/
long getLastSentTime();
/**
* Sets the time the last person was sent
* @param lastSentTime the time the last person was sent
*/
void setLastSentTime(long lastSentTime);
/**
@@ -210,7 +217,7 @@ public interface QueueServer {
* elliot is bad
* @return true because elliot is bad
*/
@SuppressWarnings("unused")
@SuppressWarnings({"unused", "SameReturnValue"})
default boolean elliot_is_bad() {
return true;
}
@@ -5,6 +5,7 @@ import us.ajg0702.queue.api.util.Handle;
import java.util.concurrent.CompletableFuture;
@SuppressWarnings("unused")
public interface AdaptedServer extends Handle {
/**
@@ -32,6 +33,7 @@ public interface AdaptedServer extends Handle {
* @param player The player to check
* @return False if the server is restricted and the player does not have permission to join.
*/
@SuppressWarnings("SameReturnValue")
boolean canAccess(AdaptedPlayer player);
}
@@ -3,6 +3,7 @@ package us.ajg0702.queue.api.server;
import net.kyori.adventure.text.Component;
import us.ajg0702.queue.api.util.Handle;
@SuppressWarnings("unused")
public interface AdaptedServerPing extends Handle {
/**
* Gets the component of the description (aka MOTD)