mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-26 08:29:44 +00:00
Update Essentials for Bukkit 1.6.1-R0.1-SNAPSHOT
This commit is contained in:
parent
95a2fce9a6
commit
d0795fc3e7
7 changed files with 61 additions and 12 deletions
|
@ -73,7 +73,7 @@ import org.yaml.snakeyaml.error.YAMLException;
|
||||||
|
|
||||||
public class Essentials extends JavaPlugin implements IEssentials
|
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 static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||||
private transient ISettings settings;
|
private transient ISettings settings;
|
||||||
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
||||||
|
|
|
@ -21,6 +21,7 @@ public enum Mob
|
||||||
CREEPER("Creeper", Enemies.ENEMY, EntityType.CREEPER),
|
CREEPER("Creeper", Enemies.ENEMY, EntityType.CREEPER),
|
||||||
GHAST("Ghast", Enemies.ENEMY, EntityType.GHAST),
|
GHAST("Ghast", Enemies.ENEMY, EntityType.GHAST),
|
||||||
GIANT("Giant", Enemies.ENEMY, EntityType.GIANT),
|
GIANT("Giant", Enemies.ENEMY, EntityType.GIANT),
|
||||||
|
HORSE("Horse", Enemies.FRIENDLY, EntityType.HORSE),
|
||||||
PIG("Pig", Enemies.FRIENDLY, EntityType.PIG),
|
PIG("Pig", Enemies.FRIENDLY, EntityType.PIG),
|
||||||
PIGZOMB("PigZombie", Enemies.NEUTRAL, EntityType.PIG_ZOMBIE),
|
PIGZOMB("PigZombie", Enemies.NEUTRAL, EntityType.PIG_ZOMBIE),
|
||||||
SHEEP("Sheep", Enemies.FRIENDLY, "", EntityType.SHEEP),
|
SHEEP("Sheep", Enemies.FRIENDLY, "", EntityType.SHEEP),
|
||||||
|
|
|
@ -92,13 +92,13 @@ public class OfflinePlayer implements Player
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getHealth()
|
public double getHealth()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setHealth(int i)
|
public void setHealth(double d)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,13 +307,13 @@ public class OfflinePlayer implements Player
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void damage(int i)
|
public void damage(double d)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException(_("notSupportedYet"));
|
throw new UnsupportedOperationException(_("notSupportedYet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void damage(int i, Entity entity)
|
public void damage(double d, Entity entity)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException(_("notSupportedYet"));
|
throw new UnsupportedOperationException(_("notSupportedYet"));
|
||||||
}
|
}
|
||||||
|
@ -349,13 +349,13 @@ public class OfflinePlayer implements Player
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLastDamage()
|
public double getLastDamage()
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException(_("notSupportedYet"));
|
throw new UnsupportedOperationException(_("notSupportedYet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLastDamage(int i)
|
public void setLastDamage(double d)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException(_("notSupportedYet"));
|
throw new UnsupportedOperationException(_("notSupportedYet"));
|
||||||
}
|
}
|
||||||
|
@ -762,7 +762,7 @@ public class OfflinePlayer implements Player
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxHealth()
|
public double getMaxHealth()
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
@ -1161,7 +1161,7 @@ public class OfflinePlayer implements Player
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setMaxHealth(int i)
|
public void setMaxHealth(double i)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
@ -1231,4 +1231,52 @@ public class OfflinePlayer implements Player
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
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.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class TimedTeleport implements Runnable
|
||||||
private int timer_task = -1;
|
private int timer_task = -1;
|
||||||
private long timer_started; // time this task was initiated
|
private long timer_started; // time this task was initiated
|
||||||
private long timer_delay; // how long to delay the teleportPlayer
|
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...
|
// note that I initially stored a clone of the location for reference, but...
|
||||||
// when comparing locations, I got incorrect mismatches (rounding errors, looked like)
|
// when comparing locations, I got incorrect mismatches (rounding errors, looked like)
|
||||||
// so, the X/Y/Z values are stored instead and rounded off
|
// so, the X/Y/Z values are stored instead and rounded off
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class Commandheal extends EssentialsCommand
|
||||||
throw new Exception(_("healDead"));
|
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);
|
final EntityRegainHealthEvent erhe = new EntityRegainHealthEvent(player, amount, RegainReason.CUSTOM);
|
||||||
ess.getServer().getPluginManager().callEvent(erhe);
|
ess.getServer().getPluginManager().callEvent(erhe);
|
||||||
if (erhe.isCancelled())
|
if (erhe.isCancelled())
|
||||||
|
@ -98,7 +98,7 @@ public class Commandheal extends EssentialsCommand
|
||||||
throw new QuietAbortException();
|
throw new QuietAbortException();
|
||||||
}
|
}
|
||||||
|
|
||||||
int newAmount = player.getHealth() + erhe.getAmount();
|
double newAmount = player.getHealth() + erhe.getAmount();
|
||||||
if (newAmount > player.getMaxHealth())
|
if (newAmount > player.getMaxHealth())
|
||||||
{
|
{
|
||||||
newAmount = player.getMaxHealth();
|
newAmount = player.getMaxHealth();
|
||||||
|
|
BIN
lib/bukkit.jar
BIN
lib/bukkit.jar
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue