mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-02-15 11:11:29 +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
|
||||
*/
|
||||
public static void setImplementation(SkyBlock implementation) {
|
||||
if (SkyBlockAPI.implementation != null) {
|
||||
throw new IllegalArgumentException("Cannot set API implementation twice");
|
||||
public static void setImplementation(SkyBlock implementation) throws IllegalStateException {
|
||||
if (SkyBlockAPI.implementation != null && SkyBlockAPI.implementation != implementation) {
|
||||
throw new IllegalStateException("Cannot set API implementation twice");
|
||||
}
|
||||
|
||||
SkyBlockAPI.implementation = implementation;
|
||||
|
Loading…
Reference in New Issue
Block a user