Better handling on missing plugins.
This commit is contained in:
parent
162921b934
commit
776c523bde
@ -1,8 +1,8 @@
|
|||||||
name: ${project.name}
|
name: ${project.name}
|
||||||
version: ${project.version}
|
version: ${project.version}
|
||||||
description: A plugin to create gates for fast traveling.
|
description: A plugin to create gates for fast traveling.
|
||||||
depend: [Craft Inc. Gates, dynmap]
|
softdepend: [Craft Inc. Gates, dynmap]
|
||||||
author: tomco
|
author: tomco
|
||||||
website: FIXME
|
website: http://dev.bukkit.org/bukkit-plugins/craftinc-gates/
|
||||||
main: de.craftinc.gates.dynmap.Plugin
|
main: de.craftinc.gates.dynmap.Plugin
|
||||||
database: false
|
database: false
|
||||||
|
@ -57,6 +57,7 @@ public class Plugin extends JavaPlugin implements GateChangeListener
|
|||||||
super.onEnable();
|
super.onEnable();
|
||||||
|
|
||||||
if (!loadAPI()) {
|
if (!loadAPI()) {
|
||||||
|
Logger.log(Level.SEVERE, "Error while enabling! Stopping now!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +70,10 @@ public class Plugin extends JavaPlugin implements GateChangeListener
|
|||||||
@Override
|
@Override
|
||||||
public void onDisable()
|
public void onDisable()
|
||||||
{
|
{
|
||||||
|
if (this.gatesPlugin != null) {
|
||||||
this.gatesPlugin.getGatesManager().removeGateChangeListener(this);
|
this.gatesPlugin.getGatesManager().removeGateChangeListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
super.onDisable();
|
super.onDisable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user