I am not sure if this is happening everywhere, but I found on my server that users can use the /castpole command to cast a line without having a pole or any other item in their inventory or hotbar.
Castpole not requiring a poleBug
Find this function in plugin
and replace it with this
Save reload try it
private bool ValidateCastFish(BasePlayer player)
{
if (IsFishing(player)) { SendReply(player, msg("alreadyfishing", player.UserIDString)); return false; }
if (HasFishingCooldown(player)) { SendReply(player, msg("toosoon", player.UserIDString)); return false; }
if (!LookingAtWater(player)) { SendReply(player, msg("notlookingatwater", player.UserIDString)); return false; }
return true;
}and replace it with this
private bool ValidateCastFish(BasePlayer player)
{
if (IsFishing(player)) { SendReply(player, msg("alreadyfishing", player.UserIDString)); return false; }
if (HasFishingCooldown(player)) { SendReply(player, msg("toosoon", player.UserIDString)); return false; }
if (!LookingAtWater(player)) { SendReply(player, msg("notlookingatwater", player.UserIDString)); return false; }
if (!UsingCastRod(player)) { SendReply(player, msg("Fishing Pole not in Hand", player.UserIDString)); return false; }
return true;
}Save reload try it
That worked. Thanks!