1. Hi there, I'm trying to modify R-Remover Tool to check for the owner from the Entity Owner plugin.

    Specifically here
    Code:
    if (entity is BuildingBlock)
                    {
                        var returnhook = Interface.GetMod().CallHook("FindBlockData", new object[] { entity as BuildingBlock });
                        if (returnhook is string)
                        {
                            string ownerid = (string)returnhook;
                            if (player.userID.ToString() == ownerid) return true;
                            if (useRustIO && RustIOIsInstalled())
                                if (HasFriend(ownerid, player.userID.ToString()))
                                    return true;
                        }
                    }
    As you can see it is calling another plugin for this, but I want to change this.

    The API from EntityOwner has these two API methods
    Code:
    // Gets the name and status of the owner player
    // Returns null if no owner found
    string GetOwnerName(BaseEntity entity)// Get the BasePlayer instance (if known) of the owner player
    // Returns null if no owner found
    BasePlayer GetOwnerPlayer(BaseEntity entity)
    I'm not sure where to start, and I have been searching however I'm still a novice coder and I can't find anything that helps me.
     
  2. Wulf

    Wulf Community Admin