Vault dependency check, if not present plugin now disables.
This commit is contained in:
parent
7fd5ca4e0a
commit
527f825b73
@ -110,6 +110,14 @@ public class P extends MPlugin {
|
|||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
log("==== Setup ====");
|
log("==== Setup ====");
|
||||||
|
|
||||||
|
|
||||||
|
// Vault dependency check.
|
||||||
|
if (P.p.getServer().getPluginManager().getPlugin("Vault") == null) {
|
||||||
|
P.p.log("Vault is not present, the plugin will not run properly.");
|
||||||
|
P.p.getServer().getPluginManager().disablePlugin(P.p);
|
||||||
|
}
|
||||||
|
|
||||||
int version = Integer.parseInt(ReflectionUtils.PackageType.getServerVersion().split("_")[1]);
|
int version = Integer.parseInt(ReflectionUtils.PackageType.getServerVersion().split("_")[1]);
|
||||||
if (version == 7) {
|
if (version == 7) {
|
||||||
P.p.log("Minecraft Version 1.7 found, disabling banners, itemflags inside GUIs, and Titles.");
|
P.p.log("Minecraft Version 1.7 found, disabling banners, itemflags inside GUIs, and Titles.");
|
||||||
|
Loading…
Reference in New Issue
Block a user