mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-21 23:51:29 +01:00
Fix for #17
This commit is contained in:
parent
091e3eb1c5
commit
44d1f6f021
@ -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()) {
|
||||
|
@ -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()) {
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user