in
putCode:} catch(IOException e) { }
see what that says?Code:e.printStackTrace();
|
So I'm using rsps-pay
and i have done everything its told me such as putting its code into player.java and then adding there ::claim to my commands and I have no errors, but its just not working and there isn't even a message saying that the player hasn't payed or something like that, can anyone help?
this is my commands.java part of the rsps-pay
case "claim":
try{
player.rspsdata(player, player.getUsername());
}catch(Exception e){
player.getPackets().sendGameMessage("Thank you for donating");
}
break;
AND YES I HAVE ADDED THE IMPORTS TO PLAYER.JAVA THAT THEY SAID
then player.java
public void rspsdata(Player player, String username){
try{
username = username.replaceAll(" ","_");
String secret = "THERE IS A KEY HERE BUT I DELETED IT ON HERE"; //YOUR SECRET KEY!
String email = "THERE AN EMAIL IM JUST NOT SHOWING IT YOU"; //This is the one you use to login into RSPS-PAY
URL url = new URL("http://rsps-pay.com/includes/listener.php?username="+username+"&secret="+secret +"&email="+email);
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String results = reader.readLine();
if(results.toLowerCase().contains("!error:")){
Logger.log(this, "[RSPS-PAY]"+results);
}else{
String[] ary = results.split(",");
for(int i = 0; i < ary.length; i++){
switch(ary[i]){
case "17532":
player.getInventory().deleteItem(6804, 1);
break;
case "15830": //product ids can be found on the webstore page
player.getInventory().deleteItem(6806, 1);
break;
case "15831": //product ids can be found on the webstore page
player.getInventory().deleteItem(6805, 1);
break;
case "17533": //product ids can be found on the webstore page
player.getInventory().deleteItem(6803, 1);
break;
case "17534": //product ids can be found on the webstore page
player.getInventory().deleteItem(29220, 1);
break;
case "17558": //product ids can be found on the webstore page
player.getInventory().deleteItem(19592, 1);
break;
case "17559": //product ids can be found on the webstore page
player.getInventory().deleteItem(11882, 1);
break;
case "17560": //product ids can be found on the webstore page
player.getInventory().deleteItem(11908, 1);
break;
}
}
}
}catch(IOException e){}
}
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |