To anyone wanting to use it the way that I am, this is what I did to change it. Arainrr could possibly make this a config option if he wants to. Basically, you change the plugin file, and anywhere "OnPlayerAttack" is being called, use "OnMeleeAttack" instead. An example is below.
private void OnPlayerAttack(BasePlayer attacker, HitInfo info)
{
if (attacker == null || !attacker.userID.IsSteamId()) return;
var barrel = info?.HitEntity as LootContainer;
if (barrel == null || barrel.net == null) return;
if (!IsBarrel(barrel.ShortPrefabName)) return;
if (permission.UserHasPermission(attacker.UserIDString, PERMISSION_USE))
{
if (TryPickupLootContainer(barrel, attacker, info))
{
}
}
}
You would change the above to :
private void OnMeleeAttack(BasePlayer attacker, HitInfo info)
{
if (attacker == null || !attacker.userID.IsSteamId()) return;
var barrel = info?.HitEntity as LootContainer;
if (barrel == null || barrel.net == null) return;
if (!IsBarrel(barrel.ShortPrefabName)) return;
if (permission.UserHasPermission(attacker.UserIDString, PERMISSION_USE))
{
if (TryPickupLootContainer(barrel, attacker, info))
{
}
}
}
Just make sure you change all instances of OnPlayerAttack to OnMeleeAttack.