Examples of TownBlockStatus


Examples of com.palmergames.bukkit.towny.PlayerCache.TownBlockStatus

      // New or old cache permission was null, update it

      try {
        worldCoord = new WorldCoord(TownyUniverse.getDataSource().getWorld(player.getWorld().getName()), Coord.parseCoord(location));

        TownBlockStatus status = cacheStatus(player, worldCoord, getStatusCache(player, worldCoord));
        //plugin.cacheBuild(player, worldCoord, plugin.getPermission(player, status, worldCoord, action));
        triggerCacheCreate(player, location, worldCoord, status, action);

        PlayerCache cache = TownyUniverse.getPlugin().getCache(player);
        cache.updateCoord(worldCoord);
View Full Code Here

Examples of com.palmergames.bukkit.towny.PlayerCache.TownBlockStatus

    PlayerCache cache = plugin.getCache(player);
    //cache.updateCoord(worldCoord);
    try {

      TownBlockStatus status = cache.getStatus();
      if (status == TownBlockStatus.UNCLAIMED_ZONE && wildOverride)
        return;
     
      // Allow item_use if we have an override
      if (((status == TownBlockStatus.TOWN_RESIDENT) && (TownyUniverse.getPermissionSource().hasOwnTownOverride(player, event.getItem().getTypeId(), TownyPermission.ActionType.ITEM_USE)))
View Full Code Here

Examples of com.palmergames.bukkit.towny.PlayerCache.TownBlockStatus

   
    boolean wildOverride = TownyUniverse.getPermissionSource().hasWildOverride(worldCoord.getWorld(), player, block.getTypeId(), TownyPermission.ActionType.SWITCH);

    PlayerCache cache = plugin.getCache(player);
   
    TownBlockStatus status = cache.getStatus();
    if (status == TownBlockStatus.UNCLAIMED_ZONE && wildOverride)
      return;
   
    // Allow item_use if we have an override
    if (((status == TownBlockStatus.TOWN_RESIDENT) && (TownyUniverse.getPermissionSource().hasOwnTownOverride(player, block.getTypeId(), TownyPermission.ActionType.SWITCH)))
View Full Code Here

Examples of com.palmergames.bukkit.towny.PlayerCache.TownBlockStatus

      //Get build permissions (updates if none exist)
      boolean bDestroy = TownyUniverse.getCachePermissions().getCachePermission(player, block.getLocation(), TownyPermission.ActionType.DESTROY);
      boolean wildOverride = TownyUniverse.getPermissionSource().hasWildOverride(worldCoord.getWorld(), player, event.getBlock().getTypeId(), TownyPermission.ActionType.DESTROY);
     
      PlayerCache cache = plugin.getCache(player);
      TownBlockStatus status = cache.getStatus();

      // Allow destroy if we are in wilds and have an override.
      if (((status == TownBlockStatus.UNCLAIMED_ZONE) && (wildOverride)) || ((status == TownBlockStatus.TOWN_RESIDENT) && (plugin.getTownyUniverse().getTownBlock(block.getLocation()).getType() == TownBlockType.WILDS) && (wildOverride)))
        return;
     
View Full Code Here

Examples of com.palmergames.bukkit.towny.PlayerCache.TownBlockStatus

      //Get build permissions (updates if none exist)
      boolean bBuild = TownyUniverse.getCachePermissions().getCachePermission(player, block.getLocation(), TownyPermission.ActionType.BUILD);
      boolean wildOverride = TownyUniverse.getPermissionSource().hasWildOverride(worldCoord.getWorld(), player, event.getBlock().getTypeId(), TownyPermission.ActionType.BUILD);
     
      PlayerCache cache = plugin.getCache(player);
      TownBlockStatus status = cache.getStatus();
     
      // Allow build if in wilds and we have an override
      if (((status == TownBlockStatus.UNCLAIMED_ZONE) && (wildOverride))
        || ((status == TownBlockStatus.TOWN_RESIDENT) && (plugin.getTownyUniverse().getTownBlock(block.getLocation()).getType() == TownBlockType.WILDS) && (wildOverride)))
        return;
View Full Code Here

Examples of com.palmergames.bukkit.towny.PlayerCache.TownBlockStatus

        //Get destroy permissions (updates if none exist)
        boolean bDestroy = TownyUniverse.getCachePermissions().getCachePermission(player, painting.getLocation(), TownyPermission.ActionType.DESTROY);

        PlayerCache cache = plugin.getCache(player);
        cache.updateCoord(worldCoord);
        TownBlockStatus status = cache.getStatus();
        if (status == TownBlockStatus.UNCLAIMED_ZONE && TownyUniverse.getPermissionSource().hasWildOverride(worldCoord.getWorld(), player, painting.getEntityId(), TownyPermission.ActionType.DESTROY))
          return;
        if (!bDestroy)
          event.setCancelled(true);
        if (cache.hasBlockErrMsg())
View Full Code Here

Examples of com.palmergames.bukkit.towny.PlayerCache.TownBlockStatus

    //Get build permissions (updates if none exist)
    boolean bBuild = TownyUniverse.getCachePermissions().getCachePermission(player, painting.getLocation(), TownyPermission.ActionType.BUILD);

    PlayerCache cache = plugin.getCache(player);
    TownBlockStatus status = cache.getStatus();

    if (status == TownBlockStatus.UNCLAIMED_ZONE && TownyUniverse.getPermissionSource().hasWildOverride(worldCoord.getWorld(), player, painting.getEntityId(), TownyPermission.ActionType.BUILD))
      return;

    if (!bBuild)
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.