Anon10W1z Posted February 6, 2016 Posted February 6, 2016 I have the following code: String checkMessage = Arrays.stream(event.message.getFormattedText().split(" ")).filter(word -> !word.startsWith("§") || word.startsWith("§f")).collect(Collectors.joining(" ")); System.out.println(checkMessage); This is intended to remove the words that start with '§' but not "§f". However, it turns out when I print checkMessage no words get filtered. §r§928 §r§r§c§lTITAN §r§eSimplyAnon§r §ftest§r Any reasoning behind this? Quote Maker of the Craft++ mod.
Anon10W1z Posted February 6, 2016 Author Posted February 6, 2016 Solved by using the literal "\u00A7" Quote Maker of the Craft++ mod.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.