Heres my code: Code:java String commandString2 = theSign.getLine(1);if (theSign.getLine(0).equals("[Color]") || theSign.getLine(0).equals(ChatColor.DARK_BLUE +"[Color]") && commandString2.toUpperCase() != "Random"&& commandString2.toUpperCase() != "StrikeThrough" && commandString2.toUpperCase() != "Italicize" && commandString2.toUpperCase() != "Bold") { Its sposto not let players use a sign that says Bold, Italicize, Random, StrikeThrough and those on the second line, Its probably just a small error... Thanks
Meatiex Just to explain Trevor1134 's answer in a bit more detail, == compares whether two objects are the same instance, rather than whether their content is the same.
It didn't work... Code:java if (theSign.getLine(0).equals("[Color]") || theSign.getLine(0).equals(ChatColor.DARK_BLUE +"[Color]") && !commandString2.toUpperCase().equals("StrikeThrough") && !commandString2.toUpperCase().equals("Bold") && !commandString2.toUpperCase().equals("Italicize") && !commandString2.toUpperCase().equals("Random")) {
change "Italicize" to "ITALICIZE", "Random" to "RANDOM" etc. you are comparing string.toUpperCase, so you need to use all uppercase letters.
Sorry to bother, but BOLD works(cant click) and bold dosn't work...(can click) Code:java if (theSign.getLine(0).equals("[Color]") || theSign.getLine(0).equals(ChatColor.DARK_BLUE +"[Color]") && !commandString2.toUpperCase().equals("STRIKETHROUGH")&& !commandString2.toUpperCase().equals("BOLD") && !commandString2.toUpperCase().equals("ITALICIZE") && !commandString2.toUpperCase().equals("RANDOM")) {
I guess that would work... but i fixed it now Code:java if (theSign.getLine(0).equals("[Color]") || theSign.getLine(0).equals(ChatColor.DARK_BLUE +"[Color]")) { if (!commandString2.toUpperCase().equals("STRIKETHROUGH")&& !commandString2.toUpperCase().equals("BOLD") && !commandString2.toUpperCase().equals("ITALICIZE") && !commandString2.toUpperCase().equals("RANDOM")) {