Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.msingleton.templecraft.util;
- import org.bukkit.Location;
- import org.bukkit.entity.LivingEntity;
- public class CustomMob{
- private LivingEntity entity;
- private int health;
- public CustomMob(LivingEntity entity)
- {
- this.entity = entity;
- }
- public void setHealth(int health)
- {
- this.health = health;
- }
- public int getHealth()
- {
- return health;
- }
- public void damage(int value)
- {
- health -= value;
- if (health <= 0) {
- entity.damage(entity.getMaxHealth());
- }
- }
- public Location getLocation()
- {
- return entity.getLocation();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment