Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HELP: Join Notification plugin

Comments in 'Plugin Development' started by HyperGamers, Aug 31, 2014.

  1. HyperGamers
    Offline

    HyperGamers New Member

    Joined:
    Aug 16, 2014
    Posts:
    16
    Minecraft User:
    HyperGamers
    I have created a plugin and it loads correctly with no errors but it doesn't do it's job. Can someone look at it please? And explain how to fix it and why it doesn't work.

    How do I use the if Player.isOp() thing?

    GitHub URL: https://github.com/HyperGamers/JoinNotification
  2. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    I created a pull request, check it out.
    HyperGamers likes this.
  3. HyperGamers
    Offline

    HyperGamers New Member

    Joined:
    Aug 16, 2014
    Posts:
    16
    Minecraft User:
    HyperGamers
    Thanks. Also I think the if Player.isOp is not working but I'll check if that fixed it.
  4. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    That part looks fine to me.
  5. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    BTW, for future reference, posts like these should go in the "Plugin Development" Section.
  6. HyperGamers
    Offline

    HyperGamers New Member

    Joined:
    Aug 16, 2014
    Posts:
    16
    Minecraft User:
    HyperGamers
    Sorry, I wasn't sure because all of the threads on the development section were tutorials.
    Tuff likes this.
  7. HyperGamers
    Offline

    HyperGamers New Member

    Joined:
    Aug 16, 2014
    Posts:
    16
    Minecraft User:
    HyperGamers
    The plugin still doesn't work.
  8. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    darnit
  9. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    Does it show up in the console as loaded? Do you get any error messages of any sort?
    HyperGamers likes this.
  10. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    I am not sure about this, but TextFormat may not be supported for the broadcasteMessage function, you may want to test it out without the TextFormat stuff and see if it works.
    HyperGamers likes this.
  11. HyperGamers
    Offline

    HyperGamers New Member

    Joined:
    Aug 16, 2014
    Posts:
    16
    Minecraft User:
    HyperGamers
    I removed the text format stuff using terminal (vi Main.php) on Linux and it still didn't work. There are no errors and it loads normally.
  12. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    I fixed it. :) You didn't register the event and you used isOp like a variable, when it's a function.
    HyperGamers likes this.
  13. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    change your if statement to
    PHP:
    if ($player->isOp() == true) {
    }
  14. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    DUUUUUUUUUUUUUUUUHHHHHHHHHHHHHHHHHHHHHHHHH. Thanks LDX
    HyperGamers and LDX like this.
  15. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    He doesn't need to do that. :p
    Tuff likes this.
  16. HyperGamers
    Offline

    HyperGamers New Member

    Joined:
    Aug 16, 2014
    Posts:
    16
    Minecraft User:
    HyperGamers
    Is it supposed to be

    if(player.isOp()) return true;

    Or

    if(player.isOp() == true) {
  17. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    PHP:
    if ($player->isOp()) {
    }
    Thats all you need to do.
  18. HyperGamers
    Offline

    HyperGamers New Member

    Joined:
    Aug 16, 2014
    Posts:
    16
    Minecraft User:
    HyperGamers
    Thanks guys. I will try it now.
    Tuff likes this.
  19. HyperGamers
    Offline

    HyperGamers New Member

    Joined:
    Aug 16, 2014
    Posts:
    16
    Minecraft User:
    HyperGamers
    It still doesn't work. It maybe because of the text format.
  20. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    That just isn't right, the plugin is so small I find it hard to believe that there is something we have overlooked. Go ahead and remove the text format thing and see what you get. I am surprised it isn't at least returning some sort of error.
    LDX likes this.

Share This Page

Advertisement