Solved PvP Toggle Plugin Help

Discussion in 'Spigot Plugin Development' started by JabPwnz, Apr 13, 2017.

  1. Hey guys. I am attempting to fix a previous plugin that was posted on Spigot. I know the developer of the plugin but he does not develop anymore.

    The Problem: Whenever I have this plugin installed, Players can PVP in WorldGuard regions with PvP Deny unless of course they disable PvP using this plugin.

    Any help would be appreciated.

    Thanks

    Main - https://pastebin.com/h14baxXc
    PvPPlayer - https://pastebin.com/T8J4RP0P
     
  2. Try doing this on the @EventHandler tags:
    @EventHandler (priority = EventPriority.LOWEST)

    It will set it priority to the lowest one so it should work
     
  3. It's odd. I just started up a test server, with Worldguard, Worldedit, and this plugin, as well as Permissions/Essentials. This problem does not seem to be happening on the test server.
     
  4. Basically, your event priority is Normal also is the world guard event, so you should listen for a higher priority and check if the event is cancelled.

    Lowert priority: Called first
    Higher priority: Called last
     
  5. I don't think you registered you're events? I looked in the onEnable() and didn't see it.
    (I don't know if Spigot does that automatically for you)
     
  6. He does it on the last line of 'onEnable()'.
     
  7. Oh, sorry, I thought those we're methods
     
  8. This seems to have fixed it. Appreciate it.
     
  9. Dude! I'm glad to help you!

    Mark the thread as solved to avoid confusion :p