├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── lombok.config ├── core ├── src │ └── main │ │ ├── java │ │ └── de │ │ │ └── rexlmanu │ │ │ └── viaversionaddon │ │ │ └── core │ │ │ ├── handler │ │ │ ├── PipelineReorderEvent.java │ │ │ ├── CommonTransformer.java │ │ │ ├── ViaEncodeHandler.java │ │ │ └── ViaDecodeHandler.java │ │ │ ├── Constants.java │ │ │ ├── platform │ │ │ ├── AddonViaAPI.java │ │ │ ├── AddonViaInjector.java │ │ │ ├── AddonViaConfig.java │ │ │ └── AddonViaPlatform.java │ │ │ ├── utility │ │ │ └── FutureTaskId.java │ │ │ ├── loader │ │ │ ├── AddonRewindLoader.java │ │ │ ├── AddonBackwardsLoader.java │ │ │ └── AddonViaProviderLoader.java │ │ │ ├── ViaVersionConfiguration.java │ │ │ ├── version │ │ │ └── Version.java │ │ │ └── ViaVersionAddon.java │ │ └── resources │ │ └── assets │ │ └── viaversionaddon │ │ └── i18n │ │ └── en_us.json └── build.gradle.kts ├── .idea ├── .gitignore └── google-java-format.xml ├── settings.gradle.kts ├── gradle.properties ├── README.md ├── .github └── workflows │ └── build.yml ├── versions ├── v1_17 │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── rexlmanu │ │ │ └── viaversionaddon │ │ │ └── v1_17 │ │ │ └── mixins │ │ │ ├── MixinConnection.java │ │ │ └── MixinConnectionChInit.java │ ├── build.gradle.kts │ └── runClient.launch ├── v1_18 │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── rexlmanu │ │ │ └── viaversionaddon │ │ │ └── v1_18 │ │ │ └── mixins │ │ │ ├── MixinConnection.java │ │ │ └── MixinConnectionChInit.java │ ├── build.gradle.kts │ └── runClient.launch ├── v1_19 │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── rexlmanu │ │ │ └── viaversionaddon │ │ │ └── v1_19 │ │ │ └── mixins │ │ │ ├── MixinConnection.java │ │ │ └── MixinConnectionChInit.java │ ├── runClient.launch │ └── build.gradle.kts └── v1_8 │ ├── src │ └── main │ │ └── java │ │ └── de │ │ └── rexlmanu │ │ └── viaversionaddon │ │ └── v1_8 │ │ └── mixins │ │ ├── MixinNetworkManager.java │ │ └── MixinNetworkManagerChInit.java │ └── build.gradle.kts ├── api └── build.gradle.kts ├── gradlew.bat ├── .gitignore ├── gradlew ├── LICENSE └── .editorconfig /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersionAddons/labymod-addon/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /lombok.config: -------------------------------------------------------------------------------- 1 | config.stopBubbling = true 2 | lombok.accessors.fluent = true 3 | lombok.accessors.chain = true 4 | lombok.addNullAnnotations = jetbrains -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/handler/PipelineReorderEvent.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.handler; 2 | 3 | public class PipelineReorderEvent { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /.idea/google-java-format.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "viaversionaddon" 2 | 3 | include(":api") 4 | include(":core") 5 | include(":versions:v1_8") 6 | include(":versions:v1_17") 7 | include(":versions:v1_18") 8 | include(":versions:v1_19") 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/Constants.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core; 2 | 3 | public interface Constants { 4 | 5 | String NAME = "ViaVersionAddon"; 6 | String ENCODER_NAME = "via-encoder"; 7 | String DECODER_NAME = "via-decoder"; 8 | } 9 | -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/platform/AddonViaAPI.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.platform; 2 | 3 | import com.viaversion.viaversion.ViaAPIBase; 4 | import java.util.UUID; 5 | 6 | public class AddonViaAPI extends ViaAPIBase { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /core/src/main/resources/assets/viaversionaddon/i18n/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "viaversionaddon": { 3 | "settings": { 4 | "name": "ViaVersionAddon", 5 | "enabled": { 6 | "name": "Enabled" 7 | }, 8 | "version": { 9 | "name": "Version" 10 | } 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4096m 2 | net.labymod.labymod4.release-type=internal 3 | net.labymod.labymod4.addon-annotation-processor-version=0.1.0 4 | net.labymod.labymod4.injection-processor-version=0.1.0 5 | net.labymod.labymod4.api-version=0.1.0 6 | net.labymod.labymod4.core-version=4.0.0 7 | net.labymod.labymod4.v1_8-version=0.1.0 8 | net.labymod.labymod4.v1_17-version=0.1.0 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ViaVersion Addon 2 | 3 | This is a labymod addon for [ViaVersion](https://viaversion.com) to easily switch your protocol 4 | version. 5 | 6 | This is the LabyMod v4 version of the addon. If you are looking for the LabyMod v3 version, you can 7 | find it [here](https://github.com/rexlManu/viaversion-addon/tree/main). 8 | 9 | ## Credits 10 | 11 | - https://github.com/ViaVersion/ViaVersion 12 | - https://github.com/ViaVersion/ViaFabric 13 | - https://github.com/FlorianMichael/ViaForge 14 | 15 | # License 16 | 17 | This project is licensed under the GNU Public License - see the [LICENSE](LICENSE) file for details -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/utility/FutureTaskId.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.utility; 2 | 3 | import com.viaversion.viaversion.api.platform.PlatformTask; 4 | import java.util.concurrent.Future; 5 | 6 | public class FutureTaskId implements PlatformTask> { 7 | 8 | private final Future object; 9 | 10 | public FutureTaskId(Future object) { 11 | this.object = object; 12 | } 13 | 14 | @Override 15 | public Future getObject() { 16 | return object; 17 | } 18 | 19 | @Override 20 | public void cancel() { 21 | object.cancel(false); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/loader/AddonRewindLoader.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.loader; 2 | 3 | import de.gerrygames.viarewind.api.ViaRewindConfigImpl; 4 | import de.gerrygames.viarewind.api.ViaRewindPlatform; 5 | import java.io.File; 6 | import java.util.logging.Logger; 7 | import lombok.experimental.Accessors; 8 | 9 | @Accessors(fluent = true) 10 | public class AddonRewindLoader implements ViaRewindPlatform { 11 | 12 | public AddonRewindLoader(File file) { 13 | ViaRewindConfigImpl config = new ViaRewindConfigImpl(new File(file, "config.yml")); 14 | config.reloadConfig(); 15 | this.init(config); 16 | } 17 | 18 | @Override 19 | public Logger getLogger() { 20 | return Logger.getLogger("ViaRewind"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: LabyAddon Build 2 | 3 | on: 4 | push: 5 | branches : [ "v4" ] 6 | pull_request: 7 | branches : [ "v4" ] 8 | workflow_dispatch: 9 | 10 | env: 11 | PUBLIC_RELEASE_BUILD: true 12 | PUBLIC_RELEASE_BUILD_TOKEN: ${{ secrets.PUBLIC_RELEASE_BUILD_TOKEN }} 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Set up JDK 17 20 | uses: actions/setup-java@v3 21 | with: 22 | distribution: 'corretto' 23 | java-version: '17' 24 | - name: Grant execute permission for gradlew 25 | run: chmod +x gradlew 26 | - name: Build with Gradle 27 | run: ./gradlew remapJar --full-stacktrace 28 | - name: Upload Artifact 29 | uses: actions/upload-artifact@v3 30 | with: 31 | name: Artifacts 32 | path: build/libs/* -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/loader/AddonBackwardsLoader.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.loader; 2 | 3 | import com.viaversion.viabackwards.api.ViaBackwardsPlatform; 4 | import java.io.File; 5 | import java.util.logging.Logger; 6 | 7 | public class AddonBackwardsLoader implements ViaBackwardsPlatform { 8 | 9 | private File file; 10 | 11 | public AddonBackwardsLoader(File file) { 12 | this.file = file; 13 | this.file.mkdir(); 14 | this.init(this.file); 15 | } 16 | 17 | @Override 18 | public Logger getLogger() { 19 | return Logger.getLogger("ViaBackwards"); 20 | } 21 | 22 | @Override 23 | public void disable() { 24 | 25 | } 26 | 27 | @Override 28 | public boolean isOutdated() { 29 | return false; 30 | } 31 | 32 | @Override 33 | public File getDataFolder() { 34 | return new File(this.file, "config.yml"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /versions/v1_17/src/main/java/de/rexlmanu/viaversionaddon/v1_17/mixins/MixinConnection.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.v1_17.mixins; 2 | 3 | 4 | import de.rexlmanu.viaversionaddon.core.handler.PipelineReorderEvent; 5 | import io.netty.channel.Channel; 6 | import net.minecraft.network.Connection; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | @Mixin(Connection.class) 14 | public class MixinConnection { 15 | 16 | @Shadow 17 | private Channel channel; 18 | 19 | @Inject(method = "setupCompression", at = @At("RETURN")) 20 | private void reorderCompression(int $$0, boolean $$1, CallbackInfo ci) { 21 | channel.pipeline().fireUserEventTriggered(new PipelineReorderEvent()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /versions/v1_18/src/main/java/de/rexlmanu/viaversionaddon/v1_18/mixins/MixinConnection.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.v1_18.mixins; 2 | 3 | 4 | import de.rexlmanu.viaversionaddon.core.handler.PipelineReorderEvent; 5 | import io.netty.channel.Channel; 6 | import net.minecraft.network.Connection; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | @Mixin(Connection.class) 14 | public class MixinConnection { 15 | 16 | @Shadow 17 | private Channel channel; 18 | 19 | @Inject(method = "setupCompression", at = @At("RETURN")) 20 | private void reorderCompression(int $$0, boolean $$1, CallbackInfo ci) { 21 | channel.pipeline().fireUserEventTriggered(new PipelineReorderEvent()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /versions/v1_19/src/main/java/de/rexlmanu/viaversionaddon/v1_19/mixins/MixinConnection.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.v1_19.mixins; 2 | 3 | 4 | import de.rexlmanu.viaversionaddon.core.handler.PipelineReorderEvent; 5 | import io.netty.channel.Channel; 6 | import net.minecraft.network.Connection; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | @Mixin(Connection.class) 14 | public class MixinConnection { 15 | 16 | @Shadow 17 | private Channel channel; 18 | 19 | @Inject(method = "setupCompression", at = @At("RETURN")) 20 | private void reorderCompression(int $$0, boolean $$1, CallbackInfo ci) { 21 | channel.pipeline().fireUserEventTriggered(new PipelineReorderEvent()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /versions/v1_8/src/main/java/de/rexlmanu/viaversionaddon/v1_8/mixins/MixinNetworkManager.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.v1_8.mixins; 2 | 3 | import de.rexlmanu.viaversionaddon.core.handler.PipelineReorderEvent; 4 | import io.netty.channel.Channel; 5 | import net.minecraft.network.NetworkManager; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.Shadow; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | @Mixin(NetworkManager.class) 13 | public class MixinNetworkManager { 14 | 15 | @Shadow 16 | private Channel channel; 17 | 18 | @Inject(method = "setCompressionTreshold", at = @At("RETURN")) 19 | private void reorderCompression(int compressionThreshold, CallbackInfo ci) { 20 | channel.pipeline().fireUserEventTriggered(new PipelineReorderEvent()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/ViaVersionConfiguration.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core; 2 | 3 | import de.rexlmanu.viaversionaddon.core.version.Version; 4 | import lombok.Getter; 5 | import net.labymod.api.addon.AddonConfig; 6 | import net.labymod.api.client.gui.screen.widget.widgets.input.SwitchWidget.SwitchSetting; 7 | import net.labymod.api.client.gui.screen.widget.widgets.input.dropdown.DropdownWidget.DropdownSetting; 8 | import net.labymod.api.configuration.loader.annotation.ConfigName; 9 | import net.labymod.api.configuration.loader.property.ConfigProperty; 10 | 11 | @SuppressWarnings("FieldMayBeFinal") 12 | @ConfigName("settings") 13 | @Getter 14 | public class ViaVersionConfiguration extends AddonConfig { 15 | 16 | @SwitchSetting 17 | private final ConfigProperty enabled = new ConfigProperty<>(true); 18 | 19 | @DropdownSetting 20 | private final ConfigProperty version = new ConfigProperty<>(Version.UNDEFINED); 21 | } 22 | -------------------------------------------------------------------------------- /api/build.gradle.kts: -------------------------------------------------------------------------------- 1 | version = "0.1.0" 2 | 3 | plugins { 4 | id("java-library") 5 | } 6 | 7 | repositories { 8 | mavenLocal() 9 | } 10 | 11 | dependencies { 12 | labyProcessor() 13 | labyApi("api") 14 | 15 | // If you want to use external libraries, you can do that here. 16 | // The dependencies that are specified here are loaded into your project but will also 17 | // automatically be downloaded by labymod, but only if the repository is public. 18 | // If it is private, you have to add and compile the dependency manually. 19 | // You have to specify the repository, there are getters for maven central and sonatype, every 20 | // other repository has to be specified with their url. Example: 21 | // maven(mavenCentral(), "org.apache.httpcomponents:httpclient:4.5.13") 22 | } 23 | 24 | java { 25 | sourceCompatibility = JavaVersion.VERSION_1_8 26 | targetCompatibility = JavaVersion.VERSION_1_8 27 | } 28 | 29 | tasks.compileJava { 30 | sourceCompatibility = JavaVersion.VERSION_1_8.toString() 31 | targetCompatibility = JavaVersion.VERSION_1_8.toString() 32 | } -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/platform/AddonViaInjector.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.platform; 2 | 3 | import com.viaversion.viaversion.api.platform.ViaInjector; 4 | import com.viaversion.viaversion.libs.gson.JsonObject; 5 | import de.rexlmanu.viaversionaddon.core.Constants; 6 | import de.rexlmanu.viaversionaddon.core.ViaVersionAddon; 7 | import lombok.RequiredArgsConstructor; 8 | 9 | @RequiredArgsConstructor 10 | public class AddonViaInjector implements ViaInjector { 11 | 12 | private final ViaVersionAddon addon; 13 | 14 | @Override 15 | public void inject() throws Exception { 16 | 17 | } 18 | 19 | @Override 20 | public void uninject() throws Exception { 21 | 22 | } 23 | 24 | @Override 25 | public int getServerProtocolVersion() throws Exception { 26 | return this.addon.protocolVersion(); 27 | } 28 | 29 | @Override 30 | public JsonObject getDump() { 31 | return new JsonObject(); 32 | } 33 | 34 | @Override 35 | public String getDecoderName() { 36 | return Constants.DECODER_NAME; 37 | } 38 | 39 | @Override 40 | public String getEncoderName() { 41 | return Constants.ENCODER_NAME; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /versions/v1_8/build.gradle.kts: -------------------------------------------------------------------------------- 1 | version = "0.1.0" 2 | 3 | plugins { 4 | id("net.labymod.gradle.legacyminecraft") 5 | id("net.labymod.gradle.volt") 6 | } 7 | 8 | val minecraftGameVersion: String = "1.8.9" 9 | val minecraftVersionTag: String = "1.8" 10 | 11 | dependencies { 12 | annotationProcessor("net.labymod:sponge-mixin:0.1.0+0.11.2+mixin.0.8.5") 13 | labyProcessor() 14 | labyApi("v1_8") 15 | api(project(":core")) 16 | } 17 | 18 | legacyMinecraft { 19 | version(minecraftGameVersion) 20 | 21 | mainClass("net.minecraft.launchwrapper.Launch") 22 | args("--tweakClass", "net.labymod.core.loader.vanilla.launchwrapper.LabyModLaunchWrapperTweaker") 23 | args("--labymod-dev-environment", "true") 24 | args("--addon-dev-environment", "true") 25 | jvmArgs("-Dnet.labymod.running-version=$minecraftGameVersion") 26 | } 27 | 28 | volt { 29 | mixin { 30 | compatibilityLevel = "JAVA_8" 31 | minVersion = "0.6.6" 32 | } 33 | 34 | packageName("de.rexlmanu.viaversionaddon.v1_8.mixins") 35 | 36 | version = minecraftGameVersion 37 | } 38 | 39 | intellij { 40 | minorMinecraftVersion(minecraftVersionTag) 41 | val javaVersion = project.findProperty("net.labymod.runconfig-v1_8-java-version") 42 | 43 | if (javaVersion != null) { 44 | run { 45 | javaVersion(javaVersion as String) 46 | } 47 | } 48 | } 49 | 50 | java { 51 | sourceCompatibility = JavaVersion.VERSION_1_8 52 | targetCompatibility = JavaVersion.VERSION_1_8 53 | } 54 | 55 | -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/handler/CommonTransformer.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.handler; 2 | 3 | import com.viaversion.viaversion.util.PipelineUtil; 4 | import io.netty.buffer.ByteBuf; 5 | import io.netty.channel.ChannelHandler; 6 | import io.netty.channel.ChannelHandlerContext; 7 | import io.netty.handler.codec.ByteToMessageDecoder; 8 | import io.netty.handler.codec.MessageToByteEncoder; 9 | import io.netty.handler.codec.MessageToMessageDecoder; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | public class CommonTransformer { 13 | 14 | public static void decompress(ChannelHandlerContext ctx, ByteBuf buf) 15 | throws InvocationTargetException { 16 | ChannelHandler handler = ctx.pipeline().get("decompress"); 17 | ByteBuf decompressed = handler instanceof MessageToMessageDecoder 18 | ? (ByteBuf) PipelineUtil.callDecode((MessageToMessageDecoder) handler, ctx, buf).get(0) 19 | : (ByteBuf) PipelineUtil.callDecode((ByteToMessageDecoder) handler, ctx, buf).get(0); 20 | try { 21 | buf.clear().writeBytes(decompressed); 22 | } finally { 23 | decompressed.release(); 24 | } 25 | } 26 | 27 | public static void compress(ChannelHandlerContext ctx, ByteBuf buf) throws Exception { 28 | ByteBuf compressed = ctx.alloc().buffer(); 29 | try { 30 | PipelineUtil.callEncode((MessageToByteEncoder) ctx.pipeline().get("compress"), ctx, buf, 31 | compressed); 32 | buf.clear().writeBytes(compressed); 33 | } finally { 34 | compressed.release(); 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/loader/AddonViaProviderLoader.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.loader; 2 | 3 | import com.viaversion.viaversion.api.Via; 4 | import com.viaversion.viaversion.api.connection.UserConnection; 5 | import com.viaversion.viaversion.api.platform.ViaPlatformLoader; 6 | import com.viaversion.viaversion.api.protocol.version.VersionProvider; 7 | import com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter; 8 | import com.viaversion.viaversion.protocols.base.BaseVersionProvider; 9 | import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; 10 | import de.rexlmanu.viaversionaddon.core.ViaVersionAddon; 11 | import lombok.RequiredArgsConstructor; 12 | 13 | @RequiredArgsConstructor 14 | public class AddonViaProviderLoader implements ViaPlatformLoader { 15 | 16 | private final ViaVersionAddon addon; 17 | 18 | @Override 19 | public void load() { 20 | Via.getManager().getProviders().use( 21 | MovementTransmitterProvider.class, new BungeeMovementTransmitter()); 22 | Via.getManager().getProviders().use(VersionProvider.class, new BaseVersionProvider() { 23 | @Override 24 | public int getClosestServerProtocol(UserConnection connection) throws Exception { 25 | if (connection.isClientSide()) { 26 | return addon.configuration().version().get().lazyProtocolVersion().get() 27 | .getVersion(); 28 | } 29 | return super.getClosestServerProtocol(connection); 30 | } 31 | }); 32 | } 33 | 34 | @Override 35 | public void unload() { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /versions/v1_8/src/main/java/de/rexlmanu/viaversionaddon/v1_8/mixins/MixinNetworkManagerChInit.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.v1_8.mixins; 2 | 3 | import com.viaversion.viaversion.api.connection.UserConnection; 4 | import com.viaversion.viaversion.connection.UserConnectionImpl; 5 | import com.viaversion.viaversion.protocol.ProtocolPipelineImpl; 6 | import de.rexlmanu.viaversionaddon.core.Constants; 7 | import de.rexlmanu.viaversionaddon.core.ViaVersionAddon; 8 | import de.rexlmanu.viaversionaddon.core.handler.ViaDecodeHandler; 9 | import de.rexlmanu.viaversionaddon.core.handler.ViaEncodeHandler; 10 | import io.netty.channel.Channel; 11 | import io.netty.channel.socket.SocketChannel; 12 | import net.labymod.api.inject.LabyGuice; 13 | import org.spongepowered.asm.mixin.Mixin; 14 | import org.spongepowered.asm.mixin.injection.At; 15 | import org.spongepowered.asm.mixin.injection.Inject; 16 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 17 | 18 | @Mixin(targets = "net.minecraft.network.NetworkManager$5") 19 | public class MixinNetworkManagerChInit { 20 | 21 | @Inject(method = "initChannel", at = @At("RETURN")) 22 | private void onInitChannel(Channel channel, CallbackInfo ci) { 23 | if (channel instanceof SocketChannel && !LabyGuice.getInstance(ViaVersionAddon.class) 24 | .nativeVersion()) { 25 | 26 | UserConnection user = new UserConnectionImpl(channel, true); 27 | new ProtocolPipelineImpl(user); 28 | channel.pipeline() 29 | .addBefore("encoder", Constants.ENCODER_NAME, new ViaEncodeHandler(user)) 30 | .addBefore("decoder", Constants.DECODER_NAME, new ViaDecodeHandler(user)); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /versions/v1_17/src/main/java/de/rexlmanu/viaversionaddon/v1_17/mixins/MixinConnectionChInit.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.v1_17.mixins; 2 | 3 | 4 | import com.viaversion.viaversion.api.connection.UserConnection; 5 | import com.viaversion.viaversion.connection.UserConnectionImpl; 6 | import com.viaversion.viaversion.protocol.ProtocolPipelineImpl; 7 | import de.rexlmanu.viaversionaddon.core.Constants; 8 | import de.rexlmanu.viaversionaddon.core.ViaVersionAddon; 9 | import de.rexlmanu.viaversionaddon.core.handler.ViaDecodeHandler; 10 | import de.rexlmanu.viaversionaddon.core.handler.ViaEncodeHandler; 11 | import io.netty.channel.Channel; 12 | import io.netty.channel.socket.SocketChannel; 13 | import net.labymod.api.inject.LabyGuice; 14 | import org.spongepowered.asm.mixin.Mixin; 15 | import org.spongepowered.asm.mixin.injection.At; 16 | import org.spongepowered.asm.mixin.injection.Inject; 17 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 18 | 19 | @Mixin(targets = "net/minecraft/network/Connection$1") 20 | public class MixinConnectionChInit { 21 | 22 | @Inject(method = "initChannel", at = @At(value = "TAIL"), remap = false) 23 | private void onInitChannel(Channel channel, CallbackInfo ci) { 24 | if (channel instanceof SocketChannel && !LabyGuice.getInstance(ViaVersionAddon.class) 25 | .nativeVersion()) { 26 | 27 | UserConnection user = new UserConnectionImpl(channel, true); 28 | new ProtocolPipelineImpl(user); 29 | channel.pipeline() 30 | .addBefore("encoder", Constants.ENCODER_NAME, new ViaEncodeHandler(user)) 31 | .addBefore("decoder", Constants.DECODER_NAME, new ViaDecodeHandler(user)); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /versions/v1_18/src/main/java/de/rexlmanu/viaversionaddon/v1_18/mixins/MixinConnectionChInit.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.v1_18.mixins; 2 | 3 | 4 | import com.viaversion.viaversion.api.connection.UserConnection; 5 | import com.viaversion.viaversion.connection.UserConnectionImpl; 6 | import com.viaversion.viaversion.protocol.ProtocolPipelineImpl; 7 | import de.rexlmanu.viaversionaddon.core.Constants; 8 | import de.rexlmanu.viaversionaddon.core.ViaVersionAddon; 9 | import de.rexlmanu.viaversionaddon.core.handler.ViaDecodeHandler; 10 | import de.rexlmanu.viaversionaddon.core.handler.ViaEncodeHandler; 11 | import io.netty.channel.Channel; 12 | import io.netty.channel.socket.SocketChannel; 13 | import net.labymod.api.inject.LabyGuice; 14 | import org.spongepowered.asm.mixin.Mixin; 15 | import org.spongepowered.asm.mixin.injection.At; 16 | import org.spongepowered.asm.mixin.injection.Inject; 17 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 18 | 19 | @Mixin(targets = "net/minecraft/network/Connection$1") 20 | public class MixinConnectionChInit { 21 | 22 | @Inject(method = "initChannel", at = @At(value = "TAIL"), remap = false) 23 | private void onInitChannel(Channel channel, CallbackInfo ci) { 24 | if (channel instanceof SocketChannel && !LabyGuice.getInstance(ViaVersionAddon.class) 25 | .nativeVersion()) { 26 | 27 | UserConnection user = new UserConnectionImpl(channel, true); 28 | new ProtocolPipelineImpl(user); 29 | channel.pipeline() 30 | .addBefore("encoder", Constants.ENCODER_NAME, new ViaEncodeHandler(user)) 31 | .addBefore("decoder", Constants.DECODER_NAME, new ViaDecodeHandler(user)); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /versions/v1_19/src/main/java/de/rexlmanu/viaversionaddon/v1_19/mixins/MixinConnectionChInit.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.v1_19.mixins; 2 | 3 | 4 | import com.viaversion.viaversion.api.connection.UserConnection; 5 | import com.viaversion.viaversion.connection.UserConnectionImpl; 6 | import com.viaversion.viaversion.protocol.ProtocolPipelineImpl; 7 | import de.rexlmanu.viaversionaddon.core.Constants; 8 | import de.rexlmanu.viaversionaddon.core.ViaVersionAddon; 9 | import de.rexlmanu.viaversionaddon.core.handler.ViaDecodeHandler; 10 | import de.rexlmanu.viaversionaddon.core.handler.ViaEncodeHandler; 11 | import io.netty.channel.Channel; 12 | import io.netty.channel.socket.SocketChannel; 13 | import net.labymod.api.inject.LabyGuice; 14 | import org.spongepowered.asm.mixin.Mixin; 15 | import org.spongepowered.asm.mixin.injection.At; 16 | import org.spongepowered.asm.mixin.injection.Inject; 17 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 18 | 19 | @Mixin(targets = "net/minecraft/network/Connection$1") 20 | public class MixinConnectionChInit { 21 | 22 | @Inject(method = "initChannel", at = @At(value = "TAIL"), remap = false) 23 | private void onInitChannel(Channel channel, CallbackInfo ci) { 24 | if (channel instanceof SocketChannel && !LabyGuice.getInstance(ViaVersionAddon.class) 25 | .nativeVersion()) { 26 | 27 | UserConnection user = new UserConnectionImpl(channel, true); 28 | new ProtocolPipelineImpl(user); 29 | channel.pipeline() 30 | .addBefore("encoder", Constants.ENCODER_NAME, new ViaEncodeHandler(user)) 31 | .addBefore("decoder", Constants.DECODER_NAME, new ViaDecodeHandler(user)); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/handler/ViaEncodeHandler.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.handler; 2 | 3 | import com.viaversion.viaversion.api.connection.UserConnection; 4 | import com.viaversion.viaversion.exception.CancelCodecException; 5 | import com.viaversion.viaversion.exception.CancelEncoderException; 6 | import com.viaversion.viaversion.util.PipelineUtil; 7 | import io.netty.buffer.ByteBuf; 8 | import io.netty.channel.ChannelHandler; 9 | import io.netty.channel.ChannelHandlerContext; 10 | import io.netty.handler.codec.MessageToMessageEncoder; 11 | import java.util.List; 12 | 13 | @ChannelHandler.Sharable 14 | public class ViaEncodeHandler extends MessageToMessageEncoder { 15 | 16 | private final UserConnection info; 17 | 18 | public ViaEncodeHandler(UserConnection info) { 19 | this.info = info; 20 | } 21 | 22 | @Override 23 | protected void encode(final ChannelHandlerContext ctx, ByteBuf bytebuf, List out) 24 | throws Exception { 25 | if (!info.checkOutgoingPacket()) { 26 | throw CancelEncoderException.generate(null); 27 | } 28 | if (!info.shouldTransformPacket()) { 29 | out.add(bytebuf.retain()); 30 | return; 31 | } 32 | 33 | ByteBuf transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf); 34 | try { 35 | info.transformOutgoing(transformedBuf, CancelEncoderException::generate); 36 | 37 | out.add(transformedBuf.retain()); 38 | } finally { 39 | transformedBuf.release(); 40 | } 41 | } 42 | 43 | @Override 44 | public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { 45 | if (PipelineUtil.containsCause(cause, CancelCodecException.class)) { 46 | return; 47 | } 48 | super.exceptionCaught(ctx, cause); 49 | } 50 | } -------------------------------------------------------------------------------- /versions/v1_17/build.gradle.kts: -------------------------------------------------------------------------------- 1 | version = "0.1.0" 2 | 3 | plugins { 4 | id("net.labymod.gradle.vanilla") 5 | id("net.labymod.gradle.volt") 6 | } 7 | 8 | val minecraftGameVersion: String = "1.17.1" 9 | val minecraftVersionTag: String = "1.17" 10 | 11 | version = "1.0.0" 12 | 13 | minecraft { 14 | version(minecraftGameVersion) 15 | platform(org.spongepowered.gradle.vanilla.repository.MinecraftPlatform.CLIENT) 16 | runs { 17 | client { 18 | requiresAssetsAndNatives.set(true) 19 | mainClass("net.minecraft.launchwrapper.Launch") 20 | args("--tweakClass", "net.labymod.core.loader.vanilla.launchwrapper.LabyModLaunchWrapperTweaker") 21 | args("--labymod-dev-environment", "true") 22 | args("--addon-dev-environment", "true") 23 | jvmArgs("-Dmixin.debug=true") 24 | jvmArgs("-Dnet.labymod.running-version=$minecraftGameVersion") 25 | } 26 | } 27 | } 28 | 29 | dependencies { 30 | annotationProcessor("net.labymod:sponge-mixin:0.1.0+0.11.2+mixin.0.8.5") 31 | 32 | labyProcessor() 33 | labyApi("v1_17") 34 | api(project(":core")) 35 | } 36 | 37 | volt { 38 | mixin { 39 | compatibilityLevel = "JAVA_16" 40 | minVersion = "0.8.2" 41 | } 42 | 43 | packageName("de.rexlmanu.viaversionaddon.v1_17.mixins") 44 | 45 | version = minecraftGameVersion 46 | } 47 | 48 | intellij { 49 | minorMinecraftVersion(minecraftVersionTag) 50 | val javaVersion = project.findProperty("net.labymod.runconfig-v1_17-java-version") 51 | 52 | if (javaVersion != null) { 53 | run { 54 | javaVersion(javaVersion as String) 55 | } 56 | } 57 | } 58 | 59 | tasks.collectNatives { 60 | into("${project.gradle.gradleUserHomeDir}/caches/VanillaGradle/v2/natives/${minecraftGameVersion}/") 61 | } 62 | 63 | java { 64 | sourceCompatibility = JavaVersion.VERSION_16 65 | targetCompatibility = JavaVersion.VERSION_16 66 | } -------------------------------------------------------------------------------- /core/build.gradle.kts: -------------------------------------------------------------------------------- 1 | version = "0.1.0" 2 | 3 | plugins { 4 | id("java-library") 5 | id("io.freefair.lombok") version "6.5.1" 6 | } 7 | 8 | repositories { 9 | mavenLocal() 10 | maven("https://repo.viaversion.com/") 11 | mavenCentral() 12 | } 13 | 14 | dependencies { 15 | labyProcessor() 16 | api(project(":api")) 17 | 18 | implementation("org.yaml:snakeyaml:1.33") 19 | implementation("com.viaversion:viaversion:4.4.3-SNAPSHOT") 20 | implementation("com.viaversion:viabackwards:4.4.2-SNAPSHOT") 21 | implementation("com.viaversion:viarewind-fabric:2.0.3-SNAPSHOT") 22 | 23 | maven("https://repo.maven.apache.org/maven2/", "org.yaml:snakeyaml:1.33") 24 | maven("https://repo.viaversion.com/", "com.viaversion:viaversion:4.5.0-22w43a-SNAPSHOT") 25 | maven("https://repo.viaversion.com/", "com.viaversion:viabackwards:4.5.0-22w43a-SNAPSHOT") 26 | maven("https://repo.viaversion.com/", "com.viaversion:viarewind-fabric:2.0.3-SNAPSHOT") 27 | 28 | compileOnly("io.netty:netty-all:4.1.77.Final") 29 | compileOnly("com.google.guava:guava:30.1.1-jre") 30 | // If you want to use external libraries, you can do that here. 31 | // The dependencies that are specified here are loaded into your project but will also 32 | // automatically be downloaded by labymod, but only if the repository is public. 33 | // If it is private, you have to add and compile the dependency manually. 34 | // You have to specify the repository, there are getters for maven central and sonatype, every 35 | // other repository has to be specified with their url. Example: 36 | // maven(mavenCentral(), "org.apache.httpcomponents:httpclient:4.5.13") 37 | } 38 | 39 | addon { 40 | internalRelease() 41 | } 42 | 43 | java { 44 | sourceCompatibility = JavaVersion.VERSION_1_8 45 | targetCompatibility = JavaVersion.VERSION_1_8 46 | } 47 | 48 | tasks.compileJava { 49 | sourceCompatibility = JavaVersion.VERSION_1_8.toString() 50 | targetCompatibility = JavaVersion.VERSION_1_8.toString() 51 | } -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/platform/AddonViaConfig.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.platform; 2 | 3 | import com.viaversion.viaversion.api.protocol.version.BlockedProtocolVersions; 4 | import com.viaversion.viaversion.configuration.AbstractViaConfig; 5 | import com.viaversion.viaversion.libs.fastutil.ints.IntOpenHashSet; 6 | import com.viaversion.viaversion.protocol.BlockedProtocolVersionsImpl; 7 | import java.io.File; 8 | import java.net.URL; 9 | import java.util.Arrays; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | public class AddonViaConfig extends AbstractViaConfig { 14 | 15 | // Based on Sponge ViaVersion 16 | private static List UNSUPPORTED = Arrays.asList("anti-xray-patch", "bungee-ping-interval", 17 | "bungee-ping-save", "bungee-servers", "quick-move-action-fix", "nms-player-ticking", 18 | "velocity-ping-interval", "velocity-ping-save", "velocity-servers", 19 | "blockconnection-method", "change-1_9-hitbox", "change-1_14-hitbox"); 20 | 21 | protected AddonViaConfig(File configFile) { 22 | super(configFile); 23 | } 24 | 25 | @Override 26 | public URL getDefaultConfigURL() { 27 | return getClass().getClassLoader().getResource("assets/viaversion/config.yml"); 28 | } 29 | 30 | @Override 31 | protected void handleConfig(Map config) { 32 | 33 | } 34 | 35 | @Override 36 | public List getUnsupportedOptions() { 37 | return UNSUPPORTED; 38 | } 39 | 40 | @Override 41 | public boolean isCheckForUpdates() { 42 | return false; 43 | } 44 | 45 | @Override 46 | public BlockedProtocolVersions blockedProtocolVersions() { 47 | return new BlockedProtocolVersionsImpl(new IntOpenHashSet(), -1, -1); 48 | } 49 | 50 | @Override 51 | public boolean isAntiXRay() { 52 | return false; 53 | } 54 | 55 | @Override 56 | public boolean isNMSPlayerTicking() { 57 | return false; 58 | } 59 | 60 | @Override 61 | public boolean is1_12QuickMoveActionFix() { 62 | return false; 63 | } 64 | 65 | @Override 66 | public String getBlockConnectionMethod() { 67 | return "packet"; 68 | } 69 | 70 | @Override 71 | public boolean is1_9HitboxFix() { 72 | return false; 73 | } 74 | 75 | @Override 76 | public boolean is1_14HitboxFix() { 77 | return false; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /versions/v1_18/build.gradle.kts: -------------------------------------------------------------------------------- 1 | version = "0.1.0" 2 | 3 | plugins { 4 | id("net.labymod.gradle.vanilla") 5 | id("net.labymod.gradle.volt") 6 | } 7 | 8 | val minecraftGameVersion = "1.18.2" 9 | val minecraftVersionTag: String = "1.18" 10 | 11 | version = "1.0.0" 12 | 13 | minecraft { 14 | version(minecraftGameVersion) 15 | platform(org.spongepowered.gradle.vanilla.repository.MinecraftPlatform.CLIENT) 16 | runs { 17 | client { 18 | requiresAssetsAndNatives.set(true) 19 | mainClass("net.minecraft.launchwrapper.Launch") 20 | args("--tweakClass", "net.labymod.core.loader.vanilla.launchwrapper.LabyModLaunchWrapperTweaker") 21 | args("--labymod-dev-environment", "true") 22 | args("--addon-dev-environment", "true") 23 | jvmArgs("-Dnet.labymod.running-version=$minecraftGameVersion") 24 | } 25 | } 26 | } 27 | 28 | dependencies { 29 | annotationProcessor("net.labymod:sponge-mixin:0.1.0+0.11.2+mixin.0.8.5") 30 | labyProcessor() 31 | labyApi("v1_18") 32 | api(project(":core")) 33 | } 34 | 35 | volt { 36 | mixin { 37 | compatibilityLevel = "JAVA_17" 38 | minVersion = "0.8.2" 39 | } 40 | 41 | //Use this if you want to inherit the mixins from your 1.17 implementation 42 | packageName("de.rexlmanu.viaversionaddon.v1_18.mixins") 43 | 44 | version = minecraftGameVersion 45 | } 46 | 47 | //Use this if you want to inherit the code from your 1.17 implementation 48 | //val inheritv117 = sourceSets.create("inherit-v1_17") { 49 | // java.srcDirs(project.files("../v1_17/src/main/java/")) 50 | // 51 | // //Use the following if you want to inherit the 1.17 dependent code but not everything is given in your 1.18 code 52 | // java { 53 | // exclude("org.example.addon.v1_17.mixins.ExampleMixin") 54 | // } 55 | //} 56 | // 57 | //sourceSets.getByName("main") { 58 | // java.srcDirs(inheritv117.java) 59 | //} 60 | 61 | intellij { 62 | minorMinecraftVersion(minecraftVersionTag) 63 | val javaVersion = project.findProperty("net.labymod.runconfig-v1_18-java-version") 64 | 65 | //Use this if you want to rename your 1.17 dependent code to 1.18 66 | //renameApiMixin { 67 | // relocate("org.example.addon.v1_17.", "org.example.addon.v1_18.") 68 | //} 69 | 70 | if (javaVersion != null) { 71 | run { 72 | javaVersion(javaVersion as String) 73 | } 74 | } 75 | } 76 | 77 | tasks.collectNatives { 78 | into("${project.gradle.gradleUserHomeDir}/caches/VanillaGradle/v2/natives/${minecraftGameVersion}/") 79 | } 80 | 81 | java { 82 | sourceCompatibility = JavaVersion.VERSION_17 83 | targetCompatibility = JavaVersion.VERSION_17 84 | } -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/version/Version.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.version; 2 | 3 | import com.google.common.base.Supplier; 4 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 5 | import de.rexlmanu.viaversionaddon.core.ViaVersionAddon; 6 | import lombok.Getter; 7 | import net.labymod.api.inject.LabyGuice; 8 | 9 | public enum Version { 10 | V1_19_2(ProtocolVersion.v1_19_1), 11 | V1_19(ProtocolVersion.v1_19), 12 | V1_18_2(ProtocolVersion.v1_18_2), 13 | V1_18(ProtocolVersion.v1_18), 14 | V1_17_1(ProtocolVersion.v1_17_1), 15 | V1_17(ProtocolVersion.v1_17), 16 | V1_16_5(ProtocolVersion.v1_16_4), 17 | V1_16_3(ProtocolVersion.v1_16_3), 18 | V1_16_2(ProtocolVersion.v1_16_2), 19 | V1_16_1(ProtocolVersion.v1_16_1), 20 | V1_16(ProtocolVersion.v1_16), 21 | V1_15_2(ProtocolVersion.v1_15_2), 22 | V1_15_1(ProtocolVersion.v1_15_1), 23 | V1_15(ProtocolVersion.v1_15), 24 | V1_14_4(ProtocolVersion.v1_14_4), 25 | V1_14_3(ProtocolVersion.v1_14_3), 26 | V1_14_2(ProtocolVersion.v1_14_2), 27 | V1_14_1(ProtocolVersion.v1_14_1), 28 | V1_14(ProtocolVersion.v1_14), 29 | V1_13_2(ProtocolVersion.v1_13_2), 30 | V1_13_1(ProtocolVersion.v1_13_1), 31 | V1_13(ProtocolVersion.v1_13), 32 | V1_12_2(ProtocolVersion.v1_12_2), 33 | V1_12_1(ProtocolVersion.v1_12_1), 34 | V1_12(ProtocolVersion.v1_12), 35 | V1_11_1(ProtocolVersion.v1_11_1), 36 | V1_11(ProtocolVersion.v1_11), 37 | V1_10(ProtocolVersion.v1_10), 38 | V1_9_4(ProtocolVersion.v1_9_3), 39 | V1_9_2(ProtocolVersion.v1_9_2), 40 | V1_9_1(ProtocolVersion.v1_9_1), 41 | V1_9(ProtocolVersion.v1_9), 42 | V1_8(ProtocolVersion.v1_8), 43 | V1_7_10(ProtocolVersion.v1_7_6), 44 | V1_6_4(ProtocolVersion.v_1_6_4), 45 | V1_5_2(ProtocolVersion.v1_5_2), 46 | V1_4_7(ProtocolVersion.v1_4_6), 47 | UNDEFINED(() -> ProtocolVersion.getProtocol( 48 | LabyGuice.getInstance(ViaVersionAddon.class).protocolVersion())); 49 | 50 | private ProtocolVersion protocolVersion; 51 | @Getter 52 | private Supplier lazyProtocolVersion; 53 | 54 | Version(ProtocolVersion protocolVersion) { 55 | this.protocolVersion = protocolVersion; 56 | this.lazyProtocolVersion = () -> protocolVersion; 57 | } 58 | 59 | Version(Supplier lazyProtocolVersion) { 60 | this.lazyProtocolVersion = lazyProtocolVersion; 61 | } 62 | 63 | public static Version fromProtocolVersion(ProtocolVersion protocol) { 64 | for (Version version : values()) { 65 | if (version.lazyProtocolVersion().get().equals(protocol)) { 66 | return version; 67 | } 68 | } 69 | return null; 70 | } 71 | 72 | @Override 73 | public String toString() { 74 | if (this == UNDEFINED) { 75 | return "Native"; 76 | } 77 | return this.protocolVersion.getName(); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /versions/v1_19/runClient.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/handler/ViaDecodeHandler.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.handler; 2 | 3 | import com.viaversion.viaversion.api.connection.UserConnection; 4 | import com.viaversion.viaversion.exception.CancelCodecException; 5 | import com.viaversion.viaversion.exception.CancelDecoderException; 6 | import com.viaversion.viaversion.util.PipelineUtil; 7 | import de.rexlmanu.viaversionaddon.core.Constants; 8 | import io.netty.buffer.ByteBuf; 9 | import io.netty.channel.ChannelHandler; 10 | import io.netty.channel.ChannelHandlerContext; 11 | import io.netty.handler.codec.MessageToMessageDecoder; 12 | import java.util.List; 13 | 14 | @ChannelHandler.Sharable 15 | public class ViaDecodeHandler extends MessageToMessageDecoder { 16 | 17 | private final UserConnection info; 18 | private boolean handledCompression; 19 | private boolean skipDoubleTransform; 20 | 21 | public ViaDecodeHandler(UserConnection info) { 22 | this.info = info; 23 | } 24 | 25 | public UserConnection getInfo() { 26 | return info; 27 | } 28 | 29 | // https://github.com/ViaVersion/ViaVersion/blob/master/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityDecodeHandler.java 30 | @Override 31 | protected void decode(ChannelHandlerContext ctx, ByteBuf bytebuf, List out) 32 | throws Exception { 33 | if (!info.checkIncomingPacket()) { 34 | throw CancelDecoderException.generate(null); 35 | } 36 | if (!info.shouldTransformPacket()) { 37 | out.add(bytebuf.retain()); 38 | return; 39 | } 40 | 41 | ByteBuf transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf); 42 | try { 43 | info.transformIncoming(transformedBuf, CancelDecoderException::generate); 44 | 45 | out.add(transformedBuf.retain()); 46 | } finally { 47 | transformedBuf.release(); 48 | } 49 | } 50 | 51 | private void reorder(ChannelHandlerContext ctx) { 52 | int decoderIndex = ctx.pipeline().names().indexOf("decompress"); 53 | if (decoderIndex == -1) { 54 | return; 55 | } 56 | if (decoderIndex > ctx.pipeline().names().indexOf(Constants.DECODER_NAME)) { 57 | ChannelHandler encoder = ctx.pipeline().get(Constants.ENCODER_NAME); 58 | ChannelHandler decoder = ctx.pipeline().get(Constants.DECODER_NAME); 59 | ctx.pipeline().remove(encoder); 60 | ctx.pipeline().remove(decoder); 61 | ctx.pipeline().addAfter("compress", Constants.ENCODER_NAME, encoder); 62 | ctx.pipeline().addAfter("decompress", Constants.DECODER_NAME, decoder); 63 | } 64 | } 65 | 66 | @Override 67 | public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { 68 | if (PipelineUtil.containsCause(cause, CancelCodecException.class)) { 69 | return; 70 | } 71 | super.exceptionCaught(ctx, cause); 72 | } 73 | 74 | @Override 75 | public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { 76 | if (evt instanceof PipelineReorderEvent) { 77 | reorder(ctx); 78 | } 79 | super.userEventTriggered(ctx, evt); 80 | } 81 | 82 | } -------------------------------------------------------------------------------- /versions/v1_18/runClient.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /versions/v1_17/runClient.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Java template 3 | # Compiled class file 4 | *.class 5 | 6 | # Log file 7 | *.log 8 | 9 | # BlueJ files 10 | *.ctxt 11 | 12 | # Mobile Tools for Java (J2ME) 13 | .mtj.tmp/ 14 | 15 | # Package Files # 16 | *.jar 17 | *.war 18 | *.nar 19 | *.ear 20 | *.zip 21 | *.tar.gz 22 | *.rar 23 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 24 | hs_err_pid* 25 | 26 | ### JetBrains template 27 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 28 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 29 | 30 | # User-specific stuff 31 | .idea/**/workspace.xml 32 | .idea/**/tasks.xml 33 | .idea/**/usage.statistics.xml 34 | .idea/**/dictionaries 35 | .idea/**/shelf 36 | .idea/**/misc.xml 37 | .idea/**/discord.xml 38 | .idea/**/encodings.xml 39 | .idea/codeStyles/ 40 | .idea/sonarlint/ 41 | 42 | # Generated files 43 | .idea/**/contentModel.xml 44 | .idea/**/jarRepositories.xml 45 | .idea/**/uiDesigner.xml 46 | .idea/**/inspectionProfiles 47 | .idea/**/.name 48 | .idea/**/vcs.xml 49 | .idea/**/compiler.xml 50 | .idea/**/libraries-with-intellij-classes.xml 51 | run/** 52 | 53 | # Sensitive or high-churn files 54 | .idea/**/dataSources/ 55 | .idea/**/dataSources.ids 56 | .idea/**/dataSources.local.xml 57 | .idea/**/sqlDataSources.xml 58 | .idea/**/dynamic.xml 59 | .idea/**/dbnavigator.xml 60 | .idea/kotlinScripting.xml 61 | 62 | # Gradle 63 | .idea/**/gradle.xml 64 | .idea/**/libraries 65 | 66 | # Gradle and Maven with auto-import 67 | # When using Gradle or Maven with auto-import, you should exclude module files, 68 | # since they will be recreated, and may cause churn. Uncomment if using 69 | # auto-import. 70 | # .idea/artifacts 71 | # .idea/compiler.xml 72 | .idea/modules.xml 73 | .idea/*.iml 74 | # .idea/modules 75 | # *.iml 76 | # *.ipr 77 | 78 | # CMake 79 | cmake-build-*/ 80 | 81 | # Mongo Explorer plugin 82 | .idea/**/mongoSettings.xml 83 | 84 | # File-based project format 85 | *.iws 86 | 87 | # IntelliJ 88 | out/ 89 | 90 | # mpeltonen/sbt-idea plugin 91 | .idea_modules/ 92 | 93 | # JIRA plugin 94 | atlassian-ide-plugin.xml 95 | 96 | # Cursive Clojure plugin 97 | .idea/replstate.xml 98 | 99 | # Crashlytics plugin (for Android Studio and IntelliJ) 100 | com_crashlytics_export_strings.xml 101 | crashlytics.properties 102 | crashlytics-build.properties 103 | fabric.properties 104 | 105 | # Editor-based Rest Client 106 | .idea/httpRequests 107 | 108 | # Android studio 3.1+ serialized cache file 109 | .idea/caches/build_file_checksums.ser 110 | 111 | ### Gradle template 112 | .gradle 113 | /**/build/ 114 | 115 | # Ignore Gradle GUI config 116 | gradle-app.setting 117 | 118 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 119 | !gradle-wrapper.jar 120 | 121 | # Cache of project 122 | .gradletasknamecache 123 | 124 | # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 125 | # gradle/wrapper/gradle-wrapper.properties 126 | 127 | .idea/modules/ 128 | 129 | .idea/intellij-javadocs-4.0.1.xml 130 | docs/generated/ 131 | 132 | # Project 133 | run/ 134 | 135 | # LabyGradle | Addon Plugin 136 | build-data.txt 137 | 138 | # Don't ignore libraries 139 | !libs/*.jar -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/ViaVersionAddon.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core; 2 | 3 | import com.google.common.util.concurrent.ThreadFactoryBuilder; 4 | import com.google.inject.Singleton; 5 | import com.viaversion.viaversion.ViaManagerImpl; 6 | import com.viaversion.viaversion.api.Via; 7 | import com.viaversion.viaversion.api.data.MappingDataLoader; 8 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 9 | import de.rexlmanu.viaversionaddon.core.loader.AddonBackwardsLoader; 10 | import de.rexlmanu.viaversionaddon.core.loader.AddonRewindLoader; 11 | import de.rexlmanu.viaversionaddon.core.loader.AddonViaProviderLoader; 12 | import de.rexlmanu.viaversionaddon.core.platform.AddonViaInjector; 13 | import de.rexlmanu.viaversionaddon.core.platform.AddonViaPlatform; 14 | import io.netty.channel.DefaultEventLoop; 15 | import io.netty.channel.EventLoop; 16 | import io.netty.channel.local.LocalEventLoopGroup; 17 | import java.io.File; 18 | import java.util.concurrent.CompletableFuture; 19 | import java.util.concurrent.ExecutorService; 20 | import java.util.concurrent.Executors; 21 | import java.util.concurrent.ThreadFactory; 22 | import lombok.Getter; 23 | import net.labymod.api.addon.LabyAddon; 24 | import net.labymod.api.models.addon.annotation.AddonListener; 25 | 26 | @Singleton 27 | @AddonListener 28 | @Getter 29 | public class ViaVersionAddon extends LabyAddon { 30 | 31 | public static final ExecutorService ASYNC_EXECUTOR; 32 | public static final CompletableFuture INIT_FUTURE = new CompletableFuture<>(); 33 | public static EventLoop EVENT_LOOP; 34 | 35 | static { 36 | ThreadFactory factory = new ThreadFactoryBuilder().setDaemon(true) 37 | .setNameFormat(Constants.NAME + "-%d").build(); 38 | ASYNC_EXECUTOR = Executors.newFixedThreadPool(8, factory); 39 | try { 40 | Class.forName("io.netty.channel.DefaultEventLoop"); 41 | EVENT_LOOP = new DefaultEventLoop(factory); 42 | } catch (ClassNotFoundException e) { 43 | EVENT_LOOP = new LocalEventLoopGroup(1, factory).next(); 44 | } 45 | EVENT_LOOP.submit(INIT_FUTURE::join); 46 | } 47 | 48 | private final int protocolVersion; 49 | private final File dataFolder; 50 | 51 | public ViaVersionAddon() { 52 | this.protocolVersion = labyAPI().minecraft().getProtocolVersion(); 53 | this.dataFolder = new File(Constants.NAME.toLowerCase()); 54 | 55 | this.dataFolder.mkdirs(); 56 | } 57 | 58 | @Override 59 | protected void enable() { 60 | this.registerSettingCategory(); 61 | 62 | this.logger().info("Enabled the Addon"); 63 | 64 | Via.init(ViaManagerImpl.builder() 65 | .injector(new AddonViaInjector(this)) 66 | .platform(new AddonViaPlatform(this)) 67 | .loader(new AddonViaProviderLoader(this)) 68 | .build()); 69 | 70 | MappingDataLoader.enableMappingsCache(); 71 | ((ViaManagerImpl) Via.getManager()).init(); 72 | 73 | new AddonBackwardsLoader(new File(this.dataFolder, "backwards")); 74 | new AddonRewindLoader(new File(this.dataFolder, "viarewind")); 75 | 76 | INIT_FUTURE.complete(null); 77 | } 78 | 79 | @Override 80 | protected Class configurationClass() { 81 | return ViaVersionConfiguration.class; 82 | } 83 | 84 | public boolean nativeVersion() { 85 | return ProtocolVersion.getProtocol(this.protocolVersion) == this.configuration().version().get() 86 | .lazyProtocolVersion().get(); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /versions/v1_19/build.gradle.kts: -------------------------------------------------------------------------------- 1 | version = "0.1.0" 2 | 3 | plugins { 4 | id("net.labymod.gradle.vanilla") 5 | id("net.labymod.gradle.volt") 6 | } 7 | 8 | val minecraftGameVersion = "1.19.2" 9 | val minecraftVersionTag: String = "1.19" 10 | 11 | version = "1.0.0" 12 | 13 | minecraft { 14 | version(minecraftGameVersion) 15 | platform(org.spongepowered.gradle.vanilla.repository.MinecraftPlatform.CLIENT) 16 | runs { 17 | client { 18 | requiresAssetsAndNatives.set(true) 19 | mainClass("net.minecraft.launchwrapper.Launch") 20 | args("--tweakClass", "net.labymod.core.loader.vanilla.launchwrapper.LabyModLaunchWrapperTweaker") 21 | args("--labymod-dev-environment", "true") 22 | args("--addon-dev-environment", "true") 23 | jvmArgs("-Dnet.labymod.running-version=$minecraftGameVersion") 24 | } 25 | } 26 | } 27 | 28 | dependencies { 29 | annotationProcessor("net.labymod:sponge-mixin:0.1.0+0.11.2+mixin.0.8.5") 30 | labyProcessor() 31 | labyApi("v1_19") 32 | api(project(":core")) 33 | } 34 | 35 | volt { 36 | mixin { 37 | compatibilityLevel = "JAVA_17" 38 | minVersion = "0.8.2" 39 | } 40 | 41 | packageName("de.rexlmanu.viaversionaddon.v1_19.mixins") 42 | 43 | //Use this if you want to inherit the mixins from your 1.18 implementation 44 | //packageName("org.example.addon.v1_18.mixins") 45 | //inheritFrom("v1_18") 46 | 47 | //Use this if you want to inherit the mixins from your 1.17 implementation 48 | //packageName("org.example.addon.v1_17.mixins") 49 | //inheritFrom("v1_17") 50 | 51 | version = minecraftGameVersion 52 | } 53 | 54 | //Use this if you want to inherit the code from your 1.17 implementation 55 | //val inheritv117 = sourceSets.create("inherit-v1_17") { 56 | // java.srcDirs(project.files("../v1_17/src/main/java/")) 57 | // 58 | // //Use the following if you want to inherit the 1.17 dependent code but not everything is given in your 1.19 code 59 | // java { 60 | // exclude("org.example.addon.v1_17.mixins.ExampleMixin") 61 | // } 62 | //} 63 | 64 | //Use this if you want to inherit the code from your 1.17 implementation 65 | //val inheritv118 = sourceSets.create("inherit-v1_18") { 66 | // java.srcDirs(project.files("../v1_18/src/main/java/")) 67 | // 68 | // //Use the following if you want to inherit the 1.18 dependent code but not everything is given in your 1.19 code 69 | // java { 70 | // exclude("org.example.addon.v1_18.mixins.ExampleMixin") 71 | // } 72 | //} 73 | // 74 | //sourceSets.getByName("main") { 75 | // java.srcDirs(inheritv117.java) 76 | // java.srcDirs(inheritv118.java) 77 | //} 78 | 79 | 80 | intellij { 81 | minorMinecraftVersion(minecraftVersionTag) 82 | val javaVersion = project.findProperty("net.labymod.runconfig-v1_19-java-version") 83 | 84 | //Use this if you want to rename your 1.17 & 1.18 dependent code to 1.19 85 | //renameApiMixin { 86 | // relocate("org.example.addon.v1_17.", "org.example.addon.v1_19.") 87 | // relocate("org.example.addon.v1_18.", "org.example.addon.v1_19.") 88 | //} 89 | 90 | if (javaVersion != null) { 91 | run { 92 | javaVersion(javaVersion as String) 93 | } 94 | } 95 | } 96 | 97 | tasks.collectNatives { 98 | into("${project.gradle.gradleUserHomeDir}/caches/VanillaGradle/v2/natives/${minecraftGameVersion}/") 99 | } 100 | 101 | java { 102 | sourceCompatibility = JavaVersion.VERSION_17 103 | targetCompatibility = JavaVersion.VERSION_17 104 | } -------------------------------------------------------------------------------- /core/src/main/java/de/rexlmanu/viaversionaddon/core/platform/AddonViaPlatform.java: -------------------------------------------------------------------------------- 1 | package de.rexlmanu.viaversionaddon.core.platform; 2 | 3 | import com.viaversion.viaversion.api.ViaAPI; 4 | import com.viaversion.viaversion.api.command.ViaCommandSender; 5 | import com.viaversion.viaversion.api.configuration.ConfigurationProvider; 6 | import com.viaversion.viaversion.api.configuration.ViaVersionConfig; 7 | import com.viaversion.viaversion.api.platform.PlatformTask; 8 | import com.viaversion.viaversion.api.platform.ViaPlatform; 9 | import com.viaversion.viaversion.libs.gson.JsonObject; 10 | import de.rexlmanu.viaversionaddon.core.Constants; 11 | import de.rexlmanu.viaversionaddon.core.ViaVersionAddon; 12 | import de.rexlmanu.viaversionaddon.core.utility.FutureTaskId; 13 | import io.netty.util.concurrent.Future; 14 | import io.netty.util.concurrent.GenericFutureListener; 15 | import java.io.File; 16 | import java.util.UUID; 17 | import java.util.concurrent.CancellationException; 18 | import java.util.concurrent.CompletableFuture; 19 | import java.util.concurrent.TimeUnit; 20 | import java.util.logging.Logger; 21 | 22 | public class AddonViaPlatform implements ViaPlatform { 23 | 24 | private final ViaVersionAddon addon; 25 | private final AddonViaAPI api; 26 | private final AddonViaConfig config; 27 | 28 | public AddonViaPlatform(ViaVersionAddon addon) { 29 | this.addon = addon; 30 | this.api = new AddonViaAPI(); 31 | this.config = new AddonViaConfig(new File(addon.dataFolder(), "config.yml")); 32 | } 33 | 34 | @Override 35 | public Logger getLogger() { 36 | return Logger.getLogger(Constants.NAME); 37 | } 38 | 39 | @Override 40 | public String getPlatformName() { 41 | return Constants.NAME; 42 | } 43 | 44 | @Override 45 | public String getPlatformVersion() { 46 | return String.valueOf(this.addon.protocolVersion()); 47 | } 48 | 49 | @Override 50 | public String getPluginVersion() { 51 | return "4.3.2-SNAPSHOT"; 52 | } 53 | 54 | @Override 55 | public PlatformTask runAsync(Runnable runnable) { 56 | return new FutureTaskId(CompletableFuture 57 | .runAsync(runnable, ViaVersionAddon.ASYNC_EXECUTOR) 58 | .exceptionally(throwable -> { 59 | if (!(throwable instanceof CancellationException)) { 60 | throwable.printStackTrace(); 61 | } 62 | return null; 63 | }) 64 | ); 65 | } 66 | 67 | @Override 68 | public PlatformTask runSync(Runnable runnable) { 69 | return new FutureTaskId(ViaVersionAddon.EVENT_LOOP.submit(runnable).addListener(errorLogger())); 70 | } 71 | 72 | @Override 73 | public PlatformTask runSync(Runnable runnable, long ticks) { 74 | return new FutureTaskId(ViaVersionAddon.EVENT_LOOP.schedule(() -> runSync(runnable), ticks * 75 | 50, TimeUnit.MILLISECONDS).addListener(errorLogger())); 76 | } 77 | 78 | @Override 79 | public PlatformTask runRepeatingSync(Runnable runnable, long ticks) { 80 | return new FutureTaskId(ViaVersionAddon.EVENT_LOOP.scheduleAtFixedRate(() -> runSync(runnable), 81 | 0, ticks * 50, TimeUnit.MILLISECONDS).addListener(errorLogger())); 82 | 83 | } 84 | 85 | @Override 86 | public ViaCommandSender[] getOnlinePlayers() { 87 | return new ViaCommandSender[0]; 88 | } 89 | 90 | @Override 91 | public void sendMessage(UUID uuid, String message) { 92 | 93 | } 94 | 95 | @Override 96 | public boolean kickPlayer(UUID uuid, String message) { 97 | return false; 98 | } 99 | 100 | @Override 101 | public boolean isPluginEnabled() { 102 | return true; 103 | } 104 | 105 | @Override 106 | public ViaAPI getApi() { 107 | return this.api; 108 | } 109 | 110 | @Override 111 | public ViaVersionConfig getConf() { 112 | return this.config; 113 | } 114 | 115 | @Override 116 | public ConfigurationProvider getConfigurationProvider() { 117 | return this.config; 118 | } 119 | 120 | @Override 121 | public File getDataFolder() { 122 | return this.addon.dataFolder(); 123 | } 124 | 125 | @Override 126 | public void onReload() { 127 | 128 | } 129 | 130 | @Override 131 | public JsonObject getDump() { 132 | return new JsonObject(); 133 | } 134 | 135 | @Override 136 | public boolean isOldClientsAllowed() { 137 | return true; 138 | } 139 | 140 | @Override 141 | public boolean hasPlugin(String name) { 142 | return false; 143 | } 144 | 145 | private > GenericFutureListener errorLogger() { 146 | return future -> { 147 | if (!future.isCancelled() && future.cause() != null) { 148 | future.cause().printStackTrace(); 149 | } 150 | }; 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 2022 Emmanuel Lampe 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | ViaVersionAddon Copyright (C) 2022 Emmanuel Lampe 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | indent_size = 2 5 | indent_style = space 6 | insert_final_newline = false 7 | max_line_length = 100 8 | tab_width = 2 9 | ij_continuation_indent_size = 4 10 | ij_formatter_off_tag = @formatter:off 11 | ij_formatter_on_tag = @formatter:on 12 | ij_formatter_tags_enabled = false 13 | ij_smart_tabs = false 14 | ij_visual_guides = none 15 | ij_wrap_on_typing = false 16 | 17 | [*.css] 18 | ij_css_align_closing_brace_with_properties = false 19 | ij_css_blank_lines_around_nested_selector = 1 20 | ij_css_blank_lines_between_blocks = 1 21 | ij_css_brace_placement = end_of_line 22 | ij_css_enforce_quotes_on_format = false 23 | ij_css_hex_color_long_format = false 24 | ij_css_hex_color_lower_case = false 25 | ij_css_hex_color_short_format = false 26 | ij_css_hex_color_upper_case = false 27 | ij_css_keep_blank_lines_in_code = 2 28 | ij_css_keep_indents_on_empty_lines = false 29 | ij_css_keep_single_line_blocks = false 30 | ij_css_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 31 | ij_css_space_after_colon = true 32 | ij_css_space_before_opening_brace = true 33 | ij_css_use_double_quotes = true 34 | ij_css_value_alignment = do_not_align 35 | 36 | [*.java] 37 | ij_java_align_consecutive_assignments = false 38 | ij_java_align_consecutive_variable_declarations = false 39 | ij_java_align_group_field_declarations = false 40 | ij_java_align_multiline_annotation_parameters = false 41 | ij_java_align_multiline_array_initializer_expression = false 42 | ij_java_align_multiline_assignment = false 43 | ij_java_align_multiline_binary_operation = false 44 | ij_java_align_multiline_chained_methods = false 45 | ij_java_align_multiline_extends_list = false 46 | ij_java_align_multiline_for = false 47 | ij_java_align_multiline_method_parentheses = false 48 | ij_java_align_multiline_parameters = false 49 | ij_java_align_multiline_parameters_in_calls = false 50 | ij_java_align_multiline_parenthesized_expression = false 51 | ij_java_align_multiline_records = true 52 | ij_java_align_multiline_resources = false 53 | ij_java_align_multiline_ternary_operation = false 54 | ij_java_align_multiline_text_blocks = false 55 | ij_java_align_multiline_throws_list = false 56 | ij_java_align_subsequent_simple_methods = false 57 | ij_java_align_throws_keyword = false 58 | ij_java_annotation_parameter_wrap = off 59 | ij_java_array_initializer_new_line_after_left_brace = false 60 | ij_java_array_initializer_right_brace_on_new_line = false 61 | ij_java_array_initializer_wrap = normal 62 | ij_java_assert_statement_colon_on_next_line = false 63 | ij_java_assert_statement_wrap = off 64 | ij_java_assignment_wrap = off 65 | ij_java_binary_operation_sign_on_next_line = true 66 | ij_java_binary_operation_wrap = normal 67 | ij_java_blank_lines_after_anonymous_class_header = 0 68 | ij_java_blank_lines_after_class_header = 1 69 | ij_java_blank_lines_after_imports = 1 70 | ij_java_blank_lines_after_package = 1 71 | ij_java_blank_lines_around_class = 1 72 | ij_java_blank_lines_around_field = 0 73 | ij_java_blank_lines_around_field_in_interface = 0 74 | ij_java_blank_lines_around_initializer = 1 75 | ij_java_blank_lines_around_method = 1 76 | ij_java_blank_lines_around_method_in_interface = 1 77 | ij_java_blank_lines_before_class_end = 0 78 | ij_java_blank_lines_before_imports = 1 79 | ij_java_blank_lines_before_method_body = 0 80 | ij_java_blank_lines_before_package = 0 81 | ij_java_block_brace_style = end_of_line 82 | ij_java_block_comment_at_first_column = true 83 | ij_java_call_parameters_new_line_after_left_paren = false 84 | ij_java_call_parameters_right_paren_on_new_line = false 85 | ij_java_call_parameters_wrap = normal 86 | ij_java_case_statement_on_separate_line = true 87 | ij_java_catch_on_new_line = false 88 | ij_java_class_annotation_wrap = split_into_lines 89 | ij_java_class_brace_style = end_of_line 90 | ij_java_class_count_to_use_import_on_demand = 999 91 | ij_java_class_names_in_javadoc = 1 92 | ij_java_do_not_indent_top_level_class_members = false 93 | ij_java_do_not_wrap_after_single_annotation = false 94 | ij_java_do_while_brace_force = always 95 | ij_java_doc_add_blank_line_after_description = true 96 | ij_java_doc_add_blank_line_after_param_comments = false 97 | ij_java_doc_add_blank_line_after_return = false 98 | ij_java_doc_add_p_tag_on_empty_lines = true 99 | ij_java_doc_align_exception_comments = true 100 | ij_java_doc_align_param_comments = true 101 | ij_java_doc_do_not_wrap_if_one_line = false 102 | ij_java_doc_enable_formatting = true 103 | ij_java_doc_enable_leading_asterisks = true 104 | ij_java_doc_indent_on_continuation = false 105 | ij_java_doc_keep_empty_lines = true 106 | ij_java_doc_keep_empty_parameter_tag = true 107 | ij_java_doc_keep_empty_return_tag = true 108 | ij_java_doc_keep_empty_throws_tag = true 109 | ij_java_doc_keep_invalid_tags = true 110 | ij_java_doc_param_description_on_new_line = false 111 | ij_java_doc_preserve_line_breaks = false 112 | ij_java_doc_use_throws_not_exception_tag = true 113 | ij_java_else_on_new_line = false 114 | ij_java_enum_constants_wrap = off 115 | ij_java_extends_keyword_wrap = off 116 | ij_java_extends_list_wrap = normal 117 | ij_java_field_annotation_wrap = split_into_lines 118 | ij_java_finally_on_new_line = false 119 | ij_java_for_brace_force = always 120 | ij_java_for_statement_new_line_after_left_paren = false 121 | ij_java_for_statement_right_paren_on_new_line = false 122 | ij_java_for_statement_wrap = normal 123 | ij_java_generate_final_locals = false 124 | ij_java_generate_final_parameters = false 125 | ij_java_if_brace_force = always 126 | ij_java_imports_layout = $*, |, * 127 | ij_java_indent_case_from_switch = true 128 | ij_java_insert_inner_class_imports = true 129 | ij_java_insert_override_annotation = true 130 | ij_java_keep_blank_lines_before_right_brace = 2 131 | ij_java_keep_blank_lines_between_package_declaration_and_header = 2 132 | ij_java_keep_blank_lines_in_code = 1 133 | ij_java_keep_blank_lines_in_declarations = 2 134 | ij_java_keep_control_statement_in_one_line = false 135 | ij_java_keep_first_column_comment = true 136 | ij_java_keep_indents_on_empty_lines = false 137 | ij_java_keep_line_breaks = true 138 | ij_java_keep_multiple_expressions_in_one_line = false 139 | ij_java_keep_simple_blocks_in_one_line = false 140 | ij_java_keep_simple_classes_in_one_line = false 141 | ij_java_keep_simple_lambdas_in_one_line = false 142 | ij_java_keep_simple_methods_in_one_line = false 143 | ij_java_label_indent_absolute = false 144 | ij_java_label_indent_size = 0 145 | ij_java_lambda_brace_style = end_of_line 146 | ij_java_layout_static_imports_separately = true 147 | ij_java_line_comment_add_space = false 148 | ij_java_line_comment_at_first_column = true 149 | ij_java_method_annotation_wrap = split_into_lines 150 | ij_java_method_brace_style = end_of_line 151 | ij_java_method_call_chain_wrap = normal 152 | ij_java_method_parameters_new_line_after_left_paren = false 153 | ij_java_method_parameters_right_paren_on_new_line = false 154 | ij_java_method_parameters_wrap = normal 155 | ij_java_modifier_list_wrap = false 156 | ij_java_names_count_to_use_import_on_demand = 999 157 | ij_java_new_line_after_lparen_in_record_header = false 158 | ij_java_parameter_annotation_wrap = off 159 | ij_java_parentheses_expression_new_line_after_left_paren = false 160 | ij_java_parentheses_expression_right_paren_on_new_line = false 161 | ij_java_place_assignment_sign_on_next_line = false 162 | ij_java_prefer_longer_names = true 163 | ij_java_prefer_parameters_wrap = false 164 | ij_java_record_components_wrap = normal 165 | ij_java_repeat_synchronized = true 166 | ij_java_replace_instanceof_and_cast = false 167 | ij_java_replace_null_check = true 168 | ij_java_replace_sum_lambda_with_method_ref = true 169 | ij_java_resource_list_new_line_after_left_paren = false 170 | ij_java_resource_list_right_paren_on_new_line = false 171 | ij_java_resource_list_wrap = off 172 | ij_java_rparen_on_new_line_in_record_header = false 173 | ij_java_space_after_closing_angle_bracket_in_type_argument = false 174 | ij_java_space_after_colon = true 175 | ij_java_space_after_comma = true 176 | ij_java_space_after_comma_in_type_arguments = true 177 | ij_java_space_after_for_semicolon = true 178 | ij_java_space_after_quest = true 179 | ij_java_space_after_type_cast = true 180 | ij_java_space_before_annotation_array_initializer_left_brace = false 181 | ij_java_space_before_annotation_parameter_list = false 182 | ij_java_space_before_array_initializer_left_brace = false 183 | ij_java_space_before_catch_keyword = true 184 | ij_java_space_before_catch_left_brace = true 185 | ij_java_space_before_catch_parentheses = true 186 | ij_java_space_before_class_left_brace = true 187 | ij_java_space_before_colon = true 188 | ij_java_space_before_colon_in_foreach = true 189 | ij_java_space_before_comma = false 190 | ij_java_space_before_do_left_brace = true 191 | ij_java_space_before_else_keyword = true 192 | ij_java_space_before_else_left_brace = true 193 | ij_java_space_before_finally_keyword = true 194 | ij_java_space_before_finally_left_brace = true 195 | ij_java_space_before_for_left_brace = true 196 | ij_java_space_before_for_parentheses = true 197 | ij_java_space_before_for_semicolon = false 198 | ij_java_space_before_if_left_brace = true 199 | ij_java_space_before_if_parentheses = true 200 | ij_java_space_before_method_call_parentheses = false 201 | ij_java_space_before_method_left_brace = true 202 | ij_java_space_before_method_parentheses = false 203 | ij_java_space_before_opening_angle_bracket_in_type_parameter = false 204 | ij_java_space_before_quest = true 205 | ij_java_space_before_switch_left_brace = true 206 | ij_java_space_before_switch_parentheses = true 207 | ij_java_space_before_synchronized_left_brace = true 208 | ij_java_space_before_synchronized_parentheses = true 209 | ij_java_space_before_try_left_brace = true 210 | ij_java_space_before_try_parentheses = true 211 | ij_java_space_before_type_parameter_list = false 212 | ij_java_space_before_while_keyword = true 213 | ij_java_space_before_while_left_brace = true 214 | ij_java_space_before_while_parentheses = true 215 | ij_java_space_inside_one_line_enum_braces = false 216 | ij_java_space_within_empty_array_initializer_braces = false 217 | ij_java_space_within_empty_method_call_parentheses = false 218 | ij_java_space_within_empty_method_parentheses = false 219 | ij_java_spaces_around_additive_operators = true 220 | ij_java_spaces_around_assignment_operators = true 221 | ij_java_spaces_around_bitwise_operators = true 222 | ij_java_spaces_around_equality_operators = true 223 | ij_java_spaces_around_lambda_arrow = true 224 | ij_java_spaces_around_logical_operators = true 225 | ij_java_spaces_around_method_ref_dbl_colon = false 226 | ij_java_spaces_around_multiplicative_operators = true 227 | ij_java_spaces_around_relational_operators = true 228 | ij_java_spaces_around_shift_operators = true 229 | ij_java_spaces_around_type_bounds_in_type_parameters = true 230 | ij_java_spaces_around_unary_operator = false 231 | ij_java_spaces_within_angle_brackets = false 232 | ij_java_spaces_within_annotation_parentheses = false 233 | ij_java_spaces_within_array_initializer_braces = false 234 | ij_java_spaces_within_braces = false 235 | ij_java_spaces_within_brackets = false 236 | ij_java_spaces_within_cast_parentheses = false 237 | ij_java_spaces_within_catch_parentheses = false 238 | ij_java_spaces_within_for_parentheses = false 239 | ij_java_spaces_within_if_parentheses = false 240 | ij_java_spaces_within_method_call_parentheses = false 241 | ij_java_spaces_within_method_parentheses = false 242 | ij_java_spaces_within_parentheses = false 243 | ij_java_spaces_within_record_header = false 244 | ij_java_spaces_within_switch_parentheses = false 245 | ij_java_spaces_within_synchronized_parentheses = false 246 | ij_java_spaces_within_try_parentheses = false 247 | ij_java_spaces_within_while_parentheses = false 248 | ij_java_special_else_if_treatment = true 249 | ij_java_subclass_name_suffix = Impl 250 | ij_java_ternary_operation_signs_on_next_line = true 251 | ij_java_ternary_operation_wrap = normal 252 | ij_java_test_name_suffix = Test 253 | ij_java_throws_keyword_wrap = normal 254 | ij_java_throws_list_wrap = off 255 | ij_java_use_external_annotations = false 256 | ij_java_use_fq_class_names = false 257 | ij_java_use_relative_indents = false 258 | ij_java_use_single_class_imports = true 259 | ij_java_variable_annotation_wrap = off 260 | ij_java_visibility = public 261 | ij_java_while_brace_force = always 262 | ij_java_while_on_new_line = false 263 | ij_java_wrap_comments = true 264 | ij_java_wrap_first_method_in_call_chain = false 265 | ij_java_wrap_long_lines = false 266 | 267 | [*.nbtt] 268 | indent_size = 4 269 | max_line_length = 150 270 | tab_width = 4 271 | ij_nbtt_keep_indents_on_empty_lines = false 272 | ij_nbtt_space_after_colon = true 273 | ij_nbtt_space_after_comma = true 274 | ij_nbtt_space_before_colon = true 275 | ij_nbtt_space_before_comma = false 276 | ij_nbtt_spaces_within_brackets = false 277 | ij_nbtt_spaces_within_parentheses = false 278 | 279 | [*.properties] 280 | ij_properties_align_group_field_declarations = false 281 | ij_properties_keep_blank_lines = false 282 | ij_properties_key_value_delimiter = equals 283 | ij_properties_spaces_around_key_value_delimiter = false 284 | 285 | [*.sass] 286 | ij_sass_align_closing_brace_with_properties = false 287 | ij_sass_blank_lines_around_nested_selector = 1 288 | ij_sass_blank_lines_between_blocks = 1 289 | ij_sass_brace_placement = 0 290 | ij_sass_enforce_quotes_on_format = false 291 | ij_sass_hex_color_long_format = false 292 | ij_sass_hex_color_lower_case = false 293 | ij_sass_hex_color_short_format = false 294 | ij_sass_hex_color_upper_case = false 295 | ij_sass_keep_blank_lines_in_code = 2 296 | ij_sass_keep_indents_on_empty_lines = false 297 | ij_sass_keep_single_line_blocks = false 298 | ij_sass_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 299 | ij_sass_space_after_colon = true 300 | ij_sass_space_before_opening_brace = true 301 | ij_sass_use_double_quotes = true 302 | ij_sass_value_alignment = 0 303 | 304 | [*.scss] 305 | ij_scss_align_closing_brace_with_properties = false 306 | ij_scss_blank_lines_around_nested_selector = 1 307 | ij_scss_blank_lines_between_blocks = 1 308 | ij_scss_brace_placement = 0 309 | ij_scss_enforce_quotes_on_format = false 310 | ij_scss_hex_color_long_format = false 311 | ij_scss_hex_color_lower_case = false 312 | ij_scss_hex_color_short_format = false 313 | ij_scss_hex_color_upper_case = false 314 | ij_scss_keep_blank_lines_in_code = 2 315 | ij_scss_keep_indents_on_empty_lines = false 316 | ij_scss_keep_single_line_blocks = false 317 | ij_scss_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 318 | ij_scss_space_after_colon = true 319 | ij_scss_space_before_opening_brace = true 320 | ij_scss_use_double_quotes = true 321 | ij_scss_value_alignment = 0 322 | 323 | [*.styl] 324 | tab_width = 4 325 | ij_continuation_indent_size = 8 326 | ij_stylus_align_closing_brace_with_properties = false 327 | ij_stylus_blank_lines_around_nested_selector = 1 328 | ij_stylus_blank_lines_between_blocks = 1 329 | ij_stylus_brace_placement = 0 330 | ij_stylus_enforce_quotes_on_format = false 331 | ij_stylus_hex_color_long_format = false 332 | ij_stylus_hex_color_lower_case = false 333 | ij_stylus_hex_color_short_format = false 334 | ij_stylus_hex_color_upper_case = false 335 | ij_stylus_keep_blank_lines_in_code = 2 336 | ij_stylus_keep_indents_on_empty_lines = false 337 | ij_stylus_keep_single_line_blocks = false 338 | ij_stylus_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 339 | ij_stylus_space_after_colon = true 340 | ij_stylus_space_before_opening_brace = true 341 | ij_stylus_use_double_quotes = true 342 | ij_stylus_value_alignment = 0 343 | 344 | [.editorconfig] 345 | ij_editorconfig_align_group_field_declarations = false 346 | ij_editorconfig_space_after_colon = false 347 | ij_editorconfig_space_after_comma = true 348 | ij_editorconfig_space_before_colon = false 349 | ij_editorconfig_space_before_comma = false 350 | ij_editorconfig_spaces_around_assignment_operators = true 351 | 352 | [{*.ant, *.fxml, *.jhm, *.jnlp, *.jrxml, *.pom, *.rng, *.tld, *.wsdl, *.xml, *.xsd, *.xsl, *.xslt, *.xul}] 353 | ij_continuation_indent_size = 2 354 | ij_xml_align_attributes = false 355 | ij_xml_align_text = false 356 | ij_xml_attribute_wrap = normal 357 | ij_xml_block_comment_at_first_column = true 358 | ij_xml_keep_blank_lines = 2 359 | ij_xml_keep_indents_on_empty_lines = false 360 | ij_xml_keep_line_breaks = true 361 | ij_xml_keep_line_breaks_in_text = true 362 | ij_xml_keep_whitespaces = false 363 | ij_xml_keep_whitespaces_around_cdata = preserve 364 | ij_xml_keep_whitespaces_inside_cdata = false 365 | ij_xml_line_comment_at_first_column = true 366 | ij_xml_space_after_tag_name = false 367 | ij_xml_space_around_equals_in_attribute = false 368 | ij_xml_space_inside_empty_tag = false 369 | ij_xml_text_wrap = normal 370 | 371 | [{*.ats, *.ts}] 372 | ij_typescript_align_imports = false 373 | ij_typescript_align_multiline_array_initializer_expression = false 374 | ij_typescript_align_multiline_binary_operation = false 375 | ij_typescript_align_multiline_chained_methods = false 376 | ij_typescript_align_multiline_extends_list = false 377 | ij_typescript_align_multiline_for = true 378 | ij_typescript_align_multiline_parameters = true 379 | ij_typescript_align_multiline_parameters_in_calls = false 380 | ij_typescript_align_multiline_ternary_operation = false 381 | ij_typescript_align_object_properties = 0 382 | ij_typescript_align_union_types = false 383 | ij_typescript_align_var_statements = 0 384 | ij_typescript_array_initializer_new_line_after_left_brace = false 385 | ij_typescript_array_initializer_right_brace_on_new_line = false 386 | ij_typescript_array_initializer_wrap = off 387 | ij_typescript_assignment_wrap = off 388 | ij_typescript_binary_operation_sign_on_next_line = false 389 | ij_typescript_binary_operation_wrap = off 390 | ij_typescript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/** 391 | ij_typescript_blank_lines_after_imports = 1 392 | ij_typescript_blank_lines_around_class = 1 393 | ij_typescript_blank_lines_around_field = 0 394 | ij_typescript_blank_lines_around_field_in_interface = 0 395 | ij_typescript_blank_lines_around_function = 1 396 | ij_typescript_blank_lines_around_method = 1 397 | ij_typescript_blank_lines_around_method_in_interface = 1 398 | ij_typescript_block_brace_style = end_of_line 399 | ij_typescript_call_parameters_new_line_after_left_paren = false 400 | ij_typescript_call_parameters_right_paren_on_new_line = false 401 | ij_typescript_call_parameters_wrap = off 402 | ij_typescript_catch_on_new_line = false 403 | ij_typescript_chained_call_dot_on_new_line = true 404 | ij_typescript_class_brace_style = end_of_line 405 | ij_typescript_comma_on_new_line = false 406 | ij_typescript_do_while_brace_force = never 407 | ij_typescript_else_on_new_line = false 408 | ij_typescript_enforce_trailing_comma = keep 409 | ij_typescript_extends_keyword_wrap = off 410 | ij_typescript_extends_list_wrap = off 411 | ij_typescript_field_prefix = _ 412 | ij_typescript_file_name_style = relaxed 413 | ij_typescript_finally_on_new_line = false 414 | ij_typescript_for_brace_force = never 415 | ij_typescript_for_statement_new_line_after_left_paren = false 416 | ij_typescript_for_statement_right_paren_on_new_line = false 417 | ij_typescript_for_statement_wrap = off 418 | ij_typescript_force_quote_style = false 419 | ij_typescript_force_semicolon_style = false 420 | ij_typescript_function_expression_brace_style = end_of_line 421 | ij_typescript_if_brace_force = never 422 | ij_typescript_import_merge_members = global 423 | ij_typescript_import_prefer_absolute_path = global 424 | ij_typescript_import_sort_members = true 425 | ij_typescript_import_sort_module_name = false 426 | ij_typescript_import_use_node_resolution = true 427 | ij_typescript_imports_wrap = on_every_item 428 | ij_typescript_indent_case_from_switch = true 429 | ij_typescript_indent_chained_calls = false 430 | ij_typescript_indent_package_children = 0 431 | ij_typescript_jsdoc_include_types = false 432 | ij_typescript_jsx_attribute_value = braces 433 | ij_typescript_keep_blank_lines_in_code = 2 434 | ij_typescript_keep_first_column_comment = true 435 | ij_typescript_keep_indents_on_empty_lines = false 436 | ij_typescript_keep_line_breaks = true 437 | ij_typescript_keep_simple_blocks_in_one_line = false 438 | ij_typescript_keep_simple_methods_in_one_line = false 439 | ij_typescript_line_comment_add_space = true 440 | ij_typescript_line_comment_at_first_column = false 441 | ij_typescript_method_brace_style = end_of_line 442 | ij_typescript_method_call_chain_wrap = off 443 | ij_typescript_method_parameters_new_line_after_left_paren = false 444 | ij_typescript_method_parameters_right_paren_on_new_line = false 445 | ij_typescript_method_parameters_wrap = off 446 | ij_typescript_object_literal_wrap = on_every_item 447 | ij_typescript_parentheses_expression_new_line_after_left_paren = false 448 | ij_typescript_parentheses_expression_right_paren_on_new_line = false 449 | ij_typescript_place_assignment_sign_on_next_line = false 450 | ij_typescript_prefer_as_type_cast = false 451 | ij_typescript_prefer_explicit_types_function_expression_returns = false 452 | ij_typescript_prefer_explicit_types_function_returns = false 453 | ij_typescript_prefer_explicit_types_vars_fields = false 454 | ij_typescript_prefer_parameters_wrap = false 455 | ij_typescript_reformat_c_style_comments = false 456 | ij_typescript_space_after_colon = true 457 | ij_typescript_space_after_comma = true 458 | ij_typescript_space_after_dots_in_rest_parameter = false 459 | ij_typescript_space_after_generator_mult = true 460 | ij_typescript_space_after_property_colon = true 461 | ij_typescript_space_after_quest = true 462 | ij_typescript_space_after_type_colon = true 463 | ij_typescript_space_after_unary_not = false 464 | ij_typescript_space_before_async_arrow_lparen = true 465 | ij_typescript_space_before_catch_keyword = true 466 | ij_typescript_space_before_catch_left_brace = true 467 | ij_typescript_space_before_catch_parentheses = true 468 | ij_typescript_space_before_class_lbrace = true 469 | ij_typescript_space_before_class_left_brace = true 470 | ij_typescript_space_before_colon = true 471 | ij_typescript_space_before_comma = false 472 | ij_typescript_space_before_do_left_brace = true 473 | ij_typescript_space_before_else_keyword = true 474 | ij_typescript_space_before_else_left_brace = true 475 | ij_typescript_space_before_finally_keyword = true 476 | ij_typescript_space_before_finally_left_brace = true 477 | ij_typescript_space_before_for_left_brace = true 478 | ij_typescript_space_before_for_parentheses = true 479 | ij_typescript_space_before_for_semicolon = false 480 | ij_typescript_space_before_function_left_parenth = true 481 | ij_typescript_space_before_generator_mult = false 482 | ij_typescript_space_before_if_left_brace = true 483 | ij_typescript_space_before_if_parentheses = true 484 | ij_typescript_space_before_method_call_parentheses = false 485 | ij_typescript_space_before_method_left_brace = true 486 | ij_typescript_space_before_method_parentheses = false 487 | ij_typescript_space_before_property_colon = false 488 | ij_typescript_space_before_quest = true 489 | ij_typescript_space_before_switch_left_brace = true 490 | ij_typescript_space_before_switch_parentheses = true 491 | ij_typescript_space_before_try_left_brace = true 492 | ij_typescript_space_before_type_colon = false 493 | ij_typescript_space_before_unary_not = false 494 | ij_typescript_space_before_while_keyword = true 495 | ij_typescript_space_before_while_left_brace = true 496 | ij_typescript_space_before_while_parentheses = true 497 | ij_typescript_spaces_around_additive_operators = true 498 | ij_typescript_spaces_around_arrow_function_operator = true 499 | ij_typescript_spaces_around_assignment_operators = true 500 | ij_typescript_spaces_around_bitwise_operators = true 501 | ij_typescript_spaces_around_equality_operators = true 502 | ij_typescript_spaces_around_logical_operators = true 503 | ij_typescript_spaces_around_multiplicative_operators = true 504 | ij_typescript_spaces_around_relational_operators = true 505 | ij_typescript_spaces_around_shift_operators = true 506 | ij_typescript_spaces_around_unary_operator = false 507 | ij_typescript_spaces_within_array_initializer_brackets = false 508 | ij_typescript_spaces_within_brackets = false 509 | ij_typescript_spaces_within_catch_parentheses = false 510 | ij_typescript_spaces_within_for_parentheses = false 511 | ij_typescript_spaces_within_if_parentheses = false 512 | ij_typescript_spaces_within_imports = false 513 | ij_typescript_spaces_within_interpolation_expressions = false 514 | ij_typescript_spaces_within_method_call_parentheses = false 515 | ij_typescript_spaces_within_method_parentheses = false 516 | ij_typescript_spaces_within_object_literal_braces = false 517 | ij_typescript_spaces_within_object_type_braces = true 518 | ij_typescript_spaces_within_parentheses = false 519 | ij_typescript_spaces_within_switch_parentheses = false 520 | ij_typescript_spaces_within_type_assertion = false 521 | ij_typescript_spaces_within_union_types = true 522 | ij_typescript_spaces_within_while_parentheses = false 523 | ij_typescript_special_else_if_treatment = true 524 | ij_typescript_ternary_operation_signs_on_next_line = false 525 | ij_typescript_ternary_operation_wrap = off 526 | ij_typescript_union_types_wrap = on_every_item 527 | ij_typescript_use_chained_calls_group_indents = false 528 | ij_typescript_use_double_quotes = true 529 | ij_typescript_use_explicit_js_extension = global 530 | ij_typescript_use_path_mapping = always 531 | ij_typescript_use_public_modifier = false 532 | ij_typescript_use_semicolon_after_statement = true 533 | ij_typescript_var_declaration_wrap = normal 534 | ij_typescript_while_brace_force = never 535 | ij_typescript_while_on_new_line = false 536 | ij_typescript_wrap_comments = false 537 | 538 | [{*.bash, *.sh, *.zsh}] 539 | ij_shell_binary_ops_start_line = false 540 | ij_shell_keep_column_alignment_padding = false 541 | ij_shell_minify_program = false 542 | ij_shell_redirect_followed_by_space = false 543 | ij_shell_switch_cases_indented = false 544 | 545 | [{*.cjs, *.js}] 546 | max_line_length = 80 547 | ij_javascript_align_imports = false 548 | ij_javascript_align_multiline_array_initializer_expression = false 549 | ij_javascript_align_multiline_binary_operation = false 550 | ij_javascript_align_multiline_chained_methods = false 551 | ij_javascript_align_multiline_extends_list = false 552 | ij_javascript_align_multiline_for = false 553 | ij_javascript_align_multiline_parameters = false 554 | ij_javascript_align_multiline_parameters_in_calls = false 555 | ij_javascript_align_multiline_ternary_operation = false 556 | ij_javascript_align_object_properties = 0 557 | ij_javascript_align_union_types = false 558 | ij_javascript_align_var_statements = 0 559 | ij_javascript_array_initializer_new_line_after_left_brace = false 560 | ij_javascript_array_initializer_right_brace_on_new_line = false 561 | ij_javascript_array_initializer_wrap = normal 562 | ij_javascript_assignment_wrap = off 563 | ij_javascript_binary_operation_sign_on_next_line = true 564 | ij_javascript_binary_operation_wrap = normal 565 | ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/** 566 | ij_javascript_blank_lines_after_imports = 1 567 | ij_javascript_blank_lines_around_class = 1 568 | ij_javascript_blank_lines_around_field = 0 569 | ij_javascript_blank_lines_around_function = 1 570 | ij_javascript_blank_lines_around_method = 1 571 | ij_javascript_block_brace_style = end_of_line 572 | ij_javascript_call_parameters_new_line_after_left_paren = false 573 | ij_javascript_call_parameters_right_paren_on_new_line = false 574 | ij_javascript_call_parameters_wrap = normal 575 | ij_javascript_catch_on_new_line = false 576 | ij_javascript_chained_call_dot_on_new_line = true 577 | ij_javascript_class_brace_style = end_of_line 578 | ij_javascript_comma_on_new_line = false 579 | ij_javascript_do_while_brace_force = always 580 | ij_javascript_else_on_new_line = false 581 | ij_javascript_enforce_trailing_comma = keep 582 | ij_javascript_extends_keyword_wrap = off 583 | ij_javascript_extends_list_wrap = off 584 | ij_javascript_field_prefix = _ 585 | ij_javascript_file_name_style = relaxed 586 | ij_javascript_finally_on_new_line = false 587 | ij_javascript_for_brace_force = always 588 | ij_javascript_for_statement_new_line_after_left_paren = false 589 | ij_javascript_for_statement_right_paren_on_new_line = false 590 | ij_javascript_for_statement_wrap = normal 591 | ij_javascript_force_quote_style = false 592 | ij_javascript_force_semicolon_style = false 593 | ij_javascript_function_expression_brace_style = end_of_line 594 | ij_javascript_if_brace_force = always 595 | ij_javascript_import_merge_members = global 596 | ij_javascript_import_prefer_absolute_path = global 597 | ij_javascript_import_sort_members = true 598 | ij_javascript_import_sort_module_name = false 599 | ij_javascript_import_use_node_resolution = true 600 | ij_javascript_imports_wrap = on_every_item 601 | ij_javascript_indent_case_from_switch = true 602 | ij_javascript_indent_chained_calls = false 603 | ij_javascript_indent_package_children = 0 604 | ij_javascript_jsx_attribute_value = braces 605 | ij_javascript_keep_blank_lines_in_code = 1 606 | ij_javascript_keep_first_column_comment = true 607 | ij_javascript_keep_indents_on_empty_lines = false 608 | ij_javascript_keep_line_breaks = true 609 | ij_javascript_keep_simple_blocks_in_one_line = false 610 | ij_javascript_keep_simple_methods_in_one_line = false 611 | ij_javascript_line_comment_add_space = true 612 | ij_javascript_line_comment_at_first_column = false 613 | ij_javascript_method_brace_style = end_of_line 614 | ij_javascript_method_call_chain_wrap = off 615 | ij_javascript_method_parameters_new_line_after_left_paren = false 616 | ij_javascript_method_parameters_right_paren_on_new_line = false 617 | ij_javascript_method_parameters_wrap = normal 618 | ij_javascript_object_literal_wrap = on_every_item 619 | ij_javascript_parentheses_expression_new_line_after_left_paren = false 620 | ij_javascript_parentheses_expression_right_paren_on_new_line = false 621 | ij_javascript_place_assignment_sign_on_next_line = false 622 | ij_javascript_prefer_as_type_cast = false 623 | ij_javascript_prefer_explicit_types_function_expression_returns = false 624 | ij_javascript_prefer_explicit_types_function_returns = false 625 | ij_javascript_prefer_explicit_types_vars_fields = false 626 | ij_javascript_prefer_parameters_wrap = false 627 | ij_javascript_reformat_c_style_comments = false 628 | ij_javascript_space_after_colon = true 629 | ij_javascript_space_after_comma = true 630 | ij_javascript_space_after_dots_in_rest_parameter = false 631 | ij_javascript_space_after_generator_mult = true 632 | ij_javascript_space_after_property_colon = true 633 | ij_javascript_space_after_quest = true 634 | ij_javascript_space_after_type_colon = true 635 | ij_javascript_space_after_unary_not = false 636 | ij_javascript_space_before_async_arrow_lparen = true 637 | ij_javascript_space_before_catch_keyword = true 638 | ij_javascript_space_before_catch_left_brace = true 639 | ij_javascript_space_before_catch_parentheses = true 640 | ij_javascript_space_before_class_lbrace = true 641 | ij_javascript_space_before_class_left_brace = true 642 | ij_javascript_space_before_colon = true 643 | ij_javascript_space_before_comma = false 644 | ij_javascript_space_before_do_left_brace = true 645 | ij_javascript_space_before_else_keyword = true 646 | ij_javascript_space_before_else_left_brace = true 647 | ij_javascript_space_before_finally_keyword = true 648 | ij_javascript_space_before_finally_left_brace = true 649 | ij_javascript_space_before_for_left_brace = true 650 | ij_javascript_space_before_for_parentheses = true 651 | ij_javascript_space_before_for_semicolon = false 652 | ij_javascript_space_before_function_left_parenth = true 653 | ij_javascript_space_before_generator_mult = false 654 | ij_javascript_space_before_if_left_brace = true 655 | ij_javascript_space_before_if_parentheses = true 656 | ij_javascript_space_before_method_call_parentheses = false 657 | ij_javascript_space_before_method_left_brace = true 658 | ij_javascript_space_before_method_parentheses = false 659 | ij_javascript_space_before_property_colon = false 660 | ij_javascript_space_before_quest = true 661 | ij_javascript_space_before_switch_left_brace = true 662 | ij_javascript_space_before_switch_parentheses = true 663 | ij_javascript_space_before_try_left_brace = true 664 | ij_javascript_space_before_type_colon = false 665 | ij_javascript_space_before_unary_not = false 666 | ij_javascript_space_before_while_keyword = true 667 | ij_javascript_space_before_while_left_brace = true 668 | ij_javascript_space_before_while_parentheses = true 669 | ij_javascript_spaces_around_additive_operators = true 670 | ij_javascript_spaces_around_arrow_function_operator = true 671 | ij_javascript_spaces_around_assignment_operators = true 672 | ij_javascript_spaces_around_bitwise_operators = true 673 | ij_javascript_spaces_around_equality_operators = true 674 | ij_javascript_spaces_around_logical_operators = true 675 | ij_javascript_spaces_around_multiplicative_operators = true 676 | ij_javascript_spaces_around_relational_operators = true 677 | ij_javascript_spaces_around_shift_operators = true 678 | ij_javascript_spaces_around_unary_operator = false 679 | ij_javascript_spaces_within_array_initializer_brackets = false 680 | ij_javascript_spaces_within_brackets = false 681 | ij_javascript_spaces_within_catch_parentheses = false 682 | ij_javascript_spaces_within_for_parentheses = false 683 | ij_javascript_spaces_within_if_parentheses = false 684 | ij_javascript_spaces_within_imports = false 685 | ij_javascript_spaces_within_interpolation_expressions = false 686 | ij_javascript_spaces_within_method_call_parentheses = false 687 | ij_javascript_spaces_within_method_parentheses = false 688 | ij_javascript_spaces_within_object_literal_braces = false 689 | ij_javascript_spaces_within_object_type_braces = true 690 | ij_javascript_spaces_within_parentheses = false 691 | ij_javascript_spaces_within_switch_parentheses = false 692 | ij_javascript_spaces_within_type_assertion = false 693 | ij_javascript_spaces_within_union_types = true 694 | ij_javascript_spaces_within_while_parentheses = false 695 | ij_javascript_special_else_if_treatment = true 696 | ij_javascript_ternary_operation_signs_on_next_line = true 697 | ij_javascript_ternary_operation_wrap = normal 698 | ij_javascript_union_types_wrap = on_every_item 699 | ij_javascript_use_chained_calls_group_indents = false 700 | ij_javascript_use_double_quotes = true 701 | ij_javascript_use_explicit_js_extension = global 702 | ij_javascript_use_path_mapping = always 703 | ij_javascript_use_public_modifier = false 704 | ij_javascript_use_semicolon_after_statement = true 705 | ij_javascript_var_declaration_wrap = normal 706 | ij_javascript_while_brace_force = always 707 | ij_javascript_while_on_new_line = false 708 | ij_javascript_wrap_comments = false 709 | 710 | [{*.comp, *.frag, *.fsh, *.geom, *.glsl, *.shader, *.tesc, *.tese, *.vert, *.vsh}] 711 | indent_size = 4 712 | tab_width = 4 713 | ij_continuation_indent_size = 8 714 | ij_glsl_keep_indents_on_empty_lines = false 715 | 716 | [{*.gant, *.gradle, *.groovy, *.gy}] 717 | indent_size = 4 718 | tab_width = 4 719 | ij_continuation_indent_size = 8 720 | ij_groovy_align_group_field_declarations = false 721 | ij_groovy_align_multiline_array_initializer_expression = false 722 | ij_groovy_align_multiline_assignment = false 723 | ij_groovy_align_multiline_binary_operation = false 724 | ij_groovy_align_multiline_chained_methods = false 725 | ij_groovy_align_multiline_extends_list = false 726 | ij_groovy_align_multiline_for = true 727 | ij_groovy_align_multiline_list_or_map = true 728 | ij_groovy_align_multiline_method_parentheses = false 729 | ij_groovy_align_multiline_parameters = true 730 | ij_groovy_align_multiline_parameters_in_calls = false 731 | ij_groovy_align_multiline_resources = true 732 | ij_groovy_align_multiline_ternary_operation = false 733 | ij_groovy_align_multiline_throws_list = false 734 | ij_groovy_align_named_args_in_map = true 735 | ij_groovy_align_throws_keyword = false 736 | ij_groovy_array_initializer_new_line_after_left_brace = false 737 | ij_groovy_array_initializer_right_brace_on_new_line = false 738 | ij_groovy_array_initializer_wrap = off 739 | ij_groovy_assert_statement_wrap = off 740 | ij_groovy_assignment_wrap = off 741 | ij_groovy_binary_operation_wrap = off 742 | ij_groovy_blank_lines_after_class_header = 0 743 | ij_groovy_blank_lines_after_imports = 1 744 | ij_groovy_blank_lines_after_package = 1 745 | ij_groovy_blank_lines_around_class = 1 746 | ij_groovy_blank_lines_around_field = 0 747 | ij_groovy_blank_lines_around_field_in_interface = 0 748 | ij_groovy_blank_lines_around_method = 1 749 | ij_groovy_blank_lines_around_method_in_interface = 1 750 | ij_groovy_blank_lines_before_imports = 1 751 | ij_groovy_blank_lines_before_method_body = 0 752 | ij_groovy_blank_lines_before_package = 0 753 | ij_groovy_block_brace_style = end_of_line 754 | ij_groovy_block_comment_at_first_column = true 755 | ij_groovy_call_parameters_new_line_after_left_paren = false 756 | ij_groovy_call_parameters_right_paren_on_new_line = false 757 | ij_groovy_call_parameters_wrap = off 758 | ij_groovy_catch_on_new_line = false 759 | ij_groovy_class_annotation_wrap = split_into_lines 760 | ij_groovy_class_brace_style = end_of_line 761 | ij_groovy_class_count_to_use_import_on_demand = 5 762 | ij_groovy_do_while_brace_force = never 763 | ij_groovy_else_on_new_line = false 764 | ij_groovy_enum_constants_wrap = off 765 | ij_groovy_extends_keyword_wrap = off 766 | ij_groovy_extends_list_wrap = off 767 | ij_groovy_field_annotation_wrap = split_into_lines 768 | ij_groovy_finally_on_new_line = false 769 | ij_groovy_for_brace_force = never 770 | ij_groovy_for_statement_new_line_after_left_paren = false 771 | ij_groovy_for_statement_right_paren_on_new_line = false 772 | ij_groovy_for_statement_wrap = off 773 | ij_groovy_if_brace_force = never 774 | ij_groovy_import_annotation_wrap = 2 775 | ij_groovy_imports_layout = *, |, javax.**, java.**, |, $* 776 | ij_groovy_indent_case_from_switch = true 777 | ij_groovy_indent_label_blocks = true 778 | ij_groovy_insert_inner_class_imports = false 779 | ij_groovy_keep_blank_lines_before_right_brace = 2 780 | ij_groovy_keep_blank_lines_in_code = 2 781 | ij_groovy_keep_blank_lines_in_declarations = 2 782 | ij_groovy_keep_control_statement_in_one_line = true 783 | ij_groovy_keep_first_column_comment = true 784 | ij_groovy_keep_indents_on_empty_lines = false 785 | ij_groovy_keep_line_breaks = true 786 | ij_groovy_keep_multiple_expressions_in_one_line = false 787 | ij_groovy_keep_simple_blocks_in_one_line = false 788 | ij_groovy_keep_simple_classes_in_one_line = true 789 | ij_groovy_keep_simple_lambdas_in_one_line = true 790 | ij_groovy_keep_simple_methods_in_one_line = true 791 | ij_groovy_label_indent_absolute = false 792 | ij_groovy_label_indent_size = 0 793 | ij_groovy_lambda_brace_style = end_of_line 794 | ij_groovy_layout_static_imports_separately = true 795 | ij_groovy_line_comment_add_space = false 796 | ij_groovy_line_comment_at_first_column = true 797 | ij_groovy_method_annotation_wrap = split_into_lines 798 | ij_groovy_method_brace_style = end_of_line 799 | ij_groovy_method_call_chain_wrap = off 800 | ij_groovy_method_parameters_new_line_after_left_paren = false 801 | ij_groovy_method_parameters_right_paren_on_new_line = false 802 | ij_groovy_method_parameters_wrap = off 803 | ij_groovy_modifier_list_wrap = false 804 | ij_groovy_names_count_to_use_import_on_demand = 3 805 | ij_groovy_parameter_annotation_wrap = off 806 | ij_groovy_parentheses_expression_new_line_after_left_paren = false 807 | ij_groovy_parentheses_expression_right_paren_on_new_line = false 808 | ij_groovy_prefer_parameters_wrap = false 809 | ij_groovy_resource_list_new_line_after_left_paren = false 810 | ij_groovy_resource_list_right_paren_on_new_line = false 811 | ij_groovy_resource_list_wrap = off 812 | ij_groovy_space_after_assert_separator = true 813 | ij_groovy_space_after_colon = true 814 | ij_groovy_space_after_comma = true 815 | ij_groovy_space_after_comma_in_type_arguments = true 816 | ij_groovy_space_after_for_semicolon = true 817 | ij_groovy_space_after_quest = true 818 | ij_groovy_space_after_type_cast = true 819 | ij_groovy_space_before_annotation_parameter_list = false 820 | ij_groovy_space_before_array_initializer_left_brace = false 821 | ij_groovy_space_before_assert_separator = false 822 | ij_groovy_space_before_catch_keyword = true 823 | ij_groovy_space_before_catch_left_brace = true 824 | ij_groovy_space_before_catch_parentheses = true 825 | ij_groovy_space_before_class_left_brace = true 826 | ij_groovy_space_before_closure_left_brace = true 827 | ij_groovy_space_before_colon = true 828 | ij_groovy_space_before_comma = false 829 | ij_groovy_space_before_do_left_brace = true 830 | ij_groovy_space_before_else_keyword = true 831 | ij_groovy_space_before_else_left_brace = true 832 | ij_groovy_space_before_finally_keyword = true 833 | ij_groovy_space_before_finally_left_brace = true 834 | ij_groovy_space_before_for_left_brace = true 835 | ij_groovy_space_before_for_parentheses = true 836 | ij_groovy_space_before_for_semicolon = false 837 | ij_groovy_space_before_if_left_brace = true 838 | ij_groovy_space_before_if_parentheses = true 839 | ij_groovy_space_before_method_call_parentheses = false 840 | ij_groovy_space_before_method_left_brace = true 841 | ij_groovy_space_before_method_parentheses = false 842 | ij_groovy_space_before_quest = true 843 | ij_groovy_space_before_switch_left_brace = true 844 | ij_groovy_space_before_switch_parentheses = true 845 | ij_groovy_space_before_synchronized_left_brace = true 846 | ij_groovy_space_before_synchronized_parentheses = true 847 | ij_groovy_space_before_try_left_brace = true 848 | ij_groovy_space_before_try_parentheses = true 849 | ij_groovy_space_before_while_keyword = true 850 | ij_groovy_space_before_while_left_brace = true 851 | ij_groovy_space_before_while_parentheses = true 852 | ij_groovy_space_in_named_argument = true 853 | ij_groovy_space_in_named_argument_before_colon = false 854 | ij_groovy_space_within_empty_array_initializer_braces = false 855 | ij_groovy_space_within_empty_method_call_parentheses = false 856 | ij_groovy_spaces_around_additive_operators = true 857 | ij_groovy_spaces_around_assignment_operators = true 858 | ij_groovy_spaces_around_bitwise_operators = true 859 | ij_groovy_spaces_around_equality_operators = true 860 | ij_groovy_spaces_around_lambda_arrow = true 861 | ij_groovy_spaces_around_logical_operators = true 862 | ij_groovy_spaces_around_multiplicative_operators = true 863 | ij_groovy_spaces_around_regex_operators = true 864 | ij_groovy_spaces_around_relational_operators = true 865 | ij_groovy_spaces_around_shift_operators = true 866 | ij_groovy_spaces_within_annotation_parentheses = false 867 | ij_groovy_spaces_within_array_initializer_braces = false 868 | ij_groovy_spaces_within_braces = true 869 | ij_groovy_spaces_within_brackets = false 870 | ij_groovy_spaces_within_cast_parentheses = false 871 | ij_groovy_spaces_within_catch_parentheses = false 872 | ij_groovy_spaces_within_for_parentheses = false 873 | ij_groovy_spaces_within_gstring_injection_braces = false 874 | ij_groovy_spaces_within_if_parentheses = false 875 | ij_groovy_spaces_within_list_or_map = false 876 | ij_groovy_spaces_within_method_call_parentheses = false 877 | ij_groovy_spaces_within_method_parentheses = false 878 | ij_groovy_spaces_within_parentheses = false 879 | ij_groovy_spaces_within_switch_parentheses = false 880 | ij_groovy_spaces_within_synchronized_parentheses = false 881 | ij_groovy_spaces_within_try_parentheses = false 882 | ij_groovy_spaces_within_tuple_expression = false 883 | ij_groovy_spaces_within_while_parentheses = false 884 | ij_groovy_special_else_if_treatment = true 885 | ij_groovy_ternary_operation_wrap = off 886 | ij_groovy_throws_keyword_wrap = off 887 | ij_groovy_throws_list_wrap = off 888 | ij_groovy_use_flying_geese_braces = false 889 | ij_groovy_use_fq_class_names = false 890 | ij_groovy_use_fq_class_names_in_javadoc = true 891 | ij_groovy_use_relative_indents = false 892 | ij_groovy_use_single_class_imports = true 893 | ij_groovy_variable_annotation_wrap = off 894 | ij_groovy_while_brace_force = never 895 | ij_groovy_while_on_new_line = false 896 | ij_groovy_wrap_long_lines = false 897 | 898 | [{*.gradle.kts, *.kt, *.kts, *.main.kts}] 899 | indent_size = 4 900 | tab_width = 4 901 | ij_continuation_indent_size = 8 902 | ij_kotlin_align_in_columns_case_branch = false 903 | ij_kotlin_align_multiline_binary_operation = false 904 | ij_kotlin_align_multiline_extends_list = false 905 | ij_kotlin_align_multiline_method_parentheses = false 906 | ij_kotlin_align_multiline_parameters = true 907 | ij_kotlin_align_multiline_parameters_in_calls = false 908 | ij_kotlin_allow_trailing_comma = false 909 | ij_kotlin_allow_trailing_comma_on_call_site = false 910 | ij_kotlin_assignment_wrap = off 911 | ij_kotlin_blank_lines_after_class_header = 0 912 | ij_kotlin_blank_lines_around_block_when_branches = 0 913 | ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1 914 | ij_kotlin_block_comment_at_first_column = true 915 | ij_kotlin_call_parameters_new_line_after_left_paren = false 916 | ij_kotlin_call_parameters_right_paren_on_new_line = false 917 | ij_kotlin_call_parameters_wrap = off 918 | ij_kotlin_catch_on_new_line = false 919 | ij_kotlin_class_annotation_wrap = split_into_lines 920 | ij_kotlin_continuation_indent_for_chained_calls = true 921 | ij_kotlin_continuation_indent_for_expression_bodies = true 922 | ij_kotlin_continuation_indent_in_argument_lists = true 923 | ij_kotlin_continuation_indent_in_elvis = true 924 | ij_kotlin_continuation_indent_in_if_conditions = true 925 | ij_kotlin_continuation_indent_in_parameter_lists = true 926 | ij_kotlin_continuation_indent_in_supertype_lists = true 927 | ij_kotlin_else_on_new_line = false 928 | ij_kotlin_enum_constants_wrap = off 929 | ij_kotlin_extends_list_wrap = off 930 | ij_kotlin_field_annotation_wrap = split_into_lines 931 | ij_kotlin_finally_on_new_line = false 932 | ij_kotlin_if_rparen_on_new_line = false 933 | ij_kotlin_import_nested_classes = false 934 | ij_kotlin_imports_layout = *, java.**, javax.**, kotlin.**, ^ 935 | ij_kotlin_insert_whitespaces_in_simple_one_line_method = true 936 | ij_kotlin_keep_blank_lines_before_right_brace = 2 937 | ij_kotlin_keep_blank_lines_in_code = 2 938 | ij_kotlin_keep_blank_lines_in_declarations = 2 939 | ij_kotlin_keep_first_column_comment = true 940 | ij_kotlin_keep_indents_on_empty_lines = false 941 | ij_kotlin_keep_line_breaks = true 942 | ij_kotlin_lbrace_on_next_line = false 943 | ij_kotlin_line_comment_add_space = false 944 | ij_kotlin_line_comment_at_first_column = true 945 | ij_kotlin_method_annotation_wrap = split_into_lines 946 | ij_kotlin_method_call_chain_wrap = off 947 | ij_kotlin_method_parameters_new_line_after_left_paren = false 948 | ij_kotlin_method_parameters_right_paren_on_new_line = false 949 | ij_kotlin_method_parameters_wrap = off 950 | ij_kotlin_name_count_to_use_star_import = 5 951 | ij_kotlin_name_count_to_use_star_import_for_members = 3 952 | ij_kotlin_packages_to_use_import_on_demand = java.util.*, kotlinx.android.synthetic.**, io.ktor.** 953 | ij_kotlin_parameter_annotation_wrap = off 954 | ij_kotlin_space_after_comma = true 955 | ij_kotlin_space_after_extend_colon = true 956 | ij_kotlin_space_after_type_colon = true 957 | ij_kotlin_space_before_catch_parentheses = true 958 | ij_kotlin_space_before_comma = false 959 | ij_kotlin_space_before_extend_colon = true 960 | ij_kotlin_space_before_for_parentheses = true 961 | ij_kotlin_space_before_if_parentheses = true 962 | ij_kotlin_space_before_lambda_arrow = true 963 | ij_kotlin_space_before_type_colon = false 964 | ij_kotlin_space_before_when_parentheses = true 965 | ij_kotlin_space_before_while_parentheses = true 966 | ij_kotlin_spaces_around_additive_operators = true 967 | ij_kotlin_spaces_around_assignment_operators = true 968 | ij_kotlin_spaces_around_equality_operators = true 969 | ij_kotlin_spaces_around_function_type_arrow = true 970 | ij_kotlin_spaces_around_logical_operators = true 971 | ij_kotlin_spaces_around_multiplicative_operators = true 972 | ij_kotlin_spaces_around_range = false 973 | ij_kotlin_spaces_around_relational_operators = true 974 | ij_kotlin_spaces_around_unary_operator = false 975 | ij_kotlin_spaces_around_when_arrow = true 976 | ij_kotlin_variable_annotation_wrap = off 977 | ij_kotlin_while_on_new_line = false 978 | ij_kotlin_wrap_elvis_expressions = 1 979 | ij_kotlin_wrap_expression_body_functions = 0 980 | ij_kotlin_wrap_first_method_in_call_chain = false 981 | 982 | [{*.har, *.jsb2, *.jsb3, *.json, .babelrc, .eslintrc, .stylelintrc, bowerrc, jest.config, mcmod.info}] 983 | ij_json_keep_blank_lines_in_code = 0 984 | ij_json_keep_indents_on_empty_lines = false 985 | ij_json_keep_line_breaks = true 986 | ij_json_space_after_colon = true 987 | ij_json_space_after_comma = true 988 | ij_json_space_before_colon = true 989 | ij_json_space_before_comma = false 990 | ij_json_spaces_within_braces = false 991 | ij_json_spaces_within_brackets = false 992 | ij_json_wrap_long_lines = false 993 | 994 | [{*.htm, *.html, *.sht, *.shtm, *.shtml}] 995 | ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3 996 | ij_html_align_attributes = true 997 | ij_html_align_text = false 998 | ij_html_attribute_wrap = normal 999 | ij_html_block_comment_at_first_column = true 1000 | ij_html_do_not_align_children_of_min_lines = 0 1001 | ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p 1002 | ij_html_do_not_indent_children_of_tags = html, body, thead, tbody, tfoot 1003 | ij_html_enforce_quotes = false 1004 | ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var 1005 | ij_html_keep_blank_lines = 2 1006 | ij_html_keep_indents_on_empty_lines = false 1007 | ij_html_keep_line_breaks = true 1008 | ij_html_keep_line_breaks_in_text = true 1009 | ij_html_keep_whitespaces = false 1010 | ij_html_keep_whitespaces_inside = span, pre, textarea 1011 | ij_html_line_comment_at_first_column = true 1012 | ij_html_new_line_after_last_attribute = never 1013 | ij_html_new_line_before_first_attribute = never 1014 | ij_html_quote_style = double 1015 | ij_html_remove_new_line_before_tags = br 1016 | ij_html_space_after_tag_name = false 1017 | ij_html_space_around_equality_in_attribute = false 1018 | ij_html_space_inside_empty_tag = false 1019 | ij_html_text_wrap = normal 1020 | ij_html_uniform_ident = false 1021 | 1022 | [{*.markdown, *.md}] 1023 | indent_size = 4 1024 | tab_width = 4 1025 | ij_continuation_indent_size = 8 1026 | ij_markdown_force_one_space_after_blockquote_symbol = true 1027 | ij_markdown_force_one_space_after_header_symbol = true 1028 | ij_markdown_force_one_space_after_list_bullet = true 1029 | ij_markdown_force_one_space_between_words = true 1030 | ij_markdown_keep_indents_on_empty_lines = false 1031 | ij_markdown_max_lines_around_block_elements = 1 1032 | ij_markdown_max_lines_around_header = 1 1033 | ij_markdown_max_lines_between_paragraphs = 1 1034 | ij_markdown_min_lines_around_block_elements = 1 1035 | ij_markdown_min_lines_around_header = 1 1036 | ij_markdown_min_lines_between_paragraphs = 1 1037 | 1038 | [{*.yaml, *.yml}] 1039 | ij_yaml_keep_indents_on_empty_lines = false 1040 | ij_yaml_keep_line_breaks = true 1041 | ij_yaml_space_before_colon = true 1042 | ij_yaml_spaces_within_braces = true 1043 | ij_yaml_spaces_within_brackets = true --------------------------------------------------------------------------------