New event handling system - problem

Discussion in 'Plugin Development' started by djmati11, Jan 21, 2012.

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


    Been googling - no solution.

    package com.djmati11.Thorhammer;
    import java.util.ArrayList;
    import java.util.logging.Logger;
    import org.bukkit.Bukkit;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import org.bukkit.block.Block;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.EventPriority;
    import org.bukkit.event.block.Action;
    import org.bukkit.event.player.PlayerInteractEvent;
    import org.bukkit.event.player.PlayerMoveEvent;
    public class Thorhammer extends JavaPlugin implements Listener {
        public ArrayList<String> thorList = new ArrayList<String>();
        public Logger log = Logger.getLogger("Minecraft");
        @EventHandler(priority = EventPriority.NORMAL)
        public void onPlayerMove(final PlayerMoveEvent event) {
  "[Thorhammer] Moved");
        public void onDisable() {
        public void onEnable() {
            Bukkit.getServer().getPluginManager().registerEvents(this, this);
  "[Thorhammer] ENABLED");
    This isn't working for me, no "[Thorhammer] Moved" in console. Newest CraftBukkit unofficial release. Newest Bukkit API.
  2. Offline


    The @EventHandler annotation needs to specify both an event and a priority.

    Edit: Maybe I'm wrong... that's how I've been doing it though.
  3. not anymore.
    i even does only need priority then priority != normal.
  4. Offline


    Can you help me?
  5. Offline


    That seems like it should work fine. Is the plugin being enabled?

    Edit: Yep, tested, works fine. Is your plugin.yml correct?
    djmati11 likes this.
  6. Offline


    a problem i ran into is that i downloaded a version of the build that didn't have it yet, so maybe redownload your build to see if that helps (and make sure it's pointing to the correct build)
    djmati11 likes this.
Thread Status:
Not open for further replies.

Share This Page