mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-13 20:42:34 +08:00
refactor: null check is not necessary, we have instanceof
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user