Class DamageManagement

java.lang.Object
com.booksaw.betterTeams.events.DamageManagement
All Implemented Interfaces:
org.bukkit.event.Listener

public class DamageManagement extends Object implements org.bukkit.event.Listener
This class is used to ensure that members of the same team cannot hit each other
Author:
booksaw
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onDamage(org.bukkit.event.entity.EntityDamageByEntityEvent e)
    This is used to cancel any events which would cause 2 players of the same team to damage each other
    void
    onPotion(org.bukkit.event.entity.PotionSplashEvent e)
    This method is used to detect if a negative potion is being thrown at members of the same team

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DamageManagement

      public DamageManagement()
  • Method Details

    • onDamage

      public void onDamage(org.bukkit.event.entity.EntityDamageByEntityEvent e)
      This is used to cancel any events which would cause 2 players of the same team to damage each other
      Parameters:
      e - the damage event
    • onPotion

      public void onPotion(org.bukkit.event.entity.PotionSplashEvent e)
      This method is used to detect if a negative potion is being thrown at members of the same team
      Parameters:
      e - the potion splash event