use of net.aufdemrand.denizen.nms.util.jnbt.ListTag in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayer method setVelocity.
public void setVelocity(Vector vector) {
List<DoubleTag> motion = new ArrayList<DoubleTag>();
motion.add(new DoubleTag(vector.getX()));
motion.add(new DoubleTag(vector.getY()));
motion.add(new DoubleTag(vector.getZ()));
this.compound = compound.createBuilder().put("Motion", new ListTag(DoubleTag.class, motion)).build();
if (this.autosave) {
savePlayerData();
}
}
use of net.aufdemrand.denizen.nms.util.jnbt.ListTag in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayer method getLocation.
public Location getLocation() {
ListTag position = this.compound.getListTag("Pos");
ListTag rotation = this.compound.getListTag("Rotation");
return new Location(Bukkit.getWorld(new UUID(this.compound.getLong("WorldUUIDMost"), this.compound.getLong("WorldUUIDLeast"))), position.getDouble(0), position.getDouble(1), position.getDouble(2), rotation.getFloat(0), rotation.getFloat(1));
}
Aggregations