1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 22:13:25 +01:00

Lets not check mythycMobs if plugin is not present

This commit is contained in:
Zrips 2020-01-27 12:14:27 +02:00
parent db5faa8385
commit 50a63b90fa
4 changed files with 14 additions and 13 deletions

View File

@ -210,7 +210,6 @@ public class ConfigManager {
"he will no longer have option to get this quest");
cfg.get(pt + ".Quests.1.toLevel", 5);
cfg.save();
}
@ -673,7 +672,7 @@ public class ConfigManager {
}
Parser maxExpEquation;
String maxExpEquationInput = jobSection.getString("leveling-progression-equation");
String maxExpEquationInput = jobKey.equalsIgnoreCase("None") ? "0" : jobSection.getString("leveling-progression-equation");
try {
maxExpEquation = new Parser(maxExpEquationInput);
// test equation
@ -702,7 +701,7 @@ public class ConfigManager {
}
Parser expEquation;
String expEquationInput = jobSection.getString("experience-progression-equation");
String expEquationInput = jobKey.equalsIgnoreCase("None") ? "0" : jobSection.getString("experience-progression-equation");
try {
expEquation = new Parser(expEquationInput);
// test equation

View File

@ -33,7 +33,7 @@ public class HookManager {
if (Jobs.getGCManager().MythicMobsEnabled && MythicManager != null && MythicManager.Check())
MythicManager.registerListener();
}
}
public static MyPetManager getMyPetManager() {
if (myPetManager == null) {
@ -73,6 +73,10 @@ public class HookManager {
}
private static void setMythicManager() {
if (pm.getPlugin("MythicMobs") == null)
return;
try {
Class.forName("net.elseland.xikage.MythicMobs.API.MythicMobsAPI");
MythicManager = new MythicMobs2(Jobs.getInstance());

View File

@ -4,11 +4,11 @@ import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
public class Debug {
public static void D(Object message) {
Player player = Bukkit.getPlayer("Zrips");
if (player == null)
return;
player.sendMessage(org.bukkit.ChatColor.translateAlternateColorCodes('&', "&8[Jobs Debug]&3 " + String.valueOf(message)));
return;
}
public static void D(Object message) {
Player player = Bukkit.getPlayer("Zrips");
if (player == null)
return;
player.sendMessage(org.bukkit.ChatColor.translateAlternateColorCodes('&', "&8[JD]&3 " + String.valueOf(message)));
return;
}
}

View File

@ -3362,8 +3362,6 @@ Jobs:
shortname: N
ChatColour: WHITE
chat-display: none
#max-level: 10
#slots: 10
leveling-progression-equation: 10*(joblevel)+(joblevel*joblevel*4)
income-progression-equation: baseincome+(baseincome*(joblevel-1)*0.01)-((baseincome+(joblevel-1)*0.01) * ((numjobs-1)*0.05))
points-progression-equation: basepoints+(basepoints*(joblevel-1)*0.01)-((basepoints+(joblevel-1)*0.01) * ((numjobs-1)*0.05))