Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-1886

Reading lines from Sign BlockState results in empty string

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Minor Minor
    • None
    • None
    • git-Spigot-b1c1b55-7d73fbb on windows 10 and ubuntu 14 (java 7 and 8)

      Steps to reproduce:

      • Register Listener
      • Create a sign and write something to the first line
        Expected output:
        [19:25:29 INFO]: from event: Line 1
        [19:25:29 INFO]: from blockstate: Line 1
        [19:25:29 INFO]: after update: Line 1
        

        Output:
        [19:25:29 INFO]: from event: Line 1
        [19:25:29 INFO]: from blockstate:
        [19:25:29 INFO]: after update:
        Code:

        SignTest.java
        	@EventHandler
        	public void onSignCreate(SignChangeEvent e) {
        		System.out.println("from event: " + e.getLine(0));
        		Sign s = ((Sign) e.getBlock().getState());
        		System.out.println("from blockstate:" + s.getLine(0));
        		s.update(true);
        		System.out.println("after update:" + s.getLine(0));
        	}
        

            Unassigned Unassigned
            MiniDigger Martin | MiniDigger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: