Class ItemStackAdapter

java.lang.Object
me.fami6xx.rpuniverse.core.misc.gsonadapters.ItemStackAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<org.bukkit.inventory.ItemStack>, com.google.gson.JsonSerializer<org.bukkit.inventory.ItemStack>

public class ItemStackAdapter extends Object implements com.google.gson.JsonSerializer<org.bukkit.inventory.ItemStack>, com.google.gson.JsonDeserializer<org.bukkit.inventory.ItemStack>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    deserialize​(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context)
     
    com.google.gson.JsonElement
    serialize​(org.bukkit.inventory.ItemStack itemStack, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ItemStackAdapter

      public ItemStackAdapter()
  • Method Details

    • serialize

      public com.google.gson.JsonElement serialize(org.bukkit.inventory.ItemStack itemStack, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<org.bukkit.inventory.ItemStack>
    • deserialize

      public org.bukkit.inventory.ItemStack deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<org.bukkit.inventory.ItemStack>
      Throws:
      com.google.gson.JsonParseException