Skip to content

Commit

Permalink
Remove generics used for events in PlayerData
Browse files Browse the repository at this point in the history
  • Loading branch information
ham1255 committed Sep 28, 2024
1 parent 128c3ed commit 32e9fb1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.*;
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;
private final Object SERVERS_TO_PLAYERS_KEY = new Object();
Expand All @@ -56,20 +56,20 @@ public PlayerDataManager(RedisBungeePlugin<P> plugin) {

// handle network wide
// 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
//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) {
this.serverCache.invalidate(event.getUuid());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ default void stop() {

ProxyDataManager proxyDataManager();

PlayerDataManager<P, ?, ?, ?, ?, ?, ?, ?> playerDataManager();
PlayerDataManager<P> playerDataManager();

UUIDTranslator getUuidTranslator();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
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) {
super(plugin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public ProxyDataManager proxyDataManager() {
}

@Override
public PlayerDataManager<ProxiedPlayer, ?, ?, ?, ?, ?, ?, ?> playerDataManager() {
public PlayerDataManager<ProxiedPlayer> playerDataManager() {
return this.playerDataManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public ProxyDataManager proxyDataManager() {
}

@Override
public PlayerDataManager<Player, ?, ?, ?, ?, ?, ?, ?> playerDataManager() {
public PlayerDataManager<Player> playerDataManager() {
return this.playerDataManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

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) {
super(plugin);
}
Expand Down

0 comments on commit 32e9fb1

Please sign in to comment.