SawFowl / CommandSync

GNU General Public License v3.0
8 stars 7 forks source link

[Suggestion]a check to make sure player only run command on target server #1

Closed Tollainmear closed 6 years ago

Tollainmear commented 6 years ago

Hi I have a request to make player run command only when he stand in a target server.

Home data was stored in the server-side and won't share this across servers, so if I want to make player back him home only when he stand in the "target" server, for example:

now player "Notch" is in "SRC" server to collecting resources, then he want to back his home which in "Builder" server, so he click a button which binding a list of command:

console: sync console bungee send Notch builder; console: sync player Notch[Builder] home(This command make sure Notch in "Builder" server then run it)

The problem is if I run "sync console builder sync player Notch home", it would make a global event result in a situation that player run this command wherever he standing in .I could bind this command to a GUI menu with virtualchest, but can't check player's server to filter it.

so if Sync could check player's server which he currently in, or waiting for player online to the target server then run "/home" would be great!

SawFowl commented 6 years ago

The plugin can not do what you ask. Because the command is executed by the player himself. It does not matter on which server the player is located, as it receives a command from BungeeCord and executes how the user would enter it into the chat. You can put a command on a button on a specific server.

Tollainmear commented 6 years ago

Yeap, I understand, that was a suggestion to make cmdsync stronger, the suggested feature just make a check which most like the feature in wiki:

If you try sync a command and the CommandSyncServer is down, it will be kept in a queue for when it comes back online!

we just need to check a player weather online. if not, we put it in a queue and make it executed on target player login event fired

SawFowl commented 6 years ago

The bungee plugin can not verify the target server of the player. I do not yet have time to further understand the API Bungee. Currently I'm working with API Sponge. A good game store is very necessary. If I have the opportunity, I will try to fulfill your request, but I can not promise anything yet. If you yourself know how to implement this function, then you can offer me the required code and I will do the rest of the work.

Tollainmear commented 6 years ago

Fine, I will try to learn cmdSync code next, and if it possible, I would make a PR ;)

Thank you for reply~