mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-09 01:37:37 +01:00
Added compatibility check to MultiversePlugin
This commit is contained in:
parent
144de09423
commit
b10a37f232
@ -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>();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user