Examples of canBuild()


Examples of com.sk89q.worldguard.protection.GlobalRegionManager.canBuild()

   
    Location  location  = event.getShop().getLocation();
    Player    player    = event.getPlayer();
   
    GlobalRegionManager  manager   = worldGuard.getGlobalRegionManager();
    boolean        isAllowed  = manager.canBuild(player, location);
   
    if (!isAllowed) {
      event.setCancelled(true);
    }
  }
View Full Code Here

Examples of org.bukkit.event.block.BlockPlaceEvent.canBuild()

    }

    BlockPlaceEvent placeEvent = new BlockPlaceEvent(result, oldState, clicked, item, player, canBuild);
    Bukkit.getPluginManager().callEvent(placeEvent);

    return !placeEvent.isCancelled() && placeEvent.canBuild();
  }

  private void updatePlayerEvent(PlayerEvent event) {
    try {
      Field player = PlayerEvent.class.getDeclaredField("player");
View Full Code Here

Examples of org.bukkit.event.block.BlockPlaceEvent.canBuild()

        newState.update(true);

        // call blockPlace event
        BlockPlaceEvent event = new BlockPlaceEvent(target, oldState, against, holding, player, canBuild);
        EventFactory.callEvent(event);
        if (event.isCancelled() || !event.canBuild()) {
            oldState.update(true);
            return;
        }

        // play a sound effect
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.