mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-18 05:11:32 +01:00
Best way to go: Make your own thing
This commit is contained in:
parent
153b573040
commit
9cac1806e2
@ -1,55 +1,166 @@
|
||||
package com.gamingmesh.jobs.CMILib;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
|
||||
import com.gamingmesh.jobs.stuff.Util;
|
||||
|
||||
public class CMIEnchantment {
|
||||
public enum CMIEnchantment {
|
||||
|
||||
private static final Map<String, Enchantment> byName = new HashMap<String, Enchantment>();
|
||||
AQUA_AFFINITY("WATER_WORKER"),
|
||||
BANE_OF_ARTHROPODS("DAMAGE_ARTHROPODS", "ARTHROPODS_DAMAGE"),
|
||||
BINDING_CURSE,
|
||||
BLAST_PROTECTION("PROTECTION_EXPLOSIONS", "EXPLOSION_PROTECTION", "EXPLOSIONS_PROTECTION"),
|
||||
CHANNELING,
|
||||
DEPTH_STRIDER,
|
||||
EFFICIENCY("DIG_SPEED"),
|
||||
FEATHER_FALLING("PROTECTION_FALL", "FALL_PROTECTION"),
|
||||
FIRE_ASPECT,
|
||||
FIRE_PROTECTION("PROTECTION_FIRE"),
|
||||
FLAME("ARROW_FIRE", "FIRE_ARROW"),
|
||||
FORTUNE("LOOT_BONUS_BLOCKS"),
|
||||
FROST_WALKER,
|
||||
IMPALING,
|
||||
INFINITY("ARROW_INFINITE", "INFINITE_ARROW"),
|
||||
KNOCKBACK,
|
||||
LOOTING("LOOT_BONUS_MOBS"),
|
||||
LOYALTY,
|
||||
LUCK_OF_THE_SEA("LUCK"),
|
||||
LURE,
|
||||
MENDING,
|
||||
MULTISHOT("MULTSHOT"),
|
||||
PIERCING,
|
||||
POWER("ARROW_DAMAGE"),
|
||||
PROJECTILE_PROTECTION("PROTECTION_PROJECTILE"),
|
||||
PROTECTION("PROTECTION_ENVIRONMENTAL", "ENVIRONMENTAL_PROTECTION"),
|
||||
PUNCH("ARROW_KNOCKBACK", "KNOCKBACK_ARROW"),
|
||||
QUICK_CHARGE,
|
||||
RESPIRATION("OXYGEN"),
|
||||
RIPTIDE,
|
||||
SHARPNESS("DAMAGE_ALL"),
|
||||
SILK_TOUCH,
|
||||
SMITE("DAMAGE_UNDEAD", "UNDEAD_DAMAGE"),
|
||||
SWEEPING("SWEEPING_EDGE"),
|
||||
THORNS,
|
||||
UNBREAKING("DURABILITY"),
|
||||
VANISHING_CURSE;
|
||||
|
||||
public static void saveEnchants() {
|
||||
try {
|
||||
private static HashMap<String, CMIEnchantment> map = new HashMap<String, CMIEnchantment>();
|
||||
private static HashMap<Enchantment, CMIEnchantment> emap = new HashMap<Enchantment, CMIEnchantment>();
|
||||
|
||||
private List<String> subName = new ArrayList<String>();
|
||||
private List<String> customNames = new ArrayList<String>();
|
||||
private Enchantment enchantment;
|
||||
|
||||
CMIEnchantment(String... subName) {
|
||||
if (subName != null)
|
||||
this.subName = Arrays.asList(subName);
|
||||
|
||||
String temp = this.toString().toLowerCase().replace("_", "");
|
||||
|
||||
for (Enchantment one : Enchantment.values()) {
|
||||
try {
|
||||
if (one.getName().toLowerCase().replace("_", "").equalsIgnoreCase(temp)) {
|
||||
enchantment = one;
|
||||
break;
|
||||
}
|
||||
} catch (Exception | Error e) {
|
||||
}
|
||||
try {
|
||||
if (one.getKey().toString().split(":")[1].toLowerCase().replace("_", "").equalsIgnoreCase(temp)) {
|
||||
enchantment = one;
|
||||
break;
|
||||
}
|
||||
} catch (Exception | Error e) {
|
||||
}
|
||||
}
|
||||
|
||||
// Worst case scenario
|
||||
if (enchantment == null)
|
||||
for (Enchantment one : Enchantment.values()) {
|
||||
if (one == null || one.getName() == null)
|
||||
continue;
|
||||
byName.put(one.getName().replace("_", ""), one);
|
||||
try {
|
||||
if (one.toString().toLowerCase().replace("_", "").contains(temp)) {
|
||||
enchantment = one;
|
||||
break;
|
||||
}
|
||||
} catch (Exception | Error e) {
|
||||
}
|
||||
}
|
||||
} catch (Exception | Error e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
public List<String> getSubNames() {
|
||||
return subName;
|
||||
}
|
||||
|
||||
private static void fillUpMap() {
|
||||
map.clear();
|
||||
emap.clear();
|
||||
for (CMIEnchantment one : CMIEnchantment.values()) {
|
||||
map.put(one.toString().toLowerCase().replace("_", ""), one);
|
||||
for (String oneC : one.getSubNames()) {
|
||||
map.put(oneC.toLowerCase().replace("_", ""), one);
|
||||
}
|
||||
for (String oneC : one.getCustomNames()) {
|
||||
map.put(oneC.toLowerCase().replace("_", ""), one);
|
||||
}
|
||||
emap.put(one.getEnchantment(), one);
|
||||
}
|
||||
}
|
||||
|
||||
public static Enchantment get(String nameId) {
|
||||
Enchantment enchant = getByName(nameId);
|
||||
return enchant;
|
||||
public static CMIEnchantment get(String name) {
|
||||
if (map.isEmpty())
|
||||
fillUpMap();
|
||||
name = name.contains(":") ? name.split(":")[0] : name.contains("-") ? name.split("-")[0] : name;
|
||||
name = name.toLowerCase().replace("_", "");
|
||||
return map.get(name);
|
||||
}
|
||||
|
||||
public static Enchantment getByName(String name) {
|
||||
name = name.replace("_", "");
|
||||
public static Enchantment getEnchantment(String name) {
|
||||
if (map.isEmpty())
|
||||
fillUpMap();
|
||||
name = name.contains(":") ? name.split(":")[0] : name.contains("-") ? name.split("-")[0] : name;
|
||||
name = name.toLowerCase().replace("_", "");
|
||||
CMIEnchantment ec = map.get(name);
|
||||
|
||||
for (Entry<String, Enchantment> one : byName.entrySet()) {
|
||||
if (one == null || one.getValue().getName() == null)
|
||||
continue;
|
||||
if (one.getValue().getName().replace("_", "").equalsIgnoreCase(name)) {
|
||||
return one.getValue();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return ec == null ? null : ec.getEnchantment();
|
||||
}
|
||||
|
||||
public static Enchantment[] values() {
|
||||
return byName.values().toArray(new Enchantment[byName.size()]);
|
||||
public static CMIEnchantment get(Enchantment enchantment) {
|
||||
if (map.isEmpty())
|
||||
fillUpMap();
|
||||
return emap.get(enchantment);
|
||||
}
|
||||
|
||||
public List<String> getCustomNames() {
|
||||
return customNames;
|
||||
}
|
||||
|
||||
public void setCustomNames(List<String> customNames) {
|
||||
this.customNames = customNames;
|
||||
fillUpMap();
|
||||
}
|
||||
|
||||
public void addCustomName(String customName) {
|
||||
this.customNames.add(customName);
|
||||
fillUpMap();
|
||||
}
|
||||
|
||||
public Enchantment getEnchantment() {
|
||||
return enchantment;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return Util.firstToUpperCase(this.toString().replace("_", " "));
|
||||
}
|
||||
|
||||
public static String getName(Enchantment enchant) {
|
||||
if (enchant == null || enchant.getName() == null)
|
||||
CMIEnchantment ce = CMIEnchantment.get(enchant);
|
||||
if (ce == null)
|
||||
return "Unknown";
|
||||
return Util.firstToUpperCase(enchant.getName());
|
||||
return ce.getName();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -435,13 +435,13 @@ public class CMIItemStack {
|
||||
for (Entry<Enchantment, Integer> one : meta.getStoredEnchants().entrySet()) {
|
||||
if (!s.isEmpty())
|
||||
s += ";";
|
||||
s += CMIEnchantment.getName(one.getKey()) + "x" + one.getValue();
|
||||
s += CMIEnchantment.get(one.getKey()) + "x" + one.getValue();
|
||||
}
|
||||
|
||||
for (Entry<Enchantment, Integer> one : meta.getEnchants().entrySet()) {
|
||||
if (!s.isEmpty())
|
||||
s += ";";
|
||||
s += CMIEnchantment.getName(one.getKey()) + "x" + one.getValue();
|
||||
s += CMIEnchantment.get(one.getKey()) + "x" + one.getValue();
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
liner += ":" + s;
|
||||
|
@ -48,7 +48,6 @@ public class ItemManager {
|
||||
}
|
||||
|
||||
public static void load() {
|
||||
CMIEnchantment.saveEnchants();
|
||||
for (CMIMaterial one : CMIMaterial.values()) {
|
||||
if (one == null)
|
||||
continue;
|
||||
|
@ -55,7 +55,7 @@ public class ItemBoostManager {
|
||||
}
|
||||
List<String> ench = new ArrayList<>();
|
||||
for (Entry<Enchantment, Integer> oneE : stack.getEnchantments().entrySet()) {
|
||||
ench.add(CMIEnchantment.getName(oneE.getKey()) + "=" + oneE.getValue());
|
||||
ench.add(CMIEnchantment.get(oneE.getKey()) + "=" + oneE.getValue());
|
||||
}
|
||||
cfg.getC().set(name + ".enchants", ench);
|
||||
for (CurrencyType oneC : CurrencyType.values()) {
|
||||
@ -146,7 +146,7 @@ public class ItemBoostManager {
|
||||
for (String eachLine : cfg.get(one + ".enchants", Arrays.asList(""))) {
|
||||
if (!eachLine.contains("="))
|
||||
continue;
|
||||
Enchantment ench = CMIEnchantment.get(eachLine.split("=")[0]);
|
||||
Enchantment ench = CMIEnchantment.getEnchantment(eachLine.split("=")[0]);
|
||||
Integer level = -1;
|
||||
try {
|
||||
level = Integer.parseInt(eachLine.split("=")[1]);
|
||||
|
@ -103,6 +103,7 @@ import com.gamingmesh.jobs.listeners.JobsPaymentListener;
|
||||
import com.gamingmesh.jobs.listeners.PistonProtectionListener;
|
||||
import com.gamingmesh.jobs.selection.SelectionManager;
|
||||
import com.gamingmesh.jobs.stuff.CMIScoreboardManager;
|
||||
import com.gamingmesh.jobs.stuff.Debug;
|
||||
import com.gamingmesh.jobs.stuff.FurnaceBrewingHandling;
|
||||
import com.gamingmesh.jobs.stuff.Loging;
|
||||
import com.gamingmesh.jobs.stuff.PageInfo;
|
||||
|
@ -73,7 +73,6 @@ public class McMMO2_X_listener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||
public void OnAbilityOff(McMMOPlayerAbilityDeactivateEvent event) {
|
||||
Debug.D("active " + event.getAbility());
|
||||
HashMap<String, Long> InfoMap = Jobs.getMcMMOManager().getMap().get(event.getPlayer().getUniqueId());
|
||||
if (InfoMap != null) {
|
||||
InfoMap.remove(event.getAbility().toString());
|
||||
|
@ -709,7 +709,6 @@ public class PlayerManager {
|
||||
for (JobCommands command : job.getCommands()) {
|
||||
if (newLevel >= command.getLevelFrom() && newLevel <= command.getLevelUntil()) {
|
||||
for (String commandString : new ArrayList<String>(command.getCommands())) {
|
||||
Debug.D("cmd: |" + commandString);
|
||||
commandString = commandString.replace("[player]", player.getName());
|
||||
commandString = commandString.replace("[oldlevel]", String.valueOf(oldLevel));
|
||||
commandString = commandString.replace("[newlevel]", String.valueOf(newLevel));
|
||||
|
@ -349,16 +349,8 @@ public class ConfigManager {
|
||||
}
|
||||
|
||||
} else if (actionType == ActionType.ENCHANT) {
|
||||
Enchantment enchant = Enchantment.getByName(myKey);
|
||||
if (enchant != null) {
|
||||
if (Jobs.getVersionCheckManager().getVersion().isEqualOrLower(Version.v1_12_R1)) {
|
||||
try {
|
||||
id = (int) enchant.getClass().getMethod("getId").invoke(enchant);
|
||||
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
type = myKey;
|
||||
CMIEnchantment enchant = CMIEnchantment.get(myKey);
|
||||
type = enchant == null ? myKey : enchant.toString();
|
||||
} else if (actionType == ActionType.CUSTOMKILL || actionType == ActionType.SHEAR || actionType == ActionType.MMKILL)
|
||||
type = myKey;
|
||||
else if (actionType == ActionType.EXPLORE) {
|
||||
@ -622,10 +614,10 @@ public class ConfigManager {
|
||||
String[] enchantid = str4.split(":");
|
||||
if ((GUIitem.getItemMeta() instanceof EnchantmentStorageMeta)) {
|
||||
EnchantmentStorageMeta enchantMeta = (EnchantmentStorageMeta) GUIitem.getItemMeta();
|
||||
enchantMeta.addStoredEnchant(CMIEnchantment.get(enchantid[0]), Integer.parseInt(enchantid[1]), true);
|
||||
enchantMeta.addStoredEnchant(CMIEnchantment.getEnchantment(enchantid[0]), Integer.parseInt(enchantid[1]), true);
|
||||
GUIitem.setItemMeta(enchantMeta);
|
||||
} else
|
||||
GUIitem.addUnsafeEnchantment(CMIEnchantment.get(enchantid[0]), Integer.parseInt(enchantid[1]));
|
||||
GUIitem.addUnsafeEnchantment(CMIEnchantment.getEnchantment(enchantid[0]), Integer.parseInt(enchantid[1]));
|
||||
}
|
||||
}
|
||||
} else if (guiSection.contains("CustomSkull")) {
|
||||
@ -651,10 +643,10 @@ public class ConfigManager {
|
||||
String[] id = str4.split(":");
|
||||
if ((GUIitem.getItemMeta() instanceof EnchantmentStorageMeta)) {
|
||||
EnchantmentStorageMeta enchantMeta = (EnchantmentStorageMeta) GUIitem.getItemMeta();
|
||||
enchantMeta.addStoredEnchant(CMIEnchantment.get(id[0]), Integer.parseInt(id[1]), true);
|
||||
enchantMeta.addStoredEnchant(CMIEnchantment.getEnchantment(id[0]), Integer.parseInt(id[1]), true);
|
||||
GUIitem.setItemMeta(enchantMeta);
|
||||
} else
|
||||
GUIitem.addUnsafeEnchantment(CMIEnchantment.get(id[0]), Integer.parseInt(id[1]));
|
||||
GUIitem.addUnsafeEnchantment(CMIEnchantment.getEnchantment(id[0]), Integer.parseInt(id[1]));
|
||||
}
|
||||
}
|
||||
} else if (guiSection.contains("CustomSkull")) {
|
||||
@ -780,7 +772,7 @@ public class ConfigManager {
|
||||
if (!eachLine.contains("="))
|
||||
continue;
|
||||
|
||||
Enchantment ench = CMIEnchantment.get(eachLine.split("=")[0]);
|
||||
Enchantment ench = CMIEnchantment.getEnchantment(eachLine.split("=")[0]);
|
||||
Integer level = -1;
|
||||
try {
|
||||
level = Integer.parseInt(eachLine.split("=")[1]);
|
||||
@ -837,7 +829,7 @@ public class ConfigManager {
|
||||
if (!eachLine.contains("="))
|
||||
continue;
|
||||
|
||||
Enchantment ench = CMIEnchantment.get(eachLine.split("=")[0]);
|
||||
Enchantment ench = CMIEnchantment.getEnchantment(eachLine.split("=")[0]);
|
||||
Integer level = -1;
|
||||
try {
|
||||
level = Integer.parseInt(eachLine.split("=")[1]);
|
||||
@ -1128,21 +1120,12 @@ public class ConfigManager {
|
||||
}
|
||||
|
||||
} else if (actionType == ActionType.ENCHANT) {
|
||||
Enchantment enchant = CMIEnchantment.get(myKey);
|
||||
if (enchant != null) {
|
||||
if (Jobs.getVersionCheckManager().getVersion().isEqualOrLower(Version.v1_12_R1)) {
|
||||
try {
|
||||
id = (int) enchant.getClass().getMethod("getId").invoke(enchant);
|
||||
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
CMIEnchantment enchant = CMIEnchantment.get(myKey);
|
||||
if (enchant == null && material == CMIMaterial.NONE) {
|
||||
Debug.D("doing2");
|
||||
Jobs.getPluginLogger().warning("Job " + jobKey + " has an invalid " + actionType.getName() + " type property: " + key + "!");
|
||||
continue;
|
||||
}
|
||||
type = myKey;
|
||||
type = enchant == null ? myKey : enchant.toString();
|
||||
} else if (actionType == ActionType.CUSTOMKILL || actionType == ActionType.SHEAR || actionType == ActionType.MMKILL)
|
||||
type = myKey;
|
||||
else if (actionType == ActionType.EXPLORE) {
|
||||
|
@ -443,7 +443,7 @@ public class ShopManager {
|
||||
if (!eachLine.contains("="))
|
||||
continue;
|
||||
|
||||
Enchantment ench = CMIEnchantment.get(eachLine.split("=")[0]);
|
||||
Enchantment ench = CMIEnchantment.getEnchantment(eachLine.split("=")[0]);
|
||||
Integer level = -1;
|
||||
try {
|
||||
level = Integer.parseInt(eachLine.split("=")[1]);
|
||||
|
@ -26,6 +26,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -33,6 +34,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.resources.jfep.Parser;
|
||||
import com.gamingmesh.jobs.stuff.ChatColor;
|
||||
import com.gamingmesh.jobs.stuff.Debug;
|
||||
|
||||
public class Job {
|
||||
// job info
|
||||
|
@ -102,6 +102,7 @@ import com.gamingmesh.jobs.container.ExploreRespond;
|
||||
import com.gamingmesh.jobs.container.FastPayment;
|
||||
import com.gamingmesh.jobs.container.JobProgression;
|
||||
import com.gamingmesh.jobs.container.JobsPlayer;
|
||||
import com.gamingmesh.jobs.stuff.Debug;
|
||||
import com.gamingmesh.jobs.stuff.FurnaceBrewingHandling;
|
||||
import com.gamingmesh.jobs.stuff.FurnaceBrewingHandling.ownershipFeedback;
|
||||
import com.google.common.base.Objects;
|
||||
@ -311,7 +312,7 @@ public class JobsPaymentListener implements Listener {
|
||||
|
||||
// Prevent item durability loss
|
||||
if (!Jobs.getGCManager().payItemDurabilityLoss && item.getType().getMaxDurability()
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
return;
|
||||
|
||||
// pay
|
||||
@ -423,13 +424,13 @@ public class JobsPaymentListener implements Listener {
|
||||
if (item != null && !item.getType().equals(Material.AIR)) {
|
||||
// Prevent item durability loss
|
||||
if (!Jobs.getGCManager().payItemDurabilityLoss && item.getType().getMaxDurability()
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
return;
|
||||
|
||||
// Protection for block break with silktouch
|
||||
if (Jobs.getGCManager().useSilkTouchProtection) {
|
||||
for (Entry<Enchantment, Integer> one : item.getEnchantments().entrySet()) {
|
||||
if (CMIEnchantment.getName(one.getKey()).equalsIgnoreCase("SILK_TOUCH")) {
|
||||
if (CMIEnchantment.get(one.getKey()) == CMIEnchantment.SILK_TOUCH) {
|
||||
if (Jobs.getBpManager().isInBp(block))
|
||||
return;
|
||||
}
|
||||
@ -509,7 +510,7 @@ public class JobsPaymentListener implements Listener {
|
||||
|
||||
// Prevent item durability loss
|
||||
if (!Jobs.getGCManager().payItemDurabilityLoss && item.getType().getMaxDurability()
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
return;
|
||||
|
||||
if (event.getState().equals(PlayerFishEvent.State.CAUGHT_FISH) && event.getCaught() instanceof Item) {
|
||||
@ -863,7 +864,10 @@ public class JobsPaymentListener implements Listener {
|
||||
if (enchant == null)
|
||||
continue;
|
||||
|
||||
String enchantName = CMIEnchantment.getName(enchant);
|
||||
CMIEnchantment e = CMIEnchantment.get(enchant);
|
||||
|
||||
String enchantName = e == null ? null : e.toString();
|
||||
|
||||
if (enchantName == null)
|
||||
continue;
|
||||
|
||||
@ -916,7 +920,7 @@ public class JobsPaymentListener implements Listener {
|
||||
|
||||
// Prevent item durability loss
|
||||
if (!Jobs.getGCManager().payItemDurabilityLoss && item.getType().getMaxDurability()
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
return;
|
||||
|
||||
JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player);
|
||||
@ -930,7 +934,10 @@ public class JobsPaymentListener implements Listener {
|
||||
if (enchant == null)
|
||||
continue;
|
||||
|
||||
String enchantName = CMIEnchantment.getName(enchant);
|
||||
CMIEnchantment e = CMIEnchantment.get(enchant);
|
||||
|
||||
String enchantName = e == null ? null : e.toString();
|
||||
|
||||
if (enchantName == null)
|
||||
continue;
|
||||
|
||||
@ -1175,7 +1182,7 @@ public class JobsPaymentListener implements Listener {
|
||||
if (item != null && !item.getType().equals(Material.AIR)) {
|
||||
// Prevent item durability loss
|
||||
if (!Jobs.getGCManager().payItemDurabilityLoss && item.getType().getMaxDurability()
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
- Jobs.getNms().getDurability(item) != item.getType().getMaxDurability())
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1638,7 +1645,7 @@ public class JobsPaymentListener implements Listener {
|
||||
return;
|
||||
// Prevent item durability loss
|
||||
if (!Jobs.getGCManager().payItemDurabilityLoss && iih.getType().getMaxDurability()
|
||||
- Jobs.getNms().getDurability(iih) != iih.getType().getMaxDurability())
|
||||
- Jobs.getNms().getDurability(iih) != iih.getType().getMaxDurability())
|
||||
return;
|
||||
|
||||
final Location loc = event.getClickedBlock().getLocation();
|
||||
|
Loading…
Reference in New Issue
Block a user