Solved My third plugin has a bug I don't understand!

Discussion in 'Plugin Development' started by ReflectionCraft, May 30, 2017.

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

    ReflectionCraft

    Hey! I'm newer to developing Bukkit plugins! Recently I coded a plugin similar to a lot of plugins already available. You simply type /social and then some text gets posted into the chat with social media links!

    Basically, there are some weird chars after one of my words! I have screenshots of the in game weird chars and a Pastebin with my code!

    In Game Screenshot:
    https://gyazo.com/f7f092802a78c03a9b267c8137a21327

    Pastebin of my code:
    https://pastebin.com/pns63itV

    Thanks, LapisSky
     
  2. Offline

    Zombie_Striker

    @ReflectionCraft
    1. Don't log your own plugins. Bukkit does this for you. Remove the line in the onEnable.
    2. After that, both the onEnable and onDisable will have nothing in them, meaning they do nothing. Remove those methods.
    3. Do you have any other plugins on your server that may be modifying the text? Try running your plugin on a server with no other plugins.
    4. If that does not work, try changing the text.
     
  3. Offline

    ReflectionCraft

    Thank you so much, it worked! I simply removed onEnable and onDisable and it fixed itself!
    But what do you mean don't log my plugins?
     
  4. Offline

    Zombie_Striker

    @ReflectionCraft
    If you look at the console, bukkit automatically prints out that the plugin has been enabled. The logger line will just print out that it has been enabled twice.

    If your problem has been solved, mark this thread as solved.
     
  5. Offline

    Horsey

    @Zombie_Striker Actually, Bukkit prints 'Enabling Plugin', not 'Plugin Enabled'. I like to put a confirmation message that the plugin was actually enabled, as it looks just a tad bit more polished.
     
    Zombie_Striker likes this.
Thread Status:
Not open for further replies.

Share This Page