fix warnings
This commit is contained in:
@@ -15,14 +15,10 @@ public static class IteratorExtensions
|
|||||||
{
|
{
|
||||||
public bool MoveNext()
|
public bool MoveNext()
|
||||||
{
|
{
|
||||||
if (iterator.hasNext())
|
if (!iterator.hasNext()) return false;
|
||||||
{
|
|
||||||
Current = iterator.next() is T ? (T)iterator.next() : default;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Current = default;
|
Current = (T)iterator.next();
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Reset()
|
public void Reset()
|
||||||
@@ -32,7 +28,7 @@ public static class IteratorExtensions
|
|||||||
|
|
||||||
object? IEnumerator.Current => Current;
|
object? IEnumerator.Current => Current;
|
||||||
|
|
||||||
public T? Current { get; private set; }
|
public T Current { get; private set; }
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
using me.lucko.luckperms.common.command.utils;
|
using me.lucko.luckperms.common.command.utils;
|
||||||
using me.lucko.luckperms.common.plugin;
|
using me.lucko.luckperms.common.plugin;
|
||||||
using me.lucko.luckperms.common.sender;
|
|
||||||
using Torch.API.Managers;
|
using Torch.API.Managers;
|
||||||
using Torch.Commands;
|
using Torch.Commands;
|
||||||
using Torch.Managers;
|
using Torch.Managers;
|
||||||
@@ -24,7 +23,7 @@ public class LpCommandManager(LuckPermsPlugin plugin, LpSenderFactory senderFact
|
|||||||
foreach (var alias in Aliases)
|
foreach (var alias in Aliases)
|
||||||
{
|
{
|
||||||
_commandManager.Commands.AddCommand(new(alias, "LuckPerms commands", (ctx, _) => Execute(alias, ctx),
|
_commandManager.Commands.AddCommand(new(alias, "LuckPerms commands", (ctx, _) => Execute(alias, ctx),
|
||||||
((LpTorchBootstrap)plugin.getBootstrap()).GetTorchPlugin(), MyPromoteLevel.None));
|
((LpTorchBootstrap)getPlugin().getBootstrap()).GetTorchPlugin(), MyPromoteLevel.None));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||||
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
<NoWarn>CS9107</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||||
|
Reference in New Issue
Block a user