Sueta

SignLog

1.0

Logs sign data and sends msgs

·Plugin

Overview

When someone places a sign, it will log the text to the console and send it to any players who have the permission.

I built it on 1.14.4, but it doesn't use anything fancy so I assume it'll work on a wide variety of MC versions. If you try it and it does not, let me know the ver and I can tweak it.

The format for the messaging is in the config.yml under messages:

prefix-player: Sent first for messages going to players
prefix-console: Sent first for messages going to console
code-player: Text from the sign, sent to the players
code-console: Text from the sign, sent to the console
suffix-player: Sent at the end for messages going to players
suffix-console: Sent at the end for messages going to console

Those messages support the following tokens:
%br% = Line break
%player% = Name of player who placed sign
%line% = Line of text from sign (only value in code- messages)
~ = Insert a space (only used when configuring in-game, do not put this in the config.yml directly and expect it to change to space in use)

So for example, if you have:

prefix-player: '&b[&3%player%&b]%br%&e------------------------------%br%'
prefix-console: '[%player%: '
code-player: '&1%line% '
code-console: '%line% '
suffix-player: '%br%&e------------------------------'
suffix-console: ' ]'

...and I post a sign:

"Lets go to
spawn and

grief it!"

...you'd get this message to your character if logged in and if you have signlog.receive:

[ Strahan ]
------------------------------
Lets go to spawn and grief it!
------------------------------

...and console would get:

[23:51:45] [Server thread/INFO]: [SignLogger] [Strahan: Lets go to spawn and grief it! ]

Let's say for player messaging instead of that you just wanted each line to appear as if the person had chatted it:

prefix-player: ''
code-player: '&b<&3%player%&b> &1%line%%br%'
suffix-player: ''

Now with the sign example above, in your chat you'd see:

< Strahan > Lets go to
< Strahan > spawn and
< Strahan > grief it!

By default, the display of empty lines is suppressed. However if you do /signlog empty, it will toggle it on or off. If you toggled it on, you'd see this instead:

< Strahan > Lets go to
< Strahan > spawn and
< Strahan >
< Strahan > grief it!

Permissions

signlog.admin - Gives all access to in game configuration. Does not automatically apply receive or see-own
signlog.reload - Access to /signlog reload
signlog.viewcode - Access to /signlog reload
signlog.setcode - Access to /signlog reload
signlog.empty - Access to /signlog empty
signlog.receive - Get messages when signs are placed
signlog.see-own - Get messages for signs you place

Commands

SIGNLOG VIEW [ code | prefix | suffix ] [ player | console ]
signlog.view
Check what the current value is for the specified message

SIGNLOG SET [ code | prefix | suffix ] [ player | console ] data
signlog.set
Set the value for the specified message

SIGNLOG EMPTY
signlog.empty
Toggles whether or not you will see empty lines when messages are sent

SIGNLOG RELOAD
signlog.reload
Reloads configuration from disk

Similar projects

Plugin →