various fixes + new custom class shadowmancer

This commit is contained in:
2025-07-12 20:18:02 +02:00
parent 0615f8aeea
commit 78fa56dce9
10 changed files with 356 additions and 10 deletions
+16
View File
@@ -1,9 +1,11 @@
using CommandSystem;
using LabApi.Features.Permissions;
using LabApi.Features.Wrappers;
namespace CustomClasses;
[CommandHandler(typeof(RemoteAdminCommandHandler))]
[CommandHandler(typeof(ClientCommandHandler))]
public class SetCClassCommand : ICommand
{
public string Command => "setcclass";
@@ -11,6 +13,19 @@ public class SetCClassCommand : ICommand
public string Description => "Forces a player to become a specific custom class";
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
var executor = Player.Get(sender);
if (executor == null)
{
response = "You must be a player to use this command!";
return false;
}
if (!executor.HasPermissions("customclasses.setcustomclass"))
{
response = "You do not have permission to use this command!";
return false;
}
var args = arguments.Array!;
if (arguments.Count < 2)
{
@@ -51,6 +66,7 @@ public class SetCClassCommand : ICommand
{
SerpentsHandManager.PreSpawn(player);
}),
"negromancer" => manager.ForceSpawn(player, customClasses.NegromancerConfig, typeof(NegromancerConfig), null),
_ => false
};