Unknown Error Need Help

Discussion in 'Plugin Development' started by zoren3105, Mar 19, 2021.

  1. Offline


    I am currently creating a plugin where a random thing happens every 60 seconds and when I was about to build the first test an error came up it's in line 73 and about the part where it says "this" I cannot figure out how to fix it any and all help would be appreciated!

    Here is my code: https://pastebin.com/aKD2H3vu

    The Error : java: incompatible types: <anonymous org.bukkit.scheduler.BukkitRunnable> cannot be converted to org.bukkit.plugin.Plugin
  2. Offline

    timtower Administrator Administrator Moderator

    @zoren3105 Your runTaskTimerAsynchronously is inside the BukkitRunnable.
    Move the starting to after you made it.
    And use runTaskTimer, you are using Bukkit methods, those should not be called async.
    And you are casting a list of players to a single one, won't work either.

Share This Page