generated from mingliqiye/lib-tem
Compare commits
No commits in common. "2a27d1127359e2dd38e2fdffcf7426ec4eac45d6" and "9796338c727eec6d80e6c451b510d3b989325e9e" have entirely different histories.
2a27d11273
...
9796338c72
@ -38,7 +38,7 @@ dependencies {
|
|||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||||
implementation("org.jetbrains:annotations:24.0.0")
|
implementation("org.jetbrains:annotations:24.0.0")
|
||||||
annotationProcessor("org.jetbrains:annotations:24.0.0")
|
annotationProcessor("org.jetbrains:annotations:24.0.0")
|
||||||
implementation("com.fasterxml.jackson.core:jackson-databind:2.19.1")
|
implementation("com.alibaba.fastjson2:fastjson2:2.0.57")
|
||||||
implementation("com.mingliqiye:network-endpoint:1.0.3")
|
implementation("com.mingliqiye:network-endpoint:1.0.3")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
GROUPSID=com.mingliqiye
|
GROUPSID=com.mingliqiye
|
||||||
ARTIFACTID=minecraft-SLP
|
ARTIFACTID=minecraft-SLP
|
||||||
VERSIONS=1.0.2
|
VERSIONS=1.0.1
|
||||||
MAINCLASS=com.mingliqiye.minecraftSLP.Main
|
MAINCLASS=com.mingliqiye.minecraftSLP.Main
|
||||||
JDKVERSIONS=1.8
|
JDKVERSIONS=1.8
|
||||||
|
32
package.json
32
package.json
@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "maven-repository",
|
"name": "maven-repository",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gradle build-jar",
|
"build": "gradle build-jar",
|
||||||
"buildw": "gradlew build-jar",
|
"buildw": "gradlew build-jar",
|
||||||
"format": "prettier --write \"**/*.{java,json}\""
|
"format": "prettier --write \"**/*.java\""
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"packageManager": "pnpm@10.4.1",
|
"packageManager": "pnpm@10.4.1",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier-plugin-java": "^2.7.1",
|
"prettier-plugin-java": "^2.7.1",
|
||||||
"prettier": "^3.6.2"
|
"prettier": "^3.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,6 @@ import java.io.IOException;
|
|||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
static {
|
|
||||||
System.setProperty("fastjson2.parser.safeMode", "true");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
if (args.length != 1) {
|
if (args.length != 1) {
|
||||||
System.err.println("请使用 {地址}:{端口号}");
|
System.err.println("请使用 {地址}:{端口号}");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.mingliqiye.minecraftSLP;
|
package com.mingliqiye.minecraftSLP;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.mingliqiye.network.endpoint.NetworkEndpoint;
|
import com.mingliqiye.network.endpoint.NetworkEndpoint;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
@ -9,8 +9,6 @@ import java.nio.ByteOrder;
|
|||||||
|
|
||||||
public class SLP {
|
public class SLP {
|
||||||
|
|
||||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将 int32 4个字节 转换为 short 2 个字节
|
* 将 int32 4个字节 转换为 short 2 个字节
|
||||||
* @param value int32
|
* @param value int32
|
||||||
@ -74,7 +72,7 @@ public class SLP {
|
|||||||
int lengthjson = readVarInt(inputStream);
|
int lengthjson = readVarInt(inputStream);
|
||||||
byte[] data = new byte[lengthjson];
|
byte[] data = new byte[lengthjson];
|
||||||
inputStream.readFully(data);
|
inputStream.readFully(data);
|
||||||
MinecraftServerStatus serverStatus = objectMapper.readValue(
|
MinecraftServerStatus serverStatus = JSON.parseObject(
|
||||||
data,
|
data,
|
||||||
MinecraftServerStatus.class
|
MinecraftServerStatus.class
|
||||||
);
|
);
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"name": "java.lang.Boolean",
|
|
||||||
"methods": [
|
|
||||||
{ "name": "getBoolean", "parameterTypes": ["java.lang.String"] }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
@ -1,6 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"type": "agent-extracted",
|
|
||||||
"classes": []
|
|
||||||
}
|
|
||||||
]
|
|
@ -1 +0,0 @@
|
|||||||
[]
|
|
@ -1 +0,0 @@
|
|||||||
[]
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"resources": {
|
|
||||||
"includes": []
|
|
||||||
},
|
|
||||||
"bundles": []
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"types": [],
|
|
||||||
"lambdaCapturingTypes": [],
|
|
||||||
"proxies": []
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user