From 809009f96c827f8a6f24e01bc3db427eb0a700a2 Mon Sep 17 00:00:00 2001 From: "Breno A." Date: Sun, 9 Jun 2024 10:02:56 -0300 Subject: [PATCH] refactor: null check is not necessary, we have instanceof --- .../server/packet/recv/HandlerSceneEntityDrownReq.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerSceneEntityDrownReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerSceneEntityDrownReq.java index bfeaafd9a..133c06cfc 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerSceneEntityDrownReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerSceneEntityDrownReq.java @@ -16,7 +16,7 @@ public class HandlerSceneEntityDrownReq extends PacketHandler { GameEntity entity = session.getPlayer().getScene().getEntityById(req.getEntityId()); - if (entity == null || !(entity instanceof EntityMonster || entity instanceof EntityAvatar)) { + if (!(entity instanceof EntityMonster || entity instanceof EntityAvatar)) { return; }