1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-19 14:59:20 +00:00

Don't yell if Floodgate cannot remove the injection

This commit is contained in:
Camotoy
2021-06-06 20:04:35 -04:00
parent 4403868633
commit 6af0c80162
5 changed files with 22 additions and 2 deletions

View File

@@ -42,6 +42,16 @@ public interface PlatformInjector {
*/
boolean inject() throws Exception;
/**
* Some platforms may not be able to remove their injection process. If so, this method will
* return false.
*
* @return true if it is safe to attempt to remove our injection performed in {@link #inject()}.
*/
default boolean canRemoveInjection() {
return true;
}
/**
* Removes the injection from the server. Please note that this function should only be used
* internally (on plugin shutdown). This method will also remove every added addon.