alias für managefactionranks
This commit is contained in:
@@ -2005,6 +2005,8 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
case "fvehicle":
|
case "fvehicle":
|
||||||
if (player.IsInVehicle)
|
if (player.IsInVehicle)
|
||||||
{
|
{
|
||||||
|
string fIdStr = option1 + " " + option2;
|
||||||
|
|
||||||
int? factionId = null;
|
int? factionId = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -2454,7 +2456,7 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
#endregion
|
#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)
|
public void CmdFactionManageFactionRanks(Player player, int factionID)
|
||||||
{
|
{
|
||||||
if (!player.GetUser()?.IsAdmin(AdminLevel.HEADADMIN) ?? true)
|
if (!player.GetUser()?.IsAdmin(AdminLevel.HEADADMIN) ?? true)
|
||||||
|
|||||||
@@ -49,7 +49,13 @@ namespace ReallifeGamemode.Server
|
|||||||
.Where(m => m.GetCustomAttributes(typeof(CommandAttribute), false).Length > 0)
|
.Where(m => m.GetCustomAttributes(typeof(CommandAttribute), false).Length > 0)
|
||||||
.ToArray();
|
.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();
|
IAPI apiInstance = new RageAPI();
|
||||||
eventHandler = new EventHandler(apiInstance);
|
eventHandler = new EventHandler(apiInstance);
|
||||||
|
|||||||
Reference in New Issue
Block a user