Skip to content

Commit 7caad8d

Browse files
committed
Add extra null check
1 parent 5afcc01 commit 7caad8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

common/src/main/java/dev/terminalmc/moremousetweaks/MoreMouseTweaks.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public static void afterConfigSaved(Config config) {
4949
}
5050

5151
public static void setInteractionManagerTickRate(Config.Options options) {
52-
if (Minecraft.getInstance().getSingleplayerServer() == null) {
52+
@Nullable Minecraft mc = Minecraft.getInstance();
53+
//noinspection ConstantValue
54+
if (mc != null && mc.getSingleplayerServer() == null) {
5355
InteractionManager.setTickRate(options.interactionIntervalMp);
5456
} else {
5557
InteractionManager.setTickRate(options.interactionIntervalSp);

0 commit comments

Comments
 (0)