mirror of
https://github.com/IdalecioSch/plugin-de-raio.git
synced 2026-07-27 16:25:46 -03:00
botado permissao nesse caraio 😎
This commit is contained in:
@@ -35,19 +35,26 @@ public class LightningStrike extends JavaPlugin implements Listener {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (args.length != 1) {
|
||||
sender.sendMessage("Uso correto: /raios <player>");
|
||||
if (sender.hasPermission("lightningstrike.raios") || sender.isOp()) {
|
||||
if (args.length != 1) {
|
||||
sender.sendMessage("Uso correto: /raios <player>");
|
||||
return false;
|
||||
}
|
||||
|
||||
Player target = Bukkit.getPlayer(args[0]);
|
||||
if (target == null) {
|
||||
sender.sendMessage("Jogador não encontrado.");
|
||||
return false;
|
||||
}
|
||||
|
||||
toggleLightning(target);
|
||||
return true;
|
||||
|
||||
}else{
|
||||
sender.sendMessage("Você não tem permissão para usar este comando.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Player target = Bukkit.getPlayer(args[0]);
|
||||
if (target == null) {
|
||||
sender.sendMessage("Jogador não encontrado.");
|
||||
return false;
|
||||
}
|
||||
|
||||
toggleLightning(target);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
private void toggleLightning(Player player) {
|
||||
|
||||
@@ -6,3 +6,9 @@ commands:
|
||||
raios:
|
||||
description: Ativa ou desativa raios sobre um jogador
|
||||
usage: /raios <player>
|
||||
permission: lightningstrike.raios
|
||||
|
||||
permissions:
|
||||
lightningstrike.raios:
|
||||
description: Permite que o jogador ative ou desative raios sobre outro jogador
|
||||
default: op
|
||||
Binary file not shown.
Binary file not shown.
@@ -6,3 +6,9 @@ commands:
|
||||
raios:
|
||||
description: Ativa ou desativa raios sobre um jogador
|
||||
usage: /raios <player>
|
||||
permission: lightningstrike.raios
|
||||
|
||||
permissions:
|
||||
lightningstrike.raios:
|
||||
description: Permite que o jogador ative ou desative raios sobre outro jogador
|
||||
default: op
|
||||
Reference in New Issue
Block a user