mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2026-01-17 05:48:49 +01:00
Reformatted project to conform to google style guide.
This commit is contained in:
@@ -27,24 +27,27 @@ public abstract class PlaceholderHook {
|
||||
|
||||
/**
|
||||
* called when a placeholder value is requested from this hook
|
||||
* @param p {@link OfflinePlayer} to request the placeholder value for, null if not needed for a player
|
||||
*
|
||||
* @param p {@link OfflinePlayer} to request the placeholder value for, null if not needed for a
|
||||
* player
|
||||
* @param params String passed to the hook to determine what value to return
|
||||
* @return value for the requested player and params
|
||||
*/
|
||||
public String onRequest(OfflinePlayer p, String params) {
|
||||
if (p != null && p.isOnline()) {
|
||||
return onPlaceholderRequest((Player) p, params);
|
||||
}
|
||||
return onPlaceholderRequest(null, params);
|
||||
}
|
||||
public String onRequest(OfflinePlayer p, String params) {
|
||||
if (p != null && p.isOnline()) {
|
||||
return onPlaceholderRequest((Player) p, params);
|
||||
}
|
||||
return onPlaceholderRequest(null, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* called when a placeholder is requested from this hook
|
||||
* @param p {@link Player} to request the placeholder value for, null if not needed for a player
|
||||
* @param params String passed to the hook to determine what value to return
|
||||
* @return value for the requested player and params
|
||||
*/
|
||||
public String onPlaceholderRequest(Player p, String params) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* called when a placeholder is requested from this hook
|
||||
*
|
||||
* @param p {@link Player} to request the placeholder value for, null if not needed for a player
|
||||
* @param params String passed to the hook to determine what value to return
|
||||
* @return value for the requested player and params
|
||||
*/
|
||||
public String onPlaceholderRequest(Player p, String params) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user