Created
July 11, 2016 18:30
-
-
Save MiniDigger/fff32452c3e51f581d32ce8796bf3ea5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Player> list = Bukkit.getOnlinePlayers().stream().filter(p -> !p.hasPermission("premium.kick")).collect(Collectors.toList()); | |
ThreadLocalRandom.current().ints(5, 0, list.size()).iterate(0, i -> i + 1).forEach(list.get(i).kickPlayer(Lang.PREM_KICK_MSG)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bukkit.getOnlinePlayers().stream().filter(p -> !p.hasPermission("premium.kick")).sorted((o1, o2) -> ThreadLocalRandom.current().nextInt(-1, 2)).limit(5).forEach(p -> p.kickPlayer(Lang.PREM_KICK_MSG));