Compare commits
144 Commits
feat/impro
...
feat/wiki-
Author | SHA1 | Date | |
---|---|---|---|
|
721cc30e0c | ||
|
45f7147270 | ||
|
47e255a58e | ||
|
23cb41f002 | ||
|
aa280421ae | ||
|
bb2a65eda8 | ||
|
86d2a81938 | ||
|
b3c551c22a | ||
|
d81ea94cdc | ||
|
4e1f03d231 | ||
|
f9ec9a2c80 | ||
|
be9accf81a | ||
|
3eb3686790 | ||
|
feeda4e95d | ||
|
47fc0cff3b | ||
|
d621120186 | ||
|
ef1dc4a9da | ||
|
5998c859d3 | ||
|
f910851acd | ||
|
6378037a70 | ||
|
4df989c620 | ||
|
5f52d22759 | ||
|
5537b88750 | ||
|
3a3781dfb4 | ||
|
f9e627e34f | ||
|
7adecf162b | ||
|
5d974213cb | ||
|
93dc06f70d | ||
|
26fa1b34ad | ||
|
43f05967e3 | ||
|
ecaf81498a | ||
|
0a1bb45a72 | ||
|
d42cff4f7d | ||
|
910b6b8330 | ||
|
876a66b60c | ||
|
1ac0214f64 | ||
|
179f33bbac | ||
|
7d32fb8714 | ||
|
ec6a0c6591 | ||
|
47d491be6f | ||
|
5c8d44df22 | ||
|
0b4f936b40 | ||
|
5ac8030138 | ||
|
f3262ee1cd | ||
|
254cd0e456 | ||
|
2300e6ed18 | ||
|
ec77843458 | ||
|
4e99b64d18 | ||
|
2d072f36a2 | ||
|
d0acc4c831 | ||
|
64cb283f03 | ||
|
fab7ad4fea | ||
|
4f485a0087 | ||
|
e92fbb8bea | ||
|
10107ca3d9 | ||
|
909c265042 | ||
|
3c772be8c5 | ||
|
cef22b43f0 | ||
|
0c974ffe02 | ||
|
fad217cd15 | ||
|
138da668fb | ||
|
7f39f06b39 | ||
|
e3980cf574 | ||
|
c7c0fa75f0 | ||
|
47709881b7 | ||
|
2eeb7ecea6 | ||
|
5f1a72bd7f | ||
|
37cd6d798b | ||
|
249200bfbd | ||
|
569d71c874 | ||
|
373f2fa92b | ||
|
06579f44c7 | ||
|
16bf445a1a | ||
|
c530b1178a | ||
|
9c5c837165 | ||
|
284966f2cb | ||
|
3627f3fa36 | ||
|
87cb643815 | ||
|
4cdecf4b5f | ||
|
995d5c892f | ||
|
73f9e93192 | ||
|
440e2705d6 | ||
|
e12f969bee | ||
|
c9ec93510d | ||
|
de6b783032 | ||
|
04d34c8360 | ||
|
e5df5741c1 | ||
|
da04d44af3 | ||
|
6025003453 | ||
|
7493dfa5b4 | ||
|
eba3b62956 | ||
|
b2489f8c1f | ||
|
01515b4f76 | ||
|
d95547f299 | ||
|
7fc345e82a | ||
|
32c54bb456 | ||
|
8fc41e3682 | ||
|
6f349d7fe3 | ||
|
9308125653 | ||
|
c8e603b5a6 | ||
|
f40d2ee836 | ||
|
9df50fdd8c | ||
|
3e95670740 | ||
|
b301b9b1d6 | ||
|
76ba0508e2 | ||
|
4f7a3b6eab | ||
|
a1b0ba2b36 | ||
|
552d36f976 | ||
|
a37b7cb051 | ||
|
dbb4be1b69 | ||
|
ee7725d4d5 | ||
|
7399e9494f | ||
|
26f6b2d897 | ||
|
6a3e3d9caf | ||
|
5bc7f4c408 | ||
|
8fa1fbf7cc | ||
|
9fc2ba71cc | ||
|
c93a0ad66d | ||
|
e334048209 | ||
|
7e4dd4e598 | ||
|
2ef77d1976 | ||
|
9416841fc8 | ||
|
e8892c77ff | ||
|
eecc52652d | ||
|
165134fb18 | ||
|
364b27ef70 | ||
|
a22192bd7b | ||
|
0f0ad8dbdc | ||
|
8ebdf2117b | ||
|
fc454a5248 | ||
|
93f7f2ebed | ||
|
fe72d2c978 | ||
|
4520e4c694 | ||
|
c6eb85ee41 | ||
|
1b478a6a65 | ||
|
27d3c818f2 | ||
|
5146032244 | ||
|
bab7280cef | ||
|
7c805aa3b8 | ||
|
3b84bc7ed2 | ||
|
b116a8b6ce | ||
|
a0e055bf91 | ||
|
d2bce7bbb3 | ||
|
d33a415687 |
67
.github/workflows/publish_site.yml
vendored
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
#
|
||||||
|
# This is a GitHub Action that allows us to build and update the wiki
|
||||||
|
# on GitHub Pages using MkDocs.
|
||||||
|
#
|
||||||
|
name: Update Wiki from Repository
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
#
|
||||||
|
# Only trigger when the push changes any files on the wiki branch.
|
||||||
|
#
|
||||||
|
branches:
|
||||||
|
- 'wiki'
|
||||||
|
#
|
||||||
|
# Ignore changes to the README.md file
|
||||||
|
#
|
||||||
|
paths-ignore:
|
||||||
|
- 'README.md'
|
||||||
|
#
|
||||||
|
# Releases cause this action to also fire.
|
||||||
|
# Using this prevents this problem.
|
||||||
|
#
|
||||||
|
tags-ignore:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: github-pages
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
buildSite:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: wiki
|
||||||
|
- name: Setup Python 3.x
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Update Pip and Setuptools
|
||||||
|
run: python -m pip install -U pip setuptools
|
||||||
|
- name: Install dependencies
|
||||||
|
run: python -m pip install mkdocs-material
|
||||||
|
- name: Build pages
|
||||||
|
run: mkdocs build
|
||||||
|
- name: Configure GitHub Pages
|
||||||
|
uses: actions/configure-pages@v5
|
||||||
|
- name: Upload Pages Artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: 'site/'
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
id: deployment
|
39
.github/workflows/push_to_wiki.yml
vendored
@@ -1,39 +0,0 @@
|
|||||||
#
|
|
||||||
# This is a GitHub Action that allows us to auto-update the wiki
|
|
||||||
# when a Pull request changes specific files in the wiki branch.
|
|
||||||
#
|
|
||||||
name: Update Wiki from Repository
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
#
|
|
||||||
# Only trigger when the push changes any files in the wiki-folder.
|
|
||||||
#
|
|
||||||
branches:
|
|
||||||
- 'wiki'
|
|
||||||
#
|
|
||||||
# Ignore changes to the README.md file
|
|
||||||
#
|
|
||||||
paths-ignore:
|
|
||||||
- 'README.md'
|
|
||||||
#
|
|
||||||
# Releases cause this action to also fire.
|
|
||||||
# Using this prevents this problem.
|
|
||||||
#
|
|
||||||
tags-ignore:
|
|
||||||
- '**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: 'Checkout Code'
|
|
||||||
uses: actions/Checkout@v3
|
|
||||||
- name: 'Update Wiki'
|
|
||||||
uses: Andrew-Chen-Wang/github-wiki-action@v3
|
|
||||||
env:
|
|
||||||
WIKI_DIR: '.'
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GH_MAIL: 'actions@github.com'
|
|
||||||
GH_NAME: 'github-actions[bot]'
|
|
||||||
EXCLUDED_FILES: 'README.md'
|
|
41
.theme/main.html
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block extrahead %}
|
||||||
|
{% if page and page.meta %}
|
||||||
|
{% set title = config.site_name %}
|
||||||
|
{% if page.meta.title %}
|
||||||
|
<meta property="og:title" content="{{ page.meta.title }} - {{ title }}">
|
||||||
|
<meta name="twitter:title" content="{{ page.meta.title }} - {{ title }}">
|
||||||
|
{% elif page.title and not page.is_homepage %}
|
||||||
|
<meta property="og:title" content="{{ title }} - {{ page.title | striptags }}">
|
||||||
|
<meta name="twitter:title" content="{{ title }} - {{ page.title | striptags }}">
|
||||||
|
{% else %}
|
||||||
|
<meta property="og:title" content="{{ title }}">
|
||||||
|
<meta name="twitter:title" content="{{ title }}">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if page.meta.description %}
|
||||||
|
<meta property="og:description" content="{{ page.meta.description }}">
|
||||||
|
<meta name="twitter:description" content="{{ page.meta.description }}">
|
||||||
|
{% else %}
|
||||||
|
<meta property="og:description" content="{{ config.site_description }}">
|
||||||
|
<meta name="twitter:description" content="{{ config.site_description }}">
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<meta name="theme-color" content="#4051b5">
|
||||||
|
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<meta property="og:url" content="{{ page.canonical_url }}">
|
||||||
|
<meta property="og:image" content="{{ config.site_url | url }}assets/img/favicons/android-chrome-512x512.png">
|
||||||
|
<meta property="og:image:type" content="image/png">
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary">
|
||||||
|
<meta name="twitter:creator" content="Chaos League Wiki Team">
|
||||||
|
<meta name="twitter:image" content="{{ config.site_url | url }}assets/img/favicons/android-chrome-512x512.png">
|
||||||
|
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ config.site_url | url }}assets/img/favicons/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ config.site_url | url }}assets/img/favicons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ config.site_url | url }}assets/img/favicons/favicon-16x16.png">
|
||||||
|
<link referrerpolicy="manifest" href="{{ config.site_url | url }}assets/web.manifest">
|
||||||
|
{% endblock %}
|
24
.theme/partials/copyright.html
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<div class="md-copyright">
|
||||||
|
<div class="md-copyright__highlight">
|
||||||
|
© 2015 - 2024 PlaceholderAPI Team and Contributors.<br>
|
||||||
|
All content is licensed under
|
||||||
|
<a href="https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/LICENSE" target="_blank" rel="noopener">
|
||||||
|
<span class="twemoji">{% include ".icons/octicons/law-16.svg" %}</span> GNU GPL v3.0
|
||||||
|
</a>
|
||||||
|
unless stated otherwise.<br>
|
||||||
|
<br>
|
||||||
|
<a href="#__consent"><span class="twemoji">{% include ".icons/octicons/gear-16.svg" %}</span> Manage Cookies</a>
|
||||||
|
</div>
|
||||||
|
{% if not config.extra.generator == false %}
|
||||||
|
Made with
|
||||||
|
<a href="https://www.mkdocs.org" target="_blank" rel="noopener">
|
||||||
|
MkDocs
|
||||||
|
</a>,
|
||||||
|
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||||||
|
Material for MkDocs
|
||||||
|
</a> and
|
||||||
|
<a href="https://facelessuser.github.io/pymdown-extensions/" target="_blank" rel="noopener">
|
||||||
|
PyMdown Extensions
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
239
Commands.md
@@ -1,239 +0,0 @@
|
|||||||
This page shows all commands, including with a detailed description of what every command does.
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
- **[Parse Commands](#parse-commands)**
|
|
||||||
- [`/papi bcparse <player|me> <string>`](#papi-bcparse)
|
|
||||||
- [`/papi cmdparse <player|me> <string>`](#papi-cmdparse)
|
|
||||||
- [`/papi parse <player|me> <string>`](#papi-parse)
|
|
||||||
- [`/papi parserel <player> <player> <string>`](#papi-parserel)
|
|
||||||
|
|
||||||
- **[eCloud Commands](#ecloud-commands)**
|
|
||||||
- [`/papi ecloud clear`](#papi-ecloud-clear)
|
|
||||||
- [`/papi ecloud disable`](#papi-ecloud-disable)
|
|
||||||
- [`/papi ecloud download <expansion> [version]`](#papi-ecloud-download)
|
|
||||||
- [`/papi ecloud enable`](#papi-ecloud-enable)
|
|
||||||
- [`/papi ecloud info <expansion> [version]`](#papi-ecloud-info)
|
|
||||||
- [`/papi ecloud list <all|<author>|installed>`](#papi-ecloud-list)
|
|
||||||
- [`/papi ecloud placeholders <expansion>`](#papi-ecloud-placeholders)
|
|
||||||
- [`/papi ecloud refresh`](#papi-ecloud-refresh)
|
|
||||||
- [`/papi ecloud status`](#papi-ecloud-status)
|
|
||||||
|
|
||||||
- **[Expansion Commands](#expansion-commands)**
|
|
||||||
- [`/papi info <expansion>`](#papi-info)
|
|
||||||
- [`/papi list`](#papi-list)
|
|
||||||
- [`/papi register <jar file>`](#papi-register)
|
|
||||||
- [`/papi unregister <jar file>`](#papi-unregister)
|
|
||||||
|
|
||||||
- **[Other Commands](#other-commands)**
|
|
||||||
- [`/papi dump`](#papi-dump)
|
|
||||||
- [`/papi help`](#papi-help)
|
|
||||||
- [`/papi reload`](#papi-reload)
|
|
||||||
- [`/papi version`](#papi-version)
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
### Parse Commands
|
|
||||||
These commands are used to parse placeholders into their respective values. Useful for debugging.
|
|
||||||
|
|
||||||
- #### `/papi bcparse`
|
|
||||||
**Description**:
|
|
||||||
Parses placeholders of a String and broadcasts the result to all players.
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
* `<player|me>` - The Player to parse values of the placeholder (Use `me` for yourself).
|
|
||||||
* `<Text with placeholders>` - The text to parse.
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi bcparse funnycube My name is %player_name%!
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### `/papi cmdparse`
|
|
||||||
**Description**:
|
|
||||||
Parses placeholders of a String and executes it as a command.
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
- `<player|me>` - The player to parse placeholders against. Use `me` for yourself.
|
|
||||||
- `<Command with placeholders>` - The Text to parse and execute as command. Please leave away the `/` of the command.
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi cmdparse funnycube say My name is %player_name%!
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### `/papi parse`
|
|
||||||
**Description**:
|
|
||||||
Parses the placeholders in a given text and shows the result.
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
* `<player|me>` - The Player to parse values of the placeholder (Use `me` for yourself).
|
|
||||||
* `<Text with placeholders>` - The text to parse.
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi parse funnycube My group is %vault_group%
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### `/papi parserel`
|
|
||||||
**Description**:
|
|
||||||
Parses a relational placeholder.
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
* `<player1>` - The first player.
|
|
||||||
* `<player2>` - the second player to compare with.
|
|
||||||
* `<Text with placeholders>` - The actual placeholder to parse.
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi parserel funnycube extended_clip %placeholder%
|
|
||||||
```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
### eCloud Commands
|
|
||||||
These commands all start with `/papi ecloud` and are used for things related about the [[Expansion Cloud]].
|
|
||||||
|
|
||||||
- #### `/papi ecloud clear`
|
|
||||||
**Description**:
|
|
||||||
Clears the cache for the eCloud.
|
|
||||||
|
|
||||||
- #### `/papi ecloud disable`
|
|
||||||
**Description**:
|
|
||||||
Disables the connection to the eCloud.
|
|
||||||
|
|
||||||
- #### `/papi ecloud download`
|
|
||||||
**Description**:
|
|
||||||
Allows you to download an expansion from the eCloud
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
- `<expansion>` - The expansion to download.
|
|
||||||
- `[version]` - The specific version of the expansion to download (Optional)
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi ecloud download Vault
|
|
||||||
/papi ecloud download Vault 1.5.2
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### `/papi ecloud enable`
|
|
||||||
**Description**:
|
|
||||||
Enables the connection to the eCloud
|
|
||||||
|
|
||||||
- #### `/papi ecloud info`
|
|
||||||
**Description**:
|
|
||||||
Gives information about a specific Expansion.
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
- `<expansion>` - The Expansion to retrieve information from.
|
|
||||||
- `[version]` - The Expansion's version to get information from.
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi ecloud info Vault
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### `/papi ecloud list`
|
|
||||||
**Description**:
|
|
||||||
Lists either all Expansions on the eCloud, only those by a specific author or only those that you have [installed](#papi-ecloud-download).
|
|
||||||
Installed Expansions show as green in the list and Expansions that are installed and have an update available show as gold.
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
- `<all|<author>|installed>` - List all Expansions, Expansions of a specific author or all Expnansions you have installed.
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi ecloud list all
|
|
||||||
/papi ecloud list clip
|
|
||||||
/papi ecloud list installed
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### `/papi ecloud placeholders`
|
|
||||||
**Description**:
|
|
||||||
List all placeholders of an Expansion.
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
- `<expansion>` - The Expansion to list placeholders of.
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi ecloud placeholders Vault
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### `/papi ecloud refresh`
|
|
||||||
**Description**:
|
|
||||||
Refresh the cached data from the eCloud.
|
|
||||||
|
|
||||||
- #### `/papi ecloud status`
|
|
||||||
**Description**:
|
|
||||||
Displays the actual Status of the eCloud.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
### Expansion Commands
|
|
||||||
These commands can be used to manage the expansions that you have currently installed.
|
|
||||||
|
|
||||||
- #### `/papi info`
|
|
||||||
**Description**:
|
|
||||||
Gives you information about the specified Expansion.
|
|
||||||
|
|
||||||
**Argument(s)**:
|
|
||||||
- `<expansion>` - The Expansion to get info from (Needs to be registered and active).
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi info Vault
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### `/papi list`
|
|
||||||
**Description**:
|
|
||||||
Lists all active/registered expansions.
|
|
||||||
This is different to [/papi ecloud list installed](#papi-ecloud-list) in the fact, that it also includes expansions that were installed through a plugin (That aren't a separate jar-file) and it also doesn't show which one have updates available.
|
|
||||||
|
|
||||||
- #### `/papi register`
|
|
||||||
**Description**:
|
|
||||||
Registers an expansion from a specified filename.
|
|
||||||
This is useful in cases, where you downloaded the expansion manually and don't want to restart the server.
|
|
||||||
The file needs to be inside `/plugins/PlaceholderAPI/expansions`.
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
- `<filename>` - The file to register (including the file-extension).
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi register MyExpansion.jar
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### `/papi unregister`
|
|
||||||
**Description**:
|
|
||||||
Unregisters the specified expansion.
|
|
||||||
|
|
||||||
**Arguments**:
|
|
||||||
- `<filename>` - The expansion to unregister.
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
/papi unregister MyExpansion.jar
|
|
||||||
```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
### Other Commands
|
|
||||||
These are other commands of PlaceholderAPI that don't fit any of the above categories.
|
|
||||||
|
|
||||||
- #### `/papi dump`
|
|
||||||
**Description**:
|
|
||||||
Pastes useful information from PlaceholderAPI such as plugin version, server version and installed expansions to https://paste.helpch.at for simple sharing and support.
|
|
||||||
|
|
||||||
- #### `/papi help`
|
|
||||||
**Description**:
|
|
||||||
Displays all the commands PlaceholderAPI currently offers.
|
|
||||||
|
|
||||||
- #### `/papi reload`
|
|
||||||
**Description**:
|
|
||||||
Reloads the config settings.
|
|
||||||
You need to use this command after [downloading Expansions](#papi-ecloud-download) from the eCloud or they won't be properly registered.
|
|
||||||
|
|
||||||
- #### `/papi version`
|
|
||||||
**Description**:
|
|
||||||
Shows the current version and authors of PlaceholderAPI.
|
|
61
FAQ.md
@@ -1,61 +0,0 @@
|
|||||||
[readme]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki/README.md
|
|
||||||
|
|
||||||
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 <expansion>`|Commands#papi-ecloud-download]] command.
|
|
||||||
|
|
||||||
Some plugins may provide their PlaceholderExpansion directly without any external jar file being used.
|
|
||||||
|
|
||||||
## It only shows `%placeholder%` and not the variable
|
|
||||||
When a plugin or `/papi parse me %placeholder%` 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 <name of expansion>` followed by `/papi reload` to activate it. You can find a list of Expansions and their Placeholders [[on this page|Placeholders]].
|
|
||||||
|
|
||||||
**NOTE!**
|
|
||||||
Not all placeholders come in their own expansion. Some plugins *hardcode* them in and load them on startup, when hooking into PlaceholderAPI.
|
|
||||||
|
|
||||||
- ### 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.
|
|
||||||
|
|
||||||
You can find a list of plugins supporting PlaceholderAPI [[here|Plugins-using-PlaceholderAPI]].
|
|
||||||
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 <expansion>` (replace `<expansion>` 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.
|
|
||||||
|
|
||||||
- ### 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.
|
|
||||||
|
|
||||||
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`)
|
|
||||||
|
|
||||||
## How can other plugins use my placeholders with PlaceholderAPI?
|
|
||||||
A tutorial can be found [[here|Hook into PlaceholderAPI]]!
|
|
||||||
|
|
||||||
## Can I help on this wiki?
|
|
||||||
You sure can!
|
|
||||||
We welcome contributions to our wiki by everyone. If you found a typo or want to improve this wiki in another way, head over to the [Wiki's readme file][readme] to find out about how you can contribute towards this wiki.
|
|
||||||
|
|
||||||
## PlaceholderAPI is posting an error about an outdated expansion?
|
|
||||||
```
|
|
||||||
[00:00:01 ERROR]: [PlaceholderAPI] Failed to load Expansion class <expansion> (Is a dependency missing?)
|
|
||||||
[00:00:01 ERROR]: [PlaceholderAPI] Cause: NoClassDefFoundError <path>
|
|
||||||
```
|
|
||||||
|
|
||||||
If you receive the above error, try to do the following steps:
|
|
||||||
|
|
||||||
- Make sure any required dependency of the mentioned expansion (e.g. a plugin) is installed.
|
|
||||||
- Make sure you use the latest version supported for the server version you use.
|
|
||||||
- If you downloaded the jar from the ecloud, make sure it isn't malformed/corrupted.
|
|
||||||
|
|
||||||
If the issue persists after you've done those checks, report it to the author of the expansion.
|
|
||||||
In most cases is the issue that either a dependency is missing or that the expansion tries to use outdated methods from PlaceholderAPI.
|
|
79
Home.md
@@ -1,79 +0,0 @@
|
|||||||
<p align="center">
|
|
||||||
<img src="https://raw.githubusercontent.com/PlaceholderAPI/PlaceholderAPI/wiki/img/wiki-logo.png" alt="PlaceholderAPI">
|
|
||||||
</p>
|
|
||||||
This wiki gives you information on how to create placeholders in your plugin that can be used in other plugins, how to use other placeholders inside your plugin, or how to make an expansion.
|
|
||||||
It also has a list with all available placeholders (Work in progress).
|
|
||||||
|
|
||||||
### Setup
|
|
||||||
**[[Using Placeholders]]**
|
|
||||||
**[[Hook into PlaceholderAPI]]**
|
|
||||||
- [[First steps|Hook-into-PlaceholderAPI#first-steps]]
|
|
||||||
- [[Adding placeholders to PlaceholderAPI|PlaceholderExpansion]]
|
|
||||||
- [[Common Parts|PlaceholderExpansion#common-parts]]
|
|
||||||
- [[Without an external plugin|PlaceholderExpansion#without-a-plugin]]
|
|
||||||
- [[With an external Plugin (Separate Jar)|PlaceholderExpansion#with-a-plugin-external-jar]]
|
|
||||||
- [[With an external Plugin (Internal class)|PlaceholderExpansion#with-a-plugin-internal-class]]
|
|
||||||
- [[Relational Placeholders|PlaceholderExpansion#relational-placeholders]]
|
|
||||||
- [[Setting placeholders in your plugin|Hook-into-PlaceholderAPI#setting-placeholders-in-your-plugin]]
|
|
||||||
|
|
||||||
### Other
|
|
||||||
**[[Commands]]**
|
|
||||||
**[[Expansion cloud]]**
|
|
||||||
**[[FAQ]]**
|
|
||||||
**[[Common Issues]]**
|
|
||||||
**[[Plugins using PlaceholderAPI]]**
|
|
||||||
**[[Placeholders]]**
|
|
||||||
- [[Standalone|Placeholders#standalone]]
|
|
||||||
- [[A|Placeholders#a]]
|
|
||||||
- [[B|Placeholders#b]]
|
|
||||||
- [[C|Placeholders#c]]
|
|
||||||
- [[D|Placeholders#d]]
|
|
||||||
- [[E|Placeholders#e]]
|
|
||||||
- [[F|Placeholders#f]]
|
|
||||||
- [[G|Placeholders#g]]
|
|
||||||
- [[H|Placeholders#h]]
|
|
||||||
- [[I|Placeholders#i]]
|
|
||||||
- [[J|Placeholders#j]]
|
|
||||||
- [[K|Placeholders#k]]
|
|
||||||
- [[L|Placeholders#l]]
|
|
||||||
- [[M|Placeholders#m]]
|
|
||||||
- [[N|Placeholders#n]]
|
|
||||||
- [[O|Placeholders#o]]
|
|
||||||
- [[P|Placeholders#p]]
|
|
||||||
- [[Q|Placeholders#q]]
|
|
||||||
- [[R|Placeholders#r]]
|
|
||||||
- [[S|Placeholders#s]]
|
|
||||||
- [[T|Placeholders#t]]
|
|
||||||
- [[U|Placeholders#u]]
|
|
||||||
- [[V|Placeholders#v]]
|
|
||||||
- [[W|Placeholders#w]]
|
|
||||||
- [[X|Placeholders#x]]
|
|
||||||
- [[Y|Placeholders#y]]
|
|
||||||
- [[Z|Placeholders#z]]
|
|
||||||
- [[Plugin-placeholders|Placeholders#plugin-placeholders-1]]
|
|
||||||
- [[A|Placeholders#a-1]]
|
|
||||||
- [[B|Placeholders#b-1]]
|
|
||||||
- [[C|Placeholders#c-1]]
|
|
||||||
- [[D|Placeholders#d-1]]
|
|
||||||
- [[E|Placeholders#e-1]]
|
|
||||||
- [[F|Placeholders#f-1]]
|
|
||||||
- [[G|Placeholders#g-1]]
|
|
||||||
- [[H|Placeholders#h-1]]
|
|
||||||
- [[I|Placeholders#i-1]]
|
|
||||||
- [[J|Placeholders#j-1]]
|
|
||||||
- [[K|Placeholders#k-1]]
|
|
||||||
- [[L|Placeholders#l-1]]
|
|
||||||
- [[M|Placeholders#m-1]]
|
|
||||||
- [[N|Placeholders#n-1]]
|
|
||||||
- [[O|Placeholders#o-1]]
|
|
||||||
- [[P|Placeholders#p-1]]
|
|
||||||
- [[Q|Placeholders#q-1]]
|
|
||||||
- [[R|Placeholders#r-1]]
|
|
||||||
- [[S|Placeholders#s-1]]
|
|
||||||
- [[T|Placeholders#t-1]]
|
|
||||||
- [[U|Placeholders#u-1]]
|
|
||||||
- [[V|Placeholders#v-1]]
|
|
||||||
- [[W|Placeholders#w-1]]
|
|
||||||
- [[X|Placeholders#x-1]]
|
|
||||||
- [[Y|Placeholders#y-1]]
|
|
||||||
- [[Z|Placeholders#z-1]]
|
|
@@ -1,142 +0,0 @@
|
|||||||
[APIBadge]: https://img.shields.io/nexus/placeholderapi/me.clip/placeholderapi?server=https%3A%2F%2Frepo.extendedclip.com&label=API%20Version
|
|
||||||
|
|
||||||
[SpigotBadge]: https://img.shields.io/spiget/version/6245?label=Spigot
|
|
||||||
[Spigot]: https://spigotmc.org/resources/6245
|
|
||||||
|
|
||||||
[GitHubBadge]: https://img.shields.io/github/v/release/PlaceholderAPI/PlaceholderAPI?label=GitHub%20Release
|
|
||||||
[GitHub]: /PlaceholderAPI/PlaceholderAPI/releases/latest
|
|
||||||
|
|
||||||
> [![SpigotBadge]][Spigot] [![GitHubBadge]][GitHub]
|
|
||||||
>
|
|
||||||
> ![APIBadge]
|
|
||||||
>
|
|
||||||
> *The GitHub release may be different from the spigot release*
|
|
||||||
|
|
||||||
This page is about using PlaceholderAPI in your own plugin, to either let other plugins use your plugin, or just use placeholders from other plugins in your own.
|
|
||||||
|
|
||||||
Please note, that the examples in this page are only available for **PlaceholderAPI 2.10.0 or higher**!
|
|
||||||
|
|
||||||
## First steps
|
|
||||||
Before you can actually make use of PlaceholderAPI, you first have to import it into your project.
|
|
||||||
|
|
||||||
### Import with Maven
|
|
||||||
To import PlaceholderAPI, simply add the following code to your **pom.xml**
|
|
||||||
Replace `{VERSION}` with the version listed at the top of this page.
|
|
||||||
```xml
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>placeholderapi</id>
|
|
||||||
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>me.clip</groupId>
|
|
||||||
<artifactId>placeholderapi</artifactId>
|
|
||||||
<version>{VERSION}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Import with Gradle
|
|
||||||
Here is how you can import PlaceholderAPI through gradle.
|
|
||||||
Put this into your **Gradle.build**.
|
|
||||||
Replace `{VERSION}` with the version listed at the top of this page.
|
|
||||||
```gradle
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly 'me.clip:placeholderapi:{VERSION}'
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Set PlaceholderAPI as (soft)depend
|
|
||||||
Next step is to go to your plugin.yml and add PlaceholderAPI as a depend or softdepend, depending (no pun intended) on if it is optional or not.
|
|
||||||
|
|
||||||
**Example Softdepend**:
|
|
||||||
```yaml
|
|
||||||
name: ExamplePlugin
|
|
||||||
version: 1.0
|
|
||||||
author: author
|
|
||||||
main: your.main.path.here
|
|
||||||
|
|
||||||
softdepend: [PlaceholderAPI] # This is used, if your plugin works without PlaceholderAPI.
|
|
||||||
```
|
|
||||||
|
|
||||||
**Example Depend**:
|
|
||||||
```yaml
|
|
||||||
name: ExamplePlugin
|
|
||||||
version: 1.0
|
|
||||||
author: author
|
|
||||||
main: your.main.path.here
|
|
||||||
|
|
||||||
depend: [PlaceholderAPI] # If your plugin requires PlaceholderAPI, to work, use this.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Adding placeholders to PlaceholderAPI
|
|
||||||
|
|
||||||
A full guide on how to create expansions can be found on the [[PlaceholderExpansion]] page of this wiki.
|
|
||||||
|
|
||||||
## Setting placeholders in your plugin
|
|
||||||
PlaceholderAPI offers the ability, to automatically parse placeholders from other plugins within your own plugin, giving the ability for your plugin to support thousands of other placeholders without depending on each plugin individually.
|
|
||||||
To use placeholders from other plugins in our own plugin, we simply have to [(soft)depend on PlaceholderAPI](#set-placeholderapi-as-softdepend) and use the `setPlaceholders` method.
|
|
||||||
|
|
||||||
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**:
|
|
||||||
Let's assume we want to send an own join message that shows the group a player has.
|
|
||||||
To achieve that, we can do the following:
|
|
||||||
```java
|
|
||||||
package at.helpch.placeholderapi;
|
|
||||||
|
|
||||||
import me.clip.placeholderapi.PlaceholderAPI;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.EventPriority;
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
import me.clip.placeholderapi.PlaceholderAPI;
|
|
||||||
|
|
||||||
public class JoinExample extends JavaPlugin implements Listener {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEnable() {
|
|
||||||
|
|
||||||
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
|
||||||
/*
|
|
||||||
* We register the EventListener here, when PlaceholderAPI is installed.
|
|
||||||
* Since all events are in the main class (this class), we simply use "this"
|
|
||||||
*/
|
|
||||||
Bukkit.getPluginManager().registerEvents(this, this);
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
* We inform about the fact that PlaceholderAPI isn't installed and then
|
|
||||||
* disable this plugin to prevent issues.
|
|
||||||
*/
|
|
||||||
getLogger().warn("Could not find PlaceholderAPI! This plugin is required.");
|
|
||||||
Bukkit.getPluginManager().disablePlugin(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
|
||||||
public void onJoin(PlayerJoinEvent event) {
|
|
||||||
String joinText = "%player_name% &ajoined the server! They are rank &f%vault_rank%";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We parse the placeholders using "setPlaceholders"
|
|
||||||
* This would turn %vault_rank% into the name of the Group, that the
|
|
||||||
* joining player has.
|
|
||||||
*/
|
|
||||||
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);
|
|
||||||
|
|
||||||
event.setJoinMessage(joinText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
@@ -1,436 +0,0 @@
|
|||||||
[placeholderexpansion]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java
|
|
||||||
[relational]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/src/main/java/me/clip/placeholderapi/expansion/Relational.java
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
This page will cover how you can create your own [`PlaceholderExpansion`][placeholderexpansion] which you can either [[Upload to the eCloud|Expansion cloud]] or integrate into your own plugin.
|
|
||||||
|
|
||||||
It's worth noting that PlaceholderAPI relies on expansions being installed. PlaceholderAPI only acts as the core replacing utility while the expansions allow other plugins to use any installed placeholder in their own messages.
|
|
||||||
You can download Expansions either directly from the eCloud yourself, or download them through the [[download command of PlaceholderAPI|Commands#papi-ecloud-download]].
|
|
||||||
|
|
||||||
## Table of Contents
|
|
||||||
|
|
||||||
- [Getting started](#getting-started)
|
|
||||||
- [Common Parts](#common-parts)
|
|
||||||
- [Making an Internal Expansion](#making-an-internal-expansion)
|
|
||||||
- [Full Example](#full-example)
|
|
||||||
- [Register Your Expansion](#register-your-expansion)
|
|
||||||
- [Making an External Expansion](#making-an-external-expansion)
|
|
||||||
- [Full Example (Without Dependency)](#full-example-without-dependency)
|
|
||||||
- [Full Example (With Dependency)](#full-example-with-dependency)
|
|
||||||
- [Relational Placeholders](#relational-placeholders)
|
|
||||||
- [Quick Notes](#quick-notes)
|
|
||||||
- [Adding Relational Placeholders](#adding-relational-placeholders)
|
|
||||||
- [Full Example](#full-example-1)
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
For starters, you need to decide what type of [`PlaceholderExpansion`][placeholderexpansion] you want to create. There are various ways to create an expansion. This page will cover the most common ones.
|
|
||||||
|
|
||||||
### Common Parts
|
|
||||||
|
|
||||||
All shown examples will share the same common parts that belong to the [`PlaceholderExpansion`][placeholderexpansion] class.
|
|
||||||
In order to not repeat the same basic info for each method throughout this page, and to greatly reduce its overall length, we will cover the most basic/necessary ones here.
|
|
||||||
|
|
||||||
#### Basic PlaceholderExpansion Structure
|
|
||||||
|
|
||||||
```java
|
|
||||||
package at.helpch.placeholderapi.example.expansions;
|
|
||||||
|
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
|
||||||
|
|
||||||
public class SomeExpansion extends PlaceholderExpansion {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAuthor() {
|
|
||||||
return "someauthor";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIdentifier() {
|
|
||||||
return "example";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getVersion() {
|
|
||||||
return "1.0.0";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<details><summary>What are these options?</summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
- #### getAuthor
|
|
||||||
This method allows you to set the name of the expansion's author.
|
|
||||||
- #### getIdentifier
|
|
||||||
The identifier is the part in the placeholder that is between the first `%` (Or `{` if bracket placeholders are used) and the first `_`.
|
|
||||||
Because of that can you not use `%`, `{`, `}` or `_` in your identifier.
|
|
||||||
|
|
||||||
If you still want to use those symbols can you override the `getName()` method to display a different name.
|
|
||||||
- #### getVersion
|
|
||||||
This is a string, which means it can contain more than just a number. This is used to determine if a new update is available or not when the expansion is shared on the eCloud.
|
|
||||||
For expansions that are part of a plugin, this does not really matter.
|
|
||||||
|
|
||||||
Those are all the neccessary parts for your PlaceholderExpansion.
|
|
||||||
Any other methods that are part of the [`PlaceholderExpansion`][placeholderexpansion] class are optional and will usually not be used, or will default to a specific value. Please read the Javadoc comments of those methods for more information.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
You must choose between one of these two methods for handling the actual parsing of placeholders (Unless you're using [Relational Placeholders](#relational-placeholders)):
|
|
||||||
|
|
||||||
- #### onRequest(OfflinePlayer, String)
|
|
||||||
If not explicitly set, this will automatically call [`onPlaceholderRequest(Player, String)`](#onplaceholderrequestplayer-string).
|
|
||||||
This method is recommended as it allows the usage of offline players, meaning the player doesn't need to be online to obtain certain data from them like name or UUID.
|
|
||||||
- #### onPlaceholderRequest(Player, String)
|
|
||||||
If not set, this method will return `null` which PlaceholderAPI sees as an invalid placeholder.
|
|
||||||
The `Player` can be `null`, so keep that in mind when handling your placeholders.
|
|
||||||
|
|
||||||
PlaceholderAPI will **always** call `onRequest(OfflinePlayer, String)` in an expansion.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## Making an Internal Expansion
|
|
||||||
|
|
||||||
Internal PlaceholderExpansions are classes directly implemented into the plugin they depend on. The main benefit is, that you're not required to do any `canRegister()` check for your own plugin, as it is loaded within it.
|
|
||||||
Another benefit is that you can more easily access plugin data using Dependency Injection should an API not be accessible for the plugin.
|
|
||||||
|
|
||||||
It is important to note that PlaceholderExpansions loaded manually through the `register()` method (Therefore not being loaded by PlaceholderAPI itself) **require** to have the `persist()` method return `true` to avoid the expansion being unloaded during a `/papi reload`.
|
|
||||||
|
|
||||||
Depending on what info you try to access from your plugin (i.e. through the main class or a dedicated API) can you use Dependency Injection to obtain an instance of whatever you need.
|
|
||||||
Keep in mind that as mentioned earlier, the Expansion class won't be reloaded when `persist()` is set to `true`, so you have to refresh any info that may get outdated during a reload yourself.
|
|
||||||
|
|
||||||
Here is an example of a possible Dependency Injection:
|
|
||||||
```java
|
|
||||||
package at.helpch.placeholderapi.example.expansion;
|
|
||||||
|
|
||||||
import at.helpch.placeholderapi.example.SomePlugin;
|
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
|
||||||
|
|
||||||
public class SomeExpansion extends PlaceholderExpansion {
|
|
||||||
|
|
||||||
private final SomePlugin plugin;
|
|
||||||
|
|
||||||
public SomeExpansion(SomePlugin plugin) {
|
|
||||||
this.plugin = plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Imported methods from PlaceholderExpansion
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<details><summary><h3 title="Click to Open/Close">Full Example</h3></summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
> Please read the [`Common Parts` Section](#common-parts) for details on all the methods.
|
|
||||||
|
|
||||||
Below is a full example of an internal Expansion class. Please note the override of the `persist()` method to guarantee the Expansion isn't unloaded during a `/papi reload` operation.
|
|
||||||
We also use the provided `SomePlugin` instance for information such as the version and authors. This allows us to keep the code clean while not having to deal with updating the expansion's information every time we make changes to the plugin.
|
|
||||||
|
|
||||||
```java
|
|
||||||
package at.helpch.placeholderapi.example.expansion;
|
|
||||||
|
|
||||||
import at.helpch.placeholderapi.example.SomePlugin;
|
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
|
|
||||||
public class SomeExpansion extends PlaceholderExpansion {
|
|
||||||
|
|
||||||
private final SomePlugin plugin;
|
|
||||||
|
|
||||||
public SomeExpansion(SomePlugin plugin) {
|
|
||||||
this.plugin = plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAuthor() {
|
|
||||||
return String.join(", ", plugin.getDescription().getAuthors());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIdentifier() {
|
|
||||||
return "example";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getVersion() {
|
|
||||||
return plugin.getDescription().getVersion();
|
|
||||||
}
|
|
||||||
|
|
||||||
// This override is required or PlaceholderAPI will unregister your expansion on /papi reload
|
|
||||||
@Override
|
|
||||||
public boolean persist() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onRequest(OfflinePlayer player, String params) {
|
|
||||||
if (params.equalsIgnoreCase("placeholder1")) {
|
|
||||||
return plugin.getConfig().getString("placeholders.placeholder1", "default1");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.equalsIgnoreCase("placeholder2")) {
|
|
||||||
return plugin.getConfig().getString("placeholders.placeholder2", "default2");
|
|
||||||
}
|
|
||||||
|
|
||||||
return null; // Unknown Placeholder provided
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Register Your Expansion
|
|
||||||
|
|
||||||
The main downside of an internal expansion is, that it can't be loaded automatically by PlaceholderAPI and instead requires you to manually register it.
|
|
||||||
To do that, create a new instance of your Expansion class and call the `register()` method of it.
|
|
||||||
|
|
||||||
Below is an example of loading the Expansion in the Plugin's main class inside the `onEnable()` method.
|
|
||||||
|
|
||||||
```java
|
|
||||||
package at.helpch.placeholderapi.example;
|
|
||||||
|
|
||||||
import at.helpch.placeholderapi.example.expansion.SomeExpansion;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
public class SomePlugin extends JavaPlugin {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEnable() {
|
|
||||||
// Make sure PlaceholderAPI is installed and enabled
|
|
||||||
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
|
||||||
// Register the expansion
|
|
||||||
new SomeExpansion(this).register();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## Making an External Expansion
|
|
||||||
|
|
||||||
External expansions are separate Jar files containing the PlaceholderExpansion extending class.
|
|
||||||
They are recommended for the following scenarios:
|
|
||||||
|
|
||||||
- Your Expansion doesn't depend on any Plugin.
|
|
||||||
- Your Expansion depends on a Plugin AND you can't directly implement the Class into it.
|
|
||||||
|
|
||||||
If you'd like to implement PlaceholderAPI expansions for your own plugin consider using the [internal expansion setup](#making-an-internal-expansion) instead.
|
|
||||||
|
|
||||||
Benefits of this type of expansion are 1) automatic loading through PlaceholderAPI by adding them to your `expansions` folder and 2) having the option to upload them on the eCloud, allowing it to be downloaded through [[`/papi ecloud download <expansion>`|Commands#papi-ecloud-download]] automatically (After it has been verified).
|
|
||||||
|
|
||||||
Downsides can be a more tedious setup to make sure any required plugin/dependency is loaded before registering the Expansion.
|
|
||||||
|
|
||||||
<details><summary><h3 title="Click to Open/Close">Full Example (Without Dependency)</h3></summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
> Please read the [`Common Parts` Section](#common-parts) for details on all the methods.
|
|
||||||
|
|
||||||
Below is a full example of an external PlaceholderExpansion without any dependencies such as plugins.
|
|
||||||
|
|
||||||
```java
|
|
||||||
package at.helpch.placeholderapi.example.expansion;
|
|
||||||
|
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
|
|
||||||
public class SomeExpansion extends PlaceholderExpansion {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAuthor() {
|
|
||||||
return "SomeAuthor";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIdentifier() {
|
|
||||||
return "example";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getVersion() {
|
|
||||||
return "1.0.0";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onRequest(OfflinePlayer player, String params) {
|
|
||||||
if (params.equalsIgnoreCase("player_name")) {
|
|
||||||
// player_name requires a valid OfflinePlayer
|
|
||||||
return player == null ? null : player.getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.equalsIgnoreCase("placeholder1")) {
|
|
||||||
return "Placeholder Text 1";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.equalsIgnoreCase("placeholder2")) {
|
|
||||||
return "Placeholder Text 2";
|
|
||||||
}
|
|
||||||
|
|
||||||
return null; // Unknown Placeholder provided
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary><h3 title="Click to Open/Close">Full Example (With Dependency)</h3></summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
> Please read the [`Common Parts` Section](#common-parts) for details on all the methods.
|
|
||||||
|
|
||||||
The below example shows a possible setup of an external PlaceholderExpansion that depends on a Plugin to be present.
|
|
||||||
|
|
||||||
```java
|
|
||||||
package at.helpch.placeholderapi.example.expansion;
|
|
||||||
|
|
||||||
import at.helpch.placeholderapi.example.SomePlugin;
|
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
|
|
||||||
public class SomeExpansion extends PlaceholderExpansion {
|
|
||||||
|
|
||||||
// This instance is assigned in canRegister() and can therefore not be final
|
|
||||||
private SomePlugin plugin;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAuthor() {
|
|
||||||
return "SomeAuthor";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIdentifier() {
|
|
||||||
return "example";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getVersion() {
|
|
||||||
return "1.0.0";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allows us to define a plugin the expansion depends on
|
|
||||||
@Override
|
|
||||||
public String getRequiredPlugin() {
|
|
||||||
return "SomePlugin";
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This method needs to be overriden if your Expansion requires
|
|
||||||
* a plugin or other dependency to be present to work.
|
|
||||||
*
|
|
||||||
* Returning false will cancel the Expansion registration.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean canRegister() {
|
|
||||||
/*
|
|
||||||
* We do 2 things here:
|
|
||||||
* 1. Check if the required plugin is present and enabled
|
|
||||||
* 2. Obtain an instance of the plugin to use
|
|
||||||
*/
|
|
||||||
return (plugin = (SomePlugin) Bukkit.getPluginManager().getPlugin(getRequiredPlugin())) != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onRequest(OfflinePlayer player, String params) {
|
|
||||||
if (params.equalsIgnoreCase("placeholder1")) {
|
|
||||||
return plugin.getConfig().getString("placeholders.placeholder1", "default1");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.equalsIgnoreCase("placeholder2")) {
|
|
||||||
return plugin.getConfig().getString("placeholders.placeholder2", "default2");
|
|
||||||
}
|
|
||||||
|
|
||||||
return null; // Unknown Placeholder provided
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## Relational Placeholders
|
|
||||||
|
|
||||||
Relational Placeholders are a special kind of placeholder that allow the usage of 2 Players for whatever you like to do. The most common use is to evaluate their relation to each other (i.e. check if Player one is in the same team as Player two) and return an output based on that.
|
|
||||||
|
|
||||||
### Quick Notes
|
|
||||||
|
|
||||||
Relational Placeholders are always prefixed with `rel_`, meaning that a relational placeholder with identifier `example` and value `friend` looks like `%rel_example_friend%` when used.
|
|
||||||
|
|
||||||
### Adding Relational Placeholders
|
|
||||||
|
|
||||||
To add relational placeholders will you need to implement the [`Relational`][relational] interface into your Expansion class and override the `onPlaceholderRequest(Player, Player, String)` method.
|
|
||||||
|
|
||||||
<details><summary><h3 title="Click to Open/Close">Full Example</h3></summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
> Please read the [`Common Parts` Section](#common-parts) for details on all the methods.
|
|
||||||
|
|
||||||
Below is a full example of using Relational Placeholders.
|
|
||||||
For the sake of simplicity are we using parts of the [Internal Expansion Example](#making-an-internal-expansion) here and assume that the `SomePlugin` class offers a `areFriends(Player, Player)` method that returns a boolean value.
|
|
||||||
|
|
||||||
```java
|
|
||||||
package at.helpch.placeholderapi.example.expansions;
|
|
||||||
|
|
||||||
import at.helpch.placeholderapi.example.SomePlugin;
|
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
|
||||||
import me.clip.placeholderapi.expansion.Relational;
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Player;
|
|
||||||
|
|
||||||
public class SomeExpansion extends PlaceholderExpansion implements Relational {
|
|
||||||
|
|
||||||
private final SomePlugin plugin;
|
|
||||||
|
|
||||||
public SomeExpansion(SomePlugin plugin) {
|
|
||||||
this.plugin = plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAuthor() {
|
|
||||||
return String.join(", ", plugin.getDescription().getAuthors());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIdentifier() {
|
|
||||||
return "example";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getVersion() {
|
|
||||||
return plugin.getDescription().getVersion();
|
|
||||||
}
|
|
||||||
|
|
||||||
// This override is required or PlaceholderAPI will unregister your expansion on /papi reload
|
|
||||||
@Override
|
|
||||||
public boolean persist() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onPlaceholderRequest(Player one, Player two, String identifier) {
|
|
||||||
if(one == null || two == null)
|
|
||||||
return null; // We require both Players to be online
|
|
||||||
|
|
||||||
if(params.equalsIgnoreCase("friend")) {
|
|
||||||
if(plugin.areFriends(one, two)) {
|
|
||||||
return ChatColor.GREEN + one.getName() + " and " + two.getName() + " are friends!";
|
|
||||||
} else {
|
|
||||||
return ChatColor.GREEN + one.getName() + " and " + two.getName() + " are not friends!";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null; // Placeholder is unknown by the Expansion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</details>
|
|
6425
Placeholders.md
346
README.md
@@ -1,190 +1,232 @@
|
|||||||
[wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki
|
# PlaceholderAPI Wiki
|
||||||
|
|
||||||
[placeholders]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders
|
Welcome on the Wiki branch!
|
||||||
[using_papi]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Plugins-using-PlaceholderAPI
|
|
||||||
|
|
||||||
[discord]: https://discord.gg/HelpChat
|
This branch is home of the [PlaceholderAPI Wiki's][wiki] source.
|
||||||
[discussion]: https://github.com/PlaceholderAPI/PlaceholderAPI/discussions
|
It allows us to properly manage the wiki and it allows you to contribute changes to it.
|
||||||
|
|
||||||
[expansion-generator]: https://www.andre601.ch/Expansion-Wiki-Generator/
|
## Contributing to the Wiki
|
||||||
|
|
||||||
[andre]: https://github.com/Andre601
|
Contributions to the wiki are always welcome, granted they follow specific rules and guidelines to ensure a consistent styling across all pages.
|
||||||
[andrew]: https://github.com/Andrew-Chen-Wang
|
Please read this readme file carefully, as it contains important information on how you contribute to the wiki and what to look out for.
|
||||||
[action]: https://github.com/Andrew-Chen-Wang/github-wiki-action
|
|
||||||
|
|
||||||
<!-- Images -->
|
### Prerequisites
|
||||||
|
|
||||||
# Wiki
|
This readme file will cover the basics of using Git, GitHub and MkDocs, but it is highly recommended to learn about these tools yourself before contributing, to avoid possible issues.
|
||||||
Welcome to the Wiki folder!
|
If you have questions about any of those, do not hesitate to ask. We will try to assist you as good as we can.
|
||||||
|
|
||||||
This folder contains all the files of the [PlaceholderAPI Wiki][wiki].
|
Before you now start working on the wiki should make sure that the following has been done already:
|
||||||
It allows you to contribute towards the wiki and us to have more control about what changes are commited to it.
|
|
||||||
|
|
||||||
## Contrbuting to the wiki
|
- You installed and configured Git.
|
||||||
If you want to contribute towards the wiki, will you need to follow the below instructions to not get your Pull request closed without a warning.
|
- You installed and configured Python. At least 3.10 is required for MkDocs to work.
|
||||||
|
- You installed MkDocs and all required dependencies. You can just install `mkdocs-material` through pip and all necessary dependencies will be included.
|
||||||
|
|
||||||
### Fork the Repository (Not wiki!)
|
Should the above be completed can we start with the process of contributing to this wiki.
|
||||||
> Already having a fork? Skip to the [next Step](#select-target-branch)!
|
|
||||||
|
|
||||||
You need to make a fork of the PlaceholderAPI Repository to contribute towards the wiki.
|
### 1. Fork the Repository
|
||||||
To fork the repository, click the button on the top-right that says "Fork". In the new page, select the account/organisation you want to fork this repository towards and make sure to have "Copy the `master` branch only" unchecked, so that the `wiki` branch is copied too.
|
|
||||||
After this, click "Create fork".
|
|
||||||
|
|
||||||

|
> **Already have a fork?** Skip to the [next step!](#2-switch-target-branch)
|
||||||
|
|
||||||
The forking process should only take a few seconds and you should be redirected to your fork afterwards.
|
You need to make a fork of the PlaceholderAPI Repository in order to make your changes to it.
|
||||||
|
To create a fork, click the button on the top right that says "Fork". This will open a new page where you can set specific options such as the name of the fork (Defaults to the name of this repository), the account/organization this repo should be forked to and whether only the master branch should be included.
|
||||||
|
|
||||||
### Select target branch
|
It is crucial to set ``Copy the `master` branch only`` to **not** be checked, or else the wiki branch won't be included in your fork.
|
||||||
All main changes to the wiki are made on the dedicated `wiki` branch.
|
|
||||||
Before you try to make any changes should you make sure that you have the `wiki` branch selected. To do that, check the button next to the `X branches` text. If it says anything other than `wiki` will you need to click it and select the right branch.
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Fetch Changes from Upstream
|
Once you confirm the fork will a copy of the repository be created under the user/organization you chose. This process should only take a few seconds and you will be automatically redirected to your fork after it completed.
|
||||||
This is only required when you already had a fork and didn't update it for some time.
|
You can now move on to the next step.
|
||||||
|
|
||||||
|
### 2. Switch target branch
|
||||||
|
|
||||||
|
By default will you be on the default branch of the repository (`master`). To now get to the wiki branch, click the button that says `master` (Located to the left of the text reading `n Branches`).
|
||||||
|
A dropdown should open with all the branches you included during the forking. Select the `wiki` branch in the list to switch to it.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 3. Fetch Changes from Upstream
|
||||||
|
|
||||||
|
> This step is only required for old forks that haven't been updated in a while.
|
||||||
|
|
||||||
While you're on the `wiki` branch, click the `Sync Fork` text located right below the green `Code` button.
|
While you're on the `wiki` branch, click the `Sync Fork` text located right below the green `Code` button.
|
||||||
Depending on the status of your branch can the prompt show different outcomes:
|
Doing so will show you a box with one of two possible messages:
|
||||||
|
|
||||||
- `This branch is not behind the upstream PlaceholderAPI:wiki`
|
- ``This branch is not behind the upstream `PlaceholderAPI/PlaceholderAPI:wiki`.``
|
||||||
Your fork's `wiki` branch is up-to-date with the latest changes from Upstream (This Repository). You don't have to update anything.
|
This text indicates that your fork is up-to-date with the original repository's wiki branch and does not need any updating.
|
||||||

|

|
||||||
- `This branch is out-of-date`
|
- `This branch is out-of-date`
|
||||||
Your fork's `wiki` branch is outdated and should be updated. Press the "Update branch" button to do so.
|
This text indicates that your fork is outdated and should be updated with the latest changes from the original repository. There should be a button labeled `Update branch` that you can press to update your fork's `wiki` branch.
|
||||||

|

|
||||||
|
|
||||||
### Commit changes
|
### 4. Clone to a local Repository
|
||||||
To commit changes will you need to choose, if you want to directly commit to your fork's `wiki` branch, or make a dedicated branch for it.
|
|
||||||
|
|
||||||
#### Make separate branch (Optional)
|
It is recommended to clone your fork to your PC to utilize tools such as MkDocs' live-preview to see the changes made.
|
||||||
If you want to have a dedicated branch for it, will you need to click the button saying `wiki`, type in the small text field the name of the branch you want to use and click the text saying `Create branch: <branch> from 'wiki'`
|
To clone your fork to your PC, first choose where it should be cloned towards. Cloning the repository will create a new folder with the repository's content in it, so if you choose to clone into a folder named `GitHub` will this result in `GitHub/PlaceholderAPI` being created.
|
||||||
|
|
||||||

|
Copy the below command and execute it in your git-bash console (Replace `<user>` with the user/organization name of your fork):
|
||||||
|
```sh
|
||||||
|
$ git clone -b wiki https://github.com/<user>/PlaceholderAPI
|
||||||
|
```
|
||||||
|
This will clone the repository onto your PC with the `wiki` branch being selected by default.
|
||||||
|
|
||||||
After that should you now have a separate branch that is based of the `wiki` branch and you can finally commit changes to it.
|
You should now navigate into your cloned repository in the git-bash console using `cd PlaceholderAPI`.
|
||||||
|
|
||||||
#### Formatting
|
### 5. Create a new branch (Recommended)
|
||||||
The wiki uses normal Markdown formatting with some special design-rules you need to keep in mind.
|
|
||||||
These rules are as follows:
|
|
||||||
|
|
||||||
- Unordered lists need to start with a `-` and not `*`. This is to not get it confused with *italic text* which uses single `*` characters.
|
This step is optional, but recommended to keep the main wiki branch clean from any changes, which avoids possible merge conflicts in the future.
|
||||||
- New lines in lists need to keep their indends. This means you need to add two spaces at the start to keep the text in the same line.
|
|
||||||
Example:
|
|
||||||
```markdown
|
|
||||||
- Line 1
|
|
||||||
Line 2
|
|
||||||
```
|
|
||||||
- Use the `[[Page]]` and `[[Text|Page]]` format to link to other wiki pages. While those aren't rendered in the wiki folder will they render in the final wiki pages.
|
|
||||||
- External links should be set as Refernce Links, which means they are set as `[text]: link` at the top of the page and then used either through `[text]` or `[display text][text]` througout the page.
|
|
||||||
|
|
||||||
#### Adding new Expansion
|
To create a new branch, execute the command below (Replace `<branch>` with the branch name you want to use):
|
||||||
When you add a new expansion to the wiki's [Placeholder page][placeholders] will you need to follow the following format:
|
```sh
|
||||||
````markdown
|
$ git checkout -b <branch>
|
||||||
- ### [:name](:link)
|
|
||||||
> :command
|
|
||||||
|
|
||||||
:text
|
|
||||||
|
|
||||||
```
|
|
||||||
:placeholders
|
|
||||||
```
|
|
||||||
````
|
|
||||||
|
|
||||||
There are a few extra rules you need to also keep in mind:
|
|
||||||
|
|
||||||
- `:name` would be the name of your Expansion, not the plugin (Unless it is integrated into your plugin).
|
|
||||||
- Only embed a link, if your Expansion requires a plugin to function.
|
|
||||||
- When linking to a Spigot page, make sure to sanitze the link.
|
|
||||||
This means that f.e. https://www.spigotmc.org/resources/placeholderapi.6245/ becomes https://www.spigotmc.org/resources/6245/
|
|
||||||
- `:command` should be replaced with either the PlaceholderAPI command to download your expansion from the eCloud (`/papi ecloud download :name`) or with `NO DOWNLOAD COMMAND` if no separate download is available.
|
|
||||||
- `:text` is optional and should only be provided to link to additional documentation, your own placeholder list, or explain more complicated placeholders/features.
|
|
||||||
- `:placeholders` will be the list of placeholders your expansion provides.
|
|
||||||
Please avoid specific examples (i.e. `%placeholder_player_user123%`) and instead use `<>` and `[]` to mark required and optional options respecively (`%placeholder_player_<player>%`)
|
|
||||||
|
|
||||||
**Note:**
|
|
||||||
When your Expansion's entry is after and/or before other entries will you need to add `----` before or after it to separate it from other entries.
|
|
||||||
|
|
||||||
##### Example:
|
|
||||||
````markdown
|
|
||||||
- ### SomeExpansion
|
|
||||||
> NO DOWNLOAD COMMAND
|
|
||||||
|
|
||||||
```
|
|
||||||
%someexpansion_placeholder%
|
|
||||||
```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
- ### YourExpansion
|
|
||||||
> NO DOWNLOAD COMMAND
|
|
||||||
|
|
||||||
```
|
|
||||||
%yourexpansion_placeholder%
|
|
||||||
```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
- ### AnotherExpansion
|
|
||||||
> NO DOWNLOAD COMMAND
|
|
||||||
|
|
||||||
```
|
|
||||||
%anotherexpansion_placeholder%
|
|
||||||
```
|
|
||||||
````
|
|
||||||
|
|
||||||
After you added your expansion to this page will you also need to add an entry to the list at the top of the page.
|
|
||||||
You do so by adding `- **[:text](#:name)**` to the list, where `:text` is the text to display (Usually the name you set) and `:name` is the name you just set. If your expansion shares the exact same name as another entry on the page will you need to make sure that your expansion is listed **after** the other one AND that the list-entry has a `-1` appended to `#:name` (So f.e. `#expansion` becomes `#expansion-1`).
|
|
||||||
|
|
||||||
Finally can you now commit your changes and move forward to the [Plugins using PlaceholderAPI][using_papi] page in the wiki folder.
|
|
||||||
|
|
||||||
#### Adding new plugin
|
|
||||||
This step is only required if you either add a new plugin to the list, or you added an Expansion that is included in your own plugin.
|
|
||||||
|
|
||||||
Similar to the [Placeholders page][placeholders] does this page follow a specific format which we will explain real quick.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
- [:name](:link)
|
|
||||||
- [?] Supports placeholders.
|
|
||||||
- [?] Provides own placeholders. [:page]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Here are the following rules:
|
> [!TIP]
|
||||||
|
> In case you already created a branch on GitHub before cloning the repository can you use `git switch <branch>` to switch to this branch.
|
||||||
|
|
||||||
- `:name` needs to be replaced with the Name of your plugin.
|
### 6. Make your changes
|
||||||
- `:link` needs to be the link of the plugin's resource page.
|
|
||||||
- If no resource page is available can a GitHub repository be linked (if available) or the link omited altogether)
|
|
||||||
- When linking to a Spigot page, make sure to sanitze the link.
|
|
||||||
This means that f.e. https://www.spigotmc.org/resources/placeholderapi.6245/ becomes https://www.spigotmc.org/resources/6245/
|
|
||||||
- `[?]` needs to be replaced with either `[ ]` or `[x]` depending on whether the mentioned option is supported or not.
|
|
||||||
- `:page` needs to replace with the right value, depending on the conditions.
|
|
||||||
- If your plugin provides own Placeholders for other plugins to use can you set `**[[Link|Placeholders#:name]]**` where `:name` is the title you set in the placeholders page.
|
|
||||||
- If your plugin does not provide own placeholders will you need to set `Link`.
|
|
||||||
|
|
||||||
### Make a Pull request
|
It is now time to make your changes. It is recommended to use MkDocs and its live-preview feature to see your changes applied in real time whenever you save a file.
|
||||||
After you made your changes is it time to make a Pull request.
|
|
||||||
|
|
||||||
When you made changes to the branch should GitHub show you a prompt with a button saying "Compare & pull request". This prompt also shows up when you visit the upstream Repository while having changes on your fork.
|
To use the live-preview, run `mkdocs serve` in the same folder where the `mkdocs.yml` file is located. This should start a server on `http://127.0.0.1:8000` that you can open in your browser. You can also append the `--open` argument to the command to make MkDocs open the preview directly, avoiding the need of having to open it yourself.
|
||||||
Press the button to proceed.
|
Should the command not work, check that you actually installed MkDocs and any required dependencies. The easiest way is to just execute `pip install mkdocs-material` to download the Material for MkDocs theme alongside additional dependencies, including MkDocs.
|
||||||
|
|
||||||

|
To cancel the live preview, simply press <kbd>Ctrl</kbd>+<kbd>C</kbd> in the git-bash terminal to shut the live preview server down.
|
||||||
|
|
||||||
By default will GitHub select the `master` branch as the target, which is not what we want. To fix this, click the button saying `base:master` and select the `wiki` branch.
|
#### Markdown Formatting Rules
|
||||||
|
|
||||||
> **Note**
|
> [!IMPORTANT]
|
||||||
> When the branch selection only shows branches and not the actual repositories does it mean that you're prompted to PR to your own fork.
|
> Please also see the [Wiki Structure](#wiki-structure) section for more details on the formatting!
|
||||||
> To fix this, press the "compare across forks" text shown, select `PlaceholderAPI/PlaceholderAPI` as the target repository (left side) and your fork as the source. Then select the wiki branch as mentioned above.
|
|
||||||
|
|
||||||

|
MkDocs utilizes Python-Markdown, a Python library used for parsing Markdown into HTML. This library follows very specific rules in regards to Makrkdown formattings that you need to keep in mind while editing files.
|
||||||
|
|
||||||
Finally, fill out the Pull request template and submit the Pull request.
|
Here are some noteworthy points:
|
||||||
Congratulations! You've successfully made a Pull request for the wiki.
|
|
||||||
|
|
||||||
### Questions?
|
- Lists require an empty line before themself to be rendered as such. This means that a list cannot start directly after some text, but needs a gap before itself.
|
||||||
If you have any questions, do not hesitate to ask in the [HelpChat Discord][discord] or [open a new discussion][discussion] in this repository. We will be happy to help you.
|
- New lines in lists (No matter if ordered or unordered) need to have an indent of 4 spaces.
|
||||||
|
- This indent also applies to nested list entries.
|
||||||
|
- In certain situations will you also need to keep an empty line between the list entry and the new line.
|
||||||
|
- Links to other files should be relative and also include the file name itself. They will be parsed into proper `a` tags pointing to the page when rendered.
|
||||||
|
|
||||||
### Tools
|
In addition are extensions used to further enhance the default markdown formatting with additional features. Such features include:
|
||||||
A simple [online-tool][expansion-generator] is provided by Andre601 that allows you to create new entries for expansions in the wiki.
|
|
||||||
|
|
||||||
### Credits
|
- Admonition blocks (Also known as callouts. [[Documentation][admo-docs]])
|
||||||
- The Wiki is maintained by [Andre601][andre].
|
- Details (`<details>` HTML tag. [[Documentation][details-docs]])
|
||||||
- We use the [GitHub Wiki Action][action] by [Andrew-Chen-Wang][andrew] to update the PlaceholderAPI wiki through GitHub Actions.
|
- Tabs (Way of displaying different content you can toggle between. [[Documentation][tabs-docs]])
|
||||||
|
- Automatic linking of issues, PRs, discussions using `!<id>`, `#<id>` and `?<id>` respectively (Uses [MagicLink extension][ml-docs])
|
||||||
|
|
||||||
|
### 7. Commit and push your changes
|
||||||
|
|
||||||
|
Once you're happy with your changes is it time to commit them back to your fork on GitHub to then PR to the upstream repository.
|
||||||
|
|
||||||
|
To commit your changes, you may first need to add the files to commit. To do this, run `git add <file-path>` where `<file-path>` is the path to the modified file relative to the repository's root.
|
||||||
|
As an example, changing `placeholder-list.md` would require you to execute `git add docs/users/placeholder-list.md`.
|
||||||
|
|
||||||
|
If you're sure that only files that should be commited got changed can you use `git add .` to add all changed files.
|
||||||
|
|
||||||
|
Once this step is done can you execute `git commit`. Doing so will open a text editor where you can write the commit message in. Try to keep it short and simple. You can also append the `-m` argument followed by text inside double quotes to the command to directly set the commit message without having to use a text editor.
|
||||||
|
|
||||||
|
Once your changes got committed will you need to execute `git push`. In case you created a new branch in your local repository will you need to add `--set-upstream origin <branch>` with `<branch>` being the name of the branch you want to use on your fork on GitHub.
|
||||||
|
|
||||||
|
Your changes should now be on your GitHub Fork.
|
||||||
|
|
||||||
|
### 8. Create a Pull request
|
||||||
|
|
||||||
|
Your final step now is to make a Pull request to the original repository. GitHub should already give you a prompt regarding recent changes on your branch.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Clicking the "Compare & pull request" button will open a diff view page showing a comparison between your changes and the branch of the upstream. You can double check that it targets the upstream by checking that there is a `base repository` option pointing to `PlaceholderAPI/PlaceholderAPI`. Should there only be a `base` option does it mean that you target branches on your own repository. To fix this, click the text that says "compare across forks" to toggle. You can then select `PlaceholderAPI/PlaceholderAPI` as the `base repository` and `head repository` to your fork.
|
||||||
|
|
||||||
|
By default does GitHub select the `master` branch as the default. Change it to `wiki` while also changing the branch of your fork to whatever you made your changes on (Should be selected by default).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Should there be changes that can be merged will the "Create pull request" button light up, allowing you to make a pull request.
|
||||||
|
Press the button, fill out the title and body of the pull request and create it.
|
||||||
|
|
||||||
|
Congratulations! You made a Pull request for the wiki!
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
## Wiki Structure
|
||||||
|
|
||||||
|
The wiki has specific rules in regards to its own structure. This is to keep a level of consistency across all pages when viewed at in their raw (unparsed) form.
|
||||||
|
|
||||||
|
### General Rules
|
||||||
|
|
||||||
|
The following rules apply to all pages:
|
||||||
|
|
||||||
|
1. Unordered lists always use `-` and not `*` to avoid confusion with `*italic text*`
|
||||||
|
2. Links to other pages always need to be relative, meaning they should not start with `/`.
|
||||||
|
3. An empty line between a header (Any level) and text should be set.
|
||||||
|
|
||||||
|
### Placeholder List Rules
|
||||||
|
|
||||||
|
The following rules apply specifically to entries in the [Placeholder List][placeholder-list] page:
|
||||||
|
|
||||||
|
1. Entries need to be in alphabetical order.
|
||||||
|
- Should an entry with the name already exist will you need to add yours after it.
|
||||||
|
2. An entry follows this specific format:
|
||||||
|
````markdown
|
||||||
|
### [<name>](<link>)
|
||||||
|
/// <command>
|
||||||
|
///
|
||||||
|
|
||||||
|
<text>
|
||||||
|
|
||||||
|
```
|
||||||
|
<placeholders>
|
||||||
|
```
|
||||||
|
````
|
||||||
|
- `<name>` is the name of the Placeholder expansion you add.
|
||||||
|
- `<link>` is a link to the plugin this expansion is made for. If the expansion is not for a plugin should no link be added (Only `- ### <name>` be used).
|
||||||
|
- Links to spigot pages need to be sanitized, meaning a link such as `https://www.spigotmc.org/resources/placeholderapi.6245/` becomes `https://www.spigotmc.org/resources/6245/`
|
||||||
|
- `<command>` needs to be replaced with one of the following values, depending on how the expansion can be added:
|
||||||
|
- Should your expansion be built-in into a Plugin, add `integrated | Built into Plugin`
|
||||||
|
- Should your expansion be obtainable via the [`/papi ecloud download`][download-command] command, add `command | papi ecloud download <name of expansion>`
|
||||||
|
- Should your expansion only be downloadable via external sources (i.e. a GitHub Release), add `download | <link to download>`
|
||||||
|
- `<text>` is an optional text that can be used to point to extra documentation. Please keep it short and simple.
|
||||||
|
- `<placeholders>` would be all available placeholders. Each entry should be on a new line.
|
||||||
|
- Please avoid explicit examples and instead use `<>` and `[]` to indicate required or optional values (i.e. instead of `%expansion_SomePlayer%` it would be `%expansion_<player>%`)
|
||||||
|
3. Make sure to also add an entry to the list at the top of the page, linking to your entry.
|
||||||
|
4. Should your entry have entries before and/or after it will you need to add horizontal lines (`----`) to separate yours from these entries. Keep an empty line between the horizontal line and any entry.
|
||||||
|
|
||||||
|
> A [online tool][papi-list-gen] exists for your convenience to create the markdown for a new entry.
|
||||||
|
|
||||||
|
### Plugins using PlaceholderAPI Rules
|
||||||
|
|
||||||
|
The following rules apply specifically to entries in the [Plugins using PlaceholderAPI][plugins-using-placeholderapi] page:
|
||||||
|
|
||||||
|
1. Entries need to be in alphabetical order.
|
||||||
|
- Should an entry with the name already exist will you need to add yours after it.
|
||||||
|
2. An entry follows this specific format:
|
||||||
|
````markdown
|
||||||
|
- [<name>](<link>)
|
||||||
|
- [?] Supports placeholders.
|
||||||
|
- [?] Provides own placeholders. [<link>]
|
||||||
|
````
|
||||||
|
- `<name>` is the name of the Plugin you add.
|
||||||
|
- `<link>` is a link to the Plugin page. Should no plugin page exist can a GitHub repo or no link (Just `- <name>`) be used instead.
|
||||||
|
- Links to spigot pages need to be sanitized, meaning a link such as `https://www.spigotmc.org/resources/placeholderapi.6245/` becomes `https://www.spigotmc.org/resources/6245/`
|
||||||
|
- `[?]` needs to be replaced with either `[x]` or `[ ]` depending on if the statement is true or not.
|
||||||
|
- `Supports placeholders.` means that the Plugin allows the usage of any placeholder through PlaceholderAPI in its messages, settings, etc.
|
||||||
|
- `Provides own placeholders.` means that a Placeholder expansion is available that provides placeholders through PlaceholderAPI for this plugin.
|
||||||
|
- `<link>` should be replaced with one of two possible options, depending on whether there is a placeholder expansion listed in the [Placeholder List][placeholder-list] page.
|
||||||
|
- In case there is one should `[**Link**](placeholder-list.md#<expansion>)`, where `<expansion>` being the name used in the list, be used.
|
||||||
|
- In case there is no entry should `Link` be used.
|
||||||
|
|
||||||
|
> A [online tool][plugin-list-gen] exists for your convenience to create the markdown for a new entry.
|
||||||
|
|
||||||
|
[wiki]: https://wiki.placeholderapi.com
|
||||||
|
|
||||||
|
[admo-docs]: https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/admonition/
|
||||||
|
[details-docs]: https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/details/
|
||||||
|
[tabs-docs]: https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/tab/
|
||||||
|
[ml-docs]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
|
||||||
|
|
||||||
|
[placeholder-list]: https://wiki.placeholderapi.com/users/placeholder-list/
|
||||||
|
[download-command]: https://wiki.placeholderapi.com/users/commands/#papi-ecloud-download
|
||||||
|
[papi-list-gen]: https://papi.andre601.ch/generators/placeholder-list/
|
||||||
|
|
||||||
|
[plugins-using-placeholderapi]: https://wiki.placeholderapi.com/users/plugins-using-placeholderapi/
|
||||||
|
[plugin-list-gen]: https://papi.andre601.ch/generators/plugin-list/
|
||||||
|
23
_Footer.md
@@ -1,23 +0,0 @@
|
|||||||
[papi]: https://placeholderapi.com
|
|
||||||
|
|
||||||
[discordImg]: https://img.shields.io/discord/164280494874165248.svg?logo=discord&label=Discord&colorB=7289DA
|
|
||||||
[discord]: https://helpch.at/discord
|
|
||||||
|
|
||||||
[jenkinsImg]: https://img.shields.io/badge/Download%20from-Jenkins-brightgreen.svg
|
|
||||||
[jenkins]: http://ci.extendedclip.com/job/PlaceholderAPI/
|
|
||||||
|
|
||||||
[licenseImg]: https://img.shields.io/github/license/PlaceholderAPI/PlaceholderAPI.svg
|
|
||||||
[license]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/LICENSE
|
|
||||||
|
|
||||||
[issuesImg]: https://img.shields.io/github/issues-raw/PlaceholderAPI/PlaceholderAPI.svg?logo=github&logoColor=white
|
|
||||||
[issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues
|
|
||||||
|
|
||||||
[versionImg]: https://img.shields.io/nexus/placeholderapi/me.clip/placeholderapi?server=https%3A%2F%2Frepo.extendedclip.com&label=API%20Version
|
|
||||||
[plugin-page]: https://spigotmc.org/resources/6245
|
|
||||||
|
|
||||||
> © 2015 - 2023 [PlaceholderAPI Team][papi]
|
|
||||||
> Thanks for using PlaceholderAPI.
|
|
||||||
>
|
|
||||||
> **[Plugin-page]** | **[[Placeholders]]** | **[[Plugins using PlaceholderAPI]]** | **[[Hook into PlaceholderAPI]]**
|
|
||||||
>
|
|
||||||
> ![versionImg] [![jenkinsImg]][jenkins] [![licenseImg]][license] [![issuesImg]][issues] [![discordImg]][discord]
|
|
79
_Sidebar.md
@@ -1,79 +0,0 @@
|
|||||||
<p align="center">
|
|
||||||
<img src="https://raw.githubusercontent.com/PlaceholderAPI/PlaceholderAPI/wiki/img/icon.png" alt="PlaceholderAPI">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
**[[Main page|Home]]**
|
|
||||||
|
|
||||||
### Setup
|
|
||||||
**[[Using Placeholders]]**
|
|
||||||
**[[Hook into PlaceholderAPI]]**
|
|
||||||
- [[First steps|Hook-into-PlaceholderAPI#first-steps]]
|
|
||||||
- [[Adding placeholders to PlaceholderAPI|PlaceholderExpansion]]
|
|
||||||
- [[Common Parts|PlaceholderExpansion#common-parts]]
|
|
||||||
- [[Without an external plugin|PlaceholderExpansion#without-a-plugin]]
|
|
||||||
- [[With an external Plugin (Separate Jar)|PlaceholderExpansion#with-a-plugin-external-jar]]
|
|
||||||
- [[With an external Plugin (Internal class)|PlaceholderExpansion#with-a-plugin-internal-class]]
|
|
||||||
- [[Relational Placeholders|PlaceholderExpansion#relational-placeholders]]
|
|
||||||
- [[Setting placeholders in your plugin|Hook-into-PlaceholderAPI#setting-placeholders-in-your-plugin]]
|
|
||||||
|
|
||||||
### Other
|
|
||||||
**[[Commands]]**
|
|
||||||
**[[Expansion cloud]]**
|
|
||||||
**[[FAQ]]**
|
|
||||||
**[[Common Issues]]**
|
|
||||||
**[[Plugins using PlaceholderAPI]]**
|
|
||||||
**[[Placeholders]]**
|
|
||||||
- [[Standalone|Placeholders#standalone]]
|
|
||||||
- [[A|Placeholders#a]]
|
|
||||||
- [[B|Placeholders#b]]
|
|
||||||
- [[C|Placeholders#c]]
|
|
||||||
- [[D|Placeholders#d]]
|
|
||||||
- [[E|Placeholders#e]]
|
|
||||||
- [[F|Placeholders#f]]
|
|
||||||
- [[G|Placeholders#g]]
|
|
||||||
- [[H|Placeholders#h]]
|
|
||||||
- [[I|Placeholders#i]]
|
|
||||||
- [[J|Placeholders#j]]
|
|
||||||
- [[K|Placeholders#k]]
|
|
||||||
- [[L|Placeholders#l]]
|
|
||||||
- [[M|Placeholders#m]]
|
|
||||||
- [[N|Placeholders#n]]
|
|
||||||
- [[O|Placeholders#o]]
|
|
||||||
- [[P|Placeholders#p]]
|
|
||||||
- [[Q|Placeholders#q]]
|
|
||||||
- [[R|Placeholders#r]]
|
|
||||||
- [[S|Placeholders#s]]
|
|
||||||
- [[T|Placeholders#t]]
|
|
||||||
- [[U|Placeholders#u]]
|
|
||||||
- [[V|Placeholders#v]]
|
|
||||||
- [[W|Placeholders#w]]
|
|
||||||
- [[X|Placeholders#x]]
|
|
||||||
- [[Y|Placeholders#y]]
|
|
||||||
- [[Z|Placeholders#z]]
|
|
||||||
- [[Plugin-placeholders|Placeholders#plugin-placeholders-1]]
|
|
||||||
- [[A|Placeholders#a-1]]
|
|
||||||
- [[B|Placeholders#b-1]]
|
|
||||||
- [[C|Placeholders#c-1]]
|
|
||||||
- [[D|Placeholders#d-1]]
|
|
||||||
- [[E|Placeholders#e-1]]
|
|
||||||
- [[F|Placeholders#f-1]]
|
|
||||||
- [[G|Placeholders#g-1]]
|
|
||||||
- [[H|Placeholders#h-1]]
|
|
||||||
- [[I|Placeholders#i-1]]
|
|
||||||
- [[J|Placeholders#j-1]]
|
|
||||||
- [[K|Placeholders#k-1]]
|
|
||||||
- [[L|Placeholders#l-1]]
|
|
||||||
- [[M|Placeholders#m-1]]
|
|
||||||
- [[N|Placeholders#n-1]]
|
|
||||||
- [[O|Placeholders#o-1]]
|
|
||||||
- [[P|Placeholders#p-1]]
|
|
||||||
- [[Q|Placeholders#q-1]]
|
|
||||||
- [[R|Placeholders#r-1]]
|
|
||||||
- [[S|Placeholders#s-1]]
|
|
||||||
- [[T|Placeholders#t-1]]
|
|
||||||
- [[U|Placeholders#u-1]]
|
|
||||||
- [[V|Placeholders#v-1]]
|
|
||||||
- [[W|Placeholders#w-1]]
|
|
||||||
- [[X|Placeholders#x-1]]
|
|
||||||
- [[Y|Placeholders#y-1]]
|
|
||||||
- [[Z|Placeholders#z-1]]
|
|
1
docs/CNAME
Normal file
@@ -0,0 +1 @@
|
|||||||
|
wiki.placeholderapi.com
|
BIN
docs/assets/img/favicons/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
docs/assets/img/favicons/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
docs/assets/img/favicons/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
docs/assets/img/favicons/favicon-16x16.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
docs/assets/img/favicons/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/assets/img/favicons/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
33
docs/assets/js/latest-release.js
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
document$.subscribe(async => {
|
||||||
|
const api_code = document.querySelectorAll('[data-md-component="api-version"]');
|
||||||
|
|
||||||
|
function loadAPIInfo(data) {
|
||||||
|
const version = data["version"];
|
||||||
|
const versionToken = "{version}";
|
||||||
|
for (const codeBlock of api_code) {
|
||||||
|
codeBlock.innerHTML = codeBlock.innerHTML.replace(new RegExp(versionToken, 'g'), version);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function fetchAPIInfo() {
|
||||||
|
const release = await fetch("https://repo.extendedclip.com/api/maven/latest/version/releases/me/clip/placeholderapi").then(_ => _.json());
|
||||||
|
|
||||||
|
console.log(release)
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
"version": release.version
|
||||||
|
}
|
||||||
|
|
||||||
|
__md_set("__api_tag", data, sessionStorage);
|
||||||
|
loadAPIInfo(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(location.href.includes("/developers/using-placeholderapi")) {
|
||||||
|
const cachedApi = __md_get("__api_tag", sessionStorage);
|
||||||
|
if ((cachedApi != null) && (cachedApi["version"])) {
|
||||||
|
loadAPIInfo(cachedApi);
|
||||||
|
} else {
|
||||||
|
fetchAPIInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
1
docs/assets/site.webmanifest
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"name":"","short_name":"","icons":[{"src":"./img/favicons/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"./img/favicons/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
61
docs/assets/stylesheets/link-icons.css
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
:root {
|
||||||
|
--magiclink-github-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>');
|
||||||
|
--magiclink-github-pull-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg>');
|
||||||
|
--magiclink-github-issue-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg>');
|
||||||
|
--magiclink-github-discussion-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path></svg>');
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-typeset .magiclink-repository.magiclink-github:not(.magiclink-ignore)::before {
|
||||||
|
-webkit-mask-image: var(--magiclink-github-icon);
|
||||||
|
mask-image: var(--magiclink-github-icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-typeset .magiclink-pull:not(.magiclink-ignore)::before {
|
||||||
|
-webkit-mask-image: var(--magiclink-github-pull-icon);
|
||||||
|
mask-image: var(--magiclink-github-pull-icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-typeset .magiclink-issue:not(.magiclink-ignore)::before {
|
||||||
|
-webkit-mask-image: var(--magiclink-github-issue-icon);
|
||||||
|
mask-image: var(--magiclink-github-issue-icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-typeset .magiclink-discussion:not(.magiclink-ignore)::before {
|
||||||
|
-webkit-mask-image: var(--magiclink-github-discussion-icon);
|
||||||
|
mask-image: var(--magiclink-github-discussion-icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-typeset .magiclink-repository.magiclink-github:not(.magiclink-ignore)::before,
|
||||||
|
.md-typeset .magiclink-pull:not(.magiclink-ignore)::before,
|
||||||
|
.md-typeset .magiclink-issue:not(.magiclink-ignore)::before,
|
||||||
|
.md-typeset .magiclink-discussion:not(.magiclink-ignore)::before {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 1.25em;
|
||||||
|
height: 1.25em;
|
||||||
|
background-size: 1.25em;
|
||||||
|
background-color: var(--md-typeset-a-color);
|
||||||
|
transition: background-color 125ms;
|
||||||
|
-webkit-mask-repeat: no-repeat;
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
-webkit-mask-size: contain;
|
||||||
|
mask-size: contain;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
.md-typeset .magiclink-repository.magiclink-github:not(.magiclink-ignore):hover::before,
|
||||||
|
.md-typeset .magiclink-pull:not(.magiclink-ignore):hover::before,
|
||||||
|
.md-typeset .magiclink-issue:not(.magiclink-ignore):hover::before,
|
||||||
|
.md-typeset .magiclink-discussion:not(.magiclink-ignore):hover::before {
|
||||||
|
background-color: var(--md-accent-fg-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-typeset .magiclink-repository.magiclink-github:not(.magiclink-ignore),
|
||||||
|
.md-typeset .magiclink-pull:not(.magiclink-ignore),
|
||||||
|
.md-typeset .magiclink-issue:not(.magiclink-ignore),
|
||||||
|
.md-typeset .magiclink-discussion:not(.magiclink-ignore) {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 1.375em;
|
||||||
|
}
|
65
docs/assets/stylesheets/styling.css
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
:root {
|
||||||
|
--md-admonition-icon--command: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M13.94 3.045a.75.75 0 0 0-1.38-.59l-4.5 10.5a.75.75 0 1 0 1.38.59l4.5-10.5ZM5 11.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"></path></svg>');
|
||||||
|
--md-admonition-icon--integrated: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M4 8H2.5a1 1 0 0 0-1 1v5.25a.75.75 0 0 1-1.5 0V9a2.5 2.5 0 0 1 2.5-2.5H4V5.133a1.75 1.75 0 0 1 1.533-1.737l2.831-.353.76-.913c.332-.4.825-.63 1.344-.63h.782c.966 0 1.75.784 1.75 1.75V4h2.25a.75.75 0 0 1 0 1.5H13v4h2.25a.75.75 0 0 1 0 1.5H13v.75a1.75 1.75 0 0 1-1.75 1.75h-.782c-.519 0-1.012-.23-1.344-.63l-.761-.912-2.83-.354A1.75 1.75 0 0 1 4 9.867Zm6.276-4.91-.95 1.14a.753.753 0 0 1-.483.265l-3.124.39a.25.25 0 0 0-.219.248v4.734c0 .126.094.233.219.249l3.124.39a.752.752 0 0 1 .483.264l.95 1.14a.25.25 0 0 0 .192.09h.782a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25h-.782a.25.25 0 0 0-.192.09Z"></path></svg>');
|
||||||
|
--md-admonition-icon--download: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M2.75 14A1.75 1.75 0 0 1 1 12.25v-2.5a.75.75 0 0 1 1.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 14Z"></path><path d="M7.25 7.689V2a.75.75 0 0 1 1.5 0v5.689l1.97-1.969a.749.749 0 1 1 1.06 1.06l-3.25 3.25a.749.749 0 0 1-1.06 0L4.22 6.78a.749.749 0 1 1 1.06-1.06l1.97 1.969Z"></path></svg>');
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-header__button.md-logo img {
|
||||||
|
height: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-typeset .grid.cards.hide-list > ul > li > ul > li {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***************************
|
||||||
|
* Custom Admonition boxes *
|
||||||
|
***************************/
|
||||||
|
|
||||||
|
/* Command */
|
||||||
|
.md-typeset .admonition.command,
|
||||||
|
.md-typeset details.command {
|
||||||
|
border-color: #00c853;
|
||||||
|
}
|
||||||
|
.md-typeset .command > .admonition-title,
|
||||||
|
.md-typeset .command > summary {
|
||||||
|
background-color: #00c8531a;
|
||||||
|
}
|
||||||
|
.md-typeset .command > .admonition-title::before,
|
||||||
|
.md-typeset .command > summary::before {
|
||||||
|
background-color: #00c853;
|
||||||
|
-webkit-mask-image: var(--md-admonition-icon--command);
|
||||||
|
mask-image: var(--md-admonition-icon--command);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Integrated (built-in) */
|
||||||
|
.md-typeset .admonition.integrated,
|
||||||
|
.md-typeset details.integrated {
|
||||||
|
border-color: #9e9e9e;
|
||||||
|
}
|
||||||
|
.md-typeset .integrated > .admonition-title,
|
||||||
|
.md-typeset .integrated > summary {
|
||||||
|
background-color: #9e9e9e1a;
|
||||||
|
}
|
||||||
|
.md-typeset .integrated > .admonition-title::before,
|
||||||
|
.md-typeset .integrated > summary::before {
|
||||||
|
background-color: #9e9e9e;
|
||||||
|
-webkit-mask-image: var(--md-admonition-icon--integrated);
|
||||||
|
mask-image: var(--md-admonition-icon--integrated);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Download */
|
||||||
|
.md-typeset .admonition.download,
|
||||||
|
.md-typeset details.download {
|
||||||
|
border-color: #00c853;
|
||||||
|
}
|
||||||
|
.md-typeset .download > .admonition-title,
|
||||||
|
.md-typeset .download > summary {
|
||||||
|
background-color: #00c8531a;
|
||||||
|
}
|
||||||
|
.md-typeset .download > .admonition-title::before,
|
||||||
|
.md-typeset .download > summary::before {
|
||||||
|
background-color: #00c853;
|
||||||
|
-webkit-mask-image: var(--md-admonition-icon--download);
|
||||||
|
mask-image: var(--md-admonition-icon--download);
|
||||||
|
}
|
@@ -1,3 +1,9 @@
|
|||||||
|
---
|
||||||
|
description: List of common issues and how to solve them.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Common Issues
|
||||||
|
|
||||||
This page lists common issues you may encounter with PlaceholderAPI and how you can solve them.
|
This page lists common issues you may encounter with PlaceholderAPI and how you can solve them.
|
||||||
|
|
||||||
If you have more questions, feel free to join the [Discord Server](https://discord.gg/helpchat).
|
If you have more questions, feel free to join the [Discord Server](https://discord.gg/helpchat).
|
484
docs/developers/creating-a-placeholderexpansion.md
Normal file
@@ -0,0 +1,484 @@
|
|||||||
|
---
|
||||||
|
description: Comprehensive guide on how to create a PlaceholderExpansion for other plugins to use through PlaceholderAPI.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Creating a PlaceholderExpansion
|
||||||
|
|
||||||
|
This page will cover how you can create your own [`PlaceholderExpansion`][placeholderexpansion] which you can either integrate into your own plugin (Recommended) or [upload to the eCloud](expansion-cloud.md).
|
||||||
|
|
||||||
|
It's worth noting that PlaceholderAPI relies on expansions being installed. PlaceholderAPI only acts as the core replacing utility while the expansions allow other plugins to use any installed placeholder in their own messages.
|
||||||
|
You can download expansions either directly from the eCloud yourself, or download them through the [download command of PlaceholderAPI](../users/commands.md#papi-ecloud-download).
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
- [Getting started](#getting-started)
|
||||||
|
- [Common Expansion Parts](#common-expansion-parts)
|
||||||
|
- [Making an Internal Expansion](#making-an-internal-expansion)
|
||||||
|
- [Full Example](#full-example-internal)
|
||||||
|
- [Register your Expansion](#register-your-expansion)
|
||||||
|
- [Making an External Expansion](#making-an-external-expansion)
|
||||||
|
- [Full Example (Without Dependency)](#full-example-external-no-dependency)
|
||||||
|
- [Full Example (With Dependency)](#full-example-external-dependency)
|
||||||
|
- [Making a relational Expansion](#making-a-relational-expansion)
|
||||||
|
- [Full Example](#full-example-relational)
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
For starters, you need to decide what type of [`PlaceholderExpansion`][placeholderexpansion] you want to create. There are various ways to create an expansion. This page will cover the most common ones.
|
||||||
|
|
||||||
|
### Common Expansion Parts
|
||||||
|
|
||||||
|
All shown examples will share the same common parts that belong the the [`PlaceholderExpansion`][placeholderexpansion] class.
|
||||||
|
In order to not repeat the same basic info for each method throughout this page, and to greatly reduce the overall length, we will cover the most basic/necessary ones here.
|
||||||
|
|
||||||
|
#### Basic PlaceholderExpansion Structure
|
||||||
|
|
||||||
|
/// note |
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
///
|
||||||
|
|
||||||
|
```{ .java .annotate title="SomeExpansion.java" }
|
||||||
|
package at.helpch.placeholderapi.example.expansion;
|
||||||
|
|
||||||
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
|
|
||||||
|
public class SomeExpansion extends PlaceholderExpansion {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getAuthor() {
|
||||||
|
return "Author"; // (1)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getIdentifier() {
|
||||||
|
return "example"; // (2)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getVersion() {
|
||||||
|
return "1.0.0"; // (3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
1. This method allows you to set the name of the expansion's author.
|
||||||
|
|
||||||
|
2. The identifier is the part in the placeholder that is between the first `%` (or `{` if bracket placeholders are used) and the first `_`.
|
||||||
|
The identifier may not contain `%`, `{`, `}` or `_`.
|
||||||
|
|
||||||
|
If you still want to use them in your expansion name, override the `getName()` method.
|
||||||
|
|
||||||
|
3. This method returns the version of the expansion.
|
||||||
|
Due to it being a string are you not limited to numbers alone, but it is recommended to stick with a number pattern.
|
||||||
|
|
||||||
|
PlaceholderAPI uses this String to compare with the latest version on the eCloud (if uploaded to it) to see if a new version is available.
|
||||||
|
If your expansion is included in a plugin, this does not matter.
|
||||||
|
|
||||||
|
You must also choose between one of these two methods for handling the actual parsing of placeholders (Exception being expansions providing [relational placeholders](#making-a-relational-expansion)):
|
||||||
|
|
||||||
|
- `onRequest(OfflinePlayer, String)`
|
||||||
|
The first parameter is the player that the placeholders are parsed against, given as an OfflinePlayer instance. This can be null.
|
||||||
|
The second parameter is the content of the placeholder after the first `_` and before the closing `%` (or `}` if bracket placeholders are used). This String is never null.
|
||||||
|
|
||||||
|
If not explicity overriden, this will automatically call `onPlaceholderRequest(Player, String)`, passing the parameters as-is to it.
|
||||||
|
This method is recommended as it allows the usage of offline players, meaning the player does not need to be online to obtain certain certain data from them such as name or UUID.
|
||||||
|
|
||||||
|
- `onPlaceholderRequest(Player, String)`
|
||||||
|
The first parameter is the player that the placeholders are parsed against, given as a Player instance. This can be null.
|
||||||
|
The second parameter is the content of the placeholder after the first `_` and before the closing `%` (or `}` if bracket placeholders are used). This String is never null.
|
||||||
|
|
||||||
|
If not set, this method will return `null` which PlaceholderAPI sees as an invalid placeholder.
|
||||||
|
|
||||||
|
/// note
|
||||||
|
PlaceholderAPI always calls `onRequest(Player, String)` in a PlaceholderExpansion.
|
||||||
|
///
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
## Making an Internal Expansion
|
||||||
|
|
||||||
|
Internal PlaceholderExpansions are classes directly integrated in the plugin they depend on.
|
||||||
|
This method of creating a PlaceholderExpansion is recommended as it has the following benefits:
|
||||||
|
|
||||||
|
- No `canRegister()` method override required. Since your expansion is part of the plugin it depends on is this override not required.
|
||||||
|
- Easier access to plugin data. Using dependency injection, you can more easily access data of your plugin such as config values.
|
||||||
|
|
||||||
|
/// warning | Important!
|
||||||
|
Internal PlaceholderExpansions are not automatically registered by PlaceholderAPI, due to them not being a separate jar file located in the expansion folder.
|
||||||
|
Please see the [Regsister your Expansion](#register-your-expansion) section for more details.
|
||||||
|
|
||||||
|
You are also required to override and set `persist()` to `true`. This tells PlaceholderAPI to not unload your expansion during plugin reload, as it would otherwise unregister your expansion, making it no longer work.
|
||||||
|
///
|
||||||
|
|
||||||
|
/// details | Full Example
|
||||||
|
attrs: { id: full-example-internal }
|
||||||
|
type: example
|
||||||
|
|
||||||
|
//// note |
|
||||||
|
Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
|
||||||
|
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
////
|
||||||
|
|
||||||
|
```{ .java .annotate title="SomeExpansion.java" }
|
||||||
|
package at.helpch.placeholderapi.example.expansion;
|
||||||
|
|
||||||
|
import at.helpch.placeholderapi.example.SomePlugin;
|
||||||
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
public class SomeExpansion extends PlaceholderExpansion {
|
||||||
|
|
||||||
|
private final SomePlugin plugin; // (1)
|
||||||
|
|
||||||
|
public SomeExpansion(SomePlugin plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getAuthor() {
|
||||||
|
return String.join(", ", plugin.getDescription().getAuthors()); // (2)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getIdentifier() {
|
||||||
|
return "example";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getVersion() {
|
||||||
|
return plugin.getDescription().getVersion(); // (3)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean persist() {
|
||||||
|
return true; // (4)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onRequest(OfflinePlayer player, @NotNull String params) {
|
||||||
|
if (params.equalsIgnoreCase("placeholder1")) {
|
||||||
|
return plugin.getConfig().getString("placeholders.placeholder1", "default1"); // (5)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.equalsIgnoreCase("placeholder2")) {
|
||||||
|
return plugin.getConfig().getString("placeholders.placeholder1", "default1"); // (6)
|
||||||
|
}
|
||||||
|
|
||||||
|
return null; // (7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Mockup plugin used to showcase the use of dependency injection to access specific plugin related data.
|
||||||
|
|
||||||
|
2. We can use the authors set in the plugin's `plugin.yml` file as the authors of this expansion.
|
||||||
|
|
||||||
|
3. Since our expansion is internal can this version be the same as the one defined in the plugin's `plugin.yml` file.
|
||||||
|
|
||||||
|
4. This needs to be set, or else will PlaceholderAPI unregister our expansion during a plugin reload.
|
||||||
|
|
||||||
|
5. Example of accessing data of the plugin's `config.yml` file.
|
||||||
|
|
||||||
|
6. Example of accessing data of the plugin's `config.yml` file.
|
||||||
|
|
||||||
|
7. Reaching this means that an invalid params String was given, so we return `null` to tell PlaceholderAPI that the placeholder was invalid.
|
||||||
|
///
|
||||||
|
|
||||||
|
### Register your Expansion
|
||||||
|
|
||||||
|
Due to the PlaceholderExpansion being internal, PlaceholderAPI does not load it automatically, we'll need to do it manually.
|
||||||
|
This is being done by creating a new instance of your PlaceholderExpansion class and calling the `register()` method of it.
|
||||||
|
|
||||||
|
Here is a quick example:
|
||||||
|
|
||||||
|
```{ .java .annotate title="SomePlugin.java" }
|
||||||
|
package at.helpch.placeholderapi.example;
|
||||||
|
|
||||||
|
import at.helpch.placeholderapi.example.expansion.SomeExpansion;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
public class SomePlugin extends JavaPlugin {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEnable() {
|
||||||
|
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) { // (1)
|
||||||
|
new SomeExpansion(this).register(); // (2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
1. We check that PlaceholderAPI is present and enabled on the server, or else we would get Exceptions.
|
||||||
|
Also, make sure you [set PlaceholderAPI as depend or softdepend](using-placeholderapi.md#set-placeholderapi-as-softdepend) in your plugin's `plugin.yml` file!
|
||||||
|
|
||||||
|
2. This registers our expansion in PlaceholderAPI. It also gives the Plugin class as dependency injection to the Expansion class, so that we can use it.
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
## Making an External Expansion
|
||||||
|
|
||||||
|
External Expansions are separate Jar files located inside PlaceholderAPI's `expansions` folder, that contain the [`PlaceholderExpansion`][placeholderexpansion] extending class.
|
||||||
|
It is recommended to only make external Expansions for the following situations.
|
||||||
|
|
||||||
|
- Your expansion does not rely on a plugin.
|
||||||
|
- Your expansion depends on a plugin and you can't directly include it (Plugin is not your own).
|
||||||
|
|
||||||
|
Should the above cases not match your situation, meaning your expansion is for a plugin you maintain, is the creation of an [internal Expansion](#making-an-internal-expansion) recommended.
|
||||||
|
|
||||||
|
Some benefits of an external expansion include automatic (re)loading of your expansion by PlaceholderAPI and having the option to [upload it to the eCloud](expansion-cloud.md) allowing the download of it through the [`/papi ecloud download` command](../users/commands.md#papi-ecloud-download).
|
||||||
|
Downsides include a more tedious setup in terms of checking for a required plugin being present.
|
||||||
|
|
||||||
|
/// details | Full Example (Without Dependency)
|
||||||
|
attrs: { id: full-example-external-no-dependency }
|
||||||
|
type: example
|
||||||
|
|
||||||
|
//// note |
|
||||||
|
Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
|
||||||
|
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
////
|
||||||
|
|
||||||
|
This is an example expansion without any plugin dependency.
|
||||||
|
|
||||||
|
```{ .java .annotate title="SomeExpansion.java" }
|
||||||
|
package at.helpch.placeholderapi.example.expansion;
|
||||||
|
|
||||||
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
public class SomeExpansion extends PlaceholderExpansion {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getAuthor() {
|
||||||
|
return "Author";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getIdentifier() {
|
||||||
|
return "example";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getVersion() {
|
||||||
|
return "1.0.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onRequest(OfflinePlayer player, @NotNull String params) {
|
||||||
|
if (params.equalsIgnoreCase("placeholder1")) {
|
||||||
|
return "text1";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.equalsIgnoreCase("placeholder2")) {
|
||||||
|
return "text2";
|
||||||
|
}
|
||||||
|
|
||||||
|
return null; // (1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Reaching this means that an invalid params String was given, so we return `null` to tell PlaceholderAPI that the placeholder was invalid.
|
||||||
|
///
|
||||||
|
|
||||||
|
/// details | Full Example (With Dependency)
|
||||||
|
attrs: { id: full-example-external-dependency }
|
||||||
|
type: example
|
||||||
|
|
||||||
|
//// note |
|
||||||
|
Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
|
||||||
|
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
////
|
||||||
|
|
||||||
|
This is an example expansion with a plugin dependency.
|
||||||
|
|
||||||
|
```{ .java .annotate title="SomeExpansion.java" }
|
||||||
|
package at.helpch.placeholderapi.example.expansion;
|
||||||
|
|
||||||
|
import at.helpch.placeholderapi.example.SomePlugin;
|
||||||
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
public class SomeExpansion extends PlaceholderExpansion {
|
||||||
|
|
||||||
|
private SomePlugin plugin; // (1)
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getAuthor() {
|
||||||
|
return "Author";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getIdentifier() {
|
||||||
|
return "example";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getVersion() {
|
||||||
|
return "1.0.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRequiredPlugin() {
|
||||||
|
return "SomePlugin"; // (2)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canRegister() { // (3)
|
||||||
|
return (plugin = (SomePlugin) Bukkit.getPluginManager().getPlugin(getRequiredPlugin())) != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onRequest(OfflinePlayer player, @NotNull String params) {
|
||||||
|
if (params.equalsIgnoreCase("placeholder1")) {
|
||||||
|
return plugin.getConfig().getString("placeholders.placeholder1", "default1"); // (4)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.equalsIgnoreCase("placeholder2")) {
|
||||||
|
return plugin.getConfig().getString("placeholders.placeholder1", "default1"); // (5)
|
||||||
|
}
|
||||||
|
|
||||||
|
return null; // (6)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
1. We set the value of this instance in the `canRegister()` method, which means that it can't be set to be final.
|
||||||
|
|
||||||
|
2. The name of the plugin this expansion depends on.
|
||||||
|
It is recommended to set this, as it would result in PlaceholderAPI reporting any missing plugin for your expansion.
|
||||||
|
|
||||||
|
3. This does two things:
|
||||||
|
|
||||||
|
1. It sets the `plugin` instance to `SomePlugin` using Bukkit's PluginManager to retrieve a JavaPlugin instance that is cast to `SomePlugin`.
|
||||||
|
2. It checks if the retrieved instance is not null. If it is will this result in `canRegister()` returning false, resulting in PlaceholderAPI not loading our expansion.
|
||||||
|
|
||||||
|
4. Example of accessing data of the plugin's `config.yml` file.
|
||||||
|
|
||||||
|
5. Example of accessing data of the plugin's `config.yml` file.
|
||||||
|
|
||||||
|
6. Reaching this means that an invalid params String was given, so we return `null` to tell PlaceholderAPI that the placeholder was invalid.
|
||||||
|
///
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
## Making a relational Expansion
|
||||||
|
|
||||||
|
/// note
|
||||||
|
Relational Placeholders always start with `rel_` to properly identify them. This means that if you make a relational placeholder called `friends_is_friend` would the full placeholder be `%rel_friends_is_friend%`.
|
||||||
|
///
|
||||||
|
|
||||||
|
Relational PlaceholderExpansions are special in that they take two players as input, allowing you to give outputs based on their relation to each other.
|
||||||
|
|
||||||
|
To create a relational expansion you will need to implement the [`Relational`][relational] interface into your expansion. You also still need to extend the [`PlaceholderExpansion`][placeholderexpansion] class.
|
||||||
|
Implementing this interface will add the `onPlaceholderRequest(Player, Player, String)` with the first two arguments being the first and second player to use and the third argument being the content after the second `_` and before the final `%` (Or `}` if bracket placeholders are used) in the placeholder.
|
||||||
|
|
||||||
|
/// details | Full Example
|
||||||
|
attrs: { id: full-example-relational }
|
||||||
|
type: example
|
||||||
|
|
||||||
|
//// note |
|
||||||
|
Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
|
||||||
|
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
////
|
||||||
|
|
||||||
|
This is a complete example of using relational placeholders.
|
||||||
|
For the sake of simplicity are we using the [internal Expansion setup](#making-an-internal-expansion) here and assume that `SomePlugin` offers a `areFriends(Player, Player)` method that returns true or false based on if the players are friends or not.
|
||||||
|
|
||||||
|
```{ .java .annotate title="SomeExpansion.java" }
|
||||||
|
package at.helpch.placeholderapi.example.expansion;
|
||||||
|
|
||||||
|
import at.helpch.placeholderapi.example.SomePlugin;
|
||||||
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
|
import me.clip.placeholderapi.expansion.Relational
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Player;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
public class SomeExpansion extends PlaceholderExpansion implements Relational {
|
||||||
|
|
||||||
|
private final SomePlugin plugin; // (1)
|
||||||
|
|
||||||
|
public SomeExpansion(SomePlugin plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getAuthor() {
|
||||||
|
return String.join(", ", plugin.getDescription().getAuthors()); // (2)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getIdentifier() {
|
||||||
|
return "example";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
public String getVersion() {
|
||||||
|
return plugin.getDescription().getVersion(); // (3)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean persist() {
|
||||||
|
return true; // (4)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onPlaceholderRequest(Player one, Player two, String identifier) {
|
||||||
|
if (one == null || two == null) {
|
||||||
|
return null; // (5)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (identifier.equalsIgnoreCase("friends")) { // (6)
|
||||||
|
if (plugin.areFriends(one, two)) {
|
||||||
|
return ChatColor.GREEN + one.getName() + " and " + two.getName() + " are friends!";
|
||||||
|
} else {
|
||||||
|
return ChatColor.RED + one.getName() + " and " + two.getName() + " are not friends!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null; // (7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Mockup plugin used to showcase the use of dependency injection to access specific plugin related data.
|
||||||
|
|
||||||
|
2. We can use the authors set in the plugin's `plugin.yml` file as the authors of this expansion.
|
||||||
|
|
||||||
|
3. Since our expansion is internal can this version be the same as the one defined in the plugin's `plugin.yml` file.
|
||||||
|
|
||||||
|
4. This needs to be set, or else will PlaceholderAPI unregister our expansion during a plugin reload.
|
||||||
|
|
||||||
|
5. Our placeholder requires both players to be present, so if either one is not will this return null.
|
||||||
|
|
||||||
|
6. In case the identifier matches (Meaning the placeholder is `%rel_example_friends%` or `{rel_example_friends}`) will we check if Player one and two are friends through our plugin's `areFriends(Player, Player)` method.
|
||||||
|
Should they be friends, return green text saying they are and else return red text saying they aren't.
|
||||||
|
|
||||||
|
7. Reaching this means that an invalid params String was given, so we return `null` to tell PlaceholderAPI that the placeholder was invalid.
|
||||||
|
|
||||||
|
Don't forget to [register your expansion](#register-your-expansion).
|
||||||
|
///
|
||||||
|
|
||||||
|
[placeholderexpansion]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java
|
||||||
|
[relational]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/src/main/java/me/clip/placeholderapi/expansion/Relational.java
|
@@ -1,66 +1,95 @@
|
|||||||
|
---
|
||||||
|
description: Information about PlaceholderAPI's expansion cloud, including how to submit your own expansion or update it.
|
||||||
|
---
|
||||||
|
|
||||||
|
# eCloud
|
||||||
|
|
||||||
## About
|
## About
|
||||||
PlaceholderAPI uses an expansion-cloud (A website that has all kinds of expansions stored), to download jar-files, that contain the placeholders for it to use.
|
|
||||||
|
PlaceholderAPI uses an expansion-cloud (A website that has all kinds of expansions stored), to download jar files, that contain the placeholders for it to use.
|
||||||
|
|
||||||
The expansion-cloud can be seen under https://api.extendedclip.com/home
|
The expansion-cloud can be seen under https://api.extendedclip.com/home
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
PlaceholderAPI connects to the ecloud on startup of your server, to check if the cloud is available and how many expansions are available on it.
|
PlaceholderAPI connects to the ecloud on startup of your server, to check if the cloud is available and how many expansions are available on it.
|
||||||
If you run `/papi ecloud download <expansion>` PlaceholderAPI will connect to the site to first check if the specified expansion exists and then downloads it if it does.
|
If you run [`/papi ecloud download <expansion>`](../users/commands.md#papi-ecloud-download), PlaceholderAPI will connect to the site to first check if the specified expansion exists and then downloads it if it does.
|
||||||
Note that not all listed expansions are on the ecloud. Some are in the corresponding plugin itself and are registered on the startup of the server.
|
|
||||||
|
/// note
|
||||||
|
PlaceholderAPI can only download expansions that are verified on the eCloud. Any unverified expansion needs to be downloaded manually.
|
||||||
|
///
|
||||||
|
|
||||||
You can disable the connection to the cloud by setting `cloud_enabled` in the config.yml to false.
|
You can disable the connection to the cloud by setting `cloud_enabled` in the config.yml to false.
|
||||||
|
|
||||||
## Adding your own expansion
|
## Adding your own expansion
|
||||||
|
|
||||||
You can add your own expansion to the expansion-cloud for others to use.
|
You can add your own expansion to the expansion-cloud for others to use.
|
||||||
In order to do that, you have to follow those steps:
|
In order to do that, you have to follow those steps:
|
||||||
1. Make sure you have created a seperate jar-file like explained on the page [[PlaceholderExpansion]].
|
|
||||||
|
1. Make sure you have created a seperate jar file as described in the [Creating a PlaceholderExpansion](creating-a-placeholderexpansion.md) page.
|
||||||
2. Create an account on the site, or log in, if you already have one.
|
2. Create an account on the site, or log in, if you already have one.
|
||||||
3. Click on `Expansions` and then on [`Upload New`](https://api.extendedclip.com/manage/add/).
|
3. Click on `Expansions` and then on [`Upload New`](https://api.extendedclip.com/manage/add/).
|
||||||
4. Fill out the required information. `Source URL` and `Dependency URL` are optional.
|
4. Fill out the required information. `Source URL` and `Dependency URL` are optional and would link to the source code and any dependency (plugin) of your expansion respectively.
|
||||||
5. Click on the button that says `Choose an file...` and select the jar of your expansion.
|
5. Click on the button that says `Choose an file...` and select the jar of your expansion.
|
||||||
* **Important**! Make sure, that the name of the jar-file contains the same version like you set in the version-field!
|
|
||||||
|
/// warning |
|
||||||
|
**Important!**
|
||||||
|
Make sure, that the name of the jar file contains the same version like you set in the version field.
|
||||||
|
///
|
||||||
|
|
||||||
6. Click on `Submit Expansion`
|
6. Click on `Submit Expansion`
|
||||||
|
|
||||||
Your expansion is now uploaded and will be reviewed by a moderator.
|
Your expansion is now uploaded and will be reviewed by a moderator.
|
||||||
If everything is ok will your expansion be approved and will be available on the ecloud for PlaceholderAPI*.
|
If everything is ok will your expansion be approved and will be available on the ecloud for PlaceholderAPI*.
|
||||||
|
|
||||||
> *You can only download verified Expansions through PlaceholderAPIs command, unless you enable the option `cloud_allow_unverified_expansions` in the config.yml
|
/// info | Note for Hosts
|
||||||
> Unverified expansions can be downloaded manually by going to the site and download it yourself.
|
You can block specific expansions from being downloaded using the `PAPI_BLOCKED_EXPANSIONS` environment variable.
|
||||||
|
Just define it with a value of comma-separated expansion names that should not be downloadable by PlaceholderAPI.
|
||||||
|
|
||||||
|
This feature exists since version 2.11.4 of PlaceholderAPI.
|
||||||
|
///
|
||||||
|
|
||||||
## Updating your expansion
|
## Updating your expansion
|
||||||
|
|
||||||
Before you update, please note the following:
|
Before you update, please note the following:
|
||||||
If you aren't a verified dev and you upload an update, your expansion will become **unverified** until a moderator reviews the update and approves it!
|
Updating your expansion will automatically make it unverified, requiring a site moderator to verify it again. This was made to combat malware from being uploaded and distributed.
|
||||||
It is recommended to only update the expansion, if it contains huge changes or bug fixes.
|
|
||||||
|
|
||||||
To update your expansion, you first have to go to the list of [your expansions](https://api.extendedclip.com/manage/).
|
To update your expansion, you first have to go to the list of [your expansions](https://api.extendedclip.com/manage/).
|
||||||
For that click on `Expansions` and select `Your Expansions`.
|
For that click on `Expansions` and select `Your Expansions`.
|
||||||
After that, follow those steps:
|
After that, follow those steps:
|
||||||
|
|
||||||
1. Click the name of the expansion, that you want to update.
|
1. Click the name of the expansion, that you want to update.
|
||||||
2. Click on the button that says `Version`
|
2. Click on the button that says `Version`
|
||||||
3. Click on `Add Version`
|
3. Click on `Add Version`
|
||||||
4. Fill out the fields and upload the new jar.
|
4. Fill out the fields and upload the new jar.
|
||||||
* **Important**! Make sure, that the name of the jar-file contains the same version like you set in the version-field!
|
|
||||||
|
/// warning |
|
||||||
|
**Important!**
|
||||||
|
Make sure, that the name of the jar file contains the same version like you set in the version field.
|
||||||
|
///
|
||||||
|
|
||||||
5. Click on `Save Changes`
|
5. Click on `Save Changes`
|
||||||
|
|
||||||
If you're a verified dev, your version will be approved and is available directly.
|
Your version should now be uploaded to the eCloud. You can now ask a responsible staff member on the [HelpChat Discord](https://discord.gg/helpchat) to review your expansion to get it re-verified. Please remain patient and polite when asking.
|
||||||
If you aren't a verified dev, you have to wait until a moderator approves the update.
|
|
||||||
|
|
||||||
## Downloading a specific expansion version
|
## Downloading a specific expansion version
|
||||||
In some cases, you may want to use a specific, older version of expansion. Such a case could be for example, when you run an old server version and the newest version of an expansion uses methods that aren't available on that particular server version.
|
|
||||||
|
In some cases, you may want to use a specific, older version of an expansion. Such a case could be for example, when you run an old server version and the newest version of an expansion uses methods that aren't available on that particular server version, causing compatability issues.
|
||||||
For that case is there a way, to download a specific version of expansion. You can download the expansion either manually, or through PlaceholderAPI itself.
|
For that case is there a way, to download a specific version of expansion. You can download the expansion either manually, or through PlaceholderAPI itself.
|
||||||
Here is how you can do it for each.
|
Here is how you can do it for each.
|
||||||
|
|
||||||
### Download with PlaceholderAPI
|
### Download with PlaceholderAPI
|
||||||
|
|
||||||
This is the easiest of both methods since it requires the least amount of effort.
|
This is the easiest of both methods since it requires the least amount of effort.
|
||||||
Run the following command in-game or in your console to download a specific version:
|
Run the following command in-game or in your console to download a specific version:
|
||||||
`/papi ecloud download <expansion> [version]`
|
[`/papi ecloud download <expansion> [version]`](../users/commands.md#papi-ecloud-download)
|
||||||
|
|
||||||
To find out, what versions are available for the expansion, run `/papi ecloud info <expansion>`
|
To find out, what versions are available for the expansion, run [`/papi ecloud info <expansion>`](../users/commands.md#papi-ecloud-info).
|
||||||
You can then run `/papi ecloud versioninfo <expansion> <version>` to receive more infor about a specific version.
|
|
||||||
|
|
||||||
After you downloaded the specific version, run `/papi reload` to refresh the installed expansions.
|
After you downloaded the specific version, run [`/papi reload`](../users/commands.md#papi-reload) to refresh the installed expansions.
|
||||||
|
|
||||||
### Download manually
|
### Download manually
|
||||||
|
|
||||||
To download an expansion manually, you first have to connect to the website and go to the expansion of your choice.
|
To download an expansion manually, you first have to connect to the website and go to the expansion of your choice.
|
||||||
There, you click on the button that says `Version` and click on the download-icon of the version you want to download.
|
There, you click on the button that says `Version` and click on the download-icon of the version you want to download.
|
||||||
|
|
37
docs/developers/index.md
Normal file
@@ -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).
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
<div class="grid cards hide-list" markdown>
|
||||||
|
|
||||||
|
- ### 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)
|
||||||
|
|
||||||
|
</div>
|
218
docs/developers/using-placeholderapi.md
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
---
|
||||||
|
description: Guide on how to use PlaceholderAPI in your own plugin.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Using PlaceholderAPI
|
||||||
|
|
||||||
|
This page is about using PlaceholderAPI in your own plugin, to either let other plugins use your plugin, or just use placeholders from other plugins in your own.
|
||||||
|
|
||||||
|
Please note, that the examples in this page are only available for **PlaceholderAPI 2.10.0 or higher**!
|
||||||
|
|
||||||
|
## First steps
|
||||||
|
|
||||||
|
Before you can actually make use of PlaceholderAPI, you first have to import it into your project.
|
||||||
|
Use the below code example matching your dependency manager.
|
||||||
|
|
||||||
|
/// tab | :simple-apachemaven: Maven
|
||||||
|
```{ .xml title="pom.xml" data-md-component="api-version" }
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>placeholderapi</id>
|
||||||
|
<url>https://repo.extendedclip.com/releases/</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>me.clip</groupId>
|
||||||
|
<artifactId>placeholderapi</artifactId>
|
||||||
|
<version>{version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
/// tab | :simple-gradle: Gradle
|
||||||
|
```{ .groovy title="build.gradle" data-md-component="api-version" }
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = 'https://repo.extendedclip.com/releases/'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly 'me.clip:placeholderapi:{version}'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
/// details | What is `{version}`?
|
||||||
|
type: question
|
||||||
|
|
||||||
|
Using Javascript, `{version}` is replaced with the latest available API version of PlaceholderAPI.
|
||||||
|
Should you see the placeholder as-is does it mean that you either block Javascript, or that the version couldn't be obtained in time during page load.
|
||||||
|
|
||||||
|
You can always find the latest version matching the API version on the [releases tab](https://github.com/PlaceholderAPI/PlaceholderAPI/releases) of the GitHub Repository.
|
||||||
|
///
|
||||||
|
|
||||||
|
### Set PlaceholderAPI as (soft)depend
|
||||||
|
|
||||||
|
Next step is to go to your plugin.yml or paper-plugin.yml and add PlaceholderAPI as a depend or softdepend, depending (no pun intended) on if it is optional or not.
|
||||||
|
|
||||||
|
/// tab | :simple-spigotmc: plugin.yml
|
||||||
|
|
||||||
|
//// tab | Optional dependency
|
||||||
|
|
||||||
|
///// note |
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
/////
|
||||||
|
|
||||||
|
```{ .yaml .annotate title="plugin.yml" }
|
||||||
|
name: ExamplePlugin
|
||||||
|
version: 1.0
|
||||||
|
author: author
|
||||||
|
main: your.main.path.Here
|
||||||
|
|
||||||
|
softdepend: ["PlaceholderAPI"] # (1)
|
||||||
|
```
|
||||||
|
|
||||||
|
1. This sets PlaceholderAPI as an optional dependency for your plugin.
|
||||||
|
////
|
||||||
|
|
||||||
|
//// tab | Required dependency
|
||||||
|
|
||||||
|
///// note |
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
/////
|
||||||
|
|
||||||
|
```{ .yaml .annotate title="plugin.yml" }
|
||||||
|
name: ExamplePlugin
|
||||||
|
version: 1.0
|
||||||
|
author: author
|
||||||
|
main: your.main.path.Here
|
||||||
|
|
||||||
|
depend: ["PlaceholderAPI"] # (1)
|
||||||
|
```
|
||||||
|
|
||||||
|
1. This sets PlaceholderAPI as a required dependency for your plugin.
|
||||||
|
////
|
||||||
|
|
||||||
|
///
|
||||||
|
|
||||||
|
/// tab | :fontawesome-regular-paper-plane: paper-plugin.yml
|
||||||
|
|
||||||
|
//// tab | Optional dependency
|
||||||
|
|
||||||
|
///// note |
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
/////
|
||||||
|
|
||||||
|
```{ .yaml .annotate title="paper-plugin.yml" }
|
||||||
|
name: ExamplePlugin
|
||||||
|
version: 1.0
|
||||||
|
author: author
|
||||||
|
main: your.main.path.Here
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
server:
|
||||||
|
PlaceholderAPI:
|
||||||
|
load: BEFORE # (1)
|
||||||
|
required: false
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Load order is relative to the Dependency.
|
||||||
|
This means that in this example, PlaceholderAPI is loaded **before** your plugin.
|
||||||
|
////
|
||||||
|
|
||||||
|
//// tab | Required dependency
|
||||||
|
|
||||||
|
///// note |
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
/////
|
||||||
|
|
||||||
|
```{ .yaml .annotate title="paper-plugin.yml" }
|
||||||
|
name: ExamplePlugin
|
||||||
|
version: 1.0
|
||||||
|
author: author
|
||||||
|
main: your.main.path.Here
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
server:
|
||||||
|
PlaceholderAPI:
|
||||||
|
load: BEFORE # (1)
|
||||||
|
required: true
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Load order is relative to the Dependency.
|
||||||
|
This means that in this example, PlaceholderAPI is loaded **before** your plugin.
|
||||||
|
////
|
||||||
|
|
||||||
|
///
|
||||||
|
|
||||||
|
## Adding placeholders to PlaceholderAPI
|
||||||
|
|
||||||
|
A full guide on how to create expansions can be found on the [Creating a PlaceholderExpansion](creating-a-placeholderexpansion.md) page.
|
||||||
|
|
||||||
|
## Setting placeholders in your plugin
|
||||||
|
|
||||||
|
PlaceholderAPI offers the ability, to automatically parse placeholders from other plugins within your own plugin, giving the ability for your plugin to support thousands of other placeholders without depending on each plugin individually.
|
||||||
|
To use placeholders from other plugins in our own plugin, we simply have to [(soft)depend on PlaceholderAPI](#set-placeholderapi-as-softdepend) and use the `setPlaceholders` method.
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
/// details | Example
|
||||||
|
type: 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:
|
||||||
|
|
||||||
|
//// note |
|
||||||
|
The below example assumes a **soft dependency** on PlaceholderAPI to handle PlaceholderAPI not being present more decently.
|
||||||
|
|
||||||
|
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||||
|
////
|
||||||
|
|
||||||
|
```{ .java .annotate title="JoinExample.java" }
|
||||||
|
package at.helpch.placeholderapi;
|
||||||
|
|
||||||
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
|
|
||||||
|
public class JoinExample extends JavaPlugin implements Listener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEnable() {
|
||||||
|
|
||||||
|
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
||||||
|
Bukkit.getPluginManager().registerEvents(this, this); // (1)
|
||||||
|
} else {
|
||||||
|
getLogger().warn("Could not find PlaceholderAPI! This plugin is required."); // (2)
|
||||||
|
Bukkit.getPluginManager().disablePlugin(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
|
public void onJoin(PlayerJoinEvent event) {
|
||||||
|
String joinText = "%player_name% joined the server! They are rank %vault_rank%";
|
||||||
|
|
||||||
|
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText); // (3)
|
||||||
|
|
||||||
|
event.setJoinMessage(joinText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
1. We check that PlaceholderAPI is present and enabled to then register events to handle (See below).
|
||||||
|
2. In case PlaceholderAPI is not present are we reporting this issue and disable the plugin.
|
||||||
|
3. Using `PlaceholderAPI.setPlaceholders(Player, String)` we can parse `%placeholder%` text in the provided String, should they have a matching expansion and said expansion return a non-null String.
|
||||||
|
In our example are we providing a text containing `%player_name%` and `%vault_rank%` to be parsed, which require the Player and Vault expansion respectively.
|
||||||
|
|
||||||
|
Example output: `Notch joined the server! They are rank Admin`
|
||||||
|
///
|
82
docs/faq.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
---
|
||||||
|
description: List of frequently asked questions and their answers.
|
||||||
|
---
|
||||||
|
|
||||||
|
# FAQ
|
||||||
|
|
||||||
|
Here are frequently asked questions about stuff related to PlaceholderAPI.
|
||||||
|
|
||||||
|
## What is an Expansion?
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Expansions that are separate jar files can be found on the eCloud and are downloadable through [`/papi ecloud download <expansion>`](users/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%`](users/commands.md#papi-parse) only returns the placeholder itself and no value should you check for the following things:
|
||||||
|
|
||||||
|
- ### The expansion is actually installed.
|
||||||
|
|
||||||
|
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 <expansion>`](users/commands.md#papi-ecloud-download) command.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
You can find a list of plugins supporting PlaceholderAPI [here](users/plugins-using-placeholderapi.md).
|
||||||
|
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 <expansion>`](users/commands.md#papi-ecloud-placeholders) (replace `<expansion>` 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 the following checks:
|
||||||
|
|
||||||
|
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`](users/commands.md#papi-reload).
|
||||||
|
|
||||||
|
## How can other plugins use my placeholders with PlaceholderAPI?
|
||||||
|
|
||||||
|
See the [Using PlaceholderAPI](developers/using-placeholderapi.md) page.
|
||||||
|
|
||||||
|
## Can I help on this wiki?
|
||||||
|
|
||||||
|
You sure can!
|
||||||
|
We welcome contributions to our wiki by everyone. If you found a typo or want to improve this wiki in another way, head over to the [Wiki's readme file][readme] to find out about how you can contribute towards this wiki.
|
||||||
|
|
||||||
|
## PlaceholderAPI is posting an error about an outdated expansion?
|
||||||
|
|
||||||
|
```
|
||||||
|
[00:00:01 ERROR]: [PlaceholderAPI] Failed to load Expansion class <expansion> (Is a dependency missing?)
|
||||||
|
[00:00:01 ERROR]: [PlaceholderAPI] Cause: NoClassDefFoundError <path>
|
||||||
|
```
|
||||||
|
|
||||||
|
If you receive the above error, try to do the following steps:
|
||||||
|
|
||||||
|
- Make sure any required dependency of the mentioned expansion (e.g. a plugin) is installed.
|
||||||
|
- Make sure you use the latest version supported for the server version you use.
|
||||||
|
- If you downloaded the jar from the ecloud, make sure it isn't malformed/corrupted.
|
||||||
|
|
||||||
|
If the issue persists after you've done those checks, report it to the author of the expansion.
|
||||||
|
In most cases is the issue that either a dependency is missing or that the expansion tries to use outdated methods from PlaceholderAPI.
|
||||||
|
|
||||||
|
[readme]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki/README.md
|
53
docs/index.md
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# Welcome
|
||||||
|
|
||||||
|
{ align="center" }
|
||||||
|
|
||||||
|
This wiki gives you information on how to create placeholders in your plugin that can be used in other plugins, how to use other placeholders inside your plugin, or how to make an expansion.
|
||||||
|
It also has a community-curated list of all available Placeholder expansions and their placeholders.
|
||||||
|
|
||||||
|
## Navigation
|
||||||
|
|
||||||
|
<div class="grid cards hide-list" markdown>
|
||||||
|
|
||||||
|
- ### :material-account-file-text: User Guides
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Pages aimed at server owners who want to utilize PlaceholderAPI.
|
||||||
|
|
||||||
|
Available pages:
|
||||||
|
|
||||||
|
- [:octicons-chevron-right-16: Commands](users/commands.md)
|
||||||
|
- [: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)
|
||||||
|
|
||||||
|
</div>
|
323
docs/users/commands.md
Normal file
@@ -0,0 +1,323 @@
|
|||||||
|
---
|
||||||
|
description: Available commands within PlaceholderAPI.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Commands
|
||||||
|
|
||||||
|
This page shows all commands, including with a detailed description of what every command does.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
- **[Parse Commands](#parse-commands)**
|
||||||
|
- [`/papi bcparse <player|me|--null> <string>`](#papi-bcparse)
|
||||||
|
- [`/papi cmdparse <player|me|--null> <string>`](#papi-cmdparse)
|
||||||
|
- [`/papi parse <player|me|--null> <string>`](#papi-parse)
|
||||||
|
- [`/papi parserel <player> <player> <string>`](#papi-parserel)
|
||||||
|
|
||||||
|
- **[eCloud Commands](#ecloud-commands)**
|
||||||
|
- [`/papi ecloud clear`](#papi-ecloud-clear)
|
||||||
|
- [`/papi ecloud disable`](#papi-ecloud-disable)
|
||||||
|
- [`/papi ecloud download <expansion> [version]`](#papi-ecloud-download)
|
||||||
|
- [`/papi ecloud enable`](#papi-ecloud-enable)
|
||||||
|
- [`/papi ecloud info <expansion> [version]`](#papi-ecloud-info)
|
||||||
|
- [`/papi ecloud list <all|<author>|installed>`](#papi-ecloud-list)
|
||||||
|
- [`/papi ecloud placeholders <expansion>`](#papi-ecloud-placeholders)
|
||||||
|
- [`/papi ecloud refresh`](#papi-ecloud-refresh)
|
||||||
|
- [`/papi ecloud status`](#papi-ecloud-status)
|
||||||
|
|
||||||
|
- **[Expansion Commands](#expansion-commands)**
|
||||||
|
- [`/papi info <expansion>`](#papi-info)
|
||||||
|
- [`/papi list`](#papi-list)
|
||||||
|
- [`/papi register <jar file>`](#papi-register)
|
||||||
|
- [`/papi unregister <jar file>`](#papi-unregister)
|
||||||
|
|
||||||
|
- **[Other Commands](#other-commands)**
|
||||||
|
- [`/papi dump`](#papi-dump)
|
||||||
|
- [`/papi help`](#papi-help)
|
||||||
|
- [`/papi reload`](#papi-reload)
|
||||||
|
- [`/papi version`](#papi-version)
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
### Parse Commands
|
||||||
|
|
||||||
|
These commands are used to parse placeholders into their respective values. Useful for debugging.
|
||||||
|
|
||||||
|
#### `/papi bcparse`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Parses placeholders of a String and broadcasts the result to all players.
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<player|me|--null>` - The Player to parse values of the placeholder (Use `me` for yourself and `--null` to force a null player (Useful for consoles)).
|
||||||
|
- `<Text with placeholders>` - The text to parse.
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi bcparse funnycube My name is %player_name%!
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi cmdparse`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Parses placeholders of a String and executes it as a command.
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<player|me|--null>` - The Player to parse values of the placeholder (Use `me` for yourself and `--null` to force a null player (Useful for consoles)).
|
||||||
|
- `<Command with placeholders>` - The Text to parse and execute as command. Please leave away the `/` of the command.
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi cmdparse funnycube say My name is %player_name%!
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi parse`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Parses the placeholders in a given text and shows the result.
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<player|me|--null>` - The Player to parse values of the placeholder (Use `me` for yourself and `--null` to force a null player (Useful for consoles)).
|
||||||
|
- `<Text with placeholders>` - The text to parse.
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi parse funnycube My group is %vault_group%
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi parserel`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Parses a relational placeholder.
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<player1>` - The first player.
|
||||||
|
- `<player2>` - the second player to compare with.
|
||||||
|
- `<Text with placeholders>` - The actual placeholder to parse.
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi parserel funnycube extended_clip %placeholder%
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
### eCloud Commands
|
||||||
|
|
||||||
|
These commands all start with `/papi ecloud` and are used for things related about the [Expansion Cloud](../developers/expansion-cloud.md).
|
||||||
|
|
||||||
|
#### `/papi ecloud clear`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Clears the cache for the eCloud.
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi ecloud disable`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Disables the connection to the eCloud.
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi ecloud download`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Allows you to download an expansion from the eCloud
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<expansion>` - The expansion to download.
|
||||||
|
- `[version]` - The specific version of the expansion to download (Optional)
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi ecloud download Vault
|
||||||
|
/papi ecloud download Vault 1.5.2
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi ecloud enable`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Enables the connection to the eCloud
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi ecloud info`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Gives information about a specific Expansion.
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<expansion>` - The Expansion to retrieve information from.
|
||||||
|
- `[version]` - The Expansion's version to get information from.
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi ecloud info Vault
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi ecloud list`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Lists either all Expansions on the eCloud, only those by a specific author or only those that you have [installed](#papi-ecloud-download).
|
||||||
|
Installed Expansions show as green in the list and Expansions that are installed and have an update available show as gold.
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<all|<author>|installed>` - List all Expansions, Expansions of a specific author or all Expnansions you have installed.
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi ecloud list all
|
||||||
|
/papi ecloud list clip
|
||||||
|
/papi ecloud list installed
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi ecloud placeholders`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
List all placeholders of an Expansion.
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<expansion>` - The Expansion to list placeholders of.
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi ecloud placeholders Vault
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi ecloud refresh`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Refresh the cached data from the eCloud.
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi ecloud status`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Displays the actual Status of the eCloud.
|
||||||
|
///
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
### Expansion Commands
|
||||||
|
|
||||||
|
These commands can be used to manage the expansions that you have currently installed.
|
||||||
|
|
||||||
|
#### `/papi info`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Gives you information about the specified Expansion.
|
||||||
|
|
||||||
|
**Argument(s)**:
|
||||||
|
|
||||||
|
- `<expansion>` - The Expansion to get info from (Needs to be registered and active).
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi info Vault
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi list`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Lists all active/registered expansions.
|
||||||
|
This is different to [/papi ecloud list installed](#papi-ecloud-list) in the fact, that it also includes expansions that were installed through a plugin (That aren't a separate jar-file) and it also > doesn't show which one have updates available.
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi register`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Registers an expansion from a specified filename.
|
||||||
|
This is useful in cases, where you downloaded the expansion manually and don't want to restart the server.
|
||||||
|
The file needs to be inside `/plugins/PlaceholderAPI/expansions`.
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<filename>` - The file to register (including the file-extension).
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi register MyExpansion.jar
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi unregister`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Unregisters the specified expansion.
|
||||||
|
|
||||||
|
**Arguments**:
|
||||||
|
|
||||||
|
- `<filename>` - The expansion to unregister.
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
/papi unregister MyExpansion.jar
|
||||||
|
```
|
||||||
|
///
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
### Other Commands
|
||||||
|
|
||||||
|
These are other commands of PlaceholderAPI that don't fit any of the above categories.
|
||||||
|
|
||||||
|
#### `/papi dump`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Pastes useful information from PlaceholderAPI such as plugin version, server version and installed expansions to https://paste.helpch.at for simple sharing and support.
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi help`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Displays all the commands PlaceholderAPI currently offers.
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi reload`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Reloads the config settings.
|
||||||
|
You need to use this command after [downloading Expansions](#papi-ecloud-download) from the eCloud or they won't be properly registered.
|
||||||
|
///
|
||||||
|
|
||||||
|
#### `/papi version`
|
||||||
|
|
||||||
|
/// info |
|
||||||
|
**Description**:
|
||||||
|
Shows the current version and authors of PlaceholderAPI.
|
||||||
|
///
|
45
docs/users/index.md
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
---
|
||||||
|
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.
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
<div class="grid cards hide-list" markdown>
|
||||||
|
|
||||||
|
- ### Commands
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
List of all available commands in PlaceholderAPI.
|
||||||
|
|
||||||
|
- [:octicons-chevron-right-16: Go to Page](commands.md)
|
||||||
|
|
||||||
|
- ### 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)
|
||||||
|
|
||||||
|
</div>
|
7065
docs/users/placeholder-list.md
Normal file
1129
docs/users/plugins-using-placeholderapi.md
Normal file
@@ -1,35 +1,54 @@
|
|||||||
|
---
|
||||||
|
description: User Guide on how to use placeholders in a plugin.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Using Placeholders
|
||||||
|
|
||||||
This page is intended for server owners or server staff who want to learn how to use placeholders in a plugin.
|
This page is intended for server owners or server staff who want to learn how to use placeholders in a plugin.
|
||||||
|
|
||||||
If you're a developer and would like to learn how to provide placeholders or support placeholders from other plugins in your own, check out [[Hook into PlaceholderAPI]].
|
If you're a developer and would like to learn how to provide placeholders or support placeholders from other plugins in your own, check out [Using PlaceholderAPI](../developers/using-placeholderapi.md).
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
Before you can use placeholders should you check a few things first.
|
Before you can use placeholders should you check a few things first.
|
||||||
|
|
||||||
### Plugin supports PlaceholderAPI
|
### Plugin supports PlaceholderAPI
|
||||||
|
|
||||||
The first and most important thing is, to find out if the plugin you want to use placeholders in is actually supporting PlaceholderAPI.
|
The first and most important thing is, to find out if the plugin you want to use placeholders in is actually supporting PlaceholderAPI.
|
||||||
Chat-plugins such as EssentialsXChat do not natively support PlaceholderAPI and instead require separate plugins to "inject" the parsed placeholders into the final chat message.
|
Chat-plugins such as EssentialsXChat do not natively support PlaceholderAPI and instead require separate plugins to "inject" the parsed placeholders into the final chat message.
|
||||||
|
|
||||||
One way to check, if a Plugin is supporing PlaceholderAPI, is to check the [[Plugins using PlaceholderAPI]] page.
|
One way to check, if a Plugin is supporing PlaceholderAPI, is to check the [Plugins using PlaceholderAPI](plugins-using-placeholderapi.md) page.
|
||||||
If the plugin is listed and if the `Supports placeholders` text has a check, does it mean that PlaceholderAPI support is available.
|
If the plugin is listed and if the `Supports placeholders` text has a check, does it mean that PlaceholderAPI support is available.
|
||||||
|
|
||||||
If the plugin isn't listed, can you usually check its plugin page, or any other source of information, such as a wiki, for clues on if PlaceholderAPI is supported.
|
If the plugin isn't listed, can you usually check its plugin page, or any other source of information, such as a wiki, for clues on if PlaceholderAPI is supported.
|
||||||
|
|
||||||
### Proper Internet connection
|
### Proper Internet connection
|
||||||
|
|
||||||
PlaceholderAPI connects towards an eCloud located under https://api.extendedclip.com to retrieve information about placeholder expansions, but also to download said expansions from it.
|
PlaceholderAPI connects towards an eCloud located under https://api.extendedclip.com to retrieve information about placeholder expansions, but also to download said expansions from it.
|
||||||
Make sure that your server is allowing external connections to the above URL. If it doesn't, and you're using a host, contact their support and ask them to whitelist this URL.
|
Make sure that your server is allowing external connections to the above URL. If it doesn't, and you're using a host, contact their support and ask them to whitelist this URL.
|
||||||
|
|
||||||
|
/// info | Info for hosts
|
||||||
|
PlaceholderAPI provides and checks for a specific Environment variable to block the download of specific expansions.
|
||||||
|
Should you as a host want to block the download of specific expansions, add the `PAPI_BLOCKED_EXPANSIONS` Environment variable containing a comma-separated list of expansion names that PlaceholderAPI should not be able to download.
|
||||||
|
|
||||||
|
This feature exists since version 2.11.4 of PlaceholderAPI
|
||||||
|
///
|
||||||
|
|
||||||
## Download/Get Expansion
|
## Download/Get Expansion
|
||||||
|
|
||||||
The way PlaceholderAPI's system works, allows a Placeholder Expansion and its corresponding placeholders to either be included within a plugin (If placeholder requires said plugin) or to be available as a separate jar file on the eCloud of PlaceholderAPI.
|
The way PlaceholderAPI's system works, allows a Placeholder Expansion and its corresponding placeholders to either be included within a plugin (If placeholder requires said plugin) or to be available as a separate jar file on the eCloud of PlaceholderAPI.
|
||||||
Depending on what type you have, will you need to do some extra steps to use the placeholder from the Placeholder Expansion.
|
Depending on what type you have, will you need to do some extra steps to use the placeholder from the Placeholder Expansion.
|
||||||
|
|
||||||
One way to find out, if an Expansion is included or separate, is to check the [[Placeholders]] page for any entry of it.
|
One way to find out, if an Expansion is included or separate, is to check the [Placeholder List](placeholder-list.md) page for any entry of it.
|
||||||
If it exists on the page, can you check, if the line right after the title says `NO DOWNLOAD COMMAND` or `/papi ecloud download ...` (i.e. `/papi ecloud download Player`).
|
If it exists on the page, can you check the infobox right below the title of the Expansion for one of the following cases:
|
||||||
|
|
||||||
If the line says the former, does it mean, the expansion is part of the plugin and doesn't need any extra steps to be active (Unless the plugin author mentions otherwise).
|
- `papi ecloud download <expansion>`: The expansion is on the ecloud and needs to be downloaded using the [`/papi ecloud download` command](commands.md#papi-ecloud-download).
|
||||||
In the case of the later, will you need to download the expansion from the eCloud. Simply copy the command and execute it either in the console, or in-game. Afterwards, reload PlaceholderAPI using `/papi reload`.
|
- `Built into Plugin`: The expansion is part of the plugin it depends on and doesn't require any steps to install, unless stated otherwise.
|
||||||
|
- *A URL*: The Expansion needs to be downloaded from a separate source (i.e. a GitHub Release). You need to manually download and move the jar into the expansions folder.
|
||||||
|
|
||||||
You can check what expansions are loaded by running `/papi list`.
|
You can check what expansions are loaded by running `/papi list`.
|
||||||
|
|
||||||
## Use Expansion
|
## Use Expansion
|
||||||
|
|
||||||
Using the placeholders of the Expansion is a straigh forward process.
|
Using the placeholders of the Expansion is a straigh forward process.
|
||||||
Simply put the right placeholder format (i.e. `%player_name%`) inside whatever configuration option supports it. Please refer to any manuals or wikis a plugin may offer about what options support placeholders.
|
Simply put the right placeholder format (i.e. `%player_name%`) inside whatever configuration option supports it. Please refer to any manuals or wikis a plugin may offer about what options support placeholders.
|
BIN
img/icon.png
Before Width: | Height: | Size: 96 KiB |
136
mkdocs.yml
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
site_name: PlaceholderAPI Wiki
|
||||||
|
site_description: Wiki of the Spigot Plugin PlaceholderAPI.
|
||||||
|
site_author: PlaceholderAPI Team and Contributors
|
||||||
|
|
||||||
|
site_url: 'https://wiki.placeholderapi.com'
|
||||||
|
|
||||||
|
repo_name: PlaceholderAPI/PlaceholderAPI
|
||||||
|
repo_url: https://github.com/PlaceholderAPI/PlaceholderAPI
|
||||||
|
|
||||||
|
theme:
|
||||||
|
name: material
|
||||||
|
custom_dir: '.theme'
|
||||||
|
logo: assets/img/favicons/android-chrome-512x512.png
|
||||||
|
icon:
|
||||||
|
repo: octicons/mark-github-16
|
||||||
|
admonition:
|
||||||
|
note: octicons/pencil-16
|
||||||
|
abstract: octicons/checklist-16
|
||||||
|
info: octicons/info-16
|
||||||
|
tip: octicons/rocket-16
|
||||||
|
success: octicons/check-circle-16
|
||||||
|
question: octicons/question-16
|
||||||
|
warning: octicons/alert-16
|
||||||
|
failure: octicons/x-circle-16
|
||||||
|
danger: octicons/zap-16
|
||||||
|
bug: octicons/bug-16
|
||||||
|
example: octicons/beaker-16
|
||||||
|
quote: octicons/comment-16
|
||||||
|
palette:
|
||||||
|
- media: '(prefers-color-scheme: light)'
|
||||||
|
scheme: default
|
||||||
|
primary: blue grey
|
||||||
|
accent: cyan
|
||||||
|
toggle:
|
||||||
|
icon: octicons/sun-24
|
||||||
|
name: 'Switch to dark theme'
|
||||||
|
- media: '(prefers-color-scheme: dark)'
|
||||||
|
scheme: slate
|
||||||
|
primary: black
|
||||||
|
accent: cyan
|
||||||
|
toggle:
|
||||||
|
icon: octicons/moon-24
|
||||||
|
name: 'Switch to light theme'
|
||||||
|
features:
|
||||||
|
- navigation.indexes
|
||||||
|
- navigation.tabs
|
||||||
|
- navigation.tabs.sticky
|
||||||
|
- navigation.sections
|
||||||
|
- navigation.top
|
||||||
|
- content.tooltips
|
||||||
|
- content.code.copy
|
||||||
|
|
||||||
|
extra:
|
||||||
|
consent:
|
||||||
|
title: Cookie consent
|
||||||
|
description: >-
|
||||||
|
We use cookies to recognize your repeated visits and preferences, as well
|
||||||
|
as to measure the effectiveness of our wiki and whether users find what
|
||||||
|
they're searching for. With your consent, you're helping us to make our
|
||||||
|
wiki better.
|
||||||
|
actions:
|
||||||
|
- accept
|
||||||
|
- reject
|
||||||
|
- manage
|
||||||
|
social:
|
||||||
|
- icon: fontawesome/regular/paper-plane
|
||||||
|
link: https://hangar.papermc.io/HelpChat/PlaceholderAPI
|
||||||
|
- icon: simple/spigotmc
|
||||||
|
link: https://www.spigotmc.org/resources/6245/
|
||||||
|
- icon: simple/discord
|
||||||
|
link: https://discord.gg/helpchat
|
||||||
|
|
||||||
|
nav:
|
||||||
|
- index.md
|
||||||
|
- User Guides:
|
||||||
|
- users/index.md
|
||||||
|
- users/commands.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
|
||||||
|
- common-issues.md
|
||||||
|
- faq.md
|
||||||
|
- Discord: https://discord.gg/helpchat
|
||||||
|
|
||||||
|
extra_javascript:
|
||||||
|
- assets/js/latest-release.js
|
||||||
|
|
||||||
|
extra_css:
|
||||||
|
- assets/stylesheets/link-icons.css
|
||||||
|
- assets/stylesheets/styling.css
|
||||||
|
|
||||||
|
markdown_extensions:
|
||||||
|
- attr_list
|
||||||
|
- toc:
|
||||||
|
permalink: true
|
||||||
|
- meta
|
||||||
|
- md_in_html
|
||||||
|
- pymdownx.superfences
|
||||||
|
- pymdownx.magiclink:
|
||||||
|
repo_url_shortener: true
|
||||||
|
repo_url_shorthand: true
|
||||||
|
provider: github
|
||||||
|
user: PlaceholderAPI
|
||||||
|
repo: PlaceholderAPI
|
||||||
|
normalize_issue_symbols: true
|
||||||
|
- pymdownx.emoji:
|
||||||
|
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||||
|
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||||
|
- pymdownx.highlight
|
||||||
|
- pymdownx.inlinehilite
|
||||||
|
- pymdownx.blocks.admonition:
|
||||||
|
types:
|
||||||
|
- note
|
||||||
|
- abstract
|
||||||
|
- info
|
||||||
|
- tip
|
||||||
|
- success
|
||||||
|
- question
|
||||||
|
- warning
|
||||||
|
- failure
|
||||||
|
- danger
|
||||||
|
- bug
|
||||||
|
- example
|
||||||
|
- quote
|
||||||
|
- command
|
||||||
|
- integrated
|
||||||
|
- download
|
||||||
|
- pymdownx.blocks.details
|
||||||
|
- pymdownx.blocks.tab:
|
||||||
|
alternate_style: true
|
||||||
|
- pymdownx.tasklist
|