Can a Command Block Trigger Sponge Commands as a Player on 5.2?


#1

I’m using Sponge 5.2 for my 1.10.2 server, and my goal is to make clicking a button bring up the “universal market” mod. Is this possible to do? I’m using the following command for the command block:

execute @p ~ ~ ~ universalmarket

I’ve tried it with and without a slash, but it seems to not want to pass the command correctly… am I doing something wrong, or have I hit a limit in what sponge can do?


#2

As your sponge version is so old, you wont get much help. Ive never used universal market, but could you explain what your doing to me, aka someone who kinda remembers sponge api 5 but doesnt use forge mods.

As in what does this command do? What are the arguments your attempting to use?


#3

I can’t update my sponge version without losing a bunch of my mods (a problem we’ve had for 10+ years as admins), so I’m stuck with it for now…

I’m trying to make the visual shop that’s triggered by the command /um or /universalmarket to show up after interacting with a block (instead of typing the command in). I want to do the same thing with a second shop plugin that uses the command /shop browse as well.

In short, the command block just needs to simulate the player typing in the command, so they get the GUI or text dialogue on their client.

The command block can make players say things as themselves, but seemingly the sponge commands aren’t working.


#4

So your attempting to activate a premade command by clicking a block?

Also how does the Sponge commands not work? Sorry for all the questions.


#5

The execute command in 1.10 does not execute a command as the player but merely at the player. API 8’s command rewrite contains several facilities to account for /execute but none of this is getting backported to API 5.


#6

Thank you for validating this, I appreciate it as I can now stop trying to make it work! I suppose I’ll look forward to the next server I make supporting this idea a few years from now.


#7

10+ years as admins, posted a day after minecraft technically turned 10 years old…
Someone had to jump on that ‘longer than all of y’all’ form first I guess :wink: