Copy across all the commands and add their bootstrap plugins.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package net.md_5.bungee.module.cmd.find;
|
||||
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.command.PlayerCommand;
|
||||
|
||||
public class CommandFind extends PlayerCommand
|
||||
{
|
||||
|
||||
public CommandFind()
|
||||
{
|
||||
super( "find", "bungeecord.command.find" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args)
|
||||
{
|
||||
if ( args.length != 1 )
|
||||
{
|
||||
sender.sendMessage( ChatColor.RED + "Please follow this command by a user name" );
|
||||
} else
|
||||
{
|
||||
ProxiedPlayer player = ProxyServer.getInstance().getPlayer( args[0] );
|
||||
if ( player == null || player.getServer() == null )
|
||||
{
|
||||
sender.sendMessage( ChatColor.RED + "That user is not online" );
|
||||
} else
|
||||
{
|
||||
sender.sendMessage( ChatColor.BLUE + args[0] + " is online at " + player.getServer().getInfo().getName() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package net.md_5.bungee.module.cmd.find;
|
||||
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
|
||||
public class PluginFind extends Plugin
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
getProxy().getPluginManager().registerCommand( this, new CommandFind() );
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
name: ${project.name}
|
||||
main: foo
|
||||
main: net.md_5.bungee.module.cmd.find.PluginFind
|
||||
version: ${describe}
|
||||
description: ${project.description}
|
||||
description: ${project.description}
|
||||
|
Reference in New Issue
Block a user