Skip to content

Commit 69f95cf

Browse files
fix SetInfoArea so it accepts multiple flags
1 parent 7d94acb commit 69f95cf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

MethodSystem/Methods/PlayerMethods/SetInfoAreaMethod.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
using LabApi.Features.Wrappers;
1+
using System.Linq;
2+
using System.Collections.Generic;
3+
using LabApi.Features.Wrappers;
24
using SER.ArgumentSystem.Arguments;
35
using SER.ArgumentSystem.BaseArguments;
46
using SER.MethodSystem.BaseMethods;
5-
using System.Collections.Generic;
67

78
namespace SER.MethodSystem.Methods.PlayerMethods;
89

@@ -22,7 +23,9 @@ public class SetInfoAreaMethod : SynchronousMethod
2223
public override void Execute()
2324
{
2425
List<Player> players = Args.GetPlayers("players");
25-
PlayerInfoArea info = Args.GetEnum<PlayerInfoArea>("info area");
26+
PlayerInfoArea info = Args.GetRemainingArguments<object, EnumArgument<PlayerInfoArea>>("info area")
27+
.Cast<PlayerInfoArea>()
28+
.Aggregate(PlayerInfoArea.Nickname, (a, b) => a | b);
2629

2730
players.ForEach(p => p.InfoArea = info);
2831
}

0 commit comments

Comments
 (0)