浏览代码

Fixed bug with Ice Fishing in the Nether

Fixes  #1218
TfT_02 12 年之前
父节点
当前提交
6d7d811814
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 1 0
      Changelog.txt
  2. 5 0
      src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java

+ 1 - 0
Changelog.txt

@@ -51,6 +51,7 @@ Version 1.4.06-dev
  = Fixed bug with Blast Mining where the Ability refreshed message was being send too early
  = Fixed bug with Blast Mining where the Ability refreshed message was being send too early
  = Fixed bug where the chance of a successful Gracefull Roll was twice as high as displayed
  = Fixed bug where the chance of a successful Gracefull Roll was twice as high as displayed
  = Fixed bug where lucky perks where not working
  = Fixed bug where lucky perks where not working
+ = Fixed bug with Ice Fishing in the Nether
  ! Changed Spout notification tiers to be stored in SpoutConfig instead of AdvancedConfig
  ! Changed Spout notification tiers to be stored in SpoutConfig instead of AdvancedConfig
  ! Changed Berserk to add items to inventory rather than denying pickup
  ! Changed Berserk to add items to inventory rather than denying pickup
  ! Changed Call of the Wild, newly summoned pet's will have a custom name. (added permission node to disable this)
  ! Changed Call of the Wild, newly summoned pet's will have a custom name. (added permission node to disable this)

+ 5 - 0
src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java

@@ -12,6 +12,7 @@ import org.bukkit.Material;
 import org.bukkit.Sound;
 import org.bukkit.Sound;
 import org.bukkit.WeatherType;
 import org.bukkit.WeatherType;
 import org.bukkit.World;
 import org.bukkit.World;
+import org.bukkit.World.Environment;
 import org.bukkit.block.Biome;
 import org.bukkit.block.Biome;
 import org.bukkit.block.Block;
 import org.bukkit.block.Block;
 import org.bukkit.block.BlockFace;
 import org.bukkit.block.BlockFace;
@@ -176,6 +177,10 @@ public class FishingManager extends SkillManager {
             return false;
             return false;
         }
         }
 
 
+        if (block.getWorld().getEnvironment() == Environment.NETHER) {
+            return false;
+        }
+
         if (block.getType() != Material.ICE) {
         if (block.getType() != Material.ICE) {
             return false;
             return false;
         }
         }