Overrideing PvP plugins

Discussion in 'Plugin Development' started by Duuckky, May 13, 2014.

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

    Duuckky

    Hello, I'm creating a plugin, and I need to know how to override all friendlyfire, and PvP protection plugins.
     
  2. Offline

    Glumpz

    Duuckky Make use of the EventHandler priorities.
     
    The Fancy Whale likes this.
  3. Offline

    The Fancy Whale

    Yes you can use that method, or if their event priorities are too high, you may have to make what you want to happen have a 1 tick delay or so. Highly inefficient way of doing it, but it works. Also, look into those plugins and see if they have API's and see if you really need the plugins, especially if you plan on overriding them anyway.
     
    Glumpz likes this.
  4. Offline

    Duuckky

    Okay thanks, now what would I use to actually enable the PvP? :O
     
  5. Offline

    Regablith

    Duuckky
    Like how you enable it in the server.properties?
     
  6. Offline

    Duuckky

    No how I can enable while in game on certain players.
     
  7. Offline

    The Fancy Whale

    Well if another plugin is interfering there is nothing you can really do. In my plugin PvPOn/Off what I do is add players to an arraylist, and on entitydamageentityevent if the player is in the arraylist, I cancel the event.
     
  8. Offline

    Regablith

    Add players to an arraylist, check if the players are in the arraylist when being damaged, and if they aren't, don't let them pvp. (what The Fancy Whale said)
     
Thread Status:
Not open for further replies.

Share This Page