From 5f9666684fa1f9740de3b9d4f9a51adef8737f2a Mon Sep 17 00:00:00 2001 From: Teriuihi <38841986+Teriuihi@users.noreply.github.com> Date: Sun, 15 May 2022 19:50:41 +0200 Subject: [PATCH] Formatted readme --- README.md | 74 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 06259e8..5eb3bed 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,52 @@ # DataLock -A velocity plugin which provides a way for bukkit plugins to handle data syncing +

A velocity plugin which provides a way for bukkit plugins to handle data syncing

-Use by sending a message on your own plugin message channel. Add it to the DataLock config in the following format: -`pluginname:customname` +

Use by sending a message on your own plugin message channel. Add it to the DataLock config in the following format:
+ pluginname:customname

-Possible sub channels to send data on are: - try-lock: Attempt to lock a data entry it will send a boolean back on `try-lock-result`. - If it can't be locked yet it will attempt to queue your lock call, - if there is an existing call it will send a failure message with info on that lock on `queue-lock-failed`. - check-lock: Check if a data entry is locked, it will send the result back as a boolean on `check-lock-result` - try-unlock: Attempt to unlock a data entry it will send a boolean back on `try-lock-result` - If succesfull this will check if there is a queued lock for this data entry and if so lock that for that server and notify it on - `locked-queued-lock` with information on what the data was +## Sub channels +
    +
  1. + try-lock:
    Attempt to lock a data entry it will send a boolean back on try-lock-result. + If it can't be locked yet it will attempt to queue your lock call, + if there is an existing call it will send a failure message with info on that lock on queue-lock-failed. +
  2. +
  3. + check-lock: Check if a data entry is locked, it will send the result back as a boolean on check-lock-result +
  4. +
  5. + try-unlock: Attempt to unlock a data entry it will send a boolean back on try-lock-result + If succesfull this will check if there is a queued lock for this data entry and if so lock that for that server and notify it on + locked-queued-lock with information on what the data was +
  6. +
-data formats: - `try-lock`/`check-lock`/`try-unlock`: - UTF: sub channel (the sub channel) - UTF: data (data to lock/check/unlock) - `try-lock-result` - UTF: sub channel (the sub channel) - boolean: success (if the lock/unlock succeeded or not or if the data was locked or not) - UTF: data (data that was attempted to be locked/checked/unlocked) - `queue-lock-failed` - UTF: sub channel (the sub channel) - UTF: data (data that was attempted to be locked/checked/unlocked) - UTF: server name (the servername that the current lock is from) - `locked-queued-lock` - UTF: sub channel (the sub channel) - UTF: data (data that was locked/checked/unlocked) +## Data formats +
    +
  1. try-lock/check-lock/try-unlock: + +
  2. +
  3. try-lock-result + +
  4. +
  5. queue-lock-failed + +
  6. +
  7. locked-queued-lock + +
  8. +