Added compatibility check to MultiversePlugin

This commit is contained in:
main() 2012-06-26 20:11:24 +02:00
parent 144de09423
commit b10a37f232
2 changed files with 7 additions and 1 deletions

View File

@ -102,7 +102,7 @@ import java.util.logging.Logger;
* The implementation of the Multiverse-{@link Core}.
*/
public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
private static final int PROTOCOL = 14;
private static final int PROTOCOL = 15;
// TODO: Investigate if this one is really needed to be static.
// Doubt it. -- FernFerret
private static Map<String, String> teleportQueue = new HashMap<String, String>();

View File

@ -41,6 +41,12 @@ public abstract class MultiversePlugin extends JavaPlugin implements MVPlugin {
this.getServer().getPluginManager().disablePlugin(this);
return;
}
if (theCore.getProtocolVersion() < this.getProtocolVersion()) {
this.getLogger().severe("You need a newer version of Multiverse-Core!");
this.getLogger().severe("Disabling!");
this.getServer().getPluginManager().disablePlugin(this);
return;
}
this.setCore(theCore);
// Turn on Logging