PlotSquared icon indicating copy to clipboard operation
PlotSquared copied to clipboard

Can no longer hide messages by putting ""

Open DevJoey opened this issue 3 years ago • 11 comments

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

  • [X] I have included a Plot debugpaste.
  • [X] I am using the newest build from https://www.spigotmc.org/resources/77506/ and the issue still persists.

Anything else?

No response

DevJoey avatar Jul 20 '21 19:07 DevJoey

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.

NotMyFault avatar Jul 22 '21 18:07 NotMyFault

How i can prevent a message from being send?

DevJoey avatar Jul 22 '21 18:07 DevJoey

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

DevJoey avatar Jul 22 '21 18:07 DevJoey

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.

NotMyFault avatar Jul 22 '21 18:07 NotMyFault

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 avatar Jul 22 '21 18:07 DevJoey

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

DevJoey avatar Jul 22 '21 18:07 DevJoey

Feature request

dordsor21 avatar Jul 22 '21 18:07 dordsor21

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

NotMyFault avatar Jul 22 '21 18:07 NotMyFault

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

DevJoey avatar Jul 22 '21 18:07 DevJoey

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)

dordsor21 avatar Aug 08 '21 15:08 dordsor21

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

DevJoey avatar Dec 03 '21 15:12 DevJoey