mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-26 04:25:15 +01:00
Removed Boss dependency
- Fix for mushroom cow can't be milked with bowl - Now pig_zombie will automatically changes to piglin in 1.16+ versions (for lazy peoples)
This commit is contained in:
parent
081b02c7df
commit
0c4a43e6cc
@ -355,7 +355,6 @@ public class editquests implements Cmd {
|
||||
case KILL:
|
||||
case MILK:
|
||||
case MMKILL:
|
||||
case BOSS:
|
||||
case BREED:
|
||||
case TAME:
|
||||
case SHEAR:
|
||||
@ -517,7 +516,7 @@ public class editquests implements Cmd {
|
||||
}
|
||||
type = myKey;
|
||||
} else if (actionT == ActionType.CUSTOMKILL || actionT == ActionType.SHEAR || actionT == ActionType.MMKILL
|
||||
|| actionT == ActionType.COLLECT || actionT == ActionType.BAKE || actionT == ActionType.BOSS)
|
||||
|| actionT == ActionType.COLLECT || actionT == ActionType.BAKE)
|
||||
type = myKey;
|
||||
else if (actionT == ActionType.EXPLORE) {
|
||||
type = myKey;
|
||||
|
@ -406,7 +406,6 @@ public class ConfigManager {
|
||||
case KILL:
|
||||
case MILK:
|
||||
case MMKILL:
|
||||
case BOSS:
|
||||
case BREED:
|
||||
case TAME:
|
||||
case SHEAR:
|
||||
@ -526,18 +525,14 @@ public class ConfigManager {
|
||||
// check entities
|
||||
CMIEntityType entity = CMIEntityType.getByName(myKey);
|
||||
|
||||
if (entity != null) {
|
||||
if (entity.isAlive()) {
|
||||
type = entity.toString();
|
||||
id = entity.getId();
|
||||
// Change pig zombie -> piglin in 1.16+
|
||||
if (Version.isCurrentEqualOrHigher(Version.v1_16_R1) && entity == CMIEntityType.PIG_ZOMBIE) {
|
||||
entity = CMIEntityType.PIGLIN;
|
||||
}
|
||||
|
||||
// using breeder finder
|
||||
if (actionType == ActionType.BREED)
|
||||
Jobs.getGCManager().useBreederFinder = true;
|
||||
} else if (entity == CMIEntityType.ENDER_CRYSTAL) {
|
||||
type = entity.toString();
|
||||
id = entity.getId();
|
||||
}
|
||||
if (entity != null && (entity.isAlive() || entity == CMIEntityType.ENDER_CRYSTAL)) {
|
||||
type = entity.toString();
|
||||
id = entity.getId();
|
||||
}
|
||||
|
||||
// Pre 1.13 checks for custom names
|
||||
@ -582,7 +577,6 @@ public class ConfigManager {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (actionType == ActionType.ENCHANT) {
|
||||
CMIEnchantment enchant = CMIEnchantment.get(myKey);
|
||||
if (enchant == null && material == CMIMaterial.NONE) {
|
||||
@ -592,7 +586,7 @@ public class ConfigManager {
|
||||
|
||||
type = enchant == null ? myKey : enchant.toString();
|
||||
} else if (actionType == ActionType.CUSTOMKILL || actionType == ActionType.COLLECT || actionType == ActionType.MMKILL
|
||||
|| actionType == ActionType.BAKE || actionType == ActionType.BOSS) {
|
||||
|| actionType == ActionType.BAKE) {
|
||||
type = myKey;
|
||||
} else if (actionType == ActionType.EXPLORE) {
|
||||
type = myKey;
|
||||
@ -638,6 +632,10 @@ public class ConfigManager {
|
||||
if (actionType == ActionType.TNTBREAK)
|
||||
Jobs.getGCManager().setTntFinder(true);
|
||||
|
||||
// using breeder finder
|
||||
if (actionType == ActionType.BREED)
|
||||
Jobs.getGCManager().useBreederFinder = true;
|
||||
|
||||
KeyValues kv = new KeyValues();
|
||||
kv.setId(id);
|
||||
kv.setMeta(meta);
|
||||
|
@ -148,8 +148,6 @@ public class NameTranslatorManager {
|
||||
if (got != null && got.getName() != null)
|
||||
return got.getName();
|
||||
return HookManager.getMythicManager() == null ? materialName : HookManager.getMythicManager().getDisplayName(materialName);
|
||||
case BOSS:
|
||||
return HookManager.getBossManager() == null ? materialName : HookManager.getBossManager().getName(materialName);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -41,8 +41,7 @@ public enum ActionType {
|
||||
EAT("Eat"),
|
||||
CUSTOMKILL("custom-kill"),
|
||||
COLLECT("Collect"),
|
||||
BAKE("Bake"),
|
||||
BOSS("Boss");
|
||||
BAKE("Bake");
|
||||
|
||||
private String name;
|
||||
|
||||
|
@ -3,7 +3,6 @@ package com.gamingmesh.jobs.hooks;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.hooks.Boss.BossManager;
|
||||
import com.gamingmesh.jobs.hooks.McMMO.McMMO1_X_listener;
|
||||
import com.gamingmesh.jobs.hooks.McMMO.McMMO2_X_listener;
|
||||
import com.gamingmesh.jobs.hooks.McMMO.McMMOManager;
|
||||
@ -20,7 +19,6 @@ public class HookManager {
|
||||
private static MythicMobInterface MythicManager;
|
||||
private static MyPetManager myPetManager;
|
||||
private static WorldGuardManager worldGuardManager;
|
||||
private static BossManager bossManager;
|
||||
private static StackMobHandler stackMobHandler;
|
||||
private static WildStackerHandler wildStackerHandler;
|
||||
|
||||
@ -35,7 +33,6 @@ public class HookManager {
|
||||
setMyPetManager();
|
||||
setWorldGuard();
|
||||
setMythicManager();
|
||||
setBossManager();
|
||||
setStackMobHandler();
|
||||
setWildStackerHandler();
|
||||
|
||||
@ -82,13 +79,6 @@ public class HookManager {
|
||||
return McMMOManager;
|
||||
}
|
||||
|
||||
public static BossManager getBossManager() {
|
||||
if (bossManager == null)
|
||||
setBossManager();
|
||||
|
||||
return bossManager;
|
||||
}
|
||||
|
||||
public static MythicMobInterface getMythicManager() {
|
||||
return MythicManager;
|
||||
}
|
||||
@ -144,13 +134,6 @@ public class HookManager {
|
||||
}
|
||||
}
|
||||
|
||||
private static void setBossManager() {
|
||||
if (isPluginEnabled("Boss")) {
|
||||
bossManager = new BossManager();
|
||||
Jobs.consoleMsg("&e[Jobs] Boss detected.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void setStackMobHandler() {
|
||||
if (isPluginEnabled("StackMob")) {
|
||||
stackMobHandler = new StackMobHandler();
|
||||
|
@ -222,8 +222,8 @@ public class JobsPaymentListener implements Listener {
|
||||
|
||||
ItemStack itemInHand = Jobs.getNms().getItemInMainHand(player);
|
||||
|
||||
if ((cow.getType() == EntityType.COW && itemInHand.getType() != Material.BUCKET)
|
||||
|| (cow.getType() == EntityType.MUSHROOM_COW && itemInHand.getType() != Material.BOWL)) {
|
||||
if (itemInHand.getType() != Material.BUCKET
|
||||
&& (cow.getType() == EntityType.MUSHROOM_COW && itemInHand.getType() != Material.BOWL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -878,9 +878,10 @@ public class JobsPaymentListener implements Listener {
|
||||
return;
|
||||
|
||||
if (Version.isCurrentEqualOrHigher(Version.v1_14_R1) && inv instanceof StonecutterInventory) {
|
||||
if (event.getAction() != InventoryAction.DROP_ONE_SLOT) {
|
||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
||||
}
|
||||
if (event.getAction() != InventoryAction.DROP_ONE_SLOT) {
|
||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user