PlasmaVNGaming

Untitled

Aug 23rd, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. package com.gmail.plasmavn.fusionitems.service;
  2.  
  3. import org.bukkit.inventory.ItemStack;
  4.  
  5. public class Fusion extends MaterialFusion {
  6.  
  7. private ItemStack result;
  8. private int points;
  9.  
  10. public Fusion(ItemStack itemone, ItemStack itemtwo, ItemStack result, int points) {
  11. super(itemone, itemtwo);
  12. this.result = result;
  13. this.points = points;
  14. }
  15.  
  16. public ItemStack getResult() {
  17. return result;
  18. }
  19.  
  20. public int getPoints() {
  21. return points;
  22. }
  23.  
  24. @Override
  25. public String toString() {
  26. StringBuilder toString = new StringBuilder("Fusion{MaterialFusion{").append(getItemOne().toString() + " - " + getItemTwo().toString() + "}, " + result.toString() + ", " + points + "}");
  27. return toString.toString();
  28. }
  29.  
  30. @Override
  31. public int hashCode() {
  32. int hash = 0;
  33.  
  34. hash = hash + 24 * getItemOne().hashCode();
  35. hash = hash + 24 * getItemTwo().hashCode();
  36. hash = hash + 24 * result.hashCode();
  37. hash = hash + 8 * points;
  38.  
  39. return hash;
  40. }
  41.  
  42.  
  43. }
Add Comment
Please, Sign In to add comment