mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-04-18 20:40:26 +00:00
finished but untest
This commit is contained in:
@@ -147,9 +147,10 @@ public abstract class DataManager<P, PL, PD, PS> {
|
||||
serverCache.invalidate(uuid);
|
||||
proxyCache.invalidate(uuid);
|
||||
}
|
||||
// Invalidate all entries related to this player, since they now lie. (call invalidate(uuid))
|
||||
|
||||
|
||||
public abstract void onPostLogin(PL event);
|
||||
// Invalidate all entries related to this player, since they now lie. (call invalidate(uuid))
|
||||
|
||||
public abstract void onPlayerDisconnect(PD event);
|
||||
|
||||
public abstract void onPubSubMessage(PS event);
|
||||
@@ -227,7 +228,6 @@ public abstract class DataManager<P, PL, PD, PS> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class DataManagerMessage {
|
||||
private final UUID target;
|
||||
private final String source;
|
||||
|
||||
@@ -17,20 +17,30 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
public interface RedisBungeePlugin<P> {
|
||||
|
||||
void enable();
|
||||
default void enable() {
|
||||
|
||||
void disable();
|
||||
}
|
||||
|
||||
default void disable() {
|
||||
|
||||
}
|
||||
|
||||
RedisBungeeConfiguration getConfiguration();
|
||||
|
||||
int getCount();
|
||||
|
||||
int getCurrentCount();
|
||||
|
||||
Set<String> getLocalPlayersAsUuidStrings();
|
||||
|
||||
DataManager<P, ?, ?, ?> getDataManager();
|
||||
|
||||
Set<UUID> getPlayers();
|
||||
|
||||
Jedis requestJedis();
|
||||
|
||||
boolean isJedisAvailable();
|
||||
|
||||
RedisBungeeAPI getApi();
|
||||
|
||||
UUIDTranslator getUuidTranslator();
|
||||
@@ -43,15 +53,17 @@ public interface RedisBungeePlugin<P> {
|
||||
|
||||
List<String> getServerIds();
|
||||
|
||||
List<String > getCurrentServerIds(boolean nag, boolean lagged);
|
||||
|
||||
PubSubListener getPubSubListener();
|
||||
|
||||
void sendChannelMessage(String channel, String message);
|
||||
|
||||
void executeAsync(Runnable runnable);
|
||||
|
||||
void executeAsyncAfter(Runnable runnable, TimeUnit timeUnit, int seconds);
|
||||
void executeAsyncAfter(Runnable runnable, TimeUnit timeUnit, int time);
|
||||
|
||||
void callEvent(Object object);
|
||||
void callEvent(Object event);
|
||||
|
||||
boolean isOnlineMode();
|
||||
|
||||
@@ -61,8 +73,6 @@ public interface RedisBungeePlugin<P> {
|
||||
|
||||
void logFatal(String msg);
|
||||
|
||||
boolean isPlayerServerNull(P player);
|
||||
|
||||
P getPlayer(UUID uuid);
|
||||
|
||||
P getPlayer(String name);
|
||||
@@ -77,7 +87,7 @@ public interface RedisBungeePlugin<P> {
|
||||
|
||||
InetAddress getPlayerIp(P player);
|
||||
|
||||
void executeProxyCommand(String cmd);
|
||||
void sendProxyCommand(String cmd);
|
||||
|
||||
default Class<?> getPubSubEventClass() {
|
||||
return PubSubMessageEvent.class;
|
||||
@@ -95,4 +105,8 @@ public interface RedisBungeePlugin<P> {
|
||||
return PlayerLeftNetworkEvent.class;
|
||||
}
|
||||
|
||||
long getRedisTime(List<String> timeRes);
|
||||
|
||||
void loadConfig() throws Exception;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user