Przeglądaj źródła

Fixed bug where Skull Splitter & Serrated Strikes could be used without
permissions.

GJ 13 lat temu
rodzic
commit
e9d1297c17

+ 1 - 0
Changelog.txt

@@ -13,6 +13,7 @@ Version 1.3.05-dev
  = Fixed bug with repairing wooden tools
  = Fixed bug where spawned wolves only had 8 health.
  = Fixed bug where rare Treasures from Excavation were dropping too often
+ = Fixed bug where Skull Splitter & Serrated Strikes could be used without permissions.
  ! Changed Tree Feller to account for ability durability loss but not leaves.
  ! Changed bypass node for Arcane Forging to not default to true for OPs
 

+ 2 - 2
src/main/java/com/gmail/nossr50/Combat.java

@@ -65,7 +65,7 @@ public class Combat {
                     Swords.bleedCheck(attacker, target, plugin);
                 }
 
-                if (PPa.getAbilityMode(AbilityType.SERRATED_STRIKES)) {
+                if (PPa.getAbilityMode(AbilityType.SERRATED_STRIKES) && mcPermissions.getInstance().serratedStrikes(attacker)) {
                     applyAbilityAoE(attacker, target, event.getDamage(), plugin, SkillType.SWORDS);
                 }
 
@@ -84,7 +84,7 @@ public class Combat {
                     Axes.impact(attacker, target, event);
                 }
 
-                if (PPa.getAbilityMode(AbilityType.SKULL_SPLIITER)) {
+                if (PPa.getAbilityMode(AbilityType.SKULL_SPLIITER) && mcPermissions.getInstance().skullSplitter(attacker)) {
                     applyAbilityAoE(attacker, target, event.getDamage(), plugin, SkillType.AXES);
                 }
 

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/Excavation.java

@@ -104,7 +104,7 @@ public class Excavation {
 
             for (ExcavationTreasure treasure : treasures) {
                 if (skillLevel >= treasure.getDropLevel()) {
-                    if (random.nextDouble() * 100.0d <= treasure.getDropChance()) {
+                    if (random.nextDouble() * 100 <= treasure.getDropChance()) {
                         xp += treasure.getXp();
                         is.add(treasure.getDrop());
                     }

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/Fishing.java

@@ -100,7 +100,7 @@ public class Fishing {
         if (LoadProperties.fishingDrops) {
             FishingTreasure treasure = rewards.get(random.nextInt(rewards.size()));
 
-            if (random.nextDouble() * 100.0d <= treasure.getDropChance()) {
+            if (random.nextDouble() * 100 <= treasure.getDropChance()) {
                 Users.getProfile(player).addXP(SkillType.FISHING, treasure.getXp());
                 theCatch.setItemStack(treasure.getDrop());
             }