allow restricting joining queues to certain protocol versions
This commit is contained in:
@@ -95,6 +95,13 @@ public abstract class AjQueueAPI {
|
||||
*/
|
||||
public abstract LogicGetter getLogicGetter();
|
||||
|
||||
/**
|
||||
* Gets the protocol name manager
|
||||
* Used to get version names from protocol versions
|
||||
* @return The ProtocolNameManager
|
||||
*/
|
||||
public abstract ProtocolNameManager getProtocolNameManager();
|
||||
|
||||
/**
|
||||
* Tells ajQueue to shut down.
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,6 @@ public interface PlatformMethods {
|
||||
* @param channel The (sub)channel
|
||||
* @param data The data
|
||||
*/
|
||||
@SuppressWarnings("EmptyMethod")
|
||||
void sendPluginMessage(AdaptedPlayer player, String channel, String... data);
|
||||
|
||||
/**
|
||||
@@ -28,6 +27,7 @@ public interface PlatformMethods {
|
||||
|
||||
String getPluginVersion();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
List<AdaptedPlayer> getOnlinePlayers();
|
||||
List<String> getPlayerNames(boolean lowercase);
|
||||
|
||||
@@ -74,4 +74,6 @@ public interface PlatformMethods {
|
||||
AdaptedServer getServer(String name);
|
||||
|
||||
List<AdaptedServer> getServers();
|
||||
|
||||
String getProtocolName(int protocol);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package us.ajg0702.queue.api;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public interface ProtocolNameManager {
|
||||
String getProtocolName(int protocol);
|
||||
HashMap<Integer, String> getProtocolNames();
|
||||
}
|
||||
@@ -218,6 +218,20 @@ public interface QueueServer {
|
||||
*/
|
||||
HashMap<AdaptedServer, AdaptedServerPing> getLastPings();
|
||||
|
||||
/**
|
||||
* Gets the protocol versions this queue supports.
|
||||
* A blank list means all protocols are supported.
|
||||
* @return The protocol versions this queue supports
|
||||
*/
|
||||
List<Integer> getSupportedProtocols();
|
||||
|
||||
/**
|
||||
* Sets the protocols that are supported
|
||||
* A blank list means all protocols are supported.
|
||||
* @param list the list of protocols that are supported
|
||||
*/
|
||||
void setSupportedProtocols(List<Integer> list);
|
||||
|
||||
|
||||
/**
|
||||
* elliot is bad
|
||||
|
||||
Reference in New Issue
Block a user