I have a server extension (written in Java) that is assigning some user variables on a "USER_JOIN_ZONE" event handler.
The problem is that if I use the code below, the client is notified of the variables update and everything is fine:
Code: Select all
SFSUserVariable energy = new SFSUserVariable("energy", 100);
ArrayList<UserVariable> userVariables = new ArrayList<UserVariable>();
userVariables.add(energy);
this.getApi().setUserVariables(user, userVariables);
Code: Select all
SFSUserVariable energy = new SFSUserVariable("energy", 100);
user.setVariable(energy);