More API refactoring work

This commit is contained in:
Shane Freeder
2020-01-31 01:48:19 +00:00
parent 4ee86bf6a6
commit 48e547e51f
5 changed files with 119 additions and 73 deletions

View File

@ -1,6 +1,6 @@
package com.gmail.nossr50.mcmmo.api.platform;
import com.gmail.nossr50.mcmmo.api.data.MMOPlayer;
import com.gmail.nossr50.mcmmo.api.platform.schedular.PlatformScheduler;
import com.gmail.nossr50.mcmmo.api.platform.util.MetadataStore;
import java.io.File;
@ -16,5 +16,21 @@ public interface PlatformProvider {
File getDataFolder();
void getVersion();
String getVersion();
void earlyInit();
boolean isSupported(boolean print);
default boolean isSupported() {
return isSupported(false);
};
ServerSoftwareType getServerType();
void onLoad();
void printUnsupported();
PlatformScheduler getScheduler();
}

View File

@ -0,0 +1,18 @@
package com.gmail.nossr50.mcmmo.api.platform;
public enum ServerSoftwareType {
PAPER("Paper"),
SPIGOT("Spigot"),
CRAFTBUKKIT("CraftBukkit");
private final String friendlyName;
ServerSoftwareType(String friendlyName) {
this.friendlyName = friendlyName;
}
public String getFriendlyName() {
return friendlyName;
}
}

View File

@ -0,0 +1,6 @@
package com.gmail.nossr50.mcmmo.api.platform.schedular;
public interface PlatformScheduler {
}