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.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
@ -149,10 +150,14 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15.
|
||||||
}
|
}
|
||||||
PlayersWithFlairs.add(ign); // Don't redownload even if flair isn't accepted
|
PlayersWithFlairs.add(ign); // Don't redownload even if flair isn't accepted
|
||||||
}
|
}
|
||||||
try {
|
}
|
||||||
Thread.sleep(10);
|
} catch (Exception e) {
|
||||||
} catch (InterruptedException ex) {
|
errorcount++;
|
||||||
Thread.currentThread().interrupt();
|
if (errorcount >= 10) {
|
||||||
|
errorcount = 0;
|
||||||
|
if (!e.getMessage().contains("Server returned HTTP response code")
|
||||||
|
&& !(e instanceof UnknownHostException))
|
||||||
|
TBMCCoreAPI.SendException("Error while getting flairs from Reddit!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -160,14 +165,6 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15.
|
||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
|
||||||
errorcount++;
|
|
||||||
if (errorcount >= 10) {
|
|
||||||
errorcount = 0;
|
|
||||||
if (!e.getMessage().contains("Server returned HTTP response code"))
|
|
||||||
TBMCCoreAPI.SendException("Error while getting flairs from Reddit!", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import buttondevteam.lib.chat.TBMCChatAPI;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import buttondevteam.lib.player.TBMCPlayer;
|
import buttondevteam.lib.player.TBMCPlayer;
|
||||||
|
|
||||||
@CommandClass(modOnly = false)
|
@CommandClass(modOnly = false, excludeFromPath = true)
|
||||||
public abstract class AppendTextCommandBase extends TBMCCommandBase {
|
public abstract class AppendTextCommandBase extends TBMCCommandBase {
|
||||||
|
|
||||||
public abstract String[] GetHelpText(String alias);
|
public abstract String[] GetHelpText(String alias);
|
||||||
|
|
Loading…
Reference in a new issue