mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-09-06 05:17:05 +02:00
Compare commits
1 Commits
2.11.1
...
deprecated
Author | SHA1 | Date | |
---|---|---|---|
|
79940ff164 |
@@ -8,7 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
group "me.clip"
|
||||
version "2.11.1"
|
||||
version "2.10.10-DEV-${System.getProperty("BUILD_NUMBER")}"
|
||||
|
||||
description "An awesome placeholder provider!"
|
||||
|
||||
@@ -32,7 +32,7 @@ dependencies {
|
||||
testImplementation "org.openjdk.jmh:jmh-core:1.32"
|
||||
testImplementation "org.openjdk.jmh:jmh-generator-annprocess:1.32"
|
||||
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.8.2"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.8.1"
|
||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.8.1"
|
||||
}
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -22,22 +22,18 @@ package me.clip.placeholderapi;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import me.clip.placeholderapi.expansion.Relational;
|
||||
import me.clip.placeholderapi.expansion.manager.LocalExpansionManager;
|
||||
import me.clip.placeholderapi.replacer.CharsReplacer;
|
||||
import me.clip.placeholderapi.replacer.Replacer;
|
||||
import me.clip.placeholderapi.replacer.Replacer.Closure;
|
||||
import me.clip.placeholderapi.util.Msg;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class PlaceholderAPI {
|
||||
@@ -81,7 +77,7 @@ public final class PlaceholderAPI {
|
||||
*/
|
||||
@NotNull
|
||||
public static List<String> setPlaceholders(final OfflinePlayer player,
|
||||
@NotNull final List<String> text) {
|
||||
@NotNull final List<@NotNull String> text) {
|
||||
return text.stream().map(line -> setPlaceholders(player, line)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -136,7 +132,7 @@ public final class PlaceholderAPI {
|
||||
*/
|
||||
@NotNull
|
||||
public static List<String> setBracketPlaceholders(final OfflinePlayer player,
|
||||
@NotNull final List<String> text) {
|
||||
@NotNull final List<@NotNull String> text) {
|
||||
return text.stream().map(line -> setBracketPlaceholders(player, line))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
@@ -288,335 +284,4 @@ public final class PlaceholderAPI {
|
||||
public static boolean containsBracketPlaceholders(String text) {
|
||||
return text != null && BRACKET_PLACEHOLDER_PATTERN.matcher(text).find();
|
||||
}
|
||||
|
||||
// === Deprecated API ===
|
||||
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static boolean registerExpansion(PlaceholderExpansion expansion)
|
||||
{
|
||||
return expansion.register();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static boolean unregisterExpansion(PlaceholderExpansion expansion)
|
||||
{
|
||||
return expansion.unregister();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get map of registered placeholders
|
||||
*
|
||||
* @deprecated Use {@link LocalExpansionManager#getExpansions()} instead.
|
||||
*
|
||||
* @return Map of registered placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static Map<String, PlaceholderHook> getPlaceholders() {
|
||||
return PlaceholderAPIPlugin.getInstance().getLocalExpansionManager()
|
||||
.getExpansions().stream()
|
||||
.collect(Collectors.toMap(PlaceholderExpansion::getIdentifier, ex -> ex));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Please use {@link PlaceholderExpansion} to
|
||||
* register placeholders instead
|
||||
*
|
||||
* @param plugin The Plugin to register with this {@link PlaceholderHook}
|
||||
* @param placeholderHook The {@link PlaceholderHook} to register
|
||||
* @return always false
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static boolean registerPlaceholderHook(Plugin plugin, PlaceholderHook placeholderHook) {
|
||||
PlaceholderAPIPlugin.getInstance().getLogger().warning(plugin.getName()
|
||||
+ " is attempting to register placeholders via a PlaceholderHook class which is no longer supported!"
|
||||
+ " Please reach out to " + plugin.getDescription().getAuthors().toString()
|
||||
+ " and let them know that they need to update ASAP!");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Please use {@link PlaceholderExpansion} to
|
||||
* register placeholders instead
|
||||
*
|
||||
* @param identifier The identifier to use for the {@link PlaceholderHook}
|
||||
* @param placeholderHook The {@link PlaceholderHook} to register
|
||||
* @return always false
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static boolean registerPlaceholderHook(String identifier,
|
||||
PlaceholderHook placeholderHook) {
|
||||
PlaceholderAPIPlugin.getInstance().getLogger().warning(identifier
|
||||
+ " is attempting to register placeholders via a PlaceholderHook class which is no longer supported!");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Please use {@link PlaceholderExpansion} to
|
||||
* unregister placeholders instead
|
||||
*
|
||||
* @param plugin The plugin to unregister
|
||||
* @return always false
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static boolean unregisterPlaceholderHook(Plugin plugin) {
|
||||
PlaceholderAPIPlugin.getInstance().getLogger().warning(plugin.getName()
|
||||
+ " is attempting to unregister placeholders via the PlaceholderAPI class which is no longer supported!"
|
||||
+ " Please reach out to " + plugin.getDescription().getAuthors().toString()
|
||||
+ " and let them know that they need to update ASAP!");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Please use {@link PlaceholderExpansion} to
|
||||
* unregister placeholders instead
|
||||
*
|
||||
* @param identifier The identifier to unregister
|
||||
* @return always false
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static boolean unregisterPlaceholderHook(String identifier) {
|
||||
PlaceholderAPIPlugin.getInstance().getLogger().warning(identifier
|
||||
+ " is attempting to unregister placeholders through the PlaceholderAPI class which is no longer supported!");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Will be removed in a future release.
|
||||
*
|
||||
* @return Set of registered identifiers
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static Set<String> getRegisteredPlaceholderPlugins() {
|
||||
return getRegisteredIdentifiers();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Will be removed in a future release.
|
||||
*
|
||||
* @return always null
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static Set<String> getExternalPlaceholderPlugins() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Please use {@link #setPlaceholders(OfflinePlayer, String)} instead
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The text to parse
|
||||
* @param pattern The Pattern to use
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static String setPlaceholders(OfflinePlayer player,
|
||||
String text, Pattern pattern, boolean colorize) {
|
||||
return setPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Please use {@link #setPlaceholders(OfflinePlayer, List)} instead
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The List of text to parse
|
||||
* @param pattern The Pattern to use
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static List<String> setPlaceholders(OfflinePlayer player,
|
||||
List<String> text, Pattern pattern, boolean colorize) {
|
||||
return setPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The List of text to parse
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static List<String> setPlaceholders(OfflinePlayer player, List<String> text,
|
||||
boolean colorize) {
|
||||
return setPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The List of text to parse
|
||||
* @param pattern The Pattern to use
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static List<String> setPlaceholders(OfflinePlayer player, List<String> text,
|
||||
Pattern pattern) {
|
||||
return setPlaceholders(player, text);
|
||||
}
|
||||
/**
|
||||
* @deprecated Will be removed in a future release.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The text to parse
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static String setPlaceholders(Player player, String text, boolean colorize) {
|
||||
return setPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Will be removed in a future release.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The List of text to parse
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static List<String> setPlaceholders(Player player, List<String> text, boolean colorize) {
|
||||
return setPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The text to parse
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static String setPlaceholders(OfflinePlayer player, String text, boolean colorize) {
|
||||
return setPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The text to parse
|
||||
* @param pattern The Pattern to use
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static String setPlaceholders(OfflinePlayer player, String text, Pattern pattern) {
|
||||
return setPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, List)} instead.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The List of text to parse
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static List<String> setBracketPlaceholders(OfflinePlayer player, List<String> text,
|
||||
boolean colorize) {
|
||||
return setBracketPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The text to parse
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static String setBracketPlaceholders(OfflinePlayer player, String text, boolean colorize) {
|
||||
return setBracketPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Will be removed in a future release.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The text to parse
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static String setBracketPlaceholders(Player player, String text, boolean colorize) {
|
||||
return setBracketPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Will be removed in a future release.
|
||||
*
|
||||
* @param player The offline player to parse the placeholders against
|
||||
* @param text The List of text to parse
|
||||
* @param colorize If PlaceholderAPI should also parse color codes
|
||||
* @return String with the parsed placeholders
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static List<String> setBracketPlaceholders(Player player, List<String> text,
|
||||
boolean colorize) {
|
||||
return setBracketPlaceholders(player, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* set relational placeholders in the text specified placeholders are matched with the pattern
|
||||
* {@literal %<rel_(identifier)_(params)>%} when set with this method
|
||||
*
|
||||
* @param one Player to compare
|
||||
* @param two Player to compare
|
||||
* @param text Text to parse the placeholders in
|
||||
* @param colorize If color codes ({@literal &[0-1a-fk-o]}) should be translated
|
||||
* @return The text containing the parsed relational placeholders
|
||||
* @deprecated Use {@link #setPlaceholders(OfflinePlayer, String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static String setRelationalPlaceholders(Player one, Player two, String text,
|
||||
boolean colorize) {
|
||||
return setRelationalPlaceholders(one, two, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate placeholders in the provided list based on the relation of the two provided players.
|
||||
* <br>The pattern of a valid placeholder is {@literal %rel_<identifier>_<params>%}.
|
||||
*
|
||||
* @param one First player to compare
|
||||
* @param two Second player to compare
|
||||
* @param text Text to parse the placeholders in
|
||||
* @param colorize If color codes ({@literal &[0-1a-fk-o]}) should be translated
|
||||
* @return The text containing the parsed relational placeholders
|
||||
* @deprecated Use {@link #setRelationalPlaceholders(Player, Player, List)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public static List<String> setRelationalPlaceholders(Player one, Player two, List<String> text,
|
||||
boolean colorize) {
|
||||
return setRelationalPlaceholders(one, two, text);
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -33,6 +33,7 @@ import me.clip.placeholderapi.expansion.manager.LocalExpansionManager;
|
||||
import me.clip.placeholderapi.listeners.ServerLoadEventListener;
|
||||
import me.clip.placeholderapi.updatechecker.UpdateChecker;
|
||||
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
|
||||
import net.kyori.adventure.text.serializer.craftbukkit.MinecraftComponentSerializer;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.AdvancedPie;
|
||||
import org.bstats.charts.SimplePie;
|
||||
@@ -248,7 +249,7 @@ public final class PlaceholderAPIPlugin extends JavaPlugin {
|
||||
try {
|
||||
Class.forName("org.bukkit.event.server.ServerLoadEvent");
|
||||
new ServerLoadEventListener(this);
|
||||
} catch (final ClassNotFoundException ignored) {
|
||||
} catch (final ExceptionInInitializerError | ClassNotFoundException ignored) {
|
||||
Bukkit.getScheduler()
|
||||
.runTaskLater(this, () -> getLocalExpansionManager().load(Bukkit.getConsoleSender()), 1);
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -26,6 +26,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class PlaceholderHook {
|
||||
|
||||
@Nullable
|
||||
public String onRequest(final OfflinePlayer player, @NotNull final String params) {
|
||||
if (player != null && player.isOnline()) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -31,7 +31,15 @@ import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
import me.clip.placeholderapi.commands.impl.cloud.CommandECloud;
|
||||
import me.clip.placeholderapi.commands.impl.local.*;
|
||||
import me.clip.placeholderapi.commands.impl.local.CommandDump;
|
||||
import me.clip.placeholderapi.commands.impl.local.CommandExpansionRegister;
|
||||
import me.clip.placeholderapi.commands.impl.local.CommandExpansionUnregister;
|
||||
import me.clip.placeholderapi.commands.impl.local.CommandHelp;
|
||||
import me.clip.placeholderapi.commands.impl.local.CommandInfo;
|
||||
import me.clip.placeholderapi.commands.impl.local.CommandList;
|
||||
import me.clip.placeholderapi.commands.impl.local.CommandParse;
|
||||
import me.clip.placeholderapi.commands.impl.local.CommandReload;
|
||||
import me.clip.placeholderapi.commands.impl.local.CommandVersion;
|
||||
import me.clip.placeholderapi.util.Msg;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -27,7 +27,6 @@ import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
import me.clip.placeholderapi.PlaceholderHook;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -82,7 +81,7 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
||||
*/
|
||||
@Nullable
|
||||
public String getRequiredPlugin() {
|
||||
return getPlugin();
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -397,39 +396,4 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
||||
return String.format("PlaceholderExpansion[name: '%s', author: '%s', version: '%s']", getName(),
|
||||
getAuthor(), getVersion());
|
||||
}
|
||||
|
||||
// === Deprecated API ===
|
||||
|
||||
/**
|
||||
* @deprecated As of versions greater than 2.8.7, use {@link #getRequiredPlugin()}
|
||||
*
|
||||
* @return The plugin name.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public String getPlugin() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of versions greater than 2.8.7, use the expansion cloud to show a description
|
||||
*
|
||||
* @return The description of the expansion.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public String getDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of versions greater than 2.8.7, use the expansion cloud to display a link
|
||||
*
|
||||
* @return The link for the expansion.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.13.0")
|
||||
public String getLink() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -171,7 +171,7 @@ public class CloudExpansion {
|
||||
this.versions = versions;
|
||||
}
|
||||
|
||||
public static class Version {
|
||||
public class Version {
|
||||
|
||||
private String url, version, release_notes;
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -1,23 +1,3 @@
|
||||
/*
|
||||
* This file is part of PlaceholderAPI
|
||||
*
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlaceholderAPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.clip.placeholderapi.expansion.manager;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -39,6 +39,16 @@ public final class ServerLoadEventListener implements Listener {
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be called when the server is first loaded
|
||||
* <p>
|
||||
* The goal of the method is to register all the expansions as soon as possible especially before
|
||||
* players can join
|
||||
* <p>
|
||||
* This will ensure no issues with expansions and hooks.
|
||||
*
|
||||
* @param event the server load event
|
||||
*/
|
||||
@EventHandler
|
||||
public void onServerLoad(@NotNull final ServerLoadEvent event) {
|
||||
HandlerList.unregisterAll(this);
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -126,8 +126,7 @@ public final class CharsReplacer implements Replacer {
|
||||
}
|
||||
}
|
||||
|
||||
final String identifierString = identifier.toString();
|
||||
final String lowercaseIdentifierString = identifierString.toLowerCase();
|
||||
final String identifierString = identifier.toString().toLowerCase();
|
||||
final String parametersString = parameters.toString();
|
||||
|
||||
identifier.setLength(0);
|
||||
@@ -146,9 +145,9 @@ public final class CharsReplacer implements Replacer {
|
||||
continue;
|
||||
}
|
||||
|
||||
final PlaceholderExpansion placeholder = lookup.apply(lowercaseIdentifierString);
|
||||
final PlaceholderExpansion placeholder = lookup.apply(identifierString);
|
||||
if (placeholder == null) {
|
||||
builder.append(closure.head).append(lowercaseIdentifierString);
|
||||
builder.append(closure.head).append(identifierString);
|
||||
|
||||
if (identified) {
|
||||
builder.append('_');
|
||||
@@ -160,7 +159,7 @@ public final class CharsReplacer implements Replacer {
|
||||
|
||||
final String replacement = placeholder.onRequest(player, parametersString);
|
||||
if (replacement == null) {
|
||||
builder.append(closure.head).append(lowercaseIdentifierString);
|
||||
builder.append(closure.head).append(identifierString);
|
||||
|
||||
if (identified) {
|
||||
builder.append('_');
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
@@ -50,7 +50,7 @@ public final class Format {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String buildFormat(@NotNull final Align align, final int[] spacing) {
|
||||
private static String buildFormat(@NotNull final Align align, @NotNull final int[] spacing) {
|
||||
return stream(spacing)
|
||||
.mapToObj(space -> "%" + (align == Align.LEFT ? "-" : "") + (space + 2) + "s")
|
||||
.collect(joining());
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* PlaceholderAPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
Reference in New Issue
Block a user