Sorry appears i was wrong about this, doesnt even work in C# so i have no idea where i got the idea from! However the synchronised list snippet...
private List<String> privateList; public synchronized List<String> getList() { return privateList; } How to get a synchronised...
You might not see the logic but thats how it works, the lock provides the current thread with exclusive access to that variable while you have the...
lol, ok you clearly dont understand then, if you lock using synchronised then ALL threads block, regardless of them using the synchronised keyword...
Ok, clearly you have no idea what the Synchronised keyword does in that context...
Synchronised (object) { } Solves almost every threading issue your likely to encounter.
Use the Synchronised keyword on the list your trying to modify.
There's nothing bad about using threads or synchronization in your code, just as long as you know what your doing, and so long as what your doing...
Use the synchronised keyword on whichever object it is which is causing the issue.
Bone008 The problem is that there are so many lines of inefficient code in minecraft that you have to start somewhere, and it just so happens that...
I dont really think you understand how threadsafe code works... I can create a class which has loads of collections which are accessed by a...
How isnt that threadsafe?
I take it you dont understand the difference between persistent data and none persistent data, if the plugin simply takes and stores player...
Well, I'll have to do my own research into why that might be the case for Java, but straight up that shouldn't be the case integers can be...
Not sure why that would be true, its not true for any other language...
Separate names with a comma.