mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-02-23 15:21:30 +01:00
Add warning if hideTablist is not compatible with the mc version
(Fixes #680)
This commit is contained in:
parent
b32e5da4c5
commit
c8b191fda0
@ -8,15 +8,18 @@ import com.comphenix.protocol.events.PacketAdapter;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
import com.comphenix.protocol.events.PacketEvent;
|
||||
import com.comphenix.protocol.reflect.FieldAccessException;
|
||||
import com.comphenix.protocol.utility.MinecraftVersion;
|
||||
import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode;
|
||||
import com.comphenix.protocol.wrappers.EnumWrappers.PlayerInfoAction;
|
||||
import com.comphenix.protocol.wrappers.PlayerInfoData;
|
||||
import com.comphenix.protocol.wrappers.WrappedChatComponent;
|
||||
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.util.BukkitService;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@ -80,7 +83,12 @@ public class AuthMeTablistPacketAdapter extends PacketAdapter {
|
||||
}
|
||||
|
||||
public void register() {
|
||||
ProtocolLibrary.getProtocolManager().addPacketListener(this);
|
||||
if (MinecraftVersion.getCurrentVersion().isAtLeast(MinecraftVersion.BOUNTIFUL_UPDATE)) {
|
||||
ProtocolLibrary.getProtocolManager().addPacketListener(this);
|
||||
} else {
|
||||
ConsoleLogger.info("The hideTablist feature is not compatible with your minecraft version");
|
||||
ConsoleLogger.info("It requires 1.8+. Disabling the hideTablist feature...");
|
||||
}
|
||||
}
|
||||
|
||||
public void unregister() {
|
||||
|
Loading…
Reference in New Issue
Block a user