/** * 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()]))); }
/** * 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); } }
/** * 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); } }
/** * Displays the available command-completion options the server knows of */ void handleTabComplete(SPacketTabComplete packetIn);