On the Clock

On The Clock

On the Clock is a very simple plugin which logs the individual login and logout times of your staff or players who have the "otc.clock" permission.

On The Clock v2.x

On the Clock, or OTC, has been rewritten from the ground up. The plugin takes a new approach with YAML instead of text files. This format is much better, and is much more organized.

What's New in 2.x

Player.yml

Each player with the proper permissions has one single file as opposed to two separate files for clocking and for the player's custom announcement.

Format

Player.yml files are formatted nicely, and stored in plugins/OnTheClock/Players. The path to a certain date will be, for example, 2013.January.25. Each day is logged individually, with the latest date being on top. Login and logout are logged from earliest to latest. Custom player announcement are also stored here, at the top of the config. Here's an example from my local Player.yml from plugin testing.

Announcement: '&4Ar7ific1al&c will eat your family. '
'2013':
  March:
    '25':
    - 'In: 10:42:1'
    - 'Out: 11:3:34'
    - 'In: 11:5:7'
    - 'Out: 11:34:4'
    - 'In: 11:34:16'
    - 'Out: 11:35:5'
    - 'In: 11:40:41'
    - 'Out: 11:41:32'
    - 'In: 11:41:37'
    - 'Out: 11:44:18'
    - 'In: 11:44:30'
    - 'Out: 11:44:56'
    - 'In: 11:45:0'
    - 'Out: 12:5:29'
    - 'In: 12:5:41'
    - 'Out: 12:6:12'
    '24':
    - 'In: 22:42:1'
    - 'Out: 23:3:34'
    - 'In: 23:5:7'
    - 'Out: 23:34:4'
    - 'In: 23:34:16'
    - 'Out: 23:35:5'
settings.yml

The plugin now uses a config file for a couple customizeable aspects of the plugin. The settings.yml file is located at plugins/OnTheClock.

Customize

There are currently two aspects of the plugin's settings which can be customized. Those are the prefix variable, which appears at the beginning of each player login announcement, and the default announcement. Below is the default settings.yml. Note the variable %p which is replaced with the player's name.

Variables:
#Placed at the beginning of each announcement
    Announcement Prefix: "&6[OTC]&f "
Defaults:
#The default login message for players without custom login message permissions
    Announcements: "&c%p &eis here! Need help? Ask them!"
Permissions

2.x brings a slight change to permissions. There is only one permission changed, and that is the permission for custom announcements on login. Previously, it was otc.announce.special. Now it's otc.announce.custom to reflect the custom nature of the announcement.

Commands

There is one change to commands, to reflect the change to permissions. The custom announcements are no longer referred to as "special announcements." They are "custom broadcasts." As such, the command to change your custom broadcast in-game is now /otc cb Message with formatting goes here

Change Log

3/25/2013

  • Version 2.0
  • Complete plugin rewrite and overhaul!
  • Player clock in/out is now logged to plugins/OnTheClock/Players/playername.yml
  • Players' custom announcements are stored in the same file at plugins/OnTheClock/Players/playername.yml
  • Changes to permissions and commands, detailed above in What's New

1/29/2013

  • Version 1.6
  • "Player joined the game." and OTC announcements no longer show at the same time upon player login. Players with permission "otc.announce.mod" or "otc.announce.special" will not broadcast "Player joined the game." upon logging in.
  • OP players no longer automatically have otc.clock. Give this permission to the group(s) and player(s) who need it.
  • Modified "/otc sa" command. Now split into two commands: "/otc sa" to check your current special announcement and "/otc sa <message>" to set your special announcement.

12/25/2012

  • Version 1.5
  • Added permissions "otc.announce.mod" and "otc.announce.special".
  • Added command "/otc sa <message>" for players to set their special announcement to be broadcast upon login. Requires permission "otc.announce.special".
  • OP players no longer automatically have otc.announce.mod, or otc.announce.special. Give these permissions to the group or players.

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files