diff --git a/src/alisolarflare/components/alilinks/AliLinkAPI.java b/src/alisolarflare/components/alilinks/AliLinkAPI.java
new file mode 100644
index 0000000..d957919
--- /dev/null
+++ b/src/alisolarflare/components/alilinks/AliLinkAPI.java
@@ -0,0 +1,60 @@
+package alisolarflare.components.alilinks;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.bukkit.World;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+import org.bukkit.plugin.java.JavaPlugin;
+
+import alisolarflare.components.alilinks.entities.Link;
+
+public class AliLinkAPI {
+ private static List linkList;
+ /**"Usage: /pressalilink "*/
+ public static boolean sendPressEvent(CommandSender sender, String[] inputFrequencies, JavaPlugin plugin) {
+ if (inputFrequencies.length == 0) {
+ sender.sendMessage("You must specify a link frequency");
+ return false;
+ }
+
+ List inputFrequencyList= Arrays.asList(inputFrequencies);
+ for (Link link : linkList) {
+ if(inputFrequencyList.contains(link.frequency)){
+ link.press(plugin);
+ }
+ }
+ sender.sendMessage("Link pressed!");
+ return true;
+ }
+ public static boolean createAliLink(Player player, String[] args) {
+ if (args == null || args.length < 1) {
+ player.sendMessage("You must specify a link frequency");
+ player.sendMessage("/pressalilink [name]");
+ return false;
+ }
+
+ String frequency = args[0];
+ World world = player.getWorld();
+ int x = player.getLocation().getBlockX();
+ int y = player.getLocation().getBlockY();
+ int z = player.getLocation().getBlockZ();
+
+ if (args.length > 4) {
+ boolean arg1isNumber = StringUtils.isNumericSpace(args[1]);
+ boolean arg2isNumber = StringUtils.isNumericSpace(args[2]);
+ boolean arg3isNumber = StringUtils.isNumericSpace(args[3]);
+ if (arg1isNumber && arg2isNumber && arg3isNumber) {
+ x = Integer.parseInt(args[1]);
+ y = Integer.parseInt(args[2]);
+ z = Integer.parseInt(args[3]);
+ }
+ }
+
+ Link link = new Link(frequency, world, x, y, z);
+ linkList.add(link);
+ return true;
+ }
+}
diff --git a/src/alisolarflare/components/alilinks/AliLinkComponent.java b/src/alisolarflare/components/alilinks/AliLinkComponent.java
index 78095d6..8b2e98f 100644
--- a/src/alisolarflare/components/alilinks/AliLinkComponent.java
+++ b/src/alisolarflare/components/alilinks/AliLinkComponent.java
@@ -13,8 +13,8 @@ import alisolarflare.components.alilinks.entities.Link;
public class AliLinkComponent extends Component {
- private List linkList;
private List