Esempio n. 1
0
 /** Adds to the whitelist of the specified town. Used when placing blocks. */
 public static void addToBlockWhitelist(
     Class<? extends TileEntity> te, int dim, int x, int y, int z, Town town) {
   for (Protection prot : Protections.instance.getProtectionList()) {
     if (prot.isTileTracked(te))
       for (FlagType flagType : prot.getFlagsForTile(te)) {
         if (!town.hasBlockWhitelist(dim, x, y, z, flagType)) {
           BlockWhitelist bw = new BlockWhitelist(dim, x, y, z, flagType);
           DatasourceProxy.getDatasource().saveBlockWhitelist(bw, town);
         }
       }
   }
 }