fix for rare concurrency issues
This commit is contained in:
parent
25a19afc43
commit
f7db9fc8ff
|
@ -1,6 +1,6 @@
|
|||
package cz.boosik.boosCooldown;
|
||||
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
@ -21,8 +21,8 @@ import util.boosChat;
|
|||
public class boosCoolDownListener implements Listener {
|
||||
private final boosCoolDown plugin;
|
||||
private boolean blocked = false;
|
||||
private static WeakHashMap<Player, Location> playerloc = new WeakHashMap<Player, Location>();
|
||||
private static WeakHashMap<Player, String> playerworld = new WeakHashMap<Player, String>();
|
||||
private static ConcurrentHashMap<Player, Location> playerloc = new ConcurrentHashMap<Player, Location>();
|
||||
private static ConcurrentHashMap<Player, String> playerworld = new ConcurrentHashMap<Player, String>();
|
||||
|
||||
public boosCoolDownListener(boosCoolDown instance) {
|
||||
plugin = instance;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package cz.boosik.boosCooldown;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Timer;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
@ -9,7 +9,7 @@ import util.boosChat;
|
|||
|
||||
public class boosWarmUpManager {
|
||||
|
||||
private static HashMap<String, boosWarmUpTimer> playercommands = new HashMap<String, boosWarmUpTimer>();
|
||||
private static ConcurrentHashMap<String, boosWarmUpTimer> playercommands = new ConcurrentHashMap<String, boosWarmUpTimer>();
|
||||
|
||||
static Timer scheduler;
|
||||
|
||||
|
|
Loading…
Reference in New Issue