Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.msgamerhd.lostisland.insel;
- import java.util.ArrayList;
- import org.bukkit.entity.Player;
- import org.bukkit.inventory.ItemStack;
- /**
- * Class created by MsGamerHD on 25.07.2016
- */
- public enum Quests {
- STRANDQUEST(NPCTypes.SEEMANN, "§7§lStrandquest", 0, 30, "Hallo %player BLABLA.", "Scoreboard Zeile 1\nScoreboard Zeile 2", 200, ArrayList mit Itemstacks für belohnung),
- WAHRERHELFER(NPCTypes.BERGARBEITER, "§7§lWahrer Helfer", 0, 30, "Hallo %player BLABLA.", "Scoreboard Zeile 1", 150, ArrayList mit Itemstacks für belohnung);
- NPCTypes npc;
- String name;
- int level;
- int zeit;
- String nachricht;
- String beschreibung;
- int belohnungEP;
- ArrayList<ItemStack> belohnungItems;
- private Quests(String name, int level, int zeit, String nachricht, String beschreibung, ArrayList<ItemStack> belohnungItems, int belohnungEP) {
- this.name = name;
- this.level = level;
- this.zeit = zeit;
- this.nachricht = nachricht;
- this.beschreibung = beschreibung;
- this.belohnungItems = belohnungItems;
- this.belohnungEP = belohnungEP;
- }
- public String getName(){
- return name;
- }
- public int getFreigabeLevel(){
- return level;
- }
- public int getZeitlimit(){
- return zeit;
- }
- public String getNachricht(){
- return nachricht;
- }
- public ArrayList<String> getBeschreibung(){
- ArrayList<String> scores = new ArrayList<>();
- String[] beschreibungarray = beschreibung.split("\n");
- for(int i = 0; i < beschreibungarray.length; i++){
- scores.add(beschreibungarray[i]);
- }
- return scores;
- }
- public int getBelohnungEP(){
- return belohnungEP;
- }
- public ArrayList<ItemStack> getBelohnungItems(){
- return belohnungItems;
- }
- public void addBelohnungItems(Player p){
- if(!getBelohnungItems().isEmpty()){
- for(ItemStack is : getBelohnungItems()){
- p.getInventory().addItem(is);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement