Revert regression, restoring material based salvage permissions (#5130)

* Revert regression.  Fixes salvage permissions by material type

---------

Signed-off-by: Momshroom <Momshroom@gmail.com>
This commit is contained in:
Momshroom 2024-12-29 19:13:20 -06:00 committed by GitHub
parent dae66c7433
commit b4d9337329
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,6 +78,17 @@ public class SalvageManager extends SkillManager {
} }
} }
// Permissions checks on material and item types
if (!Permissions.salvageItemType(player, salvageable.getSalvageItemType())) {
NotificationManager.sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
return;
}
if (!Permissions.salvageMaterialType(player, salvageable.getSalvageMaterialType())) {
NotificationManager.sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
return;
}
/*int skillLevel = getSkillLevel();*/ /*int skillLevel = getSkillLevel();*/
int minimumSalvageableLevel = salvageable.getMinimumLevel(); int minimumSalvageableLevel = salvageable.getMinimumLevel();