No description
Find a file
2023-09-30 10:43:53 +02:00
.github/workflows ci(fix): delete prefix refs/tags/v from version in release name 2023-01-08 21:14:02 +01:00
.mvn/wrapper Added maven wrapper 2022-04-26 15:18:06 +02:00
src docs: fix 2023-09-30 10:43:53 +02:00
.gitignore chore: removed IDE project files 2023-09-03 20:26:18 +02:00
build.xml Changed project structure to maven standard 2022-05-14 11:50:37 +02:00
docker-compose.yml chore: updated docker compose file 2023-09-12 20:49:21 +02:00
Dockerfile chore: updated java docker image 2023-09-24 23:09:51 +02:00
LICENSE Initial commit 2022-03-10 21:34:03 +01:00
mvnw Initial commit 2022-03-10 21:37:08 +01:00
mvnw.cmd Initial commit 2022-03-10 21:37:08 +01:00
pom.xml chore: update maven-javadoc-plugin 2023-09-28 21:54:39 +02:00
README.md chore: removed broken badge 2023-08-19 21:02:59 +02:00

serverd

Build Release License Repo size

ServerD is TCP and UDP server which allows to communicate between clients and manage them.

Building

Requirements

  • JDK 11+
  • Maven or Ant

To build run the command: mvn package

If you don't have Maven you can use Maven wrapper: ./mvnw package

Jar file can be found in ./target

You can also build using Ant by command: ant

Plugins

ServerD have plugin API which allows to create advanced plugins to extends program functionality.

API includes:

  • Events (Connection and Disconnection event etc.) support
  • Custom commands support
  • Debugger
  • Plugin workspaces

And much more.

Example plugin:

package example;

import com.serverd.plugin.Plugin;
import com.serverd.plugin.Plugin.Info;
import com.serverd.plugin.ServerdPlugin;

public class Example implements ServerdPlugin {

	@Override
	public String init(Plugin plugin) {
		//init plugin
		return INIT_SUCCESS;
	}

	@Override
	public void metadata(Info info) {
		info.name = "Example";
		info.author = "Author";
		info.decription = "Example Plugin";
		info.version = "1.0";
	}

	@Override
	public void stop(Plugin plugin) {
		// stop plugin
	}

	@Override
	public void work(Plugin plugin) {
		// plugin main method
	}
}

Plugin main class must be marked like this: Plugin-Main-Class: main.class.Name in MANIFEST.MF file

Plugins can be created using all Java-compatible languages (Kotlin, Scala etc.)

For more info look for Documentation.

Documentation

To generate Javadoc run command: ./mwnw javadoc:javadoc

Javadoc can be found in ./target/apidocs/index.html or ./target/ServerD-<version>-javadoc.jar as jar file.

Docker

ServerD can be runned using Docker.

To build Docker image run command: docker build -t rafi612/serverd .

Then run using command: docker run -p 9999:9999 -p 9998:9998/udp -v ./data:/app/data rafi612/serverd

Or create docker-compose.yml file and paste following:

version: '3'
services:
  serverd:
    image: rafi612/serverd
    container_name: serverd
    ports:
      - 9999:9999/tcp
      - 9998:9998/udp
    volumes:
      - ./data:/app/data

And run using command: docker compose up