Use CommandException for //gui

This commit is contained in:
Jesse Boyd 2018-08-07 00:13:23 +10:00
parent e6128ecf63
commit 60d07b5c2f
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -909,9 +909,9 @@ public class UtilityCommands extends MethodCommands {
desc = "Open the GUI" desc = "Open the GUI"
) )
@Logging(PLACEMENT) @Logging(PLACEMENT)
public void gui(Actor actor, FawePlayer fp, LocalSession session, CommandContext args) throws WorldEditException { public void gui(Actor actor, FawePlayer fp, LocalSession session, CommandContext args) throws WorldEditException, CommandException {
FormBuilder gui = Fawe.imp().getFormBuilder(); FormBuilder gui = Fawe.imp().getFormBuilder();
if (gui == null) throw new UnsupportedOperationException("Not implemented"); if (gui == null) throw new CommandException("Only supported on Pocket Edition");
Dispatcher callable = worldEdit.getPlatformManager().getCommandManager().getDispatcher(); Dispatcher callable = worldEdit.getPlatformManager().getCommandManager().getDispatcher();
CommandLocals locals = args.getLocals(); CommandLocals locals = args.getLocals();