use of com.iridium.iridiumcore.utils.Placeholder in project IridiumSkyblock by Iridium-Development.
the class IslandManager method getIslandCrystal.
public ItemStack getIslandCrystal(int amount) {
ItemStack itemStack = ItemStackUtils.makeItem(IridiumSkyblock.getInstance().getConfiguration().islandCrystal, Collections.singletonList(new Placeholder("amount", String.valueOf(amount))));
NBTItem nbtItem = new NBTItem(itemStack);
NBTCompound nbtCompound = nbtItem.getOrCreateCompound("iridiumskyblock");
nbtCompound.setInteger("islandCrystals", amount);
return nbtItem.getItem();
}
use of com.iridium.iridiumcore.utils.Placeholder in project IridiumSkyblock by Iridium-Development.
the class PlaceholderBuilder method applyPlayerPlaceholders.
public PlaceholderBuilder applyPlayerPlaceholders(User user) {
placeholderList.add(new Placeholder("player_name", user.getName()));
placeholderList.add(new Placeholder("has_island", user.getIsland().isPresent() ? IridiumSkyblock.getInstance().getMessages().yes : IridiumSkyblock.getInstance().getMessages().no));
placeholderList.add(new Placeholder("player_rank", user.getIslandRank().getDisplayName()));
placeholderList.add(new Placeholder("player_join", user.getJoinTime().format(DateTimeFormatter.ofPattern(IridiumSkyblock.getInstance().getConfiguration().dateTimeFormat))));
return this;
}
Aggregations