progress
This commit is contained in:
@@ -3,5 +3,10 @@ package us.ajg0702.queue.api;
|
||||
import us.ajg0702.queue.api.players.AdaptedPlayer;
|
||||
|
||||
public interface EventHandler {
|
||||
|
||||
void handleMessage(AdaptedPlayer reciever, byte[] data);
|
||||
|
||||
void onPlayerJoin(AdaptedPlayer player);
|
||||
|
||||
void onPlayerLeave(AdaptedPlayer player);
|
||||
}
|
||||
|
||||
@@ -19,4 +19,11 @@ public interface Logic {
|
||||
* @param player The player that is being queued
|
||||
*/
|
||||
QueuePlayer priorityLogic(QueueServer server, AdaptedPlayer player);
|
||||
|
||||
/**
|
||||
* The logic for checking if a player has been disconnected for too long
|
||||
* @param player The player to check
|
||||
* @return true if the player has been disconnected for too long and should be removed from the queue
|
||||
*/
|
||||
boolean playerDisconnectedTooLong(QueuePlayer player);
|
||||
}
|
||||
|
||||
@@ -9,14 +9,6 @@ import us.ajg0702.queue.api.queues.QueueServer;
|
||||
import java.util.List;
|
||||
|
||||
public interface PlatformMethods {
|
||||
/**
|
||||
* BungeeUtils.sendCustomData(p, "position", pos+"");
|
||||
* BungeeUtils.sendCustomData(p, "positionof", len+"");
|
||||
* BungeeUtils.sendCustomData(p, "queuename", pl.aliases.getAlias(s));
|
||||
* BungeeUtils.sendCustomData(p, "inqueue", "true");
|
||||
* BungeeUtils.sendCustomData(p, "inqueueevent", "true");
|
||||
*/
|
||||
void sendJoinQueueChannelMessages(QueueServer queueServer, QueuePlayer queuePlayer);
|
||||
|
||||
/**
|
||||
* Sends a plugin message on the plugin messaging channel
|
||||
|
||||
@@ -56,4 +56,10 @@ public interface QueuePlayer {
|
||||
* @return the player's username
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Returns the number of miliseconds since this player was online
|
||||
* @return The number of miliseconds since this player was online
|
||||
*/
|
||||
long getTimeSinceOnline();
|
||||
}
|
||||
|
||||
@@ -198,6 +198,12 @@ public interface QueueServer {
|
||||
*/
|
||||
QueuePlayer findPlayer(AdaptedPlayer player);
|
||||
|
||||
/**
|
||||
* Finds the player with this uuid in this queue and returns the representative QueuePlayer
|
||||
* @return The QueuePlayer representing the player, null if not found
|
||||
*/
|
||||
QueuePlayer findPlayer(UUID uuid);
|
||||
|
||||
|
||||
/**
|
||||
* Gets the most ideal server in this group to join
|
||||
|
||||
Reference in New Issue
Block a user