-
-
Notifications
You must be signed in to change notification settings - Fork 6
Integrations | Placeholder API
Information about Novaconomy's Placeholder API.
All Current Placeholders are available here in the Maps provided.
Placeholders are automatically registered if the plugin detects that Placeholder API is present. All Placeholders must be appended by novaconomy
in order for them to parse correctly.
# /papi bcparse Broadcasts the Result
/papi bcparse MyPlayer1234 His business name is %novaconomy_business_name%!
# /papi parse Returns the Result
/papi parse MyPlayer1234 He has %novaconomy_business_product_count% products!
Fetches the Player's Business Name, if it exists. Will be blank if it doesn't exist.
// Player player = ...
String businessName = PlaceholderAPI.setPlaceholders(player, "%novaconomy_business_name%");
The number of products the player's business has. Will be blank (not 0) if the player does not have a business.
// Player player = ...
String productCountS = PlaceholderAPI.setPlaceholders(player, "%novaconomy_business_product_count%");
int productCount = Integer.parseInt(productCountS.isEmpty() ? "0" : productCountS);
The last deposit amount this player has made to the bank. Will be 0 if no deposits yet.
// Player player = ...
int lastDepositAmount = Integer.parseInt(PlaceholderAPI.setPlaceholders(player, "%novaconomy_last_deposit_amount%");
More Placeholder Documentation will soon follow.
v1.7.2 introduces parametric placeholders, which input additional arguments present throughout other features of the Novaconomy Plugin.
Fetches the balance amount for a specific economy. Since Economy names are case insensitive to create, they must be automatically lowercased.
// Player player = ...
// Fetches the balance from the 'Coins' economy
double coins = Double.parseDouble(PlaceholderAPI.setPlaceholders(player, "%novaconomy_coins_balance%");
// Fetches the balance from the 'Gems' economy
double gems = Double.parseDouble(PlaceholderAPI.setPlaceholders(player, "%novaconomy_gems_balance%");
// Fetches the balance from the 'Pearls' economy
double pearls = Double.parseDouble(PlaceholderAPI.setPlaceholders(player, "%novaconomy_pearls_balance%");
Fetches the amount of money the player has donated for this specific economy.
// Player player = ...
// Fetches the donated amount from the 'Coins' economy
double coins = Double.parseDouble(PlaceholderAPI.setPlaceholders(player, "%novaconomy_coins_donated_amount%");
// Fetches the donated amount from the 'Gems' economy
double gems = Double.parseDouble(PlaceholderAPI.setPlaceholders(player, "%novaconomy_gems_donated_amount%");
// Fetches the donated amount from the 'Pearls' economy
double pearls = Double.parseDouble(PlaceholderAPI.setPlaceholders(player, "%novaconomy_pearls_donated_amount%");
Copyright © 2021-Present Team Inceptus. All Rights Reserved.
Licensed under the GPL-v3.0.