Examples of SignChangeEvent


Examples of keepcalm.mods.events.events.SignChangeEvent

*
*/
public class ForgeEventHelper {
 
  public static Packet130UpdateSign onSignChange(NetServerHandler handler, Packet130UpdateSign pack) {
    SignChangeEvent ev = new SignChangeEvent(pack.xPosition, pack.yPosition, pack.zPosition, handler.getPlayer(), pack.signLines);
    MinecraftForge.EVENT_BUS.post(ev);
   
    if (ev.isCanceled()) {
      return null;
    }
    pack.signLines = ev.lines;
   
    return pack;
View Full Code Here

Examples of org.bukkit.event.block.SignChangeEvent

            if(signs.containsKey(player.getName())) {

                Sign s = (Sign) event.getClickedBlock().getState();
                String[] lines = signs.get(player.getName());

                SignChangeEvent sev = new SignChangeEvent(event.getClickedBlock(), event.getPlayer(), lines);
                Bukkit.getPluginManager().callEvent(sev);

                if(!sev.isCancelled()) {
                    for(int i = 0; i < lines.length; i++)
                        s.setLine(i, lines[i]);
                    s.update();
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.