Solved Chat events not working?

Discussion in 'Spigot Plugin Development' started by SirHawkEye, Jun 18, 2016.

  1. Hey Spigot,

    I'm trying to make chat commands for sethome and home that save to the plugin's config file. Unfortunately, nothing happens when I type ".sethome" or ".home", no errors and no messages to me.


    Also note that no folder or config file is generated by the plugin, despite a config.yml being present.

    Any ideas?
  2. Choco


    1. You didn't register the events
    2. You didn't saveDefaultConfig();
    3. You don't have the @EventHandler tag over your listener

    Please take a look at this wiki page
  3. Is the event registered
  4. Also note that the AsyncChatEvent is as it says, async. You should be running the teleport code inside a sync task as to put it back on the main thread.

    Maybe you want to actually create a command instead of a message starting with a dot. Check out for a great tutorial on that.
  5. I appreciate the command suggestion, but my goal was to use chat messages. What happens if the teleport is done Async?

    Also, my fixed code is here, instead of the other post:

    EDIT: The code linked above is fully functional, thanks for the help everyone!