PlaceholderAPI - plasmoapp/plasmo-voice GitHub Wiki

PlaceholderAPI support

PlaceholderAPI is a plugin for Spigot servers that allows server owners to display information from various plugins with a uniform format.

%plasmovoice_installed% ā€” Returns true or false, if the player has the mod installed or not
%plasmovoice_players% ā€” The number of players with the mod installed

Icons instead of true or false

Credit to anomouse on Plasmo R&D Discord for making the tutorial, and KPidS for translating and editing.

image

1. Download the Javascript extension for PlaceholderAPI

/papi ecloud download Javascript
/papi reload

2. Create a script

Go to /plugins/PlaceholderAPI/javascripts/ and create a file called check_voice.js.

Paste this code into the file. You can also customize the icons.

var placeholder = "%plasmovoice_installed%";
var voice = PlaceholderAPI.static.setPlaceholders(BukkitPlayer, placeholder);

var checkVoice = function (voice) {
  return voice === "true" ? " &aā—&f | " : " &cā—&f | ";
};

checkVoice(voice);

3. Import the script you created

Go to /plugins/PlaceholderAPI/ folder and open javascript_placeholders.yml file

Scroll to the bottom of the file and add these lines:

check_voice:
  file: check_voice.js

4. Reload Placeholder API

/papi reload

5. Use the placeholder you created

%javascript_check_voice%