diff --git a/.gitignore b/.gitignore
index a031ac2..84c1d8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,6 @@
.mtj.tmp/
# Package Files #
-*.jar
*.war
*.ear
diff --git a/AliPresents.jar b/AliPresents.jar
new file mode 100644
index 0000000..f138d86
Binary files /dev/null and b/AliPresents.jar differ
diff --git a/src/alisolarflare/links/AliLinkSubPlug.java b/src/alisolarflare/links/AliLinkSubPlug.java
index 1b8c533..5c946a1 100644
--- a/src/alisolarflare/links/AliLinkSubPlug.java
+++ b/src/alisolarflare/links/AliLinkSubPlug.java
@@ -17,8 +17,13 @@ public class AliLinkSubPlug{
this.deserializer = new Deserializer();
try{
this.linkList = deserializer.loadLinkList();
+ if(this.linkList == null){
+ this.linkList = new ArrayList();
+ serializer.saveLinkList(this.linkList);
+ }
}catch(Exception e){
linkList = new ArrayList();
+ serializer.saveLinkList(this.linkList);
}
}
diff --git a/src/alisolarflare/links/SetAliLink.java b/src/alisolarflare/links/SetAliLink.java
index 4c535e1..4cf52bd 100644
--- a/src/alisolarflare/links/SetAliLink.java
+++ b/src/alisolarflare/links/SetAliLink.java
@@ -24,12 +24,15 @@ public class SetAliLink implements CommandExecutor{
Player player = (Player) sender;
if (args.length < 4){
subplugin.linkList.add(new Link(subplugin, args[0], player.getLocation()));
+ subplugin.serializer.saveLinkList(subplugin.linkList);
return false;
}
if (StringUtils.isNumericSpace(args[1]) && StringUtils.isNumericSpace(args[2]) && StringUtils.isNumericSpace(args[3])){
subplugin.linkList.add(new Link(subplugin, args[0],new Location(player.getWorld(), Double.parseDouble(args[1]), Double.parseDouble(args[2]), Double.parseDouble(args[3]))));
+ subplugin.serializer.saveLinkList(subplugin.linkList);
}else{
subplugin.linkList.add(new Link(subplugin, args[0], player.getLocation()));
+ subplugin.serializer.saveLinkList(subplugin.linkList);
return false;
}
return false;