Compare commits

..

1 Commits

Author SHA1 Message Date
darbyjack
95786e32d2 Started working on Folia support 2023-03-24 13:26:56 -05:00
69 changed files with 211 additions and 343 deletions

View File

@@ -1,7 +1,7 @@
[issue]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new [issue]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new
[discord]: https://helpch.at/discord [discord]: https://helpch.at/discord
[code of conduct]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/CODE_OF_CONDUCT.md [code of conduct]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/CODE_OF_CONDUCT.md
[wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki [wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/docs/wiki/wiki
[master]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/master [master]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/master
[docs-wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/docs/wiki [docs-wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/docs/wiki
[style]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/master/config/style [style]: https://github.com/PlaceholderAPI/PlaceholderAPI/tree/master/config/style
@@ -40,8 +40,7 @@ In those cases should you report the issue to the issue tracker of the expansion
## Pull requests ## Pull requests
As an open source project are we welcoming all contributions to improve PlaceholderAPI, being it changes to its code, or contributions to its documentation such as the [Wiki] or the Javadocs. As an open source project are we welcoming all contributions to improve PlaceholderAPI, being it changes to its code, or contributions to its documentation such as the [Wiki] or the Javadocs.
> [!IMPORTANT] **When contributing, make sure to both base of and target the mentioned branch. Pull requests targeting the wrong branch may get closed without a warning.**
> When contributing, make sure to both base of and target the mentioned branch. Pull requests targeting the wrong branch may get closed without a warning.
### Code contributions ### Code contributions
> **Source and Target Branch:** [`master`][master] > **Source and Target Branch:** [`master`][master]
@@ -57,10 +56,12 @@ Javadocs changes should usually be combined with [code contributions](#code-cont
\*This branch may change in the future. \*This branch may change in the future.
### Wiki contributions ### Wiki contributions
> **Source and Target Branch:** [`wiki`][docs-wiki] > **Source and Target Branch:** [`docs/wiki`][docs-wiki]
The Wiki of PlaceholderAPI is located on its own dedicated branch, hosting all the assets and files that get used to create it through the usage of GitHub Actions and GitHub Pages. The Wiki of PlaceholderAPI has a unique quirk by having a dedicated [`wiki` folder][wiki] hosting the pages found on the actual wiki itself.
We welcome contributions that update outdated information, add new expansions/plugins supporting PlaceholderAPI or even correct spelling mistakes and typos. If you find outdated information, want to add missing expansions/plugins or just like to correct some wrong spelling should you both base of and target your contributions on the `docs/wiki` branch.
**Please only PR changes for the `wiki` folder on the `docs/wiki` branch! Pull requests not following this guidelines will be closed unnanounced.**
## Code of Conduct ## Code of Conduct
We have a [Code of Conduct] to maintain a welcoming atmosphere in this project. We have a [Code of Conduct] to maintain a welcoming atmosphere in this project.

View File

@@ -18,13 +18,13 @@ body:
label: Confirmation label: Confirmation
description: Please make sure to have followed the following checks. description: Please make sure to have followed the following checks.
options: options:
- label: "My issue isn't already found on the Issue tracker." - label: My issue isn't already found on the Issue tracker.
required: true required: true
- label: "My issue is about **PlaceholderAPI** and not any expansion or external plugin." - label: My issue is about **PlaceholderAPI** and not any expansion or external plugin
required: true required: true
- label: "The issue isn't already fixed in a Spigot Release or Development Build." - label: The issue isn't already fixed in a Spigot Release or Development Build.
required: true required: true
- label: "The [Common Issues](https://wiki.placeholderapi.com/common-issues/) page doesn't mention this issue." - label: The [Common Issues](https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Common-Issues) page doesn't mention this issue.
required: true required: true
- type: dropdown - type: dropdown
attributes: attributes:
@@ -85,8 +85,6 @@ body:
description: |- description: |-
Get the latest content of your `latest.log` file an upload it to https://paste.helpch.at 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. Take the generated URL and paste it into this field.
**Always provide the full `latest.log` and not just parts of it or just the error (if any)!**
placeholder: "https://paste.helpch.at/latest.log" placeholder: "https://paste.helpch.at/latest.log"
- type: input - type: input
id: "error" id: "error"
@@ -101,5 +99,5 @@ body:
description: |- description: |-
Add any extra info you think is nessesary for this Bug report. 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 `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 Spark-Report or info about the plugin in question. - 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..." placeholder: "Put any extra info you like into this field..."

View File

@@ -25,4 +25,4 @@ Closes N/A <!-- If your PR is based on an issue, change "N/A" the the issue ID (
<!-- DO NOT ALTER ANYTHING BELOW THIS LINE! --> <!-- DO NOT ALTER ANYTHING BELOW THIS LINE! -->
[Wiki]: https://wiki.placeholderapi.com [Wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki

View File

@@ -1,8 +1,8 @@
comment: comment:
footer: "\ footer: "\
----\n\n ----\n\n
> [!NOTE]\n > **Note**\n
> *This is an automated response created by a **GitHub Action***<br> > *This is an automated response created by a **GitHub Action***\n
> *Mentioning the bot won't have any effect!* > *Mentioning the bot won't have any effect!*
" "

View File

@@ -7,20 +7,18 @@
[discord]: https://helpch.at/discord [discord]: https://helpch.at/discord
[spigot]: https://www.spigotmc.org/resources/6245/ [spigot]: https://www.spigotmc.org/resources/6245/
[hangar]: https://hangar.papermc.io/HelpChat/PlaceholderAPI [Expansions cloud]: https://api.extendedclip.com/home
[bbb]: https://builtbybit.com/resources/placeholderapi.24306
[Expansions cloud]: https://api.placeholderapi.net/home
[placeholder list]: https://helpch.at/placeholders [placeholder list]: https://helpch.at/placeholders
[statistics]: https://bstats.org/plugin/bukkit/PlaceholderAPI [statistics]: https://bstats.org/plugin/bukkit/PlaceholderAPI
[ci]: http://ci.extendedclip.com/job/PlaceholderAPI/ [ci]: http://ci.extendedclip.com/job/PlaceholderAPI/
[ciImg]: http://ci.extendedclip.com/buildStatus/icon?job=PlaceholderAPI [ciImg]: http://ci.extendedclip.com/buildStatus/icon?job=PlaceholderAPI
[APIversionImg]: https://repo.extendedclip.com/api/badge/latest/releases/me/clip/placeholderapi?name=API%20Version [APIversionImg]: https://img.shields.io/nexus/placeholderapi/me.clip/placeholderapi?server=https%3A%2F%2Frepo.extendedclip.com&label=API%20Version
[logo]: https://wiki.placeholderapi.com/assets/img/papi-logo.png [logo]: https://raw.githubusercontent.com/PlaceholderAPI/PlaceholderAPI/wiki/img/papi-logo.png
[contributing]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/.github/CONTRIBUTING.md [contributing]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/.github/CONTRIBUTING.md
[placeholderexpansion]: https://wiki.placeholderapi.com/developers/creating-a-placeholderexpansion/ [placeholderexpansion]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/PlaceholderExpansion
<!-- The stuff above isn't visible in the readme --> <!-- The stuff above isn't visible in the readme -->
[![logo]][spigot] [![logo]][spigot]
@@ -32,7 +30,7 @@
Support for specific plugins are provided either by the plugin itself or through expansions. The expansions may be downloaded in-game through the PAPI Expansion Cloud. There are currently over 240+ expansions that support a wide variety of plugins, such as Essentials, Factions, LuckPerms, and Vault. Support for specific plugins are provided either by the plugin itself or through expansions. The expansions may be downloaded in-game through the PAPI Expansion Cloud. There are currently over 240+ expansions that support a wide variety of plugins, such as Essentials, Factions, LuckPerms, and Vault.
PlaceholderAPI has been downloaded over 1,700,000 times on Spigot and has been used concurrently on over 45,000 servers, which makes it a must-have for a server of any type or scale. PlaceholderAPI has been downloaded over 1,000,000 times and has been used concurrently on over 40,000 servers, which makes it a must-have for a server of any type or scale.
## Contribute ## 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. 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.
@@ -49,6 +47,4 @@ If you would like to create your own Placeholder Expansion for PlaceholderAPI, t
- [Expansions Cloud] - [Expansions Cloud]
- [Placeholder List] - [Placeholder List]
- [Spigot Page][spigot] - [Spigot Page][spigot]
- [Hangar Page][hangar]
- [BuiltByBit Page][bbb]
- [Plugin Statistics][statistics] - [Plugin Statistics][statistics]

View File

@@ -4,11 +4,11 @@ plugins {
`java-library` `java-library`
`maven-publish` `maven-publish`
id("com.github.hierynomus.license") version "0.16.1" id("com.github.hierynomus.license") version "0.16.1"
id("io.github.goooler.shadow") version "8.1.7" id("com.github.johnrengelman.shadow") version "8.1.0"
} }
group = "me.clip" group = "me.clip"
version = "2.11.7-DEV-${System.getProperty("BUILD_NUMBER")}" version = "2.11.4-DEV-${System.getProperty("BUILD_NUMBER")}"
description = "An awesome placeholder provider!" description = "An awesome placeholder provider!"
@@ -24,9 +24,9 @@ repositories {
dependencies { dependencies {
implementation("org.bstats:bstats-bukkit:3.0.1") implementation("org.bstats:bstats-bukkit:3.0.1")
implementation("net.kyori:adventure-platform-bukkit:4.3.3") implementation("net.kyori:adventure-platform-bukkit:4.3.0")
compileOnly("org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT") compileOnlyApi("dev.folia:folia-api:1.19.4-R0.1-SNAPSHOT") // this is temp
compileOnlyApi("org.jetbrains:annotations:23.0.0") compileOnlyApi("org.jetbrains:annotations:23.0.0")
testImplementation("org.openjdk.jmh:jmh-core:1.32") testImplementation("org.openjdk.jmh:jmh-core:1.32")
@@ -38,8 +38,8 @@ dependencies {
java { java {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_17 // this is temp
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_17 // this is temp
withJavadocJar() withJavadocJar()
withSourcesJar() withSourcesJar()
@@ -54,7 +54,7 @@ license {
encoding = "UTF-8" encoding = "UTF-8"
ext { ext {
set("year", 2024) set("year", 2021)
} }
} }
@@ -71,7 +71,6 @@ tasks {
withType<JavaCompile> { withType<JavaCompile> {
options.encoding = "UTF-8" options.encoding = "UTF-8"
options.release = 8
} }
withType<Javadoc> { withType<Javadoc> {
@@ -89,8 +88,6 @@ tasks {
relocate("org.bstats", "me.clip.placeholderapi.metrics") relocate("org.bstats", "me.clip.placeholderapi.metrics")
relocate("net.kyori", "me.clip.placeholderapi.libs.kyori") relocate("net.kyori", "me.clip.placeholderapi.libs.kyori")
exclude("META-INF/versions/**")
} }
test { test {

View File

@@ -1,4 +1,4 @@
Copyright (c) 2018-2024 Peter Blood Copyright (c) 2018-2021 Peter Blood
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Binary file not shown.

View File

@@ -1,6 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

28
gradlew vendored
View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015-2021 the original authors. # Copyright <EFBFBD> 2015-2021 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script # Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features: # requires all of these POSIX shell features:
# * functions; # * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», # * expansions <EFBFBD>$var<EFBFBD>, <EFBFBD>${var}<EFBFBD>, <EFBFBD>${var:-default}<EFBFBD>, <EFBFBD>${var+SET}<EFBFBD>,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»; # <EFBFBD>${var#prefix}<EFBFBD>, <EFBFBD>${var%suffix}<EFBFBD>, and <EFBFBD>$( cmd )<EFBFBD>;
# * compound commands having a testable exit status, especially «case»; # * compound commands having a testable exit status, especially <EFBFBD>case<EFBFBD>;
# * various built-in commands including «command», «set», and «ulimit». # * various built-in commands including <EFBFBD>command<EFBFBD>, <EFBFBD>set<EFBFBD>, and <EFBFBD>ulimit<EFBFBD>.
# #
# Important for patching: # Important for patching:
# #
@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,11 +80,11 @@ do
esac esac
done done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,16 +143,12 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #( case $MAX_FD in #(
max*) max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) || MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit" warn "Could not query maximum file descriptor limit"
esac esac
case $MAX_FD in #( case $MAX_FD in #(
'' | soft) :;; #( '' | soft) :;; #(
*) *)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" || ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD" warn "Could not set maximum file descriptor limit to $MAX_FD"
esac esac
@@ -209,12 +205,6 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \ org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args. # Use "xargs" to parse quoted args.
# #
# With -n1 it outputs one arg per line, with the quotes and backslashes removed. # With -n1 it outputs one arg per line, with the quotes and backslashes removed.

11
gradlew.bat vendored
View File

@@ -26,7 +26,6 @@ if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%" == "" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -41,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if "%ERRORLEVEL%" == "0" goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -76,15 +75,13 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd if "%ERRORLEVEL%"=="0" goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL% if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
if %EXIT_CODE% equ 0 set EXIT_CODE=1 exit /b 1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -136,8 +136,8 @@ public final class PlaceholderAPI {
* @return String containing all translated placeholders * @return String containing all translated placeholders
*/ */
@NotNull @NotNull
public static List<@NotNull String> setBracketPlaceholders(final OfflinePlayer player, public static List<String> setBracketPlaceholders(final OfflinePlayer player,
@NotNull final List<@NotNull String> text) { @NotNull final List<String> text) {
return text.stream().map(line -> setBracketPlaceholders(player, line)) return text.stream().map(line -> setBracketPlaceholders(player, line))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
@@ -150,8 +150,7 @@ public final class PlaceholderAPI {
* @param text Text to set the placeholder values in * @param text Text to set the placeholder values in
* @return String containing all translated placeholders * @return String containing all translated placeholders
*/ */
@NotNull public static String setBracketPlaceholders(Player player, String text) {
public static String setBracketPlaceholders(Player player, @NotNull String text) {
return setBracketPlaceholders((OfflinePlayer) player, text); return setBracketPlaceholders((OfflinePlayer) player, text);
} }
@@ -163,8 +162,7 @@ public final class PlaceholderAPI {
* @param text List of Strings to set the placeholder values in * @param text List of Strings to set the placeholder values in
* @return String containing all translated placeholders * @return String containing all translated placeholders
*/ */
@NotNull public static List<String> setBracketPlaceholders(Player player, List<String> text) {
public static List<String> setBracketPlaceholders(Player player, @NotNull List<String> text) {
return setBracketPlaceholders((OfflinePlayer) player, text); return setBracketPlaceholders((OfflinePlayer) player, text);
} }

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -21,7 +21,6 @@
package me.clip.placeholderapi; package me.clip.placeholderapi;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import me.clip.placeholderapi.commands.PlaceholderCommandRouter; import me.clip.placeholderapi.commands.PlaceholderCommandRouter;
@@ -56,17 +55,7 @@ public final class PlaceholderAPIPlugin extends JavaPlugin {
private static PlaceholderAPIPlugin instance; private static PlaceholderAPIPlugin instance;
static { static {
String version = Bukkit.getServer().getBukkitVersion().split("-")[0]; final String version = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
String suffix;
if (version.chars()
.filter(c -> c == '.')
.count() == 1) {
suffix = "R1";
version = 'v' + version.replace('.', '_') + '_' + suffix;
} else {
int minor = Integer.parseInt(version.split("\\.")[2].charAt(0) + "");
version = 'v' + version.replace('.', '_').replace("_" + minor, "") + '_' + "R" + (minor - 1);
}
boolean isSpigot; boolean isSpigot;
try { try {
@@ -138,7 +127,6 @@ public final class PlaceholderAPIPlugin extends JavaPlugin {
} }
} }
@Deprecated
public static Version getServerVersion() { public static Version getServerVersion() {
return VERSION; return VERSION;
} }
@@ -174,7 +162,7 @@ public final class PlaceholderAPIPlugin extends JavaPlugin {
HandlerList.unregisterAll(this); HandlerList.unregisterAll(this);
Bukkit.getScheduler().cancelTasks(this); Bukkit.getAsyncScheduler().cancelTasks(this); // this is hopefully temp
adventure.close(); adventure.close();
adventure = null; adventure = null;

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ public abstract class PlaceholderHook {
@Nullable @Nullable
public String onRequest(final OfflinePlayer player, @NotNull final String params) { public String onRequest(final OfflinePlayer player, @NotNull final String params) {
if (player != null && player.isOnline()) { if (player != null && player.isOnline()) {
return onPlaceholderRequest(player.getPlayer(), params); return onPlaceholderRequest((Player) player, params);
} }
return onPlaceholderRequest(null, params); return onPlaceholderRequest(null, params);

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,6 @@
package me.clip.placeholderapi.commands.impl.cloud; package me.clip.placeholderapi.commands.impl.cloud;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Stream; import java.util.stream.Stream;
@@ -38,16 +37,6 @@ public final class CommandECloudDownload extends PlaceholderCommand {
super("download"); super("download");
} }
private boolean isBlockedExpansion(String name) {
String env = System.getenv("PAPI_BLOCKED_EXPANSIONS");
if (env == null) {
return false;
}
return Arrays.stream(env.split(","))
.anyMatch(s -> s.equalsIgnoreCase(name));
}
@Override @Override
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin, public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias, @NotNull final CommandSender sender, @NotNull final String alias,
@@ -58,12 +47,6 @@ public final class CommandECloudDownload extends PlaceholderCommand {
return; return;
} }
if (isBlockedExpansion(params.get(0))) {
Msg.msg(sender,
"&cThis expansion can't be downloaded.");
return;
}
final CloudExpansion expansion = plugin.getCloudExpansionManager() final CloudExpansion expansion = plugin.getCloudExpansionManager()
.findCloudExpansionByName(params.get(0)).orElse(null); .findCloudExpansionByName(params.get(0)).orElse(null);
if (expansion == null) { if (expansion == null) {
@@ -72,11 +55,6 @@ public final class CommandECloudDownload extends PlaceholderCommand {
return; return;
} }
if (!expansion.isVerified()) {
Msg.msg(sender, "&cThe expansion '&f" + params.get(0) + "&c' is not verified and can only be downloaded manually from &fhttps://placeholderapi.com/ecloud");
return;
}
final CloudExpansion.Version version; final CloudExpansion.Version version;
if (params.size() < 2) { if (params.size() < 2) {
version = expansion.getVersion(expansion.getLatestVersion()); version = expansion.getVersion(expansion.getLatestVersion());
@@ -108,7 +86,9 @@ public final class CommandECloudDownload extends PlaceholderCommand {
.getVersion() + "] &ato file: &f" + file.getName(), .getVersion() + "] &ato file: &f" + file.getName(),
"&aMake sure to type &f/papi reload &ato enable your new expansion!"); "&aMake sure to type &f/papi reload &ato enable your new expansion!");
plugin.getCloudExpansionManager().load(); plugin.getCloudExpansionManager().clean();
plugin.getCloudExpansionManager()
.fetch(plugin.getPlaceholderAPIConfig().cloudAllowUnverifiedExpansions());
}); });
} }

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -38,7 +38,9 @@ public final class CommandECloudRefresh extends PlaceholderCommand {
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin, public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
@NotNull final CommandSender sender, @NotNull final String alias, @NotNull final CommandSender sender, @NotNull final String alias,
@NotNull @Unmodifiable final List<String> params) { @NotNull @Unmodifiable final List<String> params) {
plugin.getCloudExpansionManager().load(); plugin.getCloudExpansionManager().clean();
plugin.getCloudExpansionManager()
.fetch(plugin.getPlaceholderAPIConfig().cloudAllowUnverifiedExpansions());
Msg.msg(sender, Msg.msg(sender,
"&aThe eCloud manager has been refreshed!"); "&aThe eCloud manager has been refreshed!");

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -200,9 +200,7 @@ public final class CommandDump extends PlaceholderCommand {
for (final Plugin other : plugins) { for (final Plugin other : plugins) {
builder.append(" ") builder.append(" ")
.append(String.format("%-" + size + "s", other.getName())) .append(String.format("%-" + size + "s", other.getName()))
.append(" [Authors: [") .append(" [Version: ")
.append(String.join(", ", other.getDescription().getAuthors()))
.append("], Version: ")
.append(other.getDescription().getVersion()) .append(other.getDescription().getVersion())
.append("]") .append("]")
.append("\n"); .append("\n");

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -54,7 +54,7 @@ public final class CommandExpansionRegister extends PlaceholderCommand {
final LocalExpansionManager manager = plugin.getLocalExpansionManager(); final LocalExpansionManager manager = plugin.getLocalExpansionManager();
final File file = new File(manager.getExpansionsFolder(), params.get(0)); final File file = new File(manager.getExpansionsFolder(), params.get(0));
if (!file.exists() || !file.getParentFile().equals(manager.getExpansionsFolder())) { if (!file.exists()) {
Msg.msg(sender, Msg.msg(sender,
"&cThe file &f" + file.getName() + "&c doesn't exist!"); "&cThe file &f" + file.getName() + "&c doesn't exist!");
return; return;

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -87,8 +87,7 @@ public final class CommandParse extends PlaceholderCommand {
final boolean command) { final boolean command) {
if (params.size() < 2) { if (params.size() < 2) {
Msg.msg(sender, Msg.msg(sender,
"&cYou must provide a target and message: &b/papi " "&cYou must supply a target, and a message: &b/papi " + (broadcast ? "bcparse" : "parse")
+ (command ? "cmdparse" : (broadcast ? "bcparse" : "parse"))
+ " &7{target} &a{message}"); + " &7{target} &a{message}");
return; return;
} }
@@ -133,49 +132,24 @@ public final class CommandParse extends PlaceholderCommand {
@NotNull @Unmodifiable final List<String> params) { @NotNull @Unmodifiable final List<String> params) {
if (params.size() < 3) { if (params.size() < 3) {
Msg.msg(sender, Msg.msg(sender,
"&cYou must supply two targets, and a message: &b/papi parserel &7{target one} " "&cYou must supply two targets, and a message: &b/papi parserel &7{target one} {target two} &a{message}");
+ "{target two} &a{message}");
return; return;
} }
OfflinePlayer playerOne; final OfflinePlayer targetOne = resolvePlayer(params.get(0));
if (targetOne == null || !targetOne.isOnline()) {
if ("me".equalsIgnoreCase(params.get(0))) {
if (!(sender instanceof Player)) {
Msg.msg(sender, "&cYou must be a player to use &7me&c as a target!");
return;
}
playerOne = ((Player) sender);
} else {
playerOne = resolvePlayer(params.get(0));
}
if (playerOne == null || !playerOne.isOnline()) {
Msg.msg(sender, "&cFailed to find player: &f" + params.get(0)); Msg.msg(sender, "&cFailed to find player: &f" + params.get(0));
return; return;
} }
OfflinePlayer playerTwo; final OfflinePlayer targetTwo = resolvePlayer(params.get(1));
if (targetTwo == null || !targetTwo.isOnline()) {
if ("me".equalsIgnoreCase(params.get(1))) {
if (!(sender instanceof Player)) {
Msg.msg(sender, "&cYou must be a player to use &7me&c as a target!");
return;
}
playerTwo = ((Player) sender);
} else {
playerTwo = resolvePlayer(params.get(1));
}
if (playerTwo == null || !playerTwo.isOnline()) {
Msg.msg(sender, "&cFailed to find player: &f" + params.get(1)); Msg.msg(sender, "&cFailed to find player: &f" + params.get(1));
return; return;
} }
final String message = PlaceholderAPI final String message = PlaceholderAPI
.setRelationalPlaceholders((Player) playerOne, (Player) playerTwo, .setRelationalPlaceholders(((Player) targetOne), ((Player) targetTwo),
String.join(" ", params.subList(2, params.size()))); String.join(" ", params.subList(2, params.size())));
sender.sendMessage(message); sender.sendMessage(message);

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -38,6 +38,10 @@ public final class PlaceholderAPIConfig {
return plugin.getConfig().getBoolean("check_updates"); return plugin.getConfig().getBoolean("check_updates");
} }
public boolean cloudAllowUnverifiedExpansions() {
return plugin.getConfig().getBoolean("cloud_allow_unverified_expansions");
}
public boolean isCloudEnabled() { public boolean isCloudEnabled() {
return plugin.getConfig().getBoolean("cloud_enabled"); return plugin.getConfig().getBoolean("cloud_enabled");

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -46,12 +46,7 @@ public enum NMSVersion {
SPIGOT_1_18_R1("v1_18_R1"), SPIGOT_1_18_R1("v1_18_R1"),
SPIGOT_1_19_R1("v1_19_R1"), SPIGOT_1_19_R1("v1_19_R1"),
SPIGOT_1_19_R2("v1_19_R2"), SPIGOT_1_19_R2("v1_19_R2"),
SPIGOT_1_19_R3("v1_19_R3"), SPIGOT_1_19_R3("v1_19_R3");
SPIGOT_1_20_R1("v1_20_R1"),
SPIGOT_1_20_R2("v1_20_R2"),
SPIGOT_1_20_R3("v1_20_R3"),
SPIGOT_1_20_R4("v1_20_R4"),
SPIGOT_1_21_R1("v1_21_R1");
private final String version; private final String version;

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -40,14 +40,6 @@ import org.jetbrains.annotations.Nullable;
*/ */
public abstract class PlaceholderExpansion extends PlaceholderHook { public abstract class PlaceholderExpansion extends PlaceholderHook {
/**
* The type is {@link Type#INTERNAL} by default.
* For external expansions, the type is updated on {@link me.clip.placeholderapi.expansion.manager.LocalExpansionManager#register(Class) register}.
* @since 2.11.4
*/
@ApiStatus.Internal
protected Type expansionType = Type.INTERNAL;
/** /**
* The placeholder identifier of this expansion. May not contain {@literal %}, * The placeholder identifier of this expansion. May not contain {@literal %},
* {@literal {}} or _ * {@literal {}} or _
@@ -167,27 +159,6 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
return PlaceholderAPIPlugin.getInstance(); return PlaceholderAPIPlugin.getInstance();
} }
/**
* Get the type of the expansion
*
* @return the type of the expansion
* @since 2.11.4
*/
@ApiStatus.Internal
public Type getExpansionType() {
return expansionType;
}
/**
* Set the type of the expansion
* @param expansionType the new type
* @since 2.11.4
*/
@ApiStatus.Internal
public void setExpansionType(Type expansionType) {
this.expansionType = expansionType;
}
// === Configuration === // === Configuration ===
/** /**
@@ -195,7 +166,7 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
* null when not specified. * null when not specified.
* <br>You may use the {@link Configurable} interface to define default values set * <br>You may use the {@link Configurable} interface to define default values set
* *
* @return ConfigurationSection that this expansion has. * @return ConfigurationSection that this epxpansion has.
*/ */
@Nullable @Nullable
public final ConfigurationSection getConfigSection() { public final ConfigurationSection getConfigSection() {
@@ -423,8 +394,8 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
*/ */
@Override @Override
public final String toString() { public final String toString() {
return String.format("PlaceholderExpansion[name: '%s', author: '%s', version: '%s', type: '%s']", getName(), return String.format("PlaceholderExpansion[name: '%s', author: '%s', version: '%s']", getName(),
getAuthor(), getVersion(), getExpansionType()); getAuthor(), getVersion());
} }
// === Deprecated API === // === Deprecated API ===
@@ -461,19 +432,4 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
public String getLink() { public String getLink() {
return null; return null;
} }
public enum Type {
/**
* An expansion provided by a plugin is considered internal
*/
INTERNAL,
/**
* An expansion loaded from the expansions folder is considered external
*/
EXTERNAL
}
} }

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,6 @@
package me.clip.placeholderapi.expansion; package me.clip.placeholderapi.expansion;
@Deprecated
public final class Version { public final class Version {
private final boolean isSpigot; private final boolean isSpigot;

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -27,10 +27,7 @@ package me.clip.placeholderapi.expansion;
* with that version. * with that version.
* *
* @author Ryan McCarthy * @author Ryan McCarthy
*
* @deprecated Will be removed in a future release.
*/ */
@Deprecated
public interface VersionSpecific { public interface VersionSpecific {
/** /**

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ import org.jetbrains.annotations.Unmodifiable;
public final class CloudExpansionManager { public final class CloudExpansionManager {
@NotNull @NotNull
private static final String API_URL = "http://api.placeholderapi.net/v2/"; private static final String API_URL = "http://api.extendedclip.com/v2/";
@NotNull @NotNull
private static final Gson GSON = new Gson(); private static final Gson GSON = new Gson();
@@ -100,7 +100,7 @@ public final class CloudExpansionManager {
public void load() { public void load() {
clean(); clean();
fetch(); fetch(plugin.getPlaceholderAPIConfig().cloudAllowUnverifiedExpansions());
} }
public void kill() { public void kill() {
@@ -170,7 +170,7 @@ public final class CloudExpansionManager {
await.clear(); await.clear();
} }
public void fetch() { public void fetch(final boolean allowUnverified) {
plugin.getLogger().info("Fetching available expansion information..."); plugin.getLogger().info("Fetching available expansion information...");
ASYNC_EXECUTOR.submit( ASYNC_EXECUTOR.submit(
@@ -190,6 +190,9 @@ public final class CloudExpansionManager {
|| expansion.getVersion(expansion.getLatestVersion()) == null) { || expansion.getVersion(expansion.getLatestVersion()) == null) {
toRemove.add(entry.getKey()); toRemove.add(entry.getKey());
} }
if (!allowUnverified && !expansion.isVerified()) {
toRemove.add(entry.getKey());
}
} }
for (String name : toRemove) { for (String name : toRemove) {
@@ -200,13 +203,7 @@ public final class CloudExpansionManager {
plugin.getLogger().log(Level.WARNING, "Failed to download expansion information", e); plugin.getLogger().log(Level.WARNING, "Failed to download expansion information", e);
} }
// loop through what's left on the main thread //todo: Figure out why this was being scheduled back on the main thread
plugin
.getServer()
.getScheduler()
.runTask(
plugin,
() -> {
try { try {
for (Map.Entry<String, CloudExpansion> entry : values.entrySet()) { for (Map.Entry<String, CloudExpansion> entry : values.entrySet()) {
String name = entry.getKey(); String name = entry.getKey();
@@ -234,7 +231,6 @@ public final class CloudExpansionManager {
.log(Level.WARNING, "Failed to download expansion information", e); .log(Level.WARNING, "Failed to download expansion information", e);
} }
}); });
});
} }
public boolean isDownloading(@NotNull final CloudExpansion expansion) { public boolean isDownloading(@NotNull final CloudExpansion expansion) {

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -188,8 +188,6 @@ public final class LocalExpansionManager implements Listener {
} }
} }
expansion.setExpansionType(PlaceholderExpansion.Type.EXTERNAL);
if (!expansion.register()) { if (!expansion.register()) {
Msg.warn("Cannot load expansion %s due to an unknown issue.", expansion.getIdentifier()); Msg.warn("Cannot load expansion %s due to an unknown issue.", expansion.getIdentifier());
return Optional.empty(); return Optional.empty();
@@ -211,11 +209,6 @@ public final class LocalExpansionManager implements Listener {
return Optional.empty(); return Optional.empty();
} }
/**
* Attempt to register a {@link PlaceholderExpansion}
* @param expansion the expansion to register
* @return if the expansion was registered
*/
@ApiStatus.Internal @ApiStatus.Internal
public boolean register(@NotNull final PlaceholderExpansion expansion) { public boolean register(@NotNull final PlaceholderExpansion expansion) {
final String identifier = expansion.getIdentifier().toLowerCase(Locale.ROOT); final String identifier = expansion.getIdentifier().toLowerCase(Locale.ROOT);
@@ -224,9 +217,9 @@ public final class LocalExpansionManager implements Listener {
return false; return false;
} }
// Avoid loading two external expansions with the same identifier if (expansions.containsKey(identifier)) {
if (expansion.getExpansionType() == PlaceholderExpansion.Type.EXTERNAL && expansions.containsKey(identifier)) { Msg.warn("Failed to load expansion %s. Identifier is already in use.",
Msg.warn("Failed to load external expansion %s. Identifier is already in use.", expansion.getIdentifier()); expansion.getIdentifier());
return false; return false;
} }
@@ -276,12 +269,13 @@ public final class LocalExpansionManager implements Listener {
return false; return false;
} }
final ExpansionRegisterEvent event = new ExpansionRegisterEvent(expansion); // this is temp
Bukkit.getPluginManager().callEvent(event); // final ExpansionRegisterEvent event = new ExpansionRegisterEvent(expansion);
// Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) { //
return false; // if (event.isCancelled()) {
} // return false;
// }
expansionsLock.lock(); expansionsLock.lock();
try { try {
@@ -294,24 +288,21 @@ public final class LocalExpansionManager implements Listener {
Bukkit.getPluginManager().registerEvents(((Listener) expansion), plugin); Bukkit.getPluginManager().registerEvents(((Listener) expansion), plugin);
} }
Msg.info( Msg.info("Successfully registered expansion: %s [%s]", expansion.getIdentifier(),
"Successfully registered %s expansion: %s [%s]", expansion.getVersion());
expansion.getExpansionType().name().toLowerCase(),
expansion.getIdentifier(),
expansion.getVersion()
);
if (expansion instanceof Taskable) { if (expansion instanceof Taskable) {
((Taskable) expansion).start(); ((Taskable) expansion).start();
} }
// Check eCloud for updates only if the expansion is external if (plugin.getPlaceholderAPIConfig().isCloudEnabled()) {
if (plugin.getPlaceholderAPIConfig().isCloudEnabled() && expansion.getExpansionType() == PlaceholderExpansion.Type.EXTERNAL) { final Optional<CloudExpansion> cloudExpansionOptional =
final Optional<CloudExpansion> cloudExpansionOptional = plugin.getCloudExpansionManager().findCloudExpansionByName(identifier); plugin.getCloudExpansionManager().findCloudExpansionByName(identifier);
if (cloudExpansionOptional.isPresent()) { if (cloudExpansionOptional.isPresent()) {
CloudExpansion cloudExpansion = cloudExpansionOptional.get(); CloudExpansion cloudExpansion = cloudExpansionOptional.get();
cloudExpansion.setHasExpansion(true); cloudExpansion.setHasExpansion(true);
cloudExpansion.setShouldUpdate(!cloudExpansion.getLatestVersion().equals(expansion.getVersion())); cloudExpansion.setShouldUpdate(
!cloudExpansion.getLatestVersion().equals(expansion.getVersion()));
} }
} }

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@ import java.io.BufferedReader;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.URL; import java.net.URL;
import java.util.Arrays; import java.util.Arrays;
import java.util.concurrent.CompletableFuture;
import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.HttpsURLConnection;
import me.clip.placeholderapi.PlaceholderAPIPlugin; import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.util.Msg; import me.clip.placeholderapi.util.Msg;
@@ -54,8 +55,10 @@ public class UpdateChecker implements Listener {
return spigotVersion; return spigotVersion;
} }
//todo: Figure out a better approach for this?
public void fetch() { public void fetch() {
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> { CompletableFuture<Boolean> update = new CompletableFuture<>();
CompletableFuture.supplyAsync(() -> {
try { try {
HttpsURLConnection con = (HttpsURLConnection) new URL( HttpsURLConnection con = (HttpsURLConnection) new URL(
"https://api.spigotmc.org/legacy/update.php?resource=" + RESOURCE_ID).openConnection(); "https://api.spigotmc.org/legacy/update.php?resource=" + RESOURCE_ID).openConnection();
@@ -63,26 +66,32 @@ public class UpdateChecker implements Listener {
spigotVersion = new BufferedReader(new InputStreamReader(con.getInputStream())).readLine(); spigotVersion = new BufferedReader(new InputStreamReader(con.getInputStream())).readLine();
} catch (Exception ex) { } catch (Exception ex) {
plugin.getLogger().info("Failed to check for updates on spigot."); plugin.getLogger().info("Failed to check for updates on spigot.");
return; return false;
} }
if (spigotVersion == null || spigotVersion.isEmpty()) { if (spigotVersion == null || spigotVersion.isEmpty()) {
return; plugin.getLogger().info("Failed to check for updates on spigot.");
return false;
} }
updateAvailable = spigotIsNewer(); updateAvailable = spigotIsNewer();
if (!updateAvailable) { if (!updateAvailable) {
return; plugin.getLogger().info("PlaceholderAPI is up to date.");
return false;
} }
Bukkit.getScheduler().runTask(plugin, () -> { return true;
});
update.whenComplete((result, error) -> {
if (result) {
plugin.getLogger() plugin.getLogger()
.info("An update for PlaceholderAPI (v" + getSpigotVersion() + ") is available at:"); .info("An update for PlaceholderAPI (v" + getSpigotVersion() + ") is available at:");
plugin.getLogger() plugin.getLogger()
.info("https://www.spigotmc.org/resources/placeholderapi." + RESOURCE_ID + "/"); .info("https://www.spigotmc.org/resources/placeholderapi." + RESOURCE_ID + "/");
Bukkit.getPluginManager().registerEvents(this, plugin); Bukkit.getPluginManager().registerEvents(UpdateChecker.this, plugin);
}); }
}); });
} }

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -40,11 +40,7 @@ public final class Futures {
@NotNull final CompletableFuture<T> future, @NotNull final CompletableFuture<T> future,
@NotNull final BiConsumer<T, Throwable> consumer) { @NotNull final BiConsumer<T, Throwable> consumer) {
future.whenComplete((value, exception) -> { future.whenComplete((value, exception) -> {
if (Bukkit.isPrimaryThread()) {
consumer.accept(value, exception); consumer.accept(value, exception);
} else {
Bukkit.getScheduler().runTask(plugin, () -> consumer.accept(value, exception));
}
}); });
} }

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -1,16 +1,17 @@
# PlaceholderAPI # PlaceholderAPI
# Version: ${version} # Version: @version@
# Created by: extended_clip # Created by: extended_clip
# Contributors: https://github.com/PlaceholderAPI/PlaceholderAPI/graphs/contributors # Contributors: https://github.com/PlaceholderAPI/PlaceholderAPI/graphs/contributors
# Issues: https://github.com/PlaceholderAPI/PlaceholderAPI/issues # Issues: https://github.com/PlaceholderAPI/PlaceholderAPI/issues
# Expansions: https://placeholderapi.com/ecloud # Expansions: https://api.extendedclip.com/all/
# Wiki: https://wiki.placeholderapi.com/ # Wiki: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki
# Discord: https://helpch.at/discord # Discord: https://helpch.at/discord
# No placeholders are provided with this plugin by default. # No placeholders are provided with this plugin by default.
# Download placeholders: /papi ecloud # Download placeholders: /papi ecloud
check_updates: true check_updates: true
cloud_enabled: true cloud_enabled: true
cloud_sorting: "name" cloud_sorting: "name"
cloud_allow_unverified_expansions: false
boolean: boolean:
'true': 'yes' 'true': 'yes'
'false': 'no' 'false': 'no'

View File

@@ -4,6 +4,8 @@ main: "me.clip.placeholderapi.PlaceholderAPIPlugin"
version: ${version} version: ${version}
author: HelpChat author: HelpChat
folia-supported: true
api-version: "1.13" api-version: "1.13"
description: "An awesome placeholder provider!" description: "An awesome placeholder provider!"
@@ -37,6 +39,7 @@ permissions:
placeholderapi.ecloud.info: true placeholderapi.ecloud.info: true
placeholderapi.ecloud.list: true placeholderapi.ecloud.list: true
placeholderapi.ecloud.clear: true placeholderapi.ecloud.clear: true
placeholderapi.ecloud.toggle: true
placeholderapi.ecloud.status: true placeholderapi.ecloud.status: true
placeholderapi.ecloud.update: true placeholderapi.ecloud.update: true
placeholderapi.ecloud.refresh: true placeholderapi.ecloud.refresh: true
@@ -81,6 +84,9 @@ permissions:
placeholderapi.ecloud.clear: placeholderapi.ecloud.clear:
default: "op" default: "op"
description: "Allows you to clear the local eCloud expansion cache" description: "Allows you to clear the local eCloud expansion cache"
placeholderapi.ecloud.toggle:
default: "op"
description: "Allows you to toggle/enable/disable the eCloud manager"
placeholderapi.ecloud.status: placeholderapi.ecloud.status:
default: "op" default: "op"
description: "Allows you to view the status of eCloud expansions" description: "Allows you to view the status of eCloud expansions"

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* This file is part of PlaceholderAPI * This file is part of PlaceholderAPI
* *
* PlaceholderAPI * PlaceholderAPI
* Copyright (c) 2015 - 2024 PlaceholderAPI Team * Copyright (c) 2015 - 2021 PlaceholderAPI Team
* *
* PlaceholderAPI free software: you can redistribute it and/or modify * PlaceholderAPI free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by