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); }