Add module: NCPCompatBukkit

Seems better to have a dedicated module for this as well, since other
modules might be built against different versions of the Bukkit-API,
potentially.
This commit is contained in:
asofold 2013-02-28 03:40:40 +01:00
parent 15f3b38248
commit da4b142aa9
6 changed files with 45 additions and 1 deletions

32
NCPCompatBukkit/pom.xml Normal file
View File

@ -0,0 +1,32 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatbukkit</artifactId>
<packaging>jar</packaging>
<name>NCPCompatBukkit</name>
<version>static</version>
<parent>
<groupId>fr.neatmonster</groupId>
<artifactId>nocheatplus-parent</artifactId>
<version>static</version>
</parent>
<dependencies>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompat</artifactId>
<version>static</version>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>LATEST</version>
</dependency>
</dependencies>
<description>Compatibility for using the Bukkit API only.
Version updating is done for NCPPlugin mainly, expect the other poms version to change randomly rather.</description>
</project>

View File

@ -45,6 +45,11 @@
<artifactId>ncpcompat</artifactId> <artifactId>ncpcompat</artifactId>
<version>static</version> <version>static</version>
</dependency> </dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatbukkit</artifactId>
<version>static</version>
</dependency>
<dependency> <dependency>
<groupId>fr.neatmonster</groupId> <groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatcb2511</artifactId> <artifactId>ncpcompatcb2511</artifactId>
@ -123,6 +128,7 @@
<include>fr.neatmonster:ncpbuildbase</include> <include>fr.neatmonster:ncpbuildbase</include>
<include>fr.neatmonster:ncpcommons</include> <include>fr.neatmonster:ncpcommons</include>
<include>fr.neatmonster:ncpcompat</include> <include>fr.neatmonster:ncpcompat</include>
<include>fr.neatmonster:ncpcompatbukkit</include>
<include>fr.neatmonster:ncpcompatcb2511</include> <include>fr.neatmonster:ncpcompatcb2511</include>
<include>fr.neatmonster:ncpcompatcb2512</include> <include>fr.neatmonster:ncpcompatcb2512</include>
<include>fr.neatmonster:ncpcompatcb2545</include> <include>fr.neatmonster:ncpcompatcb2545</include>

View File

@ -44,6 +44,7 @@ public class MCAccessFactory {
// }; // };
// // TEST END // // // TEST END //
// 1.4.7
try{ try{
return new MCAccessCB2602(); return new MCAccessCB2602();
} }
@ -51,6 +52,7 @@ public class MCAccessFactory {
throwables.add(t); throwables.add(t);
}; };
// 1.4.6
try{ try{
return new MCAccessCB2545(); return new MCAccessCB2545();
} }
@ -58,6 +60,7 @@ public class MCAccessFactory {
throwables.add(t); throwables.add(t);
}; };
// 1.4.5-R1.0
try{ try{
return new MCAccessCB2512(); return new MCAccessCB2512();
} }
@ -65,6 +68,7 @@ public class MCAccessFactory {
throwables.add(t); throwables.add(t);
}; };
// 1.4.2 ... 1.4.5 (up to CB2511).
try{ try{
return new MCAccessCB2511(); return new MCAccessCB2511();
} }
@ -73,7 +77,7 @@ public class MCAccessFactory {
}; };
} }
// Try to set up api-only access. // Try to set up api-only access (ca. 1.4.7).
try{ try{
final String msg; final String msg;
if (bukkitOnly){ if (bukkitOnly){
@ -94,6 +98,7 @@ public class MCAccessFactory {
}; };
// All went wrong. // All went wrong.
// TODO: Fall-back solution (disable plugin, disable checks).
LogUtil.logSevere("[NoCheatPlus] Your version of NoCheatPlus does not seem to provide support for either your Minecraft version or your specific server-mod."); LogUtil.logSevere("[NoCheatPlus] Your version of NoCheatPlus does not seem to provide support for either your Minecraft version or your specific server-mod.");
for (String msg : updateLocs){ for (String msg : updateLocs){
LogUtil.logSevere(msg); LogUtil.logSevere(msg);

View File

@ -15,6 +15,7 @@
<module>NCPBuildBase</module> <module>NCPBuildBase</module>
<module>NCPCommons</module> <module>NCPCommons</module>
<module>NCPCompat</module> <module>NCPCompat</module>
<module>NCPCompatBukkit</module>
<module>NCPCompatCB2511</module> <module>NCPCompatCB2511</module>
<module>NCPCompatCB2512</module> <module>NCPCompatCB2512</module>
<module>NCPPlugin</module> <module>NCPPlugin</module>