PlayerTrust

The basic point of this plugin is to be able to leave your server up and available for other folks to explore in a limited way while you or your trusted friends are not there.

This mod locks-down world editing and interaction when trusted players are not logged in. Used by itself, this plugin will use it's config.yml file to identify trusted players (after you tell it who to trust) and will apply basic restrictions to untrusted players when your server is in an unsupervised mode (ie, when you are not online).

If you have PermissionsEX installed the PlayerTrust plugin will use it to change player group memberships when trusted folks are not logged in. Depending on how you have your group memberships configured in PermissionsEX this can be simple, or get quite complicated! Other permissions plugins may also be supported in the future.

Who can be come a trusted player? Well, all ops are trusted automatically. Ops are also the only people that can assign trusted status to other players.


How the plugin works

The basic principle is that when there is a trusted player on your server, any player that joins is 'unrestricted' in what they can do on the sever. When the last trusted player logs-out, those unrestricted players can have some part of their interaction with the world restricted, after receiving a warning message and a delay. The message, the delay and even the kind of restrictions that are applied to the now-restricted players are all configurable (the default configuration is to allow players to still wander around your gameworld and see what it looks like). When a trusted player joins the server again, those restricted players have their restrictions lifted, after a short delay and information message.

Unlike other plugins, restricted players are not kicked from the server - only their interactions with the server become limited.

There are delays associated with granting and pulling the restrictions, it's not instant but it is programmable through the config.yml file. The default delay is 3 seconds for lifting restrictions when a trusted player joins and 30 seconds for imposing restrictions when the last trusted player leaves. There are warnings given to all players when the last trusted player logsout, so there should be no surprises for players that don't already know who the trusted folks are and when they are logging out.


Plugin Commands

If you are an op you can make online or offline players 'trusted players' with the command:

/trust add <player1> <player2> <player3> ...

If you want to trust the players currently logged onto your server use the command:

/trust add *

If you want to remove trust from the players currently logged onto your server use the command:

/trust remove *

To remove the trusted status from a player or list of players use the command:

/trust remove <player1> <player2> <player3> ...

And to see the current list of trusted players use the command:

/trust list

After you make a change to the trusted player list, it will autosave in about three seconds.


config.yml file

The config.yml has some configurations and localization settings that you can change.

You can configure the messages the plugin displays when restrictions are going on/off or about to change. If anyone wants to send me localizations of these I'll gladly figure out how to incorporate them into the main code branch for others to benefit from.

  • Info: This server uses PlayerTrust. When all trusted players logout the server will restrict untrusted players.
  • RestrictionsOn: No trusted members remain on the server. Player actions locked.
  • RestrictionsOff: Trusted members are present on the server. Player actions are unlocked.
  • RestrictionsGoingOn: No trusted members remain on the server. Player actions are locking....
  • RestrictionsGoingOff: Trusted members are present on the server. Player actions are unlocking...

The config.yml allows you to specify general restrictions for restricted players. If you are using PEX these will still apply, unless you specifically disable them by setting them false. The default values are all true, except for RestrictMove and RestrictCommandPreprocess which have given me problems when I turn them on. Feel free to fiddle with any of them and let me know what you think would make for better defaults.

  • RestrictBedEnter: true
  • RestrictCommandPreprocess: false
  • RestrictDropItem: true
  • RestrictFishing: true
  • RestrictInteract: true
  • RestrictInteractEntity: true
  • RestrictMove: false
  • RestrictPickupItem: true

The settings that control the delay for restrictions going on or off are also programmable. Large numbers here or numbers smaller than 0 are probably not a good idea. Use only whole numbers please.

  • SecondsToLock: 30
  • SecondsToUnlock: 3

If you are using PermissionsEX there are settings that indicate which player-group a player should be switched to when they become trusted, or when they are restricted (ie, when no trusted players are online): you have fine grain control of which permissions you apply.

  • PEXTrustedGroup: Trusted
  • PEXRestrictedGroup: Restricted

If you are not using PermissionsEX the names of the trusted players will be stored in the plugins/PlayerTrust/config.yml file. You don't have to edit this file by hand, you should use the chat commands to do this. If you want to change this file by hand you should do so when the server is stopped, as your changes will get clobbered if the plugin auto-saves from a chat-command change.

  • TrustedPlayers: []

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files