Mod Server API

From Eco - English Wiki
Revision as of 21:24, 11 February 2022 by Salbris (talk | contribs) (Created page with "== Introduction == This page provides some tips for how to interact with the Server API when you create mod that needs to interact with the game's runtime state or behaviour. A full comprehensive list of the entire API can be found at https://docs.play.eco/api/server/index.html. == Player == The User and Player class contain references to the Player's owned objects, inventories, their stats, professions, etc. If you have a User and need to get a Player instance it's as...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

This page provides some tips for how to interact with the Server API when you create mod that needs to interact with the game's runtime state or behaviour. A full comprehensive list of the entire API can be found at https://docs.play.eco/api/server/index.html.

Player

The User and Player class contain references to the Player's owned objects, inventories, their stats, professions, etc. If you have a User and need to get a Player instance it's as simple as:

user.Player

Accessing the Player's Inventory

player.Inventory.Backpack