Examples of ChatChannel


Examples of com.bekvon.bukkit.residence.chat.ChatChannel

    public void onPlayerChat(AsyncPlayerChatEvent event) {
        String pname = event.getPlayer().getName();
        if (chatenabled && playerToggleChat.contains(pname)) {
            String area = currentRes.get(pname);
            if (area != null) {
                ChatChannel channel = Residence.getChatManager().getChannel(area);
                if (channel != null) {
                    channel.chat(pname, event.getMessage());
                }
                event.setCancelled(true);
            }
        }
    }
View Full Code Here

Examples of com.bekvon.bukkit.residence.chat.ChatChannel

                    if (args.length == 0) {
                        plistener.tooglePlayerResidenceChat(player);
                    } else {
                        String area = plistener.getCurrentResidenceName(pname);
                        if (area != null) {
                            ChatChannel channel = chatmanager.getChannel(area);
                            if (channel != null) {
                                String message = "";
                                for (String arg : args) {
                                    message = message + " " + arg;
                                }
                                channel.chat(pname, message);
                            } else {
                                player.sendMessage(ChatColor.RED + language.getPhrase("InvalidChannel"));
                            }
                        } else {
                            player.sendMessage(ChatColor.RED + language.getPhrase("NotInResidence"));
View Full Code Here

Examples of gwlpr.mapshard.models.enums.ChatChannel

{

    @Test
    public void testChatChannelValues()
    {
        ChatChannel chan = ChatChannel.getFromPrefix('@');
        assert chan.equals(ChatChannel.Guild);

        chan = ChatChannel.getFromPrefix('?');
        assert chan == null;
    }
View Full Code Here

Examples of gwlpr.mapshard.models.enums.ChatChannel

    {
        ClientBean client = ClientBean.get(chatMsg.getChannel());

        // extract the whole prefix message, get the channel prefix and the actual message
        String prfMsg = chatMsg.getPrefixedMessage();
        ChatChannel chan = ChatChannel.getFromPrefix(prfMsg.charAt(0));
        String msg = prfMsg.substring(1);

        // failcheck
        if (chan == null || msg == null || msg.equals("")) { return; }
       
        LOGGER.debug("Got new chat message for channel {}: {}", chan.name(), msg);

        // if it's a special channel we might want to distinguish between
        // different actions.
        // there is 3 types: the usual ingame stuff; whisper; command
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.