mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2026-04-18 23:48:41 +02:00
Stop ProtocolSupport from crying
If I ever tried to either cast or use FloodgatePlayer as a return type when Floodgate was not installed in the server, I got this error: [19:37:46 ERROR]: [FastLogin] Plugin FastLogin v1.11-SNAPSHOT-744264d has failed to register events for class com.github.games647.fastlogin.bukkit.listener.protocolsupport.ProtocolSupportListener because org/geysermc/floodgate/api/player/FloodgatePlayer does not exist. ProtocolLib doen't have this problem.
This commit is contained in:
@@ -42,7 +42,6 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.geysermc.floodgate.api.player.FloodgatePlayer;
|
||||
|
||||
import protocolsupport.api.events.ConnectionCloseEvent;
|
||||
import protocolsupport.api.events.PlayerLoginStartEvent;
|
||||
@@ -132,7 +131,7 @@ public class ProtocolSupportListener extends JoinManagement<Player, CommandSende
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FloodgatePlayer getFloodgatePlayer(Object id) {
|
||||
protected Object getFloodgatePlayer(Object id) {
|
||||
if ((id instanceof String)) {
|
||||
return floodgateHook.getFloodgatePlayer((String) id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user