mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI.git
synced 2024-11-29 14:06:33 +01:00
Merge branch 'master' into master
This commit is contained in:
commit
719172c185
64
.github/CONTRIBUTING.md
vendored
Normal file
64
.github/CONTRIBUTING.md
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
[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.
|
||||
|
||||
Please note we have a code of conduct, please follow it in all your interactions with the project.
|
||||
|
||||
## Pull Request Process
|
||||
|
||||
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
|
||||
|
||||
### 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 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.
|
||||
|
||||
### 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]
|
22
.github/ISSUE_TEMPLATE/bug_report.md
vendored
22
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -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.
|
||||
|
36
.github/ISSUE_TEMPLATE/change_request.md
vendored
36
.github/ISSUE_TEMPLATE/change_request.md
vendored
@ -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)
|
||||
<!-- Please select the right one, by changing the [ ] to [x] -->
|
||||
|
||||
- [ ] Placeholder(s) changed.
|
||||
- [ ] New placeholder(s).
|
||||
- [ ] Plugin no longer supports PlaceholderAPI and/or was deleted.
|
||||
|
||||
### Plugin
|
||||
> What is the name of the plugin?
|
||||
<!-- Please type below this line -->
|
||||
|
||||
|
||||
### 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.
|
||||
<!-- Please type below this line -->
|
38
.github/ISSUE_TEMPLATE/change_request_placeholderapi.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/change_request_placeholderapi.md
vendored
Normal file
@ -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)
|
||||
<!--
|
||||
Please select the right options by replacing the [ ] with a [x]
|
||||
-->
|
||||
- [ ] 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: __________ <!-- Use this if none of the above matches your request -->
|
||||
|
||||
### Info
|
||||
> What is the change?
|
||||
> Please provide as much information (including links, images and code-snippeds) as possible.
|
||||
<!-- Please type below this line -->
|
34
.github/ISSUE_TEMPLATE/change_request_wiki.md
vendored
Normal file
34
.github/ISSUE_TEMPLATE/change_request_wiki.md
vendored
Normal file
@ -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)
|
||||
<!--
|
||||
Please select the right one, by changing the [ ] to [x]
|
||||
-->
|
||||
- [ ] 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: __________ <!-- Use this if none of the above matches your request -->
|
||||
|
||||
### 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)
|
||||
<!-- Please type below this line -->
|
35
.github/ISSUE_TEMPLATE/feature_request.md
vendored
35
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -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
|
||||
|
||||
### 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.
|
||||
|
||||
Also make sure, that your requested placeholders/plugin isn't already added in the [wiki] or listed in the [issues] page.
|
||||
|
||||
### Type
|
||||
> What kind of request is this? (Multiple selections possible)
|
||||
<!-- Select the right option by replacing [ ] with [x] -->
|
||||
<!-- For an update of an already listed plugin, use the "Request change" template -->
|
||||
|
||||
- [ ] New expansion providing placeholders.
|
||||
- [ ] New plugin providing placeholders.
|
||||
- [ ] New plugin supporting PlaceholderAPI.
|
||||
|
||||
### Plugin
|
||||
> What is the name of the plugin/expansion?
|
||||
> Provide also a link to it.
|
||||
<!-- Please type below this line -->
|
||||
|
||||
### Placeholders/others
|
||||
> What are the new placeholders/Any additional info?
|
||||
<!-- Please type below this line -->
|
20
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
20
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -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
|
||||
<!--
|
||||
Please select the right one, by changing the [ ] to [x]
|
||||
-->
|
||||
- [ ] Internal change (Doesn't affect end-user).
|
||||
- [ ] External change (Does affect end-user).
|
||||
- [ ] Other: __________ <!-- Use this if none of the above matches your request -->
|
||||
|
||||
### Description
|
||||
> Provide additional information if needed.
|
||||
<!-- Please type below this line -->
|
@ -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.
|
||||
|
||||
<!-- TODO: Add contributing section -->
|
||||
<!-- TODO: Add expansion creation section (possibly add to a wiki?) -->
|
||||
|
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
|
||||
<version>2.10.2-DEV-${BUILD_NUMBER}</version>
|
||||
<version>2.10.3-DEV-${BUILD_NUMBER}</version>
|
||||
<name>PlaceholderAPI</name>
|
||||
<description>An awesome placeholder provider!</description>
|
||||
<url>http://extendedclip.com</url>
|
||||
@ -34,7 +34,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.14.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.14.3-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -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("[%]([^%]+)[%]");
|
||||
|
@ -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...
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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 final PlaceholderAPIPlugin plugin;
|
||||
|
@ -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
|
||||
@ -337,7 +337,8 @@ public class ExpansionCloudCommands implements CommandExecutor {
|
||||
}
|
||||
|
||||
List<String> 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) {
|
||||
@ -369,7 +370,8 @@ public class ExpansionCloudCommands implements CommandExecutor {
|
||||
}
|
||||
|
||||
List<String> ce = expansions.keySet().stream().sorted().collect(Collectors.toList());
|
||||
int i = 1;
|
||||
|
||||
int i = page > 1 ? page * 10 : 0;
|
||||
|
||||
for (String name : ce) {
|
||||
if (expansions.get(name) == null) {
|
||||
@ -402,7 +404,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 {
|
||||
line.suggestCommand("/papi ecloud info " + expansion.getName());
|
||||
|
@ -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 final PlaceholderAPIPlugin plugin;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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/";
|
||||
@ -308,6 +302,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!");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -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
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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;
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user