BungeeCord/proxy/src/main/java/Test.java

38 lines
1017 B
Java
Raw Normal View History

2013-10-11 12:36:28 +02:00
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.command.ConsoleCommandSender;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author michael
*/
public class Test
{
public static void main(String[] args) throws Exception
{
BungeeCord bungee = new BungeeCord();
ProxyServer.setInstance( bungee );
bungee.getLogger().info( "Enabled BungeeCord version " + bungee.getVersion() );
bungee.start();
while ( bungee.isRunning )
{
String line = bungee.getConsoleReader().readLine( ">" );
if ( line != null )
{
if ( !bungee.getPluginManager().dispatchCommand( ConsoleCommandSender.getInstance(), line ) )
{
bungee.getConsole().sendMessage( ChatColor.RED + "Command not found" );
}
}
}
}
}