apply the rest of fixes for snake flute, prevent players from seeing the npc perm error on join

This commit is contained in:
Rustly 2020-06-15 13:32:42 -05:00
parent 013ef4ce98
commit 01bae0475d
3 changed files with 35 additions and 17 deletions

View file

@ -56,6 +56,13 @@ namespace TShockAPI.Handlers.NetModules
string permission = PowerToPermissionMap[powerType];
//prevent being told about the spawnrate permission on join until relogic fixes
if (!player.HasReceivedNPCPermissionError && powerType == CreativePowerTypes.SetSpawnRate)
{
player.HasReceivedNPCPermissionError = true;
return false;
}
if (!player.HasPermission(permission))
{
player.SendErrorMessage("You do not have permission to {0}.", PermissionToDescriptionMap[permission]);