Package com.massivecraft.mcore.xlib.gson

Examples of com.massivecraft.mcore.xlib.gson.JsonElement


      if (!meta.hasTitle()) return;
      json.addProperty(BOOK_TITLE, meta.getTitle());
    }
    else
    {
      JsonElement element = json.get(BOOK_TITLE);
      if (element == null) return;
      meta.setTitle(element.getAsString());
    }
  }
View Full Code Here


      if (!meta.hasTitle()) return;
      json.addProperty(BOOK_AUTHOR, meta.getAuthor());
    }
    else
    {
      JsonElement element = json.get(BOOK_AUTHOR);
      if (element == null) return;
      meta.setAuthor(element.getAsString());
    }
  }
View Full Code Here

      if (!meta.hasTitle()) return;
      json.add(BOOK_PAGES, convertStringList(meta.getPages()));
    }
    else
    {
      JsonElement element = json.get(BOOK_PAGES);
      if (element == null) return;
      meta.setPages(convertStringList(element));
    }
  }
View Full Code Here

      json.addProperty(LEATHER_ARMOR_COLOR, color.asRGB());
    }
    else
    {
      JsonElement element = json.get(LEATHER_ARMOR_COLOR);
      if (element == null) return;
      meta.setColor(Color.fromRGB(element.getAsInt()));
    }
  }
View Full Code Here

      if (!meta.isScaling()) return;
      json.addProperty(MAP_SCALING, true);
    }
    else
    {
      JsonElement element = json.get(MAP_SCALING);
      if (element == null) return;

      meta.setScaling(element.getAsBoolean());
    }
  }
View Full Code Here

      if (!meta.hasCustomEffects()) return;
      json.add(POTION_EFFECTS, convertPotionEffectList(meta.getCustomEffects()));
    }
    else
    {
      JsonElement element = json.get(POTION_EFFECTS);
      if (element == null) element = json.get(POTION_EFFECTS_OLD);
      if (element == null) return;

      meta.clearCustomEffects();
      for (PotionEffect pe : convertPotionEffectList(element))
View Full Code Here

      if (!meta.hasOwner()) return;
      json.addProperty(SKULL_OWNER, meta.getOwner());
    }
    else
    {
      JsonElement element = json.get(SKULL_OWNER);
      if (element == null) return;
      meta.setOwner(element.getAsString());
    }
  }
View Full Code Here

      if (!meta.hasEffect()) return;
      json.add(FIREWORK_EFFECT, FireworkEffectAdapter.toJson(meta.getEffect()));
    }
    else
    {
      JsonElement element = json.get(FIREWORK_EFFECT);
      if (element == null) return;
      meta.setEffect(FireworkEffectAdapter.fromJson(element));
    }
  }
View Full Code Here

      if (!meta.hasEffects()) return;
      json.add(FIREWORK_EFFECTS, convertFireworkEffectList(meta.getEffects()));
    }
    else
    {
      JsonElement element = json.get(FIREWORK_EFFECTS);
      if (element == null) return;
      meta.clearEffects();
      meta.addEffects(convertFireworkEffectList(element));
    }
  }
View Full Code Here

    {
      json.addProperty(FIREWORK_FLIGHT, meta.getPower());
    }
    else
    {
      JsonElement element = json.get(FIREWORK_FLIGHT);
      if (element == null) return;
      meta.setPower(element.getAsInt());
    }
  }
View Full Code Here

TOP

Related Classes of com.massivecraft.mcore.xlib.gson.JsonElement

Copyright © 2018 www.massapicom. 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.