package com.hyperfresh.mchyperchat.bukkit;

import com.hyperfresh.mchyperchat.HyperChat;
import com.hyperfresh.mchyperchat.Player;
import com.hyperfresh.mchyperchat.Theme;

import java.util.UUID;

/**
 * A wrapper for Bukkit players.
 */
public class BukkitUser implements Player
{
	private final org.bukkit.entity.Player handle;

	private String lastSaid;

	private Theme theme = HyperChat.getThemeManager().getDefaultTheme();

	public BukkitUser(org.bukkit.entity.Player player, String lastSaid)
	{
		this.handle = player;
		this.lastSaid = lastSaid;
	}

	public String getName()
	{
		return handle.getName();
	}

	@Override
	public UUID getUUID()
	{
		return handle.getUniqueId();
	}

	@Override
	public String getLastMessage()
	{
		return lastSaid;
	}

	@Override
	public void setLastMessage(String said)
	{
		lastSaid = said;
	}

	@Override
	public void sendMessage(String message)
	{
		handle.sendMessage(message);
	}

	@Override
	public Theme getTheme()
	{
		return theme;
	}

	@Override
	public void setTheme(Theme theme)
	{
		this.theme = theme;
	}
}

@@ -337,94 +337,52 @@
 ate 
-String lastSaid;%0A%0A%09private Theme theme = HyperChat.getThemeManager().getDefaultTheme()
+Theme theme;%0A%09private String lastSaid = null
 ;%0A%0A%09
@@ -399,16 +399,37 @@
 kitUser(
+HyperChat hyperChat, 
 org.bukk
@@ -455,25 +455,8 @@
 ayer
-, String lastSaid
 )%0A%09%7B
@@ -491,27 +491,61 @@
 his.
-lastSaid = lastSaid
+theme = hyperChat.getThemeManager().getDefaultTheme()
 ;%0A%09%7D

change BukkitUser constructor