Skip to content

Commit

Permalink
Added webeditor command
Browse files Browse the repository at this point in the history
  • Loading branch information
ToberoCat committed Aug 15, 2023
1 parent b349364 commit 3eb6733
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ public GuiCommands() {
executor.addChild(new DumpCommand());
executor.addChild(new GiveCommand(GuiEngineApiPlugin.getPlugin()));
executor.addChild(new ReloadCommand());
executor.addChild(new WebEditorCommand());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package io.github.toberocat.guiengine.commands;

import io.github.toberocat.toberocore.command.SubCommand;
import io.github.toberocat.toberocore.command.arguments.Argument;
import io.github.toberocat.toberocore.command.exceptions.CommandException;
import io.github.toberocat.toberocore.command.options.Options;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;

public class WebEditorCommand extends SubCommand {
public WebEditorCommand() {
super("webeditor");
}

@Override
protected @NotNull Options options() {
return new Options();
}

@Override
protected @NotNull Argument<?>[] arguments() {
return new Argument[0];
}

@Override
protected boolean handleCommand(@NotNull CommandSender sender,
@NotNull String[] strings) throws CommandException {
sender.sendMessage("§6The Gui web editor is only available for gui engine premium users");
return true;
}
}

0 comments on commit 3eb6733

Please sign in to comment.