mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Sync Dev with master (#659)
* Add contributing and expansion section * Start using new Issue template system * Create bug_report.yml * Rename feature_request.md to feature_request_old.md * Create feature_request.yml * fix unique name * Update feature_request_old.md * Add Checkboxes * Add checkboxes * disable default issue body * Delete bug_report_old.md * Delete feature_request_old.md * Rename bug_report_new.yml to bug_report.yml * Check if deleting this fixed the PR... * Use description in favour of about * improve feature_request.md * Update bug_report.yml * Assign "Type: Issue (Unconfirmed)" label * Use lists and not comma-separated string * Update feature_request.yml * Use id option for error and dump fields * Add field for logs * Remove deprecated issue_body type * Update feature_request.yml * Improve description of bug_report.yml * Initial 1.17 Changes * add render * Revert build.gradle dependencies change * Fixed duplicate files Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com> Co-authored-by: darbyjack <admin@glaremasters.me>
This commit is contained in:
parent
7df3a5c6e0
commit
fa7c30df80
43
.github/ISSUE_TEMPLATE/bug_report.md
vendored
43
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,43 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Report bugs of PlaceholderAPI with this 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 consider making a Pull request towards the "wiki" folder containing your changes.
|
||||
|
||||
Please also make sure that you use the latest Spigot release or the latest developement build and that your bug isn't already reported on the issues page.
|
||||
You may get Releases from following sources:
|
||||
|
||||
- Spigot: https://www.spigotmc.org/resources/6245/
|
||||
- Jenkins: http://ci.extendedclip.com/job/PlaceholderAPI/
|
||||
|
||||
NOTE:
|
||||
PLEASE REPORT ISSUES WITH EXPANSIONS AND/OR PLACEHOLDERS TO THEIR CORRESPONDING REPOSITORY/ISSUE TRACKER.
|
||||
THIS REPOSITORY IS NOT FOR SUCH ISSUES.
|
||||
-->
|
||||
## Bug Report
|
||||
|
||||
### Issue
|
||||
<!-- What is the issue? Describe it like you would tell a friend. -->
|
||||
|
||||
|
||||
### Expected behaviour
|
||||
<!-- What should PlaceholderAPI do? -->
|
||||
|
||||
|
||||
### Actual behaviour
|
||||
<!-- What does PlaceholderAPI actually do? -->
|
||||
|
||||
|
||||
### How to reproduce
|
||||
<!-- What steps did you made, to get this bug? -->
|
||||
|
||||
1.
|
||||
|
||||
### `/papi dump` output
|
||||
<!-- Please provide the URL that was generated when using /papi dump -->
|
101
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
101
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
name: Bug Report
|
||||
description: Found a Bug about PlaceholderAPI? Use this template to report it!
|
||||
labels:
|
||||
- "Type: Issue (Unconfirmed)"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |-
|
||||
Thank you for taking your time and opening a Bug Report.
|
||||
In order for us to process this Bug Report as fast and efficient as possible do we ask you to read the form carefully and provide any requested information.
|
||||
Required fields are marked with an asterisk symbol (`*`)
|
||||
|
||||
Also, always make sure to use the latest Release from [Spigot](https://www.spigotmc.org/resources/6245/) or the latest Development Build from our [Jenkins Server](http://ci.extendedclip.com/job/PlaceholderAPI/) to make sure that your issue isn't already fixed.
|
||||
|
||||
**DO NOT REPORT ISSUES WITH EXPANSIONS AND/OR PLACEHOLDERS. USE THE APPROPRIATE ISSUE TRACKER FOR THOSE!**
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Confirmation
|
||||
description: Please make sure to have followed the following checks.
|
||||
options:
|
||||
- label: My issue isn't already found on the Issue tracker.
|
||||
required: true
|
||||
- label: My issue is about **PlaceholderAPI** and not any expansion or external plugin
|
||||
required: true
|
||||
- label: The issue isn't already fixed in a Spigot Release or Development Build.
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: "Type"
|
||||
description: |-
|
||||
What kind of Bug do you encounter?
|
||||
|
||||
- `Plugin Bug`: PlaceholderAPI doesn't startup properly.
|
||||
- `API Bug`: A method you use didn't work or has an unexpected result.
|
||||
- `Plugin/Server Incompatability`: PlaceholderAPI either doesn't support a specific Server Type/Version or has conflicts with another plugin.
|
||||
multiple: false
|
||||
options:
|
||||
- "Plugin Bug"
|
||||
- "API Bug"
|
||||
- "Plugin/Server Incompatability"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "What happens?"
|
||||
description: "What bug are you encountering? Try to explain it as detailed as possible."
|
||||
placeholder: "PlaceholderAPI does this when I do that..."
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Expected Behaviour"
|
||||
description: "What behaviour did you expect from PlaceholderAPI?"
|
||||
placeholder: "PlaceholderAPI should actually do..."
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "How to Reproduce"
|
||||
description: |-
|
||||
List the steps on how to reproduce this Bug.
|
||||
Post any Code-examples in the `Additional Information` field below when you selected `API Bug`.
|
||||
placeholder: |-
|
||||
1. Do this
|
||||
2. ...
|
||||
3. Profit!
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: "dump"
|
||||
attributes:
|
||||
label: "`/papi dump` Output"
|
||||
description: |-
|
||||
Please execute the `/papi dump` command and provide the generated URL from it.
|
||||
If you can't execute the command (i.e. PlaceholderAPI doesn't start up) can you put N/A here and mention the issue in the `Additional Information` field.
|
||||
placeholder: "https://paste.helpch.at/dump.log"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: "console"
|
||||
attributes:
|
||||
label: "Console Log"
|
||||
description: |-
|
||||
Get the latest content of your `latest.log` file an upload it to https://paste.helpch.at
|
||||
Take the generated URL and paste it into this field.
|
||||
placeholder: "https://paste.helpch.at/latest.log"
|
||||
- type: input
|
||||
id: "error"
|
||||
attributes:
|
||||
label: "Errors"
|
||||
description: |-
|
||||
Upload any errors you find to https://paste.helpch.at and post the link in the field below.
|
||||
placeholder: "https://paste.helpch.at/error.log"
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Additional Info"
|
||||
description: |-
|
||||
Add any extra info you think is nessesary for this Bug report.
|
||||
- If you selected `API Bug` will you need to include code-examples here to reproduce the issue.
|
||||
- If you selected `Plugin/Server Incompatability` should you include extra Server info such as a Timings or Spark-Report or info about the plugin in question.
|
||||
placeholder: "Put any extra info you like into this field..."
|
31
.github/ISSUE_TEMPLATE/feature_request.md
vendored
31
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,31 +0,0 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Request a update/change of the PlaceholderAPI-code
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
### Please read ###
|
||||
Before suggesting any new features, make sure that it wasn't suggested before and that no open issue with it exists already.
|
||||
|
||||
If possible would we suggest to create a Pull request instead.
|
||||
When doing so, make sure to follow our Contributing Guidelines: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/.github/CONTRIBUTING.md
|
||||
-->
|
||||
|
||||
## Feature Request
|
||||
|
||||
### Type
|
||||
<!-- What kind of request is this? (Multiple selections possible) -->
|
||||
<!-- To select an option change the [ ] to [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 -->
|
||||
|
||||
### Description
|
||||
<!-- Describe what this suggested change should do and why it would be useful -->
|
||||
<!-- When possible, add some code-examples to better illustrate the change -->
|
62
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
62
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
name: Feature Request
|
||||
description: Suggest a new Feature for PlaceholderAPI
|
||||
labels:
|
||||
- "Type: Enhancement"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |-
|
||||
Thank you for taking the time in creating this Feature Request.
|
||||
In order to process your feature request as fast and efficiently as possible do we ask you to fill out any required fields (Indicated with a red asterisk (`*`)) with the requested information.
|
||||
|
||||
If you have any further questions should you either [join our Discord Server](https://helpch.at/discord) or [ask in our Discussions](https://github.com/PlaceholderAPI/PlaceholderAPI/discussions).
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Confirmation
|
||||
description: Please make sure to have followed the following checks.
|
||||
options:
|
||||
- label: I checked the Issues and Pull request tab for any existing issues or PRs.
|
||||
required: true
|
||||
- label: My Feature Request is for **PlaceholderAPI** and not any expansion or other plugin.
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: "Type"
|
||||
description: "What type is your Suggestion? Select all that match."
|
||||
multiple: true
|
||||
options:
|
||||
- "New API feature"
|
||||
- "New config option"
|
||||
- "Minor Code improvement (Won't affect Servers)"
|
||||
- "Major Code improvement (Will affect Servers)"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Description"
|
||||
description: |-
|
||||
Give a detailed explanation about your Feature request and why it would be beneficial for PlaceholderAPI.
|
||||
Just saying "It's cool!" or "I need it" don't count as valid reasons. It needs to have a clear benefit for **other** players too.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Code Example"
|
||||
description: |-
|
||||
Do you have any Code Snippets that you want to share with us? Paste it here!
|
||||
Note that the input will automatically be rendered as Java code, so you won't need to put it into a code block yourself.
|
||||
render: java
|
||||
- type: input
|
||||
attributes:
|
||||
label: "Jar file"
|
||||
description: |-
|
||||
If you already have a PlaceholderAPI Jar with the requested changes would we love to get a download link for it.
|
||||
If you don't have a download link can you leave this field empty or provide "N/A" as a response.
|
||||
placeholder: "https://cdn.discordapp.com/..."
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Additional Information"
|
||||
description: |-
|
||||
Add any extra info you think is nessesary for this Feature request.
|
||||
- When you selected `Major Code improvement (Will affect Servers)` should you mention what will break when people update.
|
||||
placeholder: "Put any extra info you like into this field..."
|
10
README.md
10
README.md
@ -16,6 +16,9 @@
|
||||
|
||||
[APIversionImg]: https://img.shields.io/nexus/placeholderapi/me.clip/placeholderapi?server=https%3A%2F%2Frepo.extendedclip.com&label=API%20Version
|
||||
[logo]: https://i.imgur.com/Ea4PURv.png
|
||||
|
||||
[contributing]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/.github/CONTRIBUTING.md
|
||||
[placeholderexpansion]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/PlaceholderExpansion
|
||||
<!-- The stuff above isn't visible in the readme -->
|
||||
|
||||
[![logo]][spigot]
|
||||
@ -29,8 +32,11 @@ Support for specific plugins are provided either by the plugin itself or through
|
||||
|
||||
PlaceholderAPI has been downloaded over 500,000 times and has been used concurrently on over 20,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?) -->
|
||||
## Contribute
|
||||
If you would like to contribute towards PlaceholderAPI should you take a look at our [Contributing file][contributing] for the ins and outs on how you can do that and what you need to keep in mind.
|
||||
|
||||
## Create an Expansion
|
||||
If you would like to create your own Placeholder Expansion for PlaceholderAPI, take a look at our [Wiki][placeholderexpansion] which contains a detailed tutorial on how you can achieve this.
|
||||
|
||||
## Support
|
||||
- [Issue Tracker][issues]
|
||||
|
24
build.gradle
24
build.gradle
@ -3,8 +3,8 @@ import org.apache.tools.ant.filters.ReplaceTokens
|
||||
plugins {
|
||||
id "java"
|
||||
id "maven-publish"
|
||||
id "net.minecrell.licenser" version "0.4.1"
|
||||
id "com.github.johnrengelman.shadow" version "6.0.0"
|
||||
id "org.cadixdev.licenser" version "0.6.0"
|
||||
id "com.github.johnrengelman.shadow" version "7.0.0"
|
||||
}
|
||||
|
||||
group "me.clip"
|
||||
@ -20,22 +20,21 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.bstats:bstats-bukkit:1.5"
|
||||
implementation "com.google.code.gson:gson:2.8.6"
|
||||
implementation "org.bstats:bstats-bukkit:2.2.1"
|
||||
|
||||
compileOnly "org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT"
|
||||
compileOnly "org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT"
|
||||
compileOnly "org.jetbrains:annotations:19.0.0"
|
||||
|
||||
testImplementation "org.openjdk.jmh:jmh-core:1.23"
|
||||
testImplementation "org.openjdk.jmh:jmh-generator-annprocess:1.23"
|
||||
|
||||
testCompile "org.junit.jupiter:junit-jupiter-engine:5.6.2"
|
||||
testRuntime "org.junit.jupiter:junit-jupiter-engine:5.6.2"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.6.2"
|
||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.6.2"
|
||||
}
|
||||
|
||||
processResources {
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
filter ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description]
|
||||
}
|
||||
filter ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description]
|
||||
}
|
||||
|
||||
java {
|
||||
@ -83,9 +82,10 @@ test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
test.compileClasspath += configurations.compileOnly
|
||||
test.runtimeClasspath += configurations.compileOnly
|
||||
configurations {
|
||||
testImplementation {
|
||||
extendsFrom(compileOnly)
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
5
gradle/wrapper/gradle-wrapper.properties
vendored
5
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,5 @@
|
||||
#Tue Jul 14 23:27:02 AWST 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
2
gradlew
vendored
2
gradlew
vendored
@ -130,7 +130,7 @@ fi
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
|
21
gradlew.bat
vendored
21
gradlew.bat
vendored
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@ -54,7 +54,7 @@ goto fail
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
@ -64,21 +64,6 @@ echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
@ -33,6 +33,8 @@ import me.clip.placeholderapi.expansion.manager.LocalExpansionManager;
|
||||
import me.clip.placeholderapi.listeners.ServerLoadEventListener;
|
||||
import me.clip.placeholderapi.updatechecker.UpdateChecker;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.AdvancedPie;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
@ -205,14 +207,13 @@ public final class PlaceholderAPIPlugin extends JavaPlugin {
|
||||
}
|
||||
|
||||
private void setupMetrics() {
|
||||
final Metrics metrics = new Metrics(this);
|
||||
metrics.addCustomChart(new Metrics.SimplePie("using_expansion_cloud",
|
||||
final Metrics metrics = new Metrics(this, 438);
|
||||
metrics.addCustomChart(new SimplePie("using_expansion_cloud",
|
||||
() -> getPlaceholderAPIConfig().isCloudEnabled() ? "yes" : "no"));
|
||||
|
||||
metrics.addCustomChart(
|
||||
new Metrics.SimplePie("using_spigot", () -> getServerVersion().isSpigot() ? "yes" : "no"));
|
||||
metrics.addCustomChart(new SimplePie("using_spigot", () -> getServerVersion().isSpigot() ? "yes" : "no"));
|
||||
|
||||
metrics.addCustomChart(new Metrics.AdvancedPie("expansions_used", () -> {
|
||||
metrics.addCustomChart(new AdvancedPie("expansions_used", () -> {
|
||||
final Map<String, Integer> values = new HashMap<>();
|
||||
|
||||
for (final PlaceholderExpansion expansion : getLocalExpansionManager().getExpansions()) {
|
||||
|
Loading…
Reference in New Issue
Block a user