Package com.palmergames.bukkit.towny

Examples of com.palmergames.bukkit.towny.PlayerCache.updateCoord()


    WorldCoord worldCoord;

    try {
      worldCoord = new WorldCoord(TownyUniverse.getDataSource().getWorld(player.getWorld().getName()), Coord.parseCoord(location));
      PlayerCache cache = TownyUniverse.getPlugin().getCache(player);
      cache.updateCoord(worldCoord);

      TownyMessaging.sendDebugMsg("Cache permissions for " + action.toString() + " : " + cache.getCachePermission(action));
      return cache.getCachePermission(action); // || plugin.isTownyAdmin(player); // Throws NullPointerException if the cache is empty

    } catch (NotRegisteredException e) {
View Full Code Here


        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);

        TownyMessaging.sendDebugMsg("New Cache permissions for " + action.toString() + " : " + cache.getCachePermission(action));
        return cache.getCachePermission(action); // || plugin.isTownyAdmin(player);

      } catch (NotRegisteredException e1) {
View Full Code Here

    }
  }

  public TownBlockStatus cacheStatus(Player player, WorldCoord worldCoord, TownBlockStatus townBlockStatus) {
    PlayerCache cache = TownyUniverse.getPlugin().getCache(player);
    cache.updateCoord(worldCoord);
    cache.setStatus(townBlockStatus);

    TownyMessaging.sendDebugMsg(player.getName() + " (" + worldCoord.toString() + ") Cached Status: " + townBlockStatus);
    return townBlockStatus;
  }
View Full Code Here

    return townBlockStatus;
  }

  public void cacheBuild(Player player, WorldCoord worldCoord, boolean buildRight) {
    PlayerCache cache = TownyUniverse.getPlugin().getCache(player);
    cache.updateCoord(worldCoord);
    cache.setBuildPermission(buildRight);

    TownyMessaging.sendDebugMsg(player.getName() + " (" + worldCoord.toString() + ") Cached Build: " + buildRight);
  }
View Full Code Here

    TownyMessaging.sendDebugMsg(player.getName() + " (" + worldCoord.toString() + ") Cached Build: " + buildRight);
  }

  public void cacheDestroy(Player player, WorldCoord worldCoord, boolean destroyRight) {
    PlayerCache cache = TownyUniverse.getPlugin().getCache(player);
    cache.updateCoord(worldCoord);
    cache.setDestroyPermission(destroyRight);

    TownyMessaging.sendDebugMsg(player.getName() + " (" + worldCoord.toString() + ") Cached Destroy: " + destroyRight);
  }
View Full Code Here

    TownyMessaging.sendDebugMsg(player.getName() + " (" + worldCoord.toString() + ") Cached Destroy: " + destroyRight);
  }

  public void cacheSwitch(Player player, WorldCoord worldCoord, boolean switchRight) {
    PlayerCache cache = TownyUniverse.getPlugin().getCache(player);
    cache.updateCoord(worldCoord);
    cache.setSwitchPermission(switchRight);

    TownyMessaging.sendDebugMsg(player.getName() + " (" + worldCoord.toString() + ") Cached Switch: " + switchRight);
  }
View Full Code Here

    TownyMessaging.sendDebugMsg(player.getName() + " (" + worldCoord.toString() + ") Cached Switch: " + switchRight);
  }

  public void cacheItemUse(Player player, WorldCoord worldCoord, boolean itemUseRight) {
    PlayerCache cache = TownyUniverse.getPlugin().getCache(player);
    cache.updateCoord(worldCoord);
    cache.setItemUsePermission(itemUseRight);

    TownyMessaging.sendDebugMsg(player.getName() + " (" + worldCoord.toString() + ") Cached Item Use: " + itemUseRight);
  }
View Full Code Here

        //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);
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.