Created
June 30, 2011 13:27
-
-
Save TimWolla/1056232 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package de.evilco.regainhealthexample; | |
| import org.bukkit.event.entity.EntityListener; | |
| import org.bukkit.event.entity.EntityRegainHealthEvent; | |
| public class ExampleEntityListener extends EntityListener { | |
| public void onEntityRegainHealth(EntityRegainHealthEvent event) { | |
| if (((org.bukkit.craftbukkit.entity.CraftPlayer) event.getEntity()).getHandle().ticksLived % 20 * 12 == 0) | |
| event.setCancelled(true); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment