mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-20 23:21:19 +01:00
Add AbilityType and SuperAbilityType back
Adding both AbilityType and SuperAbilityType with com.gmail.nossr50.datatypes.skills as mcMMO api requires this to call.
This commit is contained in:
parent
5d64b67d72
commit
9b2945df50
@ -8,10 +8,13 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import com.gamingmesh.jobs.Jobs;
|
import com.gamingmesh.jobs.Jobs;
|
||||||
|
import com.gmail.nossr50.datatypes.skills;
|
||||||
|
|
||||||
public class McMMOManager {
|
public class McMMOManager {
|
||||||
|
|
||||||
public boolean mcMMOPresent = false;
|
public boolean mcMMOPresent = false;
|
||||||
|
|
||||||
|
public boolean mcMMOOverHaul = false;
|
||||||
|
|
||||||
private HashMap<UUID, HashMap<String, Long>> map = new HashMap<>();
|
private HashMap<UUID, HashMap<String, Long>> map = new HashMap<>();
|
||||||
|
|
||||||
@ -23,26 +26,49 @@ public class McMMOManager {
|
|||||||
HashMap<String, Long> InfoMap = map.get(player.getUniqueId());
|
HashMap<String, Long> InfoMap = map.get(player.getUniqueId());
|
||||||
if (InfoMap == null)
|
if (InfoMap == null)
|
||||||
return 0D;
|
return 0D;
|
||||||
|
|
||||||
|
if (mcMMOOverHaul = true) {
|
||||||
|
Long t = InfoMap.get(SuperAbilityType.TREE_FELLER);
|
||||||
|
if (t != null) {
|
||||||
|
if (t < System.currentTimeMillis())
|
||||||
|
return -(1 - Jobs.getGCManager().TreeFellerMultiplier);
|
||||||
|
InfoMap.remove(SuperAbilityType.TREE_FELLER);
|
||||||
|
}
|
||||||
|
|
||||||
Long t = InfoMap.get("TREE_FELLER");
|
t = InfoMap.get(SuperAbilityType.GIGA_DRILL_BREAKER);
|
||||||
if (t != null) {
|
if (t != null) {
|
||||||
if (t < System.currentTimeMillis())
|
if (t < System.currentTimeMillis())
|
||||||
return -(1 - Jobs.getGCManager().TreeFellerMultiplier);
|
return -(1 - Jobs.getGCManager().gigaDrillMultiplier);
|
||||||
InfoMap.remove("TREE_FELLER");
|
InfoMap.remove(SuperAbilityType.GIGA_DRILL_BREAKER);
|
||||||
}
|
}
|
||||||
|
|
||||||
t = InfoMap.get("GIGA_DRILL_BREAKER");
|
t = InfoMap.get(SuperAbilityType.SUPER_BREAKER);
|
||||||
if (t != null) {
|
if (t != null) {
|
||||||
if (t < System.currentTimeMillis())
|
if (t < System.currentTimeMillis())
|
||||||
return -(1 - Jobs.getGCManager().gigaDrillMultiplier);
|
return -(1 - Jobs.getGCManager().superBreakerMultiplier);
|
||||||
InfoMap.remove("GIGA_DRILL_BREAKER");
|
InfoMap.remove(SuperAbilityType.SUPER_BREAKER);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Long t = InfoMap.get(AbilityType.TREE_FELLER);
|
||||||
|
if (t != null) {
|
||||||
|
if (t < System.currentTimeMillis())
|
||||||
|
return -(1 - Jobs.getGCManager().TreeFellerMultiplier);
|
||||||
|
InfoMap.remove(AbilityType.TREE_FELLER);
|
||||||
|
}
|
||||||
|
|
||||||
t = InfoMap.get("SUPER_BREAKER");
|
t = InfoMap.get(AbilityType.GIGA_DRILL_BREAKER);
|
||||||
if (t != null) {
|
if (t != null) {
|
||||||
if (t < System.currentTimeMillis())
|
if (t < System.currentTimeMillis())
|
||||||
return -(1 - Jobs.getGCManager().superBreakerMultiplier);
|
return -(1 - Jobs.getGCManager().gigaDrillMultiplier);
|
||||||
InfoMap.remove("SUPER_BREAKER");
|
InfoMap.remove(AbilityType.GIGA_DRILL_BREAKER);
|
||||||
|
}
|
||||||
|
|
||||||
|
t = InfoMap.get(AbilityType.SUPER_BREAKER);
|
||||||
|
if (t != null) {
|
||||||
|
if (t < System.currentTimeMillis())
|
||||||
|
return -(1 - Jobs.getGCManager().superBreakerMultiplier);
|
||||||
|
InfoMap.remove(AbilityType.SUPER_BREAKER);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0D;
|
return 0D;
|
||||||
@ -62,6 +88,7 @@ public class McMMOManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mcMMOPresent = true;
|
mcMMOPresent = true;
|
||||||
|
mcMMOOverHaul = true;
|
||||||
Jobs.consoleMsg("&e[Jobs] &6mcMMO" + McMMO.getDescription().getVersion() + " was found - Enabling capabilities.");
|
Jobs.consoleMsg("&e[Jobs] &6mcMMO" + McMMO.getDescription().getVersion() + " was found - Enabling capabilities.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user