I am learning how to make bukkit plugins, I wanted to start using chat Events so whenever a player with specific perms says "Juiz (Kill, Heal, Give)" or anything like that in chat they are healed, killed or given what they asked for but the old PlayerChatEvent doesn't work anymore so can anyone help teach me/show me how to make Player chat events. Code:java public final MyPlayerListener pl = new MyPlayerListener(this); pm.registerEvent(Event.Type.PLAYER_CHAT, this.pl, Event.Priority.Normal, this); They don't work.
What ancient tutorial are you looking at? This is the event system that we use : http://wiki.bukkit.org/Event_API_Reference use AsyncPlayerChatEvent for detecting when a player chats. Docs for ChatEvent
mhm, here's a code example from one of my plugins: Code:java @EventHandler (priority = EventPriority.HIGH) public void colourChange(AsyncPlayerChatEvent e) { Player p = e.getPlayer(); String msg = e.getMessage(); if (cc.containsKey(p)) { addChange(e,msg); } }