mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
Update Commandlightning.java
This commit is contained in:
parent
e7be2b68a3
commit
a1719d651e
@ -24,10 +24,9 @@ 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 {
|
||||||
User user;
|
|
||||||
if (sender.isPlayer()) {
|
if (sender.isPlayer()) {
|
||||||
user = ess.getUser(sender.getPlayer());
|
User user = ess.getUser(sender.getPlayer());
|
||||||
if ((args.length < 1 || user != null && !user.isAuthorized("essentials.lightning.others"))) {
|
if ((args.length < 1 || !user.isAuthorized("essentials.lightning.others"))) {
|
||||||
user.getWorld().strikeLightning(user.getBase().getTargetBlock((Set<Material>) null, 600).getLocation());
|
user.getWorld().strikeLightning(user.getBase().getTargetBlock((Set<Material>) null, 600).getLocation());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -64,6 +63,7 @@ public class Commandlightning extends EssentialsLoopCommand {
|
|||||||
return super.getTabCompleteOptions(server, user, commandLabel, args);
|
return super.getTabCompleteOptions(server, user, commandLabel, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<String> getTabCompleteOptions(final Server server, final CommandSource sender, final String commandLabel, final String[] args) {
|
protected List<String> getTabCompleteOptions(final Server server, final CommandSource sender, final String commandLabel, final String[] args) {
|
||||||
if (args.length == 1) {
|
if (args.length == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user