Nokorbis / ar-command-signs

Minecraft (Spigot) plugin that allows to transform some blocks (Signs, plates and buttons) into a Commands executor
https://www.spigotmc.org/resources/command-signs.10512/
Apache License 2.0
13 stars 10 forks source link

When setting up signs... all entry to the menu displays in chat. #22

Closed mrcoffee1026 closed 6 years ago

mrcoffee1026 commented 6 years ago

All numeric entries and commands entered to the command sign interface display in chat. Please hijack the user's input who is interacting with the /commandsigns edit interface so that it does not display in chat (as other plugins do), thank you!

Nokorbis commented 6 years ago

Actually, this is something already done :/

@EventHandler(priority=EventPriority.HIGHEST)
public void onChatEvent (AsyncPlayerChatEvent event) {
    //code to handle user's input
    event.setCancelled(true);
}

The problem is that some other plugins catch the event, even if it has been cancelled and thus displays it by some other means. (Essentials or EssentialsChat have that effect if I remember properly)

Note that in some cases (such as Essentials), only OP people (or people with social spy) actually see the entered commands.

I'll check if I can find another better solution for that, but none comes to my mind right now.

mrcoffee1026 commented 6 years ago

yeah it's not because they have op or social.spy, every user on the server is getting my input to the sign and then griping that "he's possessed again!" and typing seemingly random numbers to let me know exactly what it is they are seeing, lol. Anyway it's kind of annoying, and every other plugin I use that accepts input like that finds a way to keep it out of chat. Typically, the ones that accept input also time out after some length of time... like say... BossShopPro has a player input option for items... if you put it in... no one else sees that text, but the plugin receives and uses it. If you don't put it in within... i think it's 30 seconds or so... it cancels on its own and the player has to re-enter that item to try again.

I do have Essentials but not EssentialsChat. I use ChatControlPro for virtually anything chat related. I do have BossShopPro which does allow the entering of information into chat which is not displayed to anyone, so I know this can be done. I feel like that's not the only plugin I interact with via chat which does not display to other users either, I just can't think of others off the top of my head right now.

Nokorbis commented 6 years ago

Can you try the version that I uploaded here : https://github.com/Nokorbis/ar-command-signs/releases/tag/v1.6.7 ? I tried a new method to hide the menu interactions. If it works, keep me updated ;)

mrcoffee1026 commented 6 years ago

i'll give it a go on my next restart and let you know thanks!

mrcoffee1026 commented 6 years ago

Tried the new version, sorry still broadcasts every number entered to the chat.

Nokorbis commented 6 years ago

I don't understand how it is even possible... May I have the IP of your server ?

mrcoffee1026 commented 6 years ago

sure: hidden for privacy purpose

mrcoffee1026 commented 6 years ago

version you sent me works perfect now thanks!