Java 类net.minecraft.network.play.server.SPacketTabComplete 实例源码

项目:Zombe-Modpack    文件:NetHandlerPlayServer.java   
/**
 * Retrieves possible tab completions for the requested command string and sends them to the client
 */
public void processTabComplete(CPacketTabComplete packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    List<String> list = Lists.<String>newArrayList();

    for (String s : this.serverController.getTabCompletions(this.playerEntity, packetIn.getMessage(), packetIn.getTargetBlock(), packetIn.hasTargetBlock()))
    {
        list.add(s);
    }

    this.playerEntity.connection.sendPacket(new SPacketTabComplete((String[])list.toArray(new String[list.size()])));
}
项目:Zombe-Modpack    文件:NetHandlerPlayClient.java   
/**
 * Displays the available command-completion options the server knows of
 */
public void handleTabComplete(SPacketTabComplete packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    String[] astring = packetIn.getMatches();
    Arrays.sort((Object[])astring);

    if (this.gameController.currentScreen instanceof ITabCompleter)
    {
        ((ITabCompleter)this.gameController.currentScreen).setCompletions(astring);
    }
}
项目:Backmemed    文件:NetHandlerPlayServer.java   
/**
 * Retrieves possible tab completions for the requested command string and sends them to the client
 */
public void processTabComplete(CPacketTabComplete packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    List<String> list = Lists.<String>newArrayList();

    for (String s : this.serverController.getTabCompletions(this.playerEntity, packetIn.getMessage(), packetIn.getTargetBlock(), packetIn.hasTargetBlock()))
    {
        list.add(s);
    }

    this.playerEntity.connection.sendPacket(new SPacketTabComplete((String[])list.toArray(new String[list.size()])));
}
项目:Backmemed    文件:NetHandlerPlayClient.java   
/**
 * Displays the available command-completion options the server knows of
 */
public void handleTabComplete(SPacketTabComplete packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    String[] astring = packetIn.getMatches();
    Arrays.sort((Object[])astring);

    if (this.gameController.currentScreen instanceof ITabCompleter)
    {
        ((ITabCompleter)this.gameController.currentScreen).setCompletions(astring);
    }
}
项目:CustomWorldGen    文件:NetHandlerPlayServer.java   
/**
 * Retrieves possible tab completions for the requested command string and sends them to the client
 */
public void processTabComplete(CPacketTabComplete packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    List<String> list = Lists.<String>newArrayList();

    for (String s : this.serverController.getTabCompletions(this.playerEntity, packetIn.getMessage(), packetIn.getTargetBlock(), packetIn.hasTargetBlock()))
    {
        list.add(s);
    }

    this.playerEntity.connection.sendPacket(new SPacketTabComplete((String[])list.toArray(new String[list.size()])));
}
项目:CustomWorldGen    文件:NetHandlerPlayClient.java   
/**
 * Displays the available command-completion options the server knows of
 */
public void handleTabComplete(SPacketTabComplete packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    String[] astring = packetIn.getMatches();

    if (this.gameController.currentScreen instanceof ITabCompleter)
    {
        ((ITabCompleter)this.gameController.currentScreen).setCompletions(astring);
    }
}
项目:ExpandedRailsMod    文件:NetHandlerPlayServer.java   
/**
 * Retrieves possible tab completions for the requested command string and sends them to the client
 */
public void processTabComplete(CPacketTabComplete packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld());
    List<String> list = Lists.<String>newArrayList();

    for (String s : this.serverController.getTabCompletions(this.playerEntity, packetIn.getMessage(), packetIn.getTargetBlock(), packetIn.hasTargetBlock()))
    {
        list.add(s);
    }

    this.playerEntity.connection.sendPacket(new SPacketTabComplete((String[])list.toArray(new String[list.size()])));
}
项目:ExpandedRailsMod    文件:NetHandlerPlayClient.java   
/**
 * Displays the available command-completion options the server knows of
 */
public void handleTabComplete(SPacketTabComplete packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    String[] astring = packetIn.getMatches();

    if (this.gameController.currentScreen instanceof ITabCompleter)
    {
        ((ITabCompleter)this.gameController.currentScreen).setCompletions(astring);
    }
}
项目:Backmemed    文件:INetHandlerPlayClient.java   
/**
 * Displays the available command-completion options the server knows of
 */
void handleTabComplete(SPacketTabComplete packetIn);
项目:CustomWorldGen    文件:INetHandlerPlayClient.java   
/**
 * Displays the available command-completion options the server knows of
 */
void handleTabComplete(SPacketTabComplete packetIn);