🖥️TrueCompanies API Documentation
Introduction
Welcome to the TrueCompanies API Documentation. This comprehensive guide is tailored for developers seeking to integrate, expand, or customize the core functionalities of the TrueCompanies plugin. Dive in to understand how you can harness our API to build a richer Minecraft corporate experience!
API Basics
The CompanyAPI
class serves as the main entry point to perform operations related to companies, employees, and groups.
Initialization
To instantiate the API with default dependencies:
Key Methods & Descriptions
1. Firing an Employee
Fires a specified employee from a given company.
2. Hiring an Employee
Hires a specific player into a company, assigning them to a designated group/role.
3. Changing an Employee's Group/Role
Alters the role or group of an existing employee within a company.
4. Transferring Company Ownership
Facilitates the transfer of a company's ownership from the current owner to a new individual.
5. Updating Company Balance
Modifies the balance of a specified company by the provided amount.
6. Updating Group Permissions
Adjusts the permissions associated with a particular group within a company.
7. Retrieving a Company by ID
Fetches a Company
object based on its unique identifier.
Events
Events are critical touchpoints allowing developers to inject custom behaviors during specific occurrences. TrueCompanies offers events like CompanyFireEvent
and CompanyHireEvent
to enable this.
Example - Listening to a Hiring Event
Last updated