Hey i currently try to show a virtual area but its not what i like it should be....
Ok first i tried
player.enableAreaSelectionTool(false);
player.setAreaSelectionData(area);
but i dont want to have the selection tool activated, just show the area. If i then call
player.disableAreaSelectionTool();
the selection is invisible again... i tried many things but could not get it as i like it.
Only once it closely behaved like i wanted it, but that was after many plugin reloads and gm switches.
After relog it was not behaving like i wanted it again.
UPDATE:
I've managed to to a trick to get it working like i want it to:
if (!player.hasAttribute("selectionToolHack")) {
player.setAttribute("selectionToolHack", true);
player.enableAreaSelectionTool(false);
player.enableAreaSelectionTool(false);
player.disableAreaSelectionTool();
}
If i call enable twice and disable afterwards the visibility seems to stay but the selectiontool stays disabled. This is not as elegant as i was looking for but still its working for now. I only need to do this hack once a session so i added a player attribute.