|
@@ -7,6 +7,10 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
|
|
public class ConfigSectionExploitFishing {
|
|
|
|
|
|
private static final boolean PREVENT_FISHING_EXPLOITS_DEFAULT = true;
|
|
|
+ public static final int OVER_FISHING_LIMIT_DEFAULT = 3;
|
|
|
+ public static final boolean ADMINS_OVER_FISHING_DEFAULT = true;
|
|
|
+ public static final float OVER_FISHING_SIZE = 1.0F;
|
|
|
+ public static final int FISHING_ROD_SPAM_THRESHOLD_MILLISECONDS_DEFAULT = 200;
|
|
|
|
|
|
@Setting(value = "Prevent-Fishing-AFK-Farming",
|
|
|
comment = "Prevents many methods for automatically farming Fishing XP." +
|
|
@@ -15,7 +19,48 @@ public class ConfigSectionExploitFishing {
|
|
|
"\nDefault value: "+PREVENT_FISHING_EXPLOITS_DEFAULT)
|
|
|
private boolean preventFishingExploits = PREVENT_FISHING_EXPLOITS_DEFAULT;
|
|
|
|
|
|
+ @Setting(value = "Overfishing-Limit", comment = "How many times a player can fish in the same spot before it becomes over-fished" +
|
|
|
+ "\nOver fishing is in place to prevent 99% of AFK fishing from working." +
|
|
|
+ "\nFishing in a new spot is all it takes to remove over-fishing from your previous location." +
|
|
|
+ "\nOver-fishing is based on where your fishing bobber actually lands and catches fish, it has nothing to do with where you are standing.")
|
|
|
+ private int overfishingLimit = OVER_FISHING_LIMIT_DEFAULT;
|
|
|
+
|
|
|
+ @Setting(value = "Overfishing-Area-Size-Radius", comment = "Over-Fishing tracks where you've caught fish from by making a bounding box around where your fishing rod's bobber lands." +
|
|
|
+ "\nThe bounding box starts from the center of your bobber and expands in all directions double the value of this parameter." +
|
|
|
+ "\nI wouldn't recommend making this value too large or it will be very troublesome for your players to fish." +
|
|
|
+ "\nA value of 1.0 would result in a bounding box that is 2.0 units (blocks) in size" +
|
|
|
+ "\nWhen you catch a new fish it makes a new bounding box at that location and checks to see if it overlaps with the bounding box of the last place you caught a fish," +
|
|
|
+ " if they intersect then that increases your fish counter, if you are at your fishing limit then you get nothing." +
|
|
|
+ "\nDefault value: "+OVER_FISHING_SIZE)
|
|
|
+ private float overFishingAreaSize = OVER_FISHING_SIZE;
|
|
|
+
|
|
|
+ @Setting(value = "Alert-Admins-To-Overfishing-Abuse", comment = "If someone is triggering over-fishing exploit detection too often, alert admins." +
|
|
|
+ "\nThis will send a message to ops in game and to the console, and to anyone with the admin chat permission node.")
|
|
|
+ private boolean alertAdminsOnOverFishing = ADMINS_OVER_FISHING_DEFAULT;
|
|
|
+
|
|
|
+ @Setting(value = "Fishing-Rod-Spam-Threshold-In-Milliseconds", comment = "How many milliseconds in between casting the fishing rod before a player suffers from fatigue." +
|
|
|
+ "\nFatigue causes a loss of 1 hunger and 5 durability damage to the currently held fishing rod." +
|
|
|
+ "\nThis is to prevent exploits for fishing that involve rapid fire auto clickers." +
|
|
|
+ "\nDefault value: "+FISHING_ROD_SPAM_THRESHOLD_MILLISECONDS_DEFAULT)
|
|
|
+ private long fishingRodSpamMilliseconds = FISHING_ROD_SPAM_THRESHOLD_MILLISECONDS_DEFAULT;
|
|
|
+
|
|
|
+ public long getFishingRodSpamMilliseconds() {
|
|
|
+ return fishingRodSpamMilliseconds;
|
|
|
+ }
|
|
|
+
|
|
|
+ public float getOverFishingAreaSize() {
|
|
|
+ return overFishingAreaSize;
|
|
|
+ }
|
|
|
+
|
|
|
public boolean isPreventFishingExploits() {
|
|
|
return preventFishingExploits;
|
|
|
}
|
|
|
+
|
|
|
+ public int getOverfishingLimit() {
|
|
|
+ return overfishingLimit;
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean isAlertAdminsOnOverFishing() {
|
|
|
+ return alertAdminsOnOverFishing;
|
|
|
+ }
|
|
|
}
|