// Path: ChatUILib/src/main/java/com/simon816/chatui/lib/PlayerChatView.java
// public interface PlayerChatView {
// 
//     public Player getPlayer();
// 
//     public TopWindow getWindow();
// 
//     public boolean showWindow(TopWindow window);
// 
//     public boolean removeShownWindow();
// 
//     public void update();
// 
//     public boolean handleIncoming(Text message);
// 
//     public Optional<Text> transformOutgoing(CommandSource sender, Text originalOutgoing, ChatType type);
// 
//     public boolean handleCommand(String[] args);
// 
//     public void onRemove();
// 
//     public void initialize();
// 
// }
// 
// Path: ChatUILib/src/main/java/com/simon816/chatui/lib/TopWindow.java
// public interface TopWindow extends ITextDrawable {
// 
//     void onClose();
// 
//     void onTextInput(PlayerChatView view, Text input);
// 
//     boolean onCommand(PlayerChatView view, String[] args);
// 
// }


import com.simon816.chatui.lib.PlayerChatView;
import com.simon816.chatui.lib.TopWindow;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.text.Text;
import org.spongepowered.api.text.action.TextActions;
import org.spongepowered.api.text.chat.ChatType;
import org.spongepowered.api.text.format.TextColors;
import java.util.Optional;
import java.util.UUID;

package com.simon816.chatui;



public class DisabledChatView implements PlayerChatView {

    private static final Text DISABLED_MESSAGE;
    static {
        Text.Builder builder = Text.builder("ChatUI is disabled, type ");
        builder.append(Text.builder("/chatui enable")
                .color(TextColors.GREEN)
                .onClick(TextActions.suggestCommand("/chatui enable"))
                .build(), Text.of(" to re-enable"));
        DISABLED_MESSAGE = builder.build();
    }
    private final UUID playerUuid;

    DisabledChatView(Player player) {
        this.playerUuid = player.getUniqueId();
    }

    @Override
    public void initialize() {
        getPlayer().sendMessage(DISABLED_MESSAGE);
    }

    @Override
    public Player getPlayer() {
        return Sponge.getServer().getPlayer(this.playerUuid).get();
    }

    @Override

// Path: ChatUILib/src/main/java/com/simon816/chatui/lib/PlayerChatView.java
// public interface PlayerChatView {
// 
//     public Player getPlayer();
// 
//     public TopWindow getWindow();
// 
//     public boolean showWindow(TopWindow window);
// 
//     public boolean removeShownWindow();
// 
//     public void update();
// 
//     public boolean handleIncoming(Text message);
// 
//     public Optional<Text> transformOutgoing(CommandSource sender, Text originalOutgoing, ChatType type);
// 
//     public boolean handleCommand(String[] args);
// 
//     public void onRemove();
// 
//     public void initialize();
// 
// }
// 
// Path: ChatUILib/src/main/java/com/simon816/chatui/lib/TopWindow.java
// public interface TopWindow extends ITextDrawable {
// 
//     void onClose();
// 
//     void onTextInput(PlayerChatView view, Text input);
// 
//     boolean onCommand(PlayerChatView view, String[] args);
// 
// }


// Path: src/main/java/com/simon816/chatui/DisabledChatView.java
import com.simon816.chatui.lib.PlayerChatView;
import com.simon816.chatui.lib.TopWindow;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.text.Text;
import org.spongepowered.api.text.action.TextActions;
import org.spongepowered.api.text.chat.ChatType;
import org.spongepowered.api.text.format.TextColors;
import java.util.Optional;
import java.util.UUID;

package com.simon816.chatui;



public class DisabledChatView implements PlayerChatView {

    private static final Text DISABLED_MESSAGE;
    static {
        Text.Builder builder = Text.builder("ChatUI is disabled, type ");
        builder.append(Text.builder("/chatui enable")
                .color(TextColors.GREEN)
                .onClick(TextActions.suggestCommand("/chatui enable"))
                .build(), Text.of(" to re-enable"));
        DISABLED_MESSAGE = builder.build();
    }
    private final UUID playerUuid;

    DisabledChatView(Player player) {
        this.playerUuid = player.getUniqueId();
    }

    @Override
    public void initialize() {
        getPlayer().sendMessage(DISABLED_MESSAGE);
    }

    @Override
    public Player getPlayer() {
        return Sponge.getServer().getPlayer(this.playerUuid).get();
    }

    @Override

    public TopWindow getWindow() {
