mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-02-03 14:11:30 +01:00
Correctly clone enum set.
This commit is contained in:
parent
18f5998f8a
commit
b27922dd3d
@ -237,7 +237,7 @@ public class ListeningWhitelist {
|
||||
* @return A copy of the enum set.
|
||||
*/
|
||||
private static <T extends Enum<T>> EnumSet<T> safeEnumSet(Collection<T> options, Class<T> enumClass) {
|
||||
if (options != null) {
|
||||
if (options != null && !options.isEmpty()) {
|
||||
return EnumSet.copyOf(options);
|
||||
} else {
|
||||
return EnumSet.noneOf(enumClass);
|
||||
|
Loading…
Reference in New Issue
Block a user