This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
FreshCoffee/src/main/java/com/thebrokenrail/freshcoffee/dialog/Dialog.java

25 lines
754 B
Java

package com.thebrokenrail.freshcoffee.dialog;
import com.thebrokenrail.freshcoffee.dialog.client.ClientDialog;
import com.thebrokenrail.freshcoffee.dialog.server.ServerDialog;
import net.fabricmc.loader.api.FabricLoader;
public interface Dialog {
static Dialog getInstance() {
switch (FabricLoader.getInstance().getEnvironmentType()) {
case CLIENT: {
return ClientDialog.INSTANCE;
}
case SERVER: {
return ServerDialog.INSTANCE;
}
default: {
throw new UnsupportedOperationException();
}
}
}
int showOptionDialog(String message, String noText, String yesText);
void showErrorDialog(String message);
}