simple beginner question... need help!! :S

Discussion in 'Plugin Development' started by guitarCraft, Apr 11, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    guitarCraft

    hey there,
    i'm pretty new at this stuff... so excuse me :p
    Code:
      @EventHandler
      public void onPlayerKilled(PlayerDeathEvent event)
      {
          Player p = event.getEntity();
          Location l = event.getEntity().getLocation();
          l.getWorld().strikeLightningEffect(l);
         
      }
    }
    i want a sign to be createt at this location... and than set the lines, please help me.. :p
     
  2. l.getBlock().setType() and set it to the SIGN_POST material...

    Setting lines to signs can be found by searching, I could tell you but I'm not sure if you'd understand.
     
  3. Offline

    SnipsRevival

    You would then want to do

    Code:
    Sign sign = (Sign) l.getBlock().getState();
    sign.setLine(linenumber, string); //linenumber must be 0, 1, 2, or 3
    sign.update();
    
    to add messages onto the sign.
     
Thread Status:
Not open for further replies.

Share This Page