Configuration

Configuration Layout

http://1ro.co/resources/playtime/main_off.pnghttp://1ro.co/resources/playtime/configuration_on.pnghttp://1ro.co/resources/playtime/commands_off.pnghttp://1ro.co/resources/playtime/permissions_off.pnghttp://1ro.co/resources/playtime/development_off.png

Config.yml

general:
  debug-level: 0
  update-check: true
language:
  use-github: true
  locale: en_US
check:
  death-time: true
  online-time: true
afk:
  enabled: true
  interval: 60
  timeout: 900
  check-chat: false
data:
  manager: 'flatfile'
managers:
  mysql:
    host: localhost
    port: '3306'
    database: minecraft
    username: root
    password: password

General

Debug-level - Sets the level of debug output to the system console. Setting to 3 WILL produce a lot of output from the plugin.

  • 0 - No output (Default)
  • 1 - Low output; Update messages, general feedback
  • 2 - Moderate output; Shows internal processes, less spammy operations
  • 3 - Heavy output; Shows intricate processes and displays errors

Update-check - Sets whether to check for updates or not. When set to false, no outgoing network activity will occur for updates.

  • true - (Default) Will check for a version update from github
  • false - Will not check for a version update from github

Language

Use-github - Whether or not to retrieve updated lang files from github. If set to false, no outgoing network activity will occur for language files. Note that not updating language files between plugin updates will cause the plugin to break.

  • true - (Default) Lang files will be updated when needed.
  • false - Will not check for new lang files from github on startup.

Locale - The language setting to use.

  • Currently supported: en_US (English), de_DE (German)

I could use help/verification on any translations you see on the link below!: https://github.com/1Rogue/PlayTime/tree/master/lang/1.4.1

Check

Death-time: Sets whether to keep track of how long a player has been alive for.

  • true - (Default) Enables reset for /deathtime on death, will update db with deathtime
  • false - Disables service entirely including command and listener

Online-time: Sets whether to keep track of how long a player has been online for.

  • true - (Default) Enables reset for /onlinetime on logout, will update db with onlinetime
  • false - Disables service entirely including command and listener

AFK

Main configuration for AFK settings

Enabled

  • true - (Default) Will run the AFK service, listener, and
  • false - Disabled the AFK checking service

Interval - Amount of time in seconds between checks for afk players (Default: 60)

Timeout - At what point in seconds a player is considered AFK (Default: 900)

Check-chat - Whether player chat should be monitored

  • true - Player will be considered not afk when chatting, and afk timers will be reset upon chatting
  • false - (Default) Chatting will have no effect on a player's afk status

Data

Manager - What form of data storage to use

  • flatfile - (Default) Stores information in a YAML named users.yml
  • mysql - (Recommended) Stores information in a MySQL database
  • sqlite - (Fastest) Stores information in a single-file local database.

Do note that sqlite storage is experimental, and may be buggy. I have not tested it yet with a large number of people. Also note that once you start getting a large amount of people, you should not use flatfile storage.

Also note that if you switch the data manager, that the data will not transfer over. There will be an update where you can do this via command.

Managers

MySQL - Settings for the MySQL manager.

  • host - (Default: localhost) Host for the MySQL server
  • port - (Default: 3306) Port for the MySQL server
  • database - (Default: minecraft) The database on the server to use
  • username - (Default: root) The username to log in with
  • password - (Default: password) The password to log in with

If you have purchased hosting, you will most likely need to request for this feature to be implemented. A host will usually provide the details after it is set up.





Events.yml

An example events.yml: Click Here

Keep in mind, the teir underneath "events" can be named whatever you wish it to be. It's similar to groups in permissions, just name your event there :). For that reason, I'll be going over the parts in making a new event:

Type

default: playtime supported: playtime, deathtime, onlinetime

This is the type of timer to check against. If a timer does not match against any available timer, it will use playtime.

Time

default: 0 supported: Any numeric value (No decimals)

This is the time at which to activate an event in minutes. Depending on the timer used, it will activate x minutes into it. So if this was set at 60, it would activate at either 60 minutes of playtime, 60 minutes of being alive, or 60 minutes of being online.

At-Login

default: false supported: true, false

Whether to register this as a login event. If this is marked as "true", then it will execute for a given player when they log in, and not based on the other values.

Repeat

default: false supported: true, false

Whether to repeat the timer for every x time interval, or to only trigger the event once. When activated, it will allow the event to occur every interval that the timer is reached. When false, it will only occur when the timer has reached that particular time. The second event in the example file will trigger every two hours that a player has been online, for reference.

Commands

default: none supported: any command that you would be able to run in the console

NOTE: I do not filter out commands that begin with a /. If you have a / in the beginning of your command, it will not work unless you were able to run it in the console as such.

This is a list of commands to run when a player triggers this event. There are a few variables to keep in mind:

%u: Text of the player's name. %t: Text of the player's time (when the event is triggered).

Other than that, it can basically be any console-runnable command. Such as 'msg %u You look nice today, Dave.'


Comments

Posts Quoted:
Reply
Clear All Quotes