mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Added method to specify if the expansion should persist through papi reloads
This commit is contained in:
parent
af68dbcf8b
commit
5d6c8c19cd
@ -38,6 +38,16 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return getIdentifier();
|
return getIdentifier();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expansions that do not use the ecloud and instead register from the dependency should set this to false
|
||||||
|
* 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
|
||||||
@ -92,8 +102,6 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
|||||||
return PlaceholderAPI.registerPlaceholderHook(getIdentifier(), this);
|
return PlaceholderAPI.registerPlaceholderHook(getIdentifier(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Quick getter for the {@link PlaceholderAPIPlugin} instance
|
* Quick getter for the {@link PlaceholderAPIPlugin} instance
|
||||||
* @return {@link PlaceholderAPIPlugin} instance
|
* @return {@link PlaceholderAPIPlugin} instance
|
||||||
|
Loading…
Reference in New Issue
Block a user