Reduced errors and CMDS WORK - EH
This commit is contained in:
parent
28aeb35573
commit
3e1df267cf
2 changed files with 9 additions and 12 deletions
|
@ -40,6 +40,7 @@ import java.lang.String;
|
|||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.UnknownHostException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
|
@ -149,25 +150,21 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15.
|
|||
}
|
||||
PlayersWithFlairs.add(ign); // Don't redownload even if flair isn't accepted
|
||||
}
|
||||
try {
|
||||
Thread.sleep(10);
|
||||
} catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
try {
|
||||
Thread.sleep(10000);
|
||||
} catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
errorcount++;
|
||||
if (errorcount >= 10) {
|
||||
errorcount = 0;
|
||||
if (!e.getMessage().contains("Server returned HTTP response code"))
|
||||
if (!e.getMessage().contains("Server returned HTTP response code")
|
||||
&& !(e instanceof UnknownHostException))
|
||||
TBMCCoreAPI.SendException("Error while getting flairs from Reddit!", e);
|
||||
}
|
||||
}
|
||||
try {
|
||||
Thread.sleep(10000);
|
||||
} catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import buttondevteam.lib.chat.TBMCChatAPI;
|
|||
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||
import buttondevteam.lib.player.TBMCPlayer;
|
||||
|
||||
@CommandClass(modOnly = false)
|
||||
@CommandClass(modOnly = false, excludeFromPath = true)
|
||||
public abstract class AppendTextCommandBase extends TBMCCommandBase {
|
||||
|
||||
public abstract String[] GetHelpText(String alias);
|
||||
|
|
Loading…
Reference in a new issue