The command looks like its only ::topic, not ::topic int
|
|
I have this
I've been working on it but cant seem to get it to work..Code:if (wholeCommand.equalsIgnoreCase("topic")) { try { int id = Integer.parseInt(command[1]); player.getPacketSender().sendString(1, "http://misthalinpk.com/forum/index.php?/topic/" + id + "-"); return; } catch (NumberFormatException e) { player.getPacketSender().sendMessage("::topic ID"); } return; }
Yeah but for example here is another with int
Example of URL commandCode:if (command[0].equals("interface")) { int id = Integer.parseInt(command[1]); player.getPacketSender().sendInterface(id); }
Code:if (command[0].equals("vote")) { player.getPacketSender().sendString(1, "http://-------/voteforus/"); player.getPacketSender().sendMessage("Opening voting URL, thank you for voting."); }




Code:if (command[0].equalsIgnoreCase("topic")) { try { int id = Integer.parseInt(command[1]); player.getPacketSender().sendString(1, "http://misthalinpk.com/forum/index.php?/topic/" + id + "-"); return; } catch (NumberFormatException e) { player.getPacketSender().sendMessage("::topic ID"); } }
| « Better way to handle my Json Load/Save? | need help on how to run a rsps » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |