Coder Social home page Coder Social logo

anvilpowered / anvil Goto Github PK

View Code? Open in Web Editor NEW
55.0 4.0 12.0 3.22 MB

Cloud-ready multiplatform minecraft development framework

License: GNU Affero General Public License v3.0

Kotlin 100.00%
minecraft api database sponge velocity docker docker-compose kubernetes paper papermc

anvil's Introduction

Anvil

Discord TeamCity Full Build Status GitHub Maven

CI (Release candidate jars)

Anvil is a mineraft plugin api that aims to help developers create structured cross-platform plugins. Included is an entity framework and many services that abstract platform-specific actions so that they can be used in common code.

Anvil is not only cross-platform in the context of plugin platforms, but also in the context of databases. Currently, MongoDB and Xodus are supported, with SQL on the way. With Anvil, you can write a central abstract set of logic that applies to several database types.

Quick start

repositories {
   mavenCentral();
}
dependencies {
    implementation 'org.anvilpowered:anvil-api:0.1'
}

anvil's People

Contributors

alexstaeding avatar jacoballen1 avatar mikroskeem avatar renovate[bot] avatar tgwaffles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

anvil's Issues

Add styles to TextService

The TextService currently only supports colors; it's missing styles. The following need to be added:

  • Bold
  • Italic
  • Obfuscated
  • Strikethrough
  • Underline

IllegalArgumentException on Velocity 3.0.0 - Anvil v0.3.0

[01:30:09 INFO]: Velocity 3.0.0
[01:30:09 INFO]: Copyright 2018-2021 Velocity Contributors. Velocity is licensed under the terms of the GNU General Public License v3.
[01:30:09 INFO]: velocitypowered.com - GitHub

[01:27:50 ERROR]: Couldn't pass ProxyInitializeEvent to anvil java.lang.IllegalArgumentException: org.anvilpowered.anvil.velocity.command.VelocityCommandService$WrapperCommand@44401807 does not implement a registrable Command subinterface at com.velocitypowered.proxy.command.VelocityCommandManager.register(VelocityCommandManager.java:113) ~[velocity-3.0.0.jar:3.0.0] at com.velocitypowered.api.command.CommandManager.register(CommandManager.java:47) ~[velocity-3.0.0.jar:3.0.0] at org.anvilpowered.anvil.velocity.command.VelocityAnvilCommandNode.loadCommands(VelocityAnvilCommandNode.java:74) ~[?:?] at org.anvilpowered.anvil.common.command.CommonAnvilCommandNode.lambda$new$0(CommonAnvilCommandNode.java:83) ~[?:?] at org.anvilpowered.anvil.base.registry.BaseRegistry.lambda$null$1(BaseRegistry.java:213) ~[?:?] at java.util.HashMap.forEach(Unknown Source) ~[?:?] at org.anvilpowered.anvil.base.registry.BaseRegistry.lambda$loadOrdinal$2(BaseRegistry.java:211) ~[?:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) ~[?:?] at java.util.stream.SortedOps$SizedRefSortingSink.end(Unknown Source) ~[?:?] at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) ~[?:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) ~[?:?] at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?] at java.util.stream.ReferencePipeline.forEach(Unknown Source) ~[?:?] at org.anvilpowered.anvil.base.registry.BaseRegistry.loadOrdinal(BaseRegistry.java:211) ~[?:?] at org.anvilpowered.anvil.base.registry.BaseRegistry.load(BaseRegistry.java:205) ~[?:?] at org.anvilpowered.anvil.base.registry.BaseExtendedRegistry.load(BaseExtendedRegistry.java:54) ~[?:?] at org.anvilpowered.anvil.api.EnvironmentBuilderImpl.completeInitialization(EnvironmentBuilderImpl.java:148) ~[?:?] at org.anvilpowered.anvil.velocity.AnvilVelocity.onInit(AnvilVelocity.java:56) ~[?:?] at org.anvilpowered.anvil.velocity.Lmbda$1.execute(Unknown Source) ~[?:?] at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity-3.0.0.jar:3.0.0] at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:587) ~[velocity-3.0.0.jar:3.0.0] at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$6(VelocityEventManager.java:468) ~[velocity-3.0.0.jar:3.0.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?] at java.lang.Thread.run(Unknown Source) [?:?]

Potentially swallowed exceptions due to use of CompletableFuture

Someone was asking me about Anvil and I saw in the code that exceptions in CompletableFutures are sometimes swallowed. Sadly CompletableFuture's design makes it very easy to accidentally swallow exceptions, so it is an honest mistake that many have made, including myself.

However, the extent of this problem in the AnvilPowered codebase is generally high. I post this issue here on behalf of not only Anvil but also Catalyst, for the same problem exists in both repositories. I've only found one case of it in Anvil, but many in Catalyst, though my search was limited. If it is all pleasing to you for organizational purposes, do feel free to open an issue on the Catalyst repository, and close this one.

Here is an example of what I mean:

https://github.com/AnvilPowered/Anvil/blob/3a6b899ae980d29816d69b3fe4d214e5a27910ab/anvil-common/src/main/java/org/anvilpowered/anvil/common/messaging/CommonRedisService.java#L80-L81

The problem here is that we have a CompletableFuture which is not awaited, not returned, and has no dependent actions. Therefore, nothing will uncover an exception arising inside the async execution.

As the following sample code shows, the exception will be swallowed and the code after the exception will not run:

		java.util.concurrent.CompletableFuture.runAsync(() -> {
			System.out.println("Pre throw");
			throw new RuntimeException();
		}).thenRun(() -> {
			System.out.println("Post throw"); // Will never run
		});

I do urge that you heed the possibility of hidden exceptions in CompletableFuture-utilizing code to the same extent that you recognize the issue of swallowed exceptions in imperative code. It will hamper maintainability by making debugging difficult.

Fixing this problem will take some time; it will require the addition of exceptionally blocks everywhere, as has been done in other cases. Here is an example: PaperMC/Velocity#376

Addendum

Additionally, I need to apologize for a comment made by another user to one of your previous issues, "bruh". The comment was made to my displeasure, but on account of my own incitation, regarding a discussion in which I did not correctly convey my opinion regarding a matter. The comment is entirely unwarranted, and in no way did I suggest to the user making the comment, that they should do so. Nevertheless I take some measure of responsibility for it (thought not full responsibility, since it was not my comment) having myself discussed the content of that same issue with a tone implying some note of antagonism. I hope you can overlook this lack of foresight on my part that I did not imagine another user would exhibit such lack of respect to the Anvil developers with a comment like "bruh".

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


Warning

Renovate failed to look up the following dependencies: Failed to look up maven package org.jetbrains.teamcity:configs-dsl-kotlin-parent, Failed to look up maven package org.jetbrains.teamcity:configs-dsl-kotlin-plugins-latest.

Files affected: .teamcity/pom.xml


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
app/plugin/build.gradle.kts
app/plugin/core/build.gradle.kts
app/plugin/paper/build.gradle.kts
app/plugin/sponge/build.gradle.kts
app/plugin/velocity/build.gradle.kts
build-logic/settings.gradle.kts
build-logic/build.gradle.kts
build-logic/src/main/kotlin/anvil-publish.gradle.kts
build-logic/src/main/kotlin/anvil-sign.gradle.kts
core/build.gradle.kts
gradle/libs.versions.toml
  • net.kyori:adventure-bom 4.17.0
  • org.jetbrains:annotations 24.1.0
  • com.mojang:brigadier 1.0.18
  • org.spongepowered:configurate-core 4.2.0-SNAPSHOT
  • org.spongepowered:configurate-hocon 4.2.0-SNAPSHOT
  • org.spongepowered:configurate-yaml 4.2.0-SNAPSHOT
  • org.spongepowered:configurate-extra-kotlin 4.2.0-SNAPSHOT
  • org.anvilpowered:kbrig-brigadier 0.2.0-SNAPSHOT
  • io.insert-koin:koin-core 3.5.6
  • io.kotest:kotest-runner-junit5-jvm 5.8.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.8.1
  • org.jetbrains.kotlinx:kotlinx-serialization-json 1.6.2
  • org.apache.logging.log4j:log4j-api 2.23.0
  • org.apache.logging.log4j:log4j-core 2.23.0
  • io.papermc.paper:paper-api 1.20.6-R0.1-SNAPSHOT
  • org.spongepowered:spongeapi 8.2.0
  • com.velocitypowered:velocity-api 3.2.0-SNAPSHOT
  • org.jetbrains.kotlin.kapt 2.0.0
  • org.jetbrains.kotlin.jvm 2.0.0
  • org.jetbrains.kotlin.plugin.serialization 2.0.0
  • org.jlleitschuh.gradle.ktlint 11.6.1
  • net.minecrell.plugin-yml.paper 0.6.0
  • io.github.goooler.shadow 8.1.7
  • org.spongepowered.gradle.plugin 2.2.0
paper/build.gradle.kts
sponge/build.gradle.kts
velocity/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7
maven
.teamcity/pom.xml
  • org.jetbrains.teamcity:configs-dsl-kotlin-parent 1.0-SNAPSHOT
  • org.jetbrains.teamcity:configs-dsl-kotlin-plugins-latest 1.0-SNAPSHOT

  • Check this box to trigger a request for Renovate to run again on this repository

Anvil command conflicts with common nucleus:anvil

When using the plugin, /anvil overrides the commonly used /anvil in nucleus, could we have an option to change the command, or maybe change it to /anvilpowered or even just allowing it to be changed to anything in the config should be fine

Couldn't pass ProxyInitializeEvent to anvil

This error is displayed in console upon booting up Velocity (3.0.0):

[18:43:07 ERROR]: Couldn't pass ProxyInitializeEvent to anvil
java.lang.IllegalArgumentException: org.anvilpowered.anvil.velocity.command.VelocityCommandService$WrapperCommand@35a6504 does not implement a registrable Command subinterface
at com.velocitypowered.proxy.command.VelocityCommandManager.register(VelocityCommandManager.java:113) ~[velocity.jar:3.0.1-SNAPSHOT (git-f79736b8-b42)]
at com.velocitypowered.api.command.CommandManager.register(CommandManager.java:47) ~[velocity.jar:3.0.1-SNAPSHOT (git-f79736b8-b42)]
at org.anvilpowered.anvil.velocity.command.VelocityAnvilCommandNode.loadCommands(VelocityAnvilCommandNode.java:74) ~[?:?]
at org.anvilpowered.anvil.common.command.CommonAnvilCommandNode.lambda$new$0(CommonAnvilCommandNode.java:83) ~[?:?]
at org.anvilpowered.anvil.base.registry.BaseRegistry.lambda$null$1(BaseRegistry.java:213) ~[?:?]
at java.util.HashMap.forEach(HashMap.java:1425) ~[?:?]
at org.anvilpowered.anvil.base.registry.BaseRegistry.lambda$loadOrdinal$2(BaseRegistry.java:211) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
at org.anvilpowered.anvil.base.registry.BaseRegistry.loadOrdinal(BaseRegistry.java:211) ~[?:?]
at org.anvilpowered.anvil.base.registry.BaseRegistry.load(BaseRegistry.java:205) ~[?:?]
at org.anvilpowered.anvil.base.registry.BaseExtendedRegistry.load(BaseExtendedRegistry.java:54) ~[?:?]
at org.anvilpowered.anvil.api.EnvironmentBuilderImpl.completeInitialization(EnvironmentBuilderImpl.java:148) ~[?:?]
at org.anvilpowered.anvil.velocity.AnvilVelocity.onInit(AnvilVelocity.java:56) ~[?:?]
at org.anvilpowered.anvil.velocity.Lmbda$1.execute(Unknown Source) ~[?:?]
at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity.jar:3.0.1-SNAPSHOT (git-f79736b8-b42)]
at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:589) ~[velocity.jar:3.0.1-SNAPSHOT (git-f79736b8-b42)]
at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$6(VelocityEventManager.java:470) ~[velocity.jar:3.0.1-SNAPSHOT (git-f79736b8-b42)]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
at java.lang.Thread.run(Thread.java:831) [?:?]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.