mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-29 04:04:43 +02:00
It compiles
running is a different matter, however...
This commit is contained in:
@ -5,4 +5,5 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
api("org.jetbrains:annotations:17.0.0")
|
||||
api("co.aikar:acf-core:0.5.0-SNAPSHOT") //Don't change without updating the artifacts for its dependencies (see the other comments)
|
||||
}
|
@ -1,12 +1,18 @@
|
||||
package com.gmail.nossr50.mcmmo.api.platform;
|
||||
|
||||
import com.gmail.nossr50.mcmmo.api.data.MMOEntity;
|
||||
import com.gmail.nossr50.mcmmo.api.platform.scheduler.PlatformScheduler;
|
||||
import com.gmail.nossr50.mcmmo.api.platform.util.MetadataStore;
|
||||
import com.gmail.nossr50.mcmmo.api.platform.util.MobHealthBarManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import co.aikar.commands.CommandIssuer;
|
||||
import co.aikar.commands.CommandManager;
|
||||
import co.aikar.commands.CommandOperationContext;
|
||||
|
||||
public interface PlatformProvider {
|
||||
|
||||
Logger getLogger();
|
||||
@ -38,4 +44,19 @@ public interface PlatformProvider {
|
||||
void checkMetrics();
|
||||
|
||||
MobHealthBarManager getHealthBarManager();
|
||||
|
||||
@Deprecated
|
||||
void registerCustomRecipes();
|
||||
|
||||
CommandManager getCommandManager();
|
||||
|
||||
|
||||
|
||||
// EVIL - EVILNESS FROM BEYOND THIS POINT - EVIL
|
||||
// THOU HAST BEEN WARNED
|
||||
@Deprecated
|
||||
MMOEntity<?> getEntity(UUID uniqueId);
|
||||
|
||||
@Deprecated
|
||||
Object getChimaeraWing();
|
||||
}
|
||||
|
@ -9,9 +9,9 @@ public interface PlatformScheduler {
|
||||
Task scheduleTask(TaskBuilder taskBuilder);
|
||||
|
||||
|
||||
class TaskBuilder {
|
||||
Integer delay;
|
||||
Integer repeatTime;
|
||||
abstract class TaskBuilder {
|
||||
Long delay;
|
||||
Long repeatTime;
|
||||
|
||||
public boolean isAsync() {
|
||||
return isAsync;
|
||||
@ -25,20 +25,20 @@ public interface PlatformScheduler {
|
||||
boolean isAsync = false;
|
||||
Consumer<Task> task;
|
||||
|
||||
public Integer getDelay() {
|
||||
public Long getDelay() {
|
||||
return delay;
|
||||
}
|
||||
|
||||
public TaskBuilder setDelay(Integer delay) {
|
||||
public TaskBuilder setDelay(Long delay) {
|
||||
this.delay = delay;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getRepeatTime() {
|
||||
public Long getRepeatTime() {
|
||||
return repeatTime;
|
||||
}
|
||||
|
||||
public TaskBuilder setRepeatTime(Integer repeatTime) {
|
||||
public TaskBuilder setRepeatTime(Long repeatTime) {
|
||||
this.repeatTime = repeatTime;
|
||||
return this;
|
||||
}
|
||||
@ -51,5 +51,13 @@ public interface PlatformScheduler {
|
||||
this.task = task;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public TaskBuilder setTask(Runnable runnableTask) {
|
||||
this.setTask(task -> runnableTask.run());
|
||||
return this;
|
||||
}
|
||||
|
||||
public abstract Task schedule();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user