Java Code Examples for org.bukkit.conversations.Conversable#acceptConversationInput()
The following examples show how to use
org.bukkit.conversations.Conversable#acceptConversationInput() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CraftServer.java From Kettle with GNU General Public License v3.0 | 6 votes |
public boolean dispatchServerCommand(CommandSender sender, PendingCommand serverCommand) { if (sender instanceof Conversable) { Conversable conversable = (Conversable) sender; if (conversable.isConversing()) { conversable.acceptConversationInput(serverCommand.command); return true; } } try { this.playerCommandState = true; return this.dispatchCommand(sender, serverCommand.command); } catch (Exception ex) { getLogger().log(Level.WARNING, "Unexpected exception while parsing console command \"" + serverCommand.command + '"', ex); return false; } finally { this.playerCommandState = false; } }
Example 2
Source File: CraftServer.java From Thermos with GNU General Public License v3.0 | 5 votes |
public boolean dispatchServerCommand(CommandSender sender, net.minecraft.command.ServerCommand serverCommand) { if (sender instanceof Conversable) { Conversable conversable = (Conversable)sender; if (conversable.isConversing()) { conversable.acceptConversationInput(serverCommand.command); return true; } } try { this.playerCommandState = true; // Cauldron start - handle bukkit/vanilla console commands int space = serverCommand.command.indexOf(" "); // if bukkit command exists then execute it over vanilla if (this.getCommandMap().getCommand(serverCommand.command.substring(0, space != -1 ? space : serverCommand.command.length())) != null) { return this.dispatchCommand(sender, serverCommand.command); } else { // process vanilla console command craftCommandMap.setVanillaConsoleSender(serverCommand.sender); return this.dispatchVanillaCommand(sender, serverCommand.command); } // Cauldron end } catch (Exception ex) { getLogger().log(Level.WARNING, "Unexpected exception while parsing console command \"" + serverCommand.command + '"', ex); return false; } finally { this.playerCommandState = false; } }