Skip to content

Commit 8db9bf1

Browse files
committed
clean
1 parent 08f3b83 commit 8db9bf1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/thinkingstudio/bedsheet/BedSheetModEvents.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public static void registerEvents(IEventBus modEventBus, IEventBus forgeEventBus
1919
CarpetServer.registerCarpetCommands(event.getDispatcher(), event.getCommandSelection(), event.getBuildContext());
2020
});
2121
forgeEventBus.addListener(EventPriority.HIGHEST, PlayerEvent.PlayerLoggedInEvent.class, event -> {
22-
CarpetServer.onPlayerLoggedIn((ServerPlayer) event.getEntity());
22+
if (event.getEntity() instanceof ServerPlayer serverPlayer) {
23+
CarpetServer.onPlayerLoggedIn(serverPlayer);
24+
}
2325
});
2426
forgeEventBus.addListener(EventPriority.HIGHEST, LivingSwapItemsEvent.Hands.class, event -> {
2527
if (event.getEntity() instanceof ServerPlayer serverPlayer) {

0 commit comments

Comments
 (0)