Skip to content

Commit

Permalink
Bien indiqué que la commande ne peut être executé qu'en étant un joueur
Browse files Browse the repository at this point in the history
  • Loading branch information
Euphillya committed Nov 25, 2024
1 parent f03b2f8 commit d1db6d4
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class AccessSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.access")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class BanSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.ban")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class CreateSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (CommandCacheExecution.isAlreadyExecute(player.getUniqueId(), "create")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class DelWarpSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (args.length < 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public static void checkClearPlayer(Main plugin, SkyblockManager skyblockManager
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.delete")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class DemoteSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.demote")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static void expelPlayer(Main plugin, Island island, Player bPlayerToExpel
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.expel")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class GameRuleSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.gamerule")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class HomeSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.home")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class InviteSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.invite")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class KickSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.kick")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class PermissionSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.permission")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class PromoteSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.promote")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class SetBiomeSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.biome")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class SetHomeSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.sethome")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class SetWarpSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (args.length < 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class TPSSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.tps")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class TrustSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.access")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class UnbanSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.unban")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class UntrustSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.access")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class VisitSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (!player.hasPermission("skyllia.island.command.visit")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class WarpSubCommand implements SubCommandInterface {
@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) {
LanguageToml.sendMessage(sender, LanguageToml.messageCommandPlayerOnly);
return true;
}
if (args.length < 1) {
Expand Down

0 comments on commit d1db6d4

Please sign in to comment.