use of net.minecraft.network.play.server.SPacketTabComplete in project Minecraft-SlientClient-Hack by YouNeverKnow00.
the class NetHandlerPlayServer method processTabComplete.
/**
* 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()])));
}
use of net.minecraft.network.play.server.SPacketTabComplete in project CumServerPro by MCUmbrella.
the class NetHandlerPlayServer method processTabComplete.
public void processTabComplete(CPacketTabComplete packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.player.getServerWorld());
if (chatSpamField.addAndGet(this, 10) > 500 && !this.serverController.getPlayerList().canSendCommands(this.player.getGameProfile())) {
this.disconnect(new TextComponentTranslation("disconnect.spam"));
return;
}
// CumServer - start 删除不必要的实例
List<String> list = this.serverController.getTabCompletions(this.player, packetIn.getMessage(), packetIn.getTargetBlock(), packetIn.hasTargetBlock());
// CumServer - end
this.player.connection.sendPacket(new SPacketTabComplete(list.toArray(new String[0])));
}
Aggregations