Advertisement
MsGamerHD

Untitled

Jul 24th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.87 KB | None | 0 0
  1. package de.msgamerhd.lostisland.insel;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. import org.bukkit.entity.Player;
  6. import org.bukkit.inventory.ItemStack;
  7.  
  8. /**
  9.  * Class created by MsGamerHD on 25.07.2016
  10.  */
  11. public enum Quests {
  12.  
  13.     STRANDQUEST(NPCTypes.SEEMANN, "§7§lStrandquest", 0, 30, "Hallo %player BLABLA.", "Scoreboard Zeile 1\nScoreboard Zeile 2", 200, ArrayList mit Itemstacks für belohnung),
  14.    
  15.     WAHRERHELFER(NPCTypes.BERGARBEITER, "§7§lWahrer Helfer", 0, 30, "Hallo %player BLABLA.", "Scoreboard Zeile 1", 150, ArrayList mit Itemstacks für belohnung);
  16.  
  17.     NPCTypes npc;
  18.     String name;
  19.     int level;
  20.     int zeit;
  21.     String nachricht;
  22.     String beschreibung;
  23.     int belohnungEP;
  24.     ArrayList<ItemStack> belohnungItems;
  25.    
  26.     private Quests(String name, int level, int zeit, String nachricht, String beschreibung, ArrayList<ItemStack> belohnungItems, int belohnungEP) {
  27.         this.name = name;
  28.         this.level = level;
  29.         this.zeit = zeit;
  30.         this.nachricht = nachricht;
  31.         this.beschreibung = beschreibung;
  32.         this.belohnungItems = belohnungItems;
  33.         this.belohnungEP = belohnungEP;
  34.     }
  35.    
  36.     public String getName(){
  37.         return name;
  38.     }
  39.    
  40.     public int getFreigabeLevel(){
  41.         return level;
  42.     }
  43.    
  44.     public int getZeitlimit(){
  45.         return zeit;
  46.     }
  47.    
  48.     public String getNachricht(){
  49.         return nachricht;
  50.     }
  51.    
  52.     public ArrayList<String> getBeschreibung(){
  53.         ArrayList<String> scores = new ArrayList<>();
  54.        
  55.         String[] beschreibungarray = beschreibung.split("\n");
  56.         for(int i = 0; i < beschreibungarray.length; i++){
  57.             scores.add(beschreibungarray[i]);
  58.         }
  59.        
  60.         return scores;
  61.     }
  62.    
  63.     public int getBelohnungEP(){
  64.         return belohnungEP;
  65.     }
  66.    
  67.     public ArrayList<ItemStack> getBelohnungItems(){
  68.         return belohnungItems;
  69.     }
  70.    
  71.     public void addBelohnungItems(Player p){
  72.         if(!getBelohnungItems().isEmpty()){
  73.             for(ItemStack is : getBelohnungItems()){
  74.                 p.getInventory().addItem(is);
  75.             }
  76.         }
  77.     }
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement