-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin work on the Util class for #162 that will allow access to the g…
…enerators in the area.
- Loading branch information
1 parent
7d2af89
commit 554f6ee
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package quantumcraft.util; | ||
|
||
import quantumcraft.net.Location; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class QIGUtil { | ||
private static ArrayList<Location> generators = new ArrayList<Location>(); | ||
|
||
public static ArrayList<Location> getGenerators() { | ||
return generators; | ||
} | ||
|
||
public static void setGenerators(ArrayList<Location> 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(); | ||
} | ||
} |