Hex Casting

Hex Casting

7M Downloads

Activating bound cleric circle while owner is offline causes unintended error logging

Robotgiggle opened this issue ยท 0 comments

commented

Minecraft version

1.20.1

Hex Casting version

0.11.2

Issue description

The getStoredPlayer method of a Cleric Impetus calls ServerLevel.getEntity() on the UUID it has stored, and then either returns the result of that call if it's a ServerPlayerEntity, or logs a error (Entity {} stored in a cleric impetus wasn't a player somehow) and returns null if the result was any other type.

However, if the bound player is not currently online, getEntity will return null. Since null isn't a ServerPlayerEntity, the error gets logged. I feel like this is probably not what that error message was designed for. It should be used to handle the actually problematic case of something other than a player being bound to a Cleric Impetus, not the reasonably common case of a correctly bound Cleric Impetus whose owner happens to be offline.

Steps to reproduce

  1. Set up a circle with a cleric impetus, and bind yourself to it
  2. Disconnect from the server, but keep it running
  3. Have someone else activate the bound impetus
  4. Observe the error in the server log