Coder Social home page Coder Social logo

chameleonframework / chameleon Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 7.0 2.54 MB

Cross-platform Minecraft plugin framework

License: MIT License

Java 99.79% Shell 0.21%
bukkit chameleon cross-platform framework hacktoberfest java minecraft minecraft-framework spigot sponge velocity

chameleon's People

Contributors

dependabot[bot] avatar gayatriagarwal19 avatar joshuasing avatar loofifteen avatar renovate-bot avatar renovate[bot] avatar theserumdev 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chameleon's Issues

null parameter passed into NotNull method

The proxy switch event in the Velocity support passes null into the #wrap method, which requires it to be not null.

Possible fix is to allow nullable servers to be passed into the event.

wrap(event.getPreviousServer().orElse(null)),
wrap(event.getPlayer().getCurrentServer().map(ServerConnection::getServer).orElse(null))

Forge support

A Forge implementation of Chameleon would be nice to have.

UserConnectEvent cannot be cancelled

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

When canceling the UserConnectEvent, with orn without a reason, the user is not being kicked.

(Also i saw that the implementation of minestom, the events, are using EventBuilder#ignoredIfCancelled(false);, which devers the purpose of the EventSubscriber#acceptCancelled(true) )

Expected behaviour

Kicked/Denied the connection/player with a reason.

Reproduction steps

public class PlayerLoginEvent implements EventSubscriber<UserConnectEvent> {

   public PlayerLoginEvent(ChameleonPlugin pl) {
      pl.getChameleon().getEventbus().subscribe(this);
   }

   public void on(UserConnectEvent event) throws Exception {
       event.cancel(true);
   }

   @Override
   public boolean acceptCancelled() {
    //Gets ingored in the Minestom Impl
    return true;
   }
}

Exception

There is no exception.

Environment

Operating System: Windows 11 & Windows 10
Platform(s): Minestom (Latest Release)

Additional information

None

Improved platform plugin class generation

Confirmation

  • I have checked for similar issues.

Problem

The current chameleon-annotations module has a lot of problems, however the major ones are:

  • Hard to maintain due to complexity
  • Easy for the user to misuse
  • Lacks features

Suggested solution

It would be helpful if we could completely revamp the chameleon-annotations module to:

  • Use templates (makes everything less complex)
  • Allow customisation (packages, etc.)
  • Validate everything
  • Extension support (perhaps just add extension support to plugin bootstraps?)
  • Tests. Lots of tests. (100% test coverage if possible)

Additional information

No response

Extensions v2

Confirmation

  • I have checked for similar issues.

Problem

The current design of Chameleon extensions is rather over complicated, hard to work with, and has many features overlooked.

Suggested solution

It would be helpful to replace the current Extension system with a new one, that is thoroughly tested and easier to implement.

Additional information

No response

Remove support for Minestom (chameleon-platform-minestom)

Confirmation

  • I have checked for similar issues.

Problem

Due to its artifact management, Minestom has been a pain to upkeep. In addition to this, it is very unlikely that someone is to use Chameleon for a Minestom extension - especially with the recent move to minestom-ce, which doesn't have extensions.

Suggested solution

We should remove Minestom support altogether as it is unlikely to be used and no longer matches the purpose of Chameleon.

Additional information

No response

Move Platform API into a separate module (`platform-api`)

Confirmation

  • I have checked for similar issues.

Problem

The dev.hypera.chameleon.platform package in the api module currently contains a few classes for platform implementations (e.g. PlatformChameleon). In the future, other features will require more abstract classes and interfaces for Platforms to use (e.g. #216), making this package quite large.

Suggested solution

I think it would be helpful if we added a separate platform-api module to Chameleon.
This module would contain APIs specifically used by platform implementations, and not needed by end-users (although potentially accessible).

This module could also allow us to make implementing Chameleon platforms easier as we could share more code between platforms without making the main module too large.

Additional information

I would highly appreciate any feedback on this idea

Blossom causes build failures on Gradle 8.2+

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

An exception occurred applying plugin request [id: 'net.kyori.blossom']
> Failed to apply plugin 'net.kyori.blossom'.
   > The plugin in class class net.kyori.blossom.Blossom has not been updatedto override the non-Convention apply method in ProjectPlugin!

Expected behaviour

Blossom should work as expected.

Reproduction steps

N/A

Exception

N/A

Environment

N/A

Additional information

A pull request was merged to resolve this issue: KyoriPowered/blossom#22
However a release has not been made since this pull request was merged

Migrate Adventure mappers to MethodHandles

Confirmation

  • I have checked for similar issues.

Problem

The Adventure mappers currently use Reflection to invoke "platform Adventure" methods.
Reflection is known to be slow, and this can have an impact on performance on platforms where this is required.

Suggested solution

MethodHandles provide an alternative way to invoke methods, whilst being faster than Reflection. However, they are a little bit more complicated and harder to use than Reflection. Additionally, MethodHandles are typed.

If done correctly, I believe moving to MethodHandles would greatly improve the performance of the Adventure mappers, and may allow us to improve the mappers at the same time. Additionally, given MethodHandles are typed, we may be able to catch more issues at compile-time.

Additional information

No response

Mocked Chameleon and more unit testing

It would be helpful to have a mock Chameleon implementation for use in tests.
This would also allow us to write unit tests for Chameleon which would be extremely helpful in the long term.

Metadata System

Confirmation

  • I have checked for similar issues.

Problem

void myMethod(User user) {
    MyUser myUser = userService.getUser(user.getId()); 
    Group group = groupService.getGroup(myUser.getId());
    // todo something with group
}

The current implementation of the framework requires multiple service calls to retrieve a user's group information, which can be inefficient and result in unnecessary database queries..

Suggested solution

I suggest implementing a metadata system that allows developers to attach custom metadata to a user object, which can be retrieved in a single service call. This would allow for more efficient and streamlined access to user group information.

Code after the sugestion:

public static final MetadataKey<Integer> USER_ID = MetadataKey.of("user_id", Integer.class);

void myMethod(User user) {
    Group group = groupService.getGroup(user.getMetadata(USER_ID));
    // todo something with group
}

Additional information

The suggested metadata system could be implemented using a key-value store, similar to the example provided in the code snippet.

`PlatformPlugin#getDataFolder()` should be renamed to `#getDataDirectory()` to align with Chameleon

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

Chameleon#getDataFolder() was renamed to #getDataDirectory() to align with the majority of platforms.
PlatformPlugin was missed in this change, and still contains the method #getDataFolder().

Expected behaviour

PlatformPlugin#getDataDirectory()

Reproduction steps

N/A

Exception

N/A

Environment

N/A

Additional information

No response

Releases are not published to Hypera's maven repository

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

Gradle is only publishing releases to Maven Central, and is not publishing them to https://repo.hypera.dev/releases/.

Expected behaviour

Gradle should have published to both repositories.

Reproduction steps

`./gradlew publish closeAndReleaseSonatypeStagingRepository`
Release action logs: https://github.com/ChameleonFramework/Chameleon/actions/runs/6161985517/job/16722475885

Exception

N/A

Environment

N/A

Additional information

No response

Add `ChameleonPluginBootstrap` to allow users to provide custom plugin creation logic

Confirmation

  • I have checked for similar issues.

Problem

Chameleon currently creates a new instance of the ChameleonPlugin class via reflection.
This does not allow for any custom creation logic, and could cause instantiation issues to go undetected until runtime.

Suggested solution

We could add a ChameleonPluginBootstrap interface that could be used instead of providing a ChameleonPlugin class.
Paper provides a similar functionality: https://docs.papermc.io/paper/dev/getting-started/paper-plugins#bootstrapper

Additional information

No response

Update to Gradle 8

Confirmation

  • I have checked for similar issues.

Problem

Gradle has started releasing release candidates for v8.

Suggested solution

When a stable Gradle 8 release is made, we should update the project to build with it.

Gradle 8 removes a lot of deprecated features, however when testing Chameleon with Gradle 8, only one change needs to be made to have the project build successfully.

Additional information

No response

Bukkit schedulers do not work on Folia

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

When using the Bukkit scheduler on Folia, an UnsupportedOperationException is thrown.

Expected behaviour

Scheduled a task without throwing.

Reproduction steps

Use the Bukkit Scheduler

Exception

java.lang.UnsupportedOperationException: null
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.handle(CraftScheduler.java:536) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskTimerAsynchronously(CraftScheduler.java:260) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskTimerAsynchronously(CraftScheduler.java:247) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskLaterAsynchronously(CraftScheduler.java:192) ~[folia-1.19.4.jar:git-Folia-"5b74945"]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskAsynchronously(CraftScheduler.java:161) ~[folia-1.19.4.jar:git-Folia-"5b74945"]

Environment

Operating System: Windows 10
Platform(s): git-Folia-"5b74945" (MC: 1.19.4)

Additional information

No response

Build and test with Java 21

Confirmation

  • I have checked for similar issues.

Problem

We currently build and test Chameleon with Java 11 and 17.

Suggested solution

Java 21 is the latest released LTS, so we should be testing with it.
However, currently Kotlin does not support Java 21 (therefore nor does Gradle).

As soon as Kotlin and Gradle fully support Java 21:

  • Update gradle.yml, release.yml and snapshot.yml to use Java 21
  • Update chameleon.base.gradle.kts to test with Java 21 (This can be done before Gradle supports running with Java 21)

Additional information

No response

Advanced Command System

A more advanced command system should be put in place that allows for less checks to be done inside the command. Some of these ideas include:

  • Proxy only commands
  • Server only commands
  • Brigadier support

Fabric support

A Fabric implementation of Chameleon would be nice to have.

Better tab completion

Our current implementation of tab completion works, however there are better ways of handling it that should be considered.

Chameleon example doesn't work on Minestom

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

Running the Chameleon example on the Minestom demo server fails with an error.

Expected behaviour

No error message and the successful loading of the example extension.

Reproduction steps

1. Build the Chameleon example
2. Copy the `example/build/libs/chameleon-example-0.15.0-SNAPSHOT.jar` into the Minestom servers `extension` folder
3. Run the Minestom server

Exception

[main] [11:39:44] (ExtensionManager.loadExtension) - ERROR - While instantiating the main class 'dev.hypera.chameleon.example.platform.minestom.ChameleonExampleMinestom' in 'ChameleonExample' an exception was thrown.: java.lang.NoSuchMethodError: 'dev.hypera.chameleon.example.lib.kyori.adventure.text.logger.slf4j.ComponentLogger net.minestom.server.extensions.Extension.getLogger()'
        at Ext_ChameleonExample//dev.hypera.chameleon.platform.minestom.MinestomChameleonBootstrap.<init>(MinestomChameleonBootstrap.java:47)
        at Ext_ChameleonExample//dev.hypera.chameleon.platform.minestom.MinestomChameleon.create(MinestomChameleon.java:92)
        at Ext_ChameleonExample//dev.hypera.chameleon.example.platform.minestom.ChameleonExampleMinestom.<init>(ChameleonExampleMinestom.java:18)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
        at net.minestom.server.extensions.ExtensionManager.loadExtension(ExtensionManager.java:305)
        at net.minestom.server.extensions.ExtensionManager.loadExtensions(ExtensionManager.java:237)
        at net.minestom.server.extensions.ExtensionManager.start(ExtensionManager.java:111)
        at net.minestom.server.ServerProcessImpl.start(ServerProcessImpl.java:211)
        at net.minestom.server.MinecraftServer.start(MinecraftServer.java:322)
        at net.minestom.server.MinecraftServer.start(MinecraftServer.java:327)
        at net.minestom.demo.Main.main(Main.java:111)

Environment

Operating System: Ubuntu 22.04.2
Platform(s): Minestom (built from latest master but also on release 8ad2c7701f)

Additional information

The chameleon example has some classes of the Kyori Adventure API in its jar.
Minestom provides them too.
This can potentially cause problems.

Plugin and Platform information

I think it is necessary to have a way to get data about the plugin and platform that the plugin is running on.
This data should include:

  • Plugin information
    • Plugin name
    • Plugin version
    • Plugin author
  • Platform information
    • Platform name
    • Platform version
    • Platform type

Update README

Confirmation

  • I have checked for similar issues.

Problem

The current README file does not mention that Chameleon now requires Java 11, or Folia support.

Suggested solution

I think it would be a good idea to update the README.md file to mention the Java 11 requirement and the new Folia platform added by @LooFifteen in #217

Additional information

No response

Sponge support

A Sponge implementation of Chameleon would be nice to have.

Dependency Dashboard

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

Open

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

Detected dependencies

github-actions
.github/workflows/gradle.yml
  • HyperaDev/actions main
.github/workflows/release.yml
  • HyperaDev/actions main
.github/workflows/snapshot.yml
  • HyperaDev/actions main
gradle
gradle.properties
settings.gradle.kts
  • org.gradle.toolchains.foojay-resolver-convention 0.8.0
build.gradle.kts
annotations/build.gradle.kts
api/build.gradle.kts
bom/build.gradle.kts
build-logic/settings.gradle.kts
build-logic/build.gradle.kts
build-logic/src/main/kotlin/chameleon.base.gradle.kts
build-logic/src/main/kotlin/chameleon.common.gradle.kts
build-logic/src/main/kotlin/chameleon.publishing.gradle.kts
example/build.gradle.kts
gradle/libs.versions.toml
  • net.kyori:adventure-api 4.17.0
  • net.kyori:adventure-text-serializer-legacy 4.17.0
  • net.kyori:adventure-text-serializer-gson 4.17.0
  • net.kyori:adventure-platform-api 4.3.3
  • net.kyori:adventure-platform-bukkit 4.3.3
  • net.kyori:adventure-platform-bungeecord 4.3.3
  • io.papermc.paper:paper-api 1.20.2-R0.1-SNAPSHOT
  • net.md-5:bungeecord-api 1.20-R0.3-SNAPSHOT
  • cn.nukkit:nukkit 1.0-SNAPSHOT
  • org.spongepowered:spongeapi 10.0.0
  • com.velocitypowered:velocity-api 3.2.0-SNAPSHOT
  • com.google.code.gson:gson 2.11.0
  • org.yaml:snakeyaml 2.2
  • com.squareup:javapoet 1.13.0
  • org.slf4j:slf4j-api 2.0.13
  • org.apache.logging.log4j:log4j-api 2.23.1
  • org.jetbrains:annotations 24.1.0
  • net.kyori:indra-common 3.1.3
  • net.kyori:indra-publishing-gradle-plugin 3.1.3
  • net.kyori:indra-licenser-spotless 3.1.3
  • com.adarshr:gradle-test-logger-plugin 4.0.0
  • net.ltgt.gradle:gradle-errorprone-plugin 4.0.1
  • com.google.errorprone:error_prone_core 2.28.0
  • com.google.errorprone:error_prone_annotations 2.28.0
  • net.ltgt.gradle:gradle-nullaway-plugin 2.0.0
  • com.uber.nullaway:nullaway 0.11.0
  • com.puppycrawl.tools:checkstyle 10.17.0
  • org.junit:junit-bom 5.10.3
  • com.google.truth:truth 1.4.3
  • com.google.guava:guava-testlib 33.2.1-jre
  • org.mockito:mockito-bom 5.12.0
  • net.kyori.indra.publishing.sonatype 3.1.3
  • io.github.gradle-nexus.publish-plugin 2.0.0
  • io.github.goooler.shadow 8.1.8
platform-api/build.gradle.kts
platform-bukkit/build.gradle.kts
platform-bungeecord/build.gradle.kts
platform-nukkit/build.gradle.kts
platform-sponge/build.gradle.kts
platform-velocity/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.8

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

Move to NIO

I think it would be a good idea to move to using Java NIO, as it is newer and faster.

  • Move anything using IO to NIO
  • Deprecate old methods using IO

Debugging utils

Easy to use and reliable debugging utils would be helpful for creating and maintaining chameleon plugins, these debug utils should include:

  • Debug logging
  • Debug dumps

Drop support for Java 8

Confirmation

  • I have checked for similar issues.

Problem

Mockito v5 has dropped support for Java 8. This means updating would require us to do the same.

Suggested solution

We should completely remove support for Java 8 as it is no longer a good version of Java to use. At the time of writing, only 15 servers are running UltraStaffChatPro v2 on Java 8. The other 251 are using Java 11 or above.
Disclaimer: This is out of all servers with bStats enabled, which is most.

Out of the 15 servers:

  • 1 is a Paper 1.8.8 server, which can be ran on Java versions 8-16
  • 14 are BungeeCord proxies, which can be ran on Java versions 8-17

These statistics technically mean that all servers that currently run on Java 8 can also be updated to Java 16.

Additional information

No response

Error management

A easy to use error management system should be implemented, the features of this error management system should include:

  • Error logging
  • Fatal errors

`isFolia` check does not use recommended class

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

https://github.com/ChameleonFramework/Chameleon/blob/main/platform-folia/src/main/java/dev/hypera/chameleon/platform/folia/FoliaChameleon.java#L122-L135

Expected behaviour

The PaperMC "Folia Support" documentation recommends checking for the io.papermc.paper.threadedregions.RegionizedServer class to detect Folia.

Reproduction steps

N/A

Exception

N/A

Environment

Operating System: N/A
Platform(s): Folia

Additional information

No response

Benchmarking for Adventure mappers

Confirmation

  • I have checked for similar issues.

Problem

There is currently no way to tell how performant our Adventure mappers are.

Suggested solution

I think it would be helpful if we added benchmarks for the Adventure mappers using JMH.

Additional information

No response

Support for multiple versions of Sponge

Confirmation

  • I have checked for similar issues.

Problem

Sponge seems to consistently and completely break their API between each version.
We currently only support Sponge v8, and even support for that is problematic and somewhat broken.

E.g. #118

Suggested solution

It might work to create several separate modules for sponge; e.g. platform-sponge7, platform-sponge8, platform-sponge9, however this is rather impractical and would take a lot of time and effort to maintain.
We could support only the latest version of Sponge, however that could cause problems for some developers.

If possible, we need to figure out a better solution or drop Sponge support entirely.

Additional information

No response

ServerUser

ServerUser should be filled with common methods from the Minestom Player and Spigot Player.

  • Block
  • Advancement
  • AdvancementProgress
  • Location
  • WeatherType
  • Scoreboard
  • ItemStack
  • Effect
  • Instrument
  • Note
  • Sound
  • SoundCategory
  • BlockData
  • Materal

The list goes on...

Improve GitHub issue templates

Confirmation

  • I have checked for similar issues.

Problem

The current GitHub issue templates require fields that should not be required, and format most fields as markdown inside code blocks.

Suggested solution

We should improve the GitHub issue templates, making it easier to report bugs and suggest ideas.

Additional information

No response

Remove `ChameleonPluginData`

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

Currently, Chameleon requires that plugins provide a ChameleonPluginData object during bootstrap creation.
This data is stored in Chameleon, however as Chameleon doesn't do anything with it, I don't see the reason for it being required, or existing in the first place.

I do not remember why this was originally introduced.

Expected behaviour

N/A

Reproduction steps

N/A

Exception

N/A

Environment

N/A

Additional information

No response

Rename `core` module to `api`

I think it would be a good idea to rename the core module to api and the package dev.hypera.chameleon.core to dev.hypera.chameleon. The name api makes more sense as the core module is mostly just abstract classes and interfaces that are implemented by each platform and the package dev.hypera.chameleon generally looks cleaner.

Brigadier command support

It would be helpful to have Brigadier command support with Chameleon.
This should be fairly easy to do as platforms like Velocity and Minestom have native support for Brigadier.

Documentation site

To make Chameleon easier to use, I think a documentation site made with Vitepress would probably be best.
This could be done in either a docs/ directory in this repository or in a separate repository.

Decouple managers from platform's Chameleon

Confirmation

  • I have checked for similar issues.

Problem

Currently, when creating support for a Bukkit-based platform, BukkitChameleon must be extended to grant access to Bukkit's manager classes. If these managers begin to use the abstracted classes rather than the internals where possible, it'll be less hacky when adding a platform like this to Chameleon.

Suggested solution

Prefer abstract classes over internal implementation in managers.

Additional information

No response

Events

Map and forward events from the platform to the Chameleon plugin.

To do

  • Core event system
  • Listeners

Events

  • Event types
    • UserEvent
    • ProxyUserEvent
    • ServerUserEvent
  • Connection events
    • UserConnectEvent
    • UserLeaveEvent
  • User action events
    • UserChatEvent
    • UserCommandExecuteEvent
  • Tab completion events
    • TabCompleteEvent
    • TabCompleteResponseEvent
  • Proxy only events
    • ProxyUserHandshakeEvent
    • ProxyUserSwitchEvent
  • Server only events
    • ServerUserAnimationEvent
    • ServerUserExperienceEvent
      • ServerUserExperienceChangeEvent
      • ServerUserLevelChangeEvent
    • ServerUserGameModeChangeEvent
    • ServerUserInteractionEvent
      • ServerUserArmorStandManipulateEvent
      • ServerUserInteractAtEntityEvent
      • ServerUserInteractEntityEvent
      • ServerUserInventoryInteractionEvent
        • ServerUserChangedMainHandEvent
        • ServerUserDropItemEvent
        • ServerUserEditBookEvent
        • ServerUserItemBreakEvent
        • ServerUserItemConsumeEvent
        • ServerUserItemDamageEvent
        • ServerUserItemHeldEvent
        • ServerUserItemMendEvent
        • ServerUserPickupArrowEvent
        • ServerUserPickupItemEvent
      • ServerUserLocaleChangeEvent
      • ServerUserMovementEvent
      • ServerUserPortalEvent
      • ServerUserRecipeDiscoverEvent
      • ServerUserRespawnEvent
      • ServerUserRiptideEvent
      • ServerUserStatisticIncrementEvent
      • ServerUserTeleportEvent
      • ServerUserToggleFlightEvent
      • ServerUserToggleSneakEvent
      • ServerUserToggleSprintEvent
      • ServerUserVelocityEvent
      • ServerUserWorldInteractionEvent
        • ServerUserBedEnterEvent
        • ServerUserBedLeaveEvent
        • ServerUserBlockInteractionEvent
          • ServerUserBlockPlaceEvent
          • ServerUserBlockBreakEvent
        • ServerUserBucketEvent
          • ServerUserBucketEmptyEvent
          • ServerUserBucketEntityEvent
          • ServerUserBucketFillEvent
          • ServerUserBucketFishEvent
        • ServerUserEggThrowEvent
        • ServerUserFishEvent
        • ServerUserHarvestBlockEvent
        • ServerUserShearEntityEvent
        • ServerUserUnleashEntityEvent

Add server list ping event

Confirmation

  • I have checked for similar issues.

Problem

Chameleon does not currently have a server list ping event.

Suggested solution

It would be helpful if Chameleon added a server list ping event.
This event could be used to create cross-platform MOTD plugins, or any other plugin that modifies the server list ping response.

I suggest a ServerPingEvent (feedback on name would be appreciated!) be added to the dev.hypera.chameleon.event.common package.

Platform events:

This event would also need a representation of a server list ping response.

Additional information

No response

Add "Plugins using Chameleon" section to README.md

It would be nice to have a section towards the bottom of the README.md file that allows people to show off plugins that they've made that use Chameleon. We would probably have to have some rules for what is allowed so it isn't just used for promotion, however.

User manager instantiated before Adventure

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

When instantiating BungeeCord support, an exception is thrown.

Expected behaviour

Not throw an error.

Reproduction steps

`BungeeCordChameleon chameleon = BungeeCordChameleon.create(...);`

Exception

java.lang.NullPointerException: Cannot invoke "dev.hypera.chameleon.adventure.ChameleonAudienceProvider.console()" because the return value of "dev.hypera.chameleon.Chameleon.getAdventure()" is null
        at dev.hypera.chameleon.platform.bungeecord.user.BungeeCordConsoleUser.<init>(BungeeCordConsoleUser.java:49) ~[?:?]
        at dev.hypera.chameleon.platform.bungeecord.user.BungeeCordUserManager.<init>(BungeeCordUserManager.java:59) ~[?:?]
        at dev.hypera.chameleon.platform.bungeecord.BungeeCordChameleon.<init>(BungeeCordChameleon.java:61) ~[?:?]
        at dev.hypera.chameleon.platform.bungeecord.BungeeCordChameleonBootstrap.loadInternal(BungeeCordChameleonBootstrap.java:58) ~[?:?]
        at dev.hypera.chameleon.platform.bungeecord.BungeeCordChameleonBootstrap.loadInternal(BungeeCordChameleonBootstrap.java:42) ~[?:?]
        at dev.hypera.chameleon.ChameleonBootstrap.load(ChameleonBootstrap.java:118) ~[?:?]

Environment

Operating System: Windows 10
Platform(s): BungeeCord 1.19

Additional information

No response

Update Adventure mappers

Confirmation

  • I have checked for similar issues.

Problem

The current Adventure mappers do not support the latest version and should be generally improved.

Suggested solution

The existing mappers should be completely replaced with a new, more efficient, and non-static system.

Additional information

No response

Folia PlatformTarget method missing

Confirmation

  • I have checked for similar issues.
  • I using the latest version of Chameleon.

Describe the bug

PlatformTarget is missing a static method for creating a Folia platform target.

Expected behaviour

PlatformTarget#folia() should exist.

Reproduction steps

N/A

Exception

N/A

Environment

N/A

Additional information

No response

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.