mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 14:38:45 +00:00
Improved velocity handling (#132), some refactoring and small changes
This commit is contained in:
1 parent
9550cc1d09
commit
e2d0fbda18
15 files changed
+211
-160
No files matched your search
@@ -22,6 +22,7 @@ package com.rammelkast.anticheatreloaded.manage;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.bukkit.BanList.Type;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -102,13 +103,7 @@ public final class UserManager {
|
||||
* @param group Group to find users of
|
||||
*/
|
||||
public List<User> getUsersInGroup(final Group group) {
|
||||
final List<User> list = new ArrayList<User>();
|
||||
for (final User user : users) {
|
||||
if (user.getGroup() == group) {
|
||||
list.add(user);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
return this.users.parallelStream().filter(user -> user.getGroup() == group).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user