1. Hi,

    I do not use the IsCrafting :

    Lua
    Code:
    if player.isCrafting then
        self:SendMessage(player, self.Config.Messages.Crafting)
        return
    end
    => Displays the message when the player does not craft.

    C#
    Code:
    if (player.IsCrafting())
    {
        SendReply(player, cantusewhilecraft);
        return;
    }
    => Type `BasePlayer' does not contain a definition for `IsCrafting' and no extension method `IsCrafting' of type `BasePlayer' could be found. Are you missing an assembly reference?
     
  2. There is field, property or method to use directly to see if a player is crafting or not, but you can check if the crafting queue is empty or not. The crafting queue is part of the ItemCrafter class and should be accessible by using `player.inventory.crafting.queue`.
     
  3. Code:
    #LUA
    if player.inventory.crafting.queue then
        self:SendMessage(player, self.Config.Messages.Crafting)
        return
    end
    Displays "self.Config.Messages.Crafting" in both cases : /
     
  4. That queue is an object of the type Queue<ItemCraftTask>, you still need to check if it has any values in it or not to determine if the user is crafting or not. just checking the queue will basically just do a null check and it won't every be null, it will always be a queue but it will just not always hold values.
     
  5. Code:
    if player.inventory.crafting.queue.Count > 0 then
    Thank you !
     
    Last edited by a moderator: Feb 8, 2016