mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-08 08:07:26 +00:00
Update Commandlightning.java
This commit is contained in:
parent
e7be2b68a3
commit
a1719d651e
1 changed files with 3 additions and 3 deletions
|
@ -24,10 +24,9 @@ public class Commandlightning extends EssentialsLoopCommand {
|
|||
|
||||
@Override
|
||||
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception {
|
||||
User user;
|
||||
if (sender.isPlayer()) {
|
||||
user = ess.getUser(sender.getPlayer());
|
||||
if ((args.length < 1 || user != null && !user.isAuthorized("essentials.lightning.others"))) {
|
||||
User user = ess.getUser(sender.getPlayer());
|
||||
if ((args.length < 1 || !user.isAuthorized("essentials.lightning.others"))) {
|
||||
user.getWorld().strikeLightning(user.getBase().getTargetBlock((Set<Material>) null, 600).getLocation());
|
||||
return;
|
||||
}
|
||||
|
@ -64,6 +63,7 @@ public class Commandlightning extends EssentialsLoopCommand {
|
|||
return super.getTabCompleteOptions(server, user, commandLabel, args);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getTabCompleteOptions(final Server server, final CommandSource sender, final String commandLabel, final String[] args) {
|
||||
if (args.length == 1) {
|
||||
|
|
Loading…
Reference in a new issue