alias für managefactionranks
This commit is contained in:
@@ -2005,6 +2005,8 @@ namespace ReallifeGamemode.Server.Commands
|
||||
case "fvehicle":
|
||||
if (player.IsInVehicle)
|
||||
{
|
||||
string fIdStr = option1 + " " + option2;
|
||||
|
||||
int? factionId = null;
|
||||
try
|
||||
{
|
||||
@@ -2454,7 +2456,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
#endregion
|
||||
|
||||
//
|
||||
[Command("managefactionranks", "~m~Benutzung: ~s~/managefactionranks [Fraktions-ID]")]
|
||||
[Command("managefactionranks", "~m~Benutzung: ~s~/managefactionranks [Fraktions-ID]", Alias = "mfr")]
|
||||
public void CmdFactionManageFactionRanks(Player player, int factionID)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.HEADADMIN) ?? true)
|
||||
|
||||
@@ -49,7 +49,13 @@ namespace ReallifeGamemode.Server
|
||||
.Where(m => m.GetCustomAttributes(typeof(CommandAttribute), false).Length > 0)
|
||||
.ToArray();
|
||||
|
||||
var registeredCommands = methods.Select(c => c.GetCustomAttribute<CommandAttribute>().CommandString);
|
||||
var cmdAttributes = methods.Select(c => c.GetCustomAttribute<CommandAttribute>()).ToList();
|
||||
|
||||
var registeredCommands = cmdAttributes.Select(c => c.CommandString).ToList();
|
||||
cmdAttributes.Where(c => c.Alias?.Any() ?? false).ToList().ForEach(a =>
|
||||
{
|
||||
registeredCommands.AddRange(a.Alias.Split(','));
|
||||
});
|
||||
|
||||
IAPI apiInstance = new RageAPI();
|
||||
eventHandler = new EventHandler(apiInstance);
|
||||
|
||||
Reference in New Issue
Block a user