Help :)

Discussion in 'Plugin Development' started by Ula492, Oct 28, 2014.

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

    Ula492

    Code:java
    1.  
    2. Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(PlayerTools.getInstance(), new Runnable(bat, bat1, bat2, bat3, bat4, bat5, bat6, bat7, bat8, bat9, bat10, bat11)
    3. {
    4. public void run()
    5. {
    6. this.val$bat.remove();
    7. this.val$bat1.remove();
    8. this.val$bat2.remove();
    9. this.val$bat3.remove();
    10. this.val$bat4.remove();
    11. this.val$bat5.remove();
    12. this.val$bat6.remove();
    13. this.val$bat7.remove();
    14. this.val$bat8.remove();
    15. this.val$bat9.remove();
    16. this.val$bat10.remove();
    17. this.val$bat11.remove();
    18. }
    19. }
    20. , 20L);
    21.  
    22. Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(PlayerTools.getInstance(), new Runnable(player)
    23. {
    24. public void run()
    25. {
    26. BatBlasterActivate.this.NoBat.remove(this.val$player);
    27. this.val$player.sendMessage(BatBlasterActivate.this.prefix + ChatColor.GOLD + "You Can Now Use The Bat Blaster");
    28. }
    29.  


    It says: The constructor Object(Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat) is undefined
     
  2. Offline

    Gamecube762

    A new Runnable() doesn't take any arguments.
     
    DJSkepter likes this.
  3. Ula492 Kinda hard to explain, but I believe the best way to say is that:
    http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html
    This doesn't have the construction of Runnable(Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat, Bat) anywhere in that documentation.

    Make your bat objects final (final Bat bat1 = [WHATEVER]) and use the bat objects there. (bat1.remove()).
     
  4. Offline

    Ula492

    dosent work or help

    Dosent help me :/ I tried putting final and it game me another error code:(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  5. Offline

    fireblast709

    Ula492 perhaps you shouldn't be using a decompiler as a source to copy paste code from.
     
Thread Status:
Not open for further replies.

Share This Page