Implements some Java 14 code migrations
This commit is contained in:
@ -26,8 +26,7 @@ public class CommandReload implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
|
||||
@NotNull String[] args) {
|
||||
if (commandSender instanceof Player) {
|
||||
Player player = (Player) commandSender;
|
||||
if (commandSender instanceof Player player) {
|
||||
if (!player.hasPermission("stargate.reload")) {
|
||||
Stargate.sendErrorMessage(commandSender, "Permission Denied");
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user