@pur@
|
i was trying to edit my ::alert command.
right now it is
I want to make the [OWNER] look like this [OWNER] in the server. any help?Code:else if (command.startsWith("alert") && playerRights >= 4) { try { String announcement = command.substring(8); PlayerHandler.messageToAll = "[OWNER]" + playerName + command.substring(8); sendMessage("You have successfully sent an announcement."); } catch(Exception e) { sendMessage("Wrong syntax! Use ::announce [ANNOUNCEMENT]."); } }
@pur@
Try this?
Code:String cmd[] = command.split(" "); cmd[0] = cmd[0].toLowerCase(); if (cmd[0].equals("alert") && playerRights > 3) { if (cmd.length > 1) { PlayerHandler.messageToAll = "@pur@[OWNER]@bla@" + playerName + command.substring(cmd[0].length() + 1); } else { sendMessage("Try ::alert hello everyone this is the alert command."); } }
^That should work
Then lookup unborn's color in clients guide.
Hmm,
Try that, not 100% sure it works.Code:else if (command.startsWith("alert") && playerRights >= 4) { try { String announcement = command.substring(8); PlayerHandler.messageToAll = "@blu@[OWNER]" + playerName + command.substring(8); sendMessage("You have successfully sent an announcement."); } catch(Exception e) { sendMessage("Wrong syntax! Use ::announce [ANNOUNCEMENT]."); } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |