mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
Update Commandlightning.java
This commit is contained in:
parent
e7be2b68a3
commit
a1719d651e
@ -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 New Issue
Block a user