First of all, I absolutely love your API
Saves so much headaches! Its amazing!
I've been working on a game for the past few weeks, and the development has been really smooth and easy so far.
But, right now I'm facing a problem and I have no idea what is wrong.
See my following code:
Code: Select all
// Set vars
LinkedList<IMMOItemVariable> itemVars = new LinkedList<IMMOItemVariable>();
itemVars.add(new MMOItemVariable("amount", 5));
itemVars.add(new MMOItemVariable("player", DBHandler.onlinePlayers.get(user.getName()).name));
itemVars.add(new MMOItemVariable("itemid", newItem.id));
// Create new mmoitem
MMOItem item = new MMOItem(itemVars);
mmoApi = SmartFoxServer.getInstance().getAPIManager().getMMOApi();
mmoApi.setMMOItemVariables(item, itemVars, true);
So, for some reason, "Works sofar4" never gets called. The application continues working and does not show any error at all. Somehow the "mmoApi.setMMOItemVariables(item, itemVars, true);" part gets stuck and I can't find anything about it in the logs or the console.
I know that the constructor of MMOItem already accepts the vars, but I need to update the values later so the .setMMOItemVariables function is a must for me. Setting the vars by .setVariable does not inform the clients AFAIK. Atleast, I've tried it and it doesn't for me.
Since I'm getting no feedback at all I have no idea whats wrong, I've been checking the docs about .setMMOItemVariables multiple times and I have no clue, perhaps I'm overlooking something?
Any help will be appreciated!
Thanks in advance!