Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Springservice to save and load chat logs made for the AunaCraft chat moderation system

License

NotificationsYou must be signed in to change notification settings

AunaCraft/ChatLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat-Log System made by AunaCraft

Info

ThisChatLog Project servers the purpose to provide an easy to use and reliable backend rest-api.Creating that in order to look forward to implement it to theAunaCraft Chat system.

Important:

This project does not contain any type of plugin-implementation for bukkit, bungee or velocity services.It is only providing the backend for an easy to implement frontend/plugin.

Logic

The ChatLog System is functioning through a rest-api based onspring.The minecraft server implements a boostrap to communicate with the rest-api.You are able to use your whole creativity to create the system at minecraft layer.

To understand what you have to save/send when listening to messages this Class Card should help.You may wonder why we also put the displayName into any message, well the main reason for this was tobe able to record nicknames, nicks and to provide an ability for being able to represent the chat messagemore realistic than only fetching the uuid.

Message Object
FieldPurpose
timeTimestamp representing the time where the message got sent in milliseconds
uuidThe uuid of the message sender
displayNameThe Name displayed in chat at sent time
messageThe raw message as String object

If you try getting a chat log from the server you are getting an ChatLog Object

Chat-Log-Object
FieldPurpose
idRepresents the unique id of the requested chatlog
messagesList of all chat message objects logged

How To Use?

You have to use the API through HTTP-Requests. (Cause its an Rest API wich makes kinda sense lol)

So here is a little overview of request you are able to make

Get a ChatLog by ID

Your HTML-Request:GET http://<yourServer>:<yourPort>/chatlog/v1/get/{logID-here}/

Response Example:

{"id":"e24026ec","messages":   [    {"time":1647281712369,"uuid":"6d34d7c6-a73a-4065-af94-60c977329c40","displayName":"FebanUHD","message":"Hello, this is a example message!!!"    },    {"time":123454678910,"uuid":"859c974c-2e32-4599-ac2e-05c7f06aead8","displayName":"ytendx","message":"Test"    }  ]}

Create a ChatLog

To create a chatlog, you need an API key and then send a post request.Your POST-Request:POST http://<yourServer>:<yourPort>/chatlog/v1/create/{api-key-herer}/

Content-Type:application/jsonBody-Type:List of Chatmessage objectsExample Body:[{"time":1647281712369,"uuid":"6d34d7c6-a73a-4065-af94-60c977329c40","displayName":"FebanUHD","message":"Hello, this is a example message!!!"},{"time":123454678910,"uuid":"859c974c-2e32-4599-ac2e-05c7f06aead8","displayName":"ytendx","message":"Test"}]

PR and Issues

We welcome every PR or Issue created and will look forward to review and implement them.But please bind to some rules:

About

Springservice to save and load chat logs made for the AunaCraft chat moderation system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp