diff --git a/docs/assets/stylesheets/styling.css b/docs/assets/stylesheets/styling.css index 253529f..a8ebd04 100644 --- a/docs/assets/stylesheets/styling.css +++ b/docs/assets/stylesheets/styling.css @@ -1,3 +1,7 @@ .md-header__button.md-logo img { height: 3rem; +} + +.hide-list ul > li { + list-style-type: none; } \ No newline at end of file diff --git a/docs/developers/index.md b/docs/developers/index.md new file mode 100644 index 0000000..5d048b4 --- /dev/null +++ b/docs/developers/index.md @@ -0,0 +1,37 @@ +--- +description: Pages aimed at plugin developers who want to use PlaceholderAPI in their own plugin or want to make their own PlaceholderExpansion. +--- + +# Dev Guides + +The pages listed under this section are meant for developers of plugins who want to either create PlaceholderExpansions or want to otherwise work with PlaceholderAPI (i.e. supporting external placeholders through it). + +---- + +
+ +- ### Using PlaceholderAPI + + ---- + + Guide on how to use PlaceholderAPI in your own plugin. + + - [:octicons-chevron-right-16: Go to Page](using-placeholderapi.md) + +- ### Creating a PlaceholderExpansion + + ---- + + Comprehensive guide on how to create a PlaceholderExpansion for other plugins to use through PlaceholderAPI. + + - [:octicons-chevron-right-16: Go to Page](creating-a-placeholderexpansion.md) + +- ### eCloud + + ---- + + Information about PlaceholderAPI's expansion cloud, including how to submit your own expansion or update it. + + - [:octicons-chevron-right-16: Go to Page](expansion-cloud.md) + +
\ No newline at end of file diff --git a/docs/developers/using-placeholderapi.md b/docs/developers/using-placeholderapi.md index 340ab67..46ae8d8 100644 --- a/docs/developers/using-placeholderapi.md +++ b/docs/developers/using-placeholderapi.md @@ -124,7 +124,7 @@ To use placeholders from other plugins in our own plugin, we simply have to [(so It is also important to point out, that any required plugin/dependency for an expansion has to be on the server and enabled, or the `setPlaceholders` method will just return the placeholder itself (do nothing). -**Example**: +/// example Let's assume we want to send a custom join message that shows the primary group a player has. To achieve this, we can do the following: ```java @@ -177,3 +177,4 @@ public class JoinExample extends JavaPlugin implements Listener { } } ``` +/// \ No newline at end of file diff --git a/docs/faq.md b/docs/faq.md index 99064bb..c962b64 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -8,25 +8,24 @@ Here are frequently asked questions about stuff related to PlaceholderAPI. ## What is an Expansion? -An expansion (aka PlaceholderExpansion) usualy refers to a separate jar file that is added to PlaceholderAPI's `expansion` folder to add extra placeholders to use in other plugins. -External PlaceholderExpansions are downloaded from PlaceholderAPI's eCloud through the [`/papi ecloud download `](commands.md#papi-ecloud-download) command. +An expansion (or PlaceholderExpansion) refers to either a jar file or part of a plugin that provides placeholders to use through PlaceholderAPI itself. +Whether said expansion is a separate jar file or part of a plugin depends on the expansion itself and its main purpose. -Plugins may provide their own PlaceholderExpansion directly without any external jar file being used. +Expansions that are separate jar files can be found on the eCloud and are downloadable through [`/papi ecloud download `](commands.md#papi-ecloud-download) if the expansion is verified. ## It only shows `%placeholder%` and not the variable When a plugin or [`/papi parse me %placeholder%`](commands.md#papi-parse) only returns the placeholder itself and no value should you check for the following things: - ### The expansion is actually installed. - In many cases is the cause that the expansion of the placeholder is missing. - Just execute [`/papi ecloud download `](commands.md#papi-ecloud-download) followed by `/papi reload` to activate it. You can find a list of Expansions and their Placeholders [on the placeholder list](users/placeholder-list.md). + + Some expansions may not be integrated into a plugin or don't even have a plugin to depend on, meaning that they may be their own separate jar file that you have to download. + Such expansions can usually be found on the eCloud of PlaceholderAPI and be downloaded using the [`/papi ecloud download `](commands.md#papi-ecloud-download) command. - /// note - Not all placeholders come in their own expansion. Some plugins *hardcode* them in and load them on startup, when hooking into PlaceholderAPI. - Such expansions may have `NO DOWNLOAD COMMAND` displayed on the Placeholder list. - /// + Whether an expansion is available on the eCloud or not can be found out in the [Placeholder List](users/placeholder-list.md) with any expansion displaying a papi command being downlodable. - ### Plugin actually supports PlaceholderAPI + It can happen that the plugin you use to display the placeholder in doesn't support PlaceholderAPI. In such a case check, if the parse command returns the actual value of a placeholder. If that is the case while the plugin is still displaying the placeholder, can this be an indicator of the plugin not supporting PlaceholderAPI. @@ -34,19 +33,26 @@ When a plugin or [`/papi parse me %placeholder%`](commands.md#papi-parse) only r Just make sure that "Supports placeholders" has a check mark in front of it. - ### No typo in the placeholder + Double-check that the placeholder you set doesn't contain a typo. You can use [`/papi ecloud placeholders `](commands.md#papi-ecloud-placeholders) (replace `` with the name of the expansion) to get a list of all the placeholders the expansion may have. Keep in mind that this only works for separate expansions on the eCloud and not for those that are loaded by plugins. + + Additionally can the placeholder list from the eCloud be outdated. It is recommended to check the [Placeholder List](users/placeholder-list.md) or see if there is any documentation for the placeholders you want to use. - ### Plugin is enabled + If an expansion depends on a plugin, make sure you have the plugin installed and that it is enabled (Shows green in `/pl`). ## I can't download the expansion -Make sure, that the connection to the cloud (https://api.extendedclip.com) isn't blocked by a firewall or similar. -Next step would be to check if the expansion actually exists on the cloud. Not all plugins provide their placeholders through a separate jar on the cloud. Some have them build in and register them on startup. +Make the following checks: -If both checks failed, go to the cloud-page and download the jar manually. Put it then in the `expansions` folder of PlaceholderAPI (`/plugins/PlaceholderAPI/expansions`). -Finally execute `/papi reload` to load the expansion. +1. The connection to the eCloud (Located at https://api.extendedclip.com) is not blocked through a firewall or your server host. +2. The expansion you want to use is actually on the eCloud. Some expansions are included in a plugin directly. +3. The expansion is verified. Only verified expansions can be downloaded through PlaceholderAPI's download command. This is a security measure to prevent the spread of malware. + +If the above checks are all fine and you still can't get the expansion through the download command, consider downloading it manually. +To do that, head to the expansion's page on the ecloud, download the jar file and put it into `/plugins/PlaceholderAPI/expansions/` before using [`/papi reload`](commands.md#papi-reload). ## How can other plugins use my placeholders with PlaceholderAPI? diff --git a/docs/index.md b/docs/index.md index effcbbc..ec802b8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,14 +7,69 @@ It also has a community-curated list of all available Placeholder expansions and ## Navigation -- [Commands](commands.md) -- User Guides - - [Using Placeholders](users/using-placeholders.md) - - [Placeholder List](users/placeholder-list.md) - - [Plugins using PlaceholderAPI](users/plugins-using-placeholderapi.md) -- Dev Guides - - [Using PlaceholderAPI](developers/using-placeholderapi.md) - - [Making a PlaceholderExpansion](developers/creating-a-placeholderexpansion.md) - - [eCloud](developers/expansion-cloud.md) -- [Common Issues](common-issues.md) -- [FAQ](faq.md) \ No newline at end of file +
+ +- ### :material-slash-forward: Commands + + ---- + + List of all available commands in PlaceholderAPI. + + - [:octicons-chevron-right-16: Go to Page](commands.md) + +- ### :material-account-file-text: User Guides + + ---- + + Pages aimed at server owners who want to utilize PlaceholderAPI. + + Available pages: + + - [:octicons-chevron-right-16: Using Placeholders](users/using-placeholders.md) + - [:octicons-chevron-right-16: Placeholder List](users/placeholder-list.md) + - [:octicons-chevron-right-16: Plugins using PlaceholderAPI](users/plugins-using-placeholderapi.md) + +- ### :material-file-code: Dev Guides + + ---- + + Pages aimed at plugin developers who want to use PlaceholderAPI in their own plugin or want to make their own PlaceholderExpansion. + + Available pages: + + - [:octicons-chevron-right-16: Using PlaceholderAPI](developers/using-placeholderapi.md) + - [:octicons-chevron-right-16: Creating a PlaceholderExpansion](developers/creating-a-placeholderexpansion.md) + - [:octicons-chevron-right-16: eCloud](developers/expansion-cloud.md) + +- ### :material-alert-circle-outline: Common Issues + + ---- + + Common problems you may face while using PlaceholderAPI, and how to solve them. + + - [:octicons-chevron-right-16: Go to Page](common-issues.md) + +- ### :material-chat-question: FAQ + + ---- + + Frequently Asked Questions and their answers. + + - [:octicons-chevron-right-16: Go to Page](faq.md) + +
+ + + + +- [:material-slash-forward: Commands](commands.md) +- :material-account-file-text: User Guides + - [:material-cog: Using Placeholders](users/using-placeholders.md) + - [:material-format-list-bulleted-square: Placeholder List](users/placeholder-list.md) + - [:material-graph: Plugins using PlaceholderAPI](users/plugins-using-placeholderapi.md) +- :material-file-code: Dev Guides + - [:material-cog: Using PlaceholderAPI](developers/using-placeholderapi.md) + - [:material-code-braces: Making a PlaceholderExpansion](developers/creating-a-placeholderexpansion.md) + - [:material-cloud-braces: eCloud](developers/expansion-cloud.md) +- [:material-alert-circle-outline: Common Issues](common-issues.md) +- [:material-chat-question: FAQ](faq.md) \ No newline at end of file diff --git a/docs/users/index.md b/docs/users/index.md new file mode 100644 index 0000000..e2bd80a --- /dev/null +++ b/docs/users/index.md @@ -0,0 +1,37 @@ +--- +description: Pages aimed at server owners who want to utilize PlaceholderAPI. +--- + +# User Guides + +The pages listed under this section are meant for server owners who want to use PlaceholderAPI. + +---- + +
+ +- ### Using Placeholders + + ---- + + User Guide on how to use placeholders in a plugin. + + - [:octicons-chevron-right-16: Go to Page](using-placeholders.md) + +- ### Placeholder List + + ---- + + Community-curated list of available PlaceholderExpansions and their placeholders. + + - [:octicons-chevron-right-16: Go to Page](placeholder-list.md) + +- ### Plugins using PlaceholderAPI + + ---- + + List of Plugins that support PlaceholderAPI and/or provide their own placeholders to use. + + - [:octicons-chevron-right-16: Go to Page](plugins-using-placeholderapi.md) + +
\ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 247bd46..189304f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -71,10 +71,12 @@ nav: - index.md - commands.md - User Guides: + - users/index.md - users/using-placeholders.md - users/placeholder-list.md - users/plugins-using-placeholderapi.md - Dev Guides: + - developers/index.md - developers/using-placeholderapi.md - developers/creating-a-placeholderexpansion.md - developers/expansion-cloud.md @@ -94,6 +96,7 @@ markdown_extensions: - toc: permalink: true - meta + - md_in_html - pymdownx.superfences - pymdownx.magiclink: repo_url_shortener: true