package net.techcable.techutils.entity;

import java.util.UUID;

import com.google.common.base.Preconditions;

import net.techcable.techutils.TechPlugin;
import lombok.*;

@RequiredArgsConstructor
public class TechPlayer {
    private final UUID id;
    @SuppressWarnings("unchecked")
    private final TechPlugin<?> plugin;
    
    /**
     * Retreive this player's uuid
     * 
     * @return this player's uuid
     */
    public UUID getId() {
        return this.id;
    }
    
    /**
     * Retreive this player's username
     * 
     * @return this player's username 
     */
    public String getName() {
        String name = UUIDUtils.getName(getId());
        assert name != null : "Unable to lookup name";
        return name;
    }
    
    final void destroy() {
        cleanup();
    }
    
    /**
     * Perform any necessary cleanup actions
     * 
     */
    protected void cleanup() {}
    
    public final boolean equals(Object other) {
        if (other == null) return false;
        if (other == this) return true;
        if (other instanceof TechPlayer) {
            UUID otherId = ((TechPlayer)other).getId();
            return getId().equals(otherId);
        }
        return false;
    }
    
    public final int hashCode() {
        return getId().hashCode();
    }
}
@@ -58,16 +58,76 @@
 .UUID;%0A%0A
+import org.bukkit.Bukkit;%0Aimport org.bukkit.entity.Player;%0A%0A
 import c
@@ -413,123 +413,508 @@
 e th
-is player's uuid%0A     * %0A     * @return this player's uuid%0A     */%0A    public UUID getId() %7B%0A        return this.id
+e plugin that owns this player%0A     * %0A     * @return this player's plugin%0A     */%0A    public TechPlugin%3C?%3E getPlugin() %7B%0A    %09return this.plugin;%0A    %7D%0A    %0A    /**%0A     * Retreive this player's uuid%0A     * %0A     * @return this player's uuid%0A     */%0A    public UUID getId() %7B%0A        return this.id;%0A    %7D%0A    %0A    /**%0A     * Retrieve the entity backing this techplayer%0A     * %0A     * @return the accociated player entity%0A     */%0A    public Player getEntity() %7B%0A    %09return Bukkit.getPlayer(getId())
 ;%0A  

Add More Getters