mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-07 00:03:04 +08:00
refactor: null check is not necessary, we have instanceof
This commit is contained in:
parent
45bf5edb13
commit
809009f96c
@ -16,7 +16,7 @@ public class HandlerSceneEntityDrownReq extends PacketHandler {
|
|||||||
|
|
||||||
GameEntity entity = session.getPlayer().getScene().getEntityById(req.getEntityId());
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user