mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-06-26 06:14:42 +02:00
Adapt some version strings according to ~ intended use.
This commit is contained in:
parent
3f515cc616
commit
fa87287c97
|
@ -48,7 +48,7 @@ public class MCAccessBukkit implements MCAccess, BlockPropertiesSetup{
|
|||
public String getMCVersion() {
|
||||
// Bukkit API.
|
||||
// TODO: maybe output something else.
|
||||
return "1.4.6|1.4.7|1.5.x|1.6.x|1.7.x"; // 1.7.x is bold!
|
||||
return "1.4.6|1.4.7|1.5.x|1.6.x|1.7.x|1.8.x"; // 1.8.x is bold!
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package fr.neatmonster.nocheatplus.compat.cbdev;
|
||||
|
||||
import net.minecraft.server.v1_8_R1.AttributeInstance;
|
||||
import net.minecraft.server.v1_8_R1.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_8_R1.Block;
|
||||
import net.minecraft.server.v1_8_R1.DamageSource;
|
||||
import net.minecraft.server.v1_8_R1.EntityComplexPart;
|
||||
import net.minecraft.server.v1_8_R1.EntityInsentient;
|
||||
import net.minecraft.server.v1_8_R1.EntityPlayer;
|
||||
import net.minecraft.server.v1_8_R1.GenericAttributes;
|
||||
import net.minecraft.server.v1_8_R1.MobEffectList;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
@ -45,7 +48,7 @@ public class MCAccessCBDev implements MCAccess{
|
|||
|
||||
@Override
|
||||
public String getServerVersionTag() {
|
||||
return "Spigot-CB-1.8-DEV";
|
||||
return "Spigot-CB-DEV";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -137,6 +140,17 @@ public class MCAccessCBDev implements MCAccess{
|
|||
return Double.NEGATIVE_INFINITY;
|
||||
}
|
||||
}
|
||||
|
||||
public double getSpeedAttributeValue(Entity entity) {
|
||||
net.minecraft.server.v1_8_R1.Entity mcEntity = ((CraftEntity) entity).getHandle();
|
||||
if (mcEntity instanceof EntityInsentient) {
|
||||
AttributeInstance attr = ((EntityInsentient) mcEntity).getAttributeInstance(GenericAttributes.d);
|
||||
if (attr != null) {
|
||||
return attr.getValue();
|
||||
}
|
||||
}
|
||||
return Double.NEGATIVE_INFINITY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInvulnerableTicks(final Player player) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user