Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onLogin(PlayerLoginEvent e){
- Player p = e.getPlayer();
- int random = new Random().nextInt(Bukkit.getOnlinePlayers().length);
- Player player = Bukkit.getOnlinePlayers()[random];
- if (e.getResult() == Result.KICK_FULL){
- if (p.hasPermission("premium.join")){
- e.allow();
- if (!player.hasPermission("premium.join")){
- player.kickPlayer("You're kicked to let the premium players join the server");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment