mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-12-26 20:15:29 +00:00
Remove generics used for events in PlayerData
This commit is contained in:
parent
8edee620b1
commit
b23e852afd
@ -32,7 +32,7 @@ import java.net.InetAddress;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public abstract class PlayerDataManager<P, LE, DE, PS extends IPubSubMessageEvent, SC extends IPlayerChangedServerNetworkEvent, NJE extends IPlayerLeftNetworkEvent, CE, PJN extends IPlayerJoinedNetworkEvent> {
|
public abstract class PlayerDataManager<P> {
|
||||||
|
|
||||||
protected final RedisBungeePlugin<P> plugin;
|
protected final RedisBungeePlugin<P> plugin;
|
||||||
private final Object SERVERS_TO_PLAYERS_KEY = new Object();
|
private final Object SERVERS_TO_PLAYERS_KEY = new Object();
|
||||||
@ -56,20 +56,20 @@ public abstract class PlayerDataManager<P, LE, DE, PS extends IPubSubMessageEven
|
|||||||
|
|
||||||
// handle network wide
|
// handle network wide
|
||||||
// server change
|
// server change
|
||||||
//l public abstract void onPlayerChangedServerNetworkEvent(SC event);
|
// public void onPlayerChangedServerNetworkEvent
|
||||||
|
|
||||||
// public abstract void onNetworkPlayerQuit(NJE event);
|
// public void onNetworkPlayerQuit
|
||||||
|
|
||||||
// public abstract void onNetworkPlayerJoin(PJN event);
|
// public void onNetworkPlayerJoin
|
||||||
|
|
||||||
// local events
|
// local events
|
||||||
//public abstract void onPubSubMessageEvent(PS event);
|
// public void onPubSubMessageEvent
|
||||||
|
|
||||||
//public abstract void onServerConnectedEvent(CE event);
|
// public void onServerConnectedEvent
|
||||||
|
|
||||||
//public abstract void onLoginEvent(LE event);
|
// public void onLoginEvent
|
||||||
|
|
||||||
//public abstract void onDisconnectEvent(DE event);
|
// public void onDisconnectEvent
|
||||||
|
|
||||||
protected void handleNetworkPlayerServerChange(IPlayerChangedServerNetworkEvent event) {
|
protected void handleNetworkPlayerServerChange(IPlayerChangedServerNetworkEvent event) {
|
||||||
this.serverCache.invalidate(event.getUuid());
|
this.serverCache.invalidate(event.getUuid());
|
||||||
|
@ -65,7 +65,7 @@ public interface RedisBungeePlugin<P> extends EventsPlatform {
|
|||||||
|
|
||||||
ProxyDataManager proxyDataManager();
|
ProxyDataManager proxyDataManager();
|
||||||
|
|
||||||
PlayerDataManager<P, ?, ?, ?, ?, ?, ?, ?> playerDataManager();
|
PlayerDataManager<P> playerDataManager();
|
||||||
|
|
||||||
UUIDTranslator getUuidTranslator();
|
UUIDTranslator getUuidTranslator();
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import net.md_5.bungee.event.EventHandler;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
|
||||||
public class BungeePlayerDataManager extends PlayerDataManager<ProxiedPlayer, PostLoginEvent, PlayerDisconnectEvent, PubSubMessageEvent, PlayerChangedServerNetworkEvent, PlayerLeftNetworkEvent, ServerConnectedEvent, PlayerJoinedNetworkEvent> implements Listener {
|
public class BungeePlayerDataManager extends PlayerDataManager<ProxiedPlayer> implements Listener {
|
||||||
|
|
||||||
public BungeePlayerDataManager(RedisBungeePlugin<ProxiedPlayer> plugin) {
|
public BungeePlayerDataManager(RedisBungeePlugin<ProxiedPlayer> plugin) {
|
||||||
super(plugin);
|
super(plugin);
|
||||||
|
@ -94,7 +94,7 @@ public class RedisBungee extends Plugin implements RedisBungeePlugin<ProxiedPlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayerDataManager<ProxiedPlayer, ?, ?, ?, ?, ?, ?, ?> playerDataManager() {
|
public PlayerDataManager<ProxiedPlayer> playerDataManager() {
|
||||||
return this.playerDataManager;
|
return this.playerDataManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ public class RedisBungeeVelocityPlugin implements RedisBungeePlugin<Player>, Con
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayerDataManager<Player, ?, ?, ?, ?, ?, ?, ?> playerDataManager() {
|
public PlayerDataManager<Player> playerDataManager() {
|
||||||
return this.playerDataManager;
|
return this.playerDataManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import net.kyori.adventure.text.Component;
|
|||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class VelocityPlayerDataManager extends PlayerDataManager<Player, PostLoginEvent, DisconnectEvent, PubSubMessageEvent, PlayerChangedServerNetworkEvent, PlayerLeftNetworkEvent, ServerConnectedEvent, PlayerJoinedNetworkEvent> {
|
public class VelocityPlayerDataManager extends PlayerDataManager<Player> {
|
||||||
public VelocityPlayerDataManager(RedisBungeePlugin<Player> plugin) {
|
public VelocityPlayerDataManager(RedisBungeePlugin<Player> plugin) {
|
||||||
super(plugin);
|
super(plugin);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user