File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
MethodSystem/Methods/PlayerMethods Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,25 @@ public class SetGroupMethod : SynchronousMethod
1010{
1111 public override string Description => "Sets or removes group from specified players" ;
1212
13- public override Argument [ ] ExpectedArguments => [
13+ public override Argument [ ] ExpectedArguments =>
14+ [
1415 new PlayersArgument ( "players" ) ,
15- new TextArgument ( "group" ) { Description = "Name of the group or set to NONE if you want to remove group from specified players" }
16+ new TextArgument ( "group" )
17+ {
18+ Description = "Name of the group or set to NONE if you want to remove group from specified players"
19+ }
1620 ] ;
1721
1822 public override void Execute ( )
1923 {
20- string gr = Args . GetText ( "group" ) ;
21- List < Player > pls = Args . GetPlayers ( "players" ) ;
22- foreach ( Player p in pls )
24+ string group = Args . GetText ( "group" ) ;
25+ List < Player > players = Args . GetPlayers ( "players" ) ;
26+
27+ foreach ( Player plr in players )
2328 {
24- p . UserGroup = gr == "NONE" ? null : ServerStatic . PermissionsHandler . GetGroup ( gr ) ;
29+ plr . UserGroup = group == "NONE"
30+ ? null
31+ : ServerStatic . PermissionsHandler . GetGroup ( group ) ;
2532 }
2633 }
2734}
You can’t perform that action at this time.
0 commit comments