Пример #1
0
 public static boolean perform(String multiFxString, Location location) {
   List<Entry<Fx, String>> fxDatas = Fx.parseMultiFxString(multiFxString);
   if (Fx.parseMultiErrors.size() != 0) return false;
   for (Entry<Fx, String> fxData : fxDatas) {
     Fx.perform(fxData.getKey(), fxData.getValue(), location);
   }
   return true;
 }
Пример #2
0
 public static void perform(Fx fx, String dataString, Entity entity) {
   Collection<Location> locations;
   if (!fx.hasSound && (entity instanceof HumanEntity)) {
     locations =
         Arrays.asList(
             entity.getLocation(),
             entity.getLocation().getBlock().getRelative(BlockFace.UP).getLocation());
   } else {
     locations = Arrays.asList(entity.getLocation());
   }
   perform(fx, dataString, locations);
 }
Пример #3
0
  public static void perform(Fx fx, String dataString, Gate gate) {
    Collection<Location> locations;
    if (fx.hasSound) {
      locations = Arrays.asList(gate.calcGateCenter());
    } else {
      locations = new ArrayList<Location>(gate.getContent().size());
      for (PS coord : gate.getContent()) {
        try {
          locations.add(coord.asBukkitLocation(true));
        } catch (Exception e) {

        }
      }
    }
    perform(fx, dataString, locations);
  }
Пример #4
0
 public static void perform(Fx fx, String dataString, Location location) {
   perform(fx, dataString, Arrays.asList(location));
 }