2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-23 04:28:01 +00:00

Remove generics used for events in PlayerData

This commit is contained in:
mohammed jasem alaajel 2024-09-28 12:32:30 +04:00
parent 348aff1704
commit 674661a02c
Signed by: ham1255
GPG Key ID: EF343502046229F4
6 changed files with 13 additions and 13 deletions

View File

@ -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());

View File

@ -65,7 +65,7 @@ public interface RedisBungeePlugin<P> extends EventsPlatform {
ProxyDataManager proxyDataManager(); ProxyDataManager proxyDataManager();
PlayerDataManager<P, ?, ?, ?, ?, ?, ?, ?> playerDataManager(); PlayerDataManager<P> playerDataManager();
UUIDTranslator getUuidTranslator(); UUIDTranslator getUuidTranslator();

View File

@ -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);

View File

@ -99,7 +99,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;
} }

View File

@ -151,7 +151,7 @@ public class RedisBungeeVelocityPlugin implements RedisBungeePlugin<Player>, Con
} }
@Override @Override
public PlayerDataManager<Player, ?, ?, ?, ?, ?, ?, ?> playerDataManager() { public PlayerDataManager<Player> playerDataManager() {
return this.playerDataManager; return this.playerDataManager;
} }

View File

@ -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);
} }