ChestShop Notifier

Note: The latest version of this plugin works with every UUID-compatible CraftBukkit or Spigot version!

CSN (ChestShop Notifier) is a plugin that records ChestShop transactions to a SQLite or MySQL database. When a shop owner logs onto the server, they will be presented with an option to view sales from when they were offline.

Installation Instructions

Commands

  • /csn help → Shows available commands
  • /csn history [<page>] → Shows unread sale history from database
  • /csn history [<username> [<page>]] → Shows sale history of another player
  • /csn clear [<usernamse>] → Marks all sale history as read for your user
  • /csn cleandatabase → Remove database entries. Parameters:
    --older-than, -o days → Removes entries older than days
    --user, -user username/uuid → Removes entries from a single user only
    --read-only, -r → Removes only read entries, default behaviour
    --all, -a → Removes all entries
  • /csn upload → Forces the plugin to upload all data to the database (in v1.1 and higher this should be only used after database connection problems!)
  • /csn reload → Reloads configuration and connects to database using new config
  • /csn convert → Converts the database table csn to UUIDs. (table csn gets converted in csnUUID and the username table renamed to csnOLD)

Permissions

  • csn.user → Allows user to receive notifications when they log in, and access to /csn history.
  • csn.admin → Super permission node. Access to all commands. (especially upload, reload and convert)

For all permissions take a look at the plugin.yml

Config


# Chest Shop Notifier<br />

logging:
  admin-shop: true

notifications:
  notify-on-user-join: true
  delay-seconds: 5

history:
  max-rows: 10
  query-limit: 10000

debugging:
  verbose: true

database:
  # Possible types: SQLite and MySQL
  type: sqlite
  dbname: 'database'
  # MySQL specific settings
  host: 'localhost'
  port: 3306
  username: 'dbadmin'
  password: '123456'
  ssl: false

clean-on-startup:
  enabled: false
  parameters: "--older-than 30 --all"

messages:
  sales: "&amp;c ** You made &amp;f{sales} sales&amp;c since you last checked."
  history-cmd: "&amp;c ** To see them, type &amp;f/csn history&amp;c."
  history-caption: "&amp;dChestShop Notifier // &amp;7Latest Commissions"
  history-empty: "&amp;cNothing to show."
  history-bought: "&amp;a+ &amp;9{player} &amp;7bought &amp;a{count}x&amp;9{item} &amp;f{timeago}&amp;7 ago &amp;a(+{money})"
  history-bought-read: "&amp;a+ &amp;7{player} &amp;8bought &amp;a{count}x&amp;7{item} &amp;7{timeago}&amp;8 ago &amp;a(+{money})"
  history-sold: "&amp;c- &amp;9{player} &amp;7sold you &amp;c{count}x&amp;9{item} &amp;f{timeago}&amp;7 ago &amp;c(-{money})"
  history-sold-read: "&amp;c- &amp;7{player} &amp;8sold you &amp;c{count}x&amp;7{item} &amp;7{timeago}&amp;8 ago &amp;c(-{money})"
  history-footer-page: "&amp;c- Page &amp;f{current}&amp;c/&amp;f{pages}&amp;6 - &amp;7/csn history &lt;page&gt;"
  history-footer-clear: "&amp;f- &amp;cTo remove all old entries, type /csn clear"
  history-clear: "&amp;cHistory cleared! New sales will continue to be recorded."
  history-marked-read: "&amp;cUnread entries marked read!"
  history-others-not-allowed: "&amp;cYou are not allowed to check the history of {username}"
  # new translations
  reload-cmd: "&amp;dChestShop Notifier // &amp;7Reloading, please wait..."
  reload-success: "&amp;aReloaded!"
  reload-database-success: "&amp;aDatabase connected!"
  reload-database-fail: "&amp;cDatabase failed to connect!"
  user-not-found: "&amp;cThe user '{player}' was not found."
  page-not-found: "&amp;e{page} &amp;cis not a valid page number input for /csn history &lt;page&gt;!"
  page-not-found-other: "&amp;e{page} &amp;cis not a valid page number input for /csn history &lt;user&gt; &lt;page&gt;!"
  database-error: "&amp;cInvalid database connection. Please edit config and /csn reload."
  database-error-oncommand: "&amp;cDatabase error while executing this command!"
  database-cleaned: "&amp;cCleaned database from {amount} entries!"
  database-uploaded: "&amp;cBatch executed!"
  database-convert: "&amp;cAttempting to convert database..."
  database-convert-fail: "&amp;cError while trying to convert! Maybe you don't have a 'csn' table?"
  database-converted: "&amp;cDatabase converted!"
  unrecognized-command: "&amp;cCommand not recognized. Type /csn help for help."
  missing-arguments: "&amp;cMissing parameter arguments: {usage}"
  invalid-number: "&amp;c{typo} is not a valid number input for {usage}!"
  invalid-username: "&amp;c{typo} is not a valid username/uuid input for {usage}!"
  missing-permission: "&amp;cYou don't have the permission {permission}!"
  help:
    header: "&amp;dChestShop Notifier // &amp;7Commands"
    help: "&amp;7 /csn &amp;dhelp &amp;f- Plugin usage &amp; commands"
    history: "&amp;7 /csn &amp;dhistory [&lt;page&gt;]&amp;f- View sales"
    clear: "&amp;7 /csn &amp;dclear &amp;f- Remove read sales"
    history-others: "&amp;7 /csn &amp;dhistory &lt;username&gt; [&lt;page&gt;]&amp;f- View sales of another account"
    clear-others: "&amp;7 /csn &amp;dclear &lt;username&gt;&amp;f- Remove read sales of another account"
    cleandatabase: "&amp;7 /csn &amp;ccleandatabase &amp;f- Remove database entries. Parameters:"
    cleandatabase-older-than: "&amp;c --older-than, -o &lt;days&gt; &amp;f- Removes entries older than &lt;days&gt;"
    cleandatabase-user: "&amp;c --user, -user &lt;username/uuid&gt; &amp;f- Removes entries from a single user only"
    cleandatabase-read-only: "&amp;c --read-only, -r &amp;f- Removes only read entries, default behaviour"
    cleandatabase-all: "&amp;c --all, -a &amp;f- Removes all entries"
    upload: "&amp;7 /csn &amp;cupload &amp;f- Force update databases"
    convert: "&amp;7 /csn &amp;cconvert &amp;f- Convert database to UUIDs"
    reload: "&amp;7 /csn &amp;creload &amp;f- Reload configuration"

 

Requirements

  • ChestShop installed and running.
  • Optionally: MySQL server if you want to store the information in a real database/share it between servers.

Planned Features

  • UUID support done in v1.1.2
  • Look up the sales of offline players done in v1.1.2
  • Ignore ChestShop's Admin Shop done in v1.1.2
  • History pagination done in v1.2
  • SQLite support done in v1.3.3
  • Auto updater & version checker
  • Translation system (partially done in v1.1.2, you can set your own messages in the config)

For more features and suggestion use the GitHub issues page!

Source Code & Dev Builds

Donations

Feel free to comment with your ideas, bugs, or requests, ideally by opening an issue on the github repo.
If you really want to monetarily then click here.

Demonstration

Login Notice

History command


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    79114
  • Created
    Apr 28, 2014
  • Last Released File
    Jun 6, 2021
  • Total Downloads
    10,707
  • License

Categories

Members

Recent Files

Bukkit