/*
 *   Copyright 2014 StormCloud Development Group
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */
package io.github.stormcloud_dev.stormcloud;

public class Player {

    private double MId, objectIndex;

    private String name;

    private CrewMember clazz;

    public Player(double MId, double objectIndex) {
        this.MId = MId;
        this.objectIndex = objectIndex;
        this.clazz = CrewMember.COMMANDO;
        this.name = "Anonymous";
    }

    public double getMId() {
        return MId;
    }

    public double getObjectIndex() {
        return objectIndex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public CrewMember getClazz() {
        return clazz;
    }

    public void setClazz(CrewMember clazz) {
        this.clazz = clazz;
    }
}

@@ -671,16 +671,101 @@
 cloud;%0A%0A
+import static java.lang.Math.max;%0Aimport static java.lang.System.currentTimeMillis;%0A%0A
 public c
@@ -842,17 +842,42 @@
 g name;%0A
+    private String login;
 %0A
-
     priv
@@ -897,16 +897,182 @@
 r clazz;
+%0A    private long zCooldown;%0A    private long xCooldown;%0A    private long cCooldown;%0A    private long vCooldown;%0A    private long lastPing;%0A    private boolean ready;
 %0A%0A    pu
@@ -1248,17 +1248,39 @@
  = %22
-Anonymous
+Player%22;%0A        this.login = %22
 %22;%0A 
@@ -1535,32 +1535,168 @@
  = name;%0A    %7D%0A%0A
+    public String getLogin() %7B%0A        return login;%0A    %7D%0A%0A    public void setLogin(String login) %7B%0A        this.login = login;%0A    %7D%0A%0A
     public CrewM
@@ -1816,16 +1816,1213 @@
  clazz;%0A
-
     %7D%0A
+%0A    public long getZCooldown() %7B%0A        return max(zCooldown - currentTimeMillis(), 0);%0A    %7D%0A%0A    public void setZCooldown(long millis) %7B%0A        zCooldown = currentTimeMillis() + millis;%0A    %7D%0A%0A    public long getXCooldown() %7B%0A        return max(xCooldown - currentTimeMillis(), 0);%0A    %7D%0A%0A    public void setXCooldown(long millis) %7B%0A        xCooldown = currentTimeMillis() + millis;%0A    %7D%0A%0A    public long getCCooldown() %7B%0A        return max(cCooldown - currentTimeMillis(), 0);%0A    %7D%0A%0A    public void setCCooldown(long millis) %7B%0A        cCooldown = currentTimeMillis() + millis;%0A    %7D%0A%0A    public long getVCooldown() %7B%0A        return max(vCooldown - currentTimeMillis(), 0);%0A    %7D%0A%0A    public void setVCooldown(long millis) %7B%0A        vCooldown = currentTimeMillis() + millis;%0A    %7D%0A%0A    public long getPing() %7B%0A        return max(currentTimeMillis() - lastPing, 0);%0A    %7D%0A%0A    public void setPing(long millis) %7B%0A        lastPing = currentTimeMillis() + millis;%0A    %7D%0A%0A    public void setLastPing(long lastPing) %7B%0A        this.lastPing = lastPing;%0A    %7D%0A%0A    public boolean isReady() %7B%0A        return ready;%0A    %7D%0A%0A    public void setReady(boolean ready) %7B%0A        this.ready = ready;%0A    %7D%0A%0A
 %7D%0A

Add various pieces of player data