mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-07 15:48:43 +00:00
Fix /lightning ignoring essentials.lightning.others (#3671)
This commit is contained in:
parent
fde0665593
commit
29d5ccf751
1 changed files with 2 additions and 2 deletions
|
@ -19,8 +19,8 @@ public class Commandlightning extends EssentialsLoopCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception {
|
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception {
|
||||||
if (args.length == 0) {
|
if (args.length == 0 || !sender.isAuthorized("essentials.lightning.others", ess)) {
|
||||||
if (sender.isPlayer() || !sender.isAuthorized("essentials.lightning.others", ess)) {
|
if (sender.isPlayer()) {
|
||||||
sender.getPlayer().getWorld().strikeLightning(sender.getPlayer().getTargetBlock(null, 600).getLocation());
|
sender.getPlayer().getWorld().strikeLightning(sender.getPlayer().getTargetBlock(null, 600).getLocation());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue