Discussion in 'Plugin Development' started by chaseoes, Aug 3, 2012.

Thread Status:
Not open for further replies.
  1. Offline


    Sorry for necroposting, but have any issues mentioned in this thread been resolved? I've been away for a few months.
  2. Offline


    I still haven't thought of a very good way to do this, not sure about anyone else. My chat plugin still isn't thread-safe. I guess I should check how other chat plugins have handled it.

    My idea is to "cache" the information you need when the player logs in. E.g. when the player logs in, take their prefix and keep it in memory (a hashmap with their name as the key?), then just pull it from there when they chat.
  3. Offline


    How does your chat plugin store/handle prefixes currently?

    I already store mine in a hashmap because I store the prefixes/suffixes in a separate config file (separate from any permissions plugin)
  4. Offline


    Either from Vault, or from the configuration if they don't use a Vault-supported-prefix-supported permissions plugin.
  5. Offline


    I'm tying to do something (I thought) very basic, like sending a couple of messages in a given order.
    Like so:

    2. cSender.sendMessage("------------------------");
    3. cSender.sendMessage("My Help Page");
    4. cSender.sendMessage("------------------------");
    5. cSender.sendMessage("/vip command1 - does 1");
    6. cSender.sendMessage("/vip command2 - does 2");
    7. cSender.sendMessage("/vip command3 - does 3");
    8. cSender.sendMessage("/vip command4 - does 4");
    9. cSender.sendMessage("/vip command5 - does 5");

    But ingame the order of the messages is completely messed up.
    OK, chat is handled async since god knows when. So how do I as a poor plugin developer manage to have my messages sent in the given order to the player?
    Wrapping those sendMessage() calls in a sync task does obviously not help. So what to do?
  6. Offline


    1. why are you sending the help page inside the chat event
    2. why not creating your own thread instead of necroposting
Thread Status:
Not open for further replies.

Share This Page