Browse Source

Added permission node to bypass the fishing exploit prevention

Permission node: `mcmmo.bypass.kraken` false by default.
TfT_02 12 years ago
parent
commit
68d8d6dd30

+ 1 - 0
Changelog.txt

@@ -20,6 +20,7 @@ Version 1.4.06-dev
  + Added configurable cooldown and warmup times when using /ptp
  + Added a new Party item share category "Misc" which contains a list of configurable items. (By default all tools and armor)
  + Added fishing exploit prevention
+ + Added permission node to bypass the fishing exploit prevention
  + Added boosts to Fishing chance depending on conditions
  + Added McMMOAbilityActivateEvent and McMMOAbilityDeactivateEvent
  + Added config option to toggle the size of fireworks

+ 3 - 1
src/main/java/com/gmail/nossr50/listeners/PlayerListener.java

@@ -178,7 +178,9 @@ public class PlayerListener implements Listener {
 
         switch (event.getState()) {
             case FISHING:
-                event.setCancelled(fishingManager.exploitPrevention());
+                if (!Permissions.krakenBypass(player)) {
+                    event.setCancelled(fishingManager.exploitPrevention());
+                }
 
                 if (event.isCancelled()) {
                     return;

+ 1 - 0
src/main/java/com/gmail/nossr50/util/Permissions.java

@@ -27,6 +27,7 @@ public final class Permissions {
     /* BYPASS */
     public static boolean hardcoreBypass(Permissible permissible) { return permissible.hasPermission("mcmmo.bypass.hardcoremode"); }
     public static boolean arcaneBypass(Permissible permissible) { return permissible.hasPermission("mcmmo.bypass.arcanebypass"); }
+    public static boolean krakenBypass(Permissible permissible) { return permissible.hasPermission("mcmmo.bypass.kraken"); }
 
     /* CHAT */
     public static boolean partyChat(Permissible permissible) { return permissible.hasPermission("mcmmo.chat.partychat"); }

+ 4 - 0
src/main/resources/plugin.yml

@@ -610,6 +610,7 @@ permissions:
         children:
             mcmmo.bypass.arcanebypass: true
             mcmmo.bypass.hardcoremode: true
+            mcmmo.bypass.kraken: true
             mcmmo.commands.inspect.far: true
             mcmmo.commands.inspect.offline: true
     mcmmo.bypass.arcanebypass:
@@ -618,6 +619,9 @@ permissions:
     mcmmo.bypass.hardcoremode:
         default: false
         description: Allows user to bypass negative penalties of Hardcore mode
+    mcmmo.bypass.kraken:
+        default: false
+        description: Allows user to bypass the effects of the exploit prevention when Fishing
     mcmmo.bypass.inspect.distance:
         default: false
         description: Allows user to bypass Inspect's distance requirements