Important
This plugin is not full tested yet.
- Go into the
./bdsx-root/plugins
folder and open a new terminal - Type
git clone https://github.com/Presence-Man/presence-man-bdsx.git
and press enter - Start server
./bdsx-root/bdsx.<bat | sh>
- Let the server boot, then type /stop (Now the important files are created in bdsx-root/plugin_data)
- Go into
./bdsx-root/plugin_data/Presence-Man
and configure config.jsonc (.jsonc --> json with comments) - Start server again
./bdsx-root/bdsx.<bat | sh>
- If you done everything correctly, users that are using our application should have an activity with your server now!
Tip
For more information about presence-man configuration, check out on our discord > #getting-started-as-a-server-owner
API for developers:
import * as PresenceMan from "@bdsx/presence-man-bdsx";
import {
APIActivity, ActivityType, DefaultActivities,
getSkinURL, getHeadURL, setActivity
}, * as PresenceMan from "./index";
// NOTE: Update activity
// Also works: const activity_oop = new APIActivity();
const activity_default = PresenceMan.DefaultActivities.activity();
const activity_ends_in_15mins = PresenceMan.DefaultActivities.ends_in(Date.now() +(1000 *60 *15), activity_default);
const activity_players_left = PresenceMan.DefaultActivities.players_left(9, 16, activity_ends_in_15mins);
PresenceMan.setActivity(player, activity_players_left); // update
PresenceMan.setActivity(player, null); // clear
// NOTE: Get skin/head url
const gray = false;
const size = 128; // 128x128
PresenceMan.getSkinURL(player, gray);
PresenceMan.getHeadURL(player, !gray, scale);
"dependencies": {
"@bdsx/presence-man-bdsx": "^0.1.0"
}
But you have to install it via git clone