Examples of PS


Examples of com.massivecraft.mcore.ps.PS

  {
    JsonObject ret = new JsonObject();
   
    for (Entry<PS, TerritoryAccess> entry : src.entrySet())
    {
      PS ps = entry.getKey();
      TerritoryAccess territoryAccess = entry.getValue();
     
      ret.add(ps.getChunkX().toString() + "," + ps.getChunkZ().toString(), context.serialize(territoryAccess, TerritoryAccess.class));
    }
   
    return ret;
  }
View Full Code Here

Examples of com.massivecraft.mcore.ps.PS

  @Override
  public void perform()
  {
    // Args
    World world = me.getWorld();
    PS chunk = PS.valueOf(me).getChunk(true);
    int chunkX = chunk.getChunkX();
    int chunkZ = chunk.getChunkZ();
   
    // Apply
    int blockX;
    int blockZ;
   
    blockX = chunkX*16;
    blockZ = chunkZ*16;
    showPillar(me, world, blockX, blockZ);
   
    blockX = chunkX*16 + 15;
    blockZ = chunkZ*16;
    showPillar(me, world, blockX, blockZ);
   
    blockX = chunkX*16;
    blockZ = chunkZ*16 + 15;
    showPillar(me, world, blockX, blockZ);
   
    blockX = chunkX*16 + 15;
    blockZ = chunkZ*16 + 15;
    showPillar(me, world, blockX, blockZ);
   
    // Inform
    msg("<i>Visualized %s", chunk.toString(PSFormatHumanSpace.get()));
  }
View Full Code Here

Examples of com.massivecraft.mcore.ps.PS

    if (UConf.isDisabled(player)) return;
   
    // ... gather info on the player and the move ...
    UPlayer uplayer = UPlayerColls.get().get(event.getTo()).get(player);
   
    PS chunkFrom = PS.valueOf(event.getFrom()).getChunk(true);
    PS chunkTo = PS.valueOf(event.getTo()).getChunk(true);
   
    Faction factionFrom = BoardColls.get().getFactionAt(chunkFrom);
    Faction factionTo = BoardColls.get().getFactionAt(chunkTo);
   
    // ... and send info onwards.
View Full Code Here

Examples of com.massivecraft.mcore.ps.PS

      eattacker = ((Projectile)eattacker).getShooter();
    }
    if (eattacker.equals(edefender)) return true;
   
    // ... gather defender PS and faction information ...
    PS defenderPs = PS.valueOf(defender);
    Faction defenderPsFaction = BoardColls.get().getFactionAt(defenderPs);
   
    // ... PVP flag may cause a damage block ...
    if (defenderPsFaction.getFlag(FFlag.PVP) == false)
    {
      if (eattacker instanceof Player)
      {
        if (notify)
        {
          UPlayer attacker = UPlayer.get(eattacker);
          attacker.msg("<i>PVP is disabled in %s.", defenderPsFaction.describeTo(attacker));
        }
        return false;
      }
      return defenderPsFaction.getFlag(FFlag.MONSTERS);
    }

    // ... and if the attacker is a player ...
    if (!(eattacker instanceof Player)) return true;
    Player attacker = (Player)eattacker;
    UPlayer fattacker = UPlayer.get(attacker);
   
    // ... does this player bypass all protection? ...
    if (MConf.get().playersWhoBypassAllProtection.contains(attacker.getName())) return true;

    // ... gather attacker PS and faction information ...
    PS attackerPs = PS.valueOf(attacker);
    Faction attackerPsFaction = BoardColls.get().getFactionAt(attackerPs);

    // ... PVP flag may cause a damage block ...
    // (just checking the defender as above isn't enough. What about the attacker? It could be in a no-pvp area)
    // NOTE: This check is probably not that important but we could keep it anyways.
View Full Code Here

Examples of com.massivecraft.mcore.ps.PS

      event.setCancelled(true);
      return;
    }
   
    // ... if there is a faction at the players location ...
    PS ps = PS.valueOf(player).getChunk(true);
    Faction factionAtPs = BoardColls.get().getFactionAt(ps);
    if (factionAtPs.isNone()) return;
   
    // ... the command may be denied in the territory of this relation type ...
    Rel rel = factionAtPs.getRelationTo(uplayer);
View Full Code Here

Examples of com.massivecraft.mcore.ps.PS

   
    // Check Disabled
    if (UConf.isDisabled(event.getLocation())) return;
   
    // ... at a place where monsters are forbidden ...
    PS ps = PS.valueOf(event.getLocation());
    Faction faction = BoardColls.get().getFactionAt(ps);
    if (faction.getFlag(FFlag.MONSTERS)) return;
   
    // ... block the spawn.
    event.setCancelled(true);
View Full Code Here

Examples of com.massivecraft.mcore.ps.PS

   
    // Check Disabled
    if (UConf.isDisabled(target)) return;
   
    // ... at a place where monsters are forbidden ...
    PS ps = PS.valueOf(target);
    Faction faction = BoardColls.get().getFactionAt(ps);
    if (faction.getFlag(FFlag.MONSTERS)) return;
   
    // ... then if ghast target nothing ...
    if (event.getEntityType() == EntityType.GHAST)
View Full Code Here

Examples of com.massivecraft.mcore.ps.PS

   
    // Check Disabled
    if (UConf.isDisabled(entity)) return;

    // ... and the faction there has explosions disabled ...
    PS ps = PS.valueOf(event.getBlock());
    Faction faction = BoardColls.get().getFactionAt(ps);
    if (faction.getFlag(FFlag.EXPLOSIONS)) return;
   
    // ... stop the block alteration.
    event.setCancelled(true);
View Full Code Here

Examples of com.massivecraft.mcore.ps.PS

   
    // Check Disabled
    if (UConf.isDisabled(entity)) return;
   
    // ... and the faction there has endergrief disabled ...
    PS ps = PS.valueOf(event.getBlock());
    Faction faction = BoardColls.get().getFactionAt(ps);
    if (faction.getFlag(FFlag.ENDERGRIEF)) return;
   
    // ... stop the block alteration.
    event.setCancelled(true);
View Full Code Here

Examples of com.massivecraft.mcore.ps.PS

  {
    // Check Disabled
    if (UConf.isDisabled(block)) return;
   
    // If the faction at the block has firespread disabled ...
    PS ps = PS.valueOf(block);
    Faction faction = BoardColls.get().getFactionAt(ps);
     
    if (faction.getFlag(FFlag.FIRESPREAD)) return;
   
    // then cancel the event.
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.