77import org .jetbrains .annotations .Nullable ;
88import pro .cloudnode .smp .cloudnodemsg .CloudnodeMSG ;
99import pro .cloudnode .smp .cloudnodemsg .Message ;
10- import pro .cloudnode .smp .cloudnodemsg .Permission ;
10+ import pro .cloudnode .smp .cloudnodemsg .Permissions ;
1111import pro .cloudnode .smp .cloudnodemsg .error .InvalidPlayerError ;
1212import pro .cloudnode .smp .cloudnodemsg .error .MessageYourselfError ;
1313import pro .cloudnode .smp .cloudnodemsg .error .NoPermissionError ;
@@ -25,7 +25,7 @@ public final class MessageCommand extends Command {
2525
2626 @ Override
2727 public boolean run (final @ NotNull CommandSender sender , final @ NotNull String label , @ NotNull String @ NotNull [] args ) {
28- if (!sender .hasPermission (Permission .USE )) return new NoPermissionError ().send (sender );
28+ if (!sender .hasPermission (Permissions .USE )) return new NoPermissionError ().send (sender );
2929 if (args .length == 0 )
3030 return sendMessage (sender , CloudnodeMSG .getInstance ().config ().usage (label , sender instanceof Player ? usage : usageConsole ));
3131 if (args .length == 1 && !(sender instanceof Player )) return sendMessage (sender , CloudnodeMSG .getInstance ().config ()
@@ -44,7 +44,7 @@ public boolean run(final @NotNull CommandSender sender, final @NotNull String la
4444 return sendMessage (player , CloudnodeMSG .getInstance ().config ().channelClosed (player .getName (), Optional .ofNullable (recipientOffline .getName ()).orElse ("Unknown Player" ), label ));
4545 }
4646 }
47- if (recipient .isEmpty () || (CloudnodeMSG .isVanished (recipient .get ()) && !player .hasPermission (Permission .SEND_VANISHED ))) return new PlayerNotFoundError (args [0 ]).send (player );
47+ if (recipient .isEmpty () || (CloudnodeMSG .isVanished (recipient .get ()) && !player .hasPermission (Permissions .SEND_VANISHED ))) return new PlayerNotFoundError (args [0 ]).send (player );
4848 if (!Message .isIncomingEnabled (recipient .get ())) return new PlayerHasIncomingDisabledError (recipient .get ().getName ()).send (player );
4949 Message .createChannel (player , recipient .get ());
5050 return sendMessage (player , CloudnodeMSG .getInstance ().config ().channelCreated (player .getName (), recipient .get ().getName (), label ));
@@ -62,7 +62,7 @@ public boolean run(final @NotNull CommandSender sender, final @NotNull String la
6262
6363 @ Override
6464 public @ Nullable List <@ NotNull String > onTabComplete (final @ NotNull CommandSender sender , final @ NotNull org .bukkit .command .Command command , final @ NotNull String label , final @ NotNull String @ NotNull [] args ) {
65- if (!sender .hasPermission (Permission .USE )) return new ArrayList <>();
65+ if (!sender .hasPermission (Permissions .USE )) return new ArrayList <>();
6666 // `null` works for list of players
6767 if (args .length == 1 ) return null ;
6868 return new ArrayList <>();
0 commit comments