1. I'd want to get steamid of the player by its name and found out that covalence holds the data i need.
    So I made an attempt to get it and something went wrong. I'm getting compile-time error.
    But how it's possible? PlayerManager property is declared so
    Code:
    public HurtworldPlayerManager PlayerManager { get; private set; }
    Here's my code:
    Code:
    using System;
    using Oxide.Game.Hurtworld.Libraries.Covalence;namespace Oxide.Plugins
    {
        [Info("CovTest", "Test", "1.0")]
        class CovTest : HurtworldPlugin
        {
            private void Loaded()
            {
                var manager = HurtworldCovalenceProvider.Instance.PlayerManager;
                var player = manager.FindPlayer("Test");
                // Just test. This even causes an compiler internal error.
                // error CS0584: Internal compiler error: Object reference not set to an instance of an object
                //var hwplayer = player as HurtworldPlayer;
            }
        }
    }
    
    EDIT:
    Oh.. man. I just realized that these classes does not have any explicit visibility specifier, so they are internal and conditionally visible only in IDE where you're writing plugins in the same project. Probably that's the reason.

    So it's impossible to access the covalence data from regular plugin or i'm missed something?
    How can i achieve my goal then?
     
    Last edited by a moderator: Dec 22, 2015
  2. Wulf

    Wulf Community Admin

    You've overthinking it a bit. ;)

    You can either set your plugin as a CovalencePlugin, and everything will instantly be accessible, else use the library method.

    CovalencePlugin:
    Code:
    server.Broadcast("Hello world");
    Library method:
    Code:
    covalence.Server.Broadcast("Hello world");
     
  3. A library! Yes.. That was not so obvious at a first glance.
    Thanks :)
     
  4. Wulf

    Wulf Community Admin