2nd one is classic ;s change name to like naaah idiot or something hehe...
|
You wont need to edit the yell used by the console because it doesn't use < or >.
First open up Yell.java
Under
AddCode:for(int i = 1; i < len; i ++) {
Code:if(args[i].contains(">") || args[i].contains("<")) { p.getFrames().sendChatMessage(0, "You can't use them symbols"); return; }
Or you can do this
Easy.Code:if(args[i].contains("<euro>")) { p.getFrames().sendChatMessage(0, "Stop trying to crash the server."); return; }
2nd one is classic ;s change name to like naaah idiot or something hehe...
MUCH better way to do it ^Code:if (command[0].equalsIgnoreCase("yell")) { /*if (player.getRights() == 0 && !player.isDonator() && !player.isRespected()) { player.sendMessage("You need to be a donator or respeted to yell."); return; }*/ String yell = getCompleteString(command, 1); String[] badYells = { ">", "<", }; for (int i = 0; i < badYells.length; i++) { if (yell.contains(badYells[i])) { player.sendMessage("You cannot use HTML format while yelling."); return; } } String rank = ""; Misc.formatPlayerNameForDisplay(player.getUsername()); if (player.getRights()==0) { rank = "[Player]["+Misc.formatPlayerNameForDisplay(player.getUsername()+"]"); } if (player.getRights()==1) { rank = "[<b><col=800080>Mod</col></b>] [<img=0>"+Misc.formatPlayerNameForDisplay(player.getUsername()+"]"); } if (player.getRights()==2 && !player.getUsername().equalsIgnoreCase("Tainted")) { rank = "[<b><col=FF0000>Admin</col></b>] [<img=1>"+Misc.formatPlayerNameForDisplay(player.getUsername()+"]"); } if (player.getUsername().equalsIgnoreCase("Tainted")) { rank = "[<b><col=FF0000><shad=000000>Owner</col></shad></b>] [<img=1>"+Misc.formatPlayerNameForDisplay(player.getUsername()+"]"); } //if (player.isRespected() && player.getRights() == 0) { //rank = "[<b><col=FDD017>Legit-Dicer</col></b>] ["+Misc.formatPlayerNameForDisplay(player.getUsername()+"]"); //} String product = rank + ": " + yell;/* if (product.length() > 112) { player.sendMessage("Message too large, try shortening down your message."); return; }*/ for(Player pl : World.getWorld().getPlayers()) { pl.sendMessage(product); } }
Easier doesn't mean something is always better. Most of the time the hardest way is better.
Mate could you post how to fix logout button on legacy src? it doenst work for me and im sure u know it ;P
OT: nice and thx
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |