Trust and Access
Share a minion with friends, decide what trusted players may do, and connect island or guild plugins.
Every minion belongs to the player who placed it. Owners can share a minion with friends by trusting them, and you decide per minion type what trusted players are allowed to do. Island and guild plugins can plug in too, so members of the same island share minions without anyone typing names.
The owner
The owner can do everything with their minion. A few things stay with the owner and nobody else, whatever the trust settings say:
- Pausing and resuming the minion.
- Adding and removing trusted players.
- Turning the minion with the Facing button.
- Switching what a chunk collector collects with its Collecting button.
- Picking the minion up with
/minion remove.
The only other people who can do those are players with the admin bypass permission, below.
Trusting a player
Trust is set per minion. Trusting a friend on one minion does not give them your other minions.
Open the trust menu
Open the minion's menu and click Trusted players. Only the owner can open it.
Add a player
Click Add a player. A menu opens with the heads of the players who are online right now, leaving out you, players already trusted on this minion and players hidden from you.
Pick them
Click a head to trust that player. The head leaves the list, so you can pick more than one in a row. The Back button returns to the trust menu.
For a player who is offline, click Type a name in the picker instead. The menu closes and the chat asks for a name. Type it, and the trust menu opens again with the new player's head in it. The typed message is hidden from chat, see the chat prompt below. When every online player is already trusted, the picker shows Nobody to pick and the Type a name button still works.
To take trust away, click the player's head in the trust menu.
A few details:
- A typed name must belong to a player who has joined the server before.
- Owners cannot trust themselves.
- The trusted list is saved in the database and kept across restarts.
- Each head shows the player's real skin. A skin the server has not seen yet is looked up in the background and cached, and the menu redraws itself once it arrives, so a head can show the default skin for a moment first.
The chat prompt
The prompt is set in config.yml. The same prompt is used by the owner filter in the admin menu.
input:
cancel-word: cancel
timeout-seconds: 30| Key | Shipped value | What it does |
|---|---|---|
input.cancel-word | cancel | Typing this word stops the prompt |
input.timeout-seconds | 30 | How long the prompt waits, in seconds. 0 means it waits until the player types or leaves |
The prompt also ends when the player leaves the server.
MinionCore hides the typed answer at three points of chat handling. It cancels the message, empties its list of recipients and blanks the text before other plugins see it, does all three again after most other plugins have handled it, and once more at the very end. If the same player sends the same text again within 3 seconds, as some chat plugins do when they resend a message, that copy is hidden too. plugin.yml also asks the server to load MinionCore before common chat plugins such as EssentialsChat, VentureChat, ChatControl, DeluxeChat, LPC, CarbonChat, HuskChat, TownyChat, Chatty, ChatEx, UltimateChat and DiscordSRV, so their listeners see the message already cancelled.
A chat plugin running on the proxy, such as on BungeeCord or Velocity, or a plugin that listens to Paper's own chat event, can still see the text. The Spigot API has no way to stop them. That is why the picker exists: clicking a head types nothing at all, so use it for anyone who is online.
The prompt messages live under input in the language file. See Messages and language.
What trusted players may do
Each minion type file has a trusted section. Every key is one action, set to true or false. These are all the keys it can hold:
trusted:
open: true
take-storage: true
fuel: true
upgrade: true
filter: true
pickup: false
pair: false
repair: true
saplings: true
block-filter: false
hologram: false| Key | Shipped value | What it allows |
|---|---|---|
open | true | Opening the minion menu |
take-storage | true | Taking items out of storage, take everything, sell everything, and collecting stored experience |
fuel | true | Adding fuel, by right click or in the menu |
upgrade | true | Buying levels, opening the upgrades menu and applying upgrade items, by right click or in the menu |
filter | true | Changing the filter and its groups |
pickup | false | Picking the minion up from the menu or with shift and right click |
pair | false | Starting pairing on a chunk collector, and unpairing minions from its Paired minions list |
repair | true | Opening the repair menu of a broken minion by right clicking it, and paying for the repair |
saplings | true | Adding saplings to a lumberjack's sapling store and taking them out |
block-filter | false | Changing a miner's, farmer's or lumberjack's block filter |
hologram | false | Hiding and showing the minion's hologram with the Hologram button or /minion holograms hide this |
Every shipped type file has pickup: false and repair: true. Only chunkcollector.yml lists pair, only lumberjack.yml lists saplings, and only miner.yml, farmer.yml and lumberjack.yml list block-filter. A key missing from a file uses the default: pickup, pair, block-filter and hologram are off, the rest are on. Changes apply after /minion reload.
A trusted player without open cannot get into the menu. They can still right click the minion with an upgrade item if upgrade is on, with fuel if fuel is on, and shift and right click to pick it up if pickup is on.
Trust and chunk collectors
A chunk collector only takes items from the minions paired with it, and trust does not add any. The pair action is checked on the collector. A trusted player with it can start pairing and unpair minions, but a minion can only be paired with a collector of the same owner, and only by that owner or a player with the admin bypass.
Broken minions
When a minion has broken down, right clicking it opens the repair menu instead of the minion menu, for anyone with the repair action. Players without it get the refusal message below. The action is checked again when the repair is confirmed.
Admin bypass
Players with minioncore.admin.bypass can do everything the owner can, on every minion. It is part of minioncore.admin, so give it with care. Server operators have it by default. See Permissions.
Island and guild plugins
An access provider lets another plugin say who belongs together, such as members of the same island, guild, town or team. Members then get the actions you list for that provider, without being trusted by name.
No access provider ships with MinionCore. One has to come from an addon or from the island or guild plugin itself, which registers it through the Developer API. Until then, access.providers does nothing.
List the allowed actions in config.yml under the id the provider registers:
access:
providers:
islands:
- open
- take-storage
- fuel- The id,
islandshere, must match the id the provider registers. Ask the addon's author which id it uses. - The actions are the same ten as the
trustedsection:open,take-storage,fuel,upgrade,filter,pickup,pair,repair,saplingsandblock-filter. Anything else in the list is ignored. - A provider with no actions listed gives its members nothing.
- Pause, trust management, facing, the collector mode and
/minion removestay owner only.
The shipped value is providers: {}, which means none.
When a player is refused
A refused player gets a message naming the owner, so they know whose minion it is. Which message depends on whether they have any access at all:
| Language key | Shown when | Shipped text |
|---|---|---|
access.not-yours | The player has no access to this minion | This minion belongs to %owner%. |
access.not-allowed | The player is trusted or a provider member, but not for this action | You are not allowed to do that. This minion belongs to %owner%. |
Checked on every click
Access is checked again on every click, not just when the menu opens. If an owner removes someone's trust while that player has the menu open, their next click is refused. If they can no longer open the menu at all, it closes.