Need a CombatLog API

Discussion in 'Spigot Plugin Development' started by gimife, Nov 10, 2018.

  1. Hey guys! I'm currently working on a plugin and I need a CombatLog class that prevents people from disconnecting while in combat. It should spawn an NPC if a player logs off while in combat. I was just wondering if anyone has such a class that they can provide me, it would save me a lot of time <3
     
  2. Its not possible to prevent for disconnection, what you can do if a player is in combat and the player leaves the server than remove their inventory or something.

    When a player is in combat put them into a arraylist and on disconnect event check if the arraylist the player is in there, and than execute your code what you want to do


    ps. its really easy to do
     

Share This Page