Skip to content

Commit

Permalink
[Code] Utilisation du préfix de commandes sur la commande /version
Browse files Browse the repository at this point in the history
  • Loading branch information
dandan2611 committed Jul 4, 2024
1 parent 8f7829d commit 8f34193
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package fr.communaywen.core.commands;

import fr.communaywen.core.AywenCraftPlugin;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
Expand All @@ -19,7 +20,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
if (command.getName().equalsIgnoreCase("version")) {
if (sender instanceof Player) {
Player player = (Player) sender;
if (!player.hasPermission("ayw.version")) {
if (!player.hasPermission(AywenCraftPlugin.formatPermission("version"))) {
player.sendMessage("Vous n'avez pas la permission d'utiliser cette commande.");
return true;
}
Expand Down

0 comments on commit 8f34193

Please sign in to comment.