blob: 18b60336323859426db1491edf5d9e877a6943d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package dev.isxander.yacl.gui;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.ConfirmScreen;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
public class RequireRestartScreen extends ConfirmScreen {
public RequireRestartScreen(Screen parent) {
super(option -> {
if (option) Minecraft.getInstance().stop();
else Minecraft.getInstance().setScreen(parent);
},
Component.translatable("yacl.restart.title").withStyle(ChatFormatting.RED, ChatFormatting.BOLD),
Component.translatable("yacl.restart.message"),
Component.translatable("yacl.restart.yes"),
Component.translatable("yacl.restart.no")
);
}
}
|