Guest User

Untitled

a guest
Apr 18th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. @EventHandler
  2. public void arenaSignPlace(SignChangeEvent event)
  3. {
  4.     if(event.getBlock().getType() == Material.WALL_SIGN)
  5.     {
  6.         Sign sign = (Sign) event.getBlock().getState();
  7.            
  8.         Bukkit.getScheduler().runTaskLater(MyMain.getInstance(), () ->
  9.         {
  10.             event.setLine(0, "Hello from");
  11.                
  12.             sign.update(); //wouldnt update if this method wasn't called
  13.                
  14.             System.out.println("Sign's Lines: " + Arrays.toString(sign.getLines())); //prints [, , ,] to the console.
  15.         }, 3 * 20);
  16.     }
  17. }
Add Comment
Please, Sign In to add comment