mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-02-15 19:21:26 +01:00
Fix for API implementation
This commit is contained in:
parent
ba6033c5fd
commit
e599b735a8
@ -25,9 +25,9 @@ public class SkyBlockAPI {
|
|||||||
/**
|
/**
|
||||||
* @param implementation the implementation to set
|
* @param implementation the implementation to set
|
||||||
*/
|
*/
|
||||||
public static void setImplementation(SkyBlock implementation) {
|
public static void setImplementation(SkyBlock implementation) throws IllegalStateException {
|
||||||
if (SkyBlockAPI.implementation != null) {
|
if (SkyBlockAPI.implementation != null && SkyBlockAPI.implementation != implementation) {
|
||||||
throw new IllegalArgumentException("Cannot set API implementation twice");
|
throw new IllegalStateException("Cannot set API implementation twice");
|
||||||
}
|
}
|
||||||
|
|
||||||
SkyBlockAPI.implementation = implementation;
|
SkyBlockAPI.implementation = implementation;
|
||||||
|
Loading…
Reference in New Issue
Block a user