IntellectualSites / PlotSquared

PlotSquared - Reinventing the plotworld
GNU General Public License v3.0
540 stars 733 forks source link

Can no longer hide messages by putting "" #3167

Open DevJoey opened 3 years ago

DevJoey commented 3 years ago

Server Implementation

Paper

Server Version

1.16.5

Describe the bug

On old p2 versions i can prevent messages from being send by simple putting an empty string. In p2v6 this is not possible and it shows me a ugly empty line.

To Reproduce

Go to a message and put ""

Expected behaviour

Normally it must remove the message and not send an empty line

Screenshots / Videos

No response

Error log (if applicable)

No response

Plot Debugpaste

https://athion.net/ISPaster/paste/view/8fdd867e880a4cbc8ba5aaf64b271e83

PlotSquared Version

6.0.6

Checklist

Anything else?

No response

NotMyFault commented 3 years ago

Using a non escaped "" as message doesn't void it but parses an empty string, because that's what the input is. Whether messages are send or not is not opt-in-able where an empty string would be the opt-out.

DevJoey commented 3 years ago

How i can prevent a message from being send?

DevJoey commented 3 years ago

In old p2 i can simple put empty string and it will hide the message. How i can do that in v6?

NotMyFault commented 3 years ago

Using a non escaped "" as message doesn't void it but parses an empty string, because that's what the input is.

Please see my previous response. Parsing an empty string will be treated like an empty string.

DevJoey commented 3 years ago

Leaving the message empty hides it on normal messages but i want to remove the help footer and if i leave the help foot empty, it dont hide them

grafik

grafik

DevJoey commented 3 years ago

Can you please fix that, so that i can hide the help footer/header by leaving it empty? Would be nice

dordsor21 commented 3 years ago

Feature request

NotMyFault commented 3 years ago

Turning this in a feature request, parsing the empty string works well. Component#newline() inevitably will print a new line, as requested.

DevJoey commented 3 years ago

Turning this in a feature request, parsing the empty string works well. Component#newline() inevitably will print a new line, as requested.

Yea on normal messages i can simply hide them by leaving it empty. But this does not work in help header/footer

dordsor21 commented 3 years ago

This does actually work on most captions. It seems specific ones don't allow for this (where a builder is used to have it all sent as a multi-line message)

DevJoey commented 2 years ago

Would be nice if this gets implemented for help header and footer because if i update my server, i need this to make p2 fit my servers design