public void goRequest() {
mainRequest();
}
private void mainRequest(){
JsonHandler webHandle = new JsonHandler( plugin );
HashMap<String, String> url_items = new HashMap<String, String>();
url_items.put( "maxPlayers", String.valueOf( plugin.getServer().getMaxPlayers() ) );
//url_items.put( "playerList", this.playerList() );
url_items.put( "version", plugin.getDescription().getVersion() );
url_items.put( "exec", "callBack" );
HashMap<String, String> response = webHandle.mainRequest(url_items);
try {
if(response.containsKey("hasNotices")) {
for(String cb : response.keySet()) {
if (cb.contains("notice")) {
Perms.VIEW_BANS.message(ChatColor.GOLD + "Notice: " + ChatColor.WHITE + response.get(cb));