mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-26 03:26:48 +01:00
Merge pull request #558 from PlaceholderAPI/development
Sync Master branch with Development (Possible Release)
This commit is contained in:
commit
20b2a69b5e
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2018-2020 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:
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
@ -141,10 +141,26 @@ public final class PlaceholderAPI {
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translates all placeholders into their corresponding values.
|
||||||
|
* <br>The pattern of a valid placeholder is {@literal {<identifier>_<params>}}.
|
||||||
|
*
|
||||||
|
* @param player Player to parse the placeholders against
|
||||||
|
* @param text Text to set the placeholder values in
|
||||||
|
* @return String containing all translated placeholders
|
||||||
|
*/
|
||||||
public static String setBracketPlaceholders(Player player, String text) {
|
public static String setBracketPlaceholders(Player player, String text) {
|
||||||
return setBracketPlaceholders((OfflinePlayer) player, text);
|
return setBracketPlaceholders((OfflinePlayer) player, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translates all placeholders into their corresponding values.
|
||||||
|
* <br>The pattern of a valid placeholder is {@literal {<identifier>_<params>}}.
|
||||||
|
*
|
||||||
|
* @param player Player to parse the placeholders against
|
||||||
|
* @param text List of Strings to set the placeholder values in
|
||||||
|
* @return String containing all translated placeholders
|
||||||
|
*/
|
||||||
public static List<String> setBracketPlaceholders(Player player, List<String> text) {
|
public static List<String> setBracketPlaceholders(Player player, List<String> text) {
|
||||||
return setPlaceholders((OfflinePlayer) player, text);
|
return setPlaceholders((OfflinePlayer) player, text);
|
||||||
}
|
}
|
||||||
@ -216,7 +232,7 @@ public final class PlaceholderAPI {
|
|||||||
/**
|
/**
|
||||||
* Get all registered placeholder identifiers
|
* Get all registered placeholder identifiers
|
||||||
*
|
*
|
||||||
* @return All registered placeholder identifiers
|
* @return A Set of type String containing the identifiers of all registered expansions.
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public static Set<String> getRegisteredIdentifiers() {
|
public static Set<String> getRegisteredIdentifiers() {
|
||||||
@ -227,7 +243,7 @@ public final class PlaceholderAPI {
|
|||||||
/**
|
/**
|
||||||
* Get the normal placeholder pattern.
|
* Get the normal placeholder pattern.
|
||||||
*
|
*
|
||||||
* @return The default Placeholder Pattern
|
* @return Regex Pattern of {@literal [%]([^%]+)[%]}
|
||||||
*/
|
*/
|
||||||
public static Pattern getPlaceholderPattern() {
|
public static Pattern getPlaceholderPattern() {
|
||||||
return PLACEHOLDER_PATTERN;
|
return PLACEHOLDER_PATTERN;
|
||||||
@ -236,7 +252,7 @@ public final class PlaceholderAPI {
|
|||||||
/**
|
/**
|
||||||
* Get the bracket placeholder pattern.
|
* Get the bracket placeholder pattern.
|
||||||
*
|
*
|
||||||
* @return the Bracket Placeholder Pattern
|
* @return Regex Pattern of {@literal [{]([^{}]+)[}]}
|
||||||
*/
|
*/
|
||||||
public static Pattern getBracketPlaceholderPattern() {
|
public static Pattern getBracketPlaceholderPattern() {
|
||||||
return BRACKET_PLACEHOLDER_PATTERN;
|
return BRACKET_PLACEHOLDER_PATTERN;
|
||||||
@ -245,7 +261,7 @@ public final class PlaceholderAPI {
|
|||||||
/**
|
/**
|
||||||
* Get the relational placeholder pattern.
|
* Get the relational placeholder pattern.
|
||||||
*
|
*
|
||||||
* @return The Relational Placeholder Pattern
|
* @return Regex Pattern of {@literal [%](rel_)([^%]+)[%]}
|
||||||
*/
|
*/
|
||||||
public static Pattern getRelationalPlaceholderPattern() {
|
public static Pattern getRelationalPlaceholderPattern() {
|
||||||
return RELATIONAL_PLACEHOLDER_PATTERN;
|
return RELATIONAL_PLACEHOLDER_PATTERN;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
@ -26,6 +26,10 @@ import org.bukkit.event.Event;
|
|||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that a {@link PlaceholderExpansion} has been registered by
|
||||||
|
* PlaceholderAPI.
|
||||||
|
*/
|
||||||
public final class ExpansionRegisterEvent extends Event implements Cancellable {
|
public final class ExpansionRegisterEvent extends Event implements Cancellable {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -43,6 +47,11 @@ public final class ExpansionRegisterEvent extends Event implements Cancellable {
|
|||||||
return HANDLERS;
|
return HANDLERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The {@link PlaceholderExpansion expansion} that was registered.
|
||||||
|
*
|
||||||
|
* @return The {@link PlaceholderExpansion} instance.
|
||||||
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public PlaceholderExpansion getExpansion() {
|
public PlaceholderExpansion getExpansion() {
|
||||||
return expansion;
|
return expansion;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
@ -25,6 +25,10 @@ import org.bukkit.event.Event;
|
|||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that a {@link PlaceholderExpansion} had been unregistered by
|
||||||
|
* PlaceholderAPI.
|
||||||
|
*/
|
||||||
public final class ExpansionUnregisterEvent extends Event {
|
public final class ExpansionUnregisterEvent extends Event {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -43,6 +47,11 @@ public final class ExpansionUnregisterEvent extends Event {
|
|||||||
return HANDLERS;
|
return HANDLERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The {@link PlaceholderExpansion expansion} that was unregistered.
|
||||||
|
*
|
||||||
|
* @return The {@link PlaceholderExpansion} instance.
|
||||||
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public PlaceholderExpansion getExpansion() {
|
public PlaceholderExpansion getExpansion() {
|
||||||
return expansion;
|
return expansion;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
@ -26,7 +26,10 @@ import org.bukkit.event.HandlerList;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is called when all expansions are loaded (when reloading config, on plugin start and on server load).
|
* Indicates that <b>all</b> {@link PlaceholderExpansion PlayceholderExpansions}
|
||||||
|
* have been loaded.
|
||||||
|
* <br/>This event is fired on Server load and when reloading the
|
||||||
|
* confiuration.
|
||||||
*/
|
*/
|
||||||
public class ExpansionsLoadedEvent extends Event {
|
public class ExpansionsLoadedEvent extends Event {
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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,7 +24,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Any {@link PlaceholderExpansion} class which implements configurable will have any options listed
|
* Any {@link PlaceholderExpansion} class which implements configurable will have any options listed
|
||||||
* in the getDefaults map automatically added to the PlaceholderAPI config.yml file
|
* in the {@link #getDefaults()} map automatically added to the PlaceholderAPI config.yml file
|
||||||
*
|
*
|
||||||
* @author Ryan McCarthy
|
* @author Ryan McCarthy
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
@ -32,10 +32,17 @@ import org.jetbrains.annotations.Contract;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Any class extending this will be able to get registered as a PlaceholderExpansion.
|
||||||
|
* <br>The registration either happens automatically when the jar file containing a
|
||||||
|
* class extending this one is located under the {@code PlaceholderAPI/expansions}
|
||||||
|
* directory or when the {@link #register()} method is called by said class.
|
||||||
|
*/
|
||||||
public abstract class PlaceholderExpansion extends PlaceholderHook {
|
public abstract class PlaceholderExpansion extends PlaceholderHook {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The placeholder identifier of this expansion
|
* The placeholder identifier of this expansion. May not contain {@literal %},
|
||||||
|
* {@literal {}} or _
|
||||||
*
|
*
|
||||||
* @return placeholder identifier that is associated with this expansion
|
* @return placeholder identifier that is associated with this expansion
|
||||||
*/
|
*/
|
||||||
@ -154,17 +161,39 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
|||||||
|
|
||||||
// === Configuration ===
|
// === Configuration ===
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the ConfigurationSection of the expansion located in the config.yml of PlaceholderAPI or
|
||||||
|
* null when not specified.
|
||||||
|
* <br>You may use the {@link Configurable} interface to define default values set
|
||||||
|
*
|
||||||
|
* @return ConfigurationSection that this epxpansion has.
|
||||||
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public final ConfigurationSection getConfigSection() {
|
public final ConfigurationSection getConfigSection() {
|
||||||
return getPlaceholderAPI().getConfig().getConfigurationSection("expansions." + getIdentifier());
|
return getPlaceholderAPI().getConfig().getConfigurationSection("expansions." + getIdentifier());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the ConfigurationSection relative to the {@link #getConfigSection() default one} set
|
||||||
|
* by the expansion or null when the default ConfigurationSection is null
|
||||||
|
*
|
||||||
|
* @param path The path to get the ConfigurationSection from. This is relative to the default section
|
||||||
|
* @return ConfigurationSection relative to the default section
|
||||||
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public final ConfigurationSection getConfigSection(@NotNull final String path) {
|
public final ConfigurationSection getConfigSection(@NotNull final String path) {
|
||||||
final ConfigurationSection section = getConfigSection();
|
final ConfigurationSection section = getConfigSection();
|
||||||
return section == null ? null : section.getConfigurationSection(path);
|
return section == null ? null : section.getConfigurationSection(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Object relative to the {@link #getConfigSection() default ConfigurationSection} set
|
||||||
|
* by the expansion or the provided Default Object, when the default ConfigurationSection is null
|
||||||
|
*
|
||||||
|
* @param path The path to get the Object from. This is relative to the default section
|
||||||
|
* @param def The default Object to return when the ConfigurationSection returns null
|
||||||
|
* @return Object from the provided path or the default one provided
|
||||||
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@Contract("_, !null -> !null")
|
@Contract("_, !null -> !null")
|
||||||
public final Object get(@NotNull final String path, final Object def) {
|
public final Object get(@NotNull final String path, final Object def) {
|
||||||
@ -172,21 +201,53 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
|||||||
return section == null ? def : section.get(path, def);
|
return section == null ? def : section.get(path, def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the int relative to the {@link #getConfigSection() default ConfigurationSection} set
|
||||||
|
* by the expansion or the provided Default int, when the default ConfigurationSection is null
|
||||||
|
*
|
||||||
|
* @param path The path to get the int from. This is relative to the default section
|
||||||
|
* @param def The default int to return when the ConfigurationSection returns null
|
||||||
|
* @return int from the provided path or the default one provided
|
||||||
|
*/
|
||||||
public final int getInt(@NotNull final String path, final int def) {
|
public final int getInt(@NotNull final String path, final int def) {
|
||||||
final ConfigurationSection section = getConfigSection();
|
final ConfigurationSection section = getConfigSection();
|
||||||
return section == null ? def : section.getInt(path, def);
|
return section == null ? def : section.getInt(path, def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the long relative to the {@link #getConfigSection() default ConfigurationSection} set
|
||||||
|
* by the expansion or the provided Default long, when the default ConfigurationSection is null
|
||||||
|
*
|
||||||
|
* @param path The path to get the long from. This is relative to the default section
|
||||||
|
* @param def The default long to return when the ConfigurationSection returns null
|
||||||
|
* @return long from the provided path or the default one provided
|
||||||
|
*/
|
||||||
public final long getLong(@NotNull final String path, final long def) {
|
public final long getLong(@NotNull final String path, final long def) {
|
||||||
final ConfigurationSection section = getConfigSection();
|
final ConfigurationSection section = getConfigSection();
|
||||||
return section == null ? def : section.getLong(path, def);
|
return section == null ? def : section.getLong(path, def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the double relative to the {@link #getConfigSection() default ConfigurationSection} set
|
||||||
|
* by the expansion or the provided Default double, when the default ConfigurationSection is null
|
||||||
|
*
|
||||||
|
* @param path The path to get the double from. This is relative to the default section
|
||||||
|
* @param def The default double to return when the ConfigurationSection returns null
|
||||||
|
* @return double from the provided path or the default one provided
|
||||||
|
*/
|
||||||
public final double getDouble(@NotNull final String path, final double def) {
|
public final double getDouble(@NotNull final String path, final double def) {
|
||||||
final ConfigurationSection section = getConfigSection();
|
final ConfigurationSection section = getConfigSection();
|
||||||
return section == null ? def : section.getDouble(path, def);
|
return section == null ? def : section.getDouble(path, def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the String relative to the {@link #getConfigSection() default ConfigurationSection} set
|
||||||
|
* by the expansion or the provided Default String, when the default ConfigurationSection is null
|
||||||
|
*
|
||||||
|
* @param path The path to get the String from. This is relative to the default section
|
||||||
|
* @param def The default String to return when the ConfigurationSection returns null. Can be null
|
||||||
|
* @return String from the provided path or the default one provided
|
||||||
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@Contract("_, !null -> !null")
|
@Contract("_, !null -> !null")
|
||||||
public final String getString(@NotNull final String path, @Nullable final String def) {
|
public final String getString(@NotNull final String path, @Nullable final String def) {
|
||||||
@ -194,23 +255,58 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
|||||||
return section == null ? def : section.getString(path, def);
|
return section == null ? def : section.getString(path, def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a String List relative to the {@link #getConfigSection() default ConfigurationSection} set
|
||||||
|
* by the expansion or an empty List, when the default ConfigurationSection is null
|
||||||
|
*
|
||||||
|
* @param path The path to get the String list from. This is relative to the default section
|
||||||
|
* @return String list from the provided path or an empty list
|
||||||
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public final List<String> getStringList(@NotNull final String path) {
|
public final List<String> getStringList(@NotNull final String path) {
|
||||||
final ConfigurationSection section = getConfigSection();
|
final ConfigurationSection section = getConfigSection();
|
||||||
return section == null ? Collections.emptyList() : section.getStringList(path);
|
return section == null ? Collections.emptyList() : section.getStringList(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the boolean relative to the {@link #getConfigSection() default ConfigurationSection} set
|
||||||
|
* by the expansion or the default boolean, when the default ConfigurationSection is null
|
||||||
|
*
|
||||||
|
* @param path The path to get the boolean from. This is relative to the default section
|
||||||
|
* @param def The default boolean to return when the ConfigurationSection is null
|
||||||
|
* @return boolean from the provided path or the default one provided
|
||||||
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public final boolean getBoolean(@NotNull final String path, final boolean def) {
|
public final boolean getBoolean(@NotNull final String path, final boolean def) {
|
||||||
final ConfigurationSection section = getConfigSection();
|
final ConfigurationSection section = getConfigSection();
|
||||||
return section == null ? def : section.getBoolean(path, def);
|
return section == null ? def : section.getBoolean(path, def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the {@link #getConfigSection() default ConfigurationSection} contains the provided path
|
||||||
|
* or not. This will return {@code false} when either the default section is null, or doesn't
|
||||||
|
* contain the provided path
|
||||||
|
*
|
||||||
|
* @param path The path to check
|
||||||
|
* @return true when the default ConfigurationSection is not null and contains the path, false otherwise
|
||||||
|
*/
|
||||||
public final boolean configurationContains(@NotNull final String path) {
|
public final boolean configurationContains(@NotNull final String path) {
|
||||||
final ConfigurationSection section = getConfigSection();
|
final ConfigurationSection section = getConfigSection();
|
||||||
return section != null && section.contains(path);
|
return section != null && section.contains(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the provided Object is an instance of this PlaceholderExpansion.
|
||||||
|
* <br>This method will perform the following checks in order:
|
||||||
|
* <br><ul>
|
||||||
|
* <li>Checks if Object equals the class. Returns true when equal and continues otherwise</li>
|
||||||
|
* <li>Checks if the Object is an instance of a PlaceholderExpansion. Returns false if not</li>
|
||||||
|
* <li>Checks if the Object's Identifier, Author and version equal the one of this class</li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* @param o The Object to check
|
||||||
|
* @return true or false depending on the above mentioned checks
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(final Object o) {
|
public final boolean equals(final Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
@ -227,6 +323,11 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
|||||||
getVersion().equals(expansion.getVersion());
|
getVersion().equals(expansion.getVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a String containing the Expansion's name, author and version
|
||||||
|
*
|
||||||
|
* @return String containing name, author and version of the expansion
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final String toString() {
|
public final String toString() {
|
||||||
return String.format("PlaceholderExpansion[name: '%s', author: '%s', version: '%s']", getName(),
|
return String.format("PlaceholderExpansion[name: '%s', author: '%s', version: '%s']", getName(),
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2020 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:
|
||||||
*
|
*
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* This file is part of PlaceholderAPI
|
* This file is part of PlaceholderAPI
|
||||||
*
|
*
|
||||||
* PlaceholderAPI
|
* PlaceholderAPI
|
||||||
* Copyright (c) 2015 - 2020 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
|
||||||
|
55
wiki/FAQ.md
55
wiki/FAQ.md
@ -1,16 +1,30 @@
|
|||||||
|
[readme]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/docs/wiki/wiki/README.md
|
||||||
|
|
||||||
Here are frequently asked questions about stuff related to PlaceholderAPI.
|
Here are frequently asked questions about stuff related to PlaceholderAPI.
|
||||||
|
|
||||||
## It only shows %placeholder% and not the variable
|
## It only shows `%placeholder%` and not the variable
|
||||||
Make sure, that you've tried the following steps:
|
When a plugin or `/papi parse me %placeholder%` only returns the placeholder itself and no value should you check for the following things:
|
||||||
- PlaceholderAPI is installed and running (Shows green in `/pl` and responds to the `/papi` command)
|
|
||||||
- You downloaded the expansion with `/papi ecloud download [expansion]`
|
### The expansion is actually installed.
|
||||||
A list of available expansions and their placeholders can be found [[here|Placeholders]]!
|
In many cases is the cause that the expansion of the placeholder is missing.
|
||||||
Also note that not all placeholders are in a seperate expansion. Some are "hardcoded" into a plugin.
|
Just execute `/papi ecloud download <name of expansion>` followed by `/papi reload` to activate it. You can find a list of Expansions and their Placeholders [[on this page|Placeholders]].
|
||||||
- You reloaded PlaceholderAPI with `/papi reload` after downloading an expansion.
|
|
||||||
- Any possible dependency for the expansion (Plugin) is installed and running.
|
**NOTE!**
|
||||||
- The placeholder doesn't contain any typos.
|
Not all placeholders come in their own expansion. Some plugins *hardcode* them in and load them on startup, when hooking into PlaceholderAPI.
|
||||||
- The plugin that should use the placeholder actually supports PlaceholderAPI.
|
|
||||||
For a list of plugins supporting PlaceholderAPI go [[here|Plugins-using-PlaceholderAPI]].
|
### Plugin actualls supports PlaceholderAPI
|
||||||
|
It can happen that the plugin you use to display the placeholder in doesn't support PlaceholderAPI. In such a case check, if the parse command returns the actual value of a placeholder.
|
||||||
|
If that is the case while the plugin is still displaying the placeholder, can this be an indicator of the plugin not supporting PlaceholderAPI.
|
||||||
|
|
||||||
|
You can find a list of plugins supporting PlaceholderAPI [[here|Plugins-using-PlaceholderAPI]].
|
||||||
|
Just make sure that "Supports placeholders" has a check mark in front of it.
|
||||||
|
|
||||||
|
### No typo in the placeholder
|
||||||
|
Double-check that the placeholder you set doesn't contain a typo. You can use `/papi ecloud placeholders <expansion>` (replace `<expansion>` with the name of the expansion) to get a list of all the placeholders the expansion may have.
|
||||||
|
Keep in mind that this only works for separate expansions on the eCloud and not for those that are loaded by plugins.
|
||||||
|
|
||||||
|
### Plugin is enabled
|
||||||
|
If an expansion depends on a plugin, make sure you have the plugin installed and that it is enabled (Shows green in `/pl`).
|
||||||
|
|
||||||
## I can't download the expansion
|
## I can't download the expansion
|
||||||
Make sure, that the connection to the cloud (https://api.extendedclip.com) isn't blocked by a firewall or similar.
|
Make sure, that the connection to the cloud (https://api.extendedclip.com) isn't blocked by a firewall or similar.
|
||||||
@ -20,3 +34,22 @@ If both checks failed, go to the cloud-page and download the jar manually. Put i
|
|||||||
|
|
||||||
## How can other plugins use my placeholders with PlaceholderAPI?
|
## How can other plugins use my placeholders with PlaceholderAPI?
|
||||||
A tutorial can be found [[here|Hook into PlaceholderAPI]]!
|
A tutorial can be found [[here|Hook into PlaceholderAPI]]!
|
||||||
|
|
||||||
|
## Can I help on this wiki?
|
||||||
|
You sure can!
|
||||||
|
We welcome contributions to our wiki by everyone. If you found a typo or want to improve this wiki in another way, head over to the [Wiki's readme file][readme] to find out about how you can contribute towards this wiki.
|
||||||
|
|
||||||
|
## PlaceholderAPI is posting an error about an outdated expansion?
|
||||||
|
```
|
||||||
|
[00:00:01 ERROR]: [PlaceholderAPI] Failed to load Expansion class <expansion> (Is a dependency missing?)
|
||||||
|
[00:00:01 ERROR]: [PlaceholderAPI] Cause: NoClassDefFoundError <path>
|
||||||
|
```
|
||||||
|
|
||||||
|
If you receive the above error, try to do the following steps:
|
||||||
|
|
||||||
|
- Make sure any required dependency of the mentioned expansion (e.g. a plugin) is installed.
|
||||||
|
- Make sure you use the latest version supported for the server version you use.
|
||||||
|
- If you downloaded the jar from the ecloud, make sure it isn't malformed/corrupted.
|
||||||
|
|
||||||
|
If the issue persists after you've done those checks, report it to the author of the expansion.
|
||||||
|
In most cases is the issue that either a dependency is missing or that the expansion tries to use outdated methods from PlaceholderAPI.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://i.imgur.com/puadJ8Z.png" alt="PlaceholderAPI">
|
<img src="https://raw.githubusercontent.com/PlaceholderAPI/PlaceholderAPI/docs/wiki/wiki/img/logo.png" alt="PlaceholderAPI">
|
||||||
</p>
|
</p>
|
||||||
This wiki gives you information on how to create placeholders in your plugin that can be used in other plugins, how to use other placeholders inside your plugin, or how to make an expansion.
|
This wiki gives you information on how to create placeholders in your plugin that can be used in other plugins, how to use other placeholders inside your plugin, or how to make an expansion.
|
||||||
It also has a list with all available placeholders (Work in progress).
|
It also has a list with all available placeholders (Work in progress).
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[APIBadge]: https://img.shields.io/nexus/r/http/repo.extendedclip.com/me.clip/placeholderapi.svg?label=API-Version
|
[APIBadge]: https://img.shields.io/nexus/placeholderapi/me.clip/placeholderapi?server=https%3A%2F%2Frepo.extendedclip.com&label=API%20Version
|
||||||
|
|
||||||
[SpigotBadge]: https://img.shields.io/spiget/version/6245?label=Spigot
|
[SpigotBadge]: https://img.shields.io/spiget/version/6245?label=Spigot
|
||||||
[Spigot]: https://spigotmc.org/resources/6245
|
[Spigot]: https://spigotmc.org/resources/6245
|
||||||
@ -136,7 +136,7 @@ public class JoinExample extends JavaPlugin implements Listener {
|
|||||||
*/
|
*/
|
||||||
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);
|
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);
|
||||||
|
|
||||||
event.setJoinMessage(withPlaceholdersSet);
|
event.setJoinMessage(joinText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -69,7 +69,7 @@ public class SomeExpansion extends PlaceholderExpansion {
|
|||||||
* <br>This is what tells PlaceholderAPI to call our onRequest
|
* <br>This is what tells PlaceholderAPI to call our onRequest
|
||||||
* method to obtain a value if a placeholder starts with our
|
* method to obtain a value if a placeholder starts with our
|
||||||
* identifier.
|
* identifier.
|
||||||
* <br>This must be unique and can not contain % or _
|
* <br>The identifier has to be lowercase and can't contain _ or %
|
||||||
*
|
*
|
||||||
* @return The identifier in {@code %<identifier>_<value>%} as String.
|
* @return The identifier in {@code %<identifier>_<value>%} as String.
|
||||||
*/
|
*/
|
||||||
@ -148,7 +148,7 @@ import at.helpch.placeholderapi.example.SomePlugin;
|
|||||||
* {@code /plugins/PlaceholderAPI/expansions} on your server.
|
* {@code /plugins/PlaceholderAPI/expansions} on your server.
|
||||||
* <br>
|
* <br>
|
||||||
* <br>If you create such a class inside your own plugin, you have to
|
* <br>If you create such a class inside your own plugin, you have to
|
||||||
* register it manually in your plugins {@code onEbale()} by using
|
* register it manually in your plugins {@code onEnable()} by using
|
||||||
* {@code new YourExpansionClass().register();}
|
* {@code new YourExpansionClass().register();}
|
||||||
*/
|
*/
|
||||||
public class SomeExpansion extends PlaceholderExpansion {
|
public class SomeExpansion extends PlaceholderExpansion {
|
||||||
@ -182,7 +182,7 @@ public class SomeExpansion extends PlaceholderExpansion {
|
|||||||
* <br>This is what tells PlaceholderAPI to call our onRequest
|
* <br>This is what tells PlaceholderAPI to call our onRequest
|
||||||
* method to obtain a value if a placeholder starts with our
|
* method to obtain a value if a placeholder starts with our
|
||||||
* identifier.
|
* identifier.
|
||||||
* <br>This must be unique and can not contain % or _
|
* <br>The identifier has to be lowercase and can't contain _ or %
|
||||||
*
|
*
|
||||||
* @return The identifier in {@code %<identifier>_<value>%} as String.
|
* @return The identifier in {@code %<identifier>_<value>%} as String.
|
||||||
*/
|
*/
|
||||||
@ -329,7 +329,7 @@ public class SomeExpansion extends PlaceholderExpansion {
|
|||||||
* <br>This is what tells PlaceholderAPI to call our onRequest
|
* <br>This is what tells PlaceholderAPI to call our onRequest
|
||||||
* method to obtain a value if a placeholder starts with our
|
* method to obtain a value if a placeholder starts with our
|
||||||
* identifier.
|
* identifier.
|
||||||
* <br>This must be unique and can not contain % or _
|
* <br>The identifier has to be lowercase and can't contain _ or %
|
||||||
*
|
*
|
||||||
* @return The identifier in {@code %<identifier>_<value>%} as String.
|
* @return The identifier in {@code %<identifier>_<value>%} as String.
|
||||||
*/
|
*/
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -62,6 +62,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[ajParkour](https://www.spigotmc.org/resources/60909/)**
|
- **[ajParkour](https://www.spigotmc.org/resources/60909/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#ajparkour]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#ajparkour]]**]
|
||||||
|
- **[AlonsoLevels](https://www.spigotmc.org/resources/83380/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#alonsolevels]]**]
|
||||||
- **[AnimatedBoard](https://www.spigotmc.org/resources/13632/)**
|
- **[AnimatedBoard](https://www.spigotmc.org/resources/13632/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
@ -86,6 +89,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[AsyncKeepAlive](https://www.spigotmc.org/resources/64676/)**
|
- **[AsyncKeepAlive](https://www.spigotmc.org/resources/64676/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#asynckeepalive]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#asynckeepalive]]**]
|
||||||
|
- **[Ath](https://www.spigotmc.org/resources/87124/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#ath]]**]
|
||||||
- **[AutoCommandsPlus](https://www.spigotmc.org/resources/11083/)**
|
- **[AutoCommandsPlus](https://www.spigotmc.org/resources/11083/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
@ -116,6 +122,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[BentoBox](https://github.com/BentoBoxWorld/BentoBox)**
|
- **[BentoBox](https://github.com/BentoBoxWorld/BentoBox)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#bentobox]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#bentobox]]**]
|
||||||
|
- **[BetonQuest](https://www.spigotmc.org/resources/2117/)
|
||||||
|
- [x] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#betonquest]]**]
|
||||||
- **[Big Doors Opener](https://www.spigotmc.org/resources/80805/)**
|
- **[Big Doors Opener](https://www.spigotmc.org/resources/80805/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
@ -134,6 +143,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[BossVote](https://www.spigotmc.org/resources/16497/)**
|
- **[BossVote](https://www.spigotmc.org/resources/16497/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
|
- **[Boxing](https://www.spigotmc.org/resources/83879/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#boxing]]**]
|
||||||
- **[Broadcaster Plugin](https://dev.bukkit.org/projects/broadcaster-plugin)**
|
- **[Broadcaster Plugin](https://dev.bukkit.org/projects/broadcaster-plugin)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
@ -188,9 +200,12 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[Clans](https://www.spigotmc.org/resources/34696/)**
|
- **[Clans](https://www.spigotmc.org/resources/34696/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#clans]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#clans]]**]
|
||||||
- **[Clans](https://www.spigotmc.org/resources/78415/)**
|
- **[ClansFree](https://www.spigotmc.org/resources/78415/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#clans-1]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#clansfree]]**]
|
||||||
|
- **[ClansPro](https://www.spigotmc.org/resources/87515/)**
|
||||||
|
- [x] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#clanspro]]**]
|
||||||
- **[ClicksPerSecond](https://www.spigotmc.org/resources/57214/)**
|
- **[ClicksPerSecond](https://www.spigotmc.org/resources/57214/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
@ -259,7 +274,7 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
- **[DeluxeMenus](https://www.spigotmc.org/resources/11734/)**
|
- **[DeluxeMenus](https://www.spigotmc.org/resources/11734/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [x] Provides own placeholders. [**[[Link|Placeholder#deluxemenus]]**]
|
||||||
- **[DeluxeTags](https://www.spigotmc.org/resources/4390/)**
|
- **[DeluxeTags](https://www.spigotmc.org/resources/4390/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#deluxetags]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#deluxetags]]**]
|
||||||
@ -389,6 +404,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[HoloBlock](https://www.spigotmc.org/resources/43192/)**
|
- **[HoloBlock](https://www.spigotmc.org/resources/43192/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#holoblock]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#holoblock]]**]
|
||||||
|
- **[HoloMobHealth](https://www.spigotmc.org/resources/75975/)**
|
||||||
|
- [x] Supports placeholders.
|
||||||
|
- [ ] Provides own placeholders. [Link]
|
||||||
- **[HPWizard](https://www.spigotmc.org/resources/26821/)**
|
- **[HPWizard](https://www.spigotmc.org/resources/26821/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#hpwizard]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#hpwizard]]**]
|
||||||
@ -401,6 +419,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[InteractionVisualizer](https://www.spigotmc.org/resources/77050/)**
|
- **[InteractionVisualizer](https://www.spigotmc.org/resources/77050/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#interactionvisualizer]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#interactionvisualizer]]**]
|
||||||
|
- **[InteractiveChat](https://www.spigotmc.org/resources/75870/)**
|
||||||
|
- [x] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#interactivechat]]**]
|
||||||
- **[IslandRate (ASkyBlock Addon)](https://www.spigotmc.org/resources/53519/)**
|
- **[IslandRate (ASkyBlock Addon)](https://www.spigotmc.org/resources/53519/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#islandrate-askyblock-addon]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#islandrate-askyblock-addon]]**]
|
||||||
@ -536,6 +557,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[Nameless Plugin](https://www.spigotmc.org/resources/59032/)**
|
- **[Nameless Plugin](https://www.spigotmc.org/resources/59032/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#nameless-plugin]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#nameless-plugin]]**]
|
||||||
|
- **[NameMC-API-ServersMC](https://www.spigotmc.org/resources/88871/)**
|
||||||
|
- [x] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders##namemc-api-serversmc]]**]
|
||||||
- **[Nicknamer](https://www.spigotmc.org/resources/5341/)**
|
- **[Nicknamer](https://www.spigotmc.org/resources/5341/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#nicknamer]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#nicknamer]]**]
|
||||||
@ -606,11 +630,14 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
- **[PowerRanks](https://www.spigotmc.org/resources/64696/)**
|
- **[PowerRanks](https://www.spigotmc.org/resources/64696/)**
|
||||||
- [ ] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#powerranks]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#powerranks]]**]
|
||||||
- **[PremiumVanish](https://www.spigotmc.org/resources/14404/)**
|
- **[PremiumVanish](https://www.spigotmc.org/resources/14404/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#premiumvanish]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#premiumvanish]]**]
|
||||||
|
- **[Prison](https://www.spigotmc.org/resources/1223/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#prison]]**]
|
||||||
- **[PrisonMines](https://www.spigotmc.org/resources/4046/)**
|
- **[PrisonMines](https://www.spigotmc.org/resources/4046/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#prisonmines]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#prisonmines]]**]
|
||||||
@ -675,12 +702,18 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[RankedHelp](https://www.spigotmc.org/resources/61919/)**
|
- **[RankedHelp](https://www.spigotmc.org/resources/61919/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
|
- **[RankJoin](https://www.spigotmc.org/resources/67551/)**
|
||||||
|
- [x] Supports placeholders.
|
||||||
|
- [ ] Provides own placeholders. [Link]
|
||||||
- **[Rankup](https://www.spigotmc.org/resources/17933/)**
|
- **[Rankup](https://www.spigotmc.org/resources/17933/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#rankup]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#rankup]]**]
|
||||||
- **[RawMSG](https://www.spigotmc.org/resources/35864/)**
|
- **[RawMSG](https://www.spigotmc.org/resources/35864/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders.
|
- [ ] Provides own placeholders.
|
||||||
|
- **[RealisticWorldGenerator](https://www.spigotmc.org/resources/15905/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#realisticworldgenerator]]**]
|
||||||
- **[RecentFind (Treasures Add-on)](https://www.spigotmc.org/resources/33366/)**
|
- **[RecentFind (Treasures Add-on)](https://www.spigotmc.org/resources/33366/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#recentfind]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#recentfind]]**]
|
||||||
@ -693,6 +726,12 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[RestrictedDimensions](http://spigotmc.org/resources/80574/)**
|
- **[RestrictedDimensions](http://spigotmc.org/resources/80574/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#restricteddimensions]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#restricteddimensions]]**]
|
||||||
|
- **[RocketJoin](https://www.spigotmc.org/resources/82520/)**
|
||||||
|
- [x] Supports placeholders.
|
||||||
|
- [ ] Provides own placeholders. [Link]
|
||||||
|
- **[RocketPlaceholders](https://www.spigotmc.org/resources/82678/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#rocketplaceholders]]**]
|
||||||
- **[RogueParkour](https://www.spigotmc.org/resources/26563/)**
|
- **[RogueParkour](https://www.spigotmc.org/resources/26563/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#rogueparkour]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#rogueparkour]]**]
|
||||||
@ -720,6 +759,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[Skellett (Skript Add-on)](https://forums.skunity.com/resources/24/)**
|
- **[Skellett (Skript Add-on)](https://forums.skunity.com/resources/24/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [ ] Provides own placeholders. [Link]
|
- [ ] Provides own placeholders. [Link]
|
||||||
|
- **[Seasons](https://www.spigotmc.org/resources/39298/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#seasons]]**]
|
||||||
- **[SellAll](https://www.spigotmc.org/resources/1221/)**
|
- **[SellAll](https://www.spigotmc.org/resources/1221/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#sellall]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#sellall]]**]
|
||||||
@ -738,6 +780,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[SimpleClans](https://www.spigotmc.org/resources/5269/)**
|
- **[SimpleClans](https://www.spigotmc.org/resources/5269/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#simpleclans]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#simpleclans]]**]
|
||||||
|
- **[SimpleCoins](https://dev.bukkit.org/projects/simplecoins)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#simplecoins]]**]
|
||||||
- **[SimpleCoinsAPI](https://www.spigotmc.org/resources/1432/)**
|
- **[SimpleCoinsAPI](https://www.spigotmc.org/resources/1432/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#simplecoinsapi]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#simplecoinsapi]]**]
|
||||||
@ -753,6 +798,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[SkillAPI](https://www.spigotmc.org/resources/4824/)**
|
- **[SkillAPI](https://www.spigotmc.org/resources/4824/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#skillapi]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#skillapi]]**]
|
||||||
|
- **[SkinsRestorer](https://www.spigotmc.org/resources/2124/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#skinsrestorer]]**]
|
||||||
- **[Skript](https://github.com/bensku/Skript)**
|
- **[Skript](https://github.com/bensku/Skript)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#skript]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#skript]]**]
|
||||||
@ -789,6 +837,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[Statz](https://www.spigotmc.org/resources/25969/)**
|
- **[Statz](https://www.spigotmc.org/resources/25969/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#statz]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#statz]]**]
|
||||||
|
- **[Streaming Drops](https://www.spigotmc.org/resources/76996/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#streaming-drops]]**]
|
||||||
- **[StrikePractice 2](https://www.spigotmc.org/resources/46906/)**
|
- **[StrikePractice 2](https://www.spigotmc.org/resources/46906/)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#strikepractice-2]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#strikepractice-2]]**]
|
||||||
@ -825,9 +876,15 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[Thirst](https://www.spigotmc.org/resources/3316/)**
|
- **[Thirst](https://www.spigotmc.org/resources/3316/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#thirst]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#thirst]]**]
|
||||||
|
- **[TicketGUI](https://www.spigotmc.org/resources/68968/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#ticketgui]]**]
|
||||||
- **[Timed Rewards](https://www.spigotmc.org/resources/34008/)**
|
- **[Timed Rewards](https://www.spigotmc.org/resources/34008/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#timed-rewards]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#timed-rewards]]**]
|
||||||
|
- **[TimeManager](https://www.spigotmc.org/resources/44344/)**
|
||||||
|
- [ ] Supports placeholders.
|
||||||
|
- [x] Provides own placeholders. [**[[Link|Placeholders#timemanager]]**]
|
||||||
- **[Time Tokens](https://www.spigotmc.org/resources/75441/)**
|
- **[Time Tokens](https://www.spigotmc.org/resources/75441/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#time-tokens]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#time-tokens]]**]
|
||||||
@ -849,6 +906,9 @@ If your plugin isn't shown here and you want it to be added, [open an issue](/Pl
|
|||||||
- **[TownyChat](https://github.com/TownyAdvanced/TownyChat)**
|
- **[TownyChat](https://github.com/TownyAdvanced/TownyChat)**
|
||||||
- [x] Supports placeholders.
|
- [x] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#townychat]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#townychat]]**]
|
||||||
|
- **[TpLogin](https://www.spigotmc.org/resources/21692/)**
|
||||||
|
- [x] Supports placeholders.
|
||||||
|
- [ ] Provides own placeholders. [Link]
|
||||||
- **[TransmuteIt](https://www.spigotmc.org/resources/76287/)**
|
- **[TransmuteIt](https://www.spigotmc.org/resources/76287/)**
|
||||||
- [ ] Supports placeholders.
|
- [ ] Supports placeholders.
|
||||||
- [x] Provides own placeholders. [**[[Link|Placeholders#transmuteIt]]**]
|
- [x] Provides own placeholders. [**[[Link|Placeholders#transmuteIt]]**]
|
||||||
|
@ -13,35 +13,38 @@ The wiki is handled on a separate branch called `docs/wiki`.
|
|||||||
When making a Pull request, make sure to target this specific branch. Any PR not targeting this branch may either be closed or the target changed.
|
When making a Pull request, make sure to target this specific branch. Any PR not targeting this branch may either be closed or the target changed.
|
||||||
|
|
||||||
## Adding your resource(s)
|
## Adding your resource(s)
|
||||||
If you have one or multiple resources that support PlaceholderAPI (being it by just supporting placeholders from other plugins, or providing your own) can you add them to the wiki in the following ways.
|
When you either have a plugin, which adds and/or uses placeholders or an expansion and you want to add it to the wiki should you follow the below steps.
|
||||||
|
|
||||||
|
- [Plugins using PlaceholderAPI](#plugins-using-placeholderapi)
|
||||||
|
- [Placeholders](#placeholders)
|
||||||
|
|
||||||
### [Plugins using PlaceholderAPI]
|
### [Plugins using PlaceholderAPI]
|
||||||
You should always add your resource to this page, no matter if it only supports placeholders or also provides its own.
|
This is only required for plugins.
|
||||||
|
If your plugin supports placeholders of other plugins and/or provides own placeholders through PlaceholderAPI should you always add it the the `Plugins using PlaceholderAPI` page.
|
||||||
|
|
||||||
The format of a plugin is always as follows:
|
Each entry on this page follows a specific format that you need to follow:
|
||||||
```md
|
```markdown
|
||||||
- **[:name](:url)**
|
- **[:name](:url)**
|
||||||
- [?] Supports placeholders.
|
- [?] Supports placeholders.
|
||||||
- [?] Provides own placeholders. [:link]
|
- [?] Provides own placeholders. [:link]
|
||||||
```
|
```
|
||||||
|
|
||||||
A quick summary over the different parts:
|
| Key | Description |
|
||||||
|
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
- `:name` is the name of your resource. The resources are ordered by alphabet and if yours has the same name as another one listed, add it __below__ the other resource.
|
| `:name` | The name of the Plugin. Plugins are ordered by alphabet and if your plugin shares the same name as another one will you need to add it **below** the other resource. |
|
||||||
- `:url` should be replaced with a URL to your resource page (Spigot, dev.bukkit, etc.). If you use Spigot, make sure to remove any text after the `/resources/` and only leave the ID. For example will https://www.spigotmc.org/resources/placeholderapi.6245/ become https://www.spigotmc.org/resources/6245/.
|
| `:url` | The URL to your plugin. Spigot URLs should only contain the ID. E.g. https://www.spigotmc.org/resources/placeholderapi.6245/ becomes https://www.spigotmc.org/resources/6245/ |
|
||||||
If you don't have your resource on any resource page can you either ommit the URL (Just provide the name) or provide a link to its source, if available.
|
| `?` | Should be replaced with either an `x` or a space, depending on if the option is supported. So the result is either `[x]` or `[ ]` |
|
||||||
- `?` should be replaced with either an `x` or a space depending on wether your plugin supports the option or not. So the `[?]` becomes either `[x]` or `[ ]`
|
| `:link` | If your plugin also provides own placeholders should you add it to the [Placeholders] page. In such a case should you use `[**[[Link\|Placeholders#:name]]**]` otherwhise just `[Link]` |
|
||||||
- `:link` depends on wether your plugin provides own placeholders or not. If it doesn't, then you can just give `Link`. If it does provide placeholders, make sure to provide `[[Link|Placeholders#:name]]` where `:name` would be the name of your resource in the [Placeholders] page.
|
|
||||||
|
|
||||||
### [Placeholders]
|
### [Placeholders]
|
||||||
If your plugin provides its own placeholders through an extension is it recommendet to add this extension to the [Placeholders] page.
|
This step is required if you either have a plugin or an expansion that provides their own placeholders. You should add your resource to the Placeholders page of the wiki.
|
||||||
This page is split up into two sections: PAPI Placeholders and Plugin Placeholders.
|
This page is split up into two sections: PAPI Placeholders and Plugin Placeholders.
|
||||||
|
|
||||||
PAPI Placeholders are extensions that don't require an external plugin or other dependency to function normally. Common examples are the Player or Server extensions.
|
PAPI Placeholders are extensions that don't require an external plugin or other dependency to function normally. Common examples are the Player or Server extensions.
|
||||||
The Plugin Placeholders are extensions that require a plugin or other dependency to function. They are often used to provide values from one pluging (e.g. Vault) to another plugin through the help of PlaceholderAPI.
|
The Plugin Placeholders are extensions that require a plugin or other dependency to function. They are often used to provide values from one pluging (e.g. Vault) to another plugin through the help of PlaceholderAPI.
|
||||||
|
|
||||||
The overall structure of an entry is always the same:
|
The syntax used for each entry is the same:
|
||||||
````md
|
````markdown
|
||||||
- ### **[:name](:url)**
|
- ### **[:name](:url)**
|
||||||
> :command
|
> :command
|
||||||
|
|
||||||
@ -51,36 +54,51 @@ The overall structure of an entry is always the same:
|
|||||||
----
|
----
|
||||||
````
|
````
|
||||||
|
|
||||||
- `:name` is the name of your resource. The resources are ordered by alphabet and if yours has the same name as another one listed, add it __below__ the other resource.
|
| Key | Description |
|
||||||
- `:url` should be replaced with a URL to your resource page (Spigot, dev.bukkit, etc.). If you use Spigot, make sure to remove any text after the `/resources/` and only leave the ID. For example will https://www.spigotmc.org/resources/placeholderapi.6245/ become https://www.spigotmc.org/resources/6245/.
|
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
If you don't have your resource on any resource page can you either ommit the URL (Just provide the name) or provide a link to its source, if available.
|
| `:name` | The name of the resource. Resources are ordered by alphabet and if your plugin shares the same name as another one will you need to add it **below** the other resource. |
|
||||||
- `:command` depends on if your extension is available on the eCloud or is build into your resource. If you have it on the eCloud should you provide `/papi ecloud download :name` where `:name` is the name your expansion has on the eCloud.
|
| `:url` | The URL to your plugin. Spigot URLs should only contain the ID. E.g. https://www.spigotmc.org/resources/placeholderapi.6245/ becomes https://www.spigotmc.org/resources/6245/ |
|
||||||
If your extension is build into your resource can you just set `NO DOWNLOAD COMMAND` instead.
|
| `:command` | The download command. When your resource is an expansion on the ecloud would you need to add `/papi ecloud download :name`. If it isn't an expansion should you put `NO DOWNLOAD COMMAND` instead. |
|
||||||
- `:placeholders` would be a list of all placeholders that your extension offers (Sorted by alphabet). If your placeholders support multiple variables like item names, should you use either `<text>` or `[text]` depending on if it is required or optional.
|
| `:placeholders` | List of placeholders your plugin/expansion offers. The list should stay in alphabetical order. You can use `<>` and `[]` to indicate required and optional variables. |
|
||||||
|
|
||||||
Always keep an empty line in between the `----` and the next entry below it.
|
#### Extra notes
|
||||||
If your extension is at the very bottom of the page can you ommit the `----`.
|
|
||||||
|
|
||||||
You will also need to add your extension's name to the list at the very top in the format `- **[:name](#:name)**` where `:name` is the extension name.
|
- If your entry has another one below it will you need to add an empty line, followed by for hypthons (`----`) at the bottom of your entry to separate it.
|
||||||
|
- You are allowed to add a description between the `> :command` and the placeholder list. Keep in mind to keep an empty line after the command line to prevent wrong formatting. A description is only useful/required if your expansion/plugin offers specific placeholder values and/or features.
|
||||||
|
- Always add your entry's name to the list at the top of the page in the format `- [:name](#:name)`. Note that if your entry shares the same name as another one on the page and you added it below it, that you will need to append a `-1`, `-2`, ... to the name in the brackets, depending on how many entries with the same name there are.
|
||||||
|
|
||||||
|
----
|
||||||
## Other Wiki pages
|
## Other Wiki pages
|
||||||
Please follow these general guidelines when editing any other pages.
|
Please follow these general guidelines when editing any other pages.
|
||||||
|
|
||||||
### Linking
|
### Links
|
||||||
Linking should always be done through either the reference option or through the Wiki link option.
|
The wiki uses 3 types of links:
|
||||||
When the link leads to a page on the wiki should you use either `[[:page]]` or `[[:name|:page]]` where `:page` would be the name of the Wiki page (Case sensitive) and `:name` the text that would be displayed instead.
|
|
||||||
When linking to a section within a Wiki page should you link to it using a hashtag (`#`). For example would linking to the player extension result in `[[Placeholders#player]]` (Always have the section lowercase.
|
|
||||||
However, when you link to a section in the same wiki page should you do it in the format `[:name](#:section)` where `:name` is the text to display and `:section` is the name of the section.
|
|
||||||
|
|
||||||
|
- [Reference Links](#reference-links)
|
||||||
|
- [Wiki Links](#wiki-links)
|
||||||
|
- [Header Links](#header-links)
|
||||||
|
|
||||||
When you link to an external page that isn't part of the wiki should you do it as a reference link (Exception is the above mentioned cases for resources and extensions).
|
#### Reference Links
|
||||||
You do this by adding `[:name]: :url` at the top of the page where `:name` is the reference name to use and `:url` is the url to link to.
|
Reference Links are in the format `[:text]: :url` where `:text` is the name to use as reference and `:url` is the url.
|
||||||
|
These types of links are usually put at the top of the page and allow us easier updating of these links, by just altering the URL without the need to replace them in the entire file.
|
||||||
|
|
||||||
You can then just use either `[:name]` or `[:display_text][:name]` to link to the url you set (`:display_text` could be any text (including spaces) to display).
|
To use a reference link, either use `[:text]` or `[:displayed_text][:text]` to link with a differently shown text.
|
||||||
Reference links are case-insensitive.
|
|
||||||
|
|
||||||
This system allows us to easly maintain the links without the need to update a URL on several places within the page.
|
For example: With `[wiki]: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki` will `[wiki]` become [wiki] and `[to the wiki][wiki]` becomes [to the wiki][wiki].
|
||||||
|
|
||||||
|
Always use reference links for URLs that point outside of the Wiki. Only exceptions are Links in the [Placeholders] and [Plugins using PlaceholderAPI] page (See above for details).
|
||||||
|
|
||||||
|
#### Wiki Links
|
||||||
|
Wiki links are used to link to other pages on the wiki.
|
||||||
|
These types of links are in the format `[[:pagename]]` or `[[:text|:pagename]]` to display a different text. `:pagename` is case-sensitive.
|
||||||
|
|
||||||
|
If you want to link to a header in another wiki page can you use `[[:text|:pagename#:header]]`.
|
||||||
|
|
||||||
|
#### Header Links
|
||||||
|
Header links are used to link to a section within the same wiki page.
|
||||||
|
The format is `[:text](#:header)`. The header name is case-insensitive but it's recommended to keep it lowercase.
|
||||||
|
|
||||||
|
----
|
||||||
### Lists
|
### Lists
|
||||||
Lists should always be started with a hyphen (`-`) to better distinguish it from other formatting characters like the asterisk (`*`) used for bold or italic text.
|
Lists should always be started with a hyphen (`-`) to better distinguish it from other formatting characters like the asterisk (`*`) used for bold or italic text.
|
||||||
|
|
||||||
|
@ -1,16 +1,23 @@
|
|||||||
|
[papi]: https://placeholderapi.com
|
||||||
|
|
||||||
[discordImg]: https://img.shields.io/discord/164280494874165248.svg?logo=discord&label=Discord&colorB=7289DA
|
[discordImg]: https://img.shields.io/discord/164280494874165248.svg?logo=discord&label=Discord&colorB=7289DA
|
||||||
[discord]: https://helpch.at/discord
|
[discord]: https://helpch.at/discord
|
||||||
|
|
||||||
[jenkinsImg]: https://img.shields.io/badge/Download%20from-Jenkins-brightgreen.svg
|
[jenkinsImg]: https://img.shields.io/badge/Download%20from-Jenkins-brightgreen.svg
|
||||||
[jenkins]: http://ci.extendedclip.com/job/PlaceholderAPI/
|
[jenkins]: http://ci.extendedclip.com/job/PlaceholderAPI/
|
||||||
|
|
||||||
[licenseImg]: https://img.shields.io/github/license/PlaceholderAPI/PlaceholderAPI.svg
|
[licenseImg]: https://img.shields.io/github/license/PlaceholderAPI/PlaceholderAPI.svg
|
||||||
[license]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/LICENSE
|
[license]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/LICENSE
|
||||||
|
|
||||||
[issuesImg]: https://img.shields.io/github/issues-raw/PlaceholderAPI/PlaceholderAPI.svg?logo=github&logoColor=white
|
[issuesImg]: https://img.shields.io/github/issues-raw/PlaceholderAPI/PlaceholderAPI.svg?logo=github&logoColor=white
|
||||||
[issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues
|
[issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues
|
||||||
[versionImg]: https://img.shields.io/nexus/r/http/repo.extendedclip.com/me.clip/placeholderapi.svg?label=API-Version
|
|
||||||
|
[versionImg]: https://img.shields.io/nexus/placeholderapi/me.clip/placeholderapi?server=https%3A%2F%2Frepo.extendedclip.com&label=API%20Version
|
||||||
[plugin-page]: https://spigotmc.org/resources/6245
|
[plugin-page]: https://spigotmc.org/resources/6245
|
||||||
|
|
||||||
|
> © 2015 - 2021 [PlaceholderAPI Team][papi]
|
||||||
> Thanks for using PlaceholderAPI.
|
> Thanks for using PlaceholderAPI.
|
||||||
>
|
>
|
||||||
> **[Plugin-page]** | **[[Placeholders]]** | **[[Plugins using PlaceholderAPI]]** | **[[Hook into PlaceholderAPI]]**
|
> **[Plugin-page]** | **[[Placeholders]]** | **[[Plugins using PlaceholderAPI]]** | **[[Hook into PlaceholderAPI]]**
|
||||||
|
>
|
||||||
![versionImg] [![jenkinsImg]][jenkins] [![licenseImg]][license] [![issuesImg]][issues] [![discordImg]][discord]
|
> ![versionImg] [![jenkinsImg]][jenkins] [![licenseImg]][license] [![issuesImg]][issues] [![discordImg]][discord]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://i.imgur.com/Adp7xdh.png" alt="PlaceholderAPI">
|
<img src="https://raw.githubusercontent.com/PlaceholderAPI/PlaceholderAPI/docs/wiki/wiki/img/icon.png" alt="PlaceholderAPI">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
**[[Main page|Home]]**
|
**[[Main page|Home]]**
|
||||||
@ -49,7 +49,10 @@
|
|||||||
- [[Server|Placeholders#server]]
|
- [[Server|Placeholders#server]]
|
||||||
- [[Sound|Placeholders#sound]]
|
- [[Sound|Placeholders#sound]]
|
||||||
- [[Spectators|Placeholders#spectators]]
|
- [[Spectators|Placeholders#spectators]]
|
||||||
|
- [[SpeedPerSec|Placeholders#speedpersec]]
|
||||||
- [[Statistic|Placeholders#statistic]]
|
- [[Statistic|Placeholders#statistic]]
|
||||||
|
- [[Team|Placeholders#team]]
|
||||||
|
- [[World|Placeholders#world]]
|
||||||
|
|
||||||
- [[Plugin-placeholders|Placeholders#plugin-placeholders-1]]
|
- [[Plugin-placeholders|Placeholders#plugin-placeholders-1]]
|
||||||
- [[A|Placeholders#a]]
|
- [[A|Placeholders#a]]
|
||||||
|
BIN
wiki/img/icon.png
Normal file
BIN
wiki/img/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 96 KiB |
BIN
wiki/img/logo.png
Normal file
BIN
wiki/img/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Loading…
Reference in New Issue
Block a user