package com.gamingmesh.jobs.economy;

import java.util.HashMap;
import java.util.UUID;

import com.gamingmesh.jobs.container.PlayerPoints;

public class PointsData {

    private HashMap<UUID, PlayerPoints> Pointbase = new HashMap<>();

    public PointsData() {
    }

    public HashMap<UUID, PlayerPoints> getPointBase() {
	return Pointbase;
    }

    public void addPlayer(UUID uuid) {
	addPlayer(uuid, 0D);
    }

    public void addPlayer(UUID uuid, double points) {
	addPlayer(uuid, points, 0D);
    }

    public void addPlayer(UUID uuid, double points, double total) {
	if (!Pointbase.containsKey(uuid))
	    Pointbase.put(uuid, new PlayerPoints(points, total));
    }

    public void addPlayer(UUID uuid, PlayerPoints points) {
	if (!Pointbase.containsKey(uuid))
	    Pointbase.put(uuid, points);
    }

    public void addPoints(UUID uuid, Double points) {
	if (!Pointbase.containsKey(uuid))
	    addPlayer(uuid, points);
	else {
	    Pointbase.get(uuid).addPoints(points);
	}
    }

    public PlayerPoints getPlayerPointsInfo(UUID uuid) {
	return Pointbase.containsKey(uuid) ? Pointbase.get(uuid) : new PlayerPoints();
    }
}

@@ -82,24 +82,58 @@
 il.UUID;%0D%0A%0D%0A
+import com.gamingmesh.jobs.Jobs;%0D%0A
 import com.g
@@ -637,62 +637,21 @@
  %7B%0D%0A
-%09if (!Pointbase.containsKey(uuid))%0D%0A%09    Pointbase.put
+    addPlayer
 (uui
@@ -677,17 +677,16 @@
 (points,
- 
 total));
@@ -749,32 +749,142 @@
 ints points) %7B%0D%0A
+    if (Jobs.getGCManager().MultiServerCompatability()&&Pointbase.containsKey(uuid)) Pointbase.remove(uuid);%0D%0A
 %09if (!Pointbase.

Update PointsData