mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 12:35:27 +02:00
Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into configurable
This commit is contained in:
@@ -59,9 +59,8 @@ public class NotificationManager {
|
||||
|
||||
/**
|
||||
* Sends players notifications from mcMMO
|
||||
* This does this by sending out an event so other plugins can cancel it
|
||||
*
|
||||
* @param player target player
|
||||
* Does so by sending out an event so other plugins can cancel it
|
||||
* @param player target player
|
||||
* @param notificationType notifications defined type
|
||||
* @param key the locale key for the notifications defined message
|
||||
*/
|
||||
|
@@ -25,9 +25,9 @@ public class RandomChanceUtil {
|
||||
* non-RNG skills just fire the cancellable event and succeed if they go uncancelled
|
||||
*
|
||||
* @param skillActivationType this value represents what kind of activation procedures this sub-skill uses
|
||||
* @param subSkillType The identifier for this specific sub-skill
|
||||
* @param player The owner of this sub-skill
|
||||
* @return returns true if all conditions are met and they event is not cancelled
|
||||
* @param subSkillType The identifier for this specific sub-skill
|
||||
* @param player The owner of this sub-skill
|
||||
* @return returns true if all conditions are met and the event is not cancelled
|
||||
*/
|
||||
public static boolean isActivationSuccessful(SkillActivationType skillActivationType, SubSkillType subSkillType, Player player) {
|
||||
switch (skillActivationType) {
|
||||
|
@@ -227,7 +227,8 @@ public class SkillUtils {
|
||||
* @param maxDamageModifier the amount to adjust the max damage by
|
||||
*/
|
||||
public static void handleDurabilityChange(ItemStack itemStack, double durabilityModifier, double maxDamageModifier) {
|
||||
if (itemStack.getEnchantments().get(Enchantment.DURABILITY) != null && itemStack.getEnchantments().get(Enchantment.DURABILITY) >= 1) {
|
||||
if((itemStack.getItemMeta().getEnchants().get(Enchantment.DURABILITY) != null && itemStack.getItemMeta().getEnchants().get(Enchantment.DURABILITY) >= 1)
|
||||
|| (itemStack.getItemMeta() != null && itemStack.getItemMeta().isUnbreakable())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user