add luckperms plugin

This commit is contained in:
zznty
2023-11-09 16:53:02 +07:00
parent b05113f971
commit ec5e20b922
98 changed files with 3230 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
using System.Collections.Generic;
using System.Linq;
using java.util;
namespace LuckPerms.Torch.Extensions;
public static class EnumerableExtensions
{
public static Collection ToCollection<T>(this IEnumerable<T> enumerable)
{
var collection = enumerable is IReadOnlyCollection<T> readOnlyCollection ? new ArrayList(readOnlyCollection.Count) : new ArrayList(((IReadOnlyCollection<T>)(enumerable = enumerable.ToArray())).Count);
foreach (var t in enumerable)
{
collection.add(t);
}
return collection;
}
}