mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-03 23:07:55 +01:00
Add more api items
This commit is contained in:
parent
f3cd433e80
commit
8fe128ec0f
@ -10,6 +10,7 @@ package com.onarandombox.MultiverseCore;
|
||||
import com.fernferret.allpay.AllPay;
|
||||
import com.fernferret.allpay.GenericBank;
|
||||
import com.onarandombox.MultiverseCore.api.LoggablePlugin;
|
||||
import com.onarandombox.MultiverseCore.api.MVPlugin;
|
||||
import com.onarandombox.MultiverseCore.commands.*;
|
||||
import com.onarandombox.MultiverseCore.configuration.DefaultConfig;
|
||||
import com.onarandombox.MultiverseCore.configuration.MVConfigMigrator;
|
||||
@ -41,7 +42,29 @@ import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class MultiverseCore extends JavaPlugin implements LoggablePlugin {
|
||||
public class MultiverseCore extends JavaPlugin implements MVPlugin {
|
||||
|
||||
private static int Protocol = 1;
|
||||
|
||||
@Override
|
||||
public String dumpVersionInfo(String buffer) {
|
||||
// I'm kinda cheating on this one, since we call the init event.
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultiverseCore getCore() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCore(MultiverseCore core) {
|
||||
|
||||
}
|
||||
|
||||
public int getProtocolVersion() {
|
||||
return MultiverseCore.Protocol;
|
||||
}
|
||||
|
||||
// Useless stuff to keep us going.
|
||||
private static final Logger log = Logger.getLogger("Minecraft");
|
||||
|
@ -32,4 +32,12 @@ public interface MVPlugin extends LoggablePlugin {
|
||||
* @param core A valid {@link MultiverseCore}.
|
||||
*/
|
||||
public void setCore(MultiverseCore core);
|
||||
|
||||
/**
|
||||
* Allows Multiverse or a plugin to query another Multiverse plugin to see what version its protocol is. This number
|
||||
* should change when something will break the code.
|
||||
*
|
||||
* @return The Integer protocol version.
|
||||
*/
|
||||
public int getProtocolVersion();
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ package com.onarandombox.MultiverseCore.listeners;
|
||||
|
||||
import com.fernferret.allpay.AllPay;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.api.MVPlugin;
|
||||
import org.bukkit.event.server.PluginDisableEvent;
|
||||
import org.bukkit.event.server.PluginEnableEvent;
|
||||
import org.bukkit.event.server.ServerListener;
|
||||
|
Loading…
Reference in New Issue
Block a user