Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Broken Sign #103

Open
DarkPizza opened this issue Jul 25, 2022 · 4 comments · Fixed by #108
Open

Broken Sign #103

DarkPizza opened this issue Jul 25, 2022 · 4 comments · Fixed by #108
Labels
bug Something isn't working devfixed This issue has been fixed in dev builds and will not be present in the next release.

Comments

@DarkPizza
Copy link

DarkPizza commented Jul 25, 2022

Describe the bug
A clear and concise description of what the bug is.
I am trying to get the contents of a sign using WindSpigot, but it doesn't return all the contents of the line I want on the sign.

Bug on latest
Is the bug on the latest version of WindSpigot?
Yes.

To Reproduce
Steps to reproduce the behavior:

@EventHandler
public void onInteract(final PlayerInteractEvent e) {
	Block b = e.getClickedBlock();
	if (b.getType() == Material.WALL_SIGN || b.getType() == Material.SIGN_POST) {
		Sign sign = (Sign) b.getState();

		System.out.println(sign.getLine(2));
	}
}

Assuming my sign looks like this:

Store
C 1
1
Cobblestone

My println is returning only "C", without printing the number that came right after the "C".

Expected behavior
A clear and concise description of what you expected to happen.
It should print ALL the contents of the sign line, which in this case would be "C 1".

Screenshots
If applicable, add screenshots to help explain your problem.
The texts already explain enough!

I would like to apologize if I did something wrong in this Issue, it's my first time opening an Issue on Github!

@windcolor-dev windcolor-dev added the bug Something isn't working label Jul 26, 2022
@rektbydead
Copy link
Contributor

rektbydead commented Jul 27, 2022

Let me guess, "C" and "1" are colored different?

@DarkPizza
Copy link
Author

Let me guess, "C" and "1" are colored different?

Yes.

@rektbydead
Copy link
Contributor

A few weeks ago, I reported this bug. It have tried it on Paper and it doesn't happen.
This bug only occurs whenever a line has more than one color.
If the whole line is colored the same, this bug doesn't happen.

So in the example you gave, imagine the line is colored this way:
§cC §71

The output is: "§cC " (The space before the quote is there for a reason)

@windcolor-dev
Copy link
Member

This is fixed in the latest dev build and will be fixed in the next release.

@windcolor-dev windcolor-dev reopened this Aug 3, 2022
@windcolor-dev windcolor-dev added the devfixed This issue has been fixed in dev builds and will not be present in the next release. label Aug 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working devfixed This issue has been fixed in dev builds and will not be present in the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants