be.maximvdw.placeholderapi.PlaceholderAPI Java Examples
The following examples show how to use
be.maximvdw.placeholderapi.PlaceholderAPI.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MVdWPlaceholderAPIHook.java From factions-top with MIT License | 6 votes |
@Override public boolean initialize(List<Integer> enabledRanks) { LastReplacer lastReplacer = new LastReplacer(this.lastReplacer); boolean updated = PlaceholderAPI.registerPlaceholder(plugin, "factionstop_name:last", lastReplacer); for (int rank : enabledRanks) { RankReplacer replacer = new RankReplacer(rankReplacer, rank); if (PlaceholderAPI.registerPlaceholder(plugin, "factionstop_name:" + rank, replacer)) { updated = true; } } PlayerReplacer playerReplacer = new PlayerReplacer(this.playerReplacer); if (PlaceholderAPI.registerPlaceholder(plugin, "factionstop_rank:player", playerReplacer)) { updated = true; } return updated; }
Example #2
Source File: MVdWPlaceholderReplacer.java From MarriageMaster with GNU General Public License v3.0 | 6 votes |
public MVdWPlaceholderReplacer(MarriageMaster plugin, PlaceholderManager placeholderManager) { set(plugin, placeholderManager); boolean MVdW = true; for(String placeholder : placeholderManager.getPlaceholders().keySet()) { MVdW &= PlaceholderAPI.registerPlaceholder(plugin, "marriagemaster_" + placeholder, this); } if(MVdW) { this.plugin.getLogger().info(ConsoleColor.GREEN + "MVdW placeholder hook was successfully registered!" + ConsoleColor.RESET); } else { this.plugin.getLogger().info(ConsoleColor.RED + "MVdW placeholder hook failed to registered!" + ConsoleColor.RESET); } }
Example #3
Source File: MVdWPlaceholderAPISupport.java From Crazy-Crates with MIT License | 5 votes |
public static void registerPlaceholders(Plugin plugin) { for (final Crate crate : cc.getCrates()) { if (crate.getCrateType() != CrateType.MENU) { PlaceholderAPI.registerPlaceholder(plugin, "crazycrates_" + crate.getName(), e -> NumberFormat.getNumberInstance().format(cc.getVirtualKeys(e.getPlayer(), crate))); PlaceholderAPI.registerPlaceholder(plugin, "crazycrates_" + crate.getName() + "_physical", e -> NumberFormat.getNumberInstance().format(cc.getPhysicalKeys(e.getPlayer(), crate))); PlaceholderAPI.registerPlaceholder(plugin, "crazycrates_" + crate.getName() + "_total", e -> NumberFormat.getNumberInstance().format(cc.getTotalKeys(e.getPlayer(), crate))); } } }
Example #4
Source File: HookMVdW.java From CombatLogX with GNU General Public License v3.0 | 5 votes |
public void register() { String prefix = "combatlogx_"; JavaPlugin plugin = this.plugin.getPlugin(); for(String string : placeholderList) { String placeholder = (prefix + string); PlaceholderAPI.registerPlaceholder(plugin, placeholder, this); } }
Example #5
Source File: SparkMVdWPlaceholders.java From spark with GNU General Public License v3.0 | 4 votes |
public SparkMVdWPlaceholders(BukkitSparkPlugin plugin, SparkPlatform platform) { this.platform = platform; PlaceholderAPI.registerPlaceholder(plugin, "spark_*", this); }
Example #6
Source File: HookMVdWPlaceholderAPI.java From CombatLogX with GNU General Public License v3.0 | 4 votes |
public static String replacePlaceholders(Player player, String string) { return PlaceholderAPI.replacePlaceholders(player, string); }
Example #7
Source File: MVdWPlaceholderAPIHook.java From FunnyGuilds with Apache License 2.0 | 4 votes |
public static String replacePlaceholders(Player user, String base) { return PlaceholderAPI.replacePlaceholders(user, base); }