Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea4650000e | ||
|
|
2d2018b8d0 | ||
|
|
736a853a85 | ||
|
|
dfd4c5f93e | ||
|
|
2ac87acc8a | ||
|
|
3c5a6a3b7b | ||
|
|
6efb5c1b64 | ||
|
|
91de7e5a22 |
No files matched your search
@@ -1,9 +1,9 @@
|
||||
# ViaVersion 0.5.4
|
||||
# ViaVersion 0.5.5
|
||||
**Allows the connection of 1.9 clients to 1.8**
|
||||
|
||||
This plugin modifies netty to allow connection of 1.9 clients to 1.8,
|
||||
|
||||
###**Don't use late bind*
|
||||
###*Don't use late bind*
|
||||
|
||||
|
||||
This took hours of work, so if you enjoy this consider looking into contacting me and supporting my projects.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>us.myles</groupId>
|
||||
<artifactId>ViaVersion</artifactId>
|
||||
<version>0.5.4</version>
|
||||
<version>0.5.5</version>
|
||||
<build>
|
||||
<finalName>ViaVersion-${project.version}</finalName>
|
||||
<plugins>
|
||||
|
||||
@@ -55,10 +55,8 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
|
||||
getLogger().severe("Unable to inject handlers, are you on 1.8? ");
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (getConfig().getBoolean("checkforupdates")) {
|
||||
Bukkit.getPluginManager().registerEvents(new UpdateListener(this), this);
|
||||
if (getConfig().getBoolean("checkforupdates"))
|
||||
UpdateUtil.sendUpdateMessage(this);
|
||||
}
|
||||
|
||||
Bukkit.getPluginManager().registerEvents(new Listener() {
|
||||
@EventHandler
|
||||
@@ -69,6 +67,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
|
||||
|
||||
Bukkit.getPluginManager().registerEvents(new ArmorListener(this), this);
|
||||
Bukkit.getPluginManager().registerEvents(new CommandBlockListener(this), this);
|
||||
Bukkit.getPluginManager().registerEvents(new UpdateListener(this), this);
|
||||
|
||||
getCommand("viaversion").setExecutor(new ViaVersionCommand(this));
|
||||
}
|
||||
|
||||
@@ -67,11 +67,11 @@ public class ViaEncodeHandler extends MessageToByteEncoder {
|
||||
}
|
||||
};
|
||||
// Synced allows timings to work properly.
|
||||
if (ViaVersion.getInstance().isSyncedChunks()) {
|
||||
((ViaVersionPlugin) ViaVersion.getInstance()).run(chunks, false);
|
||||
} else {
|
||||
// if (ViaVersion.getInstance().isSyncedChunks()) {
|
||||
// ((ViaVersionPlugin) ViaVersion.getInstance()).run(chunks, false);
|
||||
// } else {
|
||||
chunks.run();
|
||||
}
|
||||
// }
|
||||
bytebuf.readBytes(bytebuf.readableBytes());
|
||||
throw new CancelException();
|
||||
}
|
||||
|
||||
@@ -118,12 +118,14 @@ public class MetadataRewriter {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (type != null) {
|
||||
System.out.println("INCLUDE THIS IN YOUR ERROR LOG!");
|
||||
if (type != null)
|
||||
System.out.println("An error occurred with entity meta data for " + type + " OldID: " + entry.oldID);
|
||||
if (metaIndex != null) {
|
||||
System.out.println("Old ID: " + metaIndex.getIndex() + " New ID: " + metaIndex.getNewIndex());
|
||||
System.out.println("Old Type: " + metaIndex.getOldType() + " New Type: " + metaIndex.getNewType());
|
||||
}
|
||||
else
|
||||
System.out.println("An error occurred with entity meta data for UNKOWN_ENTITY OldID: " + entry.oldID);
|
||||
if (metaIndex != null) {
|
||||
System.out.println("Old ID: " + metaIndex.getIndex() + " New ID: " + metaIndex.getNewIndex());
|
||||
System.out.println("Old Type: " + metaIndex.getOldType() + " New Type: " + metaIndex.getNewType());
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class IncomingTransformer {
|
||||
output.writeLong(location);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
String line = PacketUtil.readString(input);
|
||||
line = "{\"text\":\"" + line + "\"}";
|
||||
line = OutgoingTransformer.fixJson(line);
|
||||
PacketUtil.writeString(line, output);
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -725,12 +725,12 @@ public class OutgoingTransformer {
|
||||
if (line == null || line.equalsIgnoreCase("null")) {
|
||||
line = "{\"text\":\"\"}";
|
||||
} else {
|
||||
if (!line.startsWith("\"") && !line.startsWith("{")) {
|
||||
if ((!line.startsWith("\"") || !line.endsWith("\"")) && (!line.startsWith("{")|| !line.endsWith("}"))) {
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("text", line);
|
||||
line = obj.toJSONString();
|
||||
return obj.toJSONString();
|
||||
}
|
||||
if (line.startsWith("\"")) {
|
||||
if (line.startsWith("\"") && line.endsWith("\"")) {
|
||||
line = "{\"text\":" + line + "}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Should ViaVersion check for updates?
|
||||
checkforupdates: true
|
||||
# Should we send any bulk chunks, in sync (may be slower but fixes timings)
|
||||
# Currently broken due to sign updates, possibly will return
|
||||
sync-chunks: true
|
||||
Reference in new issue
Block a user