Fixed grace period

This commit is contained in:
travja 2013-03-27 21:33:36 -06:00
parent c70e5d500f
commit 563e453a26
2 changed files with 9 additions and 0 deletions

Binary file not shown.

View File

@ -8,6 +8,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
public class PvP implements Listener {
public Main plugin;
@ -63,4 +64,12 @@ public class PvP implements Listener {
}
}
}
@EventHandler
public void PlayerDamage(EntityDamageEvent event){
Entity e = event.getEntity();
if(e instanceof Player){
if(plugin.gp!= 0)
event.setCancelled(true);
}
}
}