Compare commits

..
8 Commits
Author SHA1 Message Date
Myles ea4650000e Bump to 0.5.5 2016-03-06 15:16:36 +00:00
Myles 2d2018b8d0 Disable latest feature due to it breaking signs (no more sync chunks for now) 2016-03-06 15:10:54 +00:00
HugoDaBosss 736a853a85 Merge pull request #153 from HugoDaBosss/patch
Make Metadata Rewriter exception output more clear
2016-03-06 16:00:50 +01:00
HugoDaBosss dfd4c5f93e Formatting 2016-03-06 15:55:53 +01:00
HugoDaBosss 2ac87acc8a Make Metadata Rewriter exception output more clear 2016-03-06 15:52:06 +01:00
Myles 3c5a6a3b7b Fix README, also change a bit of the fixJson so that it can handle quotes on signs. 2016-03-06 14:40:23 +00:00
Myles 6efb5c1b64 Merge pull request #151 from HugoDaBosss/patch
Fix checkforupdates changing from false to true
2016-03-06 14:20:45 +00:00
HugoDaBosss 91de7e5a22 Fix checkforupdates changing from false to true
FIXED:
When starting the server when checkforupdates is false, it won't register the listener.
So when you enable checkforupdates using /viaversion dontbugme it won't send you messages until a restart.
2016-03-06 15:11:36 +01:00
8 changed files with 21 additions and 19 deletions

No files matched your search

+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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
View File
@@ -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