Package com.comphenix.protocol.wrappers

Examples of com.comphenix.protocol.wrappers.WrappedChatComponent


    public VariablePacketModifier() {

        ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(CraftBookPlugin.inst(), PacketType.Play.Server.CHAT) {
            @Override
            public void onPacketSending(PacketEvent event) {
                WrappedChatComponent chat = event.getPacket().getChatComponents().read(0);
                chat.setJson(ParsingUtil.parseVariables(chat.getJson(), event.getPlayer()));

                event.getPacket().getChatComponents().write(0, chat);
            }
        });
    }
View Full Code Here

TOP

Related Classes of com.comphenix.protocol.wrappers.WrappedChatComponent

Copyright © 2018 www.massapicom. 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.