Nowadays, people are hesitating in choosing Sponge server and Spigot server.
Because Sponge server can not load Spigot plugin, Spigot server can not load Sponge plugin neither
Plugin developers are also have do some thing twice in order to make thier plugin compatible with two server.
That’s terrible, we need some change.
PhoenixFramework
PhoenixFramework is a plugin framework just like SpigotAPI and SpongeAPI.
Plugin developers can develop plugin as a Phoenix module, server owners can install the correct version of PhoenixFramework.
For Sponge server
PhoenixForSponge is a Sponge plugin that will be installed on a Sponge server, once loaded, will proceed to load PhoenixFramework modules from a special directory into Sponge. When these modules make a call to PhoenixAPI, PhoenixSponge will translate it to a Sponge call.
For Spigot server
PhoenixForSpigot is a Spigot plugin, which will translate PhoenixAPI calls to Spigot calls.
For Nukkit server
Just like above, but for Nukkit server.
Features
Expect for being complicate with them, Phoenix will add more features.
CommandRouters
Getting rid of a lot of if... else
, using Phoenix’s command routers to beatify your command executors.
@PhoenixCommand(label="demo")
public class DemoCommandExecutor implements Command {
@CommandRouter(args="help", permission = "demo.help", sender = CommandRouter.Sender.ALL)
public boolean help(CommandSender sender, String label, ArgumentsMap args){
sender.sendMessage(new String[]{
"*",
"* Hello World",
"* -----------",
"* /demo echo <msg> - Echo test",
"* /demo echo_2 <msg1> <msg2> - Echo + router test",
"* /demo echo_a <msg...> - Echo + array test",
"* /demo <Anything_expect_above> - Mismatch test"
});
return true;
}
@CommandRouter(args = "echo <msg>")
public boolean echo(CommandSender sender, String label, ArgumentsMap args){
sender.sendMessage(args.getString("msg"));
return true;
}
@CommandRouter(args = "echo_2 <msg1> <msg2>")
public boolean echo_2(CommandSender sender, String label, ArgumentsMap args){
sender.sendMessage("[Echo] msg1: " + args.getString("msg1") + " msg2: " + args.getString("msg2"));
return true;
}
@CommandRouter(args = "echo_a <msg...>")
public boolean echo_a(CommandSender sender, String label, ArgumentsMap args){
sender.sendMessage( args.getStrings("msg..."));
return false;
}
@Override
public boolean onMissHandled(CommandSender sender, String label, String[] args) {
sender.sendMessage("Wrong sub command?");
return false;
}
}
Helping us
Phoenix Framework is a huge project, it haven’t finished yet.
We need people help us in finishing PhoenixForSponge and PhoenixAPI.
I’d appreciate that if you could help us.
Github: https://github.com/ThePhoenixMC
Telegram chat: https://t.me/PhoenixMCDev