Skip to content

Commit

Permalink
fix: error when using player commands in console
Browse files Browse the repository at this point in the history
  • Loading branch information
Thatsmusic99 committed Jun 23, 2023
1 parent f1fceb2 commit f972709
Showing 1 changed file with 0 additions and 19 deletions.
Expand Up @@ -19,25 +19,6 @@
*/
public abstract class ATCommand implements IATCommand {

/**
* Determines whether the command can continue after performing basic checks.<br>
* This will check if the feature for the command is enabled, and if the sender<br>
* has permission.
*
* @param sender the command sender running the command.
* @return true if the sender can run the command, false if not.
*/
@Contract(pure = true)
public boolean canProceed(@NotNull final CommandSender sender) {
// Make sure the required feature is enabled
if (!getRequiredFeature()) {
CustomMessages.sendMessage(sender, "Error.featureDisabled");
return false;
}

// If it's enabled, check for permission
return sender.hasPermission(getPermission());
}

public Void handleCommandFeedback(
@Nullable final Throwable err,
Expand Down

0 comments on commit f972709

Please sign in to comment.