Sponge plugin for removing the / in commands sent to console


#1

Executing a command as console in Sponge’s API automatically inputs a / at the beginning of the command before it gets executed by the console.

I just need a plugin that will stop a command in progress of being sent to Sponge’s console, remove the /, and then continue sending it on its merry way to be executed.

“But if you do this…won’t the commands fail to execute?”
Not with what I’m using. Sponge doesn’t have control of my server’s console command executor.

Price…$40 USD? Negotiable of course depending on the complexity of the work involved and such.

Private plugin, I don’t like helping the competition.

Thanks!


#2

I routinely execute commands as the console in Sponge plugins and this behavior does not occur. I am reasonably sure that a slash isn’t actually being inserted by Sponge but instead by whatever plugin is trying to run the command.


#3

Adding on to what Pie mentioned,

If you enter a command from the game, it will remove the / if it runs through console. If you have something like VirtualChest or a custom plugin that adds the / in then just get that plugin or configuration modified. Sponge does not behave that way.

I do not know what you’re using to host your server but the

seems troubling. Not sure why it’d do that.

Also $40 is far too much for what you asked for. A plugin that removes a / from something sent in console will take a good 10 minutes at most.


#4

The plugins executing commands are of my own creation.

To provide a better example:
cmdManager.process(Sponge.getServer().getConsole(), "pokespawn Raichu " + playername)

cmdManager.process(Sponge.getServer().getPlayer(uuid).get(), “vc open shopkeeper1”)

Paraphrasing code from my plugins, unsure if my syntax is 100% but that’s the general idea (both things work in my plugin, so if there is an error in that code then it is from my typing it), when my plugin was running in our server running only the SpongeAPI, both commands would execute fine. Now, in the server that the plugin is currently being loaded on, the command executed by the player works fine but the command executed by the console comes up as “unknown command”.

At first, I was confused as to why, because I know both commands worked fine on only Sponge. So I went through a checklist to determine the problem. Problem isn’t that of conflicting APIs between Forge, Sponge, and Bukkit, because the plugin executed a Sponge plugin command (/vc from VirtualChest) and a command from the Pixelmon mod just fine before, so it shouldn’t cause a problem now. I can manually execute the command that the plugin fails to do so as console, without typing a / in the command, so it’s not an issue of conflicting APIs or permissions (if console is even checked for permissions, which I’m not sure why it would) but instead an issue of what I have to assume being Sponge’s API automatically adding that / to commands when Sponge plugins execute them, making sense why commands executed by players work fine but commands executed by console do not work but work fine when entered into the console manually.

As far as my price goes, easy money for someone who can do it. It’s worth it to me. XD


#5

Update:

No longer needed. I resolved the issue by using Bukkit’s console command executor in my Sponge plugin.