use of com.magmaguy.elitemobs.config.customtreasurechests.CustomTreasureChestConfigFields in project EliteMobs by MagmaGuy.
the class Minidungeon method addRelativeTreasureChest.
public Location addRelativeTreasureChest(String customTreasureChestConfigString, Location location, Player player) {
if (dungeonPackagerConfigFields.getAnchorPoint() == null)
return null;
CustomTreasureChestConfigFields customTreasureChestConfigFields = CustomTreasureChestsConfig.getCustomTreasureChestConfigFields().get(customTreasureChestConfigString);
if (customTreasureChestConfigFields == null)
return null;
Location relativeLocation = location.clone().subtract(dungeonPackagerConfigFields.getAnchorPoint());
CustomTreasureChestsConfig.addTreasureChestEntry(player, customTreasureChestConfigString);
if (dungeonPackagerConfigFields.addRelativeTreasureChests(customTreasureChestConfigFields, relativeLocation))
return relativeLocation;
else
return null;
}
Aggregations