Configuration

[ Features | > Configuration | Commands | Permissions | Developer API ]

All features are disabled by default. A server admin has to modify the configuration file (/plugins/PlayerActivity/config.yml) and set enabled: true for each feature as desired.

You can customize any messages as desired for language, color, or formatting. Messages use indexed format elements as described in Java's MessageFormat usage. All messages recognize color or format codes prefixed with a section sign (§). Most all messages will convert {0} into the current time (except those who have a name prefixed with a plus sign (+)).

Once you make any configuration file changes you need to reload the plugin with the /playeractivity:reload command.

Default Activity

The configuration file contains a default list of activities that are monitored by each consumer (Idle Notify, Idle Kick, Away/Back, and List Tag) that does not override it with their own specific activity list.

/plugins/PlayerActivity/config.yml

activity:
  - PlayerMoveBlockEvent
  - AsyncPlayerChatEvent
  - PlayerInteractEvent
  - PlayerDropItemEvent
  - PlayerToggleSneakEvent
  - PlayerItemHeldEvent
  - PlayerJoinEvent
  - PlayerChangedWorldEvent
  - CraftItemEvent
  - PrepareItemCraftEvent
  - EnchantItemEvent
  - PrepareItemEnchantEvent
  - InventoryClickEvent
  - PlayerBack

Idle Notify

Create notifications when a player goes idle and/or is active again. By default a server wide broadcast will result (e.g. EdGruberman has been idle for 1m). When the player is active again it will generate another server wide broadcast (e.g. EdGruberman is back after being idle for 7m 12s) When cancel-when-away is true, if a player has marked themselves as /away manually the idle related messages will not display. To exempt a specific player from generating these messages at all set the playeractivity.track.idlenotify permission to false.

/plugins/PlayerActivity/config.yml

idle-notify:
  enabled: true
  idle: 600 # threshold when to notify (seconds)
  cancel-when-away: true

/plugins/PlayerActivity/language.yml

idle: '§8{0,time,HH:mm:ss} {3}§8 has been §3idle§8 for {1}' # 1 = Current Idle Duration, 2 = Kick Idle Duration, 3 = Player Display Name
active: '§8{0,time,HH:mm:ss} {3}§8 is §6back§8 after being idle for {1}' # 1 = Current Idle Duration, 2 = Kick Idle Duration, 3 = Player Display Name
idle-notify: null # 1 = Current Idle Duration, 2 = Kick Idle Duration

Idle Kick

Kick a player when they go idle. The idle threshold can be set differently than idleNotify so you can use them together to create a warning first, then later kick. To exempt a specific player from being kicked set the playeractivity.track.idlekick permission to false.

/plugins/PlayerActivity/config.yml

idle-kick:
  enabled: false
  idle: 1200 # threshold when to kick (seconds)

/plugins/PlayerActivity/language.yml

+idle-kick-reason: 'Idle for {0}' # 0 = Kick Idle Duration

Away/Back

Allow players to manually mark themselves as /away and /back. A server wide broadcast notification will result for each. By default, a player will be marked back automatically if they chat or enter/exit bed. If mentions is true, then when a player uses the /back command they will be told if any other players used their name in chat.

/plugins/PlayerActivity/config.yml

away-back:
  enabled: true
  mentions: true
  activity:
    - AsyncPlayerChatEvent
    - PlayerBedEnterEvent
    - PlayerBedLeaveEvent
    - PlayerBack

/plugins/PlayerActivity/language.yml

away: '§8{0,time,HH:mm:ss} {1}§8 is §9away§8 for §7{2}' # 1 = Player Display Name, 2 = Away Reason
back: '§8{0,time,HH:mm:ss} {1}§8 is §6back§8 after §7{2}§8 for §7{3}' # 1 = Player Display Name, 2 = Away Reason, 3 = Away Duration
back-already: '§f-> §7You are §enot away'
away-already: '§f-> §7You are §ealready away§7 {1} for §o{2} §8(§7To return: §b/back§8)' # 1 = Duration, 2 = Reason
+away-default-reason: 'no reason'
mentions: '§f-> §7{1}§7 has been §9away§7 {2} for §o{3}' # 1 = Player Display Name, 2 = Away Duration, 3 = Reason
mentions-summary:
  format: '§f-> §7Your name was §dmentioned§7 by: {1}' # 1 = Players
  +item: '§7{0} §8({1} ago)' # 0 = Display Name, 1 = Duration Since Last Mention
  +delimiter: ', '

List Tag

Format the player list name (what players see when they press the tab key) based on idle, away, or in bed. Player list names can not be more than 16 characters, including color and format codes, so player names will be truncated to fit the tab on the end.

/plugins/PlayerActivity/config.yml

list-tag:
  enabled: true
  tags:
    Away:
      priority: 1
    Idle:
      priority: 2
      idle: 60 # threshold when to apply idle tag (seconds)
    Bed:
      priority: 3

/plugins/PlayerActivity/language.yml

tag-Away:
  +pattern: '{0}§9#Away' # 0 = Player Name
  +description: '§9Away§7 {0} for §o{3}' # 0 = Duration, 1 = hasTag(0|1), 2 = List Name, 3 = Reason
tag-Idle:
  +pattern: '{0}§3#Idle' # 0 = Player Name
  +description: '§3Idle§7 {0}' # 0 = Duration, 1 = hasTag(0|1), 2 = List Name
tag-Bed:
  +pattern: '{0}§5#Bed' # 0 = Player Name
  +description: 'In bed {0}' # 0 = Duration, 1 = hasTag(0|1), 2 = List Name

Who and Players Commands

The /who and /players commands are always enabled and will let players determine who is connected and if they are idle or away. /who without any parameters will redirect to run the /players command and list currently connected players.

/plugins/PlayerActivity/language.yml

players:
  format: '§f-> §7Players: {2,choice,0#§8None|1#{1} §8({2})}' # 1 = Players, 2 = Count
  +item: '§7{0}' # 0 = Tagged Display Name
  +delimiter: '§8, '
who:
  connected: '§f-> §7{1}§7 connected {2} ago {4,choice,0#|1#§8({3}§8)}' # 1 = Display Name, 2 = Last Connected Duration, 3 = Tag Description, 4 = hasTag(0|1)
  disconnected: '§f-> §7{1}§7 §9disconnected§7 {2} ago' # 1 = Player Name, 2 = Last Disconnected Duration
  +unknown-connected: '§osome time§7'

Defaults

The default /plugins/PlayerActivity/config.yml and /plugins/PlayerActivity/language.yml files will be created the first time a Bukkit server is started with this plugin. Then they can be edited and the plugin reloaded with the /playeractivity:reload command.

It can be manually created and edited as desired before the first run. Simply copy all the contents below and paste into a new text files at /plugins/PlayerActivity/config.yml and /plugins/PlayerActivity/language.yml and edit as necessary.

http://i.imgur.com/eQ8Zd.jpg Default /plugins/PlayerActivity/config.yml

http://i.imgur.com/eQ8Zd.jpg Default /plugins/PlayerActivity/language.yml


Comments

Posts Quoted:
Reply
Clear All Quotes