From 554f6eed8f9fe776644c2d196af471f985073663 Mon Sep 17 00:00:00 2001 From: hunterboerner Date: Tue, 24 Dec 2013 13:59:47 -0600 Subject: [PATCH] Begin work on the Util class for #162 that will allow access to the generators in the area. --- src/main/java/quantumcraft/util/QIGUtil.java | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/main/java/quantumcraft/util/QIGUtil.java diff --git a/src/main/java/quantumcraft/util/QIGUtil.java b/src/main/java/quantumcraft/util/QIGUtil.java new file mode 100644 index 0000000..5d389e6 --- /dev/null +++ b/src/main/java/quantumcraft/util/QIGUtil.java @@ -0,0 +1,29 @@ +package quantumcraft.util; + +import quantumcraft.net.Location; + +import java.util.ArrayList; + +public class QIGUtil { + private static ArrayList generators = new ArrayList(); + + public static ArrayList getGenerators() { + return generators; + } + + public static void setGenerators(ArrayList generators) { + QIGUtil.generators = generators; + } + + public static boolean addGenerator(Location location) { + return generators.add(location); + } + + public static Location removeGenerator(int index) { + return generators.remove(index); + } + + public static void clearGenerators() { + generators.clear(); + } +}