This commit is contained in:
Rsl1122 2017-02-21 22:48:17 +02:00
parent 091e3eb1c5
commit 44d1f6f021
6 changed files with 11 additions and 12 deletions

View File

@ -21,7 +21,7 @@ public class AdvancedAchievementsHook extends Hook {
*
* @param plugin
*/
public AdvancedAchievementsHook(Plan plugin) {
public AdvancedAchievementsHook(Plan plugin) throws NoClassDefFoundError {
super("com.hm.achievement.AdvancedAchievements");
this.plugin = plugin;
if (super.isEnabled()) {

View File

@ -25,7 +25,7 @@ public class EssentialsHook extends Hook {
*
* @param plugin
*/
public EssentialsHook(Plan plugin) {
public EssentialsHook(Plan plugin) throws NoClassDefFoundError{
super("com.earth2me.essentials.Essentials");
this.plugin = plugin;
if (super.isEnabled()) {

View File

@ -32,12 +32,12 @@ public class HookHandler {
}
private void hook() {
advancedAchievementsHook = new AdvancedAchievementsHook(plan);
essentialsHook = new EssentialsHook(plan);
superbVoteHook = new SuperbVoteHook(plan);
factionsHook = new FactionsHook(plan);
townyHook = new TownyHook(plan);
onTimeHook = new OnTimeHook(plan);
try {advancedAchievementsHook = new AdvancedAchievementsHook(plan);} catch (NoClassDefFoundError e) {}
try {essentialsHook = new EssentialsHook(plan);} catch (NoClassDefFoundError e) {}
try {superbVoteHook = new SuperbVoteHook(plan);} catch (NoClassDefFoundError e) {}
try {factionsHook = new FactionsHook(plan);} catch (NoClassDefFoundError e) {}
try {townyHook = new TownyHook(plan);} catch (NoClassDefFoundError e) {}
try {onTimeHook = new OnTimeHook(plan);} catch (NoClassDefFoundError e) {}
}
public AdvancedAchievementsHook getAdvancedAchievementsHook() {

View File

@ -4,7 +4,6 @@ import java.io.Serializable;
import java.util.HashMap;
import java.util.UUID;
import main.java.com.djrapitops.plan.Plan;
import me.edge209.OnTime.OnTime;
import me.edge209.OnTime.OnTimeAPI;
import org.bukkit.Bukkit;
@ -21,7 +20,7 @@ public class OnTimeHook extends Hook {
* Hooks to OnTime plugin
* @param plugin
*/
public OnTimeHook(Plan plugin) {
public OnTimeHook(Plan plugin) throws NoClassDefFoundError{
super("me.edge209.OnTime.OnTime");
this.plugin = plugin;
}

View File

@ -19,7 +19,7 @@ public class SuperbVoteHook extends Hook {
*
* @param plugin
*/
public SuperbVoteHook(Plan plugin) {
public SuperbVoteHook(Plan plugin) throws NoClassDefFoundError {
super("io.minimum.minecraft.superbvote.SuperbVote");
this.plugin = plugin;
}

View File

@ -30,7 +30,7 @@ public class TownyHook extends Hook {
*
* @param plugin
*/
public TownyHook(Plan plugin) {
public TownyHook(Plan plugin) throws NoClassDefFoundError {
super("com.palmergames.bukkit.towny.Towny");
this.plugin = plugin;
this.towny = getPlugin(Towny.class);