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,19 @@
using System;
using System.IO;
using java.io;
using Torch.Utils;
namespace LuckPerms.Torch.Extensions;
public static class StreamExtensions
{
public static InputStream GetInputStream(this Stream stream)
{
if (!stream.CanRead)
throw new ArgumentException("Stream should be readable", nameof(stream));
var array = stream.ReadToEnd(); // TODO make it not allocate array for an entire stream content
return new ByteArrayInputStream(array);
}
}