Formatted readme

This commit is contained in:
Teriuihi 2022-05-15 19:50:41 +02:00 committed by GitHub
parent 90c15265ec
commit 5f9666684f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,30 +1,52 @@
# DataLock # DataLock
A velocity plugin which provides a way for bukkit plugins to handle data syncing <p>A velocity plugin which provides a way for bukkit plugins to handle data syncing</p>
Use by sending a message on your own plugin message channel. Add it to the DataLock config in the following format: <p>Use by sending a message on your own plugin message channel. Add it to the DataLock config in the following format:<br>
`pluginname:customname` <code>pluginname:customname</code></p>
Possible sub channels to send data on are: ## Sub channels
try-lock: Attempt to lock a data entry it will send a boolean back on `try-lock-result`. <ol>
<li>
<code>try-lock</code>:<br>Attempt to lock a data entry it will send a boolean back on <code>try-lock-result</code>.
If it can't be locked yet it will attempt to queue your lock call, 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`. if there is an existing call it will send a failure message with info on that lock on <code>queue-lock-failed</code>.
check-lock: Check if a data entry is locked, it will send the result back as a boolean on `check-lock-result` </li>
try-unlock: Attempt to unlock a data entry it will send a boolean back on `try-lock-result` <li>
<code>check-lock</code>: Check if a data entry is locked, it will send the result back as a boolean on <code>check-lock-result</code>
</li>
<li>
<code>try-unlock</code>: Attempt to unlock a data entry it will send a boolean back on <code>try-lock-result</code>
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 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 <code>locked-queued-lock</code> with information on what the data was
</li>
</ol>
data formats: ## Data formats
`try-lock`/`check-lock`/`try-unlock`: <ol>
UTF: sub channel (the sub channel) <li><code>try-lock</code>/<code>check-lock</code>/<code>try-unlock</code>:
UTF: data (data to lock/check/unlock) <ul>
`try-lock-result` <li>UTF: sub channel (the sub channel)</li>
UTF: sub channel (the sub channel) <li>UTF: data (data to lock/check/unlock)</li>
boolean: success (if the lock/unlock succeeded or not or if the data was locked or not) </ul>
UTF: data (data that was attempted to be locked/checked/unlocked) </li>
`queue-lock-failed` <li><code>try-lock-result</code>
UTF: sub channel (the sub channel) <ul>
UTF: data (data that was attempted to be locked/checked/unlocked) <li>UTF: sub channel (the sub channel)
UTF: server name (the servername that the current lock is from) <li>boolean: success (if the lock/unlock succeeded or not or if the data was locked or not)</li>
`locked-queued-lock` <li>UTF: data (data that was attempted to be locked/checked/unlocked)</li>
UTF: sub channel (the sub channel) </ul>
UTF: data (data that was locked/checked/unlocked) </li>
<li><code>queue-lock-failed</code>
<ul>
<li>UTF: sub channel (the sub channel)</li>
<li>UTF: data (data that was attempted to be locked/checked/unlocked)</li>
<li>UTF: server name (the servername that the current lock is from)</li>
</ul>
</li>
<li><code>locked-queued-lock</code>
<ul>
<li>UTF: sub channel (the sub channel)</li>
<li>UTF: data (data that was locked/checked/unlocked)</li>
</ul>
</li>
</ol>