Merge pull request #231 from Matsv/effect

Make it possible to use the new effect indicators in 1.9
This commit is contained in:
Myles 2016-03-15 21:05:55 +00:00
commit f1354edf20
3 changed files with 8 additions and 2 deletions

View File

@ -239,6 +239,10 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
return getConfig().getBoolean("prevent-collision", true);
}
public boolean isNewEffectIndicator(){
return getConfig().getBoolean("use-new-effect-indicator",true);
}
public boolean isSuppressMetadataErrors() {
return getConfig().getBoolean("suppress-metadata-errors", false);
}

View File

@ -679,7 +679,7 @@ public class OutgoingTransformer {
PacketUtil.writeVarInt(duration, output);
// we need to write as a byte instead of boolean
boolean hideParticles = input.readBoolean();
output.writeByte(hideParticles ? 1 : 0);
output.writeByte(hideParticles ? plugin.isNewEffectIndicator() ? 2 : 1 : 0);
return;
}
if (packet == PacketType.PLAY_TEAM) {

View File

@ -19,4 +19,6 @@ simulate-pt: true
# Should we patch boss bars so they work? (Default: true, disable if you're having issues)
bossbar-patch: true
# If your boss bar flickers on 1.9, set this to 'true'. It will keep all boss bars on 100% (not recommended)
bossbar-anti-flicker: false
bossbar-anti-flicker: false
# This will show the new effect indicator in the top-right corner for 1.9 players.
use-new-effect-indicator: true