Shmeeb

Untitled

Mar 10th, 2018
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. package net.shmeeb.adminshopec.data;
  2.  
  3. import com.google.common.reflect.TypeToken;
  4. import javax.annotation.Generated;
  5. import org.spongepowered.api.data.DataQuery;
  6. import org.spongepowered.api.data.key.Key;
  7. import org.spongepowered.api.data.key.KeyFactory;
  8. import org.spongepowered.api.data.value.mutable.Value;
  9. import org.spongepowered.api.item.inventory.ItemStack;
  10.  
  11. public class Keys {
  12. private Keys() {}
  13.  
  14. public final static Key<Value<ItemStack>> ITEM;
  15. public final static Key<Value<Integer>> COST;
  16. public final static Key<Value<Integer>> AMOUNT;
  17. public final static Key<Value<Boolean>> BUY;
  18. static {
  19. TypeToken<ItemStack> itemStackToken = TypeToken.of(ItemStack.class);
  20. TypeToken<Value<ItemStack>> valueItemStackToken = new TypeToken<Value<ItemStack>>(){};
  21. TypeToken<Integer> integerToken = TypeToken.of(Integer.class);
  22. TypeToken<Value<Integer>> valueIntegerToken = new TypeToken<Value<Integer>>(){};
  23. TypeToken<Boolean> booleanToken = TypeToken.of(Boolean.class);
  24. TypeToken<Value<Boolean>> valueBooleanToken = new TypeToken<Value<Boolean>>(){};
  25. ITEM = KeyFactory.makeSingleKey(itemStackToken, valueItemStackToken, DataQuery.of("Item"), "adminshopec:item", "Item");
  26. COST = KeyFactory.makeSingleKey(integerToken, valueIntegerToken, DataQuery.of("Cost"), "adminshopec:cost", "Cost");
  27. AMOUNT = KeyFactory.makeSingleKey(integerToken, valueIntegerToken, DataQuery.of("Amount"), "adminshopec:amount", "Amount");
  28. BUY = KeyFactory.makeSingleKey(booleanToken, valueBooleanToken, DataQuery.of("Buy"), "adminshopec:buy", "Buy");
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment