mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-24 11:54:35 +08:00
Implement permission node to extinguish other players (#2826)
Implements a specific permission node to restrict access to extinguishing other players, so Extinguish command will match other commands with similar functionality (i.e. /feed) Fixes #2796
This commit is contained in:
parent
8e3c1aaa96
commit
a3a50e9cd5
@ -27,13 +27,13 @@ public class Commandext extends EssentialsLoopCommand {
|
||||
|
||||
@Override
|
||||
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
|
||||
if (args.length < 1) {
|
||||
extPlayer(user.getBase());
|
||||
user.sendMessage(tl("extinguish"));
|
||||
if (args.length > 0 && user.isAuthorized("essentials.ext.others")) {
|
||||
loopOnlinePlayers(server, user.getSource(), true, true, args[0], null);
|
||||
return;
|
||||
}
|
||||
|
||||
loopOnlinePlayers(server, user.getSource(), true, true, args[0], null);
|
||||
extPlayer(user.getBase());
|
||||
user.sendMessage(tl("extinguish"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user