

event.setLoginResult(Result.KICK_FULL);
复制代码
[娱乐]DeathBan —— 只要你死了就会被封禁![全版本]
https://www.mcbbs.net/thread-1040101-1-1.html
(出处: Minecraft(我的世界)中文论坛)
这插件的异步登入事件监听部分
- @EventHandler(priority = EventPriority.HIGHEST)
- public void Login(AsyncPlayerPreLoginEvent a) {
- FileConfiguration config1=YamlConfiguration.loadConfiguration(file);
- if(!(Main.time.containsKey(a.getName()))||Main.time.size()==0) {
- return;
- }
- a.setLoginResult(Result.KICK_FULL);
- a.setKickMessage(ChatColor.translateAlternateColorCodes('&',config1.getString("BanTimeMessage").replace("[time]", Main.time.get(a.getName())+"")));
- }
[娱乐]DeathBan —— 只要你死了就会被封禁![全版本]
https://www.mcbbs.net/thread-1040101-1-1.html
(出处: Minecraft(我的世界)中文论坛)
这插件的异步登入事件监听部分
结城希亚 发表于 2020-5-8 14:48
event.setLoginResult(Result.KICK_FULL);
非常感谢