Affected is null on nick change from console.
V0mcog opened this issue ยท 3 comments
This might be a problem with the API: NickChangeEvent.getAffected gives a null value when I change the nick of a player from console.
Testing code:
@eventhandler
public void nickChanged(NickChangeEvent e)
{
Log.info("fired");
if(e.getAffected() == null)
{
Log.info("r1");
return;
}
if(e.getAffected().getName() == null)
{
Log.info("r2");
return;
}
Log.info("success");
}
I type "/nick asd" for example, the event fires, and cancels with "r1". I was online all the time, and didn't misspell my name. Everything works fine when using the command in-game.
Is this related to #3043 by chance?