Build using WorldGuard-Snapshot (fixes maven)

This commit is contained in:
Sn0wStorm 2015-01-09 01:33:30 +01:00
parent 46f9c9dc26
commit 9139d52089
3 changed files with 18 additions and 22 deletions

36
pom.xml
View File

@ -7,6 +7,11 @@
<version>1.3.1</version> <version>1.3.1</version>
<name>Brewery</name> <name>Brewery</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build> <build>
<sourceDirectory>src</sourceDirectory> <sourceDirectory>src</sourceDirectory>
@ -30,8 +35,9 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version> <version>3.1</version>
<configuration> <configuration>
<source>1.7</source> <source>1.6</source>
<target>1.7</target> <target>1.6</target>
<encoding>UTF-8</encoding>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -67,6 +73,11 @@
</snapshots> </snapshots>
</repository> </repository>
<repository>
<id>mcstats-repo</id>
<url>http://repo.mcstats.org/content/repositories/public</url>
</repository>
<repository> <repository>
<id>sk89q-repo</id> <id>sk89q-repo</id>
<url>http://maven.sk89q.com/artifactory/repo/</url> <url>http://maven.sk89q.com/artifactory/repo/</url>
@ -86,8 +97,8 @@
</repository> </repository>
<repository> <repository>
<id>junction-repo</id> <id>ChestShop-repo</id>
<url>http://junction.at/repo/</url> <url>https://github.com/Acrobot/ChestShop-3/tree/master/repo</url>
<snapshots> <snapshots>
<enabled>true</enabled> <enabled>true</enabled>
<updatePolicy>always</updatePolicy> <updatePolicy>always</updatePolicy>
@ -103,19 +114,6 @@
</snapshots> </snapshots>
</repository> </repository>
<repository>
<id>mcstats-repo</id>
<url>http://repo.mcstats.org/content/repositories/public</url>
</repository>
<repository>
<id>sacredlabyrinth-repo</id>
<url>http://repo.sacredlabyrinth.net/artifactory/repo/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
@ -130,7 +128,7 @@
<dependency> <dependency>
<groupId>com.sk89q</groupId> <groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId> <artifactId>worldguard</artifactId>
<version>6.0.0-beta-01</version> <version>6.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
@ -143,7 +141,7 @@
<dependency> <dependency>
<groupId>com.griefcraft</groupId> <groupId>com.griefcraft</groupId>
<artifactId>LWC</artifactId> <artifactId>lwc</artifactId>
<version>4.3.1</version> <version>4.3.1</version>
<scope>compile</scope> <scope>compile</scope>
<type>jar</type> <type>jar</type>

View File

@ -211,10 +211,8 @@ public class P extends JavaPlugin {
try { try {
try { try {
Class.forName("com.sk89q.worldguard.bukkit.RegionContainer"); Class.forName("com.sk89q.worldguard.bukkit.RegionContainer");
log("Using New WorldGuard!");
wg = new WGBarrelNew(); wg = new WGBarrelNew();
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
log("Using Old WorldGuard!");
wg = new WGBarrelOld(); wg = new WGBarrelOld();
} }
} catch (Throwable e) { } catch (Throwable e) {

View File

@ -25,7 +25,7 @@ public class WGBarrelOld implements WGBarrel {
allows = ApplicableRegionSet.class.getMethod("allows", StateFlag.class, LocalPlayer.class); allows = ApplicableRegionSet.class.getMethod("allows", StateFlag.class, LocalPlayer.class);
canBuild = ApplicableRegionSet.class.getMethod("canBuild", LocalPlayer.class); canBuild = ApplicableRegionSet.class.getMethod("canBuild", LocalPlayer.class);
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
P.p.errorLog("Failed to Hook WorldGuard for Barrel Open Permissions!"); P.p.errorLog("Failed to Hook WorldGuard for Barrel Open Permissions! Opening Barrels will NOT work!");
P.p.errorLog("Brewery was tested with version 5.8 to 6.0 of WorldGuard!"); P.p.errorLog("Brewery was tested with version 5.8 to 6.0 of WorldGuard!");
P.p.errorLog("Disable the WorldGuard support in the config and do /brew reload"); P.p.errorLog("Disable the WorldGuard support in the config and do /brew reload");
e.printStackTrace(); e.printStackTrace();