use of net.aufdemrand.denizen.nms.util.jnbt.CompoundTag in project Denizen-For-Bukkit by DenizenScript.
the class PacketHelper_v1_10_R1 method showBannerUpdate.
@Override
public void showBannerUpdate(Player player, Location location, DyeColor base, List<Pattern> patterns) {
List<CompoundTag> nbtPatterns = new ArrayList<CompoundTag>();
for (Pattern pattern : patterns) {
nbtPatterns.add(NMSHandler.getInstance().createCompoundTag(new HashMap<String, Tag>()).createBuilder().putInt("Color", pattern.getColor().getDyeData()).putString("Pattern", pattern.getPattern().getIdentifier()).build());
}
CompoundTag compoundTag = NMSHandler.getInstance().getBlockHelper().getNbtData(location.getBlock()).createBuilder().putInt("Base", base.getDyeData()).put("Patterns", new ListTag(CompoundTag.class, nbtPatterns)).build();
showTileEntityData(player, location, 3, compoundTag);
}
use of net.aufdemrand.denizen.nms.util.jnbt.CompoundTag in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayer method setFlySpeed.
public void setFlySpeed(float speed) {
CompoundTag compoundTag = (CompoundTag) this.compound.getValue().get("abilities");
compoundTag = compoundTag.createBuilder().putFloat("flySpeed", speed).build();
this.compound = compound.createBuilder().put("abilities", compoundTag).build();
if (this.autosave) {
savePlayerData();
}
}
use of net.aufdemrand.denizen.nms.util.jnbt.CompoundTag in project Denizen-For-Bukkit by DenizenScript.
the class PacketHelper_v1_8_R3 method showBannerUpdate.
@Override
public void showBannerUpdate(Player player, Location location, DyeColor base, List<Pattern> patterns) {
List<CompoundTag> nbtPatterns = new ArrayList<CompoundTag>();
for (Pattern pattern : patterns) {
nbtPatterns.add(NMSHandler.getInstance().createCompoundTag(new HashMap<String, Tag>()).createBuilder().putInt("Color", pattern.getColor().getDyeData()).putString("Pattern", pattern.getPattern().getIdentifier()).build());
}
CompoundTag compoundTag = NMSHandler.getInstance().getBlockHelper().getNbtData(location.getBlock()).createBuilder().putInt("Base", base.getDyeData()).put("Patterns", new ListTag(CompoundTag.class, nbtPatterns)).build();
showTileEntityData(player, location, 3, compoundTag);
}
use of net.aufdemrand.denizen.nms.util.jnbt.CompoundTag in project Denizen-For-Bukkit by DenizenScript.
the class PacketHelper_v1_11_R1 method showBannerUpdate.
@Override
public void showBannerUpdate(Player player, Location location, DyeColor base, List<Pattern> patterns) {
List<CompoundTag> nbtPatterns = new ArrayList<CompoundTag>();
for (Pattern pattern : patterns) {
nbtPatterns.add(NMSHandler.getInstance().createCompoundTag(new HashMap<String, Tag>()).createBuilder().putInt("Color", pattern.getColor().getDyeData()).putString("Pattern", pattern.getPattern().getIdentifier()).build());
}
CompoundTag compoundTag = NMSHandler.getInstance().getBlockHelper().getNbtData(location.getBlock()).createBuilder().putInt("Base", base.getDyeData()).put("Patterns", new ListTag(CompoundTag.class, nbtPatterns)).build();
showTileEntityData(player, location, 3, compoundTag);
}
use of net.aufdemrand.denizen.nms.util.jnbt.CompoundTag in project Denizen-For-Bukkit by DenizenScript.
the class PacketHelper_v1_9_R2 method showBannerUpdate.
@Override
public void showBannerUpdate(Player player, Location location, DyeColor base, List<Pattern> patterns) {
List<CompoundTag> nbtPatterns = new ArrayList<CompoundTag>();
for (Pattern pattern : patterns) {
nbtPatterns.add(NMSHandler.getInstance().createCompoundTag(new HashMap<String, Tag>()).createBuilder().putInt("Color", pattern.getColor().getDyeData()).putString("Pattern", pattern.getPattern().getIdentifier()).build());
}
CompoundTag compoundTag = NMSHandler.getInstance().getBlockHelper().getNbtData(location.getBlock()).createBuilder().putInt("Base", base.getDyeData()).put("Patterns", new ListTag(CompoundTag.class, nbtPatterns)).build();
showTileEntityData(player, location, 3, compoundTag);
}
Aggregations