Skip to content

Commit 2ff79ee

Browse files
committed
fix
1 parent c153616 commit 2ff79ee

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

UncomplicatedCustomItems/API/Features/CustomItem.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,20 @@ public CustomItem(Player player, ItemInfo itemInfo, SerializableCustomItem seria
1818
/// </summary>
1919
public void Execute()
2020
{
21+
Player.SendConsoleMessage(_itemInfo.Response, string.Empty);
22+
23+
if (_itemInfo.Commands is null)
24+
{
25+
return;
26+
}
27+
2128
foreach (var command in _itemInfo.Commands)
2229
{
2330
if (command is not null && command != string.Empty)
2431
{
2532
Server.ExecuteCommand(command.Replace("%id%", Player.Id.ToString()), Player.Sender);
2633
}
2734
}
28-
29-
Player.SendConsoleMessage(_itemInfo.Response, string.Empty);
3035
}
3136
}
3237
}

0 commit comments

Comments
 (0)