KaiKikuchi / QuickShop

A shop plugin for Bukkit
47 stars 41 forks source link

FreeBungeechat Support #7

Closed MCTyler closed 8 years ago

MCTyler commented 9 years ago

Is there any way I can make the plugin compatible with this plugin? https://www.spigotmc.org/resources/freebungeechat.1617/

KaiKikuchi commented 9 years ago

Hello, sorry for the late reply. I think it should be possible (I didn't check...) to add compatibility, but I don't plan it (too busy!). I leave this issue opened, maybe another developer wants to contribute! :)

If someone is interested in this feature, please post a comment!

MCTyler commented 9 years ago

I guess I could give it a go... So what makes it not recognize the Bungee Chat? Just because chat is global really shouldn't matter. I know very little Java so wish me luck!

KaiKikuchi commented 9 years ago

Probably, like HeroChat, a chat message doesn't trigger a AsyncPlayerChatEvent. Check this: https://github.com/KaiKikuchi/QuickShop/blob/master/src/main/java/org/maxgamer/quickshop/Listeners/ChatListener.java

And HeroChat for reference: https://github.com/KaiKikuchi/QuickShop/blob/master/src/main/java/org/maxgamer/quickshop/Listeners/HeroChatListener.java

Some test is needed in order to know how FreeBungeeChat reacts to chat messages and which event is triggered by a chat message.

ghost commented 9 years ago

FreeBungeeChat opens up an entirely new channel/thread for the chat messages being sent and received, that's why it doesn't recognize it. Albeit, you should be able to add in a message to tell people to do /local {amount} so that QuickShop still works.

MCTyler commented 9 years ago

I just disabled global chat unless they type /g. Works!