Add command disabling

This commit is contained in:
William committed 2022-08-22 17:29:58 +01:00
1 parent 632d43d131
commit 6cd2a23770
7 files changed
+59 -12

No files matched your search

@@ -0,0 +1,18 @@
package net.william278.huskhomes.command;
import net.william278.huskhomes.HuskHomes;
import net.william278.huskhomes.player.OnlineUser;
import net.william278.huskhomes.util.Permission;
import org.jetbrains.annotations.NotNull;
public class DisabledCommand extends CommandBase {
public DisabledCommand(@NotNull HuskHomes implementor) {
super("", Permission.COMMAND_DISABLED_MESSAGE, implementor);
}
@Override
public void onExecute(@NotNull OnlineUser onlineUser, @NotNull String[] args) {
plugin.getLocales().getLocale("error_command_disabled").ifPresent(onlineUser::sendMessage);
}
}