various fixes + new custom class shadowmancer
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user