Update Essentials for Bukkit 1.6.1-R0.1-SNAPSHOT

This commit is contained in:
GunfighterJ 2013-07-01 21:38:27 -05:00
parent 95a2fce9a6
commit d0795fc3e7
7 changed files with 61 additions and 12 deletions

View file

@ -73,7 +73,7 @@ import org.yaml.snakeyaml.error.YAMLException;
public class Essentials extends JavaPlugin implements IEssentials
{
public static final int BUKKIT_VERSION = 2763;
public static final int BUKKIT_VERSION = 2794;
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private transient ISettings settings;
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);

View file

@ -21,6 +21,7 @@ public enum Mob
CREEPER("Creeper", Enemies.ENEMY, EntityType.CREEPER),
GHAST("Ghast", Enemies.ENEMY, EntityType.GHAST),
GIANT("Giant", Enemies.ENEMY, EntityType.GIANT),
HORSE("Horse", Enemies.FRIENDLY, EntityType.HORSE),
PIG("Pig", Enemies.FRIENDLY, EntityType.PIG),
PIGZOMB("PigZombie", Enemies.NEUTRAL, EntityType.PIG_ZOMBIE),
SHEEP("Sheep", Enemies.FRIENDLY, "", EntityType.SHEEP),

View file

@ -92,13 +92,13 @@ public class OfflinePlayer implements Player
}
@Override
public int getHealth()
public double getHealth()
{
return 0;
}
@Override
public void setHealth(int i)
public void setHealth(double d)
{
}
@ -307,13 +307,13 @@ public class OfflinePlayer implements Player
}
@Override
public void damage(int i)
public void damage(double d)
{
throw new UnsupportedOperationException(_("notSupportedYet"));
}
@Override
public void damage(int i, Entity entity)
public void damage(double d, Entity entity)
{
throw new UnsupportedOperationException(_("notSupportedYet"));
}
@ -349,13 +349,13 @@ public class OfflinePlayer implements Player
}
@Override
public int getLastDamage()
public double getLastDamage()
{
throw new UnsupportedOperationException(_("notSupportedYet"));
}
@Override
public void setLastDamage(int i)
public void setLastDamage(double d)
{
throw new UnsupportedOperationException(_("notSupportedYet"));
}
@ -762,7 +762,7 @@ public class OfflinePlayer implements Player
}
@Override
public int getMaxHealth()
public double getMaxHealth()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@ -1161,7 +1161,7 @@ public class OfflinePlayer implements Player
}
@Override
public void setMaxHealth(int i)
public void setMaxHealth(double i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@ -1231,4 +1231,52 @@ public class OfflinePlayer implements Player
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int _INVALID_getLastDamage()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void _INVALID_setLastDamage(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void _INVALID_damage(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void _INVALID_damage(int i, Entity entity)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int _INVALID_getHealth()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void _INVALID_setHealth(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int _INVALID_getMaxHealth()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void _INVALID_setMaxHealth(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
}

View file

@ -15,7 +15,7 @@ public class TimedTeleport implements Runnable
private int timer_task = -1;
private long timer_started; // time this task was initiated
private long timer_delay; // how long to delay the teleportPlayer
private int timer_health;
private double timer_health;
// note that I initially stored a clone of the location for reference, but...
// when comparing locations, I got incorrect mismatches (rounding errors, looked like)
// so, the X/Y/Z values are stored instead and rounded off

View file

@ -90,7 +90,7 @@ public class Commandheal extends EssentialsCommand
throw new Exception(_("healDead"));
}
final int amount = player.getMaxHealth() - player.getHealth();
final double amount = player.getMaxHealth() - player.getHealth();
final EntityRegainHealthEvent erhe = new EntityRegainHealthEvent(player, amount, RegainReason.CUSTOM);
ess.getServer().getPluginManager().callEvent(erhe);
if (erhe.isCancelled())
@ -98,7 +98,7 @@ public class Commandheal extends EssentialsCommand
throw new QuietAbortException();
}
int newAmount = player.getHealth() + erhe.getAmount();
double newAmount = player.getHealth() + erhe.getAmount();
if (newAmount > player.getMaxHealth())
{
newAmount = player.getMaxHealth();

Binary file not shown.

Binary file not shown.