onButtonCick() interfering with other plugins #112

  • Defect
  • Accepted
Assigned to _ForgeUser7130239
  • coldandtired created this issue Nov 9, 2011


    I'm the author of Admin GUI. I got a ticket a few days' ago with a bug that I felt was caused by a conflict with another plugin. The ticket creator managed to confim it was with SpoutEssentials.

    However, I looked through your code and I'm pretty sure I know how to fix the bug (and for any other plugins as well).

    Basically, the problem is that your onButtonClick() method isn't checking to see whether the button clicked is from your plugin or not. Luckily, it's a pretty easy fix: Try using event.getButton().getPlugin() and checking if it is attached to an instance of your plugin. An alternative is to create a new button extending GenericButton and check that the button is an instance of this new class.

    The former should be a one line fix and the latter a dozen lines (and maybe a few casts), but if you run into problems give me a shout and I'll have a look.

  • coldandtired added the tags New Defect Nov 9, 2011
  • coldandtired posted a comment Nov 9, 2011

    Forgot to say that I was testing 3.7.5.

  • coldandtired edited title Nov 9, 2011
  • _ForgeUser7130239 posted a comment Nov 11, 2011

    You're right. I way I coded the interface is/was a terrible thing on my part. When I first released this plugin, I was the first, so didn't exactly pay attention to other plugins.

    I'll look into it more. Thanks for telling me how to fix the problem!!!!

  • _ForgeUser7130239 removed a tag New Nov 11, 2011
  • _ForgeUser7130239 added a tag Accepted Nov 11, 2011
  • coldandtired posted a comment Nov 13, 2011

    Sorry, just seen this - I didn't get any notification that you'd posted a message :)

    No worries. When I released the first version of mine, it worked perfectly when I tested it but I didn't account for more than one concurrent user so as soon as two players on a server tried to use it at the same time the GUI would be mirrored for every user! D'oh!

  • _ForgeUser8287664 posted a comment Feb 6, 2012


  • _ForgeUser8287704 posted a comment Feb 25, 2012

    Is this could explain why '' key, 'tab' key and 'F12' key does nothing on my server ? Or is this due to AZERTY keyboard ?

To post a comment, please login or register a new account.