Skip to content

This enable us to do a variety of things between Velocity and Spigot by using socket.

License

Notifications You must be signed in to change notification settings

bella2391/FMC-Plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FMC Plugin

Comment

This is able to use in both Velocity and Spigot.
But this is created for myself for my server.
So this plugin is maybe good for plugin developers.
FMC-Fabric-Mod and FMC-Forge-Mod with similar functionality to spigot are currently under development. This is all needed by connecting to Velocity even if host server is fabric or forge server.
Freely to edit!

Linkage to Discord

For Velocity Server, Velocity Server notifys Embed's message or plain-text-message under each events.
When server switching, joining, disconnecting like this.
alt text
When chatting like this.
alt text

Convert Romaji to Kanji

This brings an automatic chat conversion Romaji to Kanji like this.
alt text

Velocity Command list

/hub

/fmcp hub

Moving to hub server

/fmcp cend

After executing, Velocity will be shutdown!
Before being shutdown, discord's embed editing like this. alt text

/fmcp maintenance <status | switch> discord <true | false>

This enable server to be maintenance mode, which is that for example, it is openable for only Admin who has permission:group.super-admin, others disconnecting.
If arg5 sets "true", server can notify to Discord whether maintenance mode is true or not.

/fmcp perm <add | remove | list> [Short:permission] [target:player]

Adding or removing permission written in config.yml by adding or removing permission in mysql database for luckperm MySQL mode.

/fmcp ss <server>

Getting server status and checking whether you have FMC account from MySQL
In FMC Server, using python script for getting minecrafts' status

Here is python scripts

/fmcp stp <server>

Moving to specific server as server command

/fmcp req <server>

Requesting to let server start-up to Admin through discord like this.
alt text
If someone presses YES button, here will be like this.
alt text
Here is minecraft's player chat area.
alt text

/fmcp start <server>

Let server start by bat file of windows

/fmcp cancel

Only sending "canceled event"

/fmcp conv <add | remove | reload | switch> [<add | remove>:key] [<add>:value] [<add>:<true | false>]

Switching converting type of Romaji to Kanji, reloading romaji.csv from plugins/fmc/romaji.csv, or adding/removing a theirself word into the csv file that has a lot of maps of conversion romaji to kana.

/fmcp chat <switch | status>

Switching the way of sending chating message to Discord.
There are Embed editing type or Plane text message type.

  • Embed editing type (Using Bot)
    alt text
  • Plane text message type (Using Webhook)
    alt text

/fmcp debug

Switching debug mode. In details, this is only replacing config value each other. For example, Discord.ChannelId and Debug.ChannelId.

/fmcp reload

Reloading configuration.

Socket Server

Sockets are enable us to communicate between Velocity and Spigot Servers.

Reason

  • Communication Available even when players are offline
  • Not Java, for example, PHP can be access to it.

Here is PHP example code

<?php
  // server address & port
  $serverAddress = '127.0.0.1';
  $serverPort = 8766;

  // create socket and connect
  $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
  socket_connect($socket, $serverAddress, $serverPort);

  // send message
  socket_write($socket, $message, strlen($message));

  // close
  socket_close($socket);

Spigot Command list

/fmc fv <player> <proxy_cmd>

Forwarding Velocity's command in Spigot

/fmc reload

Reloading config

/fmc test <arg-1>

Only returning arg-1 player writes

Dependancy

Lisence

This project is licensed under the MIT License, see the LICENSE.txt file for details

About

This enable us to do a variety of things between Velocity and Spigot by using socket.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages