Broadcast Plugin

Discussion in 'Plugin Development' started by didjee2, Sep 14, 2014.

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

    didjee2

    Can someone help me?
    I always got an error: http://pastebin.com/qqtpgPz2 ==> My Main class file
    Errors/warnings:

    Resource leak: 'br' is never closed MainClass.java /AutoBroadcaster/src/me/didjee2/bukkit/AutoBroadcaster line 53 Java Problem

    Resource leak: 'br' is never closed MainClass.java /AutoBroadcaster/src/me/didjee2/bukkit/AutoBroadcaster line 53 Java Problem

    Resource leak: 'lnr' is never closed Broadcast.java /Broadcast/src/me/didjee2/Broadcast line 63 Java Problem

    Resource leak: 'lnr' is never closed Broadcast.java /Broadcast/src/me/didjee2/Broadcast line 63 Java Problem
     
  2. Offline

    ChipDev

    We need both of your classes. :D
     
  3. Offline

    mine-care

    Let me point out som common mistakes to be fixed within your main class, ( ChipDev is right ) umm
    1. Don't abuse static modifier, static is not all about easy method/variable accessing... There are consequences
    2. Read my signature to find what the problem is, also on your on command you are defining player variables on each if and else body
    3 you are leaving exception un handled
    4. You are printing messages on enable and disable, bukkit does it by its own :3
     
  4. Offline

    didjee2

    It is actually the only class :p
     
  5. Offline

    mrCookieSlime

    didjee2
    Also dont do that:
    string = string.replaceAll("&e", ChatColor.YELLLOW);
    use ChatColor.translateAlternateColorCodes('&', string);
     
    Garris0n likes this.
  6. Offline

    didjee2

  7.  
  8. Offline

    didjee2

    I have an error if i do that
     
  9. Could you be more specific? We can't solve an error that we have no information of.
     
  10. Offline

    ToPoEdiTs

    the code is similar to the one in this tutorial, miratelo whole 4 parts that code is missing.
     
Thread Status:
Not open for further replies.

Share This Page