Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21e1a80e6a | ||
|
|
2728e92ff7 | ||
|
|
e91b86fa64 | ||
|
|
b6dd024cb9 | ||
|
|
f448d65ac4 | ||
|
|
d11ae7c3fa | ||
|
|
1d711b4339 | ||
|
|
08948254de | ||
|
|
a12948efb8 | ||
|
|
4f790bc4f9 | ||
|
|
48aea7b3d2 | ||
|
|
eb2f7841de | ||
|
|
a2c881827e | ||
|
|
094e38a43d | ||
|
|
96ce1c251d | ||
|
|
b5a29d394e | ||
|
|
780a5fe215 | ||
|
|
4f49882578 | ||
|
|
5f317651fb | ||
|
|
c14e139f5b | ||
|
|
cb8af15c70 | ||
|
|
b362bba11d | ||
|
|
a59062118f | ||
|
|
b8df12286f | ||
|
|
b195b24fe0 | ||
|
|
9caab36cb2 | ||
|
|
a4cfc6d074 | ||
|
|
c444813d22 | ||
|
|
4944690266 | ||
|
|
47f77d9453 | ||
|
|
065eaa8cfb | ||
|
|
930c83b477 | ||
|
|
ffa8ec59fb | ||
|
|
4e29e7eb8c | ||
|
|
d0abb3eed8 | ||
|
|
e608645cb3 | ||
|
|
d756868435 | ||
|
|
7cb734d079 | ||
|
|
08ebb0ad07 | ||
|
|
92fced56e1 | ||
|
|
72facb0d26 | ||
|
|
7fb6b2bb7a | ||
|
|
8c5101ec40 | ||
|
|
19106d8658 | ||
|
|
076c38a941 | ||
|
|
3cac859874 | ||
|
|
c07f413132 | ||
|
|
95af70ea63 | ||
|
|
2e242687b9 | ||
|
|
199cd2d3bd | ||
|
|
62f86bf32e | ||
|
|
116ad1d587 | ||
|
|
a1f1430663 | ||
|
|
b00269f19a | ||
|
|
4f07dc9dba | ||
|
|
ad30200672 | ||
|
|
b67aa012aa | ||
|
|
6efe3de477 | ||
|
|
10af5b1390 | ||
|
|
b8e02fcb3c | ||
|
|
db980587c7 | ||
|
|
3a126cdc18 | ||
|
|
4d553ca938 | ||
|
|
9011987ac6 | ||
|
|
6b6d1232ee | ||
|
|
7e84aece8a | ||
|
|
e2ac9e154c | ||
|
|
45af880ab4 | ||
|
|
188f153f19 | ||
|
|
2606c0e686 | ||
|
|
6e48d98811 | ||
|
|
c2c7e81ebf | ||
|
|
c3d57cc37b | ||
|
|
ae5f5d421e | ||
|
|
1a9b95bc0f | ||
|
|
10eb7a23aa | ||
|
|
3b8ae2c81c | ||
|
|
3a9484d3bb | ||
|
|
b028a31a54 | ||
|
|
acfd71d205 | ||
|
|
a9777dcf88 | ||
|
|
b8274ee6b1 | ||
|
|
94f43652ad | ||
|
|
e188fb1d71 | ||
|
|
0c80aaed29 | ||
|
|
48f659fae9 | ||
|
|
b1f51e4ec4 | ||
|
|
f6122d7fb8 | ||
|
|
2e82d5dacb | ||
|
|
ddd4a39da3 | ||
|
|
48fe046f72 | ||
|
|
dde5bc4c90 | ||
|
|
9d09114529 | ||
|
|
dd8519aed5 | ||
|
|
39098cbe37 | ||
|
|
e92731e6d4 | ||
|
|
36c36f56ae | ||
|
|
8b75029172 | ||
|
|
b366344b6c | ||
|
|
a009704d34 | ||
|
|
ab1300cd66 | ||
|
|
a793515c80 | ||
|
|
cad19fb923 | ||
|
|
053cfca971 | ||
|
|
4375779dfd | ||
|
|
ddf817e59a | ||
|
|
50a87277ba | ||
|
|
1b14d556f6 | ||
|
|
d88155a6c1 | ||
|
|
ec59f46c21 | ||
|
|
c86e51b580 | ||
|
|
91b6d615bf | ||
|
|
cf1e30bd0d | ||
|
|
9fd5f8510b | ||
|
|
47da56dfe1 | ||
|
|
a00c9cc3dd | ||
|
|
90908e30fe | ||
|
|
41e526969e | ||
|
|
5f4e6d16f2 | ||
|
|
b397a19e52 | ||
|
|
d978f3faee | ||
|
|
a9f87b074b | ||
|
|
18d5c8daba | ||
|
|
2340b20909 | ||
|
|
c53e17fb8b | ||
|
|
9e059af87c | ||
|
|
45d52d124f | ||
|
|
85665f1089 | ||
|
|
8c69b02fca | ||
|
|
9a96b7bb2d | ||
|
|
b2cb1447ce | ||
|
|
72110cacb3 | ||
|
|
48780dedbb | ||
|
|
8313755aa0 | ||
|
|
7538080806 | ||
|
|
bc00425d68 | ||
|
|
8673466ad0 | ||
|
|
39769506c2 | ||
|
|
5bc6f17ab5 | ||
|
|
b0e02d4755 | ||
|
|
13d1ae8336 | ||
|
|
d654cce5c1 | ||
|
|
6b78ec0da2 | ||
|
|
447ccd925c | ||
|
|
b3825b5c45 | ||
|
|
431e0234c2 | ||
|
|
589135a9f4 | ||
|
|
a32c6e4df0 | ||
|
|
bd6928414d | ||
|
|
27cee54915 | ||
|
|
51ea1b05c2 | ||
|
|
edea6c4e57 | ||
|
|
e9b682b723 | ||
|
|
a0c852bb91 | ||
|
|
913a305f8d | ||
|
|
b57dff68ac | ||
|
|
9341a10908 | ||
|
|
6e4da916ad | ||
|
|
ae237b27da | ||
|
|
db129a6fe3 | ||
|
|
46e4c54edb | ||
|
|
ce978189cd | ||
|
|
fabaf75c7b | ||
|
|
f6cafd8891 | ||
|
|
b7e19c200c | ||
|
|
14b89c12ad | ||
|
|
c399a82a74 | ||
|
|
d5e1c748be | ||
|
|
9604455d85 | ||
|
|
15df112cc3 | ||
|
|
ccc7a817f9 | ||
|
|
e3dd0b8978 | ||
|
|
46111c5ee2 | ||
|
|
66975ef0c6 | ||
|
|
bfda9d60ca | ||
|
|
d5746c80ea | ||
|
|
3a2ed3ba94 | ||
|
|
0103722292 | ||
|
|
f537bdd727 | ||
|
|
a480fa3292 | ||
|
|
b6a05c35f5 | ||
|
|
9b2eb78024 | ||
|
|
f703056080 | ||
|
|
846485bff3 | ||
|
|
7828df0d82 | ||
|
|
a591dbb0be | ||
|
|
1f7737511b | ||
|
|
c2ae367090 | ||
|
|
79b7bb4a4d | ||
|
|
794b09438d | ||
|
|
7e4271ddf2 | ||
|
|
b3a098ff6d | ||
|
|
a41cfc023c | ||
|
|
46ad4a3cf2 | ||
|
|
995be880ea | ||
|
|
f13391f317 | ||
|
|
3cf78290fe | ||
|
|
74a590ca1e | ||
|
|
e560cfb4ae | ||
|
|
1208c9ef4c | ||
|
|
f491963b85 | ||
|
|
ab718b3eb8 | ||
|
|
a084b207a6 | ||
|
|
d2b896f4de | ||
|
|
0eaaa6eb08 | ||
|
|
0c4d592ec5 | ||
|
|
27f3ce2254 | ||
|
|
45f7147270 | ||
|
|
47e255a58e | ||
|
|
23cb41f002 | ||
|
|
aa280421ae | ||
|
|
bb2a65eda8 | ||
|
|
86d2a81938 | ||
|
|
b3c551c22a | ||
|
|
d81ea94cdc | ||
|
|
4e1f03d231 | ||
|
|
f9ec9a2c80 | ||
|
|
be9accf81a | ||
|
|
3eb3686790 | ||
|
|
feeda4e95d | ||
|
|
47fc0cff3b | ||
|
|
d621120186 | ||
|
|
ef1dc4a9da | ||
|
|
5998c859d3 | ||
|
|
f910851acd | ||
|
|
6378037a70 | ||
|
|
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 | ||
|
|
92155c4ca5 | ||
|
|
d7186dada3 | ||
|
|
86855629c1 | ||
|
|
ad9fe5d90f | ||
|
|
17805ec067 | ||
|
|
16b5e925f1 | ||
|
|
f0f6d2fb87 | ||
|
|
860a08aab7 | ||
|
|
a051f77636 | ||
|
|
c6c687b15b | ||
|
|
cb9022ba59 | ||
|
|
a8801f11d2 | ||
|
|
0dde20ea30 | ||
|
|
722de1bb89 | ||
|
|
c2e417e024 | ||
|
|
e932af642b | ||
|
|
0361095dbc | ||
|
|
c7f87152b0 | ||
|
|
08c7223067 | ||
|
|
a142d84821 | ||
|
|
893b324921 | ||
|
|
f89dec729a | ||
|
|
02fe0e5f27 | ||
|
|
543d5e9fc7 | ||
|
|
2b9947f7c9 | ||
|
|
f94f6a7ba1 | ||
|
|
59c69a46ab | ||
|
|
2365d114f2 | ||
|
|
f67d54ef06 | ||
|
|
65f876e931 | ||
|
|
ac8bcf19d8 | ||
|
|
888cbde265 | ||
|
|
0e56d10688 | ||
|
|
e3b56f1790 | ||
|
|
b0c6652d9d | ||
|
|
c2bf9d1b4d | ||
|
|
84917d2584 | ||
|
|
7ea9e266d7 | ||
|
|
d90f7b4310 | ||
|
|
b7ea34ad46 | ||
|
|
7881e70f17 | ||
|
|
feb6c72926 | ||
|
|
898e08717c | ||
|
|
119ef740b4 | ||
|
|
28b08ce59d | ||
|
|
5213d1b515 | ||
|
|
ace77eb59d | ||
|
|
c4d6d917e0 | ||
|
|
3056325a9d | ||
|
|
d3953ab0f1 | ||
|
|
08f124a618 | ||
|
|
55e7f0962c | ||
|
|
a567caabf1 | ||
|
|
7414f0d0d3 | ||
|
|
165f91bf9a | ||
|
|
2dfcd03423 | ||
|
|
af7859bf32 | ||
|
|
f40f902cfb | ||
|
|
e19db2c9fd | ||
|
|
a5fe76a427 | ||
|
|
8243b021c9 | ||
|
|
bee987d1f8 | ||
|
|
5edf1afbd5 | ||
|
|
9a8306bac1 | ||
|
|
06aa2abdcb | ||
|
|
d8d0b2ca79 | ||
|
|
eca6d70cf9 | ||
|
|
62d3d96c68 | ||
|
|
018a8c0a99 | ||
|
|
6b5b6065d2 | ||
|
|
1ab31c976f | ||
|
|
8a3673b604 | ||
|
|
acb9361431 | ||
|
|
5aa8942ec8 | ||
|
|
b6fa09e09d | ||
|
|
0157965576 | ||
|
|
e643766146 | ||
|
|
993a50b812 | ||
|
|
95bfc5c8cf | ||
|
|
bea51deb63 | ||
|
|
3530e1e4bb | ||
|
|
4b3f1c144f | ||
|
|
06d7ff9b48 | ||
|
|
4b275370d8 | ||
|
|
7cc0548c40 | ||
|
|
8e9dedf3da | ||
|
|
6f649678e7 | ||
|
|
04d122d059 | ||
|
|
b375c70e22 | ||
|
|
9d9e0e4def | ||
|
|
1bb3159ef7 | ||
|
|
547bd7942e | ||
|
|
119b669ef6 | ||
|
|
dc5ff8fc40 | ||
|
|
cd9c61635e | ||
|
|
2db2d234b3 | ||
|
|
9a2274ff09 | ||
|
|
44dfbf4ed4 | ||
|
|
0c08f1c886 | ||
|
|
2683695839 | ||
|
|
6523387184 | ||
|
|
3d364564ee | ||
|
|
08faf19c66 | ||
|
|
c9ec805140 | ||
|
|
3efcb060d7 | ||
|
|
3683059342 | ||
|
|
ae0a12db5a | ||
|
|
284958c314 | ||
|
|
7676fb5edb | ||
|
|
d34789cf5e | ||
|
|
24e3720931 | ||
|
|
39e4581820 | ||
|
|
f355e66d5a | ||
|
|
785928d00a | ||
|
|
85bca0f7a4 | ||
|
|
e1085b48e9 | ||
|
|
17417cec1a | ||
|
|
eedebf09a3 | ||
|
|
4aa88aea50 | ||
|
|
9c5a50aa12 | ||
|
|
8b9000ff62 | ||
|
|
d97bdd57ef | ||
|
|
e8d3addbdb | ||
|
|
fafe011a78 | ||
|
|
816be42c32 | ||
|
|
67a44c2378 | ||
|
|
ed5b58795e | ||
|
|
30cbf9e63d |
No files matched your search
@@ -0,0 +1,66 @@
|
||||
#
|
||||
# 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'
|
||||
paths:
|
||||
- ".theme/**"
|
||||
- "docs/**"
|
||||
- "mkdocs.yml"
|
||||
#
|
||||
# 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
|
||||
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# Validates Pull requests targeting the wiki branch
|
||||
# to ensure that the site can be build successfully
|
||||
# without broken links, navigation, etc.
|
||||
#
|
||||
name: "Validate Wiki Build"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
paths-ignore:
|
||||
- "README.md"
|
||||
branches:
|
||||
- wiki
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}"
|
||||
|
||||
jobs:
|
||||
buildWiki:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Repository"
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: "${{ github.event.pull_request.head.sha }}"
|
||||
persist-credentials: false
|
||||
- name: "Setup Python 3.x"
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: "Install dependencies"
|
||||
run: "python -m pip install mkdocs-material"
|
||||
- name: "Build Site"
|
||||
run: "mkdocs build --strict"
|
||||
@@ -1,6 +0,0 @@
|
||||
.idea/
|
||||
.gradle/
|
||||
server/
|
||||
build/
|
||||
out/
|
||||
*.iml
|
||||
@@ -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 %}
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="md-copyright">
|
||||
<div class="md-copyright__highlight">
|
||||
© 2015 - 2025 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>
|
||||
@@ -0,0 +1,232 @@
|
||||
# PlaceholderAPI Wiki
|
||||
|
||||
Welcome on the Wiki branch!
|
||||
|
||||
This branch is home of the [PlaceholderAPI Wiki's][wiki] source.
|
||||
It allows us to properly manage the wiki and it allows you to contribute changes to it.
|
||||
|
||||
## Contributing to the Wiki
|
||||
|
||||
Contributions to the wiki are always welcome, granted they follow specific rules and guidelines to ensure a consistent styling across all pages.
|
||||
Please read this readme file carefully, as it contains important information on how you contribute to the wiki and what to look out for.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
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.
|
||||
If you have questions about any of those, do not hesitate to ask. We will try to assist you as good as we can.
|
||||
|
||||
Before you now start working on the wiki should make sure that the following has been done already:
|
||||
|
||||
- You installed and configured Git.
|
||||
- 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.
|
||||
|
||||
Should the above be completed can we start with the process of contributing to this wiki.
|
||||
|
||||
### 1. Fork the Repository
|
||||
|
||||
> **Already have a fork?** Skip to the [next step!](#2-switch-target-branch)
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
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.
|
||||
Doing so will show you a box with one of two possible messages:
|
||||
|
||||
- ``This branch is not behind the upstream `PlaceholderAPI/PlaceholderAPI:wiki`.``
|
||||
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 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.
|
||||

|
||||
|
||||
### 4. Clone to a local Repository
|
||||
|
||||
It is recommended to clone your fork to your PC to utilize tools such as MkDocs' live-preview to see the changes made.
|
||||
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.
|
||||
|
||||
You should now navigate into your cloned repository in the git-bash console using `cd PlaceholderAPI`.
|
||||
|
||||
### 5. Create a new branch (Recommended)
|
||||
|
||||
This step is optional, but recommended to keep the main wiki branch clean from any changes, which avoids possible merge conflicts in the future.
|
||||
|
||||
To create a new branch, execute the command below (Replace `<branch>` with the branch name you want to use):
|
||||
```sh
|
||||
$ git checkout -b <branch>
|
||||
```
|
||||
|
||||
> [!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.
|
||||
|
||||
### 6. Make your changes
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
#### Markdown Formatting Rules
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Please also see the [Wiki Structure](#wiki-structure) section for more details on the formatting!
|
||||
|
||||
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.
|
||||
|
||||
Here are some noteworthy points:
|
||||
|
||||
- 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.
|
||||
- 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.
|
||||
|
||||
In addition are extensions used to further enhance the default markdown formatting with additional features. Such features include:
|
||||
|
||||
- Admonition blocks (Also known as callouts. [[Documentation][admo-docs]])
|
||||
- Details (`<details>` HTML tag. [[Documentation][details-docs]])
|
||||
- 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/
|
||||
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
@@ -0,0 +1 @@
|
||||
wiki.placeholderapi.com
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 537 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,40 @@
|
||||
document$.subscribe(async => {
|
||||
const api_code = document.querySelectorAll('[data-md-component="api-version"]');
|
||||
|
||||
function loadAPIInfo(data) {
|
||||
const mcVersion = data["mcVersion"];
|
||||
const hyVersion = data["hyVersion"];
|
||||
|
||||
const mcVersionToken = "{papiVersion}";
|
||||
const hyVersionToken = "{papiHytaleVersion}"
|
||||
for (const codeBlock of api_code) {
|
||||
codeBlock.innerHTML = codeBlock.innerHTML
|
||||
.replace(new RegExp(mcVersionToken, 'g'), mcVersion)
|
||||
.replace(new RegExp(hyVersionToken, 'g'), hyVersion);
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchAPIInfo() {
|
||||
const [mcRelease, hyRelease] = await Promise.all([
|
||||
fetch("https://repo.extendedclip.com/api/maven/latest/version/releases/me/clip/placeholderapi").then(_ => _.json()),
|
||||
fetch("https://repo.helpch.at/api/maven/latest/version/releases/at/helpch/placeholderapi-hytale").then(_ => _.json())
|
||||
])
|
||||
|
||||
const data = {
|
||||
"mcVersion": mcRelease.version,
|
||||
"hyVersion": hyRelease.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["mcVersion"])) {
|
||||
loadAPIInfo(cachedApi);
|
||||
} else {
|
||||
fetchAPIInfo();
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -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"}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
description: How to create configurable expansions in Hytale.
|
||||
---
|
||||
|
||||
# Hytale's Configurable<T> Interface
|
||||
|
||||
Unlike in spigot, in Hytale PAPI does not forward through Hytale's configuration API and instead implements its own. Effectively you'll be required to create a class representing your configuration section in PlaceholderAPI's main config.yml, and PAPI will handle the rest.
|
||||
|
||||
## Create Your Config Class
|
||||
|
||||
```java { .annotate title="CoolExpansionConfig.java" }
|
||||
public final class CoolExpansionConfig {
|
||||
private String test;
|
||||
private String dateFormat;
|
||||
|
||||
public CoolExpansionConfig(String test, String dateFormat) {
|
||||
this.test = test;
|
||||
this.dateFormat = dateFormat;
|
||||
}
|
||||
|
||||
public String test() {
|
||||
return test;
|
||||
}
|
||||
|
||||
public String dateFormat() {
|
||||
return dateFormat;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Your config class needs to represent your config structure exactly. The only difference is in naming, in the above example, dateFormat will be converted to snake case (date_format) when reading the yaml. The above class will look like this in PAPI's config:
|
||||
|
||||
```yaml { .annotate title="HelpChat_PlaceholderAPI/config.yml" }
|
||||
expansions:
|
||||
coolexpansion:
|
||||
test: wew
|
||||
date_format: "dd/mm/yyyy"
|
||||
```
|
||||
|
||||
## Using Your Config Class
|
||||
|
||||
Once created, we need to tell PAPI about it. In your PlaceholderExpansion class, implement `Configurable<CoolExpansionConfig>`, you'll then need to also implement the 2 required methods.
|
||||
|
||||
```java { .annotate title="CoolExpansion.java" }
|
||||
public final class CoolExpansion extends PlaceholderExpansion implements Configurable<CoolExpansionConfig> {
|
||||
@Override
|
||||
public Class<CoolExpansionConfig> provideConfigType() {
|
||||
return CoolExpansionConfig.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CoolExpansionConfig provideDefault() {
|
||||
return new CoolExpansionConfig("wew", "dd/mm/yyyy");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onPlaceholderRequest(PlayerRef player, String params) {
|
||||
final CoolExpansionConfig config = getExpansionConfig(CoolExpansion.class);
|
||||
|
||||
return switch(params) {
|
||||
case "test" -> config.test();
|
||||
case "date_format" -> config.dateFormat();
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
That's pretty much it. PAPI will generate the default yaml from the values you provide in `provideDefault()` and write it to the PAPI config, then whenever your expansion starts it'll read the values from the config and put them into a CoolExpansionConfig object accessible via `PlaceholderExpansion<T>.getExpansionConfig(Class<T extends Configurable<T>>)`
|
||||
@@ -0,0 +1,566 @@
|
||||
---
|
||||
description: Comprehensive guide on how to create a PlaceholderExpansion for other plugins to use through PlaceholderAPI.
|
||||
---
|
||||
|
||||
# Creating a PlaceholderExpansion
|
||||
|
||||
/// warning | Important
|
||||
These pages cover the creation of a PlaceholderExpansion for both Spigot/Paper-based and Hytale Servers!
|
||||
|
||||
Unless mentioned otherwise the provided code examples function for both platform types.
|
||||
Please always check code blocks for :material-plus-circle: Icons with additional info!
|
||||
///
|
||||
|
||||
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
|
||||
@NotNull
|
||||
public String getAuthor() {
|
||||
return "Author"; // (1)
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String getIdentifier() {
|
||||
return "example"; // (2)
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String getVersion() {
|
||||
return "1.0.0"; // (3)
|
||||
}
|
||||
|
||||
// These methods aren't overriden by default.
|
||||
// You have to override one of them.
|
||||
|
||||
@Override
|
||||
public String onRequest(OfflinePlayer player, @NotNull String params) {
|
||||
// (4)
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onPlaceholderRequest(Player player, @NotNull String params) {
|
||||
// (5)
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onPlaceholderRequest(PlayerRef player, @NotNull String params) {
|
||||
// (6)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
1. This method allows you to set the name of the expansion's author. May not be null.
|
||||
|
||||
2. The identifier is the part in the placeholder that is between the first `%` (or `{` for bracket placeholders) and the first `_`.
|
||||
The identifier may not be null nor 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. May not be null.
|
||||
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.
|
||||
|
||||
4. Called by PlaceholderAPI to have placeholder values parsed.
|
||||
When not overriden will call `onPlaceholderRequest(Player, String)`, converting the OfflinePlayer to a Player if possible or else providing `null`.
|
||||
|
||||
Using this method is recommended for the usage of the OfflinePlayer, allowing to use data from a player without their presence being required.
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `player` - Nullable OfflinePlayer instance to parse placeholders against.
|
||||
- `params` - Non-null String representing the part of the placeholder after the first `_` and before the closing `%` (or `}` for bracket placeholders).
|
||||
|
||||
5. Called by PlaceholderAPI through `onRequest(OfflinePlayer, String)` to have placeholder values parsed.
|
||||
When not overriden will return `null`, which PlaceholderAPI will understand as an invalid Placeholder.
|
||||
|
||||
**Parameters**:
|
||||
|
||||
- `player` - Nullable Player instance to parse placeholders against.
|
||||
- `params` - Non-null String representing the part of the placeholder after the first `_` and before the closing `%` (or `}` for bracket placeholders).
|
||||
|
||||
6. **Note:** Only exists for the Hytale Version of PlaceholderAPI!
|
||||
|
||||
Called by PlaceholderAPI through `onPlaceholderRequest(PlayerRef, String)` to have placeholder values parsed.
|
||||
When `null` is returned will PlaceholderAPI treat it as invalid placeholder and return it unchanged.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
- `player` - PlayerRef instance to parse placeholders against.
|
||||
- `params` - Non-null String representing the part of the placeholder after the first `_` and before the closing `%` (or `}` for bracket placeholders).
|
||||
|
||||
/// note
|
||||
Overriding `onRequest(OfflinePlayer, String)` or `onPlaceholderRequest(Player, String)` is not required if you [create relational placeholders](#making-a-relational-expansion).
|
||||
///
|
||||
|
||||
----
|
||||
|
||||
## 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 | Important Notes
|
||||
- Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
|
||||
- The below example is for a Spigot/Paper-based setup.
|
||||
For a Hytale server, replace `me.clip` imports with `at.helpch` and replace `OfflinePlayer` with `PlayerRef` (Including the import).
|
||||
|
||||
Tab the :material-plus-circle: icons in the code block below for additional information.
|
||||
////
|
||||
|
||||
```java { .annotate title="SomeExpansion.java" }
|
||||
package com.example.plugin.expansion;
|
||||
|
||||
import com.example.plugin.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:
|
||||
|
||||
/// tab | Spigot, Paper, ...
|
||||
|
||||
```java { .annotate title="SomePlugin.java" }
|
||||
package com.example.plugin;
|
||||
|
||||
import com.example.plugin.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.
|
||||
|
||||
///
|
||||
|
||||
/// tab | Hytale
|
||||
|
||||
```java { .annotate title="SomePlugin.java" }
|
||||
package com.example.plugin;
|
||||
|
||||
import com.example.plugin.expansion.SomeExpansion;
|
||||
import com.hypixel.hytale.server.core.plugin.JavaPlugin;
|
||||
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
|
||||
import com.hypixel.hytale.common.plugin.PluginIdentifier;
|
||||
import com.hypixel.hytale.server.core.HytaleServer;
|
||||
|
||||
|
||||
public class SomePlugin extends JavaPlugin {
|
||||
|
||||
public SomePlugin(JavaPluginInit init) {
|
||||
super(init)
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void start() {
|
||||
if (HytaleServer.get().getPluginManager().getPlugin(PluginIdentifier.fromString("HelpChat:PlaceholderAPI")) != null) {
|
||||
new SomeExpansion(this).register();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
///
|
||||
|
||||
----
|
||||
|
||||
## 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 | Important Notes
|
||||
- Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
|
||||
- The below example is for a Spigot/Paper-based setup.
|
||||
For a Hytale server, replace `me.clip` imports with `at.helpch` and replace `OfflinePlayer` with `PlayerRef` (Including the import).
|
||||
|
||||
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 com.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 | Important Notes
|
||||
- Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
|
||||
- The below example is for a Spigot/Paper-based setup.
|
||||
For a Hytale server, replace `me.clip` imports with `at.helpch` and replace `OfflinePlayer` with `PlayerRef` (Including the import).
|
||||
|
||||
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 com.example.expansion;
|
||||
|
||||
import com.example.plugin.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. **Note:** This only works on a Spigot/Paper-based server. A equivalent for Hytale servers is not yet known.
|
||||
|
||||
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 | Notes
|
||||
- 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%`.
|
||||
- For Hytale, replace any mention of `Player` with `PlayerRef` and update any Imports in the code to `at.helpch` and related Hytale ones.
|
||||
///
|
||||
|
||||
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
|
||||
@@ -0,0 +1,96 @@
|
||||
---
|
||||
description: Information about PlaceholderAPI's expansion cloud, including how to submit your own expansion or update it.
|
||||
---
|
||||
|
||||
# eCloud
|
||||
|
||||
## 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.
|
||||
|
||||
The expansion-cloud can be seen under https://ecloud.placeholderapi.com
|
||||
|
||||
## 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.
|
||||
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
|
||||
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.
|
||||
|
||||
## Adding your own expansion
|
||||
|
||||
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:
|
||||
|
||||
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.
|
||||
3. Click on `Expansions` and then on [`Upload New`](https://ecloud.placeholderapi.com/expansions/new/).
|
||||
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.
|
||||
|
||||
/// 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`
|
||||
|
||||
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*.
|
||||
|
||||
/// info | Note for Hosts
|
||||
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
|
||||
|
||||
Before you update, please note the following:
|
||||
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.
|
||||
|
||||
To update your expansion, you first have to go to the list of [your expansions](https://ecloud.placeholderapi.com/expansions/manage/).
|
||||
For that click on `Expansions` and select `Your Expansions`.
|
||||
After that, follow those steps:
|
||||
|
||||
1. Click the name of the expansion, that you want to update.
|
||||
2. Click on the button that says `Version`
|
||||
3. Click on `Add Version`
|
||||
4. Fill out the fields and upload the new jar.
|
||||
|
||||
/// 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`
|
||||
|
||||
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.
|
||||
|
||||
## Downloading a specific expansion 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.
|
||||
Here is how you can do it for each.
|
||||
|
||||
### Download with PlaceholderAPI
|
||||
|
||||
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:
|
||||
[`/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>`](../users/commands.md#papi-ecloud-info).
|
||||
|
||||
After you downloaded the specific version, run [`/papi reload`](../users/commands.md#papi-reload) to refresh the installed expansions.
|
||||
|
||||
### Download manually
|
||||
|
||||
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.
|
||||
|
||||
Finally, stop your server, upload the jar to the folder in `/plugins/PlaceholderAPI/expansions` (Make sure to delete the old jar, if there's already one) and start the server again.
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
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)
|
||||
|
||||
- ### Using the Hytale Configuration API
|
||||
|
||||
----
|
||||
|
||||
How to create a configurable expansion for Hytale
|
||||
|
||||
- [:octicons-chevron-right-16: Go to Page](configuration-api-hytale.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>
|
||||
@@ -0,0 +1,391 @@
|
||||
---
|
||||
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 (1.0.0 for Hytale version) or newer**!
|
||||
|
||||
## First steps
|
||||
|
||||
### Add PlaceholderAPI to your Project
|
||||
|
||||
Before you can actually make use of PlaceholderAPI, you first have to import it into your project.
|
||||
Use the below code example matching your project type and dependency manager.
|
||||
|
||||
/// tab | Minecraft (Spigot, Paper, ...)
|
||||
//// tab | :simple-apachemaven: Maven
|
||||
```{ .xml title="pom.xml" data-md-component="api-version" }
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>placeholderapi</id>
|
||||
<url>https://repo.helpch.at/releases/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
<version>{papiVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
////
|
||||
|
||||
//// 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:{papiVersion}'
|
||||
}
|
||||
```
|
||||
////
|
||||
///
|
||||
|
||||
/// tab | Hytale
|
||||
//// tab | :simple-apachemaven: Maven
|
||||
```{ .xml title="pom.xml" data-md-component="api-version" }
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>hytale</id>
|
||||
<url>https://repo.codemc.io/repository/hytale/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>placeholderapi</id>
|
||||
<url>https://repo.helpch.at/releases/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<!-- Replace {hytaleVersion} with the version you need -->
|
||||
<groupId>com.hypixel.hytale</groupId>
|
||||
<artifactId>Server</artifactId>
|
||||
<version>{hytaleVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>at.helpch</groupId>
|
||||
<artifactId>placeholderapi-hytale</artifactId>
|
||||
<version>{papiHytaleVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
////
|
||||
|
||||
//// tab | :simple-gradle: Gradle
|
||||
```{ .groovy title="build.gradle" data-md-component="api-version" }
|
||||
repositories {
|
||||
maven {
|
||||
url = 'https://repo.codemc.io/repository/hytale/'
|
||||
}
|
||||
maven {
|
||||
url = 'https://repo.helpch.at/releases/'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Replace {hytaleVersion} with the version you need.
|
||||
compileOnly 'com.hypixel.hytale:Server:{hytaleVersion}'
|
||||
compileOnly 'at.helpch:placeholderapi-hytale:{papiHytaleVersion}'
|
||||
}
|
||||
```
|
||||
////
|
||||
///
|
||||
|
||||
/// details | What is `{papiVersion}`/`{papiHytaleVersion}`?
|
||||
type: question
|
||||
|
||||
Using Javascript, `{papiVersion}` and `{papiHytaleVersion}` is replaced with the latest available API version of PlaceholderAPI for Minecraft and Hytale respectively.
|
||||
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: com.example.plugin.ExamplePlugin
|
||||
|
||||
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: com.example.plugin.ExamplePlugin
|
||||
|
||||
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: com.example.plugin.ExamplePlugin
|
||||
|
||||
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: com.example.plugin.ExamplePlugin
|
||||
|
||||
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.
|
||||
////
|
||||
|
||||
///
|
||||
|
||||
/// tab | manifest.json (Hytale)
|
||||
|
||||
//// tab | Optional dependency
|
||||
|
||||
```{ .json .annotate title="manifest.json" }
|
||||
{
|
||||
"Group": "com.example",
|
||||
"Name": "ExamplePlugin",
|
||||
"Version": "1.0",
|
||||
"Main": "com.example.plugin.ExamplePlugin",
|
||||
"OptionalDependencies": {
|
||||
"HelpChat:PlaceholderAPI": ">=1.0.8"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
////
|
||||
|
||||
//// tab | Required dependency
|
||||
|
||||
```{ .json .annotate title="manifest.json" }
|
||||
{
|
||||
"Group": "com.example",
|
||||
"Name": "ExamplePlugin",
|
||||
"Version": "1.0",
|
||||
"Main": "com.example.plugin.ExamplePlugin",
|
||||
"Dependencies": {
|
||||
"HelpChat:PlaceholderAPI": ">=1.0.8"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
////
|
||||
|
||||
///
|
||||
|
||||
## 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 your own plugin, you 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).
|
||||
|
||||
/// info | New since 2.12.0
|
||||
Starting with version 2.12.0 is it now possible to provide Components from the Adventure library to have placeholders parsed in.
|
||||
|
||||
In order to use this new feature are the following things required to be true:
|
||||
|
||||
- Your plugin runs on a Paper-based Server. Spigot-based servers will not work!
|
||||
- You use `PAPIComponent` instead of `PlaceholderAPI` to parse Components.
|
||||
///
|
||||
|
||||
/// tab | Spigot, Paper, ...
|
||||
|
||||
The following is an example plugin that sends `%player_name% joined the server! They are rank %vault_rank%` as the Join message, having the placeholders be replaced by PlaceholderAPI.
|
||||
|
||||
//// 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 com.example.plugin;
|
||||
|
||||
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`
|
||||
|
||||
//// info | New since 2.12.0
|
||||
Using `placeholderapi-papi` and `PAPIComponents` instead of `PlaceholderAPI` allows you to parse placeholders inside Adventure Components.
|
||||
////
|
||||
///
|
||||
|
||||
/// tab | Hytale
|
||||
|
||||
The following is an example plugin that modifies the chat to include a format before player messages. It relies on the [Player Expansion](https://ecloud.placeholderapi.com/expansions/player-hytale/), [Luckperms Expansion](https://ecloud.placeholderapi.com/expansions/luckperms-hytale/), and [HyFaction Expansion](https://ecloud.placeholderapi.com/expansions/hyfaction/).
|
||||
|
||||
//// info | Thread Safety Warning
|
||||
Due to Hytale's api design, certain components can only be accessed by specific threads. For full compatibility with placeholderapi, you need to call setPlaceholders on the world thread the player is in. `player.getWorld().execute(() -> )`
|
||||
By default for player commands, you're already going to be on the world thread so it's not so much of an issue, but you do need to consider it if you're trying to do async work and then call PAPI, e.g. async player chat.
|
||||
////
|
||||
|
||||
``` { .java .annotate title="ChatExample.java" }
|
||||
packate com.example.plugin;
|
||||
|
||||
import at.helpch.placeholderapi.PlaceholderAPI;
|
||||
|
||||
import com.hypixel.hytale.server.core.event.events.player.PlayerChatEvent;
|
||||
import com.hypixel.hytale.server.core.Message;
|
||||
import com.hypixel.hytale.server.core.plugin.JavaPlugin;
|
||||
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
|
||||
import com.hypixel.hytale.server.core.universe.PlayerRef;
|
||||
import com.hypixel.hytale.server.core.universe.Universe;
|
||||
import com.hypixel.hytale.server.core.universe.world.World;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class ChatExample extends JavaPlugin {
|
||||
private static final String FORMAT = "%rel_factions_relation% [%luckperms_prefix%] %player_name% > "
|
||||
|
||||
public ChatExample(JavaPluginInit init) {
|
||||
super(init)
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setup() {
|
||||
// (1)
|
||||
getEventRegistry().registerGlobal(PlayerChatEvent.class, this::onPlayerChat));
|
||||
}
|
||||
|
||||
public void onPlayerChat(PlayerChatEvent event) {
|
||||
// (2)
|
||||
PlayerRef sender = event.getSender();
|
||||
final UUID worldUuid = sender.getWorldUuid();
|
||||
|
||||
if (worldUuid == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final World world = Universe.get().getWorld(worldUuid);
|
||||
|
||||
if (world == null) {
|
||||
return;
|
||||
} else {
|
||||
event.setCancelled(true); // cancel event and run our own sending logic
|
||||
// call your own chat event perhaps?
|
||||
// HytaleServer.get().getEventBus().dispatchForAsync(CustomChatEvent.class);
|
||||
}
|
||||
|
||||
world.execute(() -> {
|
||||
String replacedFormat = PlaceholderAPI.setPlaceholders(sender, FORMAT);
|
||||
for (PlayerRef recipient : event.getTargets()) {
|
||||
recipient.sendMessage(Message.raw(PlaceholderAPI.setRelationalPlaceholders(sender, recipient, replacedFormat) + event.getContent()));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
1. We tell the server to call `onPlayerChat` whenever a `PlayerChatEvent` fires.
|
||||
2. PlaceholderAPI offers multiple `setPlaceholders` methods that can either return a `String` or a `Message` object, depending on your needs.
|
||||
Note that these methods require input of the same type: `setPlaceholders(PlayerRef, String)` for String and `setPlaceholders(PlayerRef, Message)` for Messages.
|
||||
|
||||
///
|
||||
@@ -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/index.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/index.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/index.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
|
||||
@@ -0,0 +1,55 @@
|
||||
# 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/index.md)
|
||||
- [:octicons-chevron-right-16: Plugins using PlaceholderAPI](users/plugins-using-placeholderapi/index.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: Using the Hytale Configuration API](developers/configuration-api-hytale.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: Common Issues](issues/index.md)
|
||||
- [:octicons-chevron-right-16: eCloud connection blocked](issues/ecloud-block.md)
|
||||
|
||||
- ### :material-chat-question: FAQ
|
||||
|
||||
----
|
||||
|
||||
Frequently Asked Questions and their answers.
|
||||
|
||||
- [:octicons-chevron-right-16: Go to Page](faq.md)
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
description: Fixing blocked connections to the PlaceholderAPI Expansion Cloud (eCloud).
|
||||
---
|
||||
|
||||
# eCloud connection blocked
|
||||
|
||||
If you cannot download expansions via PlaceholderAPI, your server may be unable to reach the PlaceholderAPI Expansion Cloud (eCloud). This is usually caused by a network restriction by your host, firewall, or ISP.
|
||||
|
||||
## Symptoms
|
||||
|
||||
Common signs include:
|
||||
|
||||
- You were directed to this page via an in-game message.
|
||||
- `/papi ecloud download/update <expansion>` fails (timeouts, errors, connection refused, or similar).
|
||||
|
||||
## Why it happens
|
||||
|
||||
The download command requires outbound HTTPS access from your server to PlaceholderAPI’s eCloud API. Connections can be blocked by:
|
||||
|
||||
- Your server host’s firewall / security policy
|
||||
- A local firewall on the machine
|
||||
- A network firewall (datacenter, router)
|
||||
- DNS filtering or an ISP block
|
||||
|
||||
## Domains PlaceholderAPI uses
|
||||
|
||||
Allow outbound HTTPS (TCP 443) to these domains:
|
||||
|
||||
- PlaceholderAPI **< 2.12.0** uses `api.extendedclip.com`
|
||||
- PlaceholderAPI **>= 2.12.0** uses `*.placeholderapi.com`
|
||||
|
||||
## Fix options
|
||||
|
||||
### 1) Ask your host to unblock the eCloud
|
||||
|
||||
If you use shared hosting or a managed host, you may not be able to change firewall rules yourself. Contact your host and ask them to allow outbound HTTPS requests to the domains listed above.
|
||||
|
||||
### 2) Check firewalls / filters you control
|
||||
|
||||
If you manage your own server, check any outbound filtering:
|
||||
|
||||
- OS firewall rules (Windows Firewall / `ufw` / `iptables`)
|
||||
- Router/datacenter firewall rules
|
||||
- DNS filtering
|
||||
|
||||
### 3) Manually install expansions (works even if the eCloud is blocked)
|
||||
|
||||
If unblocking is not an option, you can download expansions manually:
|
||||
|
||||
1. Go to https://ecloud.placeholderapi.com/
|
||||
2. Open the expansion you want.
|
||||
3. Download the `.jar`.
|
||||
4. Put it into your server’s `plugins/PlaceholderAPI/expansions/` folder.
|
||||
5. Run [`/papi reload`](../users/commands.md#papi-reload) (or restart the server).
|
||||
|
||||
## Quick connectivity checks (optional)
|
||||
|
||||
If you have access to the machine running the server, these checks from a terminal or command prompt can help confirm a block.
|
||||
|
||||
```bash
|
||||
curl -I https://ecloud.placeholderapi.com/api/v3/
|
||||
curl -I https://api.extendedclip.com/v2/
|
||||
```
|
||||
|
||||
If these commands fail on the server but work on your own PC/network, the server host or datacenter network is most likely blocking outbound connections.
|
||||
|
||||
## Still stuck?
|
||||
|
||||
If you need help, join the [Discord Server](https://discord.gg/helpchat) and share:
|
||||
|
||||
- What you've tried
|
||||
- The full console error from the download attempt
|
||||
- The link provided by `/papi dump`
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
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.
|
||||
|
||||
If you have more questions, feel free to join the [Discord Server](https://discord.gg/helpchat).
|
||||
|
||||
## eCloud download fails / blocked connection
|
||||
|
||||
If your host or network blocks outgoing connections to the Expansion Cloud (eCloud), PlaceholderAPI will be unable to download expansions.
|
||||
|
||||
See: [eCloud connection blocked](ecloud-block.md)
|
||||
|
||||
## `java.lang.NoClassDefFoundError: com/google/gson/Gson`
|
||||
|
||||
If you encounter an issue such as
|
||||
|
||||
```
|
||||
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: com/google/gson/Gson
|
||||
```
|
||||
|
||||
does it mean that the Server you're using PlaceholderAPI on does not have Gson included.
|
||||
This is often the case for servers running 1.8 or older. To fix this, make sure to use at least 1.8.8 as that version does include the required dependency.
|
||||
|
||||
## Expansions won't work
|
||||
|
||||
If one or multiple expansions don't work, make sure you checked the following:
|
||||
|
||||
- You executed `/papi reload` after downloading the expansion(s).
|
||||
- Any required plugin is installed and enabled.
|
||||
- The expansion is valid (See next sections).
|
||||
|
||||
## `Failed to load expansion class <expansion> ...`
|
||||
|
||||
### `- One of its properties is null which is not allowed`
|
||||
|
||||
When this error appears does it mean that either `getAuthor()`, `getIdentifier()` or `getVersion()` in the expansion return `null` which is not allowed.
|
||||
In such a case, contact the developer of the expansion and inform them about this issue and that it should be fixed.
|
||||
|
||||
### `(Is a dependency missing?)`
|
||||
|
||||
This error is given whenever the expansion cannot be loaded, which often happens due to a missing dependency (required plugin) or because creating an expansion instance failed.
|
||||
|
||||
The only thing you can do is to provide the full error so that we can check if the issue is caused by PlaceholderAPI (More unlikely) or by the expansion.
|
||||
|
||||
## Some player placeholders aren't working on Hytale
|
||||
|
||||
Due to Hytale's concurrency setup and PlaceholderAPI design choices, certain player placeholders require a particular parsing implementation on the dev side. If you're a plugin user and placeholders like %player_health% aren't working, but work fine when using `/papi parse me %player_health%`, chances are the plugin you're using has incorrectly implemented PlaceholderAPI support.
|
||||
|
||||
To access certain player data, placeholders need to be parsed in the world thread of the player.
|
||||
|
||||
```java
|
||||
final World world = player.getWorld();
|
||||
world.execute(() -> {
|
||||
PlaceholderAPI.setPlaceholders(/* set placeholders here */);
|
||||
})
|
||||
```
|
||||
@@ -0,0 +1,324 @@
|
||||
---
|
||||
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> <text>`](#papi-bcparse)
|
||||
- [`/papi cmdparse <player|me|--null> <text>`](#papi-cmdparse)
|
||||
- [`/papi parse <player|me|--null> <text>`](#papi-parse)
|
||||
- [`/papi parserel <player|me> <player|me> <text>`](#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>` - Text with placeholders 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)).
|
||||
- `<text>` - Text with placeholders to parse and execute as command (Don't include the `/` for 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>` - Text with placeholders to parse.
|
||||
|
||||
**Example**:
|
||||
```
|
||||
/papi parse funnycube My group is %vault_group%
|
||||
```
|
||||
///
|
||||
|
||||
#### `/papi parserel`
|
||||
|
||||
/// info |
|
||||
**Description**:
|
||||
Parses a relational placeholder.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `<player1|me>` - The first player (Use `me` for yourself).
|
||||
- `<player2|me>` - the second player to compare with (Use `me` for yourself).
|
||||
- `<text>` - Text with placeholders 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).
|
||||
Only executing `/papi ecloud` without any arguments will list all commands available for it.
|
||||
|
||||
#### `/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.
|
||||
///
|
||||
@@ -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 lists of available Placeholder Expansions and their placeholders for the Minecraft and Hytale versions of PlaceholderAPI.
|
||||
|
||||
- [:octicons-chevron-right-16: Go to Page](placeholder-list/index.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/index.md)
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,20 @@
|
||||
# Placeholder List
|
||||
|
||||
PlaceholderAPI is home of countless community-made Placeholder Expansions.
|
||||
To help you find the expansion you need, we are providing official placeholder lists that include available PlaceholderAPI expansions and their placeholders for both Minecraft (Spigot, Paper, etc.) and Hytale.
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- ## [Minecraft](minecraft.md)
|
||||
|
||||
----
|
||||
|
||||
Placeholder list for the Minecraft version of PlaceholderAPI.
|
||||
|
||||
- ## [Hytale](hytale.md)
|
||||
|
||||
----
|
||||
|
||||
Placeholder list for the Hytale version of PlaceholderAPI.
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,264 @@
|
||||
---
|
||||
description: List of Plugins that support PlaceholderAPI and/or provide their own placeholders to use.
|
||||
---
|
||||
|
||||
# Hytale
|
||||
|
||||
This here is a list of all plugins supporting the Hytale version of PlaceholderAPI by either having their own placeholders added, or just allowing other placeholders to be used.
|
||||
If your plugin isn't shown here and you want it to be added, [read the Wiki README](https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki/README.md) on how you can submit your changes.
|
||||
|
||||
## Plugins
|
||||
|
||||
- **[A](#a)**
|
||||
- **[B](#b)**
|
||||
- **[C](#c)**
|
||||
- **[D](#d)**
|
||||
- **[E](#e)**
|
||||
- **[F](#f)**
|
||||
- **[G](#g)**
|
||||
- **[H](#h)**
|
||||
- **[I](#i)**
|
||||
- **[J](#j)**
|
||||
- **[K](#k)**
|
||||
- **[L](#l)**
|
||||
- **[M](#m)**
|
||||
- **[N](#n)**
|
||||
- **[O](#o)**
|
||||
- **[P](#p)**
|
||||
- **[Q](#q)**
|
||||
- **[R](#r)**
|
||||
- **[S](#s)**
|
||||
- **[T](#t)**
|
||||
- **[U](#u)**
|
||||
- **[V](#v)**
|
||||
- **[W](#w)**
|
||||
- **[X](#x)**
|
||||
- **[Y](#y)**
|
||||
- **[Z](#z)**
|
||||
|
||||
----
|
||||
## A
|
||||
- **[AeroWars](https://www.curseforge.com/hytale/mods/aerowars)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#aerowars)**]
|
||||
- **[ArenaPVP](https://www.curseforge.com/hytale/mods/arena-pvp)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#arenapvp)**]
|
||||
|
||||
----
|
||||
## B
|
||||
- **[Better Scoreboard](https://www.curseforge.com/hytale/mods/better-scoreboard)**
|
||||
- [x] Supports placeholders.
|
||||
- [ ] Provides own placeholders.
|
||||
|
||||
----
|
||||
## C
|
||||
- **[Clean Ping](https://www.curseforge.com/hytale/mods/cleanping)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#cleanping)**]
|
||||
- **[CleanStaffChat](https://www.curseforge.com/hytale/mods/cleanstaffchat)**
|
||||
- [x] Supports placeholders.
|
||||
- [ ] Provides own placeholders.
|
||||
|
||||
----
|
||||
## D
|
||||
- **[Declare's Advanced Jobs](https://www.curseforge.com/hytale/mods/declares-advanced-jobs)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#declares-advanced-jobs)**]
|
||||
|
||||
----
|
||||
## E
|
||||
- **[EconomyAPI](https://www.curseforge.com/hytale/mods/economyapi)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#economyapi)**]
|
||||
- **[Ecotale](https://www.curseforge.com/hytale/mods/ecotale)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#ecotale)**]
|
||||
- **[EliteEssentials](https://www.curseforge.com/hytale/mods/eliteessentials)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#eliteessentials)**]
|
||||
- **[EssentialsCore](https://www.curseforge.com/hytale/mods/essentials-core)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#essentialscore)**]
|
||||
- [ ] [Subject to PR approval](https://github.com/nhulston/Essentials/pull/14)
|
||||
- **[EssentialsPlus](https://www.curseforge.com/hytale/mods/essentials-plus)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#essentialsplus)**]
|
||||
- **[EtProxy](https://builtbybit.com/resources/etproxy-hytale-proxy-server.90177)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#etproxy)**]
|
||||
|
||||
----
|
||||
## F
|
||||
- **[FlectonePulse](https://www.curseforge.com/hytale/mods/flectonepulse)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#flectonepulse)**]
|
||||
|
||||
----
|
||||
## G
|
||||
- **[Guilds](https://www.curseforge.com/hytale/mods/guilds)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#guilds)**]
|
||||
|
||||
----
|
||||
## H
|
||||
- **[HeroChat](https://www.curseforge.com/hytale/mods/herochat)**
|
||||
- [x] Supports placeholders.
|
||||
- [ ] Provides own placeholders.
|
||||
- **[HyChatter](https://curseforge.com/hytale/mods/hychatter)**
|
||||
- [x] Supports placeholders.
|
||||
- [ ] Provides own placeholders.
|
||||
- **[HyEssentialsX](https://www.curseforge.com/hytale/mods/hyessentialsx)**
|
||||
- [x] Supports placeholders.
|
||||
- [ ] Provides own placeholders.
|
||||
- **[HyFactions](https://www.curseforge.com/hytale/mods/hyfactions)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md/#hyfactions)**]
|
||||
- **[Hylograms](https://curseforge.com/hytale/mods/holograms)**
|
||||
- [x] Supports placeholders.
|
||||
- [ ] Provides own placeholders.
|
||||
- **[HyperPerms](https://www.curseforge.com/hytale/mods/hyperperms)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md/#hyperperms)**]
|
||||
- **[HyperFactions](https://www.curseforge.com/hytale/mods/hyperfactions)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md/#hyperfactions)**]
|
||||
- **[HyVotifier](https://www.curseforge.com/hytale/mods/hytale-votifier)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md/#hyvotifier)**]
|
||||
|
||||
----
|
||||
## I
|
||||
|
||||
/// info |
|
||||
No Plugins available
|
||||
///
|
||||
|
||||
----
|
||||
## J
|
||||
- **[JHS-Votifier](https://www.curseforge.com/hytale/mods/jhs-votifier)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#jhs-votifier)**]
|
||||
|
||||
----
|
||||
## K
|
||||
|
||||
/// info |
|
||||
No Plugins available
|
||||
///
|
||||
|
||||
----
|
||||
## L
|
||||
- **[LevelingCore](https://www.curseforge.com/hytale/mods/levelingcore)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#levelingcore)**]
|
||||
- **[LuckPerms](https://www.curseforge.com/hytale/mods/luckperms)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#luckperms)**]
|
||||
|
||||
----
|
||||
## M
|
||||
- **[mini-chat-formatter](https://www.curseforge.com/hytale/mods/mini-chat-formatter)**
|
||||
- [x] Supports placeholders.
|
||||
- [ ] Provides own placeholders.
|
||||
- **[MMOSkillTree](https://www.curseforge.com/hytale/mods/mmo-skill-tree)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#mmoskilltree)**]
|
||||
- **[MysticNametags](https://www.curseforge.com/hytale/mods/mysticnametags)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#mysticnametags)**]
|
||||
|
||||
----
|
||||
## N
|
||||
|
||||
/// info |
|
||||
No Plugins available
|
||||
///
|
||||
|
||||
----
|
||||
## O
|
||||
|
||||
/// info |
|
||||
No Plugins available
|
||||
///
|
||||
|
||||
----
|
||||
## P
|
||||
- **[Prekoyte's Powerlevels](https://www.curseforge.com/hytale/mods/prekoytes-powerlevels)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#prekoytespowerlevels)**]
|
||||
|
||||
----
|
||||
## Q
|
||||
|
||||
/// info |
|
||||
No Plugins available
|
||||
///
|
||||
|
||||
----
|
||||
|
||||
## R
|
||||
- **[Rankup System](https://www.curseforge.com/hytale/mods/rankup-system)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#rankup-system)**]
|
||||
- **[RPGLevelling](https://www.curseforge.com/hytale/mods/rpg-leveling-and-stats)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#rpglevelling)**]
|
||||
|
||||
----
|
||||
## S
|
||||
- **[SimpleClaims](https://www.curseforge.com/hytale/mods/simple-claims)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#simpleclaims)**]
|
||||
|
||||
----
|
||||
## T
|
||||
- **[TaleFly](https://builtbybit.com/resources/talefly.91201/)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#talefly)**]
|
||||
- **[Topper](https://www.curseforge.com/hytale/mods/topper)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#topper)**]
|
||||
|
||||
----
|
||||
## U
|
||||
|
||||
/// info |
|
||||
No Plugins available
|
||||
///
|
||||
|
||||
----
|
||||
## V
|
||||
- **[VaultUnlocked](https://www.curseforge.com/hytale/mods/vaultunlocked)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#vaultunlocked)**]
|
||||
|
||||
----
|
||||
## W
|
||||
- **[Werchat](https://www.curseforge.com/hytale/mods/werchat)**
|
||||
- [x] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#werchat)**]
|
||||
- **[WiFlowAPI](https://www.curseforge.com/hytale/mods/wiflows-placeholderapi)**
|
||||
- [ ] Supports placeholders.
|
||||
- [x] Provides own placeholders. [**[Link](../placeholder-list/hytale.md#wiflowapi)**]
|
||||
|
||||
----
|
||||
## X
|
||||
|
||||
/// info |
|
||||
No Plugins available
|
||||
///
|
||||
|
||||
----
|
||||
## Y
|
||||
|
||||
/// info |
|
||||
No Plugins available
|
||||
///
|
||||
|
||||
----
|
||||
## Z
|
||||
|
||||
/// info |
|
||||
No Plugins available
|
||||
///
|
||||
@@ -0,0 +1,19 @@
|
||||
# Plugins Using PlaceholderAPI
|
||||
|
||||
This page contains two sections listing plugins that support PlaceholderAPI, either having their own placeholders added, or by just allowing other placeholders to be used. Browse the sections below to find plugins and their available placeholders for each platform.
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- ## [Minecraft](minecraft.md)
|
||||
|
||||
----
|
||||
|
||||
Plugins using the Minecraft version of PlaceholderAPI.
|
||||
|
||||
- ## [Hytale](hytale.md)
|
||||
|
||||
----
|
||||
|
||||
Plugins Using the Hytale version of PlaceholderAPI.
|
||||
|
||||
</div>
|
||||
@@ -0,0 +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.
|
||||
|
||||
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
|
||||
|
||||
Before you can use placeholders should you check a few things first.
|
||||
|
||||
### 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.
|
||||
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](plugins-using-placeholderapi/index.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 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
|
||||
|
||||
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.
|
||||
|
||||
/// 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
|
||||
|
||||
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.
|
||||
|
||||
One way to find out, if an Expansion is included or separate, is to check the [Placeholder List](placeholder-list/index.md) page for any entry of it.
|
||||
If it exists on the page, can you check the infobox right below the title of the Expansion for one of the following cases:
|
||||
|
||||
- `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).
|
||||
- `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`.
|
||||
|
||||
## Use Expansion
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,148 @@
|
||||
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: simple/modrinth
|
||||
link: https://modrinth.com/plugin/placeholderapi
|
||||
- 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
|
||||
- Placeholder List:
|
||||
- users/placeholder-list/index.md
|
||||
- users/placeholder-list/minecraft.md
|
||||
- users/placeholder-list/hytale.md
|
||||
- Plugins Using PlaceholderAPI:
|
||||
- users/plugins-using-placeholderapi/index.md
|
||||
- users/plugins-using-placeholderapi/minecraft.md
|
||||
- users/plugins-using-placeholderapi/hytale.md
|
||||
- Dev Guides:
|
||||
- developers/index.md
|
||||
- developers/using-placeholderapi.md
|
||||
- developers/creating-a-placeholderexpansion.md
|
||||
- developers/configuration-api-hytale.md
|
||||
- developers/expansion-cloud.md
|
||||
- Common Issues:
|
||||
- issues/index.md
|
||||
- issues/ecloud-block.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
|
||||
slugify: !!python/object/apply:pymdownx.slugs.slugify {kwds: {case: lower}}
|
||||
- pymdownx.tasklist
|
||||