diff --git a/pom.xml b/pom.xml
index 0e7ff9c..ee37bb8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,14 +4,16 @@
4.0.0
de.craftinc
CraftincBorderProtection
+ Craft Inc. BorderProtection
jar
- 1.1.1
+ 2.0-beta
UTF-8
+ ${project.name} ${project.version}
src/main/resources
@@ -57,14 +59,14 @@
org.bukkit
bukkit
- 1.5-R0.1-SNAPSHOT
+ 1.5.2-R0.1
jar
compile
org.bukkit
craftbukkit
- 1.5-R0.1-SNAPSHOT
+ 1.5.2-R0.1
jar
compile
diff --git a/scripts/test-deployment.sh b/scripts/test-deployment.sh
index 8c5b9d3..6cbb457 100755
--- a/scripts/test-deployment.sh
+++ b/scripts/test-deployment.sh
@@ -6,15 +6,15 @@ BUKKIT_DIR="$SCRIPT_DIR/../bukkit-testserver"
PLUGIN_DIR="$SCRIPT_DIR/../bukkit-testserver/plugins"
# TODO: This is a bad solution! Maven should write necessary information into an extra file.
-ARTIFACT_ID="$(grep -C3 'de.craftinc' "$SCRIPT_DIR/../pom.xml" | grep '' | sed 's/\s*//g' | sed 's/<\/artifactId>\s*//g')"
+ARTIFACT_ID="$(grep -C5 'de.craftinc' "$SCRIPT_DIR/../pom.xml" | grep '' | sed 's/\s*//g' | sed 's/<\/name>\s*//g')"
# TODO: This is a bad solution! Maven should write necessary information into an extra file.
-VERSION="$(grep -C3 'de.craftinc' "$SCRIPT_DIR/../pom.xml" | grep '' | sed 's/\s*//g' | sed 's/<\/version>\s*//g')"
+VERSION="$(grep -C5 'de.craftinc' "$SCRIPT_DIR/../pom.xml" | grep '' | sed 's/\s*//g' | sed 's/<\/version>\s*//g')"
mkdir -p "$PLUGIN_DIR"
-cp "$SCRIPT_DIR/../target/$ARTIFACT_ID-$VERSION".jar "$PLUGIN_DIR/$ARTIFACT_ID".jar
+cp "$SCRIPT_DIR/../target/$ARTIFACT_ID $VERSION".jar "$PLUGIN_DIR/"
echo -e "ddidderr\nmice_on_drugs\nMochaccino" > "$BUKKIT_DIR/ops.txt"
diff --git a/src/main/java/de/craftinc/borderprotection/Border.java b/src/main/java/de/craftinc/borderprotection/Border.java
deleted file mode 100644
index 47f5485..0000000
--- a/src/main/java/de/craftinc/borderprotection/Border.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Craft Inc. BorderProtection
- Copyright (C) 2013 Paul Schulze, Tobias Ottenweller
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-package de.craftinc.borderprotection;
-
-import org.bukkit.Location;
-import org.bukkit.World;
-import org.bukkit.configuration.file.FileConfiguration;
-import org.bukkit.configuration.file.YamlConfiguration;
-import org.bukkit.configuration.serialization.ConfigurationSerializable;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-public class Border implements ConfigurationSerializable
-{
- private static final String dataFileName = "borders.yml";
-
-
- private Boolean isActive;
- private static String isActiveKey = "enabled";
-
- private Location rectPoint1;
- private static String rectPoint1Name = "p1";
-
- private Location rectPoint2;
- private static String rectPoint2Name = "p2";
-
-
- private static String rectBordersKey = "rectBorders";
-
- private static final HashMap borders = new HashMap();
-
- private static File bordersFile = new File(Plugin.getPlugin().getDataFolder(), dataFileName);
- private static FileConfiguration bordersFileConf = YamlConfiguration.loadConfiguration(bordersFile);
-
- public static HashMap getBorders()
- {
- return borders;
- }
-
- public Location getRectPoint1()
- {
- return rectPoint1;
- }
-
- public Location getRectPoint2()
- {
- return rectPoint2;
- }
-
- public Boolean isActive()
- {
- return isActive;
- }
-
- @SuppressWarnings("unchecked unused")
- public Border( Map map )
- {
- try
- {
- rectPoint1 = LocationSerializer.deserializeLocation((Map) map.get(rectPoint1Name));
- rectPoint2 = LocationSerializer.deserializeLocation((Map) map.get(rectPoint2Name));
-
- isActive = (Boolean) map.get(isActiveKey);
-
- if ( rectPoint1.getWorld().equals(rectPoint2.getWorld()) )
- {
- borders.put(rectPoint1.getWorld(), this);
- }
- else
- {
- throw new Exception("Border points are at different worlds.");
- }
- }
- catch ( Exception e )
- {
- Plugin.getPlugin().getLogger().severe(e.getMessage());
- }
- }
-
- public Border( Location p1, Location p2 ) throws Exception
- {
- rectPoint1 = p1;
- rectPoint2 = p2;
-
- // new border is active by default
- isActive = true;
-
- if ( rectPoint1.getWorld().equals(rectPoint2.getWorld()) )
- {
- borders.put(rectPoint1.getWorld(), this);
- }
- else
- {
- throw new Exception("Border points are at different worlds.");
- }
- }
-
-
- @SuppressWarnings("unused")
- public Map serialize()
- {
- Map map = new HashMap();
- map.put(rectPoint1Name, LocationSerializer.serializeLocation(rectPoint1));
- map.put(rectPoint2Name, LocationSerializer.serializeLocation(rectPoint2));
- map.put(isActiveKey, isActive);
-
- return map;
- }
-
- public static void loadBorders()
- {
- bordersFileConf.getList(rectBordersKey);
- }
-
- public static void saveBorders() throws IOException
- {
- bordersFileConf.set(rectBordersKey, new ArrayList