Skip to content

Commit

Permalink
Close #307
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardosnt committed Jun 13, 2016
1 parent 5f4868f commit 08dcf0c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Commands/CommandSpawnItem.cs
Expand Up @@ -25,6 +25,7 @@
using Essentials.Common.Util;
using SDG.Unturned;
using UnityEngine;
using Essentials.Api;

namespace Essentials.Commands
{
Expand Down Expand Up @@ -77,6 +78,12 @@ public override CommandResult OnExecute( ICommandSource src, ICommandArgs args )
return CommandResult.Lang( EssLang.INVALID_ITEM_ID, rawId );
}

if ( UEssentials.Config.GiveItemBlacklist.Contains( itemAsset.Value.id ) &&
!src.HasPermission( "essentials.bypass.blacklist.item" ) )
{
return CommandResult.Lang( EssLang.BLACKLISTED_ITEM, $"{itemAsset.Value.itemName} ({itemAsset.Value.Id})" );
}

var item = new Item( itemAsset.Value.id, true );

if ( itemAsset.Value is ItemFuelAsset )
Expand Down

0 comments on commit 08dcf0c

Please sign in to comment.