Guest User

FancyHoverEvent.java

a guest
Feb 15th, 2018
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import YOUR.PACKAGE.HERE.FancyTextComponent;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. public class FancyHoverEvent {
  6.  
  7.     private ArrayList<FancyTextComponent> text = new ArrayList<>();
  8.  
  9.     public FancyHoverEvent(FancyTextComponent fancyTextComponent) {
  10.         fancyTextComponent.clearEvents();
  11.         this.text.add(fancyTextComponent);
  12.     }
  13.  
  14.     public static FancyHoverEvent fancyHoverEvent(FancyTextComponent fancyTextComponent) {
  15.         return new FancyHoverEvent(fancyTextComponent);
  16.     }
  17.  
  18.     public void addText(FancyTextComponent fancyTextComponent) {
  19.         fancyTextComponent.clearEvents();
  20.         this.text.add(fancyTextComponent);
  21.     }
  22.  
  23.     public ArrayList<FancyTextComponent> getText() {
  24.         return text;
  25.     }
  26. }
RAW Paste Data