onPlayerChat "not working?"

Discussion in 'Plugin Development' started by booingthetroll, Feb 13, 2012.

Thread Status:
Not open for further replies.
  1. Offline


    I have heard that it is deprecated, and I fail at java(I like C++ more), so can you tell me what is wrong with this?
    package co.cc.namesnipe.Lrn2Bukkit;

    import java.util.logging.Logger;

    //import org.bukkit.World;
    //import org.bukkit.entity.CreatureType;
    import org.bukkit.event.player.PlayerChatEvent;
    import org.bukkit.plugin.java.JavaPlugin;

    public class Lrn2Bukkit extends JavaPlugin {
    Logger log = Logger.getLogger("Minecraft");
    public void onEnable(){
    log.info("Lrn2Bukkit: Enabled.");

    public void onDisable(){
    log.info("Lrn2Bukkit: Disabled.");

    public void onPlayerChat(PlayerChatEvent ev) {
    String message = ev.getMessage().toLowerCase();
    if (message.contains("taco")) {
    //World w = ev.getPlayer().getWorld();
    name: Lrn2Bukkit
    main: co.cc.namesnipe.Lrn2Bukkit.Lrn2Bukkit
    version: 1.0.0
    It does not error, but it does nothing.
  2. Offline


  3. Offline


    Thank you, sorry for spamming.
Thread Status:
Not open for further replies.

Share This Page