From b6fa09e09dc4f8c8038478294de72d7c0a2bbb5f Mon Sep 17 00:00:00 2001 From: Andre_601 Date: Mon, 10 Oct 2022 23:45:14 +0200 Subject: [PATCH 1/5] Create Using-Placeholders.md --- Using-Placeholders.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Using-Placeholders.md diff --git a/Using-Placeholders.md b/Using-Placeholders.md new file mode 100644 index 0000000..f9abe4c --- /dev/null +++ b/Using-Placeholders.md @@ -0,0 +1,36 @@ +This page is intended for server owners or server staff who want to learn how to use placeholders in a plugin. + +If you're a developer and would like to learn how to provide placeholders or support placeholders from other plugins in your own, check out [[Hook into PlaceholderAPI]]. + +## 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]] 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 connectsion to the above URL. If it doesn, and you're using a host, contact their support and ask them to whitelist this URL. +If you're using a dedicated VPS or similar, should you make sure, to put the URL and/or IPs behind it into your firewall's whitelist. + +## 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 [[Placeholders]] page for any entry of it. +If it exists on the page, can you check, if the line right after the title says `NO DOWNLOAD COMMAND` or `/papi ecloud download ...` (i.e. `/papi ecloud download Player`). + +If the line says the former, does it mean, the expansion is part of the plugin and doesn't need any extra steps to be active (Unless the plugin author mentions otherwise). +In the case of the later, will you need to download the expansion from the eCloud. Simply copy the command and execute it either in the console, or in-game. Afterwards, reload PlaceholderAPI using `/papi reload`. + +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. From 5aa8942ec8108af57a79aa90f055f41a6ca3e0fd Mon Sep 17 00:00:00 2001 From: Andre_601 Date: Mon, 10 Oct 2022 23:47:53 +0200 Subject: [PATCH 2/5] Add to nav --- Home.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Home.md b/Home.md index 489ec8c..bde7ffc 100644 --- a/Home.md +++ b/Home.md @@ -5,6 +5,7 @@ This wiki gives you information on how to create placeholders in your plugin tha It also has a list with all available placeholders (Work in progress). ### Setup +**[[Using Placeholders]]** **[[Hook into PlaceholderAPI]]** - [[First steps|Hook-into-PlaceholderAPI#first-steps]] - [[Adding placeholders to PlaceholderAPI|PlaceholderExpansion]] From acb9361431578ad2e93c7857cc2c640284143c98 Mon Sep 17 00:00:00 2001 From: Andre_601 Date: Mon, 10 Oct 2022 23:48:15 +0200 Subject: [PATCH 3/5] Update _Sidebar.md --- _Sidebar.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_Sidebar.md b/_Sidebar.md index 30ad2cb..dccd719 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -5,6 +5,7 @@ **[[Main page|Home]]** ### Setup +**[[Using Placeholders]]** **[[Hook into PlaceholderAPI]]** - [[First steps|Hook-into-PlaceholderAPI#first-steps]] - [[Adding placeholders to PlaceholderAPI|PlaceholderExpansion]] From 8a3673b604897054d52894c360c4e7e71cc5bc2c Mon Sep 17 00:00:00 2001 From: Andre_601 Date: Mon, 10 Oct 2022 23:48:29 +0200 Subject: [PATCH 4/5] newline fix --- Home.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Home.md b/Home.md index bde7ffc..808f06c 100644 --- a/Home.md +++ b/Home.md @@ -5,7 +5,7 @@ This wiki gives you information on how to create placeholders in your plugin tha It also has a list with all available placeholders (Work in progress). ### Setup -**[[Using Placeholders]]** +**[[Using Placeholders]]** **[[Hook into PlaceholderAPI]]** - [[First steps|Hook-into-PlaceholderAPI#first-steps]] - [[Adding placeholders to PlaceholderAPI|PlaceholderExpansion]] From 62d3d96c6824ff6734bea1db77eb541b7639502c Mon Sep 17 00:00:00 2001 From: Andre_601 Date: Thu, 13 Oct 2022 23:02:30 +0200 Subject: [PATCH 5/5] Update Using-Placeholders.md --- Using-Placeholders.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Using-Placeholders.md b/Using-Placeholders.md index f9abe4c..16491ff 100644 --- a/Using-Placeholders.md +++ b/Using-Placeholders.md @@ -16,8 +16,7 @@ If the plugin isn't listed, can you usually check its plugin page, or any other ### 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 connectsion to the above URL. If it doesn, and you're using a host, contact their support and ask them to whitelist this URL. -If you're using a dedicated VPS or similar, should you make sure, to put the URL and/or IPs behind it into your firewall's whitelist. +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. ## 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.