Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.Ruud.Hunt;
- import org.bukkit.Location;
- import org.bukkit.block.Block;
- import java.util.ArrayList;
- /**
- * @author Ruud.
- */
- public class Hunt {
- private static ArrayList<Hunt> hunts = new ArrayList<>();
- private String name;
- private ArrayList<PressurePlate> pressurePlates = new ArrayList<>();
- public Hunt(String name) {
- this.name = name;
- }
- public static Hunt getHunt(String name) {
- if (!hunts.contains(name)) {
- System.out.println("This hunt isn't created yet.");
- return null;
- }
- return hunts.get(hunts.indexOf(name));
- }
- public void addPressurePlate(Location location, Block block) {
- if (getHunt(name) != null) {
- getHunt(name).pressurePlates.add(new PressurePlate(location, block));
- }
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public ArrayList<PressurePlate> getPressurePlates() {
- return pressurePlates;
- }
- public void setPressurePlates(ArrayList<PressurePlate> pressurePlates) {
- this.pressurePlates = pressurePlates;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement