Compare commits

..
1019 Commits
Author SHA1 Message Date
NotAlexNoyle b84b5d7dec Exclude CODEOWNERS from language statistics 2026-10-27 08:25:15 -04:00
NotAlexNoyle 62408afea5 Add CODEOWNERS (one staff approval) 2026-10-27 08:25:15 -04:00
NotAlexNoyle d527380134 Disable cloud and bstats 2026-07-22 08:53:35 -04:00
NotAlexNoyle 1c4330c56a Disable update checking 2026-05-25 11:53:30 -04:00
NotAlexNoyle 7bb00eb3d0 Use live TrueOG Network config file 2026-05-18 05:33:59 -04:00
NotAlexNoyle fa7a285053 Update gradle to 8.14.3 and shadow to 8.3.6 2025-09-24 02:03:28 -04:00
Funnycube f14b081f0b Add modrinth 2025-08-15 17:06:52 +10:00
PiggyPiglet b51fbf4e13 Fix jenkins build
disableAutoTargetJvm in gradle
2025-07-03 13:40:53 +08:00
PiggyPiglet e48b6fe702 Update NMSVersion enum 2025-07-01 20:44:21 +08:00
PiggyPiglet 984f944daf Merge pull request #1127 from PlaceholderAPI/folia
Merge UniversalScheduler (Folia Support) #980
2025-07-01 20:24:13 +08:00
PiggyPiglet 0575c8cf41 Merge UniversalScheduler 2025-07-01 09:39:48 +08:00
PiggyPiglet c181d18f5e Revert "Merge pull request #1092 from CoderKuo/master"
This reverts commit 2e0d9eb846, reversing
changes made to 33d1009d6a.
2025-06-16 11:08:43 +08:00
PiggyPiglet 2e0d9eb846 Merge pull request #1092 from CoderKuo/master
Optimize text replacement algorithm performance
2025-04-21 15:23:40 +08:00
PiggyPiglet 33d1009d6a Merge pull request #1095 from Kqliber/fix/1094
fix for all expansions stop loading after an exception is thrown (#1094)
2025-03-30 20:46:34 +08:00
PiggyPiglet b16d62fb75 fix maven repo publishing (maybe?) 2025-03-30 20:41:51 +08:00
Funnycube e019d6370c Merge pull request #1098 from Funny-cube/master
Revert api links
2025-01-16 13:31:08 +11:00
Funnycube 581b73dbc7 revert home link 2025-01-16 13:28:43 +11:00
Funnycube 25f7eafe32 revert api link 2025-01-16 13:27:45 +11:00
Kqliber ef22d564f3 remove imports 2025-01-08 18:23:49 +00:00
Kqliber 787a053d98 fix for all expansions stop loading after an exception is thrown (#1094) 2025-01-08 18:21:43 +00:00
大阔 f31dd2bea9 Add fast path check for closure.head and closure.tail 2025-01-03 03:18:40 +08:00
大阔 5c8086150a Optimize text replacement algorithm performance 2025-01-03 02:23:17 +08:00
PiggyPiglet b838d1c52a Update ecloud api link 2024-11-27 19:58:05 +08:00
Andre_601 0a712e6530 Fix API version badge + update flex 2024-11-13 14:40:41 +01:00
Gabriel Dumitru 272e2e7904 Merge pull request #1000 from mfnalex/master
Added missing NotNull annotations to setBracketPlaceholders methods
2024-07-10 22:35:49 +03:00
PiggyPiglet 98082398fc Target java release 8 for compilation 2024-07-04 17:46:04 +08:00
PiggyPiglet c66806ecf8 Merge pull request #1067 from PlaceholderAPI/feat/1.21
feat: initial work on 1.21
2024-07-04 17:26:16 +08:00
Andre_601 c97f5aa5a6 Bump download stats 2024-06-18 22:45:15 +02:00
Glare c1487898a9 chore(deps): update gradle + shadow fork 2024-06-14 10:07:06 -05:00
Glare 907ced6d7d feat: initial work on 1.21 2024-06-13 18:08:58 -05:00
PiggyPiglet ac771207c3 bump to dev version 2024-05-21 18:51:05 +08:00
PiggyPiglet 8b031576aa bump version for release 2024-05-21 18:31:02 +08:00
PiggyPiglet 2d1a0ee157 Merge pull request #1060 from PlaceholderAPI/fix/parse-command-improvements
Parse command improvements
2024-05-21 18:08:19 +08:00
PiggyPiglet b9e2bf9429 Merge pull request #1061 from PlaceholderAPI/feature/update-adventure-platform-bukkit
Update Adventure-platform-bukkit to 4.3.2
2024-05-21 18:05:13 +08:00
PiggyPiglet a35923a117 cast instead of #getplayer 2024-05-21 17:59:57 +08:00
PiggyPiglet d5e96bd6a6 exclude module-info fix #894 2024-05-20 22:44:44 +08:00
Andre601 2523b6c094 Update Adventure-platform-bukkit to 4.3.2 2024-05-10 14:41:51 +02:00
Andre601 7b230fc679 Fix output for parse command + "me" support in parserel 2024-05-06 16:42:24 +02:00
Andre_601 68f467ab29 Add 1.20.2 - 1.20.5 to NMSVersion.java (#1057) 2024-04-30 10:35:18 -05:00
PiggyPigletandAndre_601 068b5a31b2 Fix #1034 & Deprecate VersionSpecific & update copyright (#1035)
Co-authored-by: Andre_601 <github@andre601.ch>
2024-04-30 10:34:43 -05:00
Gabriel Dumitru 882b7c5965 Merge pull request #1046 from PlaceholderAPI/feature/add-plugin-authors
Add Plugin Authors to /papi dump
2024-03-07 22:59:42 +02:00
Gabriel Dumitru 7a0be5edf8 Merge pull request #1040 from DevCyntrix/fix-class-cast-exception
Use the OfflinePlayer$getPlayer method instead of casting to Player class
2024-03-07 22:59:24 +02:00
Andre601 e94328935d Add Plugin Authors to /papi dump 2024-02-25 14:42:48 +01:00
Andre_601 604fed36a4 Man, this file is outdated... 2024-02-25 00:14:41 +01:00
Ricardo Borutta 403622d205 Use the OfflinePlayer$getPlayer method instead of casting to Player class
You should use this to avoid a class cast exception if some other plugins uses an own Implementation of the offline player.
2024-01-29 10:21:24 +01:00
Funnycube 1cd4d93f7f Merge pull request #1038 from Funny-cube/master
Update config.yml with papi domain for wiki and ecloud
2024-01-27 21:57:48 +11:00
Funnycube a83ef75bf9 Update config.yml 2024-01-27 20:45:10 +11:00
Andre_601 b96e535aaa Update wiki link in PR template 2024-01-27 00:58:11 +01:00
Andre_601 2e67272aea Fix logo and update link in README 2024-01-26 23:05:04 +01:00
Andre_601 2c7767e77d fix github admonition blocks 2024-01-22 20:12:39 +01:00
Andre_601 c4a046ff24 Merge pull request #1006 from PlaceholderAPI/feature/add-new-download-pages
Add Hangar and BuiltByBit pages to readme
2023-11-26 16:58:08 +01:00
PiggyPiglet 57fa68c896 change version to .6-dev 2023-10-28 21:50:05 +08:00
PiggyPiglet b64f024eb2 fix config version variable and set release version 2023-10-28 21:49:39 +08:00
PiggyPiglet c7a4900aa3 remove ability to download unverified expansions 2023-10-28 21:42:18 +08:00
Andre_601 491abd6238 BuilT not BuilD 2023-09-25 15:11:49 +02:00
Andre_601 d3646a9874 Change Built By Bit to BuiltByBit Page 2023-09-25 15:07:13 +02:00
Andre_601 af0b475330 Add Hangar and BuiltByBit pages to readme 2023-09-25 14:58:30 +02:00
Funnycube d35a499e31 Update plugin.yml
remove unused toggle permissions
2023-09-24 13:49:40 +10:00
Funnycube c0f824450e Update build.gradle.kts
start 2.11.5-DEV
2023-09-24 12:59:01 +10:00
Funnycube 5b1a8ef4ba 2.11.4 release 2023-09-24 12:40:46 +10:00
PiggyPiglet 5623a00f9b Merge pull request #978 from JulianVennen/block-unverified-expansions
Add environment variable to override cloud_allowunverified_expansions
2023-09-21 17:38:54 +08:00
PiggyPiglet 4926907b47 Merge pull request #969 from PlaceholderAPI/feature/support-1.20
1.20 support
2023-09-04 17:26:11 +08:00
mfnalex 32f3d14682 added missing @NotNull to the returned List's type parameter and the parameter List's type parameter (is that proper English?) 2023-08-29 00:57:42 +02:00
mfnalex 152105017d added missing @NotNull to return value and String parameter of setBracketPlaceholders(Player, String) 2023-08-29 00:56:12 +02:00
mfnalex be956f52b0 added missing @NotNull to return value and List parameter of setBracketPlaceholders(Player, List) 2023-08-29 00:55:28 +02:00
Andre_601 195158b18b Use new format for note block [skip ci] 2023-08-01 03:27:15 +02:00
Gabriel Dumitru 36fa9ac96d feat: distinguish expansions (external or internal) (fixes #945) (#953) 2023-07-24 11:48:29 +03:00
Julian 42cfe1dc80 simplify env values to true/false 2023-06-23 17:06:11 +02:00
Julian 92a7d54664 Add environment variable to override cloud_allowunverified_expansions
This adds the environment variable PAPI_ALLOW_UNVERIFIED_EXPANSIONS.
It allows overriding the option set in the config.yml.
2023-06-23 14:04:00 +02:00
Gabriel Dumitru f91b4e3752 feat: fetch all expansions (#952) 2023-06-21 21:26:52 +03:00
PiggyPiglet a497e05e55 Merge pull request #947 from JulianVennen/block-extensions-env
Add environment variable to block individual ecloud expansions.
2023-06-21 20:25:16 +08:00
Andre601 74d8fec6bd Bump Spigot version 2023-06-10 18:13:10 +02:00
Andre601 28287c7fbd 1.20 NMS version support 2023-06-10 17:59:55 +02:00
Gabriel Dumitru 744cf6d8c0 Merge pull request #946 from JulianVennen/block-load-path-traversal
Prevent loading of extensions outside of the expansions folder using the register command
2023-04-04 17:28:00 +03:00
Julian ecd4c002c8 Add environment variable to block individual ecloud expansions.
This commit adds the environment variable "PAPI_BLOCKED_EXPANSIONS"
which can contain a case insensitive, comma separated list of blocked
expansions.
Expansions on this list can no longer be downloaded using commands.
2023-03-30 13:41:01 +02:00
Julian b4e60b7db5 Prevent loading of extensions outside of the expansions folder using the register command 2023-03-30 12:47:23 +02:00
darbyjack e862abe0b4 Start 2.11.4 DEV cycle 2023-03-17 20:07:24 -05:00
darbyjack 2d946646f0 Release 2.11.3 2023-03-17 20:03:47 -05:00
Glare 5ab61e0cd3 Update the NMS options up to the latest 1.19 R3 (#938) 2023-03-17 19:59:31 -05:00
Gabriel Dumitru 81ef464dad fix: catch NoClassDefFoundError in order for the other expansions to be loaded (#936) 2023-03-17 15:44:41 -05:00
Gabriel Dumitru 0ae0ddc9cb Merge pull request #935 from PlaceholderAPI/fix/kotlin-build-system 2023-03-17 22:16:10 +02:00
darbyjack 3d00d48106 Tell build to depend on shadowJar and publish for build 2023-03-17 14:13:49 -05:00
darbyjack 7e902cae66 Fixed variables in the plugin.yml not being created properly 2023-03-17 13:45:31 -05:00
Mattanddarbyjack f4e4433b16 Feature/gradle kts (#934)
Co-authored-by: darbyjack <admin@glaremasters.me>
2023-03-17 13:25:47 -05:00
Andre_601 d5c371004c Fix duplicate expansion loading (#866) 2023-03-17 12:47:27 -05:00
Glare e246473782 Merge pull request #933 from PlaceholderAPI/feature/update-adventure 2023-03-16 18:31:20 -05:00
Andre601 4afad7f7b0 Update Kyori Adventure to 4.3.0 2023-03-17 00:22:58 +01:00
PiggyPiglet a0b177bdd8 Merge pull request #869 from PlaceholderAPI/remove-ecloud-toggle-command
remove the eCloud toggle command
2023-02-23 21:29:06 +08:00
Gabriel Dumitru 40b1fe8d68 Merge pull request #901 from BlockyTheDev/fix-status-message 2023-02-23 13:36:05 +02:00
PiggyPiglet 9ee4afa1e9 Merge pull request #873 from PlaceholderAPI/fix/872-fix-inxonsisten-parsing
Fix inconsistent parsing command behaviour
2023-02-23 19:31:38 +08:00
BlockyTheDev 1cf66b130c Add space to message 2022-12-25 21:31:55 +01:00
Andre601 c3cfc82eb3 Fix inconsistent parsing command behaviour 2022-08-14 16:30:22 +02:00
Gabriel Dumitru 3afb634e58 revert 4c228ca4fb 2022-08-10 16:01:41 +03:00
Gabriel Dumitru d888d9754b remove from help 2022-08-09 01:20:04 +03:00
Gabriel Dumitru 4c228ca4fb make the eCloud disable by default 2022-08-09 01:08:45 +03:00
Gabriel Dumitru 6cf987586e remove the eCloud toggle command 2022-08-09 01:08:24 +03:00
Glare 46d9a69534 Merge pull request #862 from darbyjack/fix-ecloud-components
Updated Adventure
2022-07-26 18:49:45 -05:00
Glare af8cc09fca Merge pull request #863 from darbyjack/bump-dev
Bump to 2.11.3-dev
2022-07-26 18:48:44 -05:00
darbyjack 452c8ccd42 Bump to 2.11.3-dev 2022-07-26 16:22:18 -05:00
darbyjack 054c780fd1 Updated Adventure 2022-07-26 12:57:11 -05:00
Andre_601 83261eee49 Update canned responses. 2022-07-03 20:12:45 +02:00
PiggyPiglet 3fca78626a remove remaining colour shit and changed version so cube can release and we can be all happy and dandy 2022-07-03 20:34:12 +08:00
PiggyPiglet a2456c582d Removed excess capitalisation 2022-07-02 21:45:53 +08:00
Andre_601 b987916328 Update Image link 2022-07-02 13:46:48 +02:00
Andre_601 23ef4ecb62 Remove wiki folder 2022-07-02 13:46:09 +02:00
PiggyPiglet 8b7a217796 Merge pull request #830 from montlikadani/improve-replacer-process
Remove regex replacer & associated tests
2022-07-01 23:33:35 +08:00
PiggyPiglet 74ebb0bec0 remove regex replacer & associated tests 2022-07-01 23:31:51 +08:00
Glare 794c8890e5 Merge pull request #801 from PlaceholderAPI/fix/papi-dump-expansion-order 2022-07-01 10:08:57 -05:00
Glare 013e566a85 Merge pull request #832 from PlaceholderAPI/feature/log-missing-plugin 2022-07-01 09:51:12 -05:00
Glare 5a4a8c2e7e Merge pull request #793 from Rothes/master 2022-07-01 09:46:39 -05:00
Andre_601 0b068470ac Update CODEOWNERS 2022-07-01 13:06:22 +02:00
Andre_601 f3cb7635c2 Update old links 2022-06-30 22:51:34 +02:00
Andre_601 8e21a76118 Update bug_report.yml 2022-06-30 22:26:13 +02:00
Andre_601 1dad2381e5 Delete wiki action (Not needed) 2022-06-30 22:16:06 +02:00
Andre_601 9767811cb9 Merge pull request #847 from JT122406/master
Gradle Bumps and stuff
2022-06-27 12:55:06 +02:00
J.T. McQuigg e6fb6d5ec6 Other small version bumps 2022-06-26 23:54:07 -04:00
J.T. McQuigg 1acc621f2e Bump Gradle from 7.3.1 to 7.4.2 2022-06-26 23:53:51 -04:00
Glare d9bab03e3b Merge pull request #773 from PlaceholderAPI/feature/update-contributing 2022-06-25 15:47:54 -05:00
PiggyPiglet 9baf5f58ae Merge pull request #844 from PlaceholderAPI/feature/1.19
1.19 support
2022-06-25 20:06:19 +08:00
Andre601 077d64dc68 Fix NMS version 2022-06-16 01:45:47 +02:00
Andre601 b8d5886cad 1.19 support 2022-06-16 01:31:33 +02:00
Andre_601 52119682f3 Use custom quote block in automatic replies 2022-05-20 17:04:38 +02:00
Andre601 651e14a797 Make plugin check before register to avoid possible exceptions 2022-05-19 02:46:40 +02:00
Andre601 0ac62d6b63 Log missing required plugin for expansion
+ some logger improvements
2022-05-18 21:11:09 +02:00
Andre601 0be6b721cf Use stream to get size padding 2022-05-04 18:36:46 +02:00
Andre601 0e0e36476a Change appended message for null jar array 2022-04-29 23:13:19 +02:00
Andre_601 a56b3b62b9 Update to v3 wiki action 2022-04-28 21:30:52 +02:00
Funnycube 883f1c1edf One Million 🎉 2022-04-08 20:23:05 +10:00
Rothes bfc30a8703 Locale.ROOT param 2022-03-26 09:09:50 +08:00
Andre_601 37c39ab734 Update the flex 2022-03-26 01:36:07 +01:00
Glare 35c47a8745 Merge pull request #810 from PlaceholderAPI/feature/remove-escape-hex-test
Remove testCharsReplacerHandlesEscapedHex()
2022-03-13 05:48:30 -05:00
PiggyPiglet fadf14a316 Merge pull request #814 from PlaceholderAPI/fix/666-lowercasing
fix(replacer): Stop lowercasing replacements
2022-03-13 14:35:34 +08:00
Starmism 1388a5278f fix(replacer): Stop lowercasing replacements
This commit changes two lines but fixes the replacement of cased
    placeholders with non-cased ones that was accidentally happening.
    This was partially fixed in a few previous commits, but not fully as
    it was still replacing failed placeholder matches.
2022-03-12 12:42:56 -07:00
Andre_601 3bc6ad0f06 Also update label-commenter-config 2022-03-12 01:20:21 +01:00
Andre_601 bb149811d4 Update label-commenter-config.yml 2022-03-12 01:16:33 +01:00
Andre601 350a2be0ed Remove testCharsReplacerHandlesEscapedHex() 2022-02-22 11:48:51 +01:00
Gabriel Dumitru b73d72cec7 add missing java.util.Locale imports 2022-02-22 11:42:35 +02:00
Gabriel Dumitru 7afb8ee36d Merge pull request #800 from PlaceholderAPI/feature/null-parse-option
Add --null argument for Parse command
2022-02-22 10:42:02 +02:00
Andre601 1241c33ba0 Add --null to command help 2022-02-05 20:55:48 +01:00
Andre601 631609af74 Improve expansion sorting in /papi dump 2022-02-05 14:08:43 +01:00
Andre601 fe8d865657 Add missing import 2022-02-05 13:57:30 +01:00
Andre601 50d4e14333 Add --null option for parse command 2022-02-05 13:57:05 +01:00
Andre_601 666ab468a1 Link to docs/wiki branch README 2022-01-30 12:03:42 +01:00
Rothes 151fb08db8 Fix PlaceholderExpansion may not unregistered 2022-01-28 13:40:39 +08:00
Andre_601 cd9074203c Update label-commenter-config.yml 2022-01-03 00:19:58 +01:00
Andre_601 38d77ff4ca Update label-commenter-config.yml 2022-01-03 00:17:23 +01:00
Glare 3ccbbe9c20 Bump to 2.11.2 DEV 2021-12-27 01:33:36 -08:00
Glare 358a3bcab3 Release 2.11.1 2021-12-27 01:32:00 -08:00
PiggyPiglet ca088227c3 Merge pull request #772 from PlaceholderAPI/fix/771-identifier-replacement
Fix #771
2021-12-27 15:21:30 +08:00
Andre_601 69fd180c9b Update CONTRIBUTING.md 2021-12-25 16:55:05 +01:00
Andre_601 38e6e02e1b Not sure how I missed that... 2021-12-25 15:53:07 +01:00
Andre_601 a71b8657f1 Update Contributing file 2021-12-25 15:50:17 +01:00
PiggyPiglet 850633e792 Fix #771 2021-12-24 12:34:36 +08:00
PiggyPiglet 348b075ac5 added glare's fancy pants dev string to ver 2021-12-24 12:32:01 +08:00
PiggyPiglet ce18d3b597 update licenses & bump deprecation ver 2021-12-24 12:26:22 +08:00
PiggyPiglet 9d66d9d9a1 bump ver 2021-12-24 12:24:40 +08:00
darbyjack 5fe9389dda We're actually on 2.11.0 RELEASE 2021-12-19 18:59:38 -06:00
darbyjack e25a28b2a5 2.10.11 RELEASE 2021-12-19 18:53:25 -06:00
PiggyPiglet cfd289939e Merge pull request #667 from PlaceholderAPI/fix/666-lowercase-issues
Fix issue with invalid placeholder pattern lowercasing text
2021-12-19 18:49:37 -06:00
PiggyPiglet d168be94b1 Merge pull request #752 from PlaceholderAPI/1.18
1.18 + Gradle Updates
2021-12-03 13:01:09 +08:00
PiggyPiglet 511717a8d6 Merge branch 'master' into 1.18 2021-12-03 13:01:02 +08:00
PiggyPiglet 18fb194ce6 Merge pull request #677 from PlaceholderAPI/feature/add-logging-options
Add logging options to PlaceholderExpansion
2021-12-03 13:00:15 +08:00
PiggyPiglet e11d551071 Merge pull request #717 from PlaceholderAPI/feature/log-expansio-version
Include version in registration message and other QOL changes
2021-12-03 12:59:20 +08:00
PiggyPiglet 020f14d82c Merge branch 'master' into feature/log-expansio-version 2021-12-03 12:59:07 +08:00
darbyjack acb5728e65 1.18 + Gradle Updates 2021-12-02 21:55:12 -06:00
cc235cfc01 Merge Development into master (#758)
* Update development from master (#662)

* Add contributing and expansion section

* Start using new Issue template system

* Create bug_report.yml

* Rename feature_request.md to feature_request_old.md

* Create feature_request.yml

* fix unique name

* Update feature_request_old.md

* Add Checkboxes

* Add checkboxes

* disable default issue body

* Delete bug_report_old.md

* Delete feature_request_old.md

* Rename bug_report_new.yml to bug_report.yml

* Check if deleting this fixed the PR...

* Use description in favour of about

* improve feature_request.md

* Update bug_report.yml

* Assign "Type: Issue (Unconfirmed)" label

* Use lists and not comma-separated string

* Update feature_request.yml

* Use id option for error and dump fields

* Add field for logs

* Remove deprecated issue_body type

* Update feature_request.yml

* Improve description of bug_report.yml

* Initial 1.17 Changes

* add render

* Revert build.gradle dependencies change

* Fixed duplicate files

* Initial test on adventure

* started moving to pure adventure

* finished kyori impl

* added 1.17 to nmsversion (what does this even do)

* removed dev for release

* added dev back

Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com>
Co-authored-by: darbyjack <admin@glaremasters.me>
Co-authored-by: PiggyPiglet <noreply@piggypiglet.me>

* Update dependencies of PlaceholderAPI

* Add missing trailing /

Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com>
Co-authored-by: darbyjack <admin@glaremasters.me>
Co-authored-by: PiggyPiglet <noreply@piggypiglet.me>
2021-12-03 04:52:28 +01:00
PiggyPiglet 894dcd0a2f Merge pull request #687 from PlaceholderAPI/java-version-dump
Add Java Version to /papi dump command
2021-12-03 11:40:11 +08:00
PiggyPiglet 41c9231664 Merge pull request #749 from itIsMaku/master
nullable annotation placeholderhook
2021-12-03 11:37:52 +08:00
Andre601 31deef2a62 Use completedFuture instead 2021-12-01 21:30:41 +01:00
Andre601 3ba29f1147 Fix possible NPE for findExpansionsOnDisk 2021-12-01 19:09:02 +01:00
Andre601 e969f37405 Improve StringBuilder and also fix possible NPE 2021-12-01 19:05:28 +01:00
Andre_601 b9a5f4445f Merge pull request #731 from PlaceholderAPI/feature/automatic-release-drafting
Add release.yml for automatic release drafts
2021-11-29 01:36:03 +01:00
Adam Volkman (itIsMaku) 6f87955898 feat: nullable annotation placeholderhook 2021-11-17 14:10:19 +01:00
Andre_601 d68af58df5 Make name of job only show java version 2021-11-11 13:49:48 +01:00
Andre_601 6e1eb88585 Add release.yml for automatic release drafts 2021-10-09 18:39:13 +02:00
Andre_601 0798d94449 Update this flex too funnycube :) 2021-10-01 16:22:30 +02:00
Funnycube aa68a481ee Update flex 2021-10-01 22:59:12 +10:00
Andre_601 6f5853746d fix wiki action... again 2021-10-01 14:17:21 +02:00
Andre_601 416fbc0e3e Merge branch 'docs/wiki' into master 2021-10-01 14:16:06 +02:00
Andre601 407714c13f Rename logo.png to wiki-logo.png 2021-10-01 14:14:41 +02:00
Andre_601 aa13ddf17e Add files via upload 2021-10-01 14:10:19 +02:00
Andre_601 d9da5a706c Update README.md 2021-10-01 14:01:59 +02:00
Andre_601 80446de15b Merge pull request #718 from TheCashFire/patch-1
New Placeholder for %aach_total_commands%
2021-09-23 16:37:08 +02:00
Kris Stancy 0647f88de5 New Placeholder
Added %aach_total_commands% new placeholder to the total achievement placeholders section.
2021-09-19 22:06:01 -05:00
Andre601 38099198d6 Include version in registration message 2021-09-20 02:42:38 +02:00
Andre_601 6f2f1f1cf1 Update README.md 2021-09-12 02:17:58 +02:00
ThisKarolGajda 5e4d3f7135 Update Placeholders.md (#714) 2021-09-10 14:25:24 +02:00
Andre_601 327078d8dd Update README.md 2021-09-10 03:30:03 +02:00
Andre_601 1b7fabf238 Update Wiki Readme... a lot 2021-09-10 03:23:11 +02:00
Andre_601 66025a6a1c Update PlaceholderExpansion.md 2021-09-10 02:02:53 +02:00
Andre_601 04f2c85722 fix e-mail env 2021-09-10 01:58:46 +02:00
ThisKarolGajdaandAndre_601 7b5ceb520f Update Placeholders.md - OpEconomy (#713)
* Update Placeholders.md

* Add OpEconomy to "Plugins using PlaceholderAPI"

Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
2021-09-10 01:55:13 +02:00
Andre_601 f7dc184899 Update label-commenter-config.yml 2021-09-09 18:32:37 +02:00
4300bf7d1e Pull latest changes from master into docs/wiki (#712)
* Update Javadoc documentation

* More comments... a lot more!

* Remove Gson

* Implemented working version for 1.8.8 - 1.16.3

* Improve ExpansionsLoadedEvent's docs

* 2021 🥳

* Add contributing and expansion section

* Fix invalid link tag

* Start using new Issue template system

* Create bug_report.yml

* Rename feature_request.md to feature_request_old.md

* Create feature_request.yml

* should it use setBracketPlaceholders??

* fix unique name

* Update feature_request_old.md

* Add Checkboxes

* Add checkboxes

* disable default issue body

* Delete bug_report_old.md

* Delete feature_request_old.md

* Rename bug_report_new.yml to bug_report.yml

* Check if deleting this fixed the PR...

* Use description in favour of about

* improve feature_request.md

* Update bug_report.yml

* Assign "Type: Issue (Unconfirmed)" label

* Use lists and not comma-separated string

* Update feature_request.yml

* Use id option for error and dump fields

* Add field for logs

* Update Copyright
~ Fixed a typo and updated missed files from #543

* Re-add removed code
That should actually NOT be here...

* Undo renaming of boolean

* Remove deprecated issue_body type

* Update feature_request.yml

* Improve description of bug_report.yml

* Build jars on PR (Compile and build validation)

* Initial 1.17 Changes

* Extracted URLClassLoader out of try-with-resources block

* Close URLClassLoader if Expansion class was not found

* Build against Java 8, 11 and 16

* adoPt

I always make that mistake...

* add render

* Cleanup build.gradle

(cherry picked from commit 7750ba7033dc9fdf40d55fcd9ecc20a94819a7c1)

* Remove the @NotNull's because they are overridden by expansion devs anyways, and it turns out people can make them null anyways. This adds a hashcode check and pretty error for it.

(cherry picked from commit f5386d4ca55c23b54f3c5f952f08040b0967f4a3)

* Fix version checker to compare the individual semver numbers instead of combining it together.

(cherry picked from commit ef5cd9d37680cc6cc1321ef2e04af09b44a2c681)

* Update src/main/java/me/clip/placeholderapi/updatechecker/UpdateChecker.java

Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
(cherry picked from commit ccf4f5934386b005831757d298e2da9d8f46cb1a)

* Re-add NotNull's

(cherry picked from commit 2bfd8e7e5efb25f648b8a6de934b1eff675481b1)

* Removed nullcheck from hashcode, and moved it up the chain.

* POJO to help with checking that expansions have all required methods implemented.

* Add method implementation checking and nullchecking for fields.

* Appease the Pigman

* Revert build.gradle dependencies change

* Fixed duplicate files

* Sync Dev with master (#659)

* Add contributing and expansion section

* Start using new Issue template system

* Create bug_report.yml

* Rename feature_request.md to feature_request_old.md

* Create feature_request.yml

* fix unique name

* Update feature_request_old.md

* Add Checkboxes

* Add checkboxes

* disable default issue body

* Delete bug_report_old.md

* Delete feature_request_old.md

* Rename bug_report_new.yml to bug_report.yml

* Check if deleting this fixed the PR...

* Use description in favour of about

* improve feature_request.md

* Update bug_report.yml

* Assign "Type: Issue (Unconfirmed)" label

* Use lists and not comma-separated string

* Update feature_request.yml

* Use id option for error and dump fields

* Add field for logs

* Remove deprecated issue_body type

* Update feature_request.yml

* Improve description of bug_report.yml

* Initial 1.17 Changes

* add render

* Revert build.gradle dependencies change

* Fixed duplicate files

Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com>
Co-authored-by: darbyjack <admin@glaremasters.me>

* Initial test on adventure

* started moving to pure adventure

* finished kyori impl

* added 1.17 to nmsversion (what does this even do)

* removed dev for release

* added dev back

* Switch to differen wiki action

Co-authored-by: darbyjack <admin@glaremasters.me>
Co-authored-by: ElijahRus250 <64851720+ElijahRus250@users.noreply.github.com>
Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com>
Co-authored-by: Huynh Tien <huynhqtienvtag@gmail.com>
Co-authored-by: Vaishnav Anil <vaishnavanil7th@gmail.com>
Co-authored-by: Starmism <iamstarmism@gmail.com>
Co-authored-by: PiggyPiglet <noreply@piggypiglet.me>
2021-09-09 18:31:29 +02:00
Andre_601 5412b484f8 Merge pull request #706 from NotMyFault/feature/wiki/update-plotsquared
Update PlotSquared placeholders
2021-09-03 02:05:39 +02:00
NotMyFault af2f625224 Update PlotSquared placeholders 2021-09-03 00:05:42 +02:00
Andre_601 d2a4f038d0 Merge pull request #705 from DailyStruggle/Add-RTP-Placeholders
add RTP placeholders
2021-09-01 13:39:13 +02:00
Andre_601 7e28dc0a41 Merge pull request #698 from PlaceholderAPI/feature/change-wiki-action
Switch to differen wiki action
2021-09-01 13:38:30 +02:00
Andre_601 b82948c87a fix link 2021-09-01 13:38:15 +02:00
Andre_601 39c68e8f87 fix url and padding 2021-09-01 13:37:19 +02:00
Leaf26 5a24387f3d fix spacing 2021-08-31 22:39:02 -04:00
Leaf26 cd429bd7d7 adding a few more 2021-08-31 22:38:03 -04:00
Leaf26 a383a73b24 add RTP placeholders 2021-08-31 21:41:32 -04:00
Andre_601 7baaa5233d Merge pull request #703 from PyvesB/patch-1
Update Advanced Achievements information
2021-08-30 13:06:35 +02:00
Pierre-Yves BandAndre_601 b35035390e Simplify link format
Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
2021-08-30 12:05:14 +01:00
Pierre-Yves BandAndre_601 1b0a3bc09d Simplify link format
Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
2021-08-30 12:05:04 +01:00
Pierre-Yves B 3817f52158 Add Advanced Achievements placeholders 2021-08-30 11:44:47 +01:00
Pierre-Yves B 663f149d74 Add Advanced Achievements placeholders 2021-08-30 11:43:26 +01:00
Pierre-Yves B 3da8f00664 Update Advanced Achievements links 2021-08-30 11:18:11 +01:00
Andre_601 c24c75c8c0 Merge pull request #701 from LielAmar/docs/wiki
Added Two Factor Authentication to PlaceholderAPI's wiki
2021-08-27 16:19:13 +02:00
Liel c401adee86 Added Two Factor Authentication to PlaceholderAPI's wiki 2021-08-27 16:24:51 +03:00
Andre_601 1dd3e1fc0d Switch to differen wiki action 2021-08-26 22:42:05 +02:00
Andre_601 1f53daf416 Some more corrections 2021-08-23 01:58:15 +02:00
Andre_601 8105beeee0 Improve grammar of PlaceholderExpansion.md 2021-08-23 01:52:10 +02:00
Andre_601 8c9a20c035 Merge pull request #696 from TeamVK/docs/wiki
added new placeholders for TokenEnchant
2021-08-22 12:17:49 +02:00
vk2gpz c1d2effe7e added new placeholders for TokenEnchant
renamed rawcost to fullcost.
added costmax 
```%tokenenchant_<enchantment>_costmax% : cost to increment the enchantmnt level to its maax one from the current level 
%tokenenchant_<enchantment>_fullcostmax% : cost to enchant the max level from 0 level 
%tokenenchant_<enchantment>_fullcost_<X>% : cost to enchant the <X> level from 0 level
```
2021-08-22 09:42:02 +10:00
Andre_601 2eda4b1335 Add missing commands to wiki 2021-08-15 15:44:27 +02:00
Andre_601 ff72450d3f Merge pull request #692 from BlitzOffline/docs/wiki
Added placeholders from the String expansion
2021-08-15 00:00:41 +02:00
BlitzOffline a654262196 Added placeholders frmo the String expansion 2021-08-15 00:04:17 +03:00
Andre_601 fa705e4572 Merge pull request #689 from TeamVK/docs/wiki
added missing baltop related placeholders and multiplier related placeholders.
2021-08-08 23:24:37 +02:00
vk2gpz e687a06d6e added missing baltop related placeholders 2021-08-09 07:19:25 +10:00
darbyjack 08c43d25e7 Add Java Version to /papi dump command 2021-08-04 14:16:15 -05:00
Andre_601 48da25659d Merge pull request #685 from AfkF24/docs/wiki
Update Placeholders.md
2021-07-31 16:46:22 +02:00
AfkF24andAndre_601 905c9e83ee Apply suggestions from code review
Woop, thanks

Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
2021-07-31 16:44:46 +02:00
AfkF24 54ddc9fd4d Update Placeholders.md
Swap Kingdoms+ for KingdomsX and add link to wiki
2021-07-31 16:23:25 +02:00
Andre601 fe0bb12d53 Add missing [<expansion>] prefix 2021-07-31 00:11:24 +02:00
Andre_601 e6da5f291e Merge pull request #683 from TeamVK/docs/wiki
Update Placeholders.md
2021-07-29 00:36:40 +02:00
vk2gpz d674893312 Update Placeholders.md
added %levelup_pickaxe_block_count%, %levelup_bow_kill_count%, %levelup_sword_kill_count%
2021-07-29 07:27:27 +10:00
Andre_601 9da9e8c20f Merge pull request #680 from BlitzOffline/docs/wiki
added changeoutput expansion placeholders
2021-07-24 14:01:29 +02:00
BlitzOffline 33c309ee8e used inline code instead 2021-07-24 14:17:14 +03:00
BlitzOffline 62c3261a00 added changeoutput expansion placeholders 2021-07-24 14:00:42 +03:00
Funnycube c393392b85 Update Placeholders.md 2021-07-24 17:39:38 +10:00
Funnycube fbf91d6393 Merge pull request #679 from TeamVK/docs/wiki
added RandomNumber and LevelUp entries.
2021-07-24 17:30:49 +10:00
vk2gpz 8d30c4c99d added RandomNumber and LevelUp entries. 2021-07-24 17:12:03 +10:00
Andre601 721904335d Add overload for Throwable 2021-07-22 23:56:29 +02:00
Andre601 d79f9725bd Add logging options to PlaceholderExpansion 2021-07-22 23:31:48 +02:00
Andre_601 eb2decb93d Merge pull request #676 from M0diis/docs/wiki
Update Placeholders.md
2021-07-22 22:14:10 +02:00
M0dii d2192e3195 Update Plugins-using-PlaceholderAPI.md
Added VenturaCalendar.
2021-07-22 23:11:09 +03:00
M0dii c01acfba77 Update Placeholders.md
Change resource ID.
2021-07-22 21:54:44 +03:00
M0dii a494add04c Update Placeholders.md 2021-07-22 21:48:38 +03:00
Andre_601 059047905f Update formatter placeholders 2021-07-22 17:28:06 +02:00
Andre_601 fa717c34ef fix code examples 2021-07-22 12:56:56 +02:00
Andre_601 e16287405b Update nav entries (#674)
* Update nav entries

* Update Home.md
2021-07-22 01:36:43 +02:00
Andre_601andStar afdf80bf00 Rework PlaceholderExpansion page (#654)
* Rework PlaceholderExpansion page

* typo

* Implement suggestions of FunnyCube

* Apply suggestions from code review

Co-authored-by: Star <iamstarmism@gmail.com>

* Update wiki/PlaceholderExpansion.md

Co-authored-by: Star <iamstarmism@gmail.com>

* Rename "With a Plugin (Internal Jar)" to "With a Plugin (Internal Class)"

Co-authored-by: Star <iamstarmism@gmail.com>
2021-07-22 01:29:30 +02:00
Andre_601 ec7943fe0a Fix formatting too 2021-07-17 22:23:28 +02:00
Andre_601 6493963d8a Forgot the list-entry 2021-07-17 22:22:22 +02:00
Andre_601 c48e11bd70 Add OreMarket placeholders (#671)
* Add OreMarket placeholders

* Update Plugins-using-PlaceholderAPI.md

* Add URL
2021-07-17 22:18:53 +02:00
b4f6831e54 Update development from master (#662)
* Add contributing and expansion section

* Start using new Issue template system

* Create bug_report.yml

* Rename feature_request.md to feature_request_old.md

* Create feature_request.yml

* fix unique name

* Update feature_request_old.md

* Add Checkboxes

* Add checkboxes

* disable default issue body

* Delete bug_report_old.md

* Delete feature_request_old.md

* Rename bug_report_new.yml to bug_report.yml

* Check if deleting this fixed the PR...

* Use description in favour of about

* improve feature_request.md

* Update bug_report.yml

* Assign "Type: Issue (Unconfirmed)" label

* Use lists and not comma-separated string

* Update feature_request.yml

* Use id option for error and dump fields

* Add field for logs

* Remove deprecated issue_body type

* Update feature_request.yml

* Improve description of bug_report.yml

* Initial 1.17 Changes

* add render

* Revert build.gradle dependencies change

* Fixed duplicate files

* Initial test on adventure

* started moving to pure adventure

* finished kyori impl

* added 1.17 to nmsversion (what does this even do)

* removed dev for release

* added dev back

Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com>
Co-authored-by: darbyjack <admin@glaremasters.me>
Co-authored-by: PiggyPiglet <noreply@piggypiglet.me>
2021-07-11 01:37:09 +02:00
PiggyPiglet 6348c88c6f added dev back 2021-07-10 12:17:08 +08:00
PiggyPiglet 5fb45d13da removed dev for release 2021-07-10 12:16:37 +08:00
PiggyPiglet 5710972288 Merge remote-tracking branch 'origin/master' 2021-07-10 11:27:08 +08:00
PiggyPiglet 63955511a8 added 1.17 to nmsversion (what does this even do) 2021-07-10 11:26:56 +08:00
PiggyPiglet 9a7790c808 Merge pull request #661 from PlaceholderAPI/adventure
Adventure
2021-07-09 17:00:44 +08:00
PiggyPiglet 3abc78ff64 Merge pull request #660 from PlaceholderAPI/development
Sync Dev with master (#659)
2021-07-09 15:50:01 +08:00
PiggyPiglet c4789b7db0 finished kyori impl 2021-07-09 12:24:36 +08:00
PiggyPiglet d7a4acc2f5 started moving to pure adventure 2021-07-07 15:37:35 +08:00
darbyjack dd7751332f Initial test on adventure 2021-07-06 11:59:17 -05:00
Andre_601 7b50453294 Add new Essentials placeholders 2021-07-03 17:56:32 +02:00
fa7c30df80 Sync Dev with master (#659)
* Add contributing and expansion section

* Start using new Issue template system

* Create bug_report.yml

* Rename feature_request.md to feature_request_old.md

* Create feature_request.yml

* fix unique name

* Update feature_request_old.md

* Add Checkboxes

* Add checkboxes

* disable default issue body

* Delete bug_report_old.md

* Delete feature_request_old.md

* Rename bug_report_new.yml to bug_report.yml

* Check if deleting this fixed the PR...

* Use description in favour of about

* improve feature_request.md

* Update bug_report.yml

* Assign "Type: Issue (Unconfirmed)" label

* Use lists and not comma-separated string

* Update feature_request.yml

* Use id option for error and dump fields

* Add field for logs

* Remove deprecated issue_body type

* Update feature_request.yml

* Improve description of bug_report.yml

* Initial 1.17 Changes

* add render

* Revert build.gradle dependencies change

* Fixed duplicate files

Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com>
Co-authored-by: darbyjack <admin@glaremasters.me>
2021-07-01 21:03:01 +02:00
darbyjack 89053354e9 Fixed duplicate files 2021-07-01 09:24:01 -05:00
Andre_601 ead63ca763 Revert build.gradle dependencies change 2021-07-01 16:21:49 +02:00
Andre_601 0fa592383f Merge branch 'development' into master 2021-07-01 16:16:29 +02:00
PiggyPiglet 7df3a5c6e0 Merge pull request #657 from Starmism/development
Small changes on the correct branch!
2021-07-01 22:08:04 +08:00
Starmism c4a2256fff Appease the Pigman 2021-07-01 07:54:42 -06:00
Starmism 9b6b558002 Add method implementation checking and nullchecking for fields. 2021-06-30 10:13:47 -06:00
Starmism 94bf5fea57 POJO to help with checking that expansions have all required methods implemented. 2021-06-30 10:13:29 -06:00
Starmism 252802dcbe Removed nullcheck from hashcode, and moved it up the chain. 2021-06-30 10:13:12 -06:00
PiggyPiglet 8932a92049 Merge pull request #658 from PlaceholderAPI/1.17
Initial 1.17 Changes
2021-06-30 21:16:12 +08:00
Starmism 679ef90091 Re-add NotNull's
(cherry picked from commit 2bfd8e7e5efb25f648b8a6de934b1eff675481b1)
2021-06-30 05:59:57 -06:00
Star ac9b0c42b7 Update src/main/java/me/clip/placeholderapi/updatechecker/UpdateChecker.java
Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
(cherry picked from commit ccf4f5934386b005831757d298e2da9d8f46cb1a)
2021-06-30 05:59:52 -06:00
Starmism 14d885392c Fix version checker to compare the individual semver numbers instead of combining it together.
(cherry picked from commit ef5cd9d37680cc6cc1321ef2e04af09b44a2c681)
2021-06-30 05:59:45 -06:00
Starmism 0c102a1823 Remove the @NotNull's because they are overridden by expansion devs anyways, and it turns out people can make them null anyways. This adds a hashcode check and pretty error for it.
(cherry picked from commit f5386d4ca55c23b54f3c5f952f08040b0967f4a3)
2021-06-30 05:59:33 -06:00
Starmism 4c968f012d Cleanup build.gradle
(cherry picked from commit 7750ba7033dc9fdf40d55fcd9ecc20a94819a7c1)
2021-06-30 05:59:22 -06:00
Andre_601 ba71486151 Merge pull request #655 from LOOHP/docs/wiki
Update InteractionVisualizer placeholders
2021-06-30 11:35:46 +02:00
LOOHP e1269d6c86 Update InteractionVisualizer placeholders 2021-06-30 13:48:22 +08:00
Andre_601 438a665b74 add render 2021-06-27 14:31:15 +02:00
PiggyPiglet 247a5cde8f Merge pull request #623 from PlaceholderAPI/feature/621-build-jars-on-pr
Build jars on PR (Compile and build validation)
2021-06-26 11:51:00 +08:00
Andre_601 aa9ac65d02 Merge pull request #650 from SaltyAimbOtter/patch-1
update BetonQuest docs link
2021-06-25 23:34:36 +02:00
SaltyAimbOtter ba983f7fb3 update BetonQuest docs link 2021-06-25 23:23:04 +02:00
Andre_601 af268c4941 adoPt
I always make that mistake...
2021-06-25 16:33:27 +02:00
Andre_601 4c4b1602d9 Build against Java 8, 11 and 16 2021-06-25 16:32:45 +02:00
PiggyPiglet 8c69a164b8 Merge pull request #649 from Vshnv/patch/expansion-classloader
Fixed issue with expansions not being able to access their resources
2021-06-25 22:11:58 +08:00
Vaishnav Anil df8583df57 Close URLClassLoader if Expansion class was not found 2021-06-25 05:08:14 +05:30
Vaishnav Anil 09e68e7510 Extracted URLClassLoader out of try-with-resources block 2021-06-25 05:07:14 +05:30
Andre_601 2c223ffc87 Merge pull request #647 from cj89898/docs/wiki
Added 2.3.0 Checkitem changes
2021-06-20 18:38:27 +02:00
cj89898 5571ba5d70 Added 2.3.0 Checkitem changes 2021-06-20 10:49:28 -05:00
Andre_601 b77b1b9649 Update Placeholders.md 2021-06-17 14:49:16 +02:00
Andre_601 bf9b34eb57 Merge pull request #645 from stumper66/docs/wiki
LevelledMobs Wiki Addition
2021-06-17 14:45:07 +02:00
Penal BuffaloandAndre_601 215fd7e3f0 Update wiki/Placeholders.md
Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
2021-06-17 07:44:14 -05:00
stumper66 aca624c2d3 LevelledMobs
Added LevelledMobs info to the wiki
2021-06-17 07:26:07 -05:00
Andre_601 5826390251 Merge pull request #642 from garagepoort/feature/add_staffplusplus_wiki
Add staff++ to the wiki
2021-06-15 21:59:55 +02:00
David Maes a91a5c85ba Better phrasing 2021-06-15 21:57:47 +02:00
David Maes 156243a549 Add staff++ to the wiki 2021-06-15 21:52:32 +02:00
Andre_601 eceb236121 Merge pull request #640 from cj89898/docs/wiki
Update Placeholders.md
2021-06-11 11:43:03 +02:00
darbyjack 71b5433326 Initial 1.17 Changes 2021-06-11 01:33:29 -05:00
cj89898 2c8314200f Update Placeholders.md
Added 2.2.0 checkitem placeholder
2021-06-10 21:52:36 -05:00
Andre_601 0b70ea61aa Merge pull request #639 from darbyjack/docs/wiki
Added in some missing placeholders for Player Expansion
2021-06-09 16:00:38 +02:00
darbyjack ac31e107ad Added in some missing placeholders 2021-06-09 08:58:49 -05:00
Andre_601 b9230ef9c5 Merge pull request #631 from broken1arrow/docs/wiki
Docs/wiki
2021-05-13 14:58:20 +02:00
broken1arrow 06e6765870 Try for the 10 times to make it right
See if this work better
2021-05-13 14:45:46 +02:00
broken1arrow 5ac579e878 Revert "Has change and add descriptions"
This reverts commit a4d8009ce4.
2021-05-13 14:41:33 +02:00
broken1arrow a4d8009ce4 Has change and add descriptions
Try other way and see if this work better to pull uppdates.
2021-05-12 17:19:05 +02:00
Andre_601 0df265881a Add CalculateNumbers 2021-05-12 00:03:34 +02:00
Andre_601 5dbd58076a Add %rng_online_player% 2021-05-08 14:17:19 +02:00
Andre_601 c3922de323 Update Commands.md 2021-05-07 23:45:29 +02:00
Andre_601 0f118f12bc Merge pull request #626 from Lorenzo0111/patch-1
Update RocketPlaceholders documentation url
2021-05-04 17:12:15 +02:00
Lorenzo edd3153acd Update documentation url 2021-05-04 16:24:18 +02:00
Andre_601 748b9f33f7 Build jars on PR (Compile and build validation) 2021-04-26 18:05:42 +02:00
Andre601 230e36c55e [Wiki] Add Lands 2021-04-23 00:08:00 +02:00
Andre_601 0f7294972e Merge pull request #618 from PlaceholderAPI/feature/improve-placeholders-page
Redesign Placeholders page and other pages
2021-04-22 23:53:37 +02:00
Andre_601 d14f319eb4 Improve description of bug_report.yml 2021-04-21 14:30:46 +02:00
Andre_601 0927760d76 Merge pull request #619 from PlaceholderAPI/feature/remove-issue-body-field
Remove deprecated issue_body type
2021-04-21 14:25:40 +02:00
Andre_601 91af12f575 Update feature_request.yml 2021-04-21 14:24:40 +02:00
Andre_601 5dbbe01b95 Remove deprecated issue_body type 2021-04-21 14:24:14 +02:00
Andre601 30b5abda19 Fix wrong links 2021-04-20 23:30:43 +02:00
Andre601 a8e996fa26 Redesign Placeholders page and other pages 2021-04-20 23:21:24 +02:00
Andre_601 3f83312454 Merge pull request #616 from Warriorrrr/update-towny-placeholders
Update Towny placeholders
2021-04-18 03:23:41 +02:00
Warrior 0b1bd1c265 Forgot the dot. 2021-04-18 02:40:30 +02:00
Warrior b747720f36 Update towny placeholders 2021-04-18 02:33:40 +02:00
Andre_601 be34f28fd3 Merge pull request #615 from Hempfest/docs/wiki
Docs/wiki
2021-04-17 11:45:31 +02:00
Hempfest 9843d84ac3 Updated Clans Pro Listing.
New placeholders.
2021-04-17 02:43:19 -07:00
Andre_601 37de42f4a7 Merge pull request #613 from MysteriousKyle/docs/wiki
Addition of a plugin using PalaceholderAPI
2021-04-14 18:01:05 +02:00
Kyle 5595bc144f Addition of a plugin using PalaceholderAPI 2021-04-14 10:56:27 -05:00
Andre_601 9b2e7bb3ca Merge pull request #611 from thienbao860/patch-2
Update placeholders, clear Spectator expansion
2021-04-13 18:23:16 +02:00
thienbao860 8b5ead7a13 Update placeholders, clear Spectator expansion 2021-04-13 23:18:39 +07:00
Andre_601 0c6dd5466c Merge pull request #610 from PlaceholderAPI/fix/update-missing-copyright
Update Copyright
2021-04-13 17:59:21 +02:00
Andre601 41275509b2 Undo renaming of boolean 2021-04-13 17:58:42 +02:00
Andre601 4e8b1b47d1 Re-add removed code
That should actually NOT be here...
2021-04-13 17:57:59 +02:00
Andre601 d0e62e6434 Update Copyright
~ Fixed a typo and updated missed files from #543
2021-04-13 17:54:57 +02:00
Andre_601 2086fcb299 Merge pull request #583 from HSGamer/patch-1
should it use setBracketPlaceholders??
2021-04-13 17:20:59 +02:00
Andre_601 b3ea920b41 Merge pull request #608 from CMPSCjg/patch-1
Add 2 New TokensPlus Placeholders
2021-04-12 17:52:22 +02:00
CMPSCjg 001fa6bcf2 Add 2 New TokensPlus Placeholders 2021-04-12 11:49:16 -04:00
PiggyPiglet 3a31c5cb78 Merge pull request #485 from PlaceholderAPI/fix/477-remove-gson
Remove Gson
2021-04-12 21:40:55 +08:00
PiggyPiglet 20b2a69b5e Merge pull request #558 from PlaceholderAPI/development
Sync Master branch with Development (Possible Release)
2021-04-12 21:35:32 +08:00
PiggyPiglet 682717660f Merge pull request #546 from PlaceholderAPI/feature/add-sections
Add contributing and expansion section
2021-04-12 21:16:18 +08:00
PiggyPiglet 7b7bfb7306 Merge pull request #543 from ElijahRus250/master
2021 🥳
2021-04-12 21:13:38 +08:00
Andre_601 09043c6aaf Merge pull request #607 from RobinDeBaets/patch-1
Add %statistic_mob_kills%
2021-04-10 17:24:03 +02:00
RobinDeBaets f711500d80 Add %statistic_mob_kills% 2021-04-10 17:01:54 +02:00
Andre_601 8d6aa7c801 Merge pull request #606 from Lorenzo0111/patch-1
Edit RocketPlaceholders on the wiki
2021-04-02 19:36:09 +02:00
Lorenzo 04968cb437 Update Plugins-using-PlaceholderAPI.md 2021-04-02 17:01:52 +02:00
Andre_601 048c539fff Merge pull request #604 from Paul19988/docs/wiki
Add entry for Expansion "TeamsExpansion"
2021-03-31 17:28:49 +02:00
Andre_601 501d1bbbdd Add minor corrections 2021-03-31 17:28:14 +02:00
Paul Baird e4a6faa22a Corrected ecloud link for name change 2021-03-31 16:09:15 +01:00
Paul Baird c3bdc90168 Corrected entry and added ecloud command 2021-03-31 15:59:44 +01:00
Paul Baird 79ec3c8f95 Added TeamExpansion in correct place 2021-03-31 15:29:46 +01:00
Paul Baird e9e4caf989 Add TeamsExpansion placeholder expansion 2021-03-31 15:24:25 +01:00
Andre_601 0b1a3ced9e Merge pull request #602 from matahombres/patch-3
Update advancements placeholder
2021-03-27 17:14:34 +01:00
matahombres b55261a62f Update advancements placeholder 2021-03-27 17:06:25 +01:00
Andre_601 8c633c8943 Merge pull request #600 from LOOHP/docs/wiki
Add %interactivechat_invdisplaylayout% placeholder
2021-03-26 14:58:56 +01:00
LOOHP 8757217fb6 Add %interactivechat_invdisplaylayout% placeholder 2021-03-26 21:53:43 +08:00
Andre_601 8f796e3940 Add field for logs 2021-03-26 14:53:02 +01:00
Andre_601 bf1527a40f Use id option for error and dump fields 2021-03-26 14:42:20 +01:00
Andre_601 a65de95b16 Merge pull request #599 from Alpha018/wiki_update
modify: Change wiki to use new placeholder
2021-03-25 07:11:49 +01:00
Alpha018 fb8572313e modify: Change wiki to use new placeholder 2021-03-25 03:07:49 -03:00
vk2gpz 2fc28777b7 added %vkautopickup_autosmelt% and %vkautopickup_autoblock% to VKAutoPickup. 2021-03-25 12:56:26 +11:00
Andre_601 ffd493fea9 Merge pull request #597 from CMPSCjg/patch-2
Add TokensPlus Placeholder
2021-03-24 21:37:32 +01:00
Andre_601 b207cbf03e Add plugin to Plugins using PlaceholderAPI page 2021-03-24 21:37:06 +01:00
CMPSCjg 72239801d8 Update Placeholders.md 2021-03-24 16:19:33 -04:00
CMPSCjgandAndre_601 33ff83d102 Update wiki/Placeholders.md
My bad, thought I updated the URL to reflect this format.

Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
2021-03-24 16:16:04 -04:00
CMPSCjg 031625e241 Add TokensPlus Placeholder 2021-03-24 15:58:13 -04:00
Andre_601 ec127dbeb1 Merge pull request #595 from PlaceholderAPI/docs/wiki
Sync Development and docs/wiki
2021-03-24 09:17:58 +01:00
Andre_601 5d80119fcd Merge pull request #594 from PlaceholderAPI/feature/wiki-add-vkautopickup
Add VKAutoPickup
2021-03-24 09:14:56 +01:00
Andre_601 f6c972c9a2 Add VKAutoPickup 2021-03-24 09:12:31 +01:00
Andre_601 a0b256c17d Merge pull request #593 from lucko/patch-1
Update LuckPerms placeholders
2021-03-21 14:58:22 +01:00
lucko a66cae9a6b Update LuckPerms placeholders 2021-03-21 13:52:58 +00:00
Andre_601 7f6122f8b8 Merge pull request #591 from ajgeiss0702/docs/wiki
Update ajParkour + add ajLeaderboards placeholders
2021-03-19 16:53:14 +01:00
ajgeiss0702 ee7257208a Update ajParkour + add ajLeaderboards 2021-03-19 08:47:51 -07:00
Andre_601 87ea46a4dd Merge pull request #585 from PlaceholderAPI/fix/change-to-stringlist
Use lists and not comma-separated string
2021-03-11 22:09:05 +01:00
Andre_601 d221a3f38a Update feature_request.yml 2021-03-11 22:08:51 +01:00
Andre_601 f62980606a Use lists and not comma-separated string 2021-03-11 22:07:48 +01:00
Andre_601 c2ab9f5b85 Assign "Type: Issue (Unconfirmed)" label 2021-03-08 18:08:35 +01:00
Andre_601 2c925983a8 Merge pull request #584 from PlaceholderAPI/fix/issue-form-about-deprecation
Use description in favour of about
2021-03-08 18:07:02 +01:00
Andre_601 375e743124 Update bug_report.yml 2021-03-08 18:06:10 +01:00
Andre_601 78f76c8343 improve feature_request.md 2021-03-08 17:51:42 +01:00
Andre_601 33e4743e89 Use description in favour of about 2021-03-08 17:36:34 +01:00
Andre_601 b9b7104f6b Merge pull request #580 from PlaceholderAPI/feature/use-new-issue-system
Start using new Issue template system
2021-03-08 17:34:02 +01:00
Andre_601 a45f420069 Check if deleting this fixed the PR... 2021-03-08 17:26:21 +01:00
Andre_601 a7d92f569f Rename bug_report_new.yml to bug_report.yml 2021-03-08 16:12:25 +01:00
Andre_601 73f55735b4 Delete feature_request_old.md 2021-03-08 16:10:43 +01:00
Andre_601 a15c6b4855 Delete bug_report_old.md 2021-03-08 16:10:34 +01:00
Andre_601 48f7ffe089 disable default issue body 2021-03-08 15:59:52 +01:00
Andre_601 c607338003 Add checkboxes 2021-03-08 15:56:26 +01:00
Andre_601 66a7a6d199 Add Checkboxes 2021-03-08 15:53:04 +01:00
Andre_601 1d7bf239ea Update feature_request_old.md 2021-03-08 15:44:41 +01:00
Andre_601 43a5db7711 fix unique name 2021-03-08 15:44:10 +01:00
Huynh Tien 0e56ea9503 should it use setBracketPlaceholders?? 2021-03-06 20:37:43 +07:00
Andre_601 d640d801e6 Create feature_request.yml 2021-02-28 11:00:23 +01:00
Andre_601 b5c70dedcb Rename feature_request.md to feature_request_old.md 2021-02-28 10:48:06 +01:00
Andre_601 a8bcf0e14d Create bug_report.yml 2021-02-28 10:41:15 +01:00
Andre_601 0c13004040 Start using new Issue template system 2021-02-28 10:05:16 +01:00
Andre_601 cc05a3508b Merge pull request #579 from LOOHP/docs/wiki
Adds and updates InteractiveChat, InteractionVisualizer and HoloMobHealth on the wiki
2021-02-28 07:56:43 +01:00
LOOHP 458030c575 Added HoloMobHealth 2021-02-28 14:50:38 +08:00
LOOHP 3b4641c26c Added InteractiveChat, Updated InteractionVisualizer 2021-02-28 14:41:13 +08:00
Andre_601 9b03af17b6 Merge pull request #576 from matahombres/patch-2
Added more placeholders to wiki
2021-02-18 19:25:00 +01:00
matahombres 72b2be4933 Added more placeholders to wiki
Add more advancements placeholders
2021-02-18 18:47:14 +01:00
Andre_601 2f0f717d44 Update formatter expansion list 2021-02-17 17:15:59 +01:00
Andre_601 e3bef564f2 Merge pull request #574 from Kqliber/patch-1
Added extra placeholders to wiki
2021-02-15 23:04:27 +01:00
Kqliber 319be0e043 Added extra placeholders
Added the RNG expansion 
Updated the chat reaction placeholders list
2021-02-15 21:54:44 +00:00
Andre_601 431483da89 Merge pull request #571 from Hempfest/master
PR to correct branch.
2021-02-14 17:57:04 +01:00
Hempfest d07376245c minor edits 2021-02-14 08:37:00 -08:00
Hempfest 2aa6ac2b63 minor edit 2021-02-14 08:35:09 -08:00
Hempfest 03a362817c Updated my plugin listings.
Updated listing for Clans [Free] and Clans [Pro] Listings. Both plugins are utilizing the API and are available on spigot as i type this.
2021-02-14 06:32:15 -08:00
Hempfest 2dc972423a Updated listings for both of my plugins
Updated listing for Clans [Free] and Clans [Pro] Listings. Both plugins are utilizing the API and are available on spigot as i type this.
2021-02-14 06:30:38 -08:00
Andre_601 4b43d35bcc Merge pull request #567 from ArVdC/docs/wiki
Add TimeManager placeholders
2021-02-13 21:36:54 +01:00
ArVdC 350ec10186 Update Plugins-using-PlaceholderAPI.md 2021-02-13 21:14:21 +01:00
ArVdC 0104e48b72 Update Placeholders.md 2021-02-13 21:13:43 +01:00
Andre_601 a88f7aab30 Merge pull request #562 from HappyRogelio7/patch-2
Update Placeholders.md
2021-02-10 22:48:51 +01:00
Andre_601 e91ed337cc Merge pull request #563 from HappyRogelio7/patch-3
Update Plugins-using-PlaceholderAPI.md
2021-02-10 22:48:28 +01:00
HappyRogelio7 32d5b7697d Update Plugins-using-PlaceholderAPI.md 2021-02-10 13:21:43 -03:00
HappyRogelio7 c23d35d219 Update Placeholders.md 2021-02-10 13:18:31 -03:00
Andre_601 6b04b6c39b Use pull_request_target 2021-02-10 15:29:33 +01:00
Andre_601 021d5b1f47 Update label-commenter-config.yml 2021-02-10 15:29:03 +01:00
Andre_601 b0f14c6e4e Merge pull request #559 from RoinujNosde/docs/wiki
Update Placeholders.md
2021-02-10 01:34:47 +01:00
Edson Passos cd3a0f52d5 Update Placeholders.md
Changes SimpleClans' resource page link
Adds link to wiki page listing placeholders
2021-02-09 19:41:36 -03:00
Andre_601 cc5835423f Improve Wiki Readme 2021-02-09 04:46:18 +01:00
Andre_601 155fc0592a Branch is actually called development 2021-02-09 04:01:29 +01:00
Andre_601 a163c72e93 Update Placeholders.md 2021-02-04 18:09:44 +01:00
Andre_601 562f6a852d Add Shortcut expansion 2021-02-04 15:02:35 +01:00
Andre_601 bfb88781af Improve placeholder pattern and info 2021-02-04 14:59:14 +01:00
Andre_601 ff4656bbe7 Update formatter placeholders 2021-02-02 22:17:32 +01:00
Andre_601 c44b08e2e9 Merge pull request #553 from SrBedrock/patch-1
Update GriefPrevention Expansion
2021-01-31 22:35:10 +01:00
ThiagoROX 4d14b583ff Update GriefPrevention Expansion
Add %griefprevention_bonusclaims_formatted% from GriefPrevention Expansion version 1.5.2
2021-01-31 18:30:13 -03:00
Andre_601 892f0727e8 Fix invalid link tag 2021-01-29 03:29:35 +01:00
PiggyPiglet 3635ecb8b4 Merge pull request #528 from PlaceholderAPI/feature/add-faq-entry
Update FAQ
2021-01-29 10:11:19 +08:00
PiggyPiglet dd2981b13e Merge pull request #443 from PlaceholderAPI/feature/update-documentation
Update Javadoc documentation
2021-01-29 10:10:12 +08:00
Andre_601 ff60343089 Add contributing and expansion section 2021-01-24 17:47:03 +01:00
Andre_601 fb77c42bba Brag a bit more about this 2021-01-24 17:35:30 +01:00
Andre_601 a65b9ad49e Merge pull request #545 from eggsy/master
🔧 update wrong (time_played) statistic types on wiki
2021-01-24 15:23:28 +01:00
EGGSY 0ed32c7ddd 🔧 update wrong statistic types 2021-01-24 15:15:44 +03:00
Andre601 f1350783fc Use repo links 2021-01-21 01:58:44 +01:00
Andre601 5ac2efd9c6 Trying out img folder in wiki 2021-01-21 01:54:34 +01:00
ElijahRus250 a7247acbb3 2021 🥳 2021-01-20 15:29:13 -05:00
Andre_601 0b3663ee87 Merge pull request #542 from cj89898/docs/wiki
Updated deluxemenus on wiki
2021-01-20 16:04:28 +01:00
cj89898 ba9b38dd0e Update Plugins-using-PlaceholderAPI.md
Updated deluxemenus to providing placeholders
2021-01-20 08:58:59 -06:00
cj89898 62bb68ee94 Update Placeholders.md
Added deluxemenus
2021-01-20 08:57:39 -06:00
Andre_601 e96c6fb7ef Merge pull request #540 from steve4744/docs/wiki
update parkour placeholders
2021-01-19 02:07:15 +01:00
BuildTools c04c101de5 update parkour placeholders 2021-01-19 00:19:36 +00:00
Andre_601 5ab2c05821 Merge pull request #539 from LeonMangler/patch-1
Update PremiumVanish placeholders
2021-01-18 22:25:42 +01:00
Leon Mangler 9b9e0e4b9e Update PremiumVanish placeholders 2021-01-18 22:00:02 +01:00
Andre_601 c3ee5bbdc0 Actually was renamed too 2021-01-11 22:28:32 +01:00
Andre_601 fb70ba6403 Update invalid link 2021-01-11 22:22:34 +01:00
Andre_601 f605db479b Improve message 2021-01-11 22:16:39 +01:00
Andre_601 175308ecf5 Merge pull request #533 from granny/docs/wiki
DiscordSRV placeholders are now integrated in DiscordSRV
2021-01-07 23:39:04 +01:00
granny 2adf2845fd DiscordSRV placeholders are now integrated in DiscordSRV 2021-01-07 14:04:27 -08:00
Andre_601 0438c67f7d Markdown rendering 2021-01-06 17:33:24 +01:00
Andre_601 47d6928b9f Mention headers 2021-01-06 17:30:14 +01:00
Andre_601 deee5a1c39 Use new message 2021-01-06 17:09:08 +01:00
Andre_601 c9492564e0 Mention Discussion entry 2021-01-06 16:42:32 +01:00
Andre_601 0c826a288e Link to the wiki folder 2021-01-06 14:40:33 +01:00
PiggyPiglet 093ba4d68c Merge pull request #530 from PlaceholderAPI/fix/515-proper-expansion-null-checks
Fix contract violations & add null checks which should close #515
2021-01-04 10:25:48 +08:00
PiggyPigletandAndre_601 1478aabb5e remove an from log message
Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
2021-01-04 10:25:38 +08:00
PiggyPiglet 07ac8e41c5 Fix contract violations & add null checks which should close #515 2021-01-03 23:42:23 +08:00
PiggyPiglet f0dccbd594 update gradle 2021-01-03 23:35:37 +08:00
PiggyPiglet 26fdedd989 Merge pull request #529 from PlaceholderAPI/fix/527-improve-parse-command
Fix resolvePlayer method
2021-01-03 23:28:52 +08:00
PiggyPiglet d342c73f24 Merge pull request #517 from PlaceholderAPI/fix/515-improve-logging
Fixing issues for logging when Expansion doesn't contain any classes.
2021-01-03 22:40:20 +08:00
Andre601 0a52ef7219 Use a generic log message for this 2021-01-03 15:38:10 +01:00
Andre601 6a69ec833f Use getPlayerExact 2021-01-01 18:19:07 +01:00
Andre_601 b540127651 Add a little © 2020-12-31 22:12:51 +01:00
Andre601 8fa0f73a46 Fix resolvePlayer method 2020-12-31 18:20:11 +01:00
Andre_601 077a221c3f Update FAQ.md 2020-12-31 15:12:09 +01:00
Andre_601 301a1c9ac5 Merge pull request #526 from cj89898/docs/wiki
Update Placeholders.md
2020-12-30 11:51:36 +01:00
cj89898 0db15f96ae Update Placeholders.md 2020-12-29 20:17:44 -06:00
Andre_601 9b2ea05875 Improve ExpansionsLoadedEvent's docs 2020-12-29 21:12:22 +01:00
Andre_601 27d8ae03e1 fix wrong var name 2020-12-29 18:54:39 +01:00
Andre_601 15e22ea115 Merge pull request #525 from Harieo/docs/wiki
Adds seasons plugin to Wiki
2020-12-29 18:31:54 +01:00
Harieo f398854c68 Added extra square brackets to match other links in Plugins-using-PlaceholderAPI.md 2020-12-29 16:57:12 +00:00
Harieo 29446c08b6 Reverted previous commit 2020-12-29 16:51:36 +00:00
Harieo 3d44f8ffdc Changed wiki.yml workflow to generate personal Wiki page 2020-12-29 16:48:29 +00:00
Harieo 61afb24d33 Added the Seasons plugin as a plugin using PlaceholderAPI 2020-12-29 16:42:32 +00:00
Andre_601 e8b5660eda Use invalid on PR too 2020-12-28 22:17:01 +01:00
Andre_601 d4744838ee Merge pull request #522 from PlaceholderAPI/master
Update docs/wiki from master
2020-12-28 22:12:50 +01:00
Andre_601 32f3e21ab7 Merge pull request #521 from weihao/docs/wiki
Added Ath wiki to docs branch
2020-12-28 22:11:48 +01:00
WeihaoandAndre_601 e6d57f81da Update wiki/Placeholders.md
Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
2020-12-28 16:10:53 -05:00
Weihao 818bf91c93 Merge branch 'docs/wiki' of https://github.com/weihao/PlaceholderAPI into docs/wiki 2020-12-28 16:10:24 -05:00
Weihao ac2c2b324e Improvements 2020-12-28 16:10:10 -05:00
WeihaoandAndre_601 cf9d07a856 Update wiki/Plugins-using-PlaceholderAPI.md
Co-authored-by: Andre_601 <11576465+Andre601@users.noreply.github.com>
2020-12-28 16:08:19 -05:00
Weihao 860239fa2b Added Ath 2020-12-28 15:50:55 -05:00
Andre_601 69f0ede0c6 Also check for PRs 2020-12-28 21:45:54 +01:00
Andre_601 480f13a3ce Now this should work 2020-12-28 15:46:06 +01:00
Andre601 b99335e5b2 First step at fixing #515 and for #516 2020-12-27 18:47:48 +01:00
Andre_601 e83eba9226 fix missing linebreak 2020-12-27 18:33:20 +01:00
Andre_601 278a5a4096 mention paste url 2020-12-27 14:12:01 +01:00
Andre_601 1cfa247f8c Seems to not work as intended 2020-12-26 23:32:12 +01:00
Andre_601 a3b2777d16 Merge branch 'master' into feature/update-documentation 2020-12-26 23:01:03 +01:00
Andre_601 3c9f6ea520 Only work on non-closed issues 2020-12-25 15:09:25 +01:00
Andre_601 15d2452b19 Merge pull request #514 from steve4744/docs/wiki
update parkour and tntrun_reloaded placeholders
2020-12-23 00:19:01 +01:00
BuildTools f582474fb1 update parkour and tntrun_reloaded placeholders 2020-12-22 23:10:58 +00:00
BuildTools b1662676f1 update parkour and tntrun_reloaded placeholders 2020-12-22 23:01:45 +00:00
PiggyPiglet 23943f41ad Merge pull request #513 from PlaceholderAPI/dont-fail-on-error
Javadoc Changes
2020-12-14 09:01:40 +08:00
darbyjack 3cd665a159 Javadoc Changes
- Don't fail on error
- Add license to new files that were merged
2020-12-13 18:58:55 -06:00
PiggyPiglet 4074192c0b Merge pull request #512 from PlaceholderAPI/fix/javadoc-build-errors
Fix Javadoc build errors
2020-12-14 08:54:27 +08:00
Andre601 59cd5982ad Complete fix 2020-12-14 01:52:46 +01:00
Andre601 b3893c38db Hopefully fixing all the JD issues 2020-12-14 01:31:40 +01:00
PiggyPiglet a3d6426084 Merge pull request #473 from PlaceholderAPI/fix/469
Fix wrong expansion get in /papi info
2020-12-14 08:09:24 +08:00
Andre_601 30a194c75d Update PlaceholderAPI.java 2020-12-14 01:08:40 +01:00
Glare 6431bcdeca Merge pull request #460 from ignissak/444-add-expansionsLoadEvent 2020-12-13 18:07:24 -06:00
PiggyPiglet 0d1978cece Merge pull request #454 from PlaceholderAPI/feature/add-getBoolean
Add missing getBoolean method
2020-12-14 08:04:49 +08:00
Andre_601 e7e9e81e85 Update VersionSpecific.java 2020-12-14 01:04:07 +01:00
Andre_601 ba22201311 Fix Javadoc build errors 2020-12-14 01:02:01 +01:00
PiggyPiglet f799835dd0 Merge pull request #429 from MrIvanPlays/patch/gradle-improvements
Attach sources and javadoc jar when deploying
2020-12-14 07:58:07 +08:00
PiggyPiglet 6f3dcf04fe Merge pull request #407 from PlaceholderAPI/change/update-contributing
Update Contributing file
2020-12-14 07:56:36 +08:00
Andre_601 6b03c38e40 Update label commenter action 2020-12-13 17:21:52 +01:00
Andre_601 f756fbb43b Update label-commenter-config.yml 2020-12-13 17:21:18 +01:00
Andre_601 f84702e3b2 Merge pull request #508 from PlaceholderAPI/feature/mention-github-discussions
Mention GitHub Discussions in Template chooser
2020-12-10 17:36:12 +01:00
Andre_601 9c750f50a2 Add Type:Question label 2020-12-09 18:10:19 +01:00
Andre_601 dcca454bad Mention GitHub Discussions in Template chooser
Adds a link to the new [GitHub Discussions page](https://github.com/PlaceholderAPI/PlaceholderAPI/discussions) of this Repository.
2020-12-09 13:10:11 +01:00
BlitzGamer-88 ffef826c94 Merge pull request #503 from rbluer/patch-1
Adding Prison placeholders
2020-11-28 09:43:11 +02:00
RbR 15e0a293eb Update Placeholders.md 2020-11-27 20:29:35 -05:00
RbR 11ed822845 Update Placeholders.md
Update the descriptions.
2020-11-27 20:25:37 -05:00
RbR 1e4af86172 Update Plugins-using-PlaceholderAPI.md
Added entry for Prison plugin.
2020-11-27 19:10:32 -05:00
RbR 5f9dffc3c7 Update Placeholders.md
Added the current placeholders for the Prison plugin.
2020-11-27 03:58:58 -05:00
Andre_601 93e83efb57 Rename label 2020-11-15 15:47:37 +01:00
Andre_601 0d9485ddec Add action for inactive issues. 2020-11-15 15:45:49 +01:00
Andre_601 1248010566 Merge pull request #501 from Lauriichan/docs/wiki
Added RealisticWorldGenerator to Plugin Placeholders sections in wiki
2020-11-05 12:22:23 +01:00
Laura Endreß d68fe7067c Update Plugins-using-PlaceholderAPI.md 2020-11-05 11:38:22 +01:00
Laura Endreß e16497618c Update Placeholders.md 2020-11-05 11:36:38 +01:00
PiggyPiglet 4cfd419565 Merge pull request #500 from PlaceholderAPI/1.16.4
Compile under 1.16.4 + add new NMS support
2020-11-03 21:19:48 +08:00
darbyjack f52bdbc458 Compile under 1.16.4 + add new NMS support 2020-11-02 14:35:55 -06:00
Andre_601 433dd7020c Merge pull request #499 from steve4744/docs/wiki
update tntrun_reloaded placeholders
2020-10-29 13:24:39 +01:00
BuildTools 4fef2dd82a update tntrun_reloaded placeholders 2020-10-29 12:21:19 +00:00
Andre_601 1e6fb502a6 Improve some text 2020-10-22 00:54:43 +02:00
Andre_601 b56ab1408e Merge pull request #493 from N0tMyFaultOG/docs/wiki
Update PlotSquared placeholders
2020-10-15 19:39:01 +02:00
NotMyFault 5dae844181 Update PlotSquared placeholders 2020-10-15 19:27:46 +02:00
Andre_601 329b46c042 Merge pull request #491 from steve4744/docs/wiki
Update Placeholders.md for Parkour
2020-10-08 12:45:31 +02:00
steve4744 e2dd16cf1c Update Placeholders.md 2020-10-08 10:56:35 +01:00
Andre_601 dc244849a1 Merge pull request #488 from PlaceholderAPI/change/improve-wiki-faq
Improve Wiki FAQ
2020-10-06 13:33:05 +02:00
Andre_601 736de5b633 Update FAQ.md 2020-10-02 11:58:38 +02:00
PiggyPiglet b31767ba4a Merge pull request #487 from GiansCode/patch-1
Update README
2020-09-28 23:25:04 +08:00
Gianluca Falcomer ae06fcd807 Update README 2020-09-28 17:23:25 +02:00
Andre_601 7108ffbb31 Update Placeholders.md 2020-09-27 15:36:57 +02:00
Andre_601 7a6b6d7ce4 Merge pull request #486 from thienbao860/patch-1
Expansion name shorten request
2020-09-27 15:35:36 +02:00
thienbao860 549a30b502 Update Placeholders.md 2020-09-27 20:05:55 +07:00
darbyjack c64946173b Implemented working version for 1.8.8 - 1.16.3 2020-09-25 19:08:56 -05:00
Andre_601 5bca9dc41f Remove Gson 2020-09-24 22:31:26 +02:00
Andre_601 5c830d7102 Merge pull request #484 from PlaceholderAPI/feature/481-add-plugins
Add plugins to wiki
2020-09-24 17:15:21 +02:00
Andre_601 400c0d5b5d Add plugins
- https://www.spigotmc.org/resources/83879/
- https://www.spigotmc.org/resources/67551/
- https://www.spigotmc.org/resources/68968/
- https://www.spigotmc.org/resources/21692/
2020-09-24 17:15:07 +02:00
Andre_601 c53d5b2abf Add Boxing and TicketsGUI
- https://www.spigotmc.org/resources/83879/
- https://www.spigotmc.org/resources/68968/
2020-09-24 17:06:22 +02:00
Andre_601 a842095fff Merge pull request #483 from PlaceholderAPI/fix/update-broken-links
Fix broken wiki links
2020-09-24 16:56:00 +02:00
Andre_601 c6e36fec2c Fix broken wiki links 2020-09-24 16:55:22 +02:00
Andre_601 fa7eeb5852 Add AlonsoLevels 2020-09-24 16:51:24 +02:00
Andre_601 b6bfe3f3ef Add AlonsoLevels 2020-09-24 16:49:10 +02:00
Andre_601 d6cfc8beae Merge pull request #475 from stijnb1234/docs/wiki
Updated ThemePark
2020-09-13 21:58:26 +02:00
Stijn Bannink 83c35ced32 Moved to command 2020-09-13 21:57:11 +02:00
Andre_601 b9bdb3167a Fix outdated Info 2020-09-13 21:48:02 +02:00
Stijn Bannink dfec6c4c8b Updated ThemePark
v1.2 is live.
2020-09-13 19:19:04 +02:00
Andre_601 35838aa229 Fix wrong expansion get in /papi info 2020-09-13 00:30:27 +02:00
Andre_601 ee0df86f84 Merge pull request #472 from PlaceholderAPI/feature/470-add-BetonQuest
Add BetonQuest
2020-09-13 00:24:58 +02:00
Andre601 0650de95d6 Add BetonQuest 2020-09-13 00:22:51 +02:00
Andre_601 279f1d0c07 Merge pull request #471 from PlaceholderAPI/feature/468-add-SimpleCoins
Add SimpleCoins to wiki
2020-09-13 00:21:40 +02:00
Andre_601 5a8738e711 Remove useless empty line 2020-09-13 00:21:26 +02:00
Andre601 00b95461b6 Add SimpleCoins to the wiki 2020-09-13 00:11:52 +02:00
Andre_601 a74f78bd73 Update placeholders 2020-09-12 22:05:06 +02:00
Andre_601 9d35f4c3e6 Fix issue commenter 2020-09-12 22:02:25 +02:00
darbyjack 325cd2d284 Added support for 1.16.2 NMS changes 2020-09-06 16:39:15 -05:00
Andre_601 d4f0eb91ef Merge pull request #466 from xknat/patch-1
Added SkinsRestorerPlaceholders
2020-09-06 22:37:15 +02:00
xknat 5ab228d1d8 Added SkinsRestorerPlaceholders 2020-09-06 21:30:12 +02:00
xknat 64e0f7e500 Added SkinsRestorerPlaceholders 2020-09-06 21:29:03 +02:00
xknat 7998d4d666 Add SkinsRestorerPlaceholders 2020-09-06 21:27:00 +02:00
xknat 2a91d34a65 Added SkinsRestorerPlaceholders 2020-09-06 21:25:06 +02:00
xknat ac717c7600 Added SkinsRestorerPlaceholsers 2020-09-06 21:18:26 +02:00
Andre_601 e13b91cb22 Merge pull request #465 from svenar-nl/docs/wiki
Docs/wiki
2020-09-05 00:53:33 +02:00
Sven Arends fdfca9da42 Update Plugins-using-PlaceholderAPI.md
Updated PowerRanks information
2020-09-05 00:49:21 +02:00
Sven Arends 1556e15a1a Update Placeholders.md
Updated PowerRanks Placeholders
2020-09-05 00:48:42 +02:00
Andre_601 7691dd93ad Add and improve responses 2020-09-02 12:08:50 +02:00
Jacob Bordas 2c13acfd30 Changes regarding review by Andre
Signed-off-by: Jacob Bordas <methalicity@gmail.com>
2020-09-01 01:31:52 +02:00
Andre_601 40f1fcbce2 Merge pull request #461 from Bimmr/docs/wiki
Updated McInfected Placeholders
2020-08-31 22:01:50 +02:00
Randy 456958d647 Updated McInfected Placeholders 2020-08-31 13:33:21 -04:00
Jacob Bordas 7c404db56b Added event when all expansions are loaded for developers. 2020-08-31 13:32:11 +02:00
Andre_601andPiggyPiglet 18cfd438b8 Update .github/CONTRIBUTING.md
Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com>
2020-08-31 03:00:24 +02:00
Andre_601 d5e27252cf Fix wrong link 2020-08-31 02:52:16 +02:00
Andre_601 3fe0f0143c Add note about wiki PRs 2020-08-31 02:50:30 +02:00
Andre_601 61a71b9e73 Add info about target branch. 2020-08-31 02:50:08 +02:00
Andre_601 e542dabd52 Merge pull request #459 from fredthedoggy/patch-1
Update BentoBox Placeholders
2020-08-31 02:46:10 +02:00
fredthedoggy 9cde086436 Update BentoBox Placeholders
Update the out of date BentoBox placeholders
2020-08-30 20:32:51 -04:00
Andre_601 fe02939466 Add missing getBoolean method 2020-08-28 15:16:03 +02:00
Andre_601 f1c2315055 Add missing line 2020-08-28 14:53:50 +02:00
Andre_601 9681c518fc Merge pull request #453 from PlaceholderAPI/feature/451-add-streaming-drops
Add Streaming Drops (#451)
2020-08-28 14:51:02 +02:00
Andre_601 762bb409d3 Add Streaming Drop
https://www.spigotmc.org/resources/76996/
2020-08-28 14:50:48 +02:00
Andre_601 0394ba284b Add Streaming Drops (#451) 2020-08-28 14:46:57 +02:00
Andre_601 3e9dcdb53c Merge pull request #447 from steve4744/master
Update placeholders for tntrun_reloaded and parkour
2020-08-23 22:24:50 +02:00
BuildTools ddfaf4105d update placeholders for parkour 2020-08-23 17:44:23 +01:00
BuildTools 5b1df7c42a update placeholders for tntrun_reloaded 2020-08-23 17:27:55 +01:00
Andre_601andPiggyPiglet 7555bb0f97 Update .github/CONTRIBUTING.md
Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com>
2020-08-19 16:27:48 +02:00
Andre601 ab96120911 More comments... a lot more! 2020-08-18 23:15:23 +02:00
Andre_601 7371a576d6 Update Javadoc documentation 2020-08-18 18:37:44 +02:00
Andre_601 5d5ceb5902 Merge pull request #439 from Lorenzo0111/patch-1
Added RocketPlaceholsers
2020-08-13 14:45:43 +02:00
Andre_601 125d02fecd Add missing link 2020-08-13 14:45:02 +02:00
Andre_601 8c98a214f8 Add RocketPlaceholders
https://www.spigotmc.org/resources/82678/
2020-08-13 14:44:11 +02:00
Lorenzo 2a3e8dcec1 Added RocketPlaceholsers
Added RocketPlaceholsers which provides their own placeholders.  The placeholders are customizable from the config.
2020-08-13 10:10:17 +02:00
Andre_601 a996d9039e Merge pull request #437 from PlaceholderAPI/feature/label-commenter
Adding Label commenter
2020-08-12 23:17:39 +02:00
Andre_601 cfba92bf14 Add missing info about automated response. 2020-08-12 15:26:40 +02:00
Andre_601 41f408226e Update label-commenter-config.yml 2020-08-12 15:20:40 +02:00
Andre_601 58cfa92136 Add label-commenter-config.yml 2020-08-12 15:11:21 +02:00
Andre_601 f3309b76d1 Adding Label commenter 2020-08-12 14:58:04 +02:00
Andre_601 04bfa1e721 Update formatter placeholders 2020-08-12 13:48:31 +02:00
Andre_601 dc894c6212 Merge pull request #434 from PlaceholderAPI/master
Update docs/wiki from master
2020-08-10 22:30:00 +02:00
Andre_601 7c7025fdbb Merge pull request #433 from RobinDeBaets/master
Fix Statistic download information
2020-08-10 22:27:42 +02:00
RobinDeBaets 97a4eca0a7 Add back Statistic link 2020-08-10 22:24:06 +02:00
RobinDeBaets 5e4110b1b3 Remove outdated Statistic information 2020-08-10 22:22:53 +02:00
Andre_601 d1e3047445 Update CONTRIBUTING.md 2020-08-10 21:29:42 +02:00
Andre_601 c72515912d Add RocketJoin
https://www.spigotmc.org/resources/82520/
2020-08-10 21:21:48 +02:00
MrIvanPlays eb5a93dce2 Attach sources and javadoc jar when deploying 2020-08-09 10:22:21 +03:00
Andre_601 7cb3b3b7ec Add missing expansions 2020-08-08 18:35:36 +02:00
Ivan Pekov c648d6a541 Fix trailing/leading space after placeholder once and for all (#427) 2020-08-06 14:45:27 -04:00
extendedclip 2d72e274e3 account for empty strings 2020-08-06 14:08:48 -04:00
extendedclip b73d00e169 bstats might have an issue? 2020-08-06 14:05:33 -04:00
Ivan Pekov 5065623ab0 Attempt at fixing 413 (#422)
* Attempt at fixing 413

This is my (miserable) attempt at fixing #413
These changes basically fix some potential threading issues and (probably) #413
Local tests went fine for me, but more tests are required.

* Remove delay, fixed -> cached thread pool
2020-08-06 13:54:35 -04:00
Federico López 8698449e5d Refactorization of the TimeUtil utility class (#423)
* Refactored `TimeUtil` utility class.

* Minimized `TimeUtil#getRemaining`.
* Fixed a bug regarding how days and hours were calculated in `TimeUtil#getTime`.
* Ditched the use of `int`s and use `long`s instead.

* Implemented `int`-taking methods because my dumb ass didn't think it would break.
2020-08-06 13:43:14 -04:00
extendedclip 722e987b93 Dont trim 2020-08-06 13:27:58 -04:00
extendedclip a00cbf4be3 trim whitespaces 2020-08-06 11:44:34 -04:00
Andre_601 f235c60bef Update World placeholders 2020-08-06 13:48:58 +02:00
extendedclip a1d69cd25f Remove hashcode method 2020-08-05 11:53:06 -04:00
extendedclip f7504b99ca Add registerExpansion and unregisterExpansion back 2020-08-05 11:45:58 -04:00
extendedclip 02669e2435 Set builds to 2.10.10-dev 2020-08-04 12:47:05 -04:00
extendedclip 3d2fca277f 2.10.9 RELEASE 2020-08-04 12:29:50 -04:00
Andre_601 3e6d10e203 Fix formatting 2020-08-04 16:10:51 +02:00
Andre_601 f828857ce3 Add BuyCraft
https://www.spigotmc.org/resources/82261/
2020-08-04 16:09:31 +02:00
extendedclip eeb9c8d5db Restore pre 2.10.7 API functionality for the most part. Only things actually being removed in 2.11.0 are deprecated. No breaking API changes until 3.0 2020-08-04 10:04:34 -04:00
extendedclip 6d38f411ba Include &n 2020-08-03 16:21:56 -04:00
extendedclip 542ffd6b7b Rename dependency variable 2020-08-03 15:38:53 -04:00
extendedclip 2a559fd240 Fix quotations 2020-08-03 15:23:48 -04:00
extendedclip 51844cd291 Always provide a copy of the placeholder map 2020-08-03 13:54:28 -04:00
Andre_601 ec9d6295fb on their? Sounds better imo 2020-08-03 16:56:58 +02:00
Andre_601 19a80c2d26 Do some changes 2020-08-03 16:51:46 +02:00
extendedclip 12a358fbd0 Check if canRegister in LocalExpansionManager.register rather than in Expansion#register 2020-08-03 10:24:56 -04:00
extendedclip 0982505574 Maybe this will include the jetbrains annotations in the pom? 2020-08-03 10:00:59 -04:00
Andre_601 e3d71843ac Fix typos and more info 2020-08-03 13:41:35 +02:00
Funnycube 364635cd06 Merge pull request #417 from PlaceholderAPI/change/update-templates
Change/update templates
2020-08-03 21:27:33 +10:00
Andre_601 d3844711bc Update Feature Request template 2020-08-03 13:17:17 +02:00
Andre_601 81038dab80 Update PR template 2020-08-03 13:14:52 +02:00
Andre_601 514e25454d Update Bug report template 2020-08-03 13:11:41 +02:00
Funnycube 203f02029c Updated flex 2020-08-03 13:45:50 +10:00
Andre_601 eb20a80b37 Update API version badge 2020-08-01 20:51:48 +02:00
Andre_601 c2dc51c728 fix typo 2020-08-01 15:09:22 +02:00
extendedclip c38ecfc16c Bump to 2.10.9 dev builds 2020-08-01 00:06:41 -04:00
extendedclip 105b116529 2.10.8 2020-07-31 23:15:08 -04:00
extendedclip 6a78ff88d3 Include daddy codestyle in project 2020-07-31 23:04:06 -04:00
extendedclip dcc8dad4ea Format to Daddy code style 2020-07-31 22:52:07 -04:00
extendedclip cee6984818 Don't add license to config or plugin.yml 2020-07-31 22:37:00 -04:00
extendedclip 8a751cddd5 Use @name@ variable 2020-07-31 22:08:48 -04:00
extendedclip 91d370d883 Set artifact id to lower case 2020-07-31 22:07:58 -04:00
extendedclip 18854647bf Show help in alphabetical order 2020-07-31 21:35:38 -04:00
extendedclip 97fd3a3b5d Make the message differentiate between singular and plural updates avail 2020-07-31 21:30:00 -04:00
extendedclip 0f8ce0c6c3 Set Manager to lower case 2020-07-31 21:18:18 -04:00
extendedclip 9d43b743a2 Remove space before placeholders start 2020-07-31 21:17:41 -04:00
Andre_601 e43b7bf205 Improve dump command (#412) 2020-07-31 19:59:55 -04:00
extendedclip 9412fed9ad Merge remote-tracking branch 'origin/master' 2020-07-31 19:21:38 -04:00
extendedclip c7de89bebe Add back deprecated getPlaceholders method 2020-07-31 19:21:11 -04:00
Andre_601 cc02c126b5 Merge pull request #410 from PlaceholderAPI/master
Update wiki branch
2020-07-31 19:33:46 +02:00
Andre_601 aed0d288f7 Add CODEOWNERS file (#408) 2020-07-31 12:40:18 -04:00
Andre_601 b4a914314a Update _Footer 2020-07-31 18:07:53 +02:00
Andre_601 f6ba24e46f & instead of ? 2020-07-31 18:07:00 +02:00
Andre_601 745f7926a6 Fix label 2020-07-31 18:06:28 +02:00
Andre_601 62c93465f2 Update PlaceholderExpansion.md 2020-07-31 18:03:51 +02:00
extendedclip 0e733b6933 Force all identifiers to lower case 2020-07-31 12:01:27 -04:00
extendedclip 2e28647497 Force all identifiers to lower case 2020-07-31 11:40:44 -04:00
extendedclip 9b2b6992c7 Make author name white 2020-07-31 11:01:42 -04:00
extendedclip 81aa425616 Fix version and color 2020-07-31 10:52:43 -04:00
extendedclip e932fabe64 Don't set the name of the jar 2020-07-31 10:46:27 -04:00
extendedclip 9901e8bc24 Merge remote-tracking branch 'origin/master' 2020-07-31 10:43:43 -04:00
extendedclip 8c15cdf7cb remove JSONMessage repo, Update archive file name and license stuff 2020-07-31 10:42:24 -04:00
extendedclip fc453a9d7f Add license header 2020-07-31 10:40:37 -04:00
extendedclip a232294b11 remove register deprecation as it won't be final. Set removal for deprecated methods to 2.11.0 2020-07-31 10:40:03 -04:00
extendedclip 8c829417a7 Added missing commands to help commands, fixed some color / formatting 2020-07-31 10:37:47 -04:00
extendedclip 94ce9d6a6e Add license header 2020-07-31 10:37:01 -04:00
extendedclip a843369ebd Include JSONMessage with plugin instead of using maven repo to fetch 2020-07-31 10:36:31 -04:00
extendedclip 8e3c942282 Remove deprecation for useful methods, set removal of deprecated methods to 2.11.0, registerPlaceholderHook will fail gracefully 2020-07-31 10:35:47 -04:00
extendedclip d2945539b3 Deprecate PlaceholderHook but not onRequest 2020-07-31 10:34:11 -04:00
extendedclip 0281e5e346 Hardcode plugin name in plugin.yml 2020-07-31 10:33:04 -04:00
Andre_601 c76baeae1c Update CONTRIBUTING.md 2020-07-31 16:02:20 +02:00
Andre_601 d12c746630 Improve content 2020-07-31 16:00:35 +02:00
Andre_601 3f9205d2df Merge pull request #403 from PlaceholderAPI/change/remove-wiki-template
Remove request change (wiki) template
2020-07-31 15:29:00 +02:00
Andre_601 fbdd789dbe Create CODE_OF_CONDUCT.md 2020-07-31 15:26:33 +02:00
Andre_601 b521fe4a1f Update Contributing file 2020-07-31 15:24:07 +02:00
Andre_601 b24b127ad5 Merge pull request #406 from PlaceholderAPI/master
Trigger on docs/wiki branch
2020-07-31 14:51:15 +02:00
Andre_601 8a12d324e3 Trigger on docs/wiki branch 2020-07-31 14:50:30 +02:00
Andre_601 51975cbe40 Update Marcely's Bedwars 2020-07-31 14:33:00 +02:00
extendedclip f6e6394a74 dump on someone else 2020-07-30 18:18:37 -04:00
Andre_601 466509c578 Update config.yml 2020-07-31 00:18:19 +02:00
Andre_601 ee86fa7460 Rename to Feature Request 2020-07-31 00:17:16 +02:00
extendedclip 7f767cb222 dump on someone else 2020-07-30 18:14:09 -04:00
extendedclip c3499416f3 Add dump command to help 2020-07-30 18:07:46 -04:00
Andre_601 3bcffa0112 Move comments into <!-- --> block 2020-07-31 00:07:33 +02:00
Andre_601 529399e486 Remove request change (wiki) template 2020-07-31 00:00:16 +02:00
Andre_601 0ce8dd5096 Add comment about PAT 2020-07-30 23:56:24 +02:00
Andre_601 8b1227e6b7 Let's see if this won't trigger a build...
Update Wiki
2020-07-30 23:52:13 +02:00
Andre_601 a887aad9ac Update Plugins-using-PlaceholderAPI.md 2020-07-30 21:52:06 +02:00
Andre_601 f5fc7f26b7 Add custom Items 2020-07-30 21:47:57 +02:00
Andre_601 620bc01620 Add RVP placeholders 2020-07-30 20:05:27 +02:00
extendedclip 6362c9618d Added deprecated registerPlaceholderHook and unregisterPlaceholderHook methods which will throw UnsupportedOperationException so end users can nag authors to update 2020-07-30 09:53:12 -04:00
extendedclip d053881549 Reset version to 2.10.8-dev 2020-07-30 09:35:11 -04:00
extendedclip 3605ba4262 Update deprecated methods to specify actual version of removal 2020-07-30 09:31:07 -04:00
extendedclip 499a46898e Update deprecated methods to specify actual version of removal 2020-07-30 09:30:11 -04:00
Andre_601 49595c641c Update Hook-into-PlaceholderAPI.md 2020-07-30 13:45:03 +02:00
Sxtanna 98fbceeb1d added back packaging node 2020-07-29 18:20:39 -04:00
Sxtanna 592f093566 updated maven publication to remove transitive dependencies 2020-07-29 17:43:05 -04:00
Sxtanna 63134f4d74 changed project name to lowercase 2020-07-29 17:43:03 -04:00
Sxtanna 8b4a2517c0 updated char replacer to colorize returned replacements as well. 2020-07-29 17:19:30 -04:00
Sxtanna a78b5fe712 updated to use Player#spigot instead of CommandSender#spigot (I miss Kotlin) 2020-07-29 17:19:29 -04:00
Sxtanna 68402d244b bumped to 2.10.7 2020-07-28 17:36:39 -04:00
Sxtanna 81225dafbc updated parse command completer to suggest available placeholders 2020-07-28 16:09:30 -04:00
Sxtanna 74bd22eb0c updated char replacer to have spaces in placeholder parameters 2020-07-28 15:18:15 -04:00
Sxtanna a6ab3a2a03 updated to publish dev builds to the dev repo 2020-07-28 14:47:37 -04:00
Sxtanna 9ef5cedfd6 updated to use credentials from the environment 2020-07-28 14:06:51 -04:00
Sxtanna 8f9b999e5a updated to publish to clip nexus repo 2020-07-28 13:47:28 -04:00
Sxtanna f9156209e7 Merge remote-tracking branch 'origin/master' 2020-07-28 12:58:24 -04:00
Sxtanna 77d0654a29 updated build to use maven publish plugin 2020-07-28 12:58:06 -04:00
Sxtanna 300eb64d89 removed benchmarks for shitty replacer 2020-07-28 12:57:08 -04:00
Andre_601 ff01f83a09 Let's hope the wiki actions works this time
Update navigation
2020-07-28 18:52:11 +02:00
Andre_601 c28eab1697 Update Home.md navigation 2020-07-28 18:51:48 +02:00
Andre_601 7a322e0bb8 Update sidebar navigation 2020-07-28 18:50:17 +02:00
Andre_601 731e177859 Use short actions e-mail 2020-07-28 18:03:40 +02:00
Andre_601 1beb2ef3da Use Personal/Private Access Token 2020-07-28 17:58:41 +02:00
Andre_601 5047b0cdee Add Wiki update action (#373)
* First step to make automated wiki action

* Add wiki folder and files

* Only trigger on master branch

* Add dump command

* Update Plugins-using-PlaceholderAPI.md

* Create README.md

* Update README.md

* Ignore the readme file

* Update files from wiki

* Update wiki pages
2020-07-28 11:07:41 -04:00
Andre_601 5cc65c880a Move links down in the templates (#379)
* Move links down in the templates

* Add wiki option to PR template
2020-07-28 11:07:08 -04:00
Sxtanna b73a6916cb updated classes with contract annotations 2020-07-27 11:40:58 -04:00
Sxtanna 134086f6a9 updated fileutil to load *vomit* all classes, closes #381 2020-07-27 11:39:11 -04:00
PiggyPiglet 1993b2cd82 replaced single quote from merge with double quote 2020-07-27 15:23:32 +08:00
PiggyPiglet 9291184534 Merge remote-tracking branch 'origin/master' 2020-07-27 15:23:11 +08:00
PiggyPiglet 6d502db694 Licensed all files
Added licensing plugin
2020-07-27 15:21:35 +08:00
Sxtanna f61b6acfa8 updated placeholderexpansion to define its own unregister method 2020-07-26 23:01:12 -04:00
Sxtanna 8360511c50 rewrote discovery and registration code to be composable and higher level 2020-07-26 21:02:55 -04:00
Sxtanna ee33de5ec8 removed final from deprecated methods, restored fallback for getRequiredPlugin 2020-07-26 21:01:12 -04:00
Sxtanna a160f3abc9 updated to further phase out PlaceholderHook, added contracts to expansion methods 2020-07-26 18:46:00 -04:00
Sxtanna b63f10f749 lets pretend no one saw this. 2020-07-26 18:36:50 -04:00
Sxtanna 86002f50e6 updated to phase out PlaceholderHook 2020-07-26 18:03:31 -04:00
Sxtanna c3e0c1fb64 updated gson 2.8.5 -> 2.8.6 2020-07-26 17:32:28 -04:00
Sxtanna b464590491 added dump command, closes #366 2020-07-26 16:26:42 -04:00
Sxtanna 65f04ba70e updated cloud expansion list to be sorted via a configuration option of values [name, author, latest]. closes #363 2020-07-26 13:39:33 -04:00
Andre_601 a7a4b46821 Merge pull request #328 from Andre601/patch-2
Added "Installed expansions" section
2020-07-26 13:12:06 +02:00
Sxtanna 07cd344123 updated local expansion to not catch potential linkage errors, and report them. closes #377 2020-07-25 23:57:19 -04:00
Sxtanna 30ead2ae4b fixed spacing 2020-07-25 23:54:09 -04:00
Sxtanna 9339192f88 updated ecloud list command to use new table utility, added message for when no expansions can be listed 2020-07-25 22:38:41 -04:00
Sxtanna 6eb1ecc212 Implemented general purpose table utility 2020-07-25 22:35:56 -04:00
Sxtanna 973484066a updated ecloud list command to not paginate by default in console, closes #375 2020-07-25 14:57:10 -04:00
Sxtanna f177da8ef7 updated parse tab completer to consider the "cmdparse" alias 2020-07-25 13:08:26 -04:00
Sxtanna d1b50c3db4 updated parse tab completer to call method inversely 2020-07-25 13:07:59 -04:00
Sxtanna fb7a3ec99d added tab completion to the update command 2020-07-25 12:55:44 -04:00
Sxtanna 6caed4c23c updated plugin.yml to include permission for update command 2020-07-25 12:55:44 -04:00
Sxtanna f7c2e72c1e added ecloud update command 2020-07-25 12:55:44 -04:00
Sxtanna 85b9fc36da updated local manager to allow for reregistering expansions 2020-07-25 12:55:44 -04:00
Sxtanna 5861f9fe6a updated register command to attempt registration on the main thread. (event bullshit I think) 2020-07-25 12:02:34 -04:00
Sxtanna b6ec478dd6 updated ecloud list command to print to console in a table format. 2020-07-25 10:24:19 -04:00
Sxtanna 89061e6437 fixed ordering of methods 2020-07-24 19:45:28 -04:00
Sxtanna 50cee40531 updated LocalExpansionManager to accept a command sender to notify of load completion details 2020-07-24 19:02:17 -04:00
Sxtanna 00ced0495d I don't know how this happened, please don't flame me. ty. 2020-07-24 18:51:19 -04:00
Sxtanna 4e37f9f52a Merge remote-tracking branch 'origin/master'
# Conflicts:
#	src/main/java/me/clip/placeholderapi/expansion/manager/CloudExpansionManager.java
2020-07-24 18:51:07 -04:00
Sxtanna e57a0600f1 Managers Update (#368)
* added google codestyle plugin

* updated managers to make more sense, removed old

* updated cloud expansion manager to cache with index name
2020-07-24 18:49:18 -04:00
Sxtanna f4466059ac Merge branch 'master' into managers 2020-07-24 15:54:00 -04:00
Sxtanna dd183b4031 Merge remote-tracking branch 'origin/master' 2020-07-24 14:47:46 -04:00
Sxtanna 5ef360e3fe updated build.gradle formatting, and added missing values 2020-07-24 14:47:30 -04:00
Andre_601 ffe7680795 Fix missing line break in expansion list command. 2020-07-24 14:40:58 -04:00
Sxtanna cbbb2f27e4 Merge branch 'master' into managers
# Conflicts:
#	build.gradle
#	src/main/java/me/clip/placeholderapi/commands/impl/cloud/CommandECloudExpansionList.java
#	src/main/java/me/clip/placeholderapi/expansion/cloud/ExpansionCloudManager.java
2020-07-24 14:34:54 -04:00
Sxtanna f3ba9d588e updated managers to make more sense, removed old 2020-07-24 14:30:57 -04:00
extendedclip 623fd68ccc eCloud list outputs expansion information on a single line instead of multiple. Fixes #367 2020-07-24 12:40:07 -04:00
Glare 5fec3b53d0 Merge pull request #365 from PlaceholderAPI/fix-gradle-resolve 2020-07-24 10:49:32 -05:00
darbyjack ffe2bb28ba Fix gradle resolve 2020-07-24 10:48:37 -05:00
Sxtanna 651de80a01 updated expansion list command to send messages using json 2020-07-24 11:04:12 -04:00
Sxtanna 4c586d1803 updated cloud manager to not be weird 2020-07-24 11:04:12 -04:00
Sxtanna 60a74258ec added google codestyle plugin 2020-07-24 08:26:20 -04:00
PiggyPiglet 7d091f3cf4 Merge pull request #361 from PlaceholderAPI/casing
fixed ecloud casing
2020-07-24 17:54:42 +08:00
PiggyPiglet 34a0bff760 removed apostrophe, apparently that particular rule doesn't apply to "its". 2020-07-24 17:37:33 +08:00
PiggyPiglet 51abc00e51 added a missing apostrophe 2020-07-24 17:35:21 +08:00
PiggyPiglet 3429d69f9d Fixed more casings 2020-07-24 17:32:39 +08:00
PiggyPiglet 79b8dd73a5 Fixed missed casings 2020-07-24 17:25:34 +08:00
Sxtanna fccf0d5bb8 fixed ecloud casing 2020-07-24 05:21:43 -04:00
PiggyPiglet e0e02f38b6 convert gstring to string 2020-07-24 16:32:18 +08:00
PiggyPiglet d1bc2f598f fixed build number 2020-07-24 16:27:11 +08:00
PiggyPiglet 9d38d9b1a0 Merge pull request #359 from PlaceholderAPI/gradle
Gradle
2020-07-24 15:51:18 +08:00
PiggyPiglet 8b3f37b61e Merge branch 'master' into gradle 2020-07-24 15:50:17 +08:00
Sxtanna 6fade3fb93 removed obsolete EZPlaceholderHook 2020-07-24 01:39:17 -04:00
Sxtanna b7d1c6969e Commands rewrite (#357)
* began rewriting command system

* began rewriting command system

* updated formatting

* added new info command

* added new reload command

* updated new parse command to support all three parsing types

* added new commands to command router

* deleted old unused commands

* removed parserel

* added new expansion register and unregister commands

* deleted unused commands

* fixed annotation order

* added labels helper to command

* updated alias method to return an immutable view

* updated params param with unmodifiable annotation

* updated router to build an immutable map of the commands

* began rewriting command system

* updated formatting

* added new info command

* added new reload command

* updated new parse command to support all three parsing types

* added new commands to command router

* deleted old unused commands

* removed parserel

* added new expansion register and unregister commands

* deleted unused commands

* fixed annotation order

* added labels helper to command

* updated alias method to return an immutable view

* updated params param with unmodifiable annotation

* updated router to build an immutable map of the commands

* updated plugin class to use new command router

* updated switch to break on parse match

* updated register completions to suggest file names

* updated router to allow entering labels in any case

* updated parse command to send message to players as components

* added command dispatching parsing

* moved new commands into local package

* added helper functions for filtering and suggesting

* updated imports, updated tab completion to use helper functions

* added start of ecloud commands

* replace ecloud enable and disable commands with single toggle command evaluator

* deleted unused commands

* updated commands to use helper functions for suggesting

* updated downloading to use completablefuture, updated all methods to use streams exclusively

* updated to use the config instead of a null check

* deleted old commands system

* finished new command system

* updated to use new method from cloud manager

* fixed annotation ordering and added missing annotations

* updated ecloud subcommands to have a more specific permission

* updated plugin.yml with the new permissions, (and also fixed its formatting)

* fixed annotations intellij missed

* this should probably be there...
2020-07-24 01:29:11 -04:00
Sxtanna 21ca434e72 added unit test for hex code escaping 2020-07-23 12:02:04 -04:00
Sxtanna d63d7dc5f8 updated char replacer to support hex colors, and escaping &x 2020-07-22 23:59:39 -04:00
Sxtanna f47eef7442 updated plugin class to be less painful to look at, 2020-07-22 20:42:53 -04:00
Sxtanna 9631b087b3 updated server load listener to be final, and to automatically unregister itself when done 2020-07-22 20:41:27 -04:00
Sxtanna d7b947ddad finalized config, added nullability annotations 2020-07-22 20:40:47 -04:00
Sxtanna 656f9ad03c updated expansion manager to actually... manage expansions 2020-07-22 20:40:15 -04:00
Sxtanna 0a4150d63e updated fileutil to ignore NCDFEs, and to print exceptions 2020-07-21 16:04:24 -04:00
Sxtanna 377d091ae2 added back deprecated online player method 2020-07-21 12:25:38 -04:00
Sxtanna bdf8a1bcc1 reformatted event classes, added nullability annotations, made classes final. 2020-07-21 11:56:57 -04:00
Sxtanna ee78fc1775 updated char replacer to better handle malformed input 2020-07-21 01:48:59 -04:00
Sxtanna 9ddb21220f updated shadow, added test dependencies for jmh and junit 2020-07-20 20:13:32 -04:00
Sxtanna 47e336c1fe Merge branch 'master' into gradle
# Conflicts:
#	pom.xml
2020-07-20 20:07:38 -04:00
Sxtanna a2a736d909 undeprecated bracket placeholder methods, 2020-07-20 19:50:36 -04:00
Sxtanna 9217147827 Merge pull request #355 from Andre601/patch-3
Add missing @deprecated notes to methods
2020-07-20 19:26:56 -04:00
Andre_601 53736888a5 grammar 2020-07-21 01:26:21 +02:00
Andre601 75004f08d0 Add deprecation notice to all methods
Was it so hard to do a Ctrl+C, Ctrl+V?
2020-07-21 01:20:26 +02:00
Andre_601 51f61f61af Add missing deprecation notices. 2020-07-21 01:06:37 +02:00
Sxtanna e7ce84e7fc cleaned up fileutil and expansion manager 2020-07-20 18:55:37 -04:00
Sxtanna 42992de312 updated with null contracts, immutability, and early returns. 2020-07-20 18:22:08 -04:00
Sxtanna 45b3ebfbc2 updated to use new char replacer, deprecated all older functions, defined null contracts, and immutability. 2020-07-20 18:16:46 -04:00
Sxtanna 3b3892e7d6 updated placeholder hook to define immutability and null contracts, deprecated online player function 2020-07-20 18:14:13 -04:00
Sxtanna 9060ea6bd3 updated to use new closure 2020-07-20 17:38:18 -04:00
extendedclip 49012dc6b2 here 2020-07-20 17:23:27 -04:00
Sxtanna 9d73893cc8 replacer api, unit tests, and benchmarks (#354)
* added abstracted replacer api, and both char and regex based implementations

* added test dependencies for jmh and junit

* added unit tests and benchmarks for the replacer implementations

* updated replacers to accept specific closure types, added test to verify malformed placeholder handling

* updated jmh to 1.23, updated junit to 5.6.2
2020-07-20 16:59:25 -04:00
extendedclip 4ce0b03852 Revert "Performance Improvements (#340)"
This reverts commit 54d5757d
2020-07-20 16:57:16 -04:00
Glare 8972f7cff4 Merge pull request #352 from Sxtanna/master
POM fixes.
2020-07-19 15:22:24 -05:00
Sxtanna d2223f83b8 removed server dependency, added provided dependency for log4j-core 2020-07-19 09:16:09 -04:00
Sxtanna b4d6b047af moved compiler source and target to properties 2020-07-19 09:12:58 -04:00
Crypto Morin 54d5757d0a Performance Improvements (#340)
* Performance Improvements

* More Optimizations

* Even More Optimizations & Cleanups

* Almost a recode I guess
2020-07-16 12:32:22 -04:00
PiggyPiglet ca8fb3117f fixed resource processing variables 2020-07-15 01:00:01 +08:00
PiggyPiglet bc0535e2f4 Converted to gradle 2020-07-15 00:56:49 +08:00
extendedclip f9f59f1f96 Merge the multiple static blocks 2020-07-14 10:24:01 -04:00
extendedclip f205146c75 Rename ecloud commands to be prefixed with Ecloud to avoid confusion 2020-07-14 10:21:29 -04:00
darbyjack 0634a9cd9b Switch back to the official JSONMessages 2020-07-14 08:18:06 -05:00
3e396a97b0 Changed command system (#304)
* Save Cacheable expansions data on shutdown

* Prepare for 1.16

* 1.16.1 is out apparently

* Further fixes, still not done

* Inline JSONMessages & fix for 1.16

* Done :O

* Done for real now, (hopefully)

* Changed to static instead of DI for plugin instance

* Cleanup

* Modified tab completions. Removed extra command.

* Apparently this is needed

* Started cleaning stuff up

basically just pushing so I can continue on laptop

* did more cleaning, probs like half way done

* more cleaning. reverted back to a min arg system somewhat similar to what frosty had, but less boilerplate.

* Started debugging and fixing runtime/compile errors

* Fixed bugs, still needs thorough testing

* Re-enable metrics

* relocated stuff again

* - Remove json message relocation
- uncomment other relocations
- reformat pom
- remove useless scope declaration
- Fix metrics constructor
- Switch commands to use inline json message

Co-authored-by: iGabyTM <contactgabytm@gmail.com>
Co-authored-by: darbyjack <admin@glaremasters.me>
Co-authored-by: PiggyPiglet <noreply@piggypiglet.me>
2020-07-13 15:27:59 -04:00
Andre_601 9316636939 Added "Installed expansions" section 2020-06-13 18:16:42 +02:00
extendedclip 82fa8d7393 Added 1.15 2020-05-02 23:16:46 -04:00
extendedclip 83abb8b728 Bump to 2.10.7 dev 2020-05-02 23:16:03 -04:00
extendedclip feed418ccf 2.10.6 release 2020-05-02 22:52:18 -04:00
Glare a2868cbc4f Merge pull request #294 from PlaceholderAPI/fixes/first-time-parse
Fixes the super old issue of not being able to parse on first join
2020-04-26 12:19:09 -05:00
darbyjack 43d134cbe3 Fixes the super old issue of not being able to parse on first join 2020-04-25 21:57:40 -05:00
Ryan e023c4e789 Fixed Discord URL 2020-04-09 11:45:35 -04:00
aBooDyyandaBo0oDyy 784d7dd273 Fixes ecloud placeholders command (#201)
* fix parsing placeholders on ecloud placeholders command

* try catch on registering expansions

Co-authored-by: aBo0oDyy <35378106+aBo0oDyy@users.noreply.github.com>
2020-04-09 11:43:21 -04:00
Andre_601 d26561eaeb Add issue template config for custom template selection (#272)
* Fix typos

* Update change_request_placeholderapi.md

* Slighty better grammar

* Create config.yml

* Add about part

* Make wiki point to PAPI wiki
2020-04-09 11:38:14 -04:00
WCKDAWE 0666ac7b01 Minor spelling mistakes (#284)
Not a grammar nazi, just noticed them and though to commit dem changes.
2020-04-09 11:37:48 -04:00
Andre_601 2caf5f0232 Add missing setPlaceholder methods (#234)
* Add missing setPlaceholder methods
Also includes setBracketPlaceholders and setRelationPlaceholders

* Update PlaceholderAPI.java
2020-04-09 11:37:06 -04:00
Glare d706469ed8 Ahem. Let's flex. 2020-04-03 10:44:12 -05:00
darbyjack 5d4decafbe Bump to 2.10.6 dev 2020-03-25 23:28:48 -05:00
darbyjack bb639328a3 Push to 2.10.5 for release pt2 2020-03-25 23:27:56 -05:00
darbyjack ca0791f3af Push to 2.10.5 for release 2020-03-25 23:05:12 -05:00
darbyjack 449c927c6c Add user-friendly message when host can't connect to ecloud 2020-03-25 23:04:00 -05:00
darbyjack e95f1b4850 Removed extra semi 2020-03-25 22:54:26 -05:00
Glare 06513c89bc Merge pull request #268 from PiggyPiglet/master
covered up string's size insecurities with a fat bufferedreader
2020-03-25 21:42:43 -06:00
PiggyPiglet 38d9185232 made it compile 2020-03-26 11:25:02 +08:00
PiggyPiglet 35738f59d9 covered up string's size insecurities with a fat bufferedreader 2020-03-26 11:15:16 +08:00
darbyjack 66758b1992 Compile under 1.15.2 2020-02-03 12:18:57 -06:00
extendedclip c1cff8ca74 javadoc 2020-01-06 14:29:07 -05:00
extendedclip 2dbf69a74e Allows the setPlaceholders method to specify if color codes should be translated in the output string 2020-01-06 14:27:39 -05:00
darbyjack 6c964baba7 Added support for 1.15.1 2019-12-21 13:56:07 -06:00
darbyjack 4b77eb5d00 Added support for 1.15 2019-12-10 17:49:49 -06:00
darbyjack 6e68929a5c Updated gitignore to ignore IDEA files. 2019-12-10 17:16:28 -06:00
darbyjack fc263d9ce7 Updated bStats repo version. 2019-12-10 17:15:39 -06:00
Max Berkelmans ab9716489b Merge pull request #131 from Draycia/master
Formatting, spacing, final modifiers, and a few code fixes
2019-10-16 22:29:38 +02:00
Max Berkelmans 5c6202a8ee Merge branch 'master' into master 2019-10-16 22:28:19 +02:00
extendedclip 38c1eca590 Bump version to 2.10.5 development 2019-09-19 14:38:33 -04:00
extendedclip a1a1b1afd7 Bump version to 2.10.4 for release 2019-09-19 14:26:35 -04:00
extendedclip 51599c4044 Allow cancelling expansion registration 2019-09-19 14:22:08 -04:00
extendedclip 9871efbadb Allow cancelling expansion registration 2019-09-19 14:16:35 -04:00
Evan Lindsay 6b9f22c7ec Fix case check in PlaceholderExpansion.isRegistered (#161) 2019-08-04 18:03:25 -04:00
aBooDyy 7c54e58ab7 Merge pull request #151 from Andre601/patch-1
Fixing broken link
2019-07-23 19:49:13 +03:00
Andre_601 024d9b281a Fixing broken link 2019-07-23 17:19:20 +02:00
Leomixer17 6c5cd0ed1f Update plugin.yml (#142)
1.13 set as api version won’t cause issues. I reverted adding 1.14 but we can merge this as it won’t have any conflicts. Thanks for the contribution.
2019-07-12 18:33:35 -04:00
Josh (Vicarious) 719172c185 Merge branch 'master' into master 2019-06-30 21:40:51 -07:00
darbyjack 763bb52d06 Changed some logic to suggest the right command. 2019-06-28 12:14:30 -05:00
darbyjack d0d0c99505 Added message saying to reload papi to enable downloaded expansion. 2019-06-28 12:14:07 -05:00
darbyjack 16726215bb Updated to dev, fixed spigot version. 2019-06-28 12:13:34 -05:00
Ryan 454b1f19f4 Update README.md
Updated stats
2019-06-25 15:01:08 -04:00
darbyjack 6286451991 Push to 1.14.3-SNAPSHOT. 2019-06-25 05:39:52 -05:00
extendedclip b9881eb70b Fix page indexes when on pages greater than 1 2019-06-21 12:49:45 -04:00
extendedclip 93f586a216 Update to 2.10.3 2019-06-21 12:36:59 -04:00
extendedclip a0ac08b838 Start at 1 2019-06-21 12:36:03 -04:00
extendedclip 2c0b768774 ITS 2019 2019-06-21 12:30:32 -04:00
Glare 21048f83d5 Issue templates update (#128)
Issue templates update
2019-06-11 11:12:32 -05:00
Draycia 5b92dd5553 Shorten line in FileUtil 2019-06-10 11:22:05 -07:00
Draycia 4851655110 Make various things final 2019-06-10 11:10:39 -07:00
Draycia 64a6389ebf Better use of StringBuilder 2019-06-10 11:10:14 -07:00
Draycia 4860e3f8bf Remove unused casts 2019-06-10 11:04:01 -07:00
Draycia dfbf1b95f6 Cleanup formatting / spacing 2019-06-10 11:03:48 -07:00
Andre_601 9af9a3570d Update CONTRIBUTING.md 2019-06-02 20:07:40 +02:00
Andre_601 16c237ce51 Update CONTRIBUTING.md 2019-06-02 20:06:56 +02:00
Andre_601 b44cb13d7a Create CONTRIBUTING.md 2019-06-02 19:56:33 +02:00
Andre_601 8c509b47d1 Create PULL_REQUEST_TEMPLATE.md 2019-06-02 19:54:17 +02:00
Andre_601 c4cba9c6a7 Update bug_report.md 2019-06-02 19:37:57 +02:00
Andre_601 0809897303 Update and rename feature_request.md to change_request_placeholderapi.md 2019-06-02 19:30:12 +02:00
Andre_601 82181ed74d Update and rename change_request.md to change_request_wiki.md 2019-06-02 19:20:27 +02:00
Andre_601 85328c473b Improve the feature_request 2019-06-02 19:01:11 +02:00
darbyjack c9abc4ae00 Updated to 1.14.1 2019-05-13 21:36:33 -05:00
extendedclip 5f23db98a8 Set version to dev builds 2019-05-10 20:37:49 -04:00
extendedclip f367abbdfa Check if config values aren't null before attempting to set them. 2019-05-10 20:36:43 -04:00
extendedclip 9377129554 We don't even need an api version. It breaks stuff.. 2019-05-10 10:48:40 -04:00
extendedclip f4409a6d92 Fix numerical order of expansions in papi ecloud list 2019-05-10 10:28:59 -04:00
extendedclip c902485718 Remove clipsplaceholderapi since its no longer just clips placeholder api 2019-05-10 10:09:17 -04:00
extendedclip 09db82a840 Set API version to 1.14 even though it doesnt matter to us 2019-05-10 10:07:18 -04:00
extendedclip 9b667fe383 Bump version to 2.10.2 for release 2019-05-10 10:05:52 -04:00
darbyjack 00333f9a4e Changed to use authors instead of hardcoded. 2019-05-09 18:47:16 -05:00
darbyjack 5472be631c Added myself as an author to the plugin. 2019-05-09 17:09:21 -05:00
darbyjack 68fa793354 Added documentation / explanation for the ServerLoadEvent 2019-05-08 22:22:01 -05:00
darbyjack 111f5462fc Cleaned up excess code in TimeUtils 2019-05-08 22:19:57 -05:00
darbyjack 62e282cc0e Initial attempt at preventing EzPlaceholderHook from working. 2019-05-08 15:36:57 -05:00
darbyjack 5aaa9720c8 Changed to use easier way. 2019-05-08 15:05:30 -05:00
darbyjack 9a2fb89e43 Changed placeholders to register 1 tick after server startup. 2019-05-08 15:04:46 -05:00
extendedclip fc1a2af011 Merge branch 'master' of https://github.com/PlaceholderAPI/PlaceholderAPI 2019-05-07 14:17:00 -04:00
extendedclip 82e92ce777 set version for 2.10.1 release 2019-05-07 14:16:23 -04:00
Mitchell Cook 9b317c2210 Someone forgot how to use lambdas properly (#111) 2019-05-06 16:21:15 -04:00
darbyjack 927f942236 Print out console warnings for the plugins still using EzPlaceholderHook 2019-05-06 09:05:19 -05:00
extendedclip 75c3027e05 This will not be around for much longer. Plugin authors need to update to use PlaceholderExpansion rather than this class. 2019-05-05 13:59:40 -04:00
extendedclip a2d408aea9 Possible solution for placeholders that register externally before PlaceholderAPI registers expansions 2019-05-05 13:21:28 -04:00
extendedclip 5386b7c23d Remove load option 2019-05-05 10:39:05 -04:00
extendedclip a741f35139 Check if server supports ServerLoadEvent and if so register the listener, if not delay registration of placeholders for 15 seconds. 2019-05-05 10:38:42 -04:00
extendedclip 1e25f35aac Remove ServerLoadEvent listener 2019-05-05 10:37:54 -04:00
extendedclip 3042e49ddb Move ServerLoadEvent listener to its own class 2019-05-05 10:37:01 -04:00
extendedclip 6495a386a0 Remove EZPlaceholderHook which has been deprecated for over a year. TOODLES! 2019-05-04 21:25:44 -04:00
extendedclip cee214cc98 Remove PluginEnableEvent listener. Not needed anymore. 2019-05-04 20:15:00 -04:00
extendedclip 41390d8ef4 Remove clean method calls 2019-05-04 20:13:04 -04:00
extendedclip c0f6cf225f Remove useless "expansion cache" that I don't even know ever worked. Intention was to cache any expansion that isn't registered due to the dependency not being loaded yet when expansion registration initialized. Non issue now that registration happens in ServerLoadEvent. 2019-05-04 20:08:47 -04:00
extendedclip 16d0a4f690 Register expansions in the ServerLoadEvent which is called after the server startup process is complete.
Fixes #103
2019-05-04 19:56:59 -04:00
extendedclip 8f600aec25 Update to 2.10.0-DEV builds 2019-05-04 19:55:35 -04:00
extendedclip 2c15b4dfcf Update to 2.10.0 2019-05-04 00:19:29 -04:00
darbyjack b943c6fd21 Added support for 1.14 NMS for expansions to hook into 2019-05-03 22:51:34 -05:00
extendedclip 15b142ed64 Remove unused imports 2019-05-03 23:48:00 -04:00
extendedclip b2a488c694 Sort expansions alphabetically without errors Fixes #102 2019-05-03 23:44:51 -04:00
Funnycube 8447395c7b As per request, daddy has been removed.
Rip Daddy,
2018 - 2019
"Bastards"
2019-04-29 16:36:08 +10:00
darbyjack 0ad11cd755 Push to 1.14-R0.1-SNAPSHOT 2019-04-27 22:08:57 -05:00
Mitchell Cook 29c61373b0 Implementing #93 (#94)
Testing required before PR.
2019-04-13 16:34:03 -04:00
Andre_601 e53cad219e Changed "being made" to "to be made" 2019-01-26 17:54:41 +01:00
Glare Masters c7d05eff24 Merge pull request #63 from Andre601/master
Adding issue templates and updating readme.md
2019-01-22 11:20:21 -06:00
Andre_601 540a0952e7 "changes being made" sounds better imo 2019-01-22 16:18:00 +01:00
Andre_601 cef0a203dc Links can be made like that 2019-01-22 16:10:52 +01:00
Andre_601 8f1ba895b2 Updating links 2019-01-02 18:08:39 +01:00
Andre_601 4d570aa526 Update bug_report.md 2019-01-02 18:03:24 +01:00
Andre_601 4c127f325b Update feature_request.md 2019-01-02 18:02:05 +01:00
Andre_601 71f5e11b03 Update bug_report.md 2019-01-02 17:59:00 +01:00
Andre_601 1129f3d902 Update change_request.md 2019-01-02 17:58:09 +01:00
Andre_601 84a8029d7d Create bug_report.md 2019-01-02 17:52:09 +01:00
Andre_601 dd6d90dbb6 Create change_request.md 2019-01-02 17:04:29 +01:00
Andre_601 0df9eeb2cc Create feature_request.md 2019-01-02 17:04:04 +01:00
Ryan 05ce2fb5bf Merge pull request #61 from Phoenix616/patch-1
Load at startup
2018-12-27 09:14:31 -05:00
Max Lee cb7fbb7820 Load at startup
By default plugins are loaded later. (post world) This complicates hooking into PlaceholderAPI from other plugins that load directly at startup as PlaceholderAPI isn't available yet at that point.
2018-12-27 13:56:09 +01:00
darbyjack ce5bb28247 Push to 1.13.2 2018-10-22 22:02:50 -05:00
darbyjack 639b7967e3 Refresh on download to fix the gold bug 2018-10-20 15:43:38 -05:00
darbyjack 90bc3c8da1 Fixed a bug in /papi installed 2018-10-20 15:30:10 -05:00
darbyjack 556faf4290 Changed the Discord Link 2018-10-18 23:06:52 -05:00
darbyjack 4af2a1c7be Update to 2.9.2-DEV and add in more info when typing /papi 2018-10-17 02:53:39 -05:00
Glare Masters 6ff7be5d64 Merge pull request #46 from Sxtanna/master
Changed to be slightly less trash
2018-10-17 02:22:11 -05:00
Sxtanna 80c6a6d377 This class was trash 2018-10-12 12:43:57 -04:00
Ranald 27f8586d76 Merge pull request #2 from PlaceholderAPI/master
Update
2018-10-12 11:31:47 -04:00
extendedclip d0b4669d1f Update to 2.9.2 release 2018-08-27 00:08:16 -04:00
extendedclip c205a9a1b9 Just make the damn directory 2018-08-27 00:05:51 -04:00
extendedclip ce1ca35ee5 Merge branch 'master' of https://github.com/PlaceholderAPI/PlaceholderAPI 2018-08-26 23:57:28 -04:00
extendedclip 0bfd42d607 Set 1.13.1 Spigot API as dependency, Shade and relocate GSON 2018-08-26 23:56:37 -04:00
extendedclip 197aa5dfe0 Added 1.13 R2 NMS to the enum 2018-08-26 22:58:02 -04:00
darbyjack efa97ce049 Undone for time being 2018-08-26 14:46:05 -05:00
darbyjack e2423cdd70 Added support to versions less than 1.8.3 2018-08-26 14:37:17 -05:00
Ranald 0d30c8ac50 Merge pull request #1 from PlaceholderAPI/master
daddy
2018-08-26 15:08:23 -04:00
extendedclip 589712f7e4 daddy 2018-08-10 23:32:07 -04:00
extendedclip dd5ec37055 try with resources cuz haters 2018-07-22 16:52:36 -04:00
extendedclip 49eceaae50 Use 1.13 spigot-api 2018-07-22 16:52:12 -04:00
extendedclip 7ea2bd94a7 Do not deprecate legacy setPlaceholder methods for now 2018-07-21 22:00:33 -04:00
extendedclip 736b8ada3d Add v1_13_R1 to the NMSVersion enum 2018-07-21 21:59:02 -04:00
extendedclip d08de32852 Add api-version entry for 1.13 2018-07-21 21:58:26 -04:00
Ryan 83e64ee883 Merge pull request #33 from Mishyy/master
Bug fixes, and cosmetic modifications.
2018-07-16 04:06:26 -04:00
Mitchell Cook 27ca32b14c Updated .gitignore to ignore .iml project files. 2018-07-16 18:01:40 +10:00
Mitchell Cook 838f947a05 Resolve expansion loading bug. 2018-07-16 17:50:12 +10:00
Mitchell Cook efc6a6337b Added compareTo method for easier comparison in expasions. 2018-07-16 17:50:12 +10:00
Mitchell Cook 9cc5a9678f Reformatted project to conform to google style guide. 2018-07-16 17:50:07 +10:00
extendedclip bc915af13e Added subcommand to register an expansion by specifying the name of the file, or unregistering by specifying the name of the expansion. 2018-06-29 15:03:53 -04:00
extendedclip 43b8013c29 Added method to register expansion by specifying the file name 2018-06-29 15:02:05 -04:00
extendedclip adca215ea7 Added method to get all class files of a certain type from a specific jar 2018-06-29 14:40:48 -04:00
extendedclip d0445e231d Added register/unregister perm, removed injector perms 2018-06-29 14:34:25 -04:00
extendedclip be96238800 Added ability to use parse subcommand from console when targeting a player, Added ability to broadcast a parse message with bcparse subcommand 2018-06-16 20:05:12 -04:00
extendedclip 0f51b4f2a5 Added broadcast method 2018-06-16 19:57:22 -04:00
extendedclip 287ab16d3a Set version for 2.9.1 dev builds 2018-06-14 15:21:18 -04:00
extendedclip e4a672e57e Require a player be specified when using /papi parse command 2018-06-14 15:17:46 -04:00
extendedclip 46839c4bf2 Set version to 2.9.1 2018-06-13 14:26:16 -04:00
extendedclip 2894d525f2 Add deprecated setPlaceholders(Player) methods back to prevent exceptions with plugins parsing placeholders 2018-06-13 14:14:27 -04:00
extendedclip 53fb678035 Set version to 2.9.0 for release 2018-06-13 12:50:22 -04:00
extendedclip 86a1fe862f New method supporting offlinePlayer renamed to onRequest 2018-06-13 12:50:01 -04:00
extendedclip eba181d04d Revert return type back to String for new onPlaceholderRequest method 2018-06-01 21:01:01 -04:00
extendedclip 25758ee653 Return any Object with the new onPlaceholderRequest method. 2018-05-31 15:14:25 -04:00
extendedclip a50212e395 Add support for OfflinePlayer 2018-05-31 14:35:28 -04:00
extendedclip cfccc69839 Javadoc typo fixes 2018-05-31 13:52:32 -04:00
extendedclip 659af4833e Added getRequiredPlugin method.
Deprecated getPlugin(), getLink(), and getDescription().
fix javadoc for PlaceholderExpansion class...
closes #22, closes #23
2018-05-31 13:46:24 -04:00
extendedclip e1ba07b7bd Set version for dev builds 2018-05-31 13:34:46 -04:00
extendedclip d5146ea3e5 Update to 2.8.7 2018-05-10 11:38:42 -04:00
extendedclip 3a5e3ed950 Refactored update checker 2018-04-20 23:01:01 -04:00
extendedclip 763c0aabc1 Cleanup imports 2018-04-20 22:59:17 -04:00
extendedclip 6eaad829cf Pass option to filter unverified expansions when calling fetch 2018-04-20 22:56:06 -04:00
extendedclip dd45bc16d0 Pass filtering unverified expansions to fetch 2018-04-20 22:23:03 -04:00
extendedclip 7900ee71e0 Check and filter unverified expansions 2018-04-20 22:22:03 -04:00
extendedclip 6825c9afc1 Use registerExpansion instead of registerPlaceholderHook in the register method. 2018-04-20 22:15:13 -04:00
extendedclip 1a905f88a9 Added registerExpansion method. Placeholder map interaction methods now return immutable objects 2018-04-20 22:11:54 -04:00
extendedclip 796136982a Added ExpansionRegisterEvent 2018-04-20 22:07:03 -04:00
extendedclip 3ada9d988b Costants use UPPER_SNAKE_CASE. resolves #17 2018-04-20 21:03:57 -04:00
extendedclip 1504972e51 Remove duplicate method. Make field modifiers consistent resolves #16, resolves #18 2018-04-20 21:03:00 -04:00
Ryan 1789c3b183 Merge pull request #13 from Sxtanna/master
Changed Msg#msg to use method references
2018-04-19 00:21:15 -04:00
Sxtanna e336eccd9a Changed Msg#msg to use method references 2018-04-18 23:36:47 -04:00
Ryan d256286a02 Update version for Jenkins dev builds 2018-04-10 17:20:59 -04:00
Ryan 81aaef2319 Don't set gson to null on clear 2018-04-10 17:15:51 -04:00
extendedclip b7003c5142 Actually show placeholders when the expansion is not installed 2018-04-08 15:41:25 -04:00
extendedclip 1e9811507f Set version to 2.8.6 for Spigot release 2018-04-08 15:24:09 -04:00
extendedclip 06b1599f66 Commands no longer Bukkit / Spigot dependent. 2018-04-08 04:06:56 -04:00
extendedclip 7011a8d8c5 Supports ECloud API v2, added Gson parsing, expansion version history support 2018-04-08 04:04:15 -04:00
extendedclip 92d30ea4cb Format 2018-04-08 04:02:09 -04:00
extendedclip 906bf0a338 Added jsonmessage dependency 2018-04-08 04:00:25 -04:00
extendedclip 134d18c71c Add color utility method 2018-04-08 03:59:06 -04:00
extendedclip 59539d591c Do not pass spigot boolean to command constructor 2018-04-08 03:58:39 -04:00
DoNotSpamPls a5200fd5c1 Check for permissions instead of isOp() (#6) 2018-03-27 10:43:17 -04:00
extendedclip 2856889bbe Escape placeholder pattern. fixes #4 2018-03-26 17:32:18 -04:00
extendedclip 4e1ff991c7 2.8.5 release 2018-03-25 12:53:30 -04:00
extendedclip 1ef0310074 Versioning for jenkins builds 2018-03-24 13:14:51 -04:00
extendedclip 910c81bab8 Added unregisterExpansion method 2018-03-24 12:58:15 -04:00
extendedclip 11401f0bfd Only get expansions when checking for cleanable implementations 2018-03-24 12:56:25 -04:00
extendedclip 8a5d82d3a8 Deprecated PlaceholderHookUnloadEvent 2018-03-24 12:45:13 -04:00
extendedclip a7b5a1ea08 Added event to fire when expansion is unregistered 2018-03-24 12:43:57 -04:00
extendedclip bec4782b40 Call ExpansionUnregisterEvent when an expansion is unregistered 2018-03-24 12:42:45 -04:00
extendedclip 3b136b7aa2 Stop using deprecated event 2018-03-24 12:42:08 -04:00
extendedclip 7db3bab4d8 Started working on a better header for the config... 2018-03-24 12:41:06 -04:00
extendedclip 94a519beb0 true not false.... 2018-03-24 11:57:02 -04:00
extendedclip 3a672e94ac Amount per page will be configurable soon 2018-03-24 11:51:04 -04:00
extendedclip 05b752baa2 Only unregister expansions if they are provided by PlaceholderAPI 2018-03-24 11:49:31 -04:00
extendedclip 19de55c7c5 only unregister provided expansions 2018-03-24 11:48:31 -04:00
extendedclip 6e34670bd8 Cuz Java8 2018-03-24 11:47:43 -04:00
extendedclip 7ddc304167 Removed messages specifying when an expaion registers a listener etc 2018-03-24 11:47:08 -04:00
extendedclip 5d6c8c19cd Added method to specify if the expansion should persist through papi reloads 2018-03-24 11:46:00 -04:00
extendedclip af68dbcf8b Little refactoring... 2018-03-23 17:03:56 -04:00
extendedclip 68fb8e7e65 Revert "Revert "Consolidate main command to a single class for both bukkit and bungee""
This reverts commit 52aff127ca.
2018-03-23 14:19:24 -04:00
extendedclip 52aff127ca Revert "Consolidate main command to a single class for both bukkit and bungee"
This reverts commit 4e9af1cc9e.
2018-03-23 14:17:28 -04:00
extendedclip 4e9af1cc9e Consolidate main command to a single class for both bukkit and bungee 2018-03-23 14:00:38 -04:00
extendedclip eb0e58ae20 Removed bungee repo 2018-03-23 13:42:55 -04:00
Nathan Glover e5e281613f Updated README (#3)
* Updated README.md

Added a bit of formatting, some links, and the PAPI logo.

Information on contributing and developing expansions still needs to be added, but that could possibly be added into the Wiki?

* Updated README.md

Added link to the logo image, and moved CI link to the end of the file.
2018-03-23 01:02:49 -04:00
DoNotSpamPls a98f3cb366 Change config system to use Bukkit's implementation, optimize code (#2) 2018-03-22 15:15:47 -04:00
Ryan 81aa39dfc6 Merge pull request #1 from Banbeucmas/master
.gitignore
2018-03-21 12:07:55 -04:00
Banbeucmas 58b2ba5de7 Update using Luck suggestion 2018-03-22 00:47:13 +09:00
Banbeucmas f2493bbaef Actually, remove copy pasta stuff from MCMMO lol 2018-03-22 00:24:02 +09:00
Banbeucmas 755cf208d9 Adding .gitignore 2018-03-22 00:22:34 +09:00
extendedclip 09ab268e12 Open source GPLv3 2018-03-21 09:15:51 -04:00
extendedclip fbe0a03a8f 2.8.5 2018-03-20 19:04:14 -04:00
129 changed files with 10349 additions and 10270 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
.gitea/CODEOWNERS linguist-detectable=false
+3
View File
@@ -0,0 +1,3 @@
# Pull requests request review from the eligible staff team(s).
# One approval from either an Admin or Developer satisfies branch protection.
* @trueog/Admins @trueog/Developers
+9
View File
@@ -0,0 +1,9 @@
#
# Assigns extendedclip and PiggyPiglet for any PR unless a check below matches.
#
* @PiggyPiglet @darbyjack
#
# Assigns Andre601 to any PR that targets the wiki folder.
#
*.md @Andre601
+67
View File
@@ -0,0 +1,67 @@
[issue]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new
[discord]: https://helpch.at/discord
[code of conduct]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/CODE_OF_CONDUCT.md
[wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki
[master]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/master
[docs-wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/docs/wiki
[style]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/master/config/style
# Contributing Guidelines
We welcome everyone to contribute towards the PlaceholderAPI Project, but doing so will require you to follow specific rules to keep a consistent and welcoming way of contributing.
If you have any questions about contributions towards the project, feel free to contact us on our [Discord Server][discord].
## Issues
Like any other project can you encounter bugs or a feature is missing for you in the plugin.
For that, you can open an [issue] to report a bug, or suggest a new feature to be added.
When doing so, make sure you follow rules below:
### Follow the template
We have issue templates to help us get the required information more easily. Please follow the provided template when either filing a bug report or feature request.
Your issue may be closed without warning for not following the template.
### Use the latest version
When it comes to bug reports should you always check first, that you're using the latest release of PlaceholderAPI.
Often the bug you've encountered, is fixed in a newer version.
The same rules apply when making a feature request.
### No duplicate issue
Make sure that there aren't any existing issues relating to the problem, which are still open, or are closed with a solution/explanation.
Opening a separate issue for a bug report or feature request, that already exists on the issue tracker only slows down the process of fixing the bug or implementing the feature.
If an issue with the bug or feature you want to report/suggest exists, comment on it with your info (bug reports) or give it a :thumbsup: (Feature Request) to show that this is important for you.
### Issue isn't caused by external source
PlaceholderAPI provides a feature to have expansions (separate jar files) for placeholders. This gives it a possability that an issue you encounter is caused by said expansions or a separate plugin that uses those expansions.
In those cases should you report the issue to the issue tracker of the expansion or plugin.
## Pull requests
As an open source project are we welcoming all contributions to improve PlaceholderAPI, being it changes to its code, or contributions to its documentation such as the [Wiki] or the Javadocs.
> [!IMPORTANT]
> When contributing, make sure to both base of and target the mentioned branch. Pull requests targeting the wrong branch may get closed without a warning.
### Code contributions
> **Source and Target Branch:** [`master`][master]
When contributing towards the code of PlaceholderAPI, be it new features or just bug fixes, your changes should follow the general code styling used in the project.
You can find the necessary files in the [`config/style`][style] directory of this repository.
### Javadocs contributions
> **Source and Target Branch:** [`master`][master]*
Javadocs changes should usually be combined with [code contributions](#code-contributions) when possible, but if not, make sure the changes are significant enough to warrant a new build on our CI server.
\*This branch may change in the future.
### Wiki contributions
> **Source and Target Branch:** [`wiki`][docs-wiki]
The Wiki of PlaceholderAPI is located on its own dedicated branch, hosting all the assets and files that get used to create it through the usage of GitHub Actions and GitHub Pages.
We welcome contributions that update outdated information, add new expansions/plugins supporting PlaceholderAPI or even correct spelling mistakes and typos.
## Code of Conduct
We have a [Code of Conduct] to maintain a welcoming atmosphere in this project.
If your contributions go against the Code of Conduct, linked above, we reserve the right to deny or revert your contributions.
+103
View File
@@ -0,0 +1,103 @@
name: Bug Report
description: Found a Bug about PlaceholderAPI? Use this template to report it!
labels:
- "Type: Issue (Unconfirmed)"
body:
- type: markdown
attributes:
value: |-
Thank you for taking your time and opening a Bug Report.
In order for us to process this Bug Report as fast and efficient as possible do we ask you to read the form carefully and provide any requested information.
Required fields are marked with an asterisk symbol (`*`)
Also, always make sure to use the latest Release from [Spigot](https://www.spigotmc.org/resources/6245/) or the latest Development Build from our [Jenkins Server](http://ci.extendedclip.com/job/PlaceholderAPI/) to make sure that your issue isn't already fixed.
**DO NOT REPORT ISSUES WITH EXPANSIONS AND/OR PLACEHOLDERS. USE THE APPROPRIATE ISSUE TRACKER FOR THOSE!**
- type: checkboxes
attributes:
label: Confirmation
description: Please make sure to have followed the following checks.
options:
- label: My issue isn't already found on the Issue tracker.
required: true
- label: My issue is about **PlaceholderAPI** and not any expansion or external plugin
required: true
- label: The issue isn't already fixed in a Spigot Release or Development Build.
required: true
- label: The [Common Issues](https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Common-Issues) page doesn't mention this issue.
required: true
- type: dropdown
attributes:
label: "Type"
description: |-
What kind of Bug do you encounter?
- `Plugin Bug`: PlaceholderAPI doesn't startup properly.
- `API Bug`: A method you use didn't work or has an unexpected result.
- `Plugin/Server Incompatability`: PlaceholderAPI either doesn't support a specific Server Type/Version or has conflicts with another plugin.
multiple: false
options:
- "Plugin Bug"
- "API Bug"
- "Plugin/Server Incompatability"
validations:
required: true
- type: textarea
attributes:
label: "What happens?"
description: "What bug are you encountering? Try to explain it as detailed as possible."
placeholder: "PlaceholderAPI does this when I do that..."
validations:
required: true
- type: textarea
attributes:
label: "Expected Behaviour"
description: "What behaviour did you expect from PlaceholderAPI?"
placeholder: "PlaceholderAPI should actually do..."
validations:
required: true
- type: textarea
attributes:
label: "How to Reproduce"
description: |-
List the steps on how to reproduce this Bug.
Post any Code-examples in the `Additional Information` field below when you selected `API Bug`.
placeholder: |-
1. Do this
2. ...
3. Profit!
validations:
required: true
- type: input
id: "dump"
attributes:
label: "`/papi dump` Output"
description: |-
Please execute the `/papi dump` command and provide the generated URL from it.
If you can't execute the command (i.e. PlaceholderAPI doesn't start up) can you put N/A here and mention the issue in the `Additional Information` field.
placeholder: "https://paste.helpch.at/dump.log"
validations:
required: true
- type: input
id: "console"
attributes:
label: "Console Log"
description: |-
Get the latest content of your `latest.log` file an upload it to https://paste.helpch.at
Take the generated URL and paste it into this field.
placeholder: "https://paste.helpch.at/latest.log"
- type: input
id: "error"
attributes:
label: "Errors"
description: |-
Upload any errors you find to https://paste.helpch.at and post the link in the field below.
placeholder: "https://paste.helpch.at/error.log"
- type: textarea
attributes:
label: "Additional Info"
description: |-
Add any extra info you think is nessesary for this Bug report.
- If you selected `API Bug` will you need to include code-examples here to reproduce the issue.
- If you selected `Plugin/Server Incompatability` should you include extra Server info such as a Timings or Spark-Report or info about the plugin in question.
placeholder: "Put any extra info you like into this field..."
+17
View File
@@ -0,0 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: HelpChat Discord
url: https://discordapp.com/invite/0utOOIYX82aImw7h
about: Please join our Discord for faster support.
- name: Wiki
url: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki
about: The Wiki of PlaceholderAPI.
- name: Hastebin
url: https://paste.helpch.at
about: Use our Hastebin-site for sharing errors and configuration files.
- name: Update Wiki
url: https://github.com/PlaceholderAPI/PlaceholderAPI/pulls
about: Please make a Pull request towards the "wiki" folder to update the wiki.
- name: Questions
url: https://github.com/PlaceholderAPI/PlaceholderAPI/discussions
about: If you have any questions, ask them in our Discussions Page.
@@ -0,0 +1,62 @@
name: Feature Request
description: Suggest a new Feature for PlaceholderAPI
labels:
- "Type: Enhancement"
body:
- type: markdown
attributes:
value: |-
Thank you for taking the time in creating this Feature Request.
In order to process your feature request as fast and efficiently as possible do we ask you to fill out any required fields (Indicated with a red asterisk (`*`)) with the requested information.
If you have any further questions should you either [join our Discord Server](https://helpch.at/discord) or [ask in our Discussions](https://github.com/PlaceholderAPI/PlaceholderAPI/discussions).
- type: checkboxes
attributes:
label: Confirmation
description: Please make sure to have followed the following checks.
options:
- label: I checked the Issues and Pull request tab for any existing issues or PRs.
required: true
- label: My Feature Request is for **PlaceholderAPI** and not any expansion or other plugin.
required: true
- type: dropdown
attributes:
label: "Type"
description: "What type is your Suggestion? Select all that match."
multiple: true
options:
- "New API feature"
- "New config option"
- "Minor Code improvement (Won't affect Servers)"
- "Major Code improvement (Will affect Servers)"
validations:
required: true
- type: textarea
attributes:
label: "Description"
description: |-
Give a detailed explanation about your Feature request and why it would be beneficial for PlaceholderAPI.
Just saying "It's cool!" or "I need it" don't count as valid reasons. It needs to have a clear benefit for **other** players too.
validations:
required: true
- type: textarea
attributes:
label: "Code Example"
description: |-
Do you have any Code Snippets that you want to share with us? Paste it here!
Note that the input will automatically be rendered as Java code, so you won't need to put it into a code block yourself.
render: java
- type: input
attributes:
label: "Jar file"
description: |-
If you already have a PlaceholderAPI Jar with the requested changes would we love to get a download link for it.
If you don't have a download link can you leave this field empty or provide "N/A" as a response.
placeholder: "https://cdn.discordapp.com/..."
- type: textarea
attributes:
label: "Additional Information"
description: |-
Add any extra info you think is nessesary for this Feature request.
- When you selected `Major Code improvement (Will affect Servers)` should you mention what will break when people update.
placeholder: "Put any extra info you like into this field..."
+28
View File
@@ -0,0 +1,28 @@
<!--
### Please read ###
Please make sure you checked the following:
- You checked the Pull requests page for any upcoming changes.
- You documented any public code that the end-user might use.
- You followed the contributing file (https://github.com/PlaceholderAPI/PlaceholderAPI/tree/master/.github/CONTRIBUTING.md).
-->
## Pull Request
### Type
<!--
Please select the right one, by changing the [ ] to [x]
-->
- [ ] Internal change (Doesn't affect end-user).
- [ ] External change (Does affect end-user).
- [ ] Wiki (Changes towards the [Wiki]).
- [ ] Other: __________ <!-- Use this if none of the above matches your request -->
### Description
<!-- What does your Pull request change? -->
Closes N/A <!-- If your PR is based on an issue, change "N/A" the the issue ID (#id) -->
<!-- DO NOT ALTER ANYTHING BELOW THIS LINE! -->
[Wiki]: https://wiki.placeholderapi.com
+145
View File
@@ -0,0 +1,145 @@
comment:
footer: "\
----\n\n
> [!NOTE]\n
> *This is an automated response created by a **GitHub Action***<br>
> *Mentioning the bot won't have any effect!*
"
labels:
- name: 'Type: Issue (Expansion)'
labeled:
issue:
body: |-
Hello @{{ issue.user.login }},
The issue you encountered is caused by an Expansion and not PlaceholderAPI itself.
This issue-tracker is reserved for Bug reports and feature requests towards PlaceholderAPI.
Please report this issue to the Expansion's main issue-tracker.
A list of known Expansion repositories and their issue trackers can be found [here](https://github.com/PlaceholderAPI/PlaceholderAPI/discussions/510#discussion-63812).
action: close
- name: 'Type: Duplicate'
labeled:
issue:
body: |-
Your issue is already known and a separate issue with the exact same report/feature request already exist.
Please comment on the already existing issue with your information instead of opening your own.
action: close
- name: 'Problem: More info required'
labeled:
issue:
body: |-
Hello @{{ issue.user.login }},
Your issue unfortunately lacks certain information that we require in order to help you with your issue.
Please make sure you provide the following information:
- Currently used Versions of your server (`/version`) and PlaceholderAPI (`/version PlaceholderAPI`)
- Currently installed Expansions (`/papi list`)
- Currently installed Plugins (`/pl`)
- Any additional information requested by users in this issue.
The easiest way to provide those information is through the `/papi dump` command which posts the required information to https://paste.helpch.at and gives a URL to share.
unlabeled:
issue:
body: |-
Thank you for providing additional information.
We will take a look at the issue you encounter and come back to you with a possible solution.
- name: 'Type: Invalid'
labeled:
issue:
body: |-
Your issue has beeen marked as invalid.
This means that it either doesn't follow any provided template, or isn't related to PlaceholderAPI.
Please make sure to use one of the issue templates and provide the requested information.
Currently available Templates are:
- [Bug Report](https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?labels=Type%3A+Issue+%28Unconfirmed%29&template=bug_report.yml)
- [Feature Request](https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?labels=Type%3A+Enhancement&template=feature_request.yml)
If you want changes to be made towards the Wiki, would we encourage you to [Make a Pull request](https://github.com/PlaceholderAPI/PlaceholderAPI/pulls).
You can find more information about this process on the [Wiki's Readme](https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki/README.md).
It is recommended to [join our Discord Server](https://helpch.at/discord) as you often receive a faster response compared to the issue tracker here.
Questions about PlaceholderAPI should be asked in our [Discussions](https://github.com/PlaceholderAPI/PlaceholderAPI/discussions).
action: close
pr:
body: |-
Your Pull request has been marked as **invalid**.
This means that it doesn't follow our [Contributing Guidelines](https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/.github/CONTRIBUTING.md).
Here is a small summary of what you should know:
- Pull requests for PlaceholderAPI should target the `master` branch.
- Pull requests for the Wiki should target the `wiki` branch.
Don't hesitate to ask us any questions.
action: close
- name: 'Type: Invalid (Wiki)'
labeled:
pr:
body: |-
Your Wiki Pull request has been marked as **invalid**.
Pull requests targeting the Wiki need to target the `wiki` branch.
More information can be found on the [Wiki README](https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki/README.md).
action: close
- name: 'Target: Wiki'
labeled:
issue:
body: |-
Hello @{{ issue.user.login }},
Thank you for reaching out to us about the wiki.
We would like to inform you, that you are able to directly commit your changes to the wiki through a Pull request.
When doing so, make sure you follow these steps:
- The Pull request is based on AND targets the [`wiki`](https://github.com/PlaceholderAPI/PlaceholderAPI/tree/wiki) branch of the Repository.
- You followed the general Styling Guidelines mentioned in the wiki's [README](https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki/README.md) file.
If you have any questions about submitting a PR for the wiki or have any other questions don't hesitate to ask us about it.
- name: 'Type: Not a bug'
labeled:
issue:
body: |-
The issue you encounter is not considered a bug and rather an intentional behaviour of PlaceholderAPI and/or one of its expansions.
If you still believe that it is a bug, provide more information and a maintainer of this repository may look at it more closely.
Before providing more info, always make sure to use the latest version of PlaceholderAPI, as the issue you encounter might already be fixed in a newer version.
Optionally can you also try out [development builds](https://ci.extendedclip.com/job/PlaceholderAPI/) and see if the issue was fixed there.
action: close
unlabeled:
issue:
body: After further investigation is the issue you encounter indeed considered a bug and we will try to fix it as soon as possible.
action: open
- name: 'Status: Inactive'
labeled:
issue:
body: |-
The issue has been marked as **inactive** which means it didn't recieve any responses from the Author ({{ issue.user.login }}) for a long period of time.
To keep the issue-tracker clean and up to date do we close issues that haven't received any responses for a long time.
If you're the Author of this issue and the reported problem is still present, make sure to respond with additional info to this issue, so that we can reopen it.
**Do not create a new issue for the same problem!**
action: close
unlabeled:
issue:
body: The issue received a response from the Author who confirms this to still be prominent and has therefore been reopened.
action: open
- name: 'Type: Question'
labeled:
issue:
body: |-
Hello @{{ issue.user.login }},
Thank you for reaching out to us for getting Support with PlaceholderAPI.
We would like to inform you, that we have [Discussions](https://github.com/PlaceholderAPI/PlaceholderAPI/discussions) that you can use for asking questions.
Just head over there and click the "New discussion" button to create a new post.
Remember to first read the [READ ME](https://github.com/PlaceholderAPI/PlaceholderAPI/discussions/507) post to not face any issues.
For questions do we recommend to use the [(2) Support](https://github.com/PlaceholderAPI/PlaceholderAPI/discussions/categories/-2-support) category.
You can also use the Discussion to submit Feature requests (Feature requests through issues are still accepted tho).
+24
View File
@@ -0,0 +1,24 @@
#
# This file is used to automatically draft new release changelogs in GitHub.
# Read more: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
#
changelog:
exclude:
labels:
- 'Action: No Changelog'
categories:
- title: 'Breaking Changes'
labels:
- 'Type: Breaking'
- title: 'Additions'
labels:
- 'Type: New Feature'
- title: 'Changes'
labels:
- 'Type: Enhancement'
- title: 'Fixes'
labels:
- 'Type: Bugfix'
- title: 'Other changes'
labels:
- '*' # Catch every other PR not labeled with an "exclude" label.
+25
View File
@@ -0,0 +1,25 @@
name: Comment
on:
issues:
types:
- labeled
- unlabeled
pull_request_target:
types:
- labeled
- unlabeled
jobs:
give_comment:
if: github.event.issue.state == 'open' || github.event.pull_request.state == 'open'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
ref: master
- name: Send Issue/Pull request comment
uses: peaceiris/actions-label-commenter@v1.8.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
+31
View File
@@ -0,0 +1,31 @@
name: "Test compiling against Java 8, 11 and 16"
on:
pull_request:
branches:
- development
paths:
- "src/**"
- "build.gradle"
jobs:
testBuilds:
strategy:
fail-fast: false
max-parallel: 4
matrix:
java-version: [8, 11, 16]
name: "Compile jar against ${{ matrix.java-version }}"
runs-on: ubuntu-latest
steps:
- name: "Checkout Code"
uses: actions/checkout@v2
- name: "Prepare Java ${{ matrix.java-version }}"
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "${{ matrix.java-version }}"
- name: "Make build.gradle executable"
run: "chmod +x gradlew"
- name: "Build jar with Java ${{ matrix.java-version }}"
run: "./gradlew shadowJar"
-67
View File
@@ -1,67 +0,0 @@
#
# This is a GitHub Action that allows us to build and update the wiki
# on GitHub Pages using MkDocs.
#
name: Update Wiki from Repository
on:
workflow_dispatch:
push:
#
# Only trigger when the push changes any files on the wiki branch.
#
branches:
- 'wiki'
#
# Ignore changes to the README.md file
#
paths-ignore:
- 'README.md'
#
# Releases cause this action to also fire.
# Using this prevents this problem.
#
tags-ignore:
- '**'
permissions:
actions: read
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: false
jobs:
buildSite:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: wiki
- name: Setup Python 3.x
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Update Pip and Setuptools
run: python -m pip install -U pip setuptools
- name: Install dependencies
run: python -m pip install mkdocs-material
- name: Build pages
run: mkdocs build
- name: Configure GitHub Pages
uses: actions/configure-pages@v4
- 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
+9
View File
@@ -0,0 +1,9 @@
.idea/
.gradle/
server/
build/
out/
*.iml
.classpath
.project
.settings/
-41
View File
@@ -1,41 +0,0 @@
{% extends "base.html" %}
{% block extrahead %}
{% if page and page.meta %}
{% set title = config.site_name %}
{% if page.meta.title %}
<meta property="og:title" content="{{ page.meta.title }} - {{ title }}">
<meta name="twitter:title" content="{{ page.meta.title }} - {{ title }}">
{% elif page.title and not page.is_homepage %}
<meta property="og:title" content="{{ title }} - {{ page.title | striptags }}">
<meta name="twitter:title" content="{{ title }} - {{ page.title | striptags }}">
{% else %}
<meta property="og:title" content="{{ title }}">
<meta name="twitter:title" content="{{ title }}">
{% endif %}
{% if page.meta.description %}
<meta property="og:description" content="{{ page.meta.description }}">
<meta name="twitter:description" content="{{ page.meta.description }}">
{% else %}
<meta property="og:description" content="{{ config.site_description }}">
<meta name="twitter:description" content="{{ config.site_description }}">
{% endif %}
{% endif %}
<meta name="theme-color" content="#4051b5">
<meta property="og:type" content="website">
<meta property="og:url" content="{{ page.canonical_url }}">
<meta property="og:image" content="{{ config.site_url | url }}assets/img/favicons/android-chrome-512x512.png">
<meta property="og:image:type" content="image/png">
<meta name="twitter:card" content="summary">
<meta name="twitter:creator" content="Chaos League Wiki Team">
<meta name="twitter:image" content="{{ config.site_url | url }}assets/img/favicons/android-chrome-512x512.png">
<link rel="apple-touch-icon" sizes="180x180" href="{{ config.site_url | url }}assets/img/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ config.site_url | url }}assets/img/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ config.site_url | url }}assets/img/favicons/favicon-16x16.png">
<link referrerpolicy="manifest" href="{{ config.site_url | url }}assets/web.manifest">
{% endblock %}
-24
View File
@@ -1,24 +0,0 @@
<div class="md-copyright">
<div class="md-copyright__highlight">
&copy; 2015 - 2024 PlaceholderAPI Team and Contributors.<br>
All content is licensed under
<a href="https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/LICENSE" target="_blank" rel="noopener">
<span class="twemoji">{% include ".icons/octicons/law-16.svg" %}</span> GNU GPL v3.0
</a>
unless stated otherwise.<br>
<br>
<a href="#__consent"><span class="twemoji">{% include ".icons/octicons/gear-16.svg" %}</span> Manage Cookies</a>
</div>
{% if not config.extra.generator == false %}
Made with
<a href="https://www.mkdocs.org" target="_blank" rel="noopener">
MkDocs
</a>,
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a> and
<a href="https://facelessuser.github.io/pymdown-extensions/" target="_blank" rel="noopener">
PyMdown Extensions
</a>
{% endif %}
</div>
+51
View File
@@ -0,0 +1,51 @@
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[discord]: https://helpch.at/discord
## Code of Conduct
### Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
### Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
### Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
### Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
### Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team on their [discord server][discord]. All
complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
### Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+40 -218
View File
@@ -1,232 +1,54 @@
# PlaceholderAPI Wiki
[issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues
[licenseImg]: https://img.shields.io/github/license/PlaceholderAPI/PlaceholderAPI.svg
[license]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/LICENSE
Welcome on the Wiki branch!
[releaseImg]: https://img.shields.io/github/release/PlaceholderAPI/PlaceholderAPI.svg?label=github%20release
[release]: https://github.com/PlaceholderAPI/PlaceholderAPI/releases/latest
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.
[discord]: https://helpch.at/discord
[spigot]: https://www.spigotmc.org/resources/6245/
[hangar]: https://hangar.papermc.io/HelpChat/PlaceholderAPI
[bbb]: https://builtbybit.com/resources/placeholderapi.24306
[modrinth]: https://modrinth.com/plugin/placeholderapi
[Expansions cloud]: https://api.extendedclip.com/home
[placeholder list]: https://helpch.at/placeholders
## Contributing to the Wiki
[ci]: http://ci.extendedclip.com/job/PlaceholderAPI/
[ciImg]: http://ci.extendedclip.com/buildStatus/icon?job=PlaceholderAPI
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.
[APIversionImg]: https://repo.extendedclip.com/api/badge/latest/releases/me/clip/placeholderapi?name=API%20Version
[logo]: https://wiki.placeholderapi.com/assets/img/papi-logo.png
### Prerequisites
[contributing]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/.github/CONTRIBUTING.md
[placeholderexpansion]: https://wiki.placeholderapi.com/developers/creating-a-placeholderexpansion/
<!-- The stuff above isn't visible in the readme -->
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.
[![logo]][spigot]
Before you now start working on the wiki should make sure that the following has been done already:
[![ciImg]][ci] [![releaseImg]][release] ![APIversionImg] [![licenseImg]][license]
- 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.
# Information
[PlaceholderAPI][spigot] is a plugin for Spigot servers that allows server owners to display information from various plugins with a uniform format.
Should the above be completed can we start with the process of contributing to this wiki.
Support for specific plugins are provided either by the plugin itself or through expansions. The expansions may be downloaded in-game through the PAPI Expansion Cloud. There are currently over 240+ expansions that support a wide variety of plugins, such as Essentials, Factions, LuckPerms, and Vault.
### 1. Fork the Repository
PlaceholderAPI has been downloaded over 1,700,000 times on Spigot and has been used concurrently on over 45,000 servers, which makes it a must-have for a server of any type or scale.
> **Already have a fork?** Skip to the [next step!](#2-switch-target-branch)
## Contribute
If you would like to contribute towards PlaceholderAPI should you take a look at our [Contributing file][contributing] for the ins and outs on how you can do that and what you need to keep in mind.
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.
## Create an Expansion
If you would like to create your own Placeholder Expansion for PlaceholderAPI, take a look at our [Wiki][placeholderexpansion] which contains a detailed tutorial on how you can achieve this.
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.
## Support
- [Issue Tracker][issues]
- [Discord Support][discord]
![fork repo](docs/assets/img/readme/fork.png)
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.
![switch branch](docs/assets/img/readme/select-branch.png)
### 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.
![fork up-to-date](docs/assets/img/readme/up-to-date.png)
- `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.
![fork outdated](docs/assets/img/readme/needs-update.png)
### 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.
![pr prompt](docs/assets/img/readme/pr-prompt.png)
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).
![create pr](docs/assets/img/readme/create-pr.png)
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/
## Quick Links
- [CI Server][ci]
- [Expansions Cloud]
- [Placeholder List]
- [Spigot Page][spigot]
- [Hangar Page][hangar]
- [BuiltByBit Page][bbb]
- [Modrinth Page][modrinth]
+123
View File
@@ -0,0 +1,123 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
`java-library`
`maven-publish`
id("eclipse")
id("com.github.hierynomus.license") version "0.16.1"
id("com.gradleup.shadow") version "8.3.9"
}
group = "me.clip"
version = "2.11.7-DEV-${System.getProperty("BUILD_NUMBER")}"
description = "An awesome placeholder provider!"
repositories {
maven("https://oss.sonatype.org/content/repositories/snapshots/")
mavenCentral()
mavenLocal()
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
implementation("net.kyori:adventure-platform-bukkit:4.3.3")
compileOnly("dev.folia:folia-api:1.19.4-R0.1-SNAPSHOT")
compileOnlyApi("org.jetbrains:annotations:23.0.0")
testImplementation("org.openjdk.jmh:jmh-core:1.32")
testImplementation("org.openjdk.jmh:jmh-generator-annprocess:1.32")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
disableAutoTargetJvm()
}
license {
header = rootProject.file("config/headers/main.txt")
include("**/*.java")
mapping("java", "JAVADOC_STYLE")
encoding = "UTF-8"
ext {
set("year", 2024)
}
ignoreFailures = true
}
val javaComponent: SoftwareComponent = components["java"]
tasks {
processResources {
eachFile { expand("version" to project.version) }
}
build {
dependsOn(named("shadowJar"))
}
withType<JavaCompile> {
options.encoding = "UTF-8"
options.release = 8
}
withType<Javadoc> {
isFailOnError = false
with(options as StandardJavadocDocletOptions) {
addStringOption("Xdoclint:none", "-quiet")
addStringOption("encoding", "UTF-8")
addStringOption("charSet", "UTF-8")
}
}
withType<ShadowJar> {
archiveClassifier.set("")
relocate("net.kyori", "me.clip.placeholderapi.libs.kyori")
exclude("META-INF/versions/**")
}
withType<nl.javadude.gradle.plugins.license.License> {
isIgnoreFailures = true
}
test {
useJUnitPlatform()
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "placeholderapi"
from(javaComponent)
}
}
repositories {
maven {
if ("-DEV" in version.toString()) {
url = uri("https://repo.extendedclip.com/snapshots")
} else {
url = uri("https://repo.extendedclip.com/releases")
}
credentials {
username = System.getenv("JENKINS_USER")
password = System.getenv("JENKINS_PASS")
}
}
}
}
publish.get().setDependsOn(listOf(build.get()))
}
configurations {
testImplementation {
extendsFrom(compileOnly.get())
}
}
+7
View File
@@ -0,0 +1,7 @@
Copyright (c) 2018-2024 Peter Blood
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+17
View File
@@ -0,0 +1,17 @@
This file is part of PlaceholderAPI
PlaceholderAPI
Copyright (c) 2015 - ${year} PlaceholderAPI Team
PlaceholderAPI free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PlaceholderAPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
+569
View File
@@ -0,0 +1,569 @@
<code_scheme name="DaddyStyle" version="173">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</value>
</option>
<option name="RIGHT_MARGIN" value="100" />
<AndroidXmlCodeStyleSettings>
<option name="USE_CUSTOM_SETTINGS" value="true" />
<option name="LAYOUT_SETTINGS">
<value>
<option name="INSERT_BLANK_LINE_BEFORE_TAG" value="false" />
</value>
</option>
</AndroidXmlCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="INDENT_CHAINED_CALLS" value="false" />
</JSCodeStyleSettings>
<JavaCodeStyleSettings>
<option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="" withSubpackages="true" static="true" />
<emptyLine />
<package name="" withSubpackages="true" static="false" />
</value>
</option>
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
<option name="JD_P_AT_EMPTY_LINES" value="false" />
<option name="JD_KEEP_EMPTY_PARAMETER" value="false" />
<option name="JD_KEEP_EMPTY_EXCEPTION" value="false" />
<option name="JD_KEEP_EMPTY_RETURN" value="false" />
</JavaCodeStyleSettings>
<Objective-C>
<option name="INDENT_NAMESPACE_MEMBERS" value="0" />
<option name="INDENT_C_STRUCT_MEMBERS" value="2" />
<option name="INDENT_CLASS_MEMBERS" value="2" />
<option name="INDENT_VISIBILITY_KEYWORDS" value="1" />
<option name="INDENT_INSIDE_CODE_BLOCK" value="2" />
<option name="KEEP_STRUCTURES_IN_ONE_LINE" value="true" />
<option name="FUNCTION_PARAMETERS_WRAP" value="5" />
<option name="FUNCTION_CALL_ARGUMENTS_WRAP" value="5" />
<option name="TEMPLATE_CALL_ARGUMENTS_WRAP" value="5" />
<option name="TEMPLATE_CALL_ARGUMENTS_ALIGN_MULTILINE" value="true" />
<option name="ALIGN_INIT_LIST_IN_COLUMNS" value="false" />
<option name="SPACE_BEFORE_SUPERCLASS_COLON" value="false" />
</Objective-C>
<Objective-C-extensions>
<option name="GENERATE_INSTANCE_VARIABLES_FOR_PROPERTIES" value="ASK" />
<option name="RELEASE_STYLE" value="IVAR" />
<option name="TYPE_QUALIFIERS_PLACEMENT" value="BEFORE" />
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cc" header="h" />
<pair source="c" header="h" />
</extensions>
</Objective-C-extensions>
<Python>
<option name="USE_CONTINUATION_INDENT_FOR_ARGUMENTS" value="true" />
</Python>
<TypeScriptCodeStyleSettings version="0">
<option name="INDENT_CHAINED_CALLS" value="false" />
</TypeScriptCodeStyleSettings>
<XML>
<option name="XML_ALIGN_ATTRIBUTES" value="false" />
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="CSS">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="ECMA Script Level 4">
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
<option name="TERNARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="1" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
</codeStyleSettings>
<codeStyleSettings language="HTML">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_RESOURCES" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_KEYWORD_WRAP" value="1" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
<option name="TERNARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
<option name="KEEP_SIMPLE_LAMBDAS_IN_ONE_LINE" value="true" />
<option name="KEEP_SIMPLE_CLASSES_IN_ONE_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="1" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="WRAP_COMMENTS" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JSON">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="RIGHT_MARGIN" value="80" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
<option name="TERNARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="1" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="ObjectiveC">
<option name="RIGHT_MARGIN" value="80" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
<option name="BLANK_LINES_BEFORE_IMPORTS" value="0" />
<option name="BLANK_LINES_AFTER_IMPORTS" value="0" />
<option name="BLANK_LINES_AROUND_CLASS" value="0" />
<option name="BLANK_LINES_AROUND_METHOD" value="0" />
<option name="BLANK_LINES_AROUND_METHOD_IN_INTERFACE" value="0" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="false" />
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="PROTO">
<option name="RIGHT_MARGIN" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="Python">
<option name="RIGHT_MARGIN" value="80" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="SASS">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="SCSS">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:.*Style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_width</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_height</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_weight</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_margin</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_marginTop</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_marginBottom</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_marginStart</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_marginEnd</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_marginLeft</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_marginRight</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:padding</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:paddingTop</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:paddingBottom</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:paddingStart</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:paddingEnd</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:paddingLeft</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:paddingRight</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res-auto</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>http://schemas.android.com/tools</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="protobuf">
<option name="RIGHT_MARGIN" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
-1
View File
@@ -1 +0,0 @@
wiki.placeholderapi.com
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

-33
View File
@@ -1,33 +0,0 @@
document$.subscribe(async => {
const api_code = document.querySelectorAll('[data-md-component="api-version"]');
function loadAPIInfo(data) {
const version = data["version"];
const versionToken = "{version}";
for (const codeBlock of api_code) {
codeBlock.innerHTML = codeBlock.innerHTML.replace(new RegExp(versionToken, 'g'), version);
}
}
async function fetchAPIInfo() {
const release = await fetch("https://repo.extendedclip.com/api/maven/latest/version/releases/me/clip/placeholderapi").then(_ => _.json());
console.log(release)
const data = {
"version": release.version
}
__md_set("__api_tag", data, sessionStorage);
loadAPIInfo(data);
}
if(location.href.includes("/developers/using-placeholderapi")) {
const cachedApi = __md_get("__api_tag", sessionStorage);
if ((cachedApi != null) && (cachedApi["version"])) {
loadAPIInfo(cachedApi);
} else {
fetchAPIInfo();
}
}
})
-1
View File
@@ -1 +0,0 @@
{"name":"","short_name":"","icons":[{"src":"./img/favicons/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"./img/favicons/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
-61
View File
@@ -1,61 +0,0 @@
:root {
--magiclink-github-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>');
--magiclink-github-pull-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg>');
--magiclink-github-issue-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg>');
--magiclink-github-discussion-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path></svg>');
}
.md-typeset .magiclink-repository.magiclink-github:not(.magiclink-ignore)::before {
-webkit-mask-image: var(--magiclink-github-icon);
mask-image: var(--magiclink-github-icon);
}
.md-typeset .magiclink-pull:not(.magiclink-ignore)::before {
-webkit-mask-image: var(--magiclink-github-pull-icon);
mask-image: var(--magiclink-github-pull-icon);
}
.md-typeset .magiclink-issue:not(.magiclink-ignore)::before {
-webkit-mask-image: var(--magiclink-github-issue-icon);
mask-image: var(--magiclink-github-issue-icon);
}
.md-typeset .magiclink-discussion:not(.magiclink-ignore)::before {
-webkit-mask-image: var(--magiclink-github-discussion-icon);
mask-image: var(--magiclink-github-discussion-icon);
}
.md-typeset .magiclink-repository.magiclink-github:not(.magiclink-ignore)::before,
.md-typeset .magiclink-pull:not(.magiclink-ignore)::before,
.md-typeset .magiclink-issue:not(.magiclink-ignore)::before,
.md-typeset .magiclink-discussion:not(.magiclink-ignore)::before {
position: absolute;
top: 0;
left: 0;
display: block;
box-sizing: border-box;
width: 1.25em;
height: 1.25em;
background-size: 1.25em;
background-color: var(--md-typeset-a-color);
transition: background-color 125ms;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-size: contain;
mask-size: contain;
content: "";
}
.md-typeset .magiclink-repository.magiclink-github:not(.magiclink-ignore):hover::before,
.md-typeset .magiclink-pull:not(.magiclink-ignore):hover::before,
.md-typeset .magiclink-issue:not(.magiclink-ignore):hover::before,
.md-typeset .magiclink-discussion:not(.magiclink-ignore):hover::before {
background-color: var(--md-accent-fg-color);
}
.md-typeset .magiclink-repository.magiclink-github:not(.magiclink-ignore),
.md-typeset .magiclink-pull:not(.magiclink-ignore),
.md-typeset .magiclink-issue:not(.magiclink-ignore),
.md-typeset .magiclink-discussion:not(.magiclink-ignore) {
position: relative;
padding-left: 1.375em;
}
-65
View File
@@ -1,65 +0,0 @@
: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);
}
-41
View File
@@ -1,41 +0,0 @@
---
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).
## `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.
@@ -1,484 +0,0 @@
---
description: Comprehensive guide on how to create a PlaceholderExpansion for other plugins to use through PlaceholderAPI.
---
# Creating a PlaceholderExpansion
This page will cover how you can create your own [`PlaceholderExpansion`][placeholderexpansion] which you can either integrate into your own plugin (Recommended) or [upload to the eCloud](expansion-cloud.md).
It's worth noting that PlaceholderAPI relies on expansions being installed. PlaceholderAPI only acts as the core replacing utility while the expansions allow other plugins to use any installed placeholder in their own messages.
You can download expansions either directly from the eCloud yourself, or download them through the [download command of PlaceholderAPI](../users/commands.md#papi-ecloud-download).
## Table of contents
- [Getting started](#getting-started)
- [Common Expansion Parts](#common-expansion-parts)
- [Making an Internal Expansion](#making-an-internal-expansion)
- [Full Example](#full-example-internal)
- [Register your Expansion](#register-your-expansion)
- [Making an External Expansion](#making-an-external-expansion)
- [Full Example (Without Dependency)](#full-example-external-no-dependency)
- [Full Example (With Dependency)](#full-example-external-dependency)
- [Making a relational Expansion](#making-a-relational-expansion)
- [Full Example](#full-example-relational)
## Getting started
For starters, you need to decide what type of [`PlaceholderExpansion`][placeholderexpansion] you want to create. There are various ways to create an expansion. This page will cover the most common ones.
### Common Expansion Parts
All shown examples will share the same common parts that belong the the [`PlaceholderExpansion`][placeholderexpansion] class.
In order to not repeat the same basic info for each method throughout this page, and to greatly reduce the overall length, we will cover the most basic/necessary ones here.
#### Basic PlaceholderExpansion Structure
/// note |
Tab the :material-plus-circle: icons in the code block below for additional information.
///
```{ .java .annotate title="SomeExpansion.java" }
package at.helpch.placeholderapi.example.expansion;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
public class SomeExpansion extends PlaceholderExpansion {
@Override
public String getAuthor() {
return "Author"; // (1)
}
@Override
public String getIdentifier() {
return "example"; // (2)
}
@Override
public String getVersion() {
return "1.0.0"; // (3)
}
}
```
1. This method allows you to set the name of the expansion's author.
2. The identifier is the part in the placeholder that is between the first `%` (or `{` if bracket placeholders are used) and the first `_`.
The identifier may not contain `%`, `{`, `}` or `_`.
If you still want to use them in your expansion name, override the `getName()` method.
3. This method returns the version of the expansion.
Due to it being a string are you not limited to numbers alone, but it is recommended to stick with a number pattern.
PlaceholderAPI uses this String to compare with the latest version on the eCloud (if uploaded to it) to see if a new version is available.
If your expansion is included in a plugin, this does not matter.
You must also choose between one of these two methods for handling the actual parsing of placeholders (Exception being expansions providing [relational placeholders](#making-a-relational-expansion)):
- `onRequest(OfflinePlayer, String)`
The first parameter is the player that the placeholders are parsed against, given as an OfflinePlayer instance. This can be null.
The second parameter is the content of the placeholder after the first `_` and before the closing `%` (or `}` if bracket placeholders are used). This String is never null.
If not explicity overriden, this will automatically call `onPlaceholderRequest(Player, String)`, passing the parameters as-is to it.
This method is recommended as it allows the usage of offline players, meaning the player does not need to be online to obtain certain certain data from them such as name or UUID.
- `onPlaceholderRequest(Player, String)`
The first parameter is the player that the placeholders are parsed against, given as a Player instance. This can be null.
The second parameter is the content of the placeholder after the first `_` and before the closing `%` (or `}` if bracket placeholders are used). This String is never null.
If not set, this method will return `null` which PlaceholderAPI sees as an invalid placeholder.
/// note
PlaceholderAPI always calls `onRequest(Player, String)` in a PlaceholderExpansion.
///
----
## Making an Internal Expansion
Internal PlaceholderExpansions are classes directly integrated in the plugin they depend on.
This method of creating a PlaceholderExpansion is recommended as it has the following benefits:
- No `canRegister()` method override required. Since your expansion is part of the plugin it depends on is this override not required.
- Easier access to plugin data. Using dependency injection, you can more easily access data of your plugin such as config values.
/// warning | Important!
Internal PlaceholderExpansions are not automatically registered by PlaceholderAPI, due to them not being a separate jar file located in the expansion folder.
Please see the [Regsister your Expansion](#register-your-expansion) section for more details.
You are also required to override and set `persist()` to `true`. This tells PlaceholderAPI to not unload your expansion during plugin reload, as it would otherwise unregister your expansion, making it no longer work.
///
/// details | Full Example
attrs: { id: full-example-internal }
type: example
//// note |
Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
Tab the :material-plus-circle: icons in the code block below for additional information.
////
```{ .java .annotate title="SomeExpansion.java" }
package at.helpch.placeholderapi.example.expansion;
import at.helpch.placeholderapi.example.SomePlugin;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.OfflinePlayer;
import org.jetbrains.annotations.NotNull;
public class SomeExpansion extends PlaceholderExpansion {
private final SomePlugin plugin; // (1)
public SomeExpansion(SomePlugin plugin) {
this.plugin = plugin;
}
@Override
@NotNull
public String getAuthor() {
return String.join(", ", plugin.getDescription().getAuthors()); // (2)
}
@Override
@NotNull
public String getIdentifier() {
return "example";
}
@Override
@NotNull
public String getVersion() {
return plugin.getDescription().getVersion(); // (3)
}
@Override
public boolean persist() {
return true; // (4)
}
@Override
public String onRequest(OfflinePlayer player, @NotNull String params) {
if (params.equalsIgnoreCase("placeholder1")) {
return plugin.getConfig().getString("placeholders.placeholder1", "default1"); // (5)
}
if (params.equalsIgnoreCase("placeholder2")) {
return plugin.getConfig().getString("placeholders.placeholder1", "default1"); // (6)
}
return null; // (7)
}
}
```
1. Mockup plugin used to showcase the use of dependency injection to access specific plugin related data.
2. We can use the authors set in the plugin's `plugin.yml` file as the authors of this expansion.
3. Since our expansion is internal can this version be the same as the one defined in the plugin's `plugin.yml` file.
4. This needs to be set, or else will PlaceholderAPI unregister our expansion during a plugin reload.
5. Example of accessing data of the plugin's `config.yml` file.
6. Example of accessing data of the plugin's `config.yml` file.
7. Reaching this means that an invalid params String was given, so we return `null` to tell PlaceholderAPI that the placeholder was invalid.
///
### Register your Expansion
Due to the PlaceholderExpansion being internal, PlaceholderAPI does not load it automatically, we'll need to do it manually.
This is being done by creating a new instance of your PlaceholderExpansion class and calling the `register()` method of it.
Here is a quick example:
```{ .java .annotate title="SomePlugin.java" }
package at.helpch.placeholderapi.example;
import at.helpch.placeholderapi.example.expansion.SomeExpansion;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public class SomePlugin extends JavaPlugin {
@Override
public void onEnable() {
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) { // (1)
new SomeExpansion(this).register(); // (2)
}
}
}
```
1. We check that PlaceholderAPI is present and enabled on the server, or else we would get Exceptions.
Also, make sure you [set PlaceholderAPI as depend or softdepend](using-placeholderapi.md#set-placeholderapi-as-softdepend) in your plugin's `plugin.yml` file!
2. This registers our expansion in PlaceholderAPI. It also gives the Plugin class as dependency injection to the Expansion class, so that we can use it.
----
## Making an External Expansion
External Expansions are separate Jar files located inside PlaceholderAPI's `expansions` folder, that contain the [`PlaceholderExpansion`][placeholderexpansion] extending class.
It is recommended to only make external Expansions for the following situations.
- Your expansion does not rely on a plugin.
- Your expansion depends on a plugin and you can't directly include it (Plugin is not your own).
Should the above cases not match your situation, meaning your expansion is for a plugin you maintain, is the creation of an [internal Expansion](#making-an-internal-expansion) recommended.
Some benefits of an external expansion include automatic (re)loading of your expansion by PlaceholderAPI and having the option to [upload it to the eCloud](expansion-cloud.md) allowing the download of it through the [`/papi ecloud download` command](../users/commands.md#papi-ecloud-download).
Downsides include a more tedious setup in terms of checking for a required plugin being present.
/// details | Full Example (Without Dependency)
attrs: { id: full-example-external-no-dependency }
type: example
//// note |
Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
Tab the :material-plus-circle: icons in the code block below for additional information.
////
This is an example expansion without any plugin dependency.
```{ .java .annotate title="SomeExpansion.java" }
package at.helpch.placeholderapi.example.expansion;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.OfflinePlayer;
import org.jetbrains.annotations.NotNull;
public class SomeExpansion extends PlaceholderExpansion {
@Override
@NotNull
public String getAuthor() {
return "Author";
}
@Override
@NotNull
public String getIdentifier() {
return "example";
}
@Override
@NotNull
public String getVersion() {
return "1.0.0";
}
@Override
public String onRequest(OfflinePlayer player, @NotNull String params) {
if (params.equalsIgnoreCase("placeholder1")) {
return "text1";
}
if (params.equalsIgnoreCase("placeholder2")) {
return "text2";
}
return null; // (1)
}
}
```
1. Reaching this means that an invalid params String was given, so we return `null` to tell PlaceholderAPI that the placeholder was invalid.
///
/// details | Full Example (With Dependency)
attrs: { id: full-example-external-dependency }
type: example
//// note |
Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
Tab the :material-plus-circle: icons in the code block below for additional information.
////
This is an example expansion with a plugin dependency.
```{ .java .annotate title="SomeExpansion.java" }
package at.helpch.placeholderapi.example.expansion;
import at.helpch.placeholderapi.example.SomePlugin;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.jetbrains.annotations.NotNull;
public class SomeExpansion extends PlaceholderExpansion {
private SomePlugin plugin; // (1)
@Override
@NotNull
public String getAuthor() {
return "Author";
}
@Override
@NotNull
public String getIdentifier() {
return "example";
}
@Override
@NotNull
public String getVersion() {
return "1.0.0"
}
@Override
public String getRequiredPlugin() {
return "SomePlugin"; // (2)
}
@Override
public boolean canRegister() { // (3)
return (plugin = (SomePlugin) Bukkit.getPluginManager().getPlugin(getRequiredPlugin())) != null;
}
@Override
public String onRequest(OfflinePlayer player, @NotNull String params) {
if (params.equalsIgnoreCase("placeholder1")) {
return plugin.getConfig().getString("placeholders.placeholder1", "default1"); // (4)
}
if (params.equalsIgnoreCase("placeholder2")) {
return plugin.getConfig().getString("placeholders.placeholder1", "default1"); // (5)
}
return null; // (6)
}
}
```
1. We set the value of this instance in the `canRegister()` method, which means that it can't be set to be final.
2. The name of the plugin this expansion depends on.
It is recommended to set this, as it would result in PlaceholderAPI reporting any missing plugin for your expansion.
3. This does two things:
1. It sets the `plugin` instance to `SomePlugin` using Bukkit's PluginManager to retrieve a JavaPlugin instance that is cast to `SomePlugin`.
2. It checks if the retrieved instance is not null. If it is will this result in `canRegister()` returning false, resulting in PlaceholderAPI not loading our expansion.
4. Example of accessing data of the plugin's `config.yml` file.
5. Example of accessing data of the plugin's `config.yml` file.
6. Reaching this means that an invalid params String was given, so we return `null` to tell PlaceholderAPI that the placeholder was invalid.
///
----
## Making a relational Expansion
/// note
Relational Placeholders always start with `rel_` to properly identify them. This means that if you make a relational placeholder called `friends_is_friend` would the full placeholder be `%rel_friends_is_friend%`.
///
Relational PlaceholderExpansions are special in that they take two players as input, allowing you to give outputs based on their relation to each other.
To create a relational expansion you will need to implement the [`Relational`][relational] interface into your expansion. You also still need to extend the [`PlaceholderExpansion`][placeholderexpansion] class.
Implementing this interface will add the `onPlaceholderRequest(Player, Player, String)` with the first two arguments being the first and second player to use and the third argument being the content after the second `_` and before the final `%` (Or `}` if bracket placeholders are used) in the placeholder.
/// details | Full Example
attrs: { id: full-example-relational }
type: example
//// note |
Please see the [Basic PlaceholderExpansion Structure](#basic-placeholderexpansion-structure) section for an explanation of all common methods in this example.
Tab the :material-plus-circle: icons in the code block below for additional information.
////
This is a complete example of using relational placeholders.
For the sake of simplicity are we using the [internal Expansion setup](#making-an-internal-expansion) here and assume that `SomePlugin` offers a `areFriends(Player, Player)` method that returns true or false based on if the players are friends or not.
```{ .java .annotate title="SomeExpansion.java" }
package at.helpch.placeholderapi.example.expansion;
import at.helpch.placeholderapi.example.SomePlugin;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.expansion.Relational
import org.bukkit.ChatColor;
import org.bukkit.Player;
import org.jetbrains.annotations.NotNull;
public class SomeExpansion extends PlaceholderExpansion implements Relational {
private final SomePlugin plugin; // (1)
public SomeExpansion(SomePlugin plugin) {
this.plugin = plugin;
}
@Override
@NotNull
public String getAuthor() {
return String.join(", ", plugin.getDescription().getAuthors()); // (2)
}
@Override
@NotNull
public String getIdentifier() {
return "example";
}
@Override
@NotNull
public String getVersion() {
return plugin.getDescription().getVersion(); // (3)
}
@Override
public boolean persist() {
return true; // (4)
}
@Override
public String onPlaceholderRequest(Player one, Player two, String identifier) {
if (one == null || two == null) {
return null; // (5)
}
if (identifier.equalsIgnoreCase("friends")) { // (6)
if (plugin.areFriends(one, two)) {
return ChatColor.GREEN + one.getName() + " and " + two.getName() + " are friends!";
} else {
return ChatColor.RED + one.getName() + " and " + two.getName() + " are not friends!";
}
}
return null; // (7)
}
}
```
1. Mockup plugin used to showcase the use of dependency injection to access specific plugin related data.
2. We can use the authors set in the plugin's `plugin.yml` file as the authors of this expansion.
3. Since our expansion is internal can this version be the same as the one defined in the plugin's `plugin.yml` file.
4. This needs to be set, or else will PlaceholderAPI unregister our expansion during a plugin reload.
5. Our placeholder requires both players to be present, so if either one is not will this return null.
6. In case the identifier matches (Meaning the placeholder is `%rel_example_friends%` or `{rel_example_friends}`) will we check if Player one and two are friends through our plugin's `areFriends(Player, Player)` method.
Should they be friends, return green text saying they are and else return red text saying they aren't.
7. Reaching this means that an invalid params String was given, so we return `null` to tell PlaceholderAPI that the placeholder was invalid.
Don't forget to [register your expansion](#register-your-expansion).
///
[placeholderexpansion]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java
[relational]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/src/main/java/me/clip/placeholderapi/expansion/Relational.java
-96
View File
@@ -1,96 +0,0 @@
---
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://api.extendedclip.com/home
## 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://api.extendedclip.com/manage/add/).
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://api.extendedclip.com/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.
-37
View File
@@ -1,37 +0,0 @@
---
description: Pages aimed at plugin developers who want to use PlaceholderAPI in their own plugin or want to make their own PlaceholderExpansion.
---
# Dev Guides
The pages listed under this section are meant for developers of plugins who want to either create PlaceholderExpansions or want to otherwise work with PlaceholderAPI (i.e. supporting external placeholders through it).
----
<div class="grid cards hide-list" markdown>
- ### Using PlaceholderAPI
----
Guide on how to use PlaceholderAPI in your own plugin.
- [:octicons-chevron-right-16: Go to Page](using-placeholderapi.md)
- ### Creating a PlaceholderExpansion
----
Comprehensive guide on how to create a PlaceholderExpansion for other plugins to use through PlaceholderAPI.
- [:octicons-chevron-right-16: Go to Page](creating-a-placeholderexpansion.md)
- ### eCloud
----
Information about PlaceholderAPI's expansion cloud, including how to submit your own expansion or update it.
- [:octicons-chevron-right-16: Go to Page](expansion-cloud.md)
</div>
-218
View File
@@ -1,218 +0,0 @@
---
description: Guide on how to use PlaceholderAPI in your own plugin.
---
# Using PlaceholderAPI
This page is about using PlaceholderAPI in your own plugin, to either let other plugins use your plugin, or just use placeholders from other plugins in your own.
Please note, that the examples in this page are only available for **PlaceholderAPI 2.10.0 or higher**!
## First steps
Before you can actually make use of PlaceholderAPI, you first have to import it into your project.
Use the below code example matching your dependency manager.
/// tab | :simple-apachemaven: Maven
```{ .xml title="pom.xml" data-md-component="api-version" }
<repositories>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>{version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
```
///
/// tab | :simple-gradle: Gradle
```{ .groovy title="build.gradle" data-md-component="api-version" }
repositories {
maven {
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
}
}
dependencies {
compileOnly 'me.clip:placeholderapi:{version}'
}
```
///
/// details | What is `{version}`?
type: question
Using Javascript, `{version}` is replaced with the latest available API version of PlaceholderAPI.
Should you see the placeholder as-is does it mean that you either block Javascript, or that the version couldn't be obtained in time during page load.
You can always find the latest version matching the API version on the [releases tab](https://github.com/PlaceholderAPI/PlaceholderAPI/releases) of the GitHub Repository.
///
### Set PlaceholderAPI as (soft)depend
Next step is to go to your plugin.yml or paper-plugin.yml and add PlaceholderAPI as a depend or softdepend, depending (no pun intended) on if it is optional or not.
/// tab | :simple-spigotmc: plugin.yml
//// tab | Optional dependency
///// note |
Tab the :material-plus-circle: icons in the code block below for additional information.
/////
```{ .yaml .annotate title="plugin.yml" }
name: ExamplePlugin
version: 1.0
author: author
main: your.main.path.Here
softdepend: ["PlaceholderAPI"] # (1)
```
1. This sets PlaceholderAPI as an optional dependency for your plugin.
////
//// tab | Required dependency
///// note |
Tab the :material-plus-circle: icons in the code block below for additional information.
/////
```{ .yaml .annotate title="plugin.yml" }
name: ExamplePlugin
version: 1.0
author: author
main: your.main.path.Here
depend: ["PlaceholderAPI"] # (1)
```
1. This sets PlaceholderAPI as a required dependency for your plugin.
////
///
/// tab | :fontawesome-regular-paper-plane: paper-plugin.yml
//// tab | Optional dependency
///// note |
Tab the :material-plus-circle: icons in the code block below for additional information.
/////
```{ .yaml .annotate title="paper-plugin.yml" }
name: ExamplePlugin
version: 1.0
author: author
main: your.main.path.Here
dependencies:
server:
PlaceholderAPI:
load: BEFORE # (1)
required: false
```
1. Load order is relative to the Dependency.
This means that in this example, PlaceholderAPI is loaded **before** your plugin.
////
//// tab | Required dependency
///// note |
Tab the :material-plus-circle: icons in the code block below for additional information.
/////
```{ .yaml .annotate title="paper-plugin.yml" }
name: ExamplePlugin
version: 1.0
author: author
main: your.main.path.Here
dependencies:
server:
PlaceholderAPI:
load: BEFORE # (1)
required: true
```
1. Load order is relative to the Dependency.
This means that in this example, PlaceholderAPI is loaded **before** your plugin.
////
///
## Adding placeholders to PlaceholderAPI
A full guide on how to create expansions can be found on the [Creating a PlaceholderExpansion](creating-a-placeholderexpansion.md) page.
## Setting placeholders in your plugin
PlaceholderAPI offers the ability, to automatically parse placeholders from other plugins within your own plugin, giving the ability for your plugin to support thousands of other placeholders without depending on each plugin individually.
To use placeholders from other plugins in our own plugin, we simply have to [(soft)depend on PlaceholderAPI](#set-placeholderapi-as-softdepend) and use the `setPlaceholders` method.
It is also important to point out, that any required plugin/dependency for an expansion has to be on the server and enabled, or the `setPlaceholders` method will just return the placeholder itself (do nothing).
/// details | Example
type: example
Let's assume we want to send a custom join message that shows the primary group a player has.
To achieve this, we can do the following:
//// note |
The below example assumes a **soft dependency** on PlaceholderAPI to handle PlaceholderAPI not being present more decently.
Tab the :material-plus-circle: icons in the code block below for additional information.
////
```{ .java .annotate title="JoinExample.java" }
package at.helpch.placeholderapi;
import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import me.clip.placeholderapi.PlaceholderAPI;
public class JoinExample extends JavaPlugin implements Listener {
@Override
public void onEnable() {
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
Bukkit.getPluginManager().registerEvents(this, this); // (1)
} else {
getLogger().warn("Could not find PlaceholderAPI! This plugin is required."); // (2)
Bukkit.getPluginManager().disablePlugin(this);
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onJoin(PlayerJoinEvent event) {
String joinText = "%player_name% joined the server! They are rank %vault_rank%";
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText); // (3)
event.setJoinMessage(joinText);
}
}
```
1. We check that PlaceholderAPI is present and enabled to then register events to handle (See below).
2. In case PlaceholderAPI is not present are we reporting this issue and disable the plugin.
3. Using `PlaceholderAPI.setPlaceholders(Player, String)` we can parse `%placeholder%` text in the provided String, should they have a matching expansion and said expansion return a non-null String.
In our example are we providing a text containing `%player_name%` and `%vault_rank%` to be parsed, which require the Player and Vault expansion respectively.
Example output: `Notch joined the server! They are rank Admin`
///
-82
View File
@@ -1,82 +0,0 @@
---
description: List of frequently asked questions and their answers.
---
# FAQ
Here are frequently asked questions about stuff related to PlaceholderAPI.
## What is an Expansion?
An expansion (or PlaceholderExpansion) refers to either a jar file or part of a plugin that provides placeholders to use through PlaceholderAPI itself.
Whether said expansion is a separate jar file or part of a plugin depends on the expansion itself and its main purpose.
Expansions that are separate jar files can be found on the eCloud and are downloadable through [`/papi ecloud download <expansion>`](users/commands.md#papi-ecloud-download) if the expansion is verified.
## It only shows `%placeholder%` and not the variable
When a plugin or [`/papi parse me %placeholder%`](users/commands.md#papi-parse) only returns the placeholder itself and no value should you check for the following things:
- ### The expansion is actually installed.
Some expansions may not be integrated into a plugin or don't even have a plugin to depend on, meaning that they may be their own separate jar file that you have to download.
Such expansions can usually be found on the eCloud of PlaceholderAPI and be downloaded using the [`/papi ecloud download <expansion>`](users/commands.md#papi-ecloud-download) command.
Whether an expansion is available on the eCloud or not can be found out in the [Placeholder List](users/placeholder-list.md) with any expansion displaying a papi command being downlodable.
- ### Plugin actually supports PlaceholderAPI
It can happen that the plugin you use to display the placeholder in doesn't support PlaceholderAPI. In such a case check, if the parse command returns the actual value of a placeholder.
If that is the case while the plugin is still displaying the placeholder, can this be an indicator of the plugin not supporting PlaceholderAPI.
You can find a list of plugins supporting PlaceholderAPI [here](users/plugins-using-placeholderapi.md).
Just make sure that "Supports placeholders" has a check mark in front of it.
- ### No typo in the placeholder
Double-check that the placeholder you set doesn't contain a typo. You can use [`/papi ecloud placeholders <expansion>`](users/commands.md#papi-ecloud-placeholders) (replace `<expansion>` with the name of the expansion) to get a list of all the placeholders the expansion may have.
Keep in mind that this only works for separate expansions on the eCloud and not for those that are loaded by plugins.
Additionally can the placeholder list from the eCloud be outdated. It is recommended to check the [Placeholder List](users/placeholder-list.md) or see if there is any documentation for the placeholders you want to use.
- ### Plugin is enabled
If an expansion depends on a plugin, make sure you have the plugin installed and that it is enabled (Shows green in `/pl`).
## I can't download the expansion
Make the following checks:
1. The connection to the eCloud (Located at https://api.extendedclip.com) is not blocked through a firewall or your server host.
2. The expansion you want to use is actually on the eCloud. Some expansions are included in a plugin directly.
3. The expansion is verified. Only verified expansions can be downloaded through PlaceholderAPI's download command. This is a security measure to prevent the spread of malware.
If the above checks are all fine and you still can't get the expansion through the download command, consider downloading it manually.
To do that, head to the expansion's page on the ecloud, download the jar file and put it into `/plugins/PlaceholderAPI/expansions/` before using [`/papi reload`](users/commands.md#papi-reload).
## How can other plugins use my placeholders with PlaceholderAPI?
See the [Using PlaceholderAPI](developers/using-placeholderapi.md) page.
## Can I help on this wiki?
You sure can!
We welcome contributions to our wiki by everyone. If you found a typo or want to improve this wiki in another way, head over to the [Wiki's readme file][readme] to find out about how you can contribute towards this wiki.
## PlaceholderAPI is posting an error about an outdated expansion?
```
[00:00:01 ERROR]: [PlaceholderAPI] Failed to load Expansion class <expansion> (Is a dependency missing?)
[00:00:01 ERROR]: [PlaceholderAPI] Cause: NoClassDefFoundError <path>
```
If you receive the above error, try to do the following steps:
- Make sure any required dependency of the mentioned expansion (e.g. a plugin) is installed.
- Make sure you use the latest version supported for the server version you use.
- If you downloaded the jar from the ecloud, make sure it isn't malformed/corrupted.
If the issue persists after you've done those checks, report it to the author of the expansion.
In most cases is the issue that either a dependency is missing or that the expansion tries to use outdated methods from PlaceholderAPI.
[readme]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki/README.md
-53
View File
@@ -1,53 +0,0 @@
# Welcome
![placeholderapi_logo](assets/img/wiki-logo.png){ align="center" }
This wiki gives you information on how to create placeholders in your plugin that can be used in other plugins, how to use other placeholders inside your plugin, or how to make an expansion.
It also has a community-curated list of all available Placeholder expansions and their placeholders.
## Navigation
<div class="grid cards hide-list" markdown>
- ### :material-account-file-text: User Guides
----
Pages aimed at server owners who want to utilize PlaceholderAPI.
Available pages:
- [:octicons-chevron-right-16: Commands](users/commands.md)
- [:octicons-chevron-right-16: Using Placeholders](users/using-placeholders.md)
- [:octicons-chevron-right-16: Placeholder List](users/placeholder-list.md)
- [:octicons-chevron-right-16: Plugins using PlaceholderAPI](users/plugins-using-placeholderapi.md)
- ### :material-file-code: Dev Guides
----
Pages aimed at plugin developers who want to use PlaceholderAPI in their own plugin or want to make their own PlaceholderExpansion.
Available pages:
- [:octicons-chevron-right-16: Using PlaceholderAPI](developers/using-placeholderapi.md)
- [:octicons-chevron-right-16: Creating a PlaceholderExpansion](developers/creating-a-placeholderexpansion.md)
- [:octicons-chevron-right-16: eCloud](developers/expansion-cloud.md)
- ### :material-alert-circle-outline: Common Issues
----
Common problems you may face while using PlaceholderAPI, and how to solve them.
- [:octicons-chevron-right-16: Go to Page](common-issues.md)
- ### :material-chat-question: FAQ
----
Frequently Asked Questions and their answers.
- [:octicons-chevron-right-16: Go to Page](faq.md)
</div>
-323
View File
@@ -1,323 +0,0 @@
---
description: Available commands within PlaceholderAPI.
---
# Commands
This page shows all commands, including with a detailed description of what every command does.
## Overview
- **[Parse Commands](#parse-commands)**
- [`/papi bcparse <player|me|--null> <string>`](#papi-bcparse)
- [`/papi cmdparse <player|me|--null> <string>`](#papi-cmdparse)
- [`/papi parse <player|me|--null> <string>`](#papi-parse)
- [`/papi parserel <player> <player> <string>`](#papi-parserel)
- **[eCloud Commands](#ecloud-commands)**
- [`/papi ecloud clear`](#papi-ecloud-clear)
- [`/papi ecloud disable`](#papi-ecloud-disable)
- [`/papi ecloud download <expansion> [version]`](#papi-ecloud-download)
- [`/papi ecloud enable`](#papi-ecloud-enable)
- [`/papi ecloud info <expansion> [version]`](#papi-ecloud-info)
- [`/papi ecloud list <all|<author>|installed>`](#papi-ecloud-list)
- [`/papi ecloud placeholders <expansion>`](#papi-ecloud-placeholders)
- [`/papi ecloud refresh`](#papi-ecloud-refresh)
- [`/papi ecloud status`](#papi-ecloud-status)
- **[Expansion Commands](#expansion-commands)**
- [`/papi info <expansion>`](#papi-info)
- [`/papi list`](#papi-list)
- [`/papi register <jar file>`](#papi-register)
- [`/papi unregister <jar file>`](#papi-unregister)
- **[Other Commands](#other-commands)**
- [`/papi dump`](#papi-dump)
- [`/papi help`](#papi-help)
- [`/papi reload`](#papi-reload)
- [`/papi version`](#papi-version)
----
### Parse Commands
These commands are used to parse placeholders into their respective values. Useful for debugging.
#### `/papi bcparse`
/// info |
**Description**:
Parses placeholders of a String and broadcasts the result to all players.
**Arguments**:
- `<player|me|--null>` - The Player to parse values of the placeholder (Use `me` for yourself and `--null` to force a null player (Useful for consoles)).
- `<Text with placeholders>` - The text to parse.
**Example**:
```
/papi bcparse funnycube My name is %player_name%!
```
///
#### `/papi cmdparse`
/// info |
**Description**:
Parses placeholders of a String and executes it as a command.
**Arguments**:
- `<player|me|--null>` - The Player to parse values of the placeholder (Use `me` for yourself and `--null` to force a null player (Useful for consoles)).
- `<Command with placeholders>` - The Text to parse and execute as command. Please leave away the `/` of the command.
**Example**:
```
/papi cmdparse funnycube say My name is %player_name%!
```
///
#### `/papi parse`
/// info |
**Description**:
Parses the placeholders in a given text and shows the result.
**Arguments**:
- `<player|me|--null>` - The Player to parse values of the placeholder (Use `me` for yourself and `--null` to force a null player (Useful for consoles)).
- `<Text with placeholders>` - The text to parse.
**Example**:
```
/papi parse funnycube My group is %vault_group%
```
///
#### `/papi parserel`
/// info |
**Description**:
Parses a relational placeholder.
**Arguments**:
- `<player1>` - The first player.
- `<player2>` - the second player to compare with.
- `<Text with placeholders>` - The actual placeholder to parse.
**Example**:
```
/papi parserel funnycube extended_clip %placeholder%
```
///
----
### eCloud Commands
These commands all start with `/papi ecloud` and are used for things related about the [Expansion Cloud](../developers/expansion-cloud.md).
#### `/papi ecloud clear`
/// info |
**Description**:
Clears the cache for the eCloud.
///
#### `/papi ecloud disable`
/// info |
**Description**:
Disables the connection to the eCloud.
///
#### `/papi ecloud download`
/// info |
**Description**:
Allows you to download an expansion from the eCloud
**Arguments**:
- `<expansion>` - The expansion to download.
- `[version]` - The specific version of the expansion to download (Optional)
**Example**:
```
/papi ecloud download Vault
/papi ecloud download Vault 1.5.2
```
///
#### `/papi ecloud enable`
/// info |
**Description**:
Enables the connection to the eCloud
///
#### `/papi ecloud info`
/// info |
**Description**:
Gives information about a specific Expansion.
**Arguments**:
- `<expansion>` - The Expansion to retrieve information from.
- `[version]` - The Expansion's version to get information from.
**Example**:
```
/papi ecloud info Vault
```
///
#### `/papi ecloud list`
/// info |
**Description**:
Lists either all Expansions on the eCloud, only those by a specific author or only those that you have [installed](#papi-ecloud-download).
Installed Expansions show as green in the list and Expansions that are installed and have an update available show as gold.
**Arguments**:
- `<all|<author>|installed>` - List all Expansions, Expansions of a specific author or all Expnansions you have installed.
**Example**:
```
/papi ecloud list all
/papi ecloud list clip
/papi ecloud list installed
```
///
#### `/papi ecloud placeholders`
/// info |
**Description**:
List all placeholders of an Expansion.
**Arguments**:
- `<expansion>` - The Expansion to list placeholders of.
**Example**:
```
/papi ecloud placeholders Vault
```
///
#### `/papi ecloud refresh`
/// info |
**Description**:
Refresh the cached data from the eCloud.
///
#### `/papi ecloud status`
/// info |
**Description**:
Displays the actual Status of the eCloud.
///
----
### Expansion Commands
These commands can be used to manage the expansions that you have currently installed.
#### `/papi info`
/// info |
**Description**:
Gives you information about the specified Expansion.
**Argument(s)**:
- `<expansion>` - The Expansion to get info from (Needs to be registered and active).
**Example**:
```
/papi info Vault
```
///
#### `/papi list`
/// info |
**Description**:
Lists all active/registered expansions.
This is different to [/papi ecloud list installed](#papi-ecloud-list) in the fact, that it also includes expansions that were installed through a plugin (That aren't a separate jar-file) and it also > doesn't show which one have updates available.
///
#### `/papi register`
/// info |
**Description**:
Registers an expansion from a specified filename.
This is useful in cases, where you downloaded the expansion manually and don't want to restart the server.
The file needs to be inside `/plugins/PlaceholderAPI/expansions`.
**Arguments**:
- `<filename>` - The file to register (including the file-extension).
**Example**:
```
/papi register MyExpansion.jar
```
///
#### `/papi unregister`
/// info |
**Description**:
Unregisters the specified expansion.
**Arguments**:
- `<filename>` - The expansion to unregister.
**Example**:
```
/papi unregister MyExpansion.jar
```
///
----
### Other Commands
These are other commands of PlaceholderAPI that don't fit any of the above categories.
#### `/papi dump`
/// info |
**Description**:
Pastes useful information from PlaceholderAPI such as plugin version, server version and installed expansions to https://paste.helpch.at for simple sharing and support.
///
#### `/papi help`
/// info |
**Description**:
Displays all the commands PlaceholderAPI currently offers.
///
#### `/papi reload`
/// info |
**Description**:
Reloads the config settings.
You need to use this command after [downloading Expansions](#papi-ecloud-download) from the eCloud or they won't be properly registered.
///
#### `/papi version`
/// info |
**Description**:
Shows the current version and authors of PlaceholderAPI.
///
-45
View File
@@ -1,45 +0,0 @@
---
description: Pages aimed at server owners who want to utilize PlaceholderAPI.
---
# User Guides
The pages listed under this section are meant for server owners who want to use PlaceholderAPI.
----
<div class="grid cards hide-list" markdown>
- ### Commands
----
List of all available commands in PlaceholderAPI.
- [:octicons-chevron-right-16: Go to Page](commands.md)
- ### Using Placeholders
----
User Guide on how to use placeholders in a plugin.
- [:octicons-chevron-right-16: Go to Page](using-placeholders.md)
- ### Placeholder List
----
Community-curated list of available PlaceholderExpansions and their placeholders.
- [:octicons-chevron-right-16: Go to Page](placeholder-list.md)
- ### Plugins using PlaceholderAPI
----
List of Plugins that support PlaceholderAPI and/or provide their own placeholders to use.
- [:octicons-chevron-right-16: Go to Page](plugins-using-placeholderapi.md)
</div>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-54
View File
@@ -1,54 +0,0 @@
---
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.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.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.
Binary file not shown.
+7
View File
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored Executable
+251
View File
@@ -0,0 +1,251 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
Vendored
+94
View File
@@ -0,0 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
-136
View File
@@ -1,136 +0,0 @@
site_name: PlaceholderAPI Wiki
site_description: Wiki of the Spigot Plugin PlaceholderAPI.
site_author: PlaceholderAPI Team and Contributors
site_url: 'https://wiki.placeholderapi.com'
repo_name: PlaceholderAPI/PlaceholderAPI
repo_url: https://github.com/PlaceholderAPI/PlaceholderAPI
theme:
name: material
custom_dir: '.theme'
logo: assets/img/favicons/android-chrome-512x512.png
icon:
repo: octicons/mark-github-16
admonition:
note: octicons/pencil-16
abstract: octicons/checklist-16
info: octicons/info-16
tip: octicons/rocket-16
success: octicons/check-circle-16
question: octicons/question-16
warning: octicons/alert-16
failure: octicons/x-circle-16
danger: octicons/zap-16
bug: octicons/bug-16
example: octicons/beaker-16
quote: octicons/comment-16
palette:
- media: '(prefers-color-scheme: light)'
scheme: default
primary: blue grey
accent: cyan
toggle:
icon: octicons/sun-24
name: 'Switch to dark theme'
- media: '(prefers-color-scheme: dark)'
scheme: slate
primary: black
accent: cyan
toggle:
icon: octicons/moon-24
name: 'Switch to light theme'
features:
- navigation.indexes
- navigation.tabs
- navigation.tabs.sticky
- navigation.sections
- navigation.top
- content.tooltips
- content.code.copy
extra:
consent:
title: Cookie consent
description: >-
We use cookies to recognize your repeated visits and preferences, as well
as to measure the effectiveness of our wiki and whether users find what
they're searching for. With your consent, you're helping us to make our
wiki better.
actions:
- accept
- reject
- manage
social:
- icon: fontawesome/regular/paper-plane
link: https://hangar.papermc.io/HelpChat/PlaceholderAPI
- icon: simple/spigotmc
link: https://www.spigotmc.org/resources/6245/
- icon: simple/discord
link: https://discord.gg/helpchat
nav:
- index.md
- User Guides:
- users/index.md
- users/commands.md
- users/using-placeholders.md
- users/placeholder-list.md
- users/plugins-using-placeholderapi.md
- Dev Guides:
- developers/index.md
- developers/using-placeholderapi.md
- developers/creating-a-placeholderexpansion.md
- developers/expansion-cloud.md
- common-issues.md
- faq.md
- Discord: https://discord.gg/helpchat
extra_javascript:
- assets/js/latest-release.js
extra_css:
- assets/stylesheets/link-icons.css
- assets/stylesheets/styling.css
markdown_extensions:
- attr_list
- toc:
permalink: true
- meta
- md_in_html
- pymdownx.superfences
- pymdownx.magiclink:
repo_url_shortener: true
repo_url_shorthand: true
provider: github
user: PlaceholderAPI
repo: PlaceholderAPI
normalize_issue_symbols: true
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.blocks.admonition:
types:
- note
- abstract
- info
- tip
- success
- question
- warning
- failure
- danger
- bug
- example
- quote
- command
- integrated
- download
- pymdownx.blocks.details
- pymdownx.blocks.tab:
alternate_style: true
- pymdownx.tasklist
+1
View File
@@ -0,0 +1 @@
rootProject.name = "PlaceholderAPI"
@@ -0,0 +1,624 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi;
import com.google.common.collect.ImmutableSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.expansion.Relational;
import me.clip.placeholderapi.expansion.manager.LocalExpansionManager;
import me.clip.placeholderapi.replacer.CharsReplacer;
import me.clip.placeholderapi.replacer.Replacer;
import me.clip.placeholderapi.replacer.Replacer.Closure;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
public final class PlaceholderAPI {
private static final Replacer REPLACER_PERCENT = new CharsReplacer(Closure.PERCENT);
private static final Replacer REPLACER_BRACKET = new CharsReplacer(Closure.BRACKET);
private static final Pattern PLACEHOLDER_PATTERN = Pattern.compile("[%]([^%]+)[%]");
private static final Pattern BRACKET_PLACEHOLDER_PATTERN = Pattern.compile("[{]([^{}]+)[}]");
private static final Pattern RELATIONAL_PLACEHOLDER_PATTERN = Pattern
.compile("[%](rel_)([^%]+)[%]");
private PlaceholderAPI() {
}
// === Current API ===
/**
* Translates all placeholders into their corresponding values.
* <br>The pattern of a valid placeholder is {@literal %<identifier>_<params>%}.
*
* @param player Player to parse the placeholders against
* @param text Text to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static String setPlaceholders(final OfflinePlayer player,
@NotNull final String text) {
return REPLACER_PERCENT.apply(text, player,
PlaceholderAPIPlugin.getInstance().getLocalExpansionManager()::getExpansion);
}
/**
* Translates all placeholders into their corresponding values.
* <br>The pattern of a valid placeholder is {@literal %<identifier>_<params>%}.
*
* @param player Player to parse the placeholders against
* @param text List of Strings to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static List<String> setPlaceholders(final OfflinePlayer player,
@NotNull final List<String> text) {
return text.stream().map(line -> setPlaceholders(player, line)).collect(Collectors.toList());
}
/**
* Translates all placeholders into their corresponding values.
* <br>The pattern of a valid placeholder is {@literal %<identifier>_<params>%}.
*
* @param player Player to parse the placeholders against
* @param text Text to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static String setPlaceholders(final Player player, @NotNull String text) {
return setPlaceholders(((OfflinePlayer) player), text);
}
/**
* Translates all placeholders into their corresponding values.
* <br>The pattern of a valid placeholder is {@literal %<identifier>_<params>%}.
*
* @param player Player to parse the placeholders against
* @param text List of Strings to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static List<String> setPlaceholders(final Player player, @NotNull List<@NotNull String> text) {
return setPlaceholders(((OfflinePlayer) player), text);
}
/**
* Translates all placeholders into their corresponding values.
* <br>The pattern of a valid placeholder is {@literal {<identifier>_<params>}}.
*
* @param player Player to parse the placeholders against
* @param text Text to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static String setBracketPlaceholders(final OfflinePlayer player,
@NotNull final String text) {
return REPLACER_BRACKET.apply(text, player,
PlaceholderAPIPlugin.getInstance().getLocalExpansionManager()::getExpansion);
}
/**
* Translates all placeholders into their corresponding values.
* <br>The pattern of a valid placeholder is {@literal {<identifier>_<params>}}.
*
* @param player Player to parse the placeholders against
* @param text List of Strings to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static List<@NotNull String> setBracketPlaceholders(final OfflinePlayer player,
@NotNull final List<@NotNull String> text) {
return text.stream().map(line -> setBracketPlaceholders(player, line))
.collect(Collectors.toList());
}
/**
* Translates all placeholders into their corresponding values.
* <br>The pattern of a valid placeholder is {@literal {<identifier>_<params>}}.
*
* @param player Player to parse the placeholders against
* @param text Text to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static String setBracketPlaceholders(Player player, @NotNull String text) {
return setBracketPlaceholders((OfflinePlayer) player, text);
}
/**
* Translates all placeholders into their corresponding values.
* <br>The pattern of a valid placeholder is {@literal {<identifier>_<params>}}.
*
* @param player Player to parse the placeholders against
* @param text List of Strings to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static List<String> setBracketPlaceholders(Player player, @NotNull List<String> text) {
return setBracketPlaceholders((OfflinePlayer) player, text);
}
/**
* set relational placeholders in the text specified placeholders are matched with the pattern
* {@literal %<rel_(identifier)_(params)>%} when set with this method
*
* @param one First player to compare
* @param two Second player to compare
* @param text Text to parse the placeholders in
* @return The text containing the parsed relational placeholders
*/
public static String setRelationalPlaceholders(Player one, Player two, String text) {
final Matcher matcher = RELATIONAL_PLACEHOLDER_PATTERN.matcher(text);
while (matcher.find()) {
final String format = matcher.group(2);
final int index = format.indexOf("_");
if (index <= 0 || index >= format.length()) {
continue;
}
String identifier = format.substring(0, index).toLowerCase(Locale.ROOT);
String params = format.substring(index + 1);
final PlaceholderExpansion expansion = PlaceholderAPIPlugin.getInstance()
.getLocalExpansionManager().getExpansion(identifier);
if (!(expansion instanceof Relational)) {
continue;
}
final String value = ((Relational) expansion).onPlaceholderRequest(one, two, params);
if (value != null) {
text = text.replaceAll(Pattern.quote(matcher.group()), Matcher.quoteReplacement(value));
}
}
return text;
}
/**
* Translate placeholders in the provided List based on the relation of the two provided players.
* <br>The pattern of a valid placeholder is {@literal %rel_<identifier>_<param>%}.
*
* @param one Player to compare
* @param two Player to compare
* @param text text to parse the placeholder values to
* @return The text containing the parsed relational placeholders
*/
public static List<String> setRelationalPlaceholders(Player one, Player two, List<String> text) {
return text.stream().map(line -> setRelationalPlaceholders(one, two, line))
.collect(Collectors.toList());
}
/**
* Check if a specific placeholder identifier is currently registered
*
* @param identifier The identifier to check
* @return true if identifier is already registered
*/
public static boolean isRegistered(@NotNull final String identifier) {
return PlaceholderAPIPlugin.getInstance().getLocalExpansionManager()
.findExpansionByIdentifier(identifier).isPresent();
}
/**
* Get all registered placeholder identifiers
*
* @return A Set of type String containing the identifiers of all registered expansions.
*/
@NotNull
public static Set<String> getRegisteredIdentifiers() {
return ImmutableSet
.copyOf(PlaceholderAPIPlugin.getInstance().getLocalExpansionManager().getIdentifiers());
}
/**
* Get the normal placeholder pattern.
*
* @return Regex Pattern of {@literal [%]([^%]+)[%]}
*/
public static Pattern getPlaceholderPattern() {
return PLACEHOLDER_PATTERN;
}
/**
* Get the bracket placeholder pattern.
*
* @return Regex Pattern of {@literal [{]([^{}]+)[}]}
*/
public static Pattern getBracketPlaceholderPattern() {
return BRACKET_PLACEHOLDER_PATTERN;
}
/**
* Get the relational placeholder pattern.
*
* @return Regex Pattern of {@literal [%](rel_)([^%]+)[%]}
*/
public static Pattern getRelationalPlaceholderPattern() {
return RELATIONAL_PLACEHOLDER_PATTERN;
}
/**
* Check if a String contains any PlaceholderAPI placeholders ({@literal
* %<identifier>_<params>%}).
*
* @param text String to check
* @return true if String contains any matches to the normal placeholder pattern, false otherwise
*/
public static boolean containsPlaceholders(String text) {
return text != null && PLACEHOLDER_PATTERN.matcher(text).find();
}
/**
* Check if a String contains any PlaceholderAPI bracket placeholders ({@literal
* {<identifier>_<params>}}).
*
* @param text String to check
* @return true if String contains any matches to the bracket placeholder pattern, false otherwise
*/
public static boolean containsBracketPlaceholders(String text) {
return text != null && BRACKET_PLACEHOLDER_PATTERN.matcher(text).find();
}
// === Deprecated API ===
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static boolean registerExpansion(PlaceholderExpansion expansion)
{
return expansion.register();
}
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static boolean unregisterExpansion(PlaceholderExpansion expansion)
{
return expansion.unregister();
}
/**
* Get map of registered placeholders
*
* @deprecated Use {@link LocalExpansionManager#getExpansions()} instead.
*
* @return Map of registered placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static Map<String, PlaceholderHook> getPlaceholders() {
return PlaceholderAPIPlugin.getInstance().getLocalExpansionManager()
.getExpansions().stream()
.collect(Collectors.toMap(PlaceholderExpansion::getIdentifier, ex -> ex));
}
/**
* @deprecated Please use {@link PlaceholderExpansion} to
* register placeholders instead
*
* @param plugin The Plugin to register with this {@link PlaceholderHook}
* @param placeholderHook The {@link PlaceholderHook} to register
* @return always false
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static boolean registerPlaceholderHook(Plugin plugin, PlaceholderHook placeholderHook) {
Msg.warn("Nag author(s) %s of plugin %s about their usage of the deprecated PlaceholderHook"
+ " class! This class will be removed in v2.13.0!", plugin.getDescription().getAuthors(),
plugin.getName());
return false;
}
/**
* @deprecated Please use {@link PlaceholderExpansion} to
* register placeholders instead
*
* @param identifier The identifier to use for the {@link PlaceholderHook}
* @param placeholderHook The {@link PlaceholderHook} to register
* @return always false
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static boolean registerPlaceholderHook(String identifier,
PlaceholderHook placeholderHook) {
Msg.warn("%s is attempting to register placeholders via deprecated PlaceholderHook class."
+ " This class is no longer supported and will be removed in v2.13.0!", identifier);
return false;
}
/**
* @deprecated Please use {@link PlaceholderExpansion} to
* unregister placeholders instead
*
* @param plugin The plugin to unregister
* @return always false
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static boolean unregisterPlaceholderHook(Plugin plugin) {
Msg.warn("Nag author(s) %s of plugin %s about their usage of the PlaceholderAPI class."
+ " This way of unregistering placeholders is no longer supported and will be removed"
+ " in v2.13.0!", plugin.getDescription().getAuthors(), plugin.getName());
return false;
}
/**
* @deprecated Please use {@link PlaceholderExpansion} to
* unregister placeholders instead
*
* @param identifier The identifier to unregister
* @return always false
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static boolean unregisterPlaceholderHook(String identifier) {
Msg.warn("%s is attempting to unregister placeholders via PlaceholderAPI class."
+ " This way of unregistering placeholders is no longer supported and will be removed"
+ " in v2.13.0!", identifier);
return false;
}
/**
* @deprecated Will be removed in a future release.
*
* @return Set of registered identifiers
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static Set<String> getRegisteredPlaceholderPlugins() {
return getRegisteredIdentifiers();
}
/**
* @deprecated Will be removed in a future release.
*
* @return always null
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static Set<String> getExternalPlaceholderPlugins() {
return null;
}
/**
* @deprecated Please use {@link #setPlaceholders(OfflinePlayer, String)} instead
*
* @param player The offline player to parse the placeholders against
* @param text The text to parse
* @param pattern The Pattern to use
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static String setPlaceholders(OfflinePlayer player,
String text, Pattern pattern, boolean colorize) {
return setPlaceholders(player, text);
}
/**
* @deprecated Please use {@link #setPlaceholders(OfflinePlayer, List)} instead
*
* @param player The offline player to parse the placeholders against
* @param text The List of text to parse
* @param pattern The Pattern to use
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static List<String> setPlaceholders(OfflinePlayer player,
List<String> text, Pattern pattern, boolean colorize) {
return setPlaceholders(player, text);
}
/**
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*
* @param player The offline player to parse the placeholders against
* @param text The List of text to parse
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static List<String> setPlaceholders(OfflinePlayer player, List<String> text,
boolean colorize) {
return setPlaceholders(player, text);
}
/**
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*
* @param player The offline player to parse the placeholders against
* @param text The List of text to parse
* @param pattern The Pattern to use
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static List<String> setPlaceholders(OfflinePlayer player, List<String> text,
Pattern pattern) {
return setPlaceholders(player, text);
}
/**
* @deprecated Will be removed in a future release.
*
* @param player The offline player to parse the placeholders against
* @param text The text to parse
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static String setPlaceholders(Player player, String text, boolean colorize) {
return setPlaceholders(player, text);
}
/**
* @deprecated Will be removed in a future release.
*
* @param player The offline player to parse the placeholders against
* @param text The List of text to parse
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static List<String> setPlaceholders(Player player, List<String> text, boolean colorize) {
return setPlaceholders(player, text);
}
/**
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*
* @param player The offline player to parse the placeholders against
* @param text The text to parse
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static String setPlaceholders(OfflinePlayer player, String text, boolean colorize) {
return setPlaceholders(player, text);
}
/**
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*
* @param player The offline player to parse the placeholders against
* @param text The text to parse
* @param pattern The Pattern to use
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static String setPlaceholders(OfflinePlayer player, String text, Pattern pattern) {
return setPlaceholders(player, text);
}
/**
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
*
* @param player The offline player to parse the placeholders against
* @param text The List of text to parse
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static List<String> setBracketPlaceholders(OfflinePlayer player, List<String> text,
boolean colorize) {
return setBracketPlaceholders(player, text);
}
/**
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*
* @param player The offline player to parse the placeholders against
* @param text The text to parse
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static String setBracketPlaceholders(OfflinePlayer player, String text, boolean colorize) {
return setBracketPlaceholders(player, text);
}
/**
* @deprecated Will be removed in a future release.
*
* @param player The offline player to parse the placeholders against
* @param text The text to parse
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static String setBracketPlaceholders(Player player, String text, boolean colorize) {
return setBracketPlaceholders(player, text);
}
/**
* @deprecated Will be removed in a future release.
*
* @param player The offline player to parse the placeholders against
* @param text The List of text to parse
* @param colorize If PlaceholderAPI should also parse color codes
* @return String with the parsed placeholders
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static List<String> setBracketPlaceholders(Player player, List<String> text,
boolean colorize) {
return setBracketPlaceholders(player, text);
}
/**
* set relational placeholders in the text specified placeholders are matched with the pattern
* {@literal %<rel_(identifier)_(params)>%} when set with this method
*
* @param one Player to compare
* @param two Player to compare
* @param text Text to parse the placeholders in
* @param colorize If color codes ({@literal &[0-1a-fk-o]}) should be translated
* @return The text containing the parsed relational placeholders
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static String setRelationalPlaceholders(Player one, Player two, String text,
boolean colorize) {
return setRelationalPlaceholders(one, two, text);
}
/**
* Translate placeholders in the provided list based on the relation of the two provided players.
* <br>The pattern of a valid placeholder is {@literal %rel_<identifier>_<params>%}.
*
* @param one First player to compare
* @param two Second player to compare
* @param text Text to parse the placeholders in
* @param colorize If color codes ({@literal &[0-1a-fk-o]}) should be translated
* @return The text containing the parsed relational placeholders
* @deprecated Use {@link #setRelationalPlaceholders(Player, Player, List)} instead.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public static List<String> setRelationalPlaceholders(Player one, Player two, List<String> text,
boolean colorize) {
return setRelationalPlaceholders(one, two, text);
}
}
@@ -0,0 +1,257 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import me.clip.placeholderapi.commands.PlaceholderCommandRouter;
import me.clip.placeholderapi.configuration.PlaceholderAPIConfig;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.expansion.Version;
import me.clip.placeholderapi.expansion.manager.CloudExpansionManager;
import me.clip.placeholderapi.expansion.manager.LocalExpansionManager;
import me.clip.placeholderapi.listeners.ServerLoadEventListener;
import me.clip.placeholderapi.scheduler.UniversalScheduler;
import me.clip.placeholderapi.scheduler.scheduling.schedulers.TaskScheduler;
import me.clip.placeholderapi.updatechecker.UpdateChecker;
import me.clip.placeholderapi.util.Msg;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.event.HandlerList;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
/**
* Yes I have a shit load of work to do...
*
* @author Ryan McCarthy
*/
public final class PlaceholderAPIPlugin extends JavaPlugin {
@NotNull
private static final Version VERSION;
private static PlaceholderAPIPlugin instance;
static {
String version = Bukkit.getServer().getBukkitVersion().split("-")[0];
String suffix;
if (version.chars()
.filter(c -> c == '.')
.count() == 1) {
suffix = "R1";
version = 'v' + version.replace('.', '_') + '_' + suffix;
} else {
int minor = Integer.parseInt(version.split("\\.")[2].charAt(0) + "");
version = 'v' + version.replace('.', '_').replace("_" + minor, "") + '_' + "R" + (minor - 1);
}
boolean isSpigot;
try {
Class.forName("org.spigotmc.SpigotConfig");
isSpigot = true;
} catch (final ExceptionInInitializerError | ClassNotFoundException ignored) {
isSpigot = false;
}
VERSION = new Version(version, isSpigot);
}
@NotNull
private final PlaceholderAPIConfig config = new PlaceholderAPIConfig(this);
@NotNull
private final LocalExpansionManager localExpansionManager = new LocalExpansionManager(this);
@NotNull
private final CloudExpansionManager cloudExpansionManager = new CloudExpansionManager(this);
@NotNull
private final TaskScheduler scheduler = UniversalScheduler.getScheduler(this);
private BukkitAudiences adventure;
/**
* Gets the static instance of the main class for PlaceholderAPI. This class is not the actual API
* class, this is the main class that extends JavaPlugin. For most API methods, use static methods
* available from the class: {@link PlaceholderAPI}
*
* @return PlaceholderAPIPlugin instance
*/
@NotNull
public static PlaceholderAPIPlugin getInstance() {
return instance;
}
/**
* Get the configurable {@linkplain String} value that should be returned when a boolean is true
*
* @return string value of true
*/
@NotNull
public static String booleanTrue() {
return getInstance().getPlaceholderAPIConfig().booleanTrue();
}
/**
* Get the configurable {@linkplain String} value that should be returned when a boolean is false
*
* @return string value of false
*/
@NotNull
public static String booleanFalse() {
return getInstance().getPlaceholderAPIConfig().booleanFalse();
}
/**
* Get the configurable {@linkplain SimpleDateFormat} object that is used to parse time for
* generic time based placeholders
*
* @return date format
*/
@NotNull
public static SimpleDateFormat getDateFormat() {
try {
return new SimpleDateFormat(getInstance().getPlaceholderAPIConfig().dateFormat());
} catch (final IllegalArgumentException ex) {
Msg.warn("Configured date format ('%s') is invalid! Defaulting to 'MM/dd/yy HH:mm:ss'",
ex, getInstance().getPlaceholderAPIConfig().dateFormat());
return new SimpleDateFormat("MM/dd/yy HH:mm:ss");
}
}
@Deprecated
public static Version getServerVersion() {
return VERSION;
}
@Override
public void onLoad() {
instance = this;
saveDefaultConfig();
}
@Override
public void onEnable() {
setupCommand();
setupExpansions();
adventure = BukkitAudiences.create(this);
if (config.isCloudEnabled()) {
getCloudExpansionManager().load();
}
if (config.checkUpdates()) {
new UpdateChecker(this).fetch();
}
}
@Override
public void onDisable() {
getCloudExpansionManager().kill();
getLocalExpansionManager().kill();
HandlerList.unregisterAll(this);
scheduler.cancelTasks(this);
adventure.close();
adventure = null;
instance = null;
}
public void reloadConf(@NotNull final CommandSender sender) {
getLocalExpansionManager().kill();
reloadConfig();
getLocalExpansionManager().load(sender);
if (config.isCloudEnabled()) {
getCloudExpansionManager().load();
} else {
getCloudExpansionManager().kill();
}
}
@NotNull
public LocalExpansionManager getLocalExpansionManager() {
return localExpansionManager;
}
@NotNull
public CloudExpansionManager getCloudExpansionManager() {
return cloudExpansionManager;
}
@NotNull
public BukkitAudiences getAdventure() {
if(adventure == null) {
throw new IllegalStateException("Tried to access Adventure when the plugin was disabled!");
}
return adventure;
}
@NotNull
public TaskScheduler getScheduler() {
return scheduler;
}
/**
* Obtain the configuration class for PlaceholderAPI.
*
* @return PlaceholderAPIConfig instance
*/
@NotNull
public PlaceholderAPIConfig getPlaceholderAPIConfig() {
return config;
}
private void setupCommand() {
final PluginCommand pluginCommand = getCommand("placeholderapi");
if (pluginCommand == null) {
return;
}
final PlaceholderCommandRouter router = new PlaceholderCommandRouter(this);
pluginCommand.setExecutor(router);
pluginCommand.setTabCompleter(router);
}
private void setupExpansions() {
Bukkit.getPluginManager().registerEvents(getLocalExpansionManager(), this);
try {
Class.forName("org.bukkit.event.server.ServerLoadEvent");
new ServerLoadEventListener(this);
} catch (final ClassNotFoundException ignored) {
scheduler
.runTaskLater(() -> getLocalExpansionManager().load(Bukkit.getConsoleSender()), 1);
}
}
}
@@ -0,0 +1,42 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public abstract class PlaceholderHook {
@Nullable
public String onRequest(final OfflinePlayer player, @NotNull final String params) {
if (player != null && player.isOnline()) {
return onPlaceholderRequest(player.getPlayer(), params);
}
return onPlaceholderRequest(null, params);
}
@Nullable
public String onPlaceholderRequest(final Player player, @NotNull final String params) {
return null;
}
}
@@ -0,0 +1,108 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.stream.Stream;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;
public abstract class PlaceholderCommand {
@NotNull
private final String label;
@NotNull
private final Set<String> alias;
@Nullable
private String permission;
protected PlaceholderCommand(@NotNull final String label, @NotNull final String... alias) {
this.label = label;
this.alias = Sets.newHashSet(alias);
setPermission("placeholderapi." + label);
}
@NotNull
public static Stream<PlaceholderCommand> filterByPermission(@NotNull final CommandSender sender,
@NotNull final Stream<PlaceholderCommand> commands) {
return commands.filter(
target -> target.getPermission() == null || sender.hasPermission(target.getPermission()));
}
public static void suggestByParameter(@NotNull final Stream<String> possible,
@NotNull final List<String> suggestions, @Nullable final String parameter) {
if (parameter == null) {
possible.forEach(suggestions::add);
} else {
possible.filter(suggestion -> suggestion.toLowerCase(Locale.ROOT).startsWith(parameter.toLowerCase(Locale.ROOT)))
.forEach(suggestions::add);
}
}
@NotNull
public final String getLabel() {
return label;
}
@NotNull
@Unmodifiable
public final Set<String> getAlias() {
return ImmutableSet.copyOf(alias);
}
@NotNull
@Unmodifiable
public final Set<String> getLabels() {
return ImmutableSet.<String>builder().add(label).addAll(alias).build();
}
@Nullable
public final String getPermission() {
return permission;
}
public void setPermission(@NotNull final String permission) {
this.permission = permission;
}
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
}
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
}
}
@@ -0,0 +1,143 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Stream;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.impl.cloud.CommandECloud;
import me.clip.placeholderapi.commands.impl.local.CommandDump;
import me.clip.placeholderapi.commands.impl.local.CommandExpansionRegister;
import me.clip.placeholderapi.commands.impl.local.CommandExpansionUnregister;
import me.clip.placeholderapi.commands.impl.local.CommandHelp;
import me.clip.placeholderapi.commands.impl.local.CommandInfo;
import me.clip.placeholderapi.commands.impl.local.CommandList;
import me.clip.placeholderapi.commands.impl.local.CommandParse;
import me.clip.placeholderapi.commands.impl.local.CommandReload;
import me.clip.placeholderapi.commands.impl.local.CommandVersion;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class PlaceholderCommandRouter implements CommandExecutor, TabCompleter {
@Unmodifiable
private static final List<PlaceholderCommand> COMMANDS = ImmutableList.of(new CommandHelp(),
new CommandInfo(),
new CommandList(),
new CommandDump(),
new CommandECloud(),
new CommandParse(),
new CommandReload(),
new CommandVersion(),
new CommandExpansionRegister(),
new CommandExpansionUnregister());
@NotNull
private final PlaceholderAPIPlugin plugin;
@NotNull
@Unmodifiable
private final Map<String, PlaceholderCommand> commands;
public PlaceholderCommandRouter(@NotNull final PlaceholderAPIPlugin plugin) {
this.plugin = plugin;
final ImmutableMap.Builder<String, PlaceholderCommand> commands = ImmutableMap.builder();
for (final PlaceholderCommand command : COMMANDS) {
command.getLabels().forEach(label -> commands.put(label, command));
}
this.commands = commands.build();
}
@Override
public boolean onCommand(@NotNull final CommandSender sender, @NotNull final Command command,
@NotNull final String alias, @NotNull final String[] args) {
if (args.length == 0) {
final PlaceholderCommand fallback = commands.get("version");
if (fallback != null) {
fallback.evaluate(plugin, sender, "", Collections.emptyList());
}
return true;
}
final String search = args[0].toLowerCase(Locale.ROOT);
final PlaceholderCommand target = commands.get(search);
if (target == null) {
Msg.msg(sender, "&cUnknown command &7" + search);
return true;
}
final String permission = target.getPermission();
if (permission != null && !permission.isEmpty() && !sender.hasPermission(permission)) {
Msg.msg(sender, "&cYou do not have permission to do this!");
return true;
}
target
.evaluate(plugin, sender, search, Arrays.asList(Arrays.copyOfRange(args, 1, args.length)));
return true;
}
@Override
public List<String> onTabComplete(@NotNull final CommandSender sender,
@NotNull final Command command, @NotNull final String alias, @NotNull final String[] args) {
final List<String> suggestions = new ArrayList<>();
if (args.length > 1) {
final PlaceholderCommand target = this.commands.get(args[0].toLowerCase(Locale.ROOT));
if (target != null) {
target.complete(plugin, sender, args[0].toLowerCase(Locale.ROOT),
Arrays.asList(Arrays.copyOfRange(args, 1, args.length)), suggestions);
}
return suggestions;
}
final Stream<String> targets = PlaceholderCommand
.filterByPermission(sender, commands.values().stream()).map(PlaceholderCommand::getLabels)
.flatMap(Collection::stream);
PlaceholderCommand.suggestByParameter(targets, suggestions, args.length == 0 ? null : args[0]);
return suggestions;
}
}
@@ -0,0 +1,146 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.cloud;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Stream;
public final class CommandECloud extends PlaceholderCommand {
@Unmodifiable
private static final List<PlaceholderCommand> COMMANDS = ImmutableList
.of(new CommandECloudClear(),
new CommandECloudStatus(),
new CommandECloudUpdate(),
new CommandECloudRefresh(),
new CommandECloudDownload(),
new CommandECloudExpansionInfo(),
new CommandECloudExpansionList(),
new CommandECloudExpansionPlaceholders());
static {
COMMANDS
.forEach(command -> command.setPermission("placeholderapi.ecloud." + command.getLabel()));
}
@NotNull
@Unmodifiable
private final Map<String, PlaceholderCommand> commands;
public CommandECloud() {
super("ecloud");
final ImmutableMap.Builder<String, PlaceholderCommand> commands = ImmutableMap.builder();
for (final PlaceholderCommand command : COMMANDS) {
command.getLabels().forEach(label -> commands.put(label, command));
}
this.commands = commands.build();
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
if (params.isEmpty()) {
Msg.msg(sender,
"&b&lPlaceholderAPI &8- &7eCloud Help Menu &8- ",
" ",
"&b/papi &fecloud status",
" &7&oView status of the eCloud",
"&b/papi &fecloud list <all/{author}/installed> {page}",
" &7&oList all/author specific available expansions",
"&b/papi &fecloud info <expansion name> {version}",
" &7&oView information about a specific expansion available on the eCloud",
"&b/papi &fecloud placeholders <expansion name>",
" &7&oView placeholders for an expansion",
"&b/papi &fecloud download <expansion name> {version}",
" &7&oDownload an expansion from the eCloud",
"&b/papi &fecloud update <expansion name/all>",
" &7&oUpdate a specific/all installed expansions",
"&b/papi &fecloud refresh",
" &7&oFetch the most up to date list of expansions available.",
"&b/papi &fecloud clear",
" &7&oClear the expansion cloud cache.");
return;
}
final String search = params.get(0).toLowerCase(Locale.ROOT);
final PlaceholderCommand target = commands.get(search);
if (target == null) {
Msg.msg(sender, "&cUnknown command &7ecloud " + search);
return;
}
final String permission = target.getPermission();
if (permission != null && !permission.isEmpty() && !sender.hasPermission(permission)) {
Msg.msg(sender, "&cYou do not have permission to do this!");
return;
}
if (!plugin.getPlaceholderAPIConfig().isCloudEnabled()) {
Msg.msg(sender, "&cThe eCloud Manager is not enabled! To enable it, set 'cloud_enabled' to true and reload the plugin.");
return;
}
target.evaluate(plugin, sender, search, params.subList(1, params.size()));
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() <= 1) {
final Stream<String> targets = filterByPermission(sender, commands.values().stream())
.map(PlaceholderCommand::getLabels).flatMap(Collection::stream);
suggestByParameter(targets, suggestions, params.isEmpty() ? null : params.get(0));
return; // send sub commands
}
final String search = params.get(0).toLowerCase(Locale.ROOT);
final PlaceholderCommand target = commands.get(search);
if (target == null) {
return;
}
target.complete(plugin, sender, search, params.subList(1, params.size()), suggestions);
}
}
@@ -0,0 +1,46 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.cloud;
import java.util.List;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandECloudClear extends PlaceholderCommand {
public CommandECloudClear() {
super("clear");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
plugin.getCloudExpansionManager().clean();
Msg.msg(sender,
"&aThe eCloud cache has been cleared!");
}
}
@@ -0,0 +1,139 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.cloud;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandECloudDownload extends PlaceholderCommand {
public CommandECloudDownload() {
super("download");
}
private boolean isBlockedExpansion(String name) {
String env = System.getenv("PAPI_BLOCKED_EXPANSIONS");
if (env == null) {
return false;
}
return Arrays.stream(env.split(","))
.anyMatch(s -> s.equalsIgnoreCase(name));
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
if (params.isEmpty()) {
Msg.msg(sender,
"&cYou must supply the name of an expansion.");
return;
}
if (isBlockedExpansion(params.get(0))) {
Msg.msg(sender,
"&cThis expansion can't be downloaded.");
return;
}
final CloudExpansion expansion = plugin.getCloudExpansionManager()
.findCloudExpansionByName(params.get(0)).orElse(null);
if (expansion == null) {
Msg.msg(sender,
"&cFailed to find an expansion named: &f" + params.get(0));
return;
}
if (!expansion.isVerified()) {
Msg.msg(sender, "&cThe expansion '&f" + params.get(0) + "&c' is not verified and can only be downloaded manually from &fhttps://placeholderapi.com/ecloud");
return;
}
final CloudExpansion.Version version;
if (params.size() < 2) {
version = expansion.getVersion(expansion.getLatestVersion());
if (version == null) {
Msg.msg(sender,
"&cCould not find latest version for expansion.");
return;
}
} else {
version = expansion.getVersion(params.get(1));
if (version == null) {
Msg.msg(sender,
"&cCould not find specified version: &f" + params.get(1),
"&7Available versions: &f" + expansion.getAvailableVersions());
return;
}
}
plugin.getCloudExpansionManager().downloadExpansion(expansion, version)
.whenComplete((file, exception) -> {
if (exception != null) {
Msg.msg(sender,
"&cFailed to download expansion: &f" + exception.getMessage());
return;
}
Msg.msg(sender,
"&aSuccessfully downloaded expansion &f" + expansion.getName() + " [" + version
.getVersion() + "] &ato file: &f" + file.getName(),
"&aMake sure to type &f/papi reload &ato enable your new expansion!");
plugin.getCloudExpansionManager().load();
});
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() > 2) {
return;
}
if (params.size() <= 1) {
final Stream<String> names = plugin.getCloudExpansionManager().getCloudExpansions().values()
.stream().map(CloudExpansion::getName).map(name -> name.replace(' ', '_'));
suggestByParameter(names, suggestions, params.isEmpty() ? null : params.get(0));
return;
}
final Optional<CloudExpansion> expansion = plugin.getCloudExpansionManager()
.findCloudExpansionByName(params.get(0));
if (!expansion.isPresent()) {
return;
}
suggestByParameter(expansion.get().getAvailableVersions().stream(), suggestions, params.get(1));
}
}
@@ -0,0 +1,129 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.cloud;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandECloudExpansionInfo extends PlaceholderCommand {
public CommandECloudExpansionInfo() {
super("info");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
if (params.isEmpty()) {
Msg.msg(sender,
"&cYou must specify the name of the expansion.");
return;
}
final CloudExpansion expansion = plugin.getCloudExpansionManager()
.findCloudExpansionByName(params.get(0)).orElse(null);
if (expansion == null) {
Msg.msg(sender,
"&cThere is no expansion with the name: &f" + params.get(0));
return;
}
final StringBuilder builder = new StringBuilder();
builder.append("&bExpansion: &f")
.append(expansion.shouldUpdate() ? "&e" : "&a")
.append(expansion.getName())
.append('\n')
.append("&bAuthor: &f")
.append(expansion.getAuthor())
.append('\n')
.append("&bVerified: ")
.append(expansion.isVerified() ? "&a&l✔" : "&c&l❌")
.append('\n');
if (params.size() < 2) {
builder.append("&bLatest Version: &f")
.append(expansion.getLatestVersion())
.append('\n')
.append("&bReleased: &f")
.append(expansion.getTimeSinceLastUpdate())
.append(" ago")
.append('\n')
.append("&bRelease Notes: &f")
.append(expansion.getVersion().getReleaseNotes())
.append('\n');
} else {
final CloudExpansion.Version version = expansion.getVersion(params.get(1));
if (version == null) {
Msg.msg(sender,
"&cCould not find specified version: &f" + params.get(1),
"&aVersions: &f" + expansion.getAvailableVersions());
return;
}
builder.append("&bVersion: &f")
.append(version.getVersion())
.append('\n')
.append("&bRelease Notes: &f")
.append(version.getReleaseNotes())
.append('\n')
.append("&bDownload URL: &f")
.append(version.getUrl())
.append('\n');
}
Msg.msg(sender, builder.toString());
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() > 2) {
return;
}
if (params.size() <= 1) {
final Stream<String> names = plugin.getCloudExpansionManager().getCloudExpansions().values()
.stream().map(CloudExpansion::getName).map(name -> name.replace(' ', '_'));
suggestByParameter(names, suggestions, params.isEmpty() ? null : params.get(0));
return;
}
final Optional<CloudExpansion> expansion = plugin.getCloudExpansionManager()
.findCloudExpansionByName(params.get(0));
if (!expansion.isPresent()) {
return;
}
suggestByParameter(expansion.get().getAvailableVersions().stream(), suggestions, params.get(1));
}
}
@@ -0,0 +1,352 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.cloud;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.common.primitives.Ints;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.configuration.ExpansionSort;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
import me.clip.placeholderapi.util.Format;
import me.clip.placeholderapi.util.Msg;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.TextDecoration;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
import static net.kyori.adventure.text.Component.*;
import static net.kyori.adventure.text.format.NamedTextColor.*;
public final class CommandECloudExpansionList extends PlaceholderCommand {
private static final int PAGE_SIZE = 10;
@NotNull
private static final Function<CloudExpansion, Object> EXPANSION_NAME =
expansion -> (expansion.shouldUpdate() ? "&6" : expansion.hasExpansion() ? "&a" : "&7")
+ expansion.getName();
@NotNull
private static final Function<CloudExpansion, Object> EXPANSION_AUTHOR =
expansion -> "&f" + expansion.getAuthor();
@NotNull
private static final Function<CloudExpansion, Object> EXPANSION_VERIFIED =
expansion -> expansion.isVerified() ? "&aY" : "&cN";
@NotNull
private static final Function<CloudExpansion, Object> EXPANSION_LATEST_VERSION =
expansion -> "&f" + expansion.getLatestVersion();
@NotNull
private static final Function<CloudExpansion, Object> EXPANSION_CURRENT_VERSION =
expansion -> "&f" + PlaceholderAPIPlugin.getInstance().getLocalExpansionManager()
.findExpansionByName(expansion.getName()).map(PlaceholderExpansion::getVersion)
.orElse("Unknown");
@Unmodifiable
private static final Set<String> OPTIONS = ImmutableSet.of("all", "installed");
public CommandECloudExpansionList() {
super("list");
}
@NotNull
private static Collection<CloudExpansion> getExpansions(@NotNull final String target,
@NotNull final PlaceholderAPIPlugin plugin) {
switch (target.toLowerCase(Locale.ROOT)) {
case "all":
return plugin.getCloudExpansionManager().getCloudExpansions().values();
case "installed":
return plugin.getCloudExpansionManager().getCloudExpansionsInstalled().values();
default:
return plugin.getCloudExpansionManager().getCloudExpansionsByAuthor(target).values();
}
}
@NotNull
private static List<CloudExpansion> getPage(@NotNull final List<CloudExpansion> expansions,
final int page) {
final int head = (page * PAGE_SIZE);
final int tail = Math.min(expansions.size(), head + PAGE_SIZE);
if (expansions.size() < head) {
return Collections.emptyList();
}
return expansions.subList(head, tail);
}
public static void addExpansionTitle(@NotNull final StringBuilder builder,
@NotNull final String target, final int page) {
switch (target.toLowerCase(Locale.ROOT)) {
case "all":
builder.append("&bAll Expansions");
break;
case "installed":
builder.append("&bInstalled Expansions");
break;
default:
builder.append("&bExpansions by &f")
.append(target);
break;
}
if (page == -1) {
builder.append('\n');
return;
}
builder.append(" &bPage&7: &a")
.append(page)
.append("&r");
}
private static Component getMessage(@NotNull final List<CloudExpansion> expansions,
final int page, final int limit, @NotNull final String target) {
final SimpleDateFormat format = PlaceholderAPIPlugin.getDateFormat();
final TextComponent.Builder message = text();
for (int index = 0; index < expansions.size(); index++) {
final CloudExpansion expansion = expansions.get(index);
final TextComponent.Builder line = text();
final int expansionNumber = index + ((page - 1) * PAGE_SIZE) + 1;
line.append(text(expansionNumber + ". ", DARK_GRAY));
final NamedTextColor expansionColour;
if (expansion.shouldUpdate()) {
expansionColour = GOLD;
} else {
if (expansion.hasExpansion()) {
expansionColour = GREEN;
} else {
expansionColour = GRAY;
}
}
line.append(text(expansion.getName(), expansionColour));
line.clickEvent(ClickEvent.suggestCommand("/papi ecloud download " + expansion.getName()));
final TextComponent.Builder hoverText = text("Click to download this expansion!", AQUA)
.append(newline()).append(newline())
.append(text("Author: ", AQUA)).append(text(expansion.getAuthor(), WHITE))
.append(newline())
.append(text("Verified: ", AQUA)).append(text(expansion.isVerified() ? "✔" : "❌", expansion.isVerified() ? GREEN : RED, TextDecoration.BOLD))
.append(newline())
.append(text("Released: ", AQUA)).append(text(format.format(expansion.getLastUpdate()), WHITE))
.toBuilder();
Optional.ofNullable(expansion.getDescription())
.filter(description -> !description.isEmpty())
.ifPresent(description -> hoverText.append(newline()).append(newline())
.append(text(description.replace("\r", "").trim(), WHITE))
);
line.hoverEvent(HoverEvent.showText(hoverText.build()));
if (index != expansions.size() - 1) {
line.append(newline());
}
message.append(line.build());
}
if (limit > 1) {
message.append(newline());
final TextComponent.Builder left = text("◀", page > 1 ? GRAY : DARK_GRAY).toBuilder();
if (page > 1) {
left.clickEvent(ClickEvent.runCommand("/papi ecloud list " + target + " " + (page - 1)));
}
final TextComponent.Builder right = text("▶", page < limit ? GRAY : DARK_GRAY).toBuilder();
if (page < limit) {
right.clickEvent(ClickEvent.runCommand("/papi ecloud list " + target + " " + (page + 1)));
}
message.append(left, text(" " + page + " ", GREEN), right);
}
return message.build();
}
private static void addExpansionTable(@NotNull final List<CloudExpansion> expansions,
@NotNull final StringBuilder message, final int startIndex,
@NotNull final String versionTitle,
@NotNull final Function<CloudExpansion, Object> versionFunction) {
final Map<String, Function<CloudExpansion, Object>> functions = new LinkedHashMap<>();
final AtomicInteger counter = new AtomicInteger(startIndex);
functions.put("&f", expansion -> "&8" + counter.getAndIncrement() + ".");
functions.put("&9Name", EXPANSION_NAME);
functions.put("&9Author", EXPANSION_AUTHOR);
functions.put("&9Verified", EXPANSION_VERIFIED);
functions.put(versionTitle, versionFunction);
final List<List<String>> rows = new ArrayList<>();
rows.add(0, new ArrayList<>(functions.keySet()));
for (final CloudExpansion expansion : expansions) {
rows.add(functions.values().stream().map(function -> function.apply(expansion))
.map(Objects::toString).collect(Collectors.toList()));
}
final List<String> table = Format.tablify(Format.Align.LEFT, rows)
.orElse(Collections.emptyList());
if (table.isEmpty()) {
return;
}
table.add(1, "&8" + Strings.repeat("-", table.get(0).length() - (rows.get(0).size() * 2)));
message.append(String.join("\n", table));
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
if (params.isEmpty()) {
Msg.msg(sender,
"&cYou must specify an option. [all, {author}, installed]");
return;
}
final boolean installed = params.get(0).equalsIgnoreCase("installed");
final List<CloudExpansion> expansions = Lists
.newArrayList(getExpansions(params.get(0), plugin));
if (expansions.isEmpty()) {
Msg.msg(sender,
"&cNo expansions available to list.");
return;
}
expansions
.sort(plugin.getPlaceholderAPIConfig().getExpansionSort().orElse(ExpansionSort.LATEST));
if (!(sender instanceof Player) && params.size() < 2) {
final StringBuilder builder = new StringBuilder();
addExpansionTitle(builder, params.get(0), -1);
addExpansionTable(expansions,
builder,
1,
installed ? "&9Version" : "&9Latest Version",
installed ? EXPANSION_CURRENT_VERSION : EXPANSION_LATEST_VERSION);
Msg.msg(sender, builder.toString());
return;
}
final int page;
if (params.size() < 2) {
page = 1;
} else {
//noinspection UnstableApiUsage
final Integer parsed = Ints.tryParse(params.get(1));
if (parsed == null) {
Msg.msg(sender,
"&cPage number must be an integer.");
return;
}
final int limit = (int) Math.ceil((double) expansions.size() / PAGE_SIZE);
if (parsed < 1 || parsed > limit) {
Msg.msg(sender,
"&cPage number must be in the range &8[&a1&7..&a" + limit + "&8]");
return;
}
page = parsed;
}
final StringBuilder builder = new StringBuilder();
final List<CloudExpansion> values = getPage(expansions, page - 1);
addExpansionTitle(builder, params.get(0), page);
if (!(sender instanceof Player)) {
addExpansionTable(values,
builder,
((page - 1) * PAGE_SIZE) + 1,
installed ? "&9Version" : "&9Latest Version",
installed ? EXPANSION_CURRENT_VERSION : EXPANSION_LATEST_VERSION);
Msg.msg(sender, builder.toString());
return;
}
Msg.msg(sender, builder.toString());
final int limit = (int) Math.ceil((double) expansions.size() / PAGE_SIZE);
final Component message = getMessage(values, page, limit, params.get(0));
plugin.getAdventure().player((Player) sender).sendMessage(message);
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() > 2) {
return;
}
if (params.size() <= 1) {
suggestByParameter(
Sets.union(OPTIONS, plugin.getCloudExpansionManager().getCloudExpansionAuthors())
.stream(), suggestions, params.isEmpty() ? null : params.get(0));
return;
}
suggestByParameter(IntStream.rangeClosed(1,
(int) Math.ceil((double) getExpansions(params.get(0), plugin).size() / PAGE_SIZE))
.mapToObj(Objects::toString), suggestions, params.get(1));
}
}
@@ -0,0 +1,94 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.cloud;
import com.google.common.collect.Lists;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandECloudExpansionPlaceholders extends PlaceholderCommand {
public CommandECloudExpansionPlaceholders() {
super("placeholders");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
if (params.isEmpty()) {
Msg.msg(sender,
"&cYou must specify the name of the expansion.");
return;
}
final CloudExpansion expansion = plugin.getCloudExpansionManager()
.findCloudExpansionByName(params.get(0)).orElse(null);
if (expansion == null) {
Msg.msg(sender,
"&cThere is no expansion with the name: &f" + params.get(0));
return;
}
final List<String> placeholders = expansion.getPlaceholders();
if (placeholders == null || placeholders.isEmpty()) {
Msg.msg(sender,
"&cThe expansion specified does not have placeholders listed.");
return;
}
final List<List<String>> partitions = Lists
.partition(placeholders.stream().sorted().collect(Collectors.toList()), 10);
Msg.msg(sender,
"&6" + placeholders.size() + "&7 placeholders: &a",
partitions.stream().map(partition -> String.join(", ", partition))
.collect(Collectors.joining("\n")));
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() > 1) {
return;
}
final Stream<String> names = plugin.getCloudExpansionManager()
.getCloudExpansions()
.values()
.stream()
.map(CloudExpansion::getName)
.map(name -> name.replace(' ', '_'));
suggestByParameter(names, suggestions, params.isEmpty() ? null : params.get(0));
}
}
@@ -0,0 +1,47 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.cloud;
import java.util.List;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandECloudRefresh extends PlaceholderCommand {
public CommandECloudRefresh() {
super("refresh");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
plugin.getCloudExpansionManager().load();
Msg.msg(sender,
"&aThe eCloud manager has been refreshed!");
}
}
@@ -0,0 +1,64 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.cloud;
import java.util.List;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.manager.CloudExpansionManager;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandECloudStatus extends PlaceholderCommand {
public CommandECloudStatus() {
super("status");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
final CloudExpansionManager manager = plugin.getCloudExpansionManager();
final int updateCount = manager.getCloudUpdateCount();
final int authorCount = manager.getCloudExpansionAuthorCount();
final int expansionCount = manager.getCloudExpansions().size();
final StringBuilder builder = new StringBuilder();
builder.append("&bThere are &a").append(expansionCount)
.append("&b expansions available on the eCloud.").append('\n');
builder.append("&7A total of &f").append(authorCount)
.append("&7 authors have contributed to the eCloud.").append('\n');
if (updateCount > 0) {
builder.append("&eYou have &f").append(updateCount)
.append(updateCount > 1 ? "&e expansions" : "&e expansion").append(" installed that ")
.append(updateCount > 1 ? "have an" : "has an").append(" update available.");
}
Msg.msg(sender, builder.toString());
}
}
@@ -0,0 +1,141 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.cloud;
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
import me.clip.placeholderapi.util.Futures;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;
/**
* please don't flame me for this code, I will fix this shit later.
*/
public final class CommandECloudUpdate extends PlaceholderCommand {
public CommandECloudUpdate() {
super("update");
}
private static CompletableFuture<List<@Nullable Class<? extends PlaceholderExpansion>>> downloadAndDiscover(
@NotNull final List<CloudExpansion> expansions, @NotNull final PlaceholderAPIPlugin plugin) {
return expansions.stream()
.map(expansion -> plugin.getCloudExpansionManager()
.downloadExpansion(expansion, expansion.getVersion()))
.map(future -> future.thenCompose(plugin.getLocalExpansionManager()::findExpansionInFile))
.collect(Futures.collector());
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
if (params.isEmpty()) {
Msg.msg(sender,
"&cYou must define 'all' or the name of an expansion to update.");
return;
}
final boolean multiple = params.get(0).equalsIgnoreCase("all");
final List<CloudExpansion> expansions = new ArrayList<>();
// gather target expansions
if (multiple) {
expansions.addAll(plugin.getCloudExpansionManager().getCloudExpansionsInstalled().values());
} else {
plugin.getCloudExpansionManager().findCloudExpansionByName(params.get(0))
.ifPresent(expansions::add);
}
// remove the ones that are the latest version
expansions.removeIf(expansion -> !expansion.shouldUpdate());
if (expansions.isEmpty()) {
Msg.msg(sender,
"&cNo updates available for " + (!multiple ? "this expansion."
: "your active expansions."));
return;
}
Msg.msg(sender,
"&aUpdating expansions: " + expansions.stream().map(CloudExpansion::getName)
.collect(Collectors.joining("&7, &6", "&8[&6", "&8]&r")));
Futures.onMainThread(plugin, downloadAndDiscover(expansions, plugin), (classes, exception) -> {
if (exception != null) {
Msg.msg(sender,
"&cFailed to update expansions: &e" + exception.getMessage());
return;
}
Msg.msg(sender,
"&aSuccessfully downloaded updates, registering new versions.");
final String message = classes.stream()
.filter(Objects::nonNull)
.map(plugin.getLocalExpansionManager()::register)
.filter(Optional::isPresent)
.map(Optional::get)
.map(expansion -> " &a" + expansion.getName() + " &f" + expansion.getVersion())
.collect(Collectors.joining("\n"));
Msg.msg(sender,
"&7Registered expansions:", message);
});
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() > 1) {
return;
}
final List<CloudExpansion> installed = Lists
.newArrayList(plugin.getCloudExpansionManager().getCloudExpansionsInstalled().values());
installed.removeIf(expansion -> !expansion.shouldUpdate());
if (!installed.isEmpty() && (params.isEmpty() || "all"
.startsWith(params.get(0).toLowerCase(Locale.ROOT)))) {
suggestions.add("all");
}
suggestByParameter(
installed.stream().map(CloudExpansion::getName).map(name -> name.replace(" ", "_")),
suggestions, params.isEmpty() ? null : params.get(0));
}
}
@@ -0,0 +1,213 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.local;
import com.google.common.io.CharStreams;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.time.Instant;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.logging.Level;
import java.util.stream.Collectors;
public final class CommandDump extends PlaceholderCommand {
@NotNull
private static final String URL = "https://paste.helpch.at/";
@NotNull
private static final Gson gson = new Gson();
@NotNull
private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter
.ofLocalizedDateTime(FormatStyle.LONG)
.withLocale(Locale.US)
.withZone(ZoneId.of("UTC"));
public CommandDump() {
super("dump");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
postDump(makeDump(plugin)).whenComplete((key, exception) -> {
if (exception != null) {
plugin.getLogger().log(Level.WARNING, "failed to post dump details", exception);
Msg.msg(sender,
"&cFailed to post dump details, check console.");
return;
}
Msg.msg(sender,
"&aSuccessfully posted dump: " + URL + key);
});
}
@NotNull
private CompletableFuture<String> postDump(@NotNull final String dump) {
return CompletableFuture.supplyAsync(() -> {
try {
final HttpURLConnection connection = ((HttpURLConnection) new URL(URL + "documents")
.openConnection());
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "text/plain; charset=utf-8");
connection.setDoOutput(true);
connection.connect();
try (final OutputStream stream = connection.getOutputStream()) {
stream.write(dump.getBytes(StandardCharsets.UTF_8));
}
try (final InputStream stream = connection.getInputStream()) {
final String json = CharStreams.toString(new InputStreamReader(stream, StandardCharsets.UTF_8));
return gson.fromJson(json, JsonObject.class).get("key").getAsString();
}
} catch (final IOException ex) {
throw new CompletionException(ex);
}
});
}
@NotNull
private String makeDump(@NotNull final PlaceholderAPIPlugin plugin) {
final StringBuilder builder = new StringBuilder();
builder.append("Generated: ")
.append(DATE_FORMAT.format(Instant.now()))
.append("\n\n");
builder.append("PlaceholderAPI: ")
.append(plugin.getDescription().getVersion())
.append("\n\n");
builder.append("Expansions Registered:")
.append('\n');
final List<PlaceholderExpansion> expansions = plugin.getLocalExpansionManager()
.getExpansions()
.stream()
.sorted(
Comparator.comparing(PlaceholderExpansion::getIdentifier)
.thenComparing(PlaceholderExpansion::getAuthor)
)
.collect(Collectors.toList());
int size = expansions.stream().map(e -> e.getIdentifier().length())
.max(Integer::compareTo)
.orElse(0);
for (final PlaceholderExpansion expansion : expansions) {
builder.append(" ")
.append(String.format("%-" + size + "s", expansion.getIdentifier()))
.append(" [Author: ")
.append(expansion.getAuthor())
.append(", Version: ")
.append(expansion.getVersion())
.append("]\n");
}
builder.append('\n');
builder.append("Expansions Directory:")
.append('\n');
final String[] jars = plugin.getLocalExpansionManager()
.getExpansionsFolder()
.list((dir, name) -> name.toLowerCase(Locale.ROOT).endsWith(".jar"));
if (jars == null) {
builder.append(" ¨[Warning]: Could not load jar files from expansions folder.");
} else {
for (final String jar : jars) {
builder.append(" ")
.append(jar)
.append('\n');
}
}
builder.append('\n');
builder.append("Server Info: ")
.append(plugin.getServer().getBukkitVersion())
.append('/')
.append(plugin.getServer().getVersion())
.append("\n");
builder.append("Java Version: ")
.append(System.getProperty("java.version"))
.append("\n\n");
builder.append("Plugin Info:")
.append('\n');
List<Plugin> plugins = Arrays.stream(plugin.getServer().getPluginManager().getPlugins())
.sorted(Comparator.comparing(Plugin::getName))
.collect(Collectors.toList());
size = plugins.stream().map(pl -> pl.getName().length())
.max(Integer::compareTo)
.orElse(0);
for (final Plugin other : plugins) {
builder.append(" ")
.append(String.format("%-" + size + "s", other.getName()))
.append(" [Authors: [")
.append(String.join(", ", other.getDescription().getAuthors()))
.append("], Version: ")
.append(other.getDescription().getVersion())
.append("]")
.append("\n");
}
return builder.toString();
}
}
@@ -0,0 +1,110 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.local;
import java.io.File;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.logging.Level;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.expansion.manager.LocalExpansionManager;
import me.clip.placeholderapi.util.Futures;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandExpansionRegister extends PlaceholderCommand {
public CommandExpansionRegister() {
super("register");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
if (params.size() < 1) {
Msg.msg(sender,
"&cYou must specify the name of an expansion file.");
return;
}
final LocalExpansionManager manager = plugin.getLocalExpansionManager();
final File file = new File(manager.getExpansionsFolder(), params.get(0));
if (!file.exists() || !file.getParentFile().equals(manager.getExpansionsFolder())) {
Msg.msg(sender,
"&cThe file &f" + file.getName() + "&c doesn't exist!");
return;
}
Futures.onMainThread(plugin, manager.findExpansionInFile(file), (clazz, exception) -> {
if (exception != null) {
Msg.msg(sender,
"&cFailed to find expansion in file: &f" + file);
plugin.getLogger()
.log(Level.WARNING, "failed to find expansion in file: " + file, exception);
return;
}
if (clazz == null) {
Msg.msg(sender,
"&cNo expansion class found in file: &f" + file);
return;
}
final Optional<PlaceholderExpansion> expansion = manager.register(clazz);
if (!expansion.isPresent()) {
Msg.msg(sender,
"&cFailed to register expansion from &f" + params.get(0));
return;
}
Msg.msg(sender,
"&aSuccessfully registered expansion: &f" + expansion.get().getName());
});
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() > 1) {
return;
}
final String[] fileNames = plugin.getLocalExpansionManager().getExpansionsFolder()
.list((dir, name) -> name.endsWith(".jar"));
if (fileNames == null || fileNames.length == 0) {
return;
}
suggestByParameter(Arrays.stream(fileNames), suggestions,
params.isEmpty() ? null : params.get(0));
}
}
@@ -0,0 +1,77 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.local;
import java.util.List;
import java.util.Optional;
import me.clip.placeholderapi.PlaceholderAPI;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandExpansionUnregister extends PlaceholderCommand {
public CommandExpansionUnregister() {
super("unregister");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
if (params.isEmpty()) {
Msg.msg(sender,
"&cYou must specify the name of the expansion.");
return;
}
final Optional<PlaceholderExpansion> expansion = plugin.getLocalExpansionManager()
.findExpansionByName(params.get(0));
if (!expansion.isPresent()) {
Msg.msg(sender,
"&cThere is no expansion loaded with the identifier: &f" + params.get(0));
return;
}
final String message = !expansion.get().unregister() ?
"&cFailed to unregister expansion: &f" :
"&aSuccessfully unregistered expansion: &f";
Msg.msg(sender, message + expansion.get().getName());
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() > 1) {
return;
}
suggestByParameter(PlaceholderAPI.getRegisteredIdentifiers().stream(), suggestions,
params.isEmpty() ? null : params.get(0));
}
}
@@ -0,0 +1,72 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.local;
import java.util.List;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.PluginDescriptionFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandHelp extends PlaceholderCommand {
public CommandHelp() {
super("help");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
final PluginDescriptionFile description = plugin.getDescription();
Msg.msg(sender,
"&b&lPlaceholderAPI &8- &7Help Menu &8- &7(&f" + description.getVersion() + "&7)",
" ",
"&b/papi &fbcparse &9<me|--null|player name> <message>",
" &7&oParse a message with placeholders and broadcast it",
"&b/papi &fcmdparse &9<me|player> <command with placeholders>",
" &7&oParse a message with relational placeholders",
"&b/papi &fdump",
" &7&oDump all relevant information needed to help debug issues into a paste link.",
"&b/papi &finfo &9<placeholder name>",
" &7&oView information for a specific expansion",
"&b/papi &flist",
" &7&oList active expansions",
"&b/papi &fparse &9<me|--null|player name> <message>",
" &7&oParse a message with placeholders",
"&b/papi &fparserel &9<player one> <player two> <message>",
" &7&oParse a message with relational placeholders",
"&b/papi &fregister &9<file name>",
" &7&oRegister an expansion by the name of the file",
"&b/papi &freload",
" &7&oReload the config of PAPI",
"&b/papi &funregister &9<expansion name>",
" &7&oUnregister an expansion by name",
"&b/papi &fversion",
" &7&oView plugin info/version");
}
}
@@ -0,0 +1,113 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.local;
import java.util.List;
import me.clip.placeholderapi.PlaceholderAPI;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandInfo extends PlaceholderCommand {
public CommandInfo() {
super("info");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
if (params.isEmpty()) {
Msg.msg(sender,
"&cYou must specify the name of the expansion.");
return;
}
final PlaceholderExpansion expansion = plugin.getLocalExpansionManager()
.findExpansionByIdentifier(params.get(0)).orElse(null);
if (expansion == null) {
Msg.msg(sender,
"&cThere is no expansion loaded with the identifier: &f" + params.get(0));
return;
}
final StringBuilder builder = new StringBuilder();
builder.append("&7Placeholder expansion info for: &r")
.append(expansion.getName())
.append('\n')
.append("&7Status: &r")
.append(expansion.isRegistered() ? "&aRegistered" : "7cNotRegistered")
.append('\n');
final String author = expansion.getAuthor();
if (author != null) {
builder.append("&7Author: &r")
.append(author)
.append('\n');
}
final String version = expansion.getVersion();
if (version != null) {
builder.append("&7Version: &r")
.append(version)
.append('\n');
}
final String requiredPlugin = expansion.getRequiredPlugin();
if (requiredPlugin != null) {
builder.append("&7Requires plugin: &r")
.append(requiredPlugin)
.append('\n');
}
final List<String> placeholders = expansion.getPlaceholders();
if (placeholders != null && !placeholders.isEmpty()) {
builder.append("&8&m-- &7Placeholders &8&m--&r")
.append('\n');
for (final String placeholder : placeholders) {
builder.append(placeholder)
.append('\n');
}
}
Msg.msg(sender, builder.toString());
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() > 1) {
return;
}
suggestByParameter(PlaceholderAPI.getRegisteredIdentifiers().stream(), suggestions,
params.isEmpty() ? null : params.get(0));
}
}
@@ -0,0 +1,61 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.local;
import com.google.common.collect.Lists;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import me.clip.placeholderapi.PlaceholderAPI;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandList extends PlaceholderCommand {
public CommandList() {
super("list");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
final Set<String> identifiers = PlaceholderAPI.getRegisteredIdentifiers();
if (identifiers.isEmpty()) {
Msg.msg(sender, "&cThere are no placeholder hooks active!");
return;
}
final List<List<String>> partitions = Lists
.partition(identifiers.stream().sorted().collect(Collectors.toList()), 10);
Msg.msg(sender,
"&7A total of &f" + identifiers.size() + "&7 placeholder hook(s) are active: &a",
partitions.stream().map(partition -> String.join("&7, &a", partition))
.collect(Collectors.joining("\n")));
}
}
@@ -0,0 +1,256 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.local;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.stream.Stream;
import me.clip.placeholderapi.PlaceholderAPI;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandParse extends PlaceholderCommand {
public CommandParse() {
super("parse", "bcparse", "parserel", "cmdparse");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
switch (alias.toLowerCase(Locale.ROOT)) {
case "parserel":
evaluateParseRelation(sender, params);
break;
case "parse":
evaluateParseSingular(sender, params, false, false);
break;
case "bcparse":
evaluateParseSingular(sender, params, true, false);
break;
case "cmdparse":
evaluateParseSingular(sender, params, false, true);
break;
}
}
@Override
public void complete(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
switch (alias.toLowerCase(Locale.ROOT)) {
case "parserel":
completeParseRelation(params, suggestions);
break;
case "parse":
case "bcparse":
case "cmdparse":
completeParseSingular(sender, params, suggestions);
break;
}
}
private void evaluateParseSingular(@NotNull final CommandSender sender,
@NotNull @Unmodifiable final List<String> params, final boolean broadcast,
final boolean command) {
if (params.size() < 2) {
Msg.msg(sender,
"&cYou must provide a target and message: &b/papi "
+ (command ? "cmdparse" : (broadcast ? "bcparse" : "parse"))
+ " &7{target} &a{message}");
return;
}
OfflinePlayer player;
if ("me".equalsIgnoreCase(params.get(0))) {
if (!(sender instanceof Player)) {
Msg.msg(sender, "&cYou must be a player to use &7me&c as a target!");
return;
}
player = ((Player) sender);
} else if ("--null".equalsIgnoreCase(params.get(0))) {
player = null;
} else {
final OfflinePlayer target = resolvePlayer(params.get(0));
if (target == null) {
Msg.msg(sender, "&cFailed to find player: &7" + params.get(0));
return;
}
player = target;
}
final String message = PlaceholderAPI
.setPlaceholders(player, String.join(" ", params.subList(1, params.size())));
if (command) {
Bukkit.dispatchCommand(sender, message);
return;
}
if (broadcast) {
Bukkit.broadcastMessage(message);
} else {
sender.sendMessage(message);
}
}
private void evaluateParseRelation(@NotNull final CommandSender sender,
@NotNull @Unmodifiable final List<String> params) {
if (params.size() < 3) {
Msg.msg(sender,
"&cYou must supply two targets, and a message: &b/papi parserel &7{target one} "
+ "{target two} &a{message}");
return;
}
OfflinePlayer playerOne;
if ("me".equalsIgnoreCase(params.get(0))) {
if (!(sender instanceof Player)) {
Msg.msg(sender, "&cYou must be a player to use &7me&c as a target!");
return;
}
playerOne = ((Player) sender);
} else {
playerOne = resolvePlayer(params.get(0));
}
if (playerOne == null || !playerOne.isOnline()) {
Msg.msg(sender, "&cFailed to find player: &f" + params.get(0));
return;
}
OfflinePlayer playerTwo;
if ("me".equalsIgnoreCase(params.get(1))) {
if (!(sender instanceof Player)) {
Msg.msg(sender, "&cYou must be a player to use &7me&c as a target!");
return;
}
playerTwo = ((Player) sender);
} else {
playerTwo = resolvePlayer(params.get(1));
}
if (playerTwo == null || !playerTwo.isOnline()) {
Msg.msg(sender, "&cFailed to find player: &f" + params.get(1));
return;
}
final String message = PlaceholderAPI
.setRelationalPlaceholders((Player) playerOne, (Player) playerTwo,
String.join(" ", params.subList(2, params.size())));
sender.sendMessage(message);
}
private void completeParseSingular(@NotNull final CommandSender sender,
@NotNull @Unmodifiable final List<String> params, @NotNull final List<String> suggestions) {
if (params.size() <= 1) {
if (sender instanceof Player && (params.isEmpty() || "me"
.startsWith(params.get(0).toLowerCase(Locale.ROOT)))) {
suggestions.add("me");
}
if ("--null".startsWith(params.get(0).toLowerCase(Locale.ROOT))) {
suggestions.add("--null");
}
final Stream<String> names = Bukkit.getOnlinePlayers().stream().map(Player::getName);
suggestByParameter(names, suggestions, params.isEmpty() ? null : params.get(0));
return;
}
final String name = params.get(params.size() - 1);
if (!name.startsWith("%") || name.endsWith("%")) {
return;
}
final int index = name.indexOf('_');
if (index == -1) {
return; // no arguments supplied yet
}
final PlaceholderExpansion expansion = PlaceholderAPIPlugin.getInstance()
.getLocalExpansionManager().findExpansionByIdentifier(name.substring(1, index))
.orElse(null);
if (expansion == null) {
return;
}
final Set<String> possible = new HashSet<>(expansion.getPlaceholders());
PlaceholderAPIPlugin.getInstance()
.getCloudExpansionManager()
.findCloudExpansionByName(expansion.getName())
.ifPresent(cloud -> possible.addAll(cloud.getPlaceholders()));
suggestByParameter(possible.stream(), suggestions, params.get(params.size() - 1));
}
private void completeParseRelation(@NotNull @Unmodifiable final List<String> params,
@NotNull final List<String> suggestions) {
if (params.size() > 2) {
return;
}
final Stream<String> names = Bukkit.getOnlinePlayers().stream().map(Player::getName);
suggestByParameter(names, suggestions, params.isEmpty() ? null : params.get(params.size() - 1));
}
@Nullable
private OfflinePlayer resolvePlayer(@NotNull final String name) {
OfflinePlayer target = Bukkit.getPlayerExact(name);
if (target == null) {
// Not the best option, but Spigot doesn't offer a good replacement (as usual)
target = Bukkit.getOfflinePlayer(name);
return target.hasPlayedBefore() ? target : null;
}
return target;
}
}
@@ -0,0 +1,43 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.local;
import java.util.List;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandReload extends PlaceholderCommand {
public CommandReload() {
super("reload");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
plugin.reloadConf(sender);
}
}
@@ -0,0 +1,52 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.commands.impl.local;
import java.util.List;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.commands.PlaceholderCommand;
import me.clip.placeholderapi.util.Msg;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.PluginDescriptionFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;
public final class CommandVersion extends PlaceholderCommand {
public CommandVersion() {
super("version");
}
@Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) {
final PluginDescriptionFile description = plugin.getDescription();
Msg.msg(sender,
"&b&lPlaceholderAPI &7(&f" + description.getVersion() + "&7)",
"&7Author: &f" + description.getAuthors(),
"&7PAPI Commands: &b/papi &fhelp",
"&7eCloud Commands&8: &b/papi &fecloud");
}
}
@@ -0,0 +1,47 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.configuration;
import java.util.Comparator;
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
import org.jetbrains.annotations.NotNull;
public enum ExpansionSort implements Comparator<CloudExpansion> {
NAME(Comparator.comparing(CloudExpansion::getName)),
AUTHOR(Comparator.comparing(CloudExpansion::getAuthor)),
LATEST(Comparator.comparing(CloudExpansion::getLastUpdate).reversed());
@NotNull
private final Comparator<CloudExpansion> comparator;
ExpansionSort(@NotNull final Comparator<CloudExpansion> comparator) {
this.comparator = comparator;
}
@Override
public final int compare(final CloudExpansion expansion1, final CloudExpansion expansion2) {
return comparator.compare(expansion1, expansion2);
}
}
@@ -0,0 +1,89 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.configuration;
import java.util.Optional;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import org.jetbrains.annotations.NotNull;
public final class PlaceholderAPIConfig {
@NotNull
private final PlaceholderAPIPlugin plugin;
public PlaceholderAPIConfig(@NotNull final PlaceholderAPIPlugin plugin) {
this.plugin = plugin;
}
public boolean checkUpdates() {
return plugin.getConfig().getBoolean("check_updates");
}
public boolean isCloudEnabled() {
return plugin.getConfig().getBoolean("cloud_enabled");
}
public void setCloudEnabled(boolean state) {
plugin.getConfig().set("cloud_enabled", state);
plugin.saveConfig();
}
public boolean isDebugMode() {
return plugin.getConfig().getBoolean("debug", false);
}
public Optional<ExpansionSort> getExpansionSort() {
final String option = plugin.getConfig()
.getString("cloud_sorting", ExpansionSort.LATEST.name());
try {
//noinspection ConstantConditions (bad spigot annotation)
return Optional.of(ExpansionSort.valueOf(option.toUpperCase()));
} catch (final IllegalArgumentException ignored) {
return Optional.empty();
}
}
@NotNull
public String dateFormat() {
//noinspection ConstantConditions (bad spigot annotation)
return plugin.getConfig().getString("date_format", "MM/dd/yy HH:mm:ss");
}
@NotNull
public String booleanTrue() {
//noinspection ConstantConditions (bad spigot annotation)
return plugin.getConfig().getString("boolean.true", "true");
}
@NotNull
public String booleanFalse() {
//noinspection ConstantConditions (bad spigot annotation)
return plugin.getConfig().getString("boolean.false", "false");
}
}
@@ -0,0 +1,89 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.events;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* This event indicates that a <b>single</b> {@link PlaceholderExpansion PlaceholderExpansion} has
* been registered in PlaceholderAPI.
*
* <p>To know when <b>all</b> Expansions have been registered, use the
* {@link me.clip.placeholderapi.events.ExpansionsLoadedEvent ExpansionsLoadedEvent} instead.
*/
public final class ExpansionRegisterEvent extends Event implements Cancellable {
@NotNull
private static final HandlerList HANDLERS = new HandlerList();
@NotNull
private final PlaceholderExpansion expansion;
private boolean cancelled;
public ExpansionRegisterEvent(@NotNull final PlaceholderExpansion expansion) {
this.expansion = expansion;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLERS;
}
/**
* The {@link PlaceholderExpansion PlaceholderExpansion} that was registered in PlaceholderAPI.
* <br>The PlaceholderExpansion will be available for use when the event
* {@link #isCancelled() was not cancelled}!
*
* @return Current instance of the registered {@link PlaceholderExpansion PlaceholderExpansion}
*/
@NotNull
public PlaceholderExpansion getExpansion() {
return expansion;
}
/**
* Indicates if this event was cancelled or not.
* <br>A cancelled Event will result in the {@link #getExpansion() PlaceholderExpansion} NOT
* being added to PlaceholderAPI's internal list and will therefore be considered not registered
* anymore.
*
* @return Whether the event has been cancelled or not.
*/
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
}
@@ -0,0 +1,70 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.events;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* This event indicates that a {@link PlaceholderExpansion PlaceholderExpansion} has been
* unregistered by PlaceholderAPI.
*
* <p>Note that this event is triggered <b>before</b> the PlaceholderExpansion is completely
* removed.
* <br>This includes removing any Listeners, stopping active tasks and clearing the cache of
* the PlaceholderExpansion.
*/
public final class ExpansionUnregisterEvent extends Event {
@NotNull
private static final HandlerList HANDLERS = new HandlerList();
@NotNull
private final PlaceholderExpansion expansion;
public ExpansionUnregisterEvent(@NotNull final PlaceholderExpansion expansion) {
this.expansion = expansion;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLERS;
}
/**
* The {@link PlaceholderExpansion PlaceholderExpansion} that was unregistered.
*
* @return The {@link PlaceholderExpansion PlaceholderExpansion} instance.
*/
@NotNull
public PlaceholderExpansion getExpansion() {
return expansion;
}
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
}
@@ -0,0 +1,73 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.events;
import java.util.Collections;
import java.util.List;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* This event indicated that <b>all</b> {@link PlaceholderExpansion PlaceholderExpansions} have
* been registered in PlaceholderAPI and can now be used.
* <br>This even will also be triggered whenever PlaceholderAPI gets reloaded.
*
* <p>All PlaceholderExpansions, except for those loaded by plugins, are loaded
* after Spigot triggered its ServerLoadEvent (1.13+), or after PlaceholderAPI has been enabled.
*/
public class ExpansionsLoadedEvent extends Event {
private final List<PlaceholderExpansion> expansions;
public ExpansionsLoadedEvent(List<PlaceholderExpansion> expansions) {
this.expansions = Collections.unmodifiableList(expansions);
}
/**
* Returns a unmodifiable list of {@link PlaceholderExpansion PlaceholderExpansions} that
* have been registered by PlaceholderAPI.
*
* <p><b>This list does not include manually registered PlaceholderExpansions.</b>
*
* @return List of {@link PlaceholderExpansion registered PlaceholderExpansions}.
*/
@NotNull
public final List<PlaceholderExpansion> getExpansions(){
return expansions;
}
@NotNull
private static final HandlerList HANDLERS = new HandlerList();
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLERS;
}
}
@@ -0,0 +1,70 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.events;
import me.clip.placeholderapi.PlaceholderHook;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* @deprecated This event is no longer used.
*/
@Deprecated
public final class PlaceholderHookUnloadEvent extends Event {
@NotNull
private static final HandlerList HANDLERS = new HandlerList();
@NotNull
private final String plugin;
@NotNull
private final PlaceholderHook placeholderHook;
public PlaceholderHookUnloadEvent(@NotNull final String plugin,
@NotNull final PlaceholderHook placeholderHook) {
this.plugin = plugin;
this.placeholderHook = placeholderHook;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLERS;
}
@NotNull
public String getHookName() {
return plugin;
}
@NotNull
public PlaceholderHook getHook() {
return placeholderHook;
}
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
}
@@ -0,0 +1,29 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.exceptions;
public final class NoDefaultCommandException extends RuntimeException {
public NoDefaultCommandException(final String message) {
super(message);
}
}
@@ -0,0 +1,38 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.expansion;
/**
* Classes implementing this interface will have a {@link #clear() clear void} that is called
* by PlaceholderAPI whenever the {@link me.clip.placeholderapi.expansion.PlaceholderExpansion PlaceholderExpansion}
* is unregistered.
*
* <p>This allows you to execute things such as clearing internal caches, saving data to files, etc.
*
* @author Ryan McCarthy
*/
public interface Cacheable {
/**
* Called when the implementing class is unregistered from PlaceholderAPI
*/
void clear();
}
@@ -0,0 +1,42 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.expansion;
import org.bukkit.entity.Player;
/**
* Classes implementing this interface will have a {@link #cleanup(Player) cleanup void} that is
* called by PlaceholderAPI whenever a Player leaves the server.
*
* <p>This can be useful for cases where you keep data of the player in a cache or similar
* and want to free up space whenever they leave.
*
* @author Ryan McCarthy
*/
public interface Cleanable {
/**
* Called when a player leaves the server
*
* @param p (@link Player} who left the server
*/
void cleanup(Player p);
}
@@ -0,0 +1,57 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.expansion;
import java.util.Map;
/**
* Implementing this interface allows {@link me.clip.placeholderapi.expansion.PlaceholderExpansion PlaceholderExpansions}
* to set a list of default configuration values through the {@link #getDefaults() getDefaults method}
* that should be added to the config.yml of PlaceholderAPI.
*
* <p>The entries will be added under {@code expansions} as their own section.
* <h2>Example:</h2>
* returning a Map with key {@code foo} and value {@code bar} will result in the following config entry:
*
* <pre><code>
* expansions:
* myexpansion:
* foo: "bar"
* </code></pre>
*
* <p><b>The configuration is set before the PlaceholderExpansion is registered!</b>
*
* @author Ryan McCarthy
*/
public interface Configurable {
/**
* The map returned by this method will be used to set config options in PlaceholderAPI's config.yml.
*
* <p>The key and value pairs are set under a section named after your
* {@link me.clip.placeholderapi.expansion.PlaceholderExpansion PlaceholderExpansion} in the
* {@code expansions} section of the config.
*
* @return Map of config path / values which need to be added / removed from the PlaceholderAPI
* config.yml file
*/
Map<String, Object> getDefaults();
}
@@ -0,0 +1,79 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.expansion;
public enum NMSVersion {
UNKNOWN("unknown"),
SPIGOT_1_7_R1("v1_7_R1"),
SPIGOT_1_7_R2("v1_7_R2"),
SPIGOT_1_7_R3("v1_7_R3"),
SPIGOT_1_7_R4("v1_7_R4"),
SPIGOT_1_8_R1("v1_8_R1"),
SPIGOT_1_8_R2("v1_8_R2"),
SPIGOT_1_8_R3("v1_8_R3"),
SPIGOT_1_9_R1("v1_9_R1"),
SPIGOT_1_9_R2("v1_9_R2"),
SPIGOT_1_10_R1("v1_10_R1"),
SPIGOT_1_11_R1("v1_11_R1"),
SPIGOT_1_12_R1("v1_12_R1"),
SPIGOT_1_13_R1("v1_13_R1"),
SPIGOT_1_13_R2("v1_13_R2"),
SPIGOT_1_14_R1("v1_14_R1"),
SPIGOT_1_15_R1("v1_15_R1"),
SPIGOT_1_16_R1("v1_16_R1"),
SPIGOT_1_16_R2("v1_16_R2"),
SPIGOT_1_16_R3("v1_16_R3"),
SPIGOT_1_17_R1("v1_17_R1"),
SPIGOT_1_18_R1("v1_18_R1"),
SPIGOT_1_19_R1("v1_19_R1"),
SPIGOT_1_19_R2("v1_19_R2"),
SPIGOT_1_19_R3("v1_19_R3"),
SPIGOT_1_20_R1("v1_20_R1"),
SPIGOT_1_20_R2("v1_20_R2"),
SPIGOT_1_20_R3("v1_20_R3"),
SPIGOT_1_20_R4("v1_20_R4"),
SPIGOT_1_21_R1("v1_21_R1"),
SPIGOT_1_21_R2("V1_21_R2"),
SPIGOT_1_21_R3("V1_21_R3"),
SPIGOT_1_21_R4("V1_21_R4");
private final String version;
NMSVersion(String version) {
this.version = version;
}
public static NMSVersion getVersion(String version) {
for (NMSVersion v : values()) {
if (v.getVersion().equalsIgnoreCase(version)) {
return v;
}
}
return NMSVersion.UNKNOWN;
}
public String getVersion() {
return version;
}
}
@@ -0,0 +1,479 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.expansion;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.PlaceholderHook;
import org.bukkit.Bukkit;
import org.bukkit.configuration.ConfigurationSection;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Any class extending this will be able to get registered as a PlaceholderExpansion.
* <br>The registration either happens automatically when the jar file containing a
* class extending this one is located under the {@code PlaceholderAPI/expansions}
* directory or when the {@link #register()} method is called by said class.
*/
public abstract class PlaceholderExpansion extends PlaceholderHook {
/**
* The type is {@link Type#INTERNAL} by default.
* For external expansions, the type is updated on {@link me.clip.placeholderapi.expansion.manager.LocalExpansionManager#register(Class) register}.
* @since 2.11.4
*/
@ApiStatus.Internal
protected Type expansionType = Type.INTERNAL;
/**
* The placeholder identifier of this expansion. May not contain {@literal %},
* {@literal {}} or _
*
* @return placeholder identifier that is associated with this expansion
*/
@NotNull
public abstract String getIdentifier();
/**
* The author of this expansion
*
* @return name of the author for this expansion
*/
@NotNull
public abstract String getAuthor();
/**
* The version of this expansion
*
* @return current version of this expansion
*/
@NotNull
public abstract String getVersion();
/**
* The name of this expansion
*
* @return {@link #getIdentifier()} by default, name of this expansion if specified
*/
@NotNull
public String getName() {
return getIdentifier();
}
/**
* The name of the plugin that this expansion hooks into. by default will null
*
* @return plugin name that this expansion requires to function
*/
@Nullable
public String getRequiredPlugin() {
return getPlugin();
}
/**
* The placeholders associated with this expansion
*
* @return placeholder list that this expansion provides
*/
@NotNull
public List<String> getPlaceholders() {
return Collections.emptyList();
}
/**
* Expansions that do not use the ecloud and instead register from the dependency should set this
* to true to ensure that your placeholder expansion is not unregistered when the papi reload
* command is used
*
* @return if this expansion should persist through placeholder reloads
*/
public boolean persist() {
return false;
}
/**
* Check if this placeholder identifier has already been registered
*
* @return true if the identifier for this expansion is already registered
*/
public final boolean isRegistered() {
return getPlaceholderAPI().getLocalExpansionManager().findExpansionByIdentifier(getIdentifier())
.map(it -> it.equals(this)).orElse(false);
}
/**
* If any requirements need to be checked before this expansion should register, you can check
* them here
*
* @return true if this hook meets all the requirements to register
*/
public boolean canRegister() {
return getRequiredPlugin() == null
|| Bukkit.getPluginManager().getPlugin(getRequiredPlugin()) != null;
}
/**
* Attempt to register this PlaceholderExpansion
*
* @return true if this expansion is now registered with PlaceholderAPI
*/
public boolean register() {
return getPlaceholderAPI().getLocalExpansionManager().register(this);
}
/**
* Attempt to unregister this PlaceholderExpansion
*
* @return true if this expansion is now unregistered with PlaceholderAPI
*/
public final boolean unregister() {
return getPlaceholderAPI().getLocalExpansionManager().unregister(this);
}
/**
* Quick getter for the {@link PlaceholderAPIPlugin} instance
*
* @return {@link PlaceholderAPIPlugin} instance
*/
@NotNull
public final PlaceholderAPIPlugin getPlaceholderAPI() {
return PlaceholderAPIPlugin.getInstance();
}
/**
* Get the type of the expansion
*
* @return the type of the expansion
* @since 2.11.4
*/
@ApiStatus.Internal
public Type getExpansionType() {
return expansionType;
}
/**
* Set the type of the expansion
* @param expansionType the new type
* @since 2.11.4
*/
@ApiStatus.Internal
public void setExpansionType(Type expansionType) {
this.expansionType = expansionType;
}
// === Configuration ===
/**
* Gets the ConfigurationSection of the expansion located in the config.yml of PlaceholderAPI or
* null when not specified.
* <br>You may use the {@link Configurable} interface to define default values set
*
* @return ConfigurationSection that this expansion has.
*/
@Nullable
public final ConfigurationSection getConfigSection() {
return getPlaceholderAPI().getConfig().getConfigurationSection("expansions." + getIdentifier());
}
/**
* Gets the ConfigurationSection relative to the {@link #getConfigSection() default one} set
* by the expansion or null when the default ConfigurationSection is null
*
* @param path The path to get the ConfigurationSection from. This is relative to the default section
* @return ConfigurationSection relative to the default section
*/
@Nullable
public final ConfigurationSection getConfigSection(@NotNull final String path) {
final ConfigurationSection section = getConfigSection();
return section == null ? null : section.getConfigurationSection(path);
}
/**
* Gets the Object relative to the {@link #getConfigSection() default ConfigurationSection} set
* by the expansion or the provided Default Object, when the default ConfigurationSection is null
*
* @param path The path to get the Object from. This is relative to the default section
* @param def The default Object to return when the ConfigurationSection returns null
* @return Object from the provided path or the default one provided
*/
@Nullable
@Contract("_, !null -> !null")
public final Object get(@NotNull final String path, final Object def) {
final ConfigurationSection section = getConfigSection();
return section == null ? def : section.get(path, def);
}
/**
* Gets the int relative to the {@link #getConfigSection() default ConfigurationSection} set
* by the expansion or the provided Default int, when the default ConfigurationSection is null
*
* @param path The path to get the int from. This is relative to the default section
* @param def The default int to return when the ConfigurationSection returns null
* @return int from the provided path or the default one provided
*/
public final int getInt(@NotNull final String path, final int def) {
final ConfigurationSection section = getConfigSection();
return section == null ? def : section.getInt(path, def);
}
/**
* Gets the long relative to the {@link #getConfigSection() default ConfigurationSection} set
* by the expansion or the provided Default long, when the default ConfigurationSection is null
*
* @param path The path to get the long from. This is relative to the default section
* @param def The default long to return when the ConfigurationSection returns null
* @return long from the provided path or the default one provided
*/
public final long getLong(@NotNull final String path, final long def) {
final ConfigurationSection section = getConfigSection();
return section == null ? def : section.getLong(path, def);
}
/**
* Gets the double relative to the {@link #getConfigSection() default ConfigurationSection} set
* by the expansion or the provided Default double, when the default ConfigurationSection is null
*
* @param path The path to get the double from. This is relative to the default section
* @param def The default double to return when the ConfigurationSection returns null
* @return double from the provided path or the default one provided
*/
public final double getDouble(@NotNull final String path, final double def) {
final ConfigurationSection section = getConfigSection();
return section == null ? def : section.getDouble(path, def);
}
/**
* Gets the String relative to the {@link #getConfigSection() default ConfigurationSection} set
* by the expansion or the provided Default String, when the default ConfigurationSection is null
*
* @param path The path to get the String from. This is relative to the default section
* @param def The default String to return when the ConfigurationSection returns null. Can be null
* @return String from the provided path or the default one provided
*/
@Nullable
@Contract("_, !null -> !null")
public final String getString(@NotNull final String path, @Nullable final String def) {
final ConfigurationSection section = getConfigSection();
return section == null ? def : section.getString(path, def);
}
/**
* Gets a String List relative to the {@link #getConfigSection() default ConfigurationSection} set
* by the expansion or an empty List, when the default ConfigurationSection is null
*
* @param path The path to get the String list from. This is relative to the default section
* @return String list from the provided path or an empty list
*/
@NotNull
public final List<String> getStringList(@NotNull final String path) {
final ConfigurationSection section = getConfigSection();
return section == null ? Collections.emptyList() : section.getStringList(path);
}
/**
* Gets the boolean relative to the {@link #getConfigSection() default ConfigurationSection} set
* by the expansion or the default boolean, when the default ConfigurationSection is null
*
* @param path The path to get the boolean from. This is relative to the default section
* @param def The default boolean to return when the ConfigurationSection is null
* @return boolean from the provided path or the default one provided
*/
public final boolean getBoolean(@NotNull final String path, final boolean def) {
final ConfigurationSection section = getConfigSection();
return section == null ? def : section.getBoolean(path, def);
}
/**
* Whether the {@link #getConfigSection() default ConfigurationSection} contains the provided path
* or not. This will return {@code false} when either the default section is null, or doesn't
* contain the provided path
*
* @param path The path to check
* @return true when the default ConfigurationSection is not null and contains the path, false otherwise
*/
public final boolean configurationContains(@NotNull final String path) {
final ConfigurationSection section = getConfigSection();
return section != null && section.contains(path);
}
/**
* Logs the provided message with the provided Level in the console.
* <br>The message will be prefixed with {@link #getName() <code>[&lt;expansion name&gt;]</code>}
*
* @param level The Level at which the message should be logged with
* @param msg The message to log
*/
public void log(Level level, String msg) {
getPlaceholderAPI().getLogger().log(level, "[" + getName() + "] " + msg);
}
/**
* Logs the provided message and Throwable with the provided Level in the console.
* <br>The message will be prefixed with {@link #getName() <code>[&lt;expansion name&gt;]</code>}
*
* @param level The Level at which the message should be logged with
* @param msg The message to log
* @param throwable The Throwable to log
*/
public void log(Level level, String msg, Throwable throwable) {
getPlaceholderAPI().getLogger().log(level, "[" + getName() + "] " + msg, throwable);
}
/**
* Logs the provided message with Level "info".
* <br>The message will be prefixed with {@link #getName() <code>[&lt;expansion name&gt;]</code>}
*
* @param msg The message to log
*/
public void info(String msg) {
log(Level.INFO, msg);
}
/**
* Logs the provided message with Level "warning".
* <br>The message will be prefixed with {@link #getName() <code>[&lt;expansion name&gt;]</code>}
*
* @param msg The message to log
*/
public void warning(String msg) {
log(Level.WARNING, msg);
}
/**
* Logs the provided message with Level "severe" (error).
* <br>The message will be prefixed with {@link #getName() <code>[&lt;expansion name&gt;]</code>}
*
* @param msg The message to log
*/
public void severe(String msg) {
log(Level.SEVERE, msg);
}
/**
* Logs the provided message and Throwable with Level "severe" (error).
* <br>The message will be prefixed with {@link #getName() <code>[&lt;expansion name&gt;]</code>}
*
* @param msg The message to log
* @param throwable The Throwable to log
*/
public void severe(String msg, Throwable throwable) {
log(Level.SEVERE, msg, throwable);
}
/**
* Whether the provided Object is an instance of this PlaceholderExpansion.
* <br>This method will perform the following checks in order:
* <br><ul>
* <li>Checks if Object equals the class. Returns true when equal and continues otherwise</li>
* <li>Checks if the Object is an instance of a PlaceholderExpansion. Returns false if not</li>
* <li>Checks if the Object's Identifier, Author and version equal the one of this class</li>
* </ul>
*
* @param o The Object to check
* @return true or false depending on the above mentioned checks
*/
@Override
public final boolean equals(final Object o) {
if (this == o) {
return true;
}
if (!(o instanceof PlaceholderExpansion)) {
return false;
}
final PlaceholderExpansion expansion = (PlaceholderExpansion) o;
return getIdentifier().equals(expansion.getIdentifier()) &&
getAuthor().equals(expansion.getAuthor()) &&
getVersion().equals(expansion.getVersion());
}
/**
* Returns a String containing the Expansion's name, author and version
*
* @return String containing name, author and version of the expansion
*/
@Override
public final String toString() {
return String.format("PlaceholderExpansion[name: '%s', author: '%s', version: '%s', type: '%s']", getName(),
getAuthor(), getVersion(), getExpansionType());
}
// === Deprecated API ===
/**
* @deprecated As of versions greater than 2.8.7, use {@link #getRequiredPlugin()}
*
* @return The plugin name.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public String getPlugin() {
return null;
}
/**
* @deprecated As of versions greater than 2.8.7, use the expansion cloud to show a description
*
* @return The description of the expansion.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public String getDescription() {
return null;
}
/**
* @deprecated As of versions greater than 2.8.7, use the expansion cloud to display a link
*
* @return The link for the expansion.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
public String getLink() {
return null;
}
public enum Type {
/**
* An expansion provided by a plugin is considered internal
*/
INTERNAL,
/**
* An expansion loaded from the expansions folder is considered external
*/
EXTERNAL
}
}
@@ -0,0 +1,43 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.expansion;
import org.bukkit.entity.Player;
/**
* Implementing this interface allows your {@link me.clip.placeholderapi.expansion.PlaceholderExpansion PlaceholderExpansion}
* to be used as a relational placeholder expansion.
*
* <p>Relational placeholders take two Players as input and are always prefixed with {@code rel_},
* so {@code %foo_bar%} becomes {@code %rel_foo_bar%}
*/
public interface Relational {
/**
* This method is called whenever a placeholder starting with {@code rel_} is called.
*
* @param one The first player used for the placeholder.
* @param two The second player used for the placeholder.
* @param identifier The text right after the expansion's name (%expansion_<b>identifier</b>%)
* @return Parsed String from the expansion.
*/
String onPlaceholderRequest(Player one, Player two, String identifier);
}
@@ -0,0 +1,43 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.expansion;
/**
* Implementing this interface adds the {@link #start() start} and {@link #stop() stop} void
* methods to your {@link me.clip.placeholderapi.expansion.PlaceholderExpansion PlaceholderExpansion}.
*
* <p>This can be used to execute methods and tasks whenever the PlaceholderExpansion has been
* successfully (un)registered.
*/
public interface Taskable {
/**
* Called when the implementing class has successfully been registered to the placeholder map.
* <br>Tasks that need to be performed when this expansion is registered should go here
*/
void start();
/**
* Called when the implementing class has been unregistered from PlaceholderAPI.
* <br>Tasks that need to be performed when this expansion has unregistered should go here
*/
void stop();
}
@@ -0,0 +1,46 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.expansion;
@Deprecated
public final class Version {
private final boolean isSpigot;
private final String version;
public Version(String version, boolean isSpigot) {
this.version = version;
this.isSpigot = isSpigot;
}
public String getVersion() {
return version == null ? "unknown" : version;
}
public boolean isSpigot() {
return isSpigot;
}
public boolean compareTo(String version) {
return getVersion().equalsIgnoreCase(version);
}
}
@@ -0,0 +1,45 @@
/*
* This file is part of PlaceholderAPI
*
* PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
*
* PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlaceholderAPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package me.clip.placeholderapi.expansion;
/**
* Placeholder expansions which use NMS code should be version specific. Implementing this class
* allows you to perform checks based on the version the server is running. The isCompatibleWith
* method will be passed the server version and allow you to return if your expansion is compatible
* with that version.
*
* @author Ryan McCarthy
*
* @deprecated Will be removed in a future release.
*/
@Deprecated
public interface VersionSpecific {
/**
* This method is called before the expansion is attempted to be registered The server version
* will be passed to this method so you know what version the server is currently running.
*
* @param v The {@link Version} to check against
*
* @return true if your expansion is compatible with the version the server is running.
*/
boolean isCompatibleWith(Version v);
}
Loaded 100 of 129 files, more files were not shown because too many files have changed in this diff. Show more