try00967

You are developing a Minecraft plugin to moderate chat using AI for Paper API using Maven.

Tech stack:

  • Maven
  • Paper API 1.21.4.
  • Use openai/openai-java library.
  • Use web to fetch latest versions of dependencies.

How it works:

  • It listens to the chat event and uses OpenAI moderation endpoint to block a message which triggers any of the moderational sections, see moderation.txt.
  • The thresholds and warning messages are configurable within config.yml.

How code should look like:

  • Use lombok for getters, setters and constructors.
  • Use fully qualified variable names, i.e. player instead of p.
  • Keep consistent naming conventions and always use "this". Add "final" if possible.
  • Check for errors and handle null safety.
  • Store a static plugin's instance in its main class and access it instead of passing it in another classes' constructors.

Do not use any openai library and implement http requests yourself using native java and Gson

Start by writing a PLAN.md with the developmental outline for the project and then implement all steps.paper 1.21

Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code