mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-10 12:50:25 +01:00
Fix location missing bug... and bats
This commit is contained in:
parent
cb578bd677
commit
c519cde217
@ -112,6 +112,7 @@ public class CitizensBatNPC extends CitizensMobNPC {
|
||||
@Override
|
||||
public void j_() {
|
||||
super.j_();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
if (inLiquid) {
|
||||
motY += 0.04;
|
||||
} else //(handled elsewhere)*/
|
||||
if (onGround && bW == 0) {
|
||||
if (onGround && Math.abs(bW) < EPSILON) {
|
||||
bf(); // jump
|
||||
bW = 10;
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import net.minecraft.server.EntityPlayer;
|
||||
|
||||
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -102,9 +103,10 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
||||
}
|
||||
|
||||
public boolean mount(Player toMount) {
|
||||
if (npc.getBukkitEntity().getPassenger() != null)
|
||||
Entity passenger = npc.getBukkitEntity().getPassenger();
|
||||
if (passenger != null && passenger != toMount)
|
||||
return false;
|
||||
((CraftPlayer) toMount).getHandle().setPassengerOf(getHandle());
|
||||
enterOrLeaveVehicle(toMount);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ import net.citizensnpcs.api.trait.Trait;
|
||||
import org.bukkit.Location;
|
||||
|
||||
public class CurrentLocation extends Trait {
|
||||
@Persist(required = true)
|
||||
@Persist(value = "", required = true)
|
||||
private Location loc;
|
||||
|
||||
public CurrentLocation() {
|
||||
|
Loading…
Reference in New Issue
Block a user