From 85328c473b3ba8c741d760701dd9f4535a9197e3 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Sun, 2 Jun 2019 19:01:11 +0200 Subject: [PATCH 01/17] Improve the feature_request --- .github/ISSUE_TEMPLATE/feature_request.md | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 890bdc0..7524ce7 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -8,28 +8,28 @@ about: Do you have a plugin that supports and/or adds placeholders from/to Place [Bug report]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=bug_report.md [issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues [wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki +[FAQ]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/FAQ -### Notes -This template is for **requesting additions for the wiki** and not for reporting bugs or requesting changes for the wiki! -If you want changes to be made to the wiki, use the [Request change] template. -For bug reports, use the [Bug report] template. +### Please read +Please use this template for Feature requests only! +This doesn't include changes to already existing things like wiki-entries or code. Use the [Request change] template for those types of issues. +For bug reports regarding PlaceholderAPI use the [Bug report] template. -Also make sure, that your requested placeholders/plugin isn't already added in the [wiki] or listed in the [issues] page. +Also make sure that you have read the [wiki], the [FAQ] and that you checked the [issues] page for any similar topic. ### Type > What kind of request is this? (Multiple selections possible) - - + -- [ ] New expansion providing placeholders. -- [ ] New plugin providing placeholders. +- [ ] New plugin or expansion that provides placeholders. - [ ] New plugin supporting PlaceholderAPI. +- [ ] New PlaceholderAPI feature. +- [ ] Other: __________ -### Plugin -> What is the name of the plugin/expansion? -> Provide also a link to it. - - -### Placeholders/others -> What are the new placeholders/Any additional info? +### New information +> What should be added? +> Please provide as much information like why it should be added. +> Also make sure to add links to it if possible. From 82181ed74d84a06382124f90a7e551489dc47dd3 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Sun, 2 Jun 2019 19:20:27 +0200 Subject: [PATCH 02/17] Update and rename change_request.md to change_request_wiki.md --- .github/ISSUE_TEMPLATE/change_request.md | 36 ------------------- .github/ISSUE_TEMPLATE/change_request_wiki.md | 34 ++++++++++++++++++ 2 files changed, 34 insertions(+), 36 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/change_request.md create mode 100644 .github/ISSUE_TEMPLATE/change_request_wiki.md diff --git a/.github/ISSUE_TEMPLATE/change_request.md b/.github/ISSUE_TEMPLATE/change_request.md deleted file mode 100644 index 0c9bc75..0000000 --- a/.github/ISSUE_TEMPLATE/change_request.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: Request change -about: Request a update/change of a wiki-page - ---- - -[New placeholders/plugin]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=feature_request.md -[Bug report]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=bug_report.md -[issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues -[wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki - -### Notes -This template is for **requesting changes to the wiki** and not for reporting bugs or requesting additions for the wiki! -If you want your placeholders added, use the [New placeholders/plugin] template. -For bug reports, use the [Bug report] template. - -Also make sure, that your requested change isn't already made in the [wiki] or listed in the [issues] page. - -### Type -> What kind of change is it? (Multiple selections possible) - - -- [ ] Placeholder(s) changed. -- [ ] New placeholder(s). -- [ ] Plugin no longer supports PlaceholderAPI and/or was deleted. - -### Plugin -> What is the name of the plugin? - - - -### What is the new value? -> **Placeholder(s) changed**: Type what the old and the new placeholder(s) is/are. -> **New Placeholder(s)**: Type the new placeholder(s). -> **Plugin no longer supports PlaceholderAPI**: Leave this blank. - diff --git a/.github/ISSUE_TEMPLATE/change_request_wiki.md b/.github/ISSUE_TEMPLATE/change_request_wiki.md new file mode 100644 index 0000000..3bd1568 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/change_request_wiki.md @@ -0,0 +1,34 @@ +--- +name: Request change (Wiki) +about: Request a update/change of a wiki-page + +--- + +[Request change (PlaceholderAPI)]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=change_request_placeholderapi.md +[Bug report]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=bug_report.md +[issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues +[wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki + +## Please read +This template is only for requesting new information to be added to the wiki or for updating of already existing information! +Please use the [Request change (PlaceholderAPI)] template to ask for additions/changes to the plugin PlaceholderAPI. +For reporting bugs of PlaceholderAPI use the [Bug report] template. + +Also make sure that the [wiki] doesn't already have the change and that there isn't a issue about this change on the [issues] page. + +### Type +> What kind of change is it? (Multiple selections possible) + +- [ ] New plugin/expansion supporting PlaceholderAPI. +A new plugin/expansion uses and/or provides placeholders. +- [ ] Placeholder(s) changed. +An already listed expansion/plugin has new placeholders or old ones have changed. +- [ ] Plugin/Expansion no longer supports PlaceholderAPI and/or was deleted. +- [ ] Other: __________ + +### Info +> Please provide any information that is useful including links and images. +> For plugins/expansion providing new placeholders or updating old ones, provide the placeholders (that have changed) + From 0809897303ee23307ab229152f3a37cd9f4d0833 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Sun, 2 Jun 2019 19:30:12 +0200 Subject: [PATCH 03/17] Update and rename feature_request.md to change_request_placeholderapi.md --- .../change_request_placeholderapi.md | 38 +++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 35 ----------------- 2 files changed, 38 insertions(+), 35 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/change_request_placeholderapi.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/change_request_placeholderapi.md b/.github/ISSUE_TEMPLATE/change_request_placeholderapi.md new file mode 100644 index 0000000..4f21be7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/change_request_placeholderapi.md @@ -0,0 +1,38 @@ +--- +name: Request change (PlaceholderAPI) +about: Request a update/change of the PlaceholderAPI-code + +--- + +[Request change (Wiki)]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=change_request_wiki.md +[Bug report]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=bug_report.md +[issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues +[wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki +[Pull Requests]: https://github.com/PlaceholderAPI/PlaceholderAPI/pulls + +## Please read +This template is only for requesting new functions to be added to PlaceholderAPI or for old one to be changed! +Please use the [Request change (Wiki)] template to ask for additions/changes to the wiki. +For reporting bugs of PlaceholderAPI use the [Bug report] template. + +Also make sure that the [wiki] doesn't already mention such a function/change and that there isn't a issue about this change on the [issues] page. + +We recommend to [open a Pull Request][Pull Requests] for making changes to PlaceholderAPI's code. + +### Type +> What kind of request is this? (Multiple selections possible) + +- [ ] New function for PlaceholderAPI. +A new function that developers could use. +- [ ] Change to code (Internal). +Changes to code that won't affect the end-user. +- [ ] Change to code (External). +Changes to code that will affect the end-user (breaks stuff). +- [ ] Other: __________ + +### Info +> What is the change? +> Please provide as much information (including links, images and code-snippeds) as possible. + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 7524ce7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: New placeholders/plugin -about: Do you have a plugin that supports and/or adds placeholders from/to PlaceholderAPI and that isn't on the wiki? Use this template! - ---- - -[Request change]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=change_request.md -[Bug report]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=bug_report.md -[issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues -[wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki -[FAQ]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/FAQ - -### Please read -Please use this template for Feature requests only! -This doesn't include changes to already existing things like wiki-entries or code. Use the [Request change] template for those types of issues. -For bug reports regarding PlaceholderAPI use the [Bug report] template. - -Also make sure that you have read the [wiki], the [FAQ] and that you checked the [issues] page for any similar topic. - -### Type -> What kind of request is this? (Multiple selections possible) - - -- [ ] New plugin or expansion that provides placeholders. -- [ ] New plugin supporting PlaceholderAPI. -- [ ] New PlaceholderAPI feature. -- [ ] Other: __________ - -### New information -> What should be added? -> Please provide as much information like why it should be added. -> Also make sure to add links to it if possible. - From c4cba9c6a75f09b44da92b82aecd885684393e1e Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Sun, 2 Jun 2019 19:37:57 +0200 Subject: [PATCH 04/17] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dff03f8..35cfabd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,21 +1,23 @@ --- name: Bug Report -about: Found a bug with PlaceholderAPI? Report it through this form! +about: Report bugs of PlaceholderAPI with this template --- -[New placeholders/plugin]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=feature_request.md -[Request change]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=change_request.md -[Spigot page]: https://www.spigotmc.org/resources/6245/ -[Jenkins page]: http://ci.extendedclip.com/job/PlaceholderAPI/ +[Request change (Wiki)]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=change_request_wiki.md +[Request change (PlaceholderAPI)]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=change_request_placeholderapi.md +[Spigot]: https://www.spigotmc.org/resources/6245/ +[Jenkins]: http://ci.extendedclip.com/job/PlaceholderAPI/ [issue]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues -### Notes -This template is for **reporting a bug** and not for requesting changes to the wiki! -If you want your placeholders added or updated, use the [New placeholders/plugin] or [Request change] template. +## Please read +This template is only for reporting bugs of PlaceholderAPI! +If you want to request changes to the code of PlaceholderAPI, use the [Request change (PlaceholderAPI)] template. +For changes to the wiki use the [Request change (Wiki)] template. -Also make sure, that you use the latest version of PlaceholderAPI from either the [Spigot page] or the [Jenkins page] and that your -issue isn't already listed in the [issue] page. +Please also make sure that you use the [latest release][Spigot] or the latest [developement build][Jenkins] and that your bug isn't already reported on the [issues] page. + +**Please report issues with expansions/placeholders to the corresponding issue tracker! Only report it here if you can't find any place to report it!** ### Issue > What is the issue? Describe it like you would tell a friend. From 8c509b47d1b9926c53f6d4e851b63aadc32d8b32 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Sun, 2 Jun 2019 19:54:17 +0200 Subject: [PATCH 05/17] Create PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..3eacdf8 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +[Pull requests]: https://github.com/PlaceholderAPI/PlaceholderAPI/pulls +[contributing file]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/master/.github/CONTRIBUTING.md + +## 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] + +### Type + +- [ ] Internal change (Doesn't affect end-user). +- [ ] External change (Does affect end-user). +- [ ] Other: __________ + +### Description +> Provide additional information if needed. + From b44cb13d7a68076fce613539d02e876e2bd23691 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Sun, 2 Jun 2019 19:56:33 +0200 Subject: [PATCH 06/17] Create CONTRIBUTING.md --- .github/CONTRIBUTING.md | 91 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/CONTRIBUTING.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..181804f --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,91 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via [issue] or through [Discord] with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. + +## 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 at [INSERT EMAIL ADDRESS]. 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] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ From 16c237ce51308da5db74a95b3c9576486b203b04 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Sun, 2 Jun 2019 20:06:56 +0200 Subject: [PATCH 07/17] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 64 ++++++++++++----------------------------- 1 file changed, 18 insertions(+), 46 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 181804f..6abb26c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,3 +1,8 @@ +[issue]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=change_request_placeholderapi.md +[Discord]: https://helpch.at/discord +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ + # Contributing When contributing to this repository, please first discuss the change you wish to make via [issue] or through [Discord] with the owners of this repository before making a change. @@ -6,25 +11,15 @@ Please note we have a code of conduct, please follow it in all your interactions ## Pull Request Process -1. Ensure any install or build dependencies are removed before the end of the layer when doing a - build. -2. Update the README.md with details of changes to the interface, this includes new environment - variables, exposed ports, useful file locations and container parameters. -3. Increase the version numbers in any examples files and the README.md to the new version that this - Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). -4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you - do not have permission to do that, you may request the second reviewer to merge it for you. +1. Update the README.md with details of changes if it is affected by those changes. +2. Try to prevent any breaking changes affecting the end-user (Developers using the API). +Mention any breaking changes that could affect the end-user. ## 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. +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 @@ -39,53 +34,30 @@ include: Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or -advances +* 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 +* 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 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. +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. +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 at [INSERT EMAIL ADDRESS]. 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. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at our [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. +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] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ From 9af9a3570d3816bc1e052c07fce41edde4c1cc88 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Sun, 2 Jun 2019 20:07:40 +0200 Subject: [PATCH 08/17] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6abb26c..968f6ca 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -14,6 +14,7 @@ Please note we have a code of conduct, please follow it in all your interactions 1. Update the README.md with details of changes if it is affected by those changes. 2. Try to prevent any breaking changes affecting the end-user (Developers using the API). Mention any breaking changes that could affect the end-user. +3. Document any public methods that the end-user might use. ## Code of Conduct From 2c0b76877466287f12060d8fb1bae01054f5d5f8 Mon Sep 17 00:00:00 2001 From: extendedclip Date: Fri, 21 Jun 2019 12:30:12 -0400 Subject: [PATCH 09/17] ITS 2019 --- .../clip/placeholderapi/PlaceholderAPI.java | 19 +++++------- .../placeholderapi/PlaceholderAPIPlugin.java | 11 +++---- .../clip/placeholderapi/PlaceholderHook.java | 2 +- .../placeholderapi/PlaceholderListener.java | 9 +++--- .../ServerLoadEventListener.java | 24 +++++++++++++-- .../commands/ExpansionCloudCommands.java | 2 +- .../commands/PlaceholderAPICommands.java | 7 +++-- .../configuration/PlaceholderAPIConfig.java | 2 +- .../events/ExpansionRegisterEvent.java | 2 +- .../events/ExpansionUnregisterEvent.java | 2 +- .../events/PlaceholderHookUnloadEvent.java | 2 +- .../placeholderapi/expansion/Cacheable.java | 2 +- .../placeholderapi/expansion/Cleanable.java | 2 +- .../expansion/Configurable.java | 2 +- .../expansion/ExpansionManager.java | 2 +- .../placeholderapi/expansion/NMSVersion.java | 2 +- .../expansion/PlaceholderExpansion.java | 5 ++-- .../placeholderapi/expansion/Relational.java | 2 +- .../placeholderapi/expansion/Taskable.java | 2 +- .../placeholderapi/expansion/Version.java | 2 +- .../expansion/VersionSpecific.java | 2 +- .../expansion/cloud/CloudExpansion.java | 5 ++-- .../cloud/ExpansionCloudManager.java | 22 +++++--------- .../external/EZPlaceholderHook.java | 2 +- .../updatechecker/UpdateChecker.java | 29 ++++++++++++++++--- .../me/clip/placeholderapi/util/FileUtil.java | 5 ++-- .../java/me/clip/placeholderapi/util/Msg.java | 5 ++-- .../clip/placeholderapi/util/TimeFormat.java | 2 +- .../me/clip/placeholderapi/util/TimeUtil.java | 2 +- 29 files changed, 108 insertions(+), 69 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java b/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java index adac06d..e5e1974 100644 --- a/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java +++ b/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 @@ -20,18 +20,8 @@ */ package me.clip.placeholderapi; -import static me.clip.placeholderapi.util.Msg.color; - import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -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.events.ExpansionRegisterEvent; import me.clip.placeholderapi.events.ExpansionUnregisterEvent; import me.clip.placeholderapi.expansion.PlaceholderExpansion; @@ -42,6 +32,13 @@ import org.bukkit.OfflinePlayer; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import static me.clip.placeholderapi.util.Msg.color; + public class PlaceholderAPI { private static final Pattern PLACEHOLDER_PATTERN = Pattern.compile("[%]([^%]+)[%]"); diff --git a/src/main/java/me/clip/placeholderapi/PlaceholderAPIPlugin.java b/src/main/java/me/clip/placeholderapi/PlaceholderAPIPlugin.java index 766fd8c..e76d9a9 100644 --- a/src/main/java/me/clip/placeholderapi/PlaceholderAPIPlugin.java +++ b/src/main/java/me/clip/placeholderapi/PlaceholderAPIPlugin.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 @@ -20,10 +20,6 @@ */ package me.clip.placeholderapi; -import java.text.SimpleDateFormat; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; import me.clip.placeholderapi.commands.PlaceholderAPICommands; import me.clip.placeholderapi.configuration.PlaceholderAPIConfig; import me.clip.placeholderapi.expansion.ExpansionManager; @@ -39,6 +35,11 @@ import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.plugin.java.JavaPlugin; +import java.text.SimpleDateFormat; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; + /** * Yes I have a shit load of work to do... diff --git a/src/main/java/me/clip/placeholderapi/PlaceholderHook.java b/src/main/java/me/clip/placeholderapi/PlaceholderHook.java index 0be3256..7d92da0 100644 --- a/src/main/java/me/clip/placeholderapi/PlaceholderHook.java +++ b/src/main/java/me/clip/placeholderapi/PlaceholderHook.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/PlaceholderListener.java b/src/main/java/me/clip/placeholderapi/PlaceholderListener.java index 7c06084..539e859 100644 --- a/src/main/java/me/clip/placeholderapi/PlaceholderListener.java +++ b/src/main/java/me/clip/placeholderapi/PlaceholderListener.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 @@ -20,9 +20,6 @@ */ package me.clip.placeholderapi; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; import me.clip.placeholderapi.events.ExpansionUnregisterEvent; import me.clip.placeholderapi.expansion.Cacheable; import me.clip.placeholderapi.expansion.Cleanable; @@ -37,6 +34,10 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.server.PluginDisableEvent; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + public class PlaceholderListener implements Listener { diff --git a/src/main/java/me/clip/placeholderapi/ServerLoadEventListener.java b/src/main/java/me/clip/placeholderapi/ServerLoadEventListener.java index f34dfe3..6bd38eb 100644 --- a/src/main/java/me/clip/placeholderapi/ServerLoadEventListener.java +++ b/src/main/java/me/clip/placeholderapi/ServerLoadEventListener.java @@ -1,12 +1,32 @@ +/* + * + * PlaceholderAPI + * Copyright (C) 2019 Ryan McCarthy + * + * 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 . + * + * + */ package me.clip.placeholderapi; -import java.util.Map; - import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.server.ServerLoadEvent; +import java.util.Map; + public class ServerLoadEventListener implements Listener { private PlaceholderAPIPlugin plugin; diff --git a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java index e6d0952..b2ee528 100644 --- a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java +++ b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/commands/PlaceholderAPICommands.java b/src/main/java/me/clip/placeholderapi/commands/PlaceholderAPICommands.java index b94601d..479781a 100644 --- a/src/main/java/me/clip/placeholderapi/commands/PlaceholderAPICommands.java +++ b/src/main/java/me/clip/placeholderapi/commands/PlaceholderAPICommands.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 @@ -20,8 +20,6 @@ */ package me.clip.placeholderapi.commands; -import java.util.Set; -import java.util.stream.Collectors; import me.clip.placeholderapi.PlaceholderAPI; import me.clip.placeholderapi.PlaceholderAPIPlugin; import me.clip.placeholderapi.expansion.PlaceholderExpansion; @@ -34,6 +32,9 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import java.util.Set; +import java.util.stream.Collectors; + public class PlaceholderAPICommands implements CommandExecutor { private PlaceholderAPIPlugin plugin; diff --git a/src/main/java/me/clip/placeholderapi/configuration/PlaceholderAPIConfig.java b/src/main/java/me/clip/placeholderapi/configuration/PlaceholderAPIConfig.java index a8cdd8d..08da615 100644 --- a/src/main/java/me/clip/placeholderapi/configuration/PlaceholderAPIConfig.java +++ b/src/main/java/me/clip/placeholderapi/configuration/PlaceholderAPIConfig.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/events/ExpansionRegisterEvent.java b/src/main/java/me/clip/placeholderapi/events/ExpansionRegisterEvent.java index fc78a66..664475a 100644 --- a/src/main/java/me/clip/placeholderapi/events/ExpansionRegisterEvent.java +++ b/src/main/java/me/clip/placeholderapi/events/ExpansionRegisterEvent.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/events/ExpansionUnregisterEvent.java b/src/main/java/me/clip/placeholderapi/events/ExpansionUnregisterEvent.java index e5ba621..7682f78 100644 --- a/src/main/java/me/clip/placeholderapi/events/ExpansionUnregisterEvent.java +++ b/src/main/java/me/clip/placeholderapi/events/ExpansionUnregisterEvent.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/events/PlaceholderHookUnloadEvent.java b/src/main/java/me/clip/placeholderapi/events/PlaceholderHookUnloadEvent.java index 69ad53d..68f7539 100644 --- a/src/main/java/me/clip/placeholderapi/events/PlaceholderHookUnloadEvent.java +++ b/src/main/java/me/clip/placeholderapi/events/PlaceholderHookUnloadEvent.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/Cacheable.java b/src/main/java/me/clip/placeholderapi/expansion/Cacheable.java index 97521ea..caf4e5d 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/Cacheable.java +++ b/src/main/java/me/clip/placeholderapi/expansion/Cacheable.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/Cleanable.java b/src/main/java/me/clip/placeholderapi/expansion/Cleanable.java index cfb1181..bd6e8f0 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/Cleanable.java +++ b/src/main/java/me/clip/placeholderapi/expansion/Cleanable.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/Configurable.java b/src/main/java/me/clip/placeholderapi/expansion/Configurable.java index 52a147d..488c08d 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/Configurable.java +++ b/src/main/java/me/clip/placeholderapi/expansion/Configurable.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java b/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java index 9049ebd..9b3ac70 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java +++ b/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/NMSVersion.java b/src/main/java/me/clip/placeholderapi/expansion/NMSVersion.java index 95f4348..88b85cd 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/NMSVersion.java +++ b/src/main/java/me/clip/placeholderapi/expansion/NMSVersion.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java b/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java index a408b73..64b608d 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java +++ b/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 @@ -20,7 +20,6 @@ */ package me.clip.placeholderapi.expansion; -import java.util.List; import me.clip.placeholderapi.PlaceholderAPI; import me.clip.placeholderapi.PlaceholderAPIPlugin; import me.clip.placeholderapi.PlaceholderHook; @@ -28,6 +27,8 @@ import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; +import java.util.List; + public abstract class PlaceholderExpansion extends PlaceholderHook { /** diff --git a/src/main/java/me/clip/placeholderapi/expansion/Relational.java b/src/main/java/me/clip/placeholderapi/expansion/Relational.java index 02d93a0..e7708cb 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/Relational.java +++ b/src/main/java/me/clip/placeholderapi/expansion/Relational.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/Taskable.java b/src/main/java/me/clip/placeholderapi/expansion/Taskable.java index 98cc10e..19cd639 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/Taskable.java +++ b/src/main/java/me/clip/placeholderapi/expansion/Taskable.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/Version.java b/src/main/java/me/clip/placeholderapi/expansion/Version.java index 3b04676..1d9646f 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/Version.java +++ b/src/main/java/me/clip/placeholderapi/expansion/Version.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/VersionSpecific.java b/src/main/java/me/clip/placeholderapi/expansion/VersionSpecific.java index e05d4db..31d956f 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/VersionSpecific.java +++ b/src/main/java/me/clip/placeholderapi/expansion/VersionSpecific.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/expansion/cloud/CloudExpansion.java b/src/main/java/me/clip/placeholderapi/expansion/cloud/CloudExpansion.java index 10da978..49a4e73 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/cloud/CloudExpansion.java +++ b/src/main/java/me/clip/placeholderapi/expansion/cloud/CloudExpansion.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 @@ -20,10 +20,11 @@ */ package me.clip.placeholderapi.expansion.cloud; +import me.clip.placeholderapi.util.TimeUtil; + import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import me.clip.placeholderapi.util.TimeUtil; public class CloudExpansion { diff --git a/src/main/java/me/clip/placeholderapi/expansion/cloud/ExpansionCloudManager.java b/src/main/java/me/clip/placeholderapi/expansion/cloud/ExpansionCloudManager.java index 419fec5..967177d 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/cloud/ExpansionCloudManager.java +++ b/src/main/java/me/clip/placeholderapi/expansion/cloud/ExpansionCloudManager.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 @@ -21,19 +21,6 @@ package me.clip.placeholderapi.expansion.cloud; import com.google.gson.Gson; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.net.URLConnection; -import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.IntStream; - import com.google.gson.reflect.TypeToken; import me.clip.placeholderapi.PlaceholderAPI; import me.clip.placeholderapi.PlaceholderAPIPlugin; @@ -42,6 +29,13 @@ import me.clip.placeholderapi.util.Msg; import org.bukkit.Bukkit; import org.bukkit.entity.Player; +import java.io.*; +import java.net.URL; +import java.net.URLConnection; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + public class ExpansionCloudManager { private static final String API_URL = "http://api.extendedclip.com/v2/"; diff --git a/src/main/java/me/clip/placeholderapi/external/EZPlaceholderHook.java b/src/main/java/me/clip/placeholderapi/external/EZPlaceholderHook.java index 097e13e..26e125e 100644 --- a/src/main/java/me/clip/placeholderapi/external/EZPlaceholderHook.java +++ b/src/main/java/me/clip/placeholderapi/external/EZPlaceholderHook.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/updatechecker/UpdateChecker.java b/src/main/java/me/clip/placeholderapi/updatechecker/UpdateChecker.java index 948da2b..c814c59 100644 --- a/src/main/java/me/clip/placeholderapi/updatechecker/UpdateChecker.java +++ b/src/main/java/me/clip/placeholderapi/updatechecker/UpdateChecker.java @@ -1,9 +1,25 @@ +/* + * + * PlaceholderAPI + * Copyright (C) 2019 Ryan McCarthy + * + * 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 . + * + * + */ package me.clip.placeholderapi.updatechecker; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.URL; -import javax.net.ssl.HttpsURLConnection; import me.clip.placeholderapi.PlaceholderAPIPlugin; import me.clip.placeholderapi.util.Msg; import org.bukkit.Bukkit; @@ -12,6 +28,11 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; +import javax.net.ssl.HttpsURLConnection; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.URL; + public class UpdateChecker implements Listener { private final int RESOURCE_ID = 6245; diff --git a/src/main/java/me/clip/placeholderapi/util/FileUtil.java b/src/main/java/me/clip/placeholderapi/util/FileUtil.java index 743a02d..ee5014d 100644 --- a/src/main/java/me/clip/placeholderapi/util/FileUtil.java +++ b/src/main/java/me/clip/placeholderapi/util/FileUtil.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 @@ -20,6 +20,8 @@ */ package me.clip.placeholderapi.util; +import me.clip.placeholderapi.PlaceholderAPIPlugin; + import java.io.File; import java.io.FilenameFilter; import java.net.URL; @@ -28,7 +30,6 @@ import java.util.ArrayList; import java.util.List; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; -import me.clip.placeholderapi.PlaceholderAPIPlugin; public class FileUtil { diff --git a/src/main/java/me/clip/placeholderapi/util/Msg.java b/src/main/java/me/clip/placeholderapi/util/Msg.java index 6a2e799..73b87dd 100644 --- a/src/main/java/me/clip/placeholderapi/util/Msg.java +++ b/src/main/java/me/clip/placeholderapi/util/Msg.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 @@ -20,11 +20,12 @@ */ package me.clip.placeholderapi.util; -import java.util.Arrays; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; +import java.util.Arrays; + public class Msg { public static void msg(CommandSender s, String... msg) { diff --git a/src/main/java/me/clip/placeholderapi/util/TimeFormat.java b/src/main/java/me/clip/placeholderapi/util/TimeFormat.java index aed1bef..facce5b 100644 --- a/src/main/java/me/clip/placeholderapi/util/TimeFormat.java +++ b/src/main/java/me/clip/placeholderapi/util/TimeFormat.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 diff --git a/src/main/java/me/clip/placeholderapi/util/TimeUtil.java b/src/main/java/me/clip/placeholderapi/util/TimeUtil.java index 0f32394..802055d 100644 --- a/src/main/java/me/clip/placeholderapi/util/TimeUtil.java +++ b/src/main/java/me/clip/placeholderapi/util/TimeUtil.java @@ -1,7 +1,7 @@ /* * * PlaceholderAPI - * Copyright (C) 2018 Ryan McCarthy + * Copyright (C) 2019 Ryan McCarthy * * 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 From a0ac08b838f79b5b6d7eca80eb5b0c0425f62453 Mon Sep 17 00:00:00 2001 From: extendedclip Date: Fri, 21 Jun 2019 12:36:03 -0400 Subject: [PATCH 10/17] Start at 1 --- .../clip/placeholderapi/commands/ExpansionCloudCommands.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java index b2ee528..7ae5750 100644 --- a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java +++ b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java @@ -328,7 +328,7 @@ public class ExpansionCloudCommands implements CommandExecutor { expansions.put(exp.getName(), exp); } List ce = expansions.keySet().stream().sorted().collect(Collectors.toList()); - int i = (int) ex.keySet().toArray()[0]+1; + int i = (int) ex.keySet().toArray()[0]; for (String name : ce) { if (expansions.get(name) == null) { continue; @@ -354,7 +354,7 @@ public class ExpansionCloudCommands implements CommandExecutor { expansions.put(exp.getName(), exp); } List ce = expansions.keySet().stream().sorted().collect(Collectors.toList()); - int i = 1; + int i = 0; for (String name : ce) { if (expansions.get(name) == null) { continue; From 93f586a216328a40c1b628fecf317abc147812d4 Mon Sep 17 00:00:00 2001 From: extendedclip Date: Fri, 21 Jun 2019 12:36:59 -0400 Subject: [PATCH 11/17] Update to 2.10.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 28fa30c..d8d06a6 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.clip placeholderapi - 2.10.2-DEV-${BUILD_NUMBER} + 2.10.3 PlaceholderAPI An awesome placeholder provider! http://extendedclip.com From b9881eb70bc29df1f90b69a85eb45a79f594d490 Mon Sep 17 00:00:00 2001 From: extendedclip Date: Fri, 21 Jun 2019 12:49:45 -0400 Subject: [PATCH 12/17] Fix page indexes when on pages greater than 1 --- .../me/clip/placeholderapi/commands/ExpansionCloudCommands.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java index 7ae5750..ac3b419 100644 --- a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java +++ b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java @@ -354,7 +354,7 @@ public class ExpansionCloudCommands implements CommandExecutor { expansions.put(exp.getName(), exp); } List ce = expansions.keySet().stream().sorted().collect(Collectors.toList()); - int i = 0; + int i = page > 1 ? page * 10 : 0; for (String name : ce) { if (expansions.get(name) == null) { continue; From 6286451991f54bb24036ecf530b216a91bbb6abe Mon Sep 17 00:00:00 2001 From: darbyjack Date: Tue, 25 Jun 2019 05:39:52 -0500 Subject: [PATCH 13/17] Push to 1.14.3-SNAPSHOT. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d8d06a6..38b822b 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ org.spigotmc spigot-api - 1.14.1-R0.1-SNAPSHOT + 1.14.3-SNAPSHOT provided From 454b1f19f4bef27a74424fe26b439421ce4ba8a7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 25 Jun 2019 15:01:08 -0400 Subject: [PATCH 14/17] Update README.md Updated stats --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 85660a4..b156821 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ # Information [PlaceholderAPI][spigot] is a plugin for Spigot servers that allows server owners to display information from various plugins with a uniform format. -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 100 expansions that support a wide variety of plugins, such as Essentials, Factions, LuckPerms, and Vault. +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 150+ expansions that support a wide variety of plugins, such as Essentials, Factions, LuckPerms, and Vault. -PlaceholderAPI has been downloaded over 100,000 times and has been used concurrently on over 10,000 servers, which makes it a must-have for a server of any type or scale. +PlaceholderAPI has been downloaded over 200,000 times and has been used concurrently on over 10,000 servers, which makes it a must-have for a server of any type or scale. From 16726215bb390d90289e34687cbf1b4f0743b707 Mon Sep 17 00:00:00 2001 From: darbyjack Date: Fri, 28 Jun 2019 12:13:34 -0500 Subject: [PATCH 15/17] Updated to dev, fixed spigot version. --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 38b822b..89b4660 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.clip placeholderapi - 2.10.3 + 2.10.3-DEV-${BUILD_NUMBER} PlaceholderAPI An awesome placeholder provider! http://extendedclip.com @@ -34,7 +34,7 @@ org.spigotmc spigot-api - 1.14.3-SNAPSHOT + 1.14.3-R0.1-SNAPSHOT provided From d0d0c99505b2b13d08c8c819287241ab09d60012 Mon Sep 17 00:00:00 2001 From: darbyjack Date: Fri, 28 Jun 2019 12:14:07 -0500 Subject: [PATCH 16/17] Added message saying to reload papi to enable downloaded expansion. --- .../placeholderapi/expansion/cloud/ExpansionCloudManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/me/clip/placeholderapi/expansion/cloud/ExpansionCloudManager.java b/src/main/java/me/clip/placeholderapi/expansion/cloud/ExpansionCloudManager.java index 967177d..16ec742 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/cloud/ExpansionCloudManager.java +++ b/src/main/java/me/clip/placeholderapi/expansion/cloud/ExpansionCloudManager.java @@ -309,6 +309,7 @@ public class ExpansionCloudManager { if (p != null) { Msg.msg(p, "&aExpansion &f" + ex.getName() + " &adownload complete!"); + Msg.msg(p, "&aMake sure to run &f/papi reload &ato enable it!"); } } }); From 763bb52d061ed7fd15a1146fd36e9fcfa1fd5c94 Mon Sep 17 00:00:00 2001 From: darbyjack Date: Fri, 28 Jun 2019 12:14:30 -0500 Subject: [PATCH 17/17] Changed some logic to suggest the right command. --- .../me/clip/placeholderapi/commands/ExpansionCloudCommands.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java index ac3b419..db15f49 100644 --- a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java +++ b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java @@ -383,7 +383,7 @@ public class ExpansionCloudCommands implements CommandExecutor { JSONMessage line = JSONMessage.create(msg); line.tooltip(hover); - if (expansion.shouldUpdate()) { + if (expansion.shouldUpdate() || !expansion.hasExpansion()) { line.suggestCommand("/papi ecloud download " + expansion.getName()); } else {