我的世界服务器退出信息,连接到我的世界服务器,显示聊天[关闭](Connecting to a minecraft server, Displaying chat [closed])...

连接到我的世界服务器,显示聊天[关闭](Connecting to a minecraft server, Displaying chat [closed])

是否可以创建一个jar文件,该文件在执行时将连接到服务器IP然后读取聊天。 它不是客户端,只是在终端运行。 我相信这是可能的,我只需要知道它的名称,所以我可以查找xD

编辑:这也需要在覆盆子pi上运行

Is it possible to create a jar file that when executed will connect to a server IP then read chat. It would not be a client, just run in terminal. I believe this is possible, I just need to know the name of what it is called so I can look it up xD

EDIT: This will also need to run on a raspberry pi

原文:https://stackoverflow.com/questions/24764539

2020-10-06 14:10

满意答案

这完全可以通过使用此处看到的Minecraft协议来实现: http : //wiki.vg/Protocol

您需要做一些事情来模拟客户端。

登录Minecraft服务并跟踪身份验证数据。

使用给定的协议和您已知的配置文件登录服务器。

响应来自服务器的传入“你在那里”消息。

从服务器读取传入的聊天消息并输出到命令行。 (如果你想要真实的体验,包括颜色解析和其他东西)

有关每个数据包协议的所有文档都可以在该wiki上找到。 只需打开一个知道如何处理该信息的套接字就可以了。

编辑:如果你拥有你想要这样做的服务器,你可以创建一个bukkit插件,通过一个更简单的套接字发送聊天,然后直接从中读取。

This is completely possible through use of the Minecraft protocol seen here: http://wiki.vg/Protocol

You will need to do a few things to simulate a client.

Log into the minecraft service and keep track of auth data.

Log in to the server using the given protocol and your known profile.

Respond to incoming "are you there" messages from the server.

Read incoming chat messages from the server and output to command line. (Involves color parsing and other stuff if you want the real experience)

All of the documentation on the protocol for each packet is available on that wiki. Just open a socket that knows how to deal with that information and you should be fine.

EDIT: If you own the server that you wish to do this for, you could alternatively create a bukkit plugin to send chat through a simpler socket and just read straight from that.

相关问答

您没有刷新管道,由于IO操作的hPutStr ,程序在hPutStr有机会完成其工作之前默默地终止。 尝试在hPutStr hin "stop"后添加此行: hFlush hin

You didn't flush the pipe, due to the lazyness of IO actions the program silently terminate before hPutStr has a chance to do its job. Try add this line after h...

把评论放在一起,这是你得到的: import socket

s = socket.socket()

KEY = "ce73007bb263c20268da59eb9fb52b06" # If you want to help me, you can use this key to connect to the server

USERNAME = "Vik2015"

HOST = "68.53.14.13"

PORT = 25566

s.connect((HOST, PORT))

print 'co...

你不发送这个: fwrite($sock, "\xfe");

来自您链接的脚本。 你必须在打电话之前发送它,就像它们一样。 基本上服务器正在等待您发送数据,当您在超时后没有时,您将断开连接。 you're not sending this: fwrite($sock, "\xfe");

from the script you linked. You have to send that before you call read, like they do. Basically the ser...

Minecraft将自动换行到下一行,或者如果链接/消息的一部分过长则会剪切掉它,它只能在文本框中插入很多字符。 最好的办法是使用像goo.gl或bit.ly这样的东西将链接缩短为更易于管理的东西。 Minecraft will automatically wrap onto the next line, or cut of a part of the Link/Message if it is too long, it can only fit so many characters into t...

您可以像在任何其他语言中一样在Java中执行原始套接字编程 这样的事情应该做。 public static void main(String[] args) throws UnknownHostException,

IOException {

boolean open = true;

Socket socket = SocketFactory.getDefault().createSocket();

try {

socket.setSoTim...

在这种情况下,您可以添加某种轮询。 基本上,你每隔X次就用javascript请求一个页面。 该页面将用户会话添加到数据库。 然后每隔Y时间执行一个脚本,其中Y> X,用于清除旧会话。 每X次调用的脚本 ...

// DB call (do as you like)

$All = fetch_all_recent();

foreach ($All as $Session)

{

if ($Session['time'] < time() - $y)

{

delete_sess...

在客户端代码中,在main方法中while循环的条件是错误的,你错过了! 否定它(正如你在服务器上所做的那样)。 所以它应该是while (!msgin.equals("exit")) 。 在服务器代码中,您不是从输入流中读取(实际上是在客户端上执行),因此您错过了msgin = din.readUTF(); while循环中的语句。 这也是为什么服务器很慢,它不断循环并在文本上写入空文本的原因,而它应该在读取输入流上的下一个输入时被阻止。 您可以对代码进行进一步改进: 对类名使用camel ca...

你需要找出它真正的压缩,但尝试用这个(gzip)打开文件: <?php

$fp = fopen('compress.zlib://yourfile.dat', 'r');

if( $fp ){

while(!feof($fp) ){

echo fread($fp, 2048);

}

fclose($fp);

}

?>

查看http://www.php.net/manual/en/wrappers.compression.php了解更多信息。 编辑:你可能...

通常它不应该是30+连接的问题。 尝试追踪这些: netstat -atun | awk '{print $5}' | cut -d: -f1 | sed -e '/^$/d' |sort | uniq -c | sort -n

但我认为这是一种apache问题。 只需搜索error.log(/var/log/apache2/*.error.log)并尝试追踪问题。 也许父进程是随机重启的? Instead of polling data, an approach of using a sock...

这完全可以通过使用此处看到的Minecraft协议来实现: http : //wiki.vg/Protocol 您需要做一些事情来模拟客户端。 登录Minecraft服务并跟踪身份验证数据。 使用给定的协议和您已知的配置文件登录服务器。 响应来自服务器的传入“你在那里”消息。 从服务器读取传入的聊天消息并输出到命令行。 (如果你想要真实的体验,包括颜色解析和其他东西) 有关每个数据包协议的所有文档都可以在该wiki上找到。 只需打开一个知道如何处理该信息的套接字就可以了。 编辑:如果你拥有你想要这...

相关文章

用java编写的一个socket服务端,通过一个tcp测试工具测试这个服务端,发现发送数据给服务端,服

...

说明:Hadoop版本:hadoop-1.2.1.tar.gz。linux系统12.04,不过这里跟系

...

sudo apt-getinstall openssh-server,Ubuntu缺省安装了opens

...

OpenCms默认是以内嵌的Solr作为全文搜索服务的,不过我们也可以配置一个独立的Solr搜索服务器

...

很多应用譬如监控、即时通信、即时报价系统都需要将后台发生的变化实时传送到客户端而无须客户端不停地刷新、

...

erver-Sent Events - 单向的信息处理.一个SSE(server send event

...

使用SolrJ跟Solr Server通信 郝国梁 (2009年8月 3日 23:09)

...

使用MVC4 EF Linq获取foreach列表循环的时候遇到了如下的问题:报错提示 Ther

...

昨天在用 solrj 在 solr 的子机上做索引,报错: The@DeprecatedSo

...

java keytool生成的证书是CRT等格式的,这种格式是2进制编码的,而C++用的证书格式是pe

...

最新问答

因为char是-127到127.你不能像这样使用扩展的ASCII表。 我建议你改用wchar 。 检查wchar.h和wctype.h手册。 Because char is from -127 to 127. You can't use extended ASCII table like that. I suggest you use wchar instead. Check wchar.h and wctype.h manual.

可以使用docker-py中给出的低级API来完成对docker构建日志的流式传输,如下所示, here = os.path.dirname(__file__) dockerfile = os.path.join(here, 'app', 'nextdir') docker_client = docker.APIClient(base_url='unix://var/run/docker.sock') generator = doc

“应删除未使用的私有字段”是内部SonarQube规则squid:S1068生成的消息squid:S1068 ,而@SuppressWarnings注释禁用匹配(和已弃用)PMD检查。 您可能需要检查质量配置文件,最终禁用此规则,或为Lombok扩充类添加一些排除项。 'Unused private fields should be removed' is the message generated by the internal SonarQube rule squid:S1068, wher

商店由初始化程序初始化。 在您的特定情况下, App.store是一个类定义,而不是一个实例,而不是您想要使用该模式。 App.initializer({ name:'fixtureInjector', after:['store'], initialize: function (container, application) { var store = container.lookup('store:main'); store.push

它可能与gradle如何处理System.exit()调用有关,请参阅GRADLE-2759 。 作为一个经验法则,在测试中进行System.exit()调用并不是一个好主意,因为它可能会混淆测试框架(如果所有内容都是从同一个JVM启动的,那么您会无情地关闭它)。 您应该添加一种方法来优雅地关闭服务器。 请注意,网络错误似乎与您的网络代码或服务器没有任何关系:您可以从堆栈跟踪( org.gradle.messaging.remote.internal )中的包名称中看到它来自Gradle。 这就

解决方案:我发现每个ajax请求处理这种情况的最好方法是使用statusCode方法: statusCode: { 403: function() { }, 200: function(data) { } //other codes. read the docs for more details } Solution: The best I found to deal with this situation per ajax request is to us

newxml=oldxml不复制,它只是说“newxml与oldxml相同”。 你需要像newxml = new XML (oldxml); 作为一个起点尝试: var newxml : XML = new XML ( oldxml.toXMLString() ); newxml=oldxml does not copy, it simply says "newxml is same thing as oldxml". You need something like newxml = new

void Main() { List myList = new List(); myList.Add(new User(){Name = "FUser", IsShow = true}); myList.Add(new User(){Name = "FUser2", IsShow = true}); myList.Add(new User(){Name = "FUser3", IsShow = true}); myList.Add(

您正在寻找pygame.Surface.get_flags方法。 返回一组当前Surface要素。 每个功能都在标志位掩码中。 pygame.display.set_mode返回一个pygame.Surface。 因此,调用显示器的get_flags方法,并使用特定标志按位AND。 def is_fullscreen(display): return bool(display.get_flags() & pygame.FULLSCREEN) You're looking for the

如果在class {}范围内定义成员,则无需重复类模板参数。 也许你可以使用traits idiom消除一些参数,或以其他方式计算几个参数。 代替 template< typename size_type, typename volume_type, typename width_type > 你可以有 template< typename param_type > ... typedef typename measurement_traits< param_type >::siz

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值