mirror of
				https://github.com/PlaceholderAPI/PlaceholderAPI
				synced 2025-10-31 06:12:28 +01:00 
			
		
		
		
	Format
This commit is contained in:
		| @@ -39,15 +39,6 @@ public abstract class PlaceholderExpansion extends PlaceholderHook { | |||||||
| 		return getIdentifier(); | 		return getIdentifier(); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * Expansions that do not use the ecloud and instead register from the dependency should set this to true |  | ||||||
| 	 * to ensure that your placeholder expansion is not unregistered when the papi reload command is used |  | ||||||
| 	 * @return if the expansion should persist through reloads |  | ||||||
| 	 */ |  | ||||||
| 	public boolean persist() { |  | ||||||
| 		return false; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Get the identifier that this placeholder expansion uses to be passed placeholder requests | 	 * Get the identifier that this placeholder expansion uses to be passed placeholder requests | ||||||
| 	 * @return placeholder identifier that is associated with this class | 	 * @return placeholder identifier that is associated with this class | ||||||
| @@ -76,6 +67,23 @@ public abstract class PlaceholderExpansion extends PlaceholderHook { | |||||||
| 	 */ | 	 */ | ||||||
| 	public abstract String getVersion(); | 	public abstract String getVersion(); | ||||||
|  |  | ||||||
|  | 	public String getDescription() { return null; } | ||||||
|  |  | ||||||
|  | 	public String getLink() { return null; } | ||||||
|  |  | ||||||
|  | 	public List<String> getPlaceholders() { | ||||||
|  | 		return null; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Expansions that do not use the ecloud and instead register from the dependency should set this to true | ||||||
|  | 	 * to ensure that your placeholder expansion is not unregistered when the papi reload command is used | ||||||
|  | 	 * @return if the expansion should persist through reloads | ||||||
|  | 	 */ | ||||||
|  | 	public boolean persist() { | ||||||
|  | 		return false; | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
| 	/** | 	/** | ||||||
| 	 * Check if a placeholder has already been registered with this identifier | 	 * Check if a placeholder has already been registered with this identifier | ||||||
| 	 * @return true if the identifier for this expansion has already been registered | 	 * @return true if the identifier for this expansion has already been registered | ||||||
| @@ -110,30 +118,6 @@ public abstract class PlaceholderExpansion extends PlaceholderHook { | |||||||
| 		return PlaceholderAPIPlugin.getInstance(); | 		return PlaceholderAPIPlugin.getInstance(); | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	/** |  | ||||||
| 	 * A short description of this expansion |  | ||||||
| 	 * @return null if no description |  | ||||||
| 	 */ |  | ||||||
| 	public String getDescription() { |  | ||||||
| 		return null; |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	/** |  | ||||||
| 	 * The url link to this expansion page |  | ||||||
| 	 * @return null if no link |  | ||||||
| 	 */ |  | ||||||
| 	public String getLink() { |  | ||||||
| 		return null; |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	/** |  | ||||||
| 	 * A list of all valid placeholders |  | ||||||
| 	 * @return null if you dont care |  | ||||||
| 	 */ |  | ||||||
| 	public List<String> getPlaceholders() { |  | ||||||
| 		return null; |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	public String getString(String path, String def) { | 	public String getString(String path, String def) { | ||||||
| 		return getPlaceholderAPI().getConfig().getString("expansions." + getIdentifier() + "." + path, def); | 		return getPlaceholderAPI().getConfig().getString("expansions." + getIdentifier() + "." + path, def); | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user