Activating bound cleric circle while owner is offline unbinds it
Robotgiggle opened this issue ยท 0 comments
Minecraft version
1.20.1
Hex Casting version
0.11.2
Issue description
When any spell circle starts up, it schedules a tick on the impetus block (as seen here). The tick method on a Cleric Impetus calls updatePlayerProfile (as seen here), which attempts to get the stored player and erases the stored player profile if that fails (as seen here). This means that if you activate a Cleric Impetus while the bound player is offline (causing getStoredPlayer to return null) then the impetus will automatically unbind itself.
Obviously, this is not optimal. What I would expect to happen in this scenario is either for the Cleric Impetus to not function at all while the bound player is offline, or for it to perform a playerless cast without permanently unbinding itself.
Steps to reproduce
- Set up a circle with a cleric impetus, and bind yourself to it
- Disconnect from the server, but keep it running
- Have someone else activate the bound impetus
- Observe that it unbinds itself
Other information
Activating a bound Cleric Impetus while the owner is offline also causes some likely unintended error logging - more details on that can be found in #915