Help with Plugin Messages Not Sending

Discussion in 'Plugin Development' started by KillerSmurf, May 7, 2013.

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


    So, I've made a custom plugin and after X amount of hours running it stops sending players messages, so if In my plugin when you click a button it'd say "Hi" and give you an Apple. After X amount of hours it stops sending messages but keeps doing the functionality. Anyone know why/what would cause this?
  2. Offline


    Moved to Plugin Development!
  3. Offline

    Jamie Marks

  4. Offline


    I'd rather not, it's not an open source project. But what are some things that could possibly cause this. I can then tell you whether or not my code contains that.
  5. Offline


    KillerSmurf If you want help then you'll have to post your code, otherwise there could be many things causing your errors.
  6. Kind of funny that you try to protect your code, which everyone could code here... I mean, putting an apple into the inventory and sending the message "Hi!"? :D

    1. @EventHandler
    2. public void onPlayerInteract(PlayerInteractEvent event)
    3. {
    4. if (event.getAction() == Action.RIGHT_CLICK_BLOCK)
    5. {
    6. if (event.getClickedBlock().getType() == Material.WOOD_BUTTON || event.getClickedBlock().getType() == Material.STONE_BUTTON)
    7. {
    8. event.getPlayer().sendMessage("Hi!");
    9. event.getPlayer().getInventory().addItem(new ItemStack(Material.APPLE));
    10. }
    11. }
    12. }

    There you have your hardcore code... Took me 2 mins...
  7. Offline

    Jamie Marks

    if you come here asking for help you will get it much faster by posting the code that you think has the issue. unless you dont have the code and just want us to do it for you.
  8. Offline


    That's an example... that's not actually what I am doing... I was just trying to create scenario to explain my problem...

        public void onEnable() {
            instance = this;
            spawnPointManager = new SpawnPointManager(this);
            playerManager = new PlayerManager();
            economyManager = new EconomyManager(this);
            storageManager = new StorageManager();
            commands.put("money", new MHMoneyCommand());
            commands.put("setentityworth", new MHSetEntityWorthCommand());
            commands.put("deposit", new MHDepositCommand());
            commands.put("vault", new MHVaultCommand());
            commands.put("withdraw", new MHVaultCommand());
            commands.put("spawnpoint", new MHSpawnPointCommand());
            commands.put("spawnpointdelete", new MHDeleteSpawnPointCommand(this));
            commands.put("getspawnpoints", new MHGetSpawnPointsCommand());
            commands.put("customitem", new MHCustomItemCommand());
            MineHordeCommand.registerAll(commands, this);
            //mhLogger = new MineHordeLogger(this);
            MHListener mhListener = new MHListener(this);
            Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new SpawnPointTask(), 40L, 100L);
            //Incase of reload
            log(Level.INFO, "Enabled");
    That's my onEnable() therefore those things are the only things running.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 1, 2016
Thread Status:
Not open for further replies.

Share This Page