Skip to content

Releases: juliarn/npc-lib

NPC-Lib Version 3 Beta 7

14 Jul 09:32
b709484
Compare
Choose a tag to compare
Pre-release

NPC-Lib Version 3 Beta 7

Changes and fixes in this release:

  • NPCs no longer track players if the PreShow event is cancelled (#119)
  • NPCs no longer untrack players if the PreHide event is cancelled
  • Add some missing EntityPoses for 1.20.4+
  • Improve ProtocolLib DataWatcher resolving logic
  • Add missing relocation of adventure (pulled by packetevents)
  • Updated all dependencies

Dependency

The dependency is available in maven central: https://central.sonatype.com/search?q=io.github.juliarn
Please note: releases can take up to 20 minutes to be synced to maven central.

All modules:

Module artifact name Module description
npc-lib-api General NPC-Lib API without platform specific class usage. This module should be used when the underlying implementation does not matter.
npc-lib-common Abstract implementation of the api module. This module should be used when a new platform implementation is made.
npc-lib-bukkit Platform specific implementation for Bukkit. This module implements the complete API (and common) to support Bukkit (and forks).
npc-lib-minestom Platform specific implementation for Minestom. This module implements the complete API (and common) to support Minestom (and forks).
npc-lib-labymod This module contains helper methods for accessing LabyMod NPC features (such as emotes and stickers). See the LabyMod documentation for more information.

How to include a module

Maven:

<dependency>
  <groupId>io.github.juliarn</groupId>
  <artifactId><insert module name from list above></artifactId>
  <version>3.0.0-beta7</version>
  <scope>compile</scope>
</dependency>

Gradle:

implementation("io.github.juliarn", "<insert module name from list above>", "3.0.0-beta7")

Bug reports & Feature requests

If you found an issue with v3 or want to request a new feature please do so on the issue tracker.

NPC-Lib Version 3 Beta 6

18 Oct 18:44
a97e14a
Compare
Choose a tag to compare
Pre-release

NPC-Lib Version 3 Beta 6

Changes and fixes in this release:

  • 1.20.2 is now fully supported (#115)
  • The look direction of an npc is now properly synced when the player moves without rotating (#108)
  • There is now a new flag for the action controller to automatically sync the looking direction of an npc on the first show to a player (#110)
  • The previously used and deprecated event library has been removed and replaced with a custom one (#112)
  • The Paper & Spigot profile resolver now properly catch cases where the name and/or uuid of a profile couldn't be resolved
  • This lib is now published to maven central

Dependency

The dependency is available in maven central: https://central.sonatype.com/search?q=io.github.juliarn
Please note: releases can take up to 20 minutes to be synced to maven central.

All modules:

Module artifact name Module description
npc-lib-api General NPC-Lib API without platform specific class usage. This module should be used when the underlying implementation does not matter.
npc-lib-common Abstract implementation of the api module. This module should be used when a new platform implementation is made.
npc-lib-bukkit Platform specific implementation for Bukkit. This module implements the complete API (and common) to support Bukkit (and forks).
npc-lib-minestom Platform specific implementation for Minestom. This module implements the complete API (and common) to support Minestom (and forks).
npc-lib-labymod This module contains helper methods for accessing LabyMod NPC features (such as emotes and stickers). See the LabyMod documentation for more information.

How to include a module

Maven:

<dependency>
  <groupId>io.github.juliarn</groupId>
  <artifactId><insert module name from list above></artifactId>
  <version>3.0.0-beta6</version>
  <scope>compile</scope>
</dependency>

Gradle:

implementation("io.github.juliarn", "<insert module name from list above>", "3.0.0-beta6")

Bug reports & Feature requests

If you found an issue with v3 or want to request a new feature please do so on the issue tracker.

NPC-Lib Version 3 Beta 5

14 Jun 21:09
4b57248
Compare
Choose a tag to compare
Pre-release

NPC-Lib Version 3 Beta 5

Changes and fixes in this release:

  • The parameter order of PlatformPacketAdapter#createEntityMetaPacket got swapped. The meta factory is now the first parameter and the value is the second one.
  • Fixed an issue on legacy servers (prior to paper 1.12) that caused skins not to display because the profile signature was not loaded.

Dependency

The dependency can be loaded from 2 repositories: https://jitpack.io/ or https://repository.derklaro.dev/releases/. The group id for the dependency is com.github.juliarn.NPC-Lib.

All modules:

Module artifact name Module description
npc-lib-api General NPC-Lib API without platform specific class usage. This module should be used when the underlying implementation does not matter.
npc-lib-common Abstract implementation of the api module. This module should be used when a new platform implementation is made.
npc-lib-bukkit Platform specific implementation for Bukkit. This module implements the complete API (and common) to support Bukkit (and forks).
npc-lib-minestom Platform specific implementation for Minestom. This module implements the complete API (and common) to support Minestom (and forks).
npc-lib-labymod This module contains helper methods for accessing LabyMod NPC features (such as emotes and stickers). See the LabyMod documentation for more information.

How to include a module

Maven:

<dependency>
  <groupId>com.github.juliarn.NPC-Lib</groupId>
  <artifactId><insert module name from list above></artifactId>
  <version>3.0.0-beta5</version>
  <scope>compile</scope>
</dependency>

Gradle:

implementation("com.github.juliarn.NPC-Lib", "<insert module name from list above>", "3.0.0-beta5")

Bug reports & Feature requests

If you found an issue with v3 or want to request a new feature please do so on the issue tracker.

3.0.0-beta4

07 Apr 10:30
84ee3ea
Compare
Choose a tag to compare
3.0.0-beta4 Pre-release
Pre-release

NPC-Lib Version 3 Beta 4

Changes and fixes in this release:

  • The NPC class now has special methods to generate certain outgoing packets directly instead of taking the detour via the PlatformPacketAdapter: playAnimation and changeMetadata
  • The bundled PacketEvents version has been updated to support 1.19.4
  • The library now fully supports Folia (when running on Folia, all tasks are scheduled fully asynchronously, they do not use a scheduler provided by Folia. This allows reuse of the new async scheduler implementation for new platforms or similar bukkit forks)

Dependency

The dependency can be loaded from 2 repositories: https://jitpack.io/ or https://repository.derklaro.dev/releases/. The group id for the dependency is com.github.juliarn.NPC-Lib.

All modules:

Module artifact name Module description
npc-lib-api General NPC-Lib API without platform specific class usage. This module should be used when the underlying implementation does not matter.
npc-lib-common Abstract implementation of the api module. This module should be used when a new platform implementation is made.
npc-lib-bukkit Platform specific implementation for Bukkit. This module implements the complete API (and common) to support Bukkit (and forks).
npc-lib-minestom Platform specific implementation for Minestom. This module implements the complete API (and common) to support Minestom (and forks).
npc-lib-labymod This module contains helper methods for accessing LabyMod NPC features (such as emotes and stickers). See the LabyMod documentation for more information.

How to include a module

Maven:

<dependency>
  <groupId>com.github.juliarn.NPC-Lib</groupId>
  <artifactId><insert module name from list above></artifactId>
  <version>3.0.0-beta4</version>
  <scope>compile</scope>
</dependency>

Gradle:

implementation("com.github.juliarn.NPC-Lib", "<insert module name from list above>", "3.0.0-beta4")

Bug reports & Feature requests

If you found an issue with v3 or want to request a new feature please do so on the issue tracker.

3.0.0-beta3

15 Jan 14:49
890037d
Compare
Choose a tag to compare
3.0.0-beta3 Pre-release
Pre-release

NPC-Lib Version 3 Beta 3

Changes and fixes in this release:

  • Fatal exceptions (which indicate that the jvm cannot resume the execution of the program) are no longer silently ignored when caught inside an event listener
  • Fix some smaller issues related to the PacketEvents adapter which was broken because of internal changes in PacketEvents
  • The prefix npc-lib- is now prepended to all submodules
  • Use the newly added getUUIDLists method from ProtocolLib to access uuids lists when removing a spawned npc in 1.19.3

Bug reports & Feature requests

If you found an issue with v3 or want to request a new feature please do so on the issue tracker.

3.0.0-beta2 - 1.19.3 support

31 Dec 21:25
1b4391f
Compare
Choose a tag to compare
Pre-release

NPC-Lib Version 3 Beta 2

Some time ago we released the first beta for v3, today we have beta 2. This is mainly a maintenance update and introduces support for 1.19.3. In the near future I plan to introduce support for more platforms, at the moment I planned to add Sponge. If there are requests for other (Java!) Minecraft server implementations to be supported, feel free to open an issue.

I wish everyone a healthy, happy new year 🥂

Changes and fixes in this release:

  • Add (bukkit): updated for 1.19.3. With this version mojang added the possibility to not show a player in the tablist when spawning, this is the default that we're sending to clients as well.
  • Fixed (api): NpcFlaggedObject#flagValue was returning null instead of an empty optional when a flag value was unknown
  • Fixed (bukkit): The protocol implementation for PacketEvents was using the wrong data types to register the entity data serializers
  • Improvement (bukkit): The BukkitPlatformUtil now has two different methods to convert a bukkit location to a position: positionFromBukkitLegacy and positionFromBukkitModern. The legacy method will use the world name while the modern method uses the world key. Be aware that your api usage has to ensure that world keys are existing on the current bukkit version to call the modern method.
  • Add: Jitpack should now be able to compile the source correctly (contributed by @DxsSucuk in #85 )
  • Fixed: Meta files of dependencies are no longer included in the final jar file, this includes module and pom information of gson, as well as the plugin.yml file of packetevents

Bug reports & Feature requests

If you found an issue with v3 or want to request a new feature please do so on the issue tracker.

First beta release of v3

19 Oct 18:36
1a55f43
Compare
Choose a tag to compare
Pre-release

NPC-Lib Version 3 Beta

The third version of the library was in development for quite some time now and has some exciting changes compared to v2:

  • The whole implementation is platform independant with the current version supporting bukkit and minestom (more java platforms like sponge or bedrock like nukkit are planned).
  • When devloping with the library there are no longer hard dependencies on external stuff (like ProtocolLib) which was a big problem in v2. This does not mean that the lib became less flexible, most of the stuff is still available.

Changes for developers

As the lib was completely rewritten and abstracted there is close to nothing that you can take over from v2. There are currently no examples available in the library source (they will get there asap) but you can take a look into an existing implementation in CloudNet for now. An example how to create a npc & pool for bukkit can be found here: NPC Pool creation, NPC creation, NPC Event subscriptions.

Some important stuff to know:

  • The accessor how worlds are converted between the api and bukkit can either be based on the world name or the world key. By default the accessor will be choosen based on the server version (>= 1.16.5 -> key based, < 1.16.5 -> name based). If you want to change that behaviour use NpcPlatformBuilder#worldAccessor with either BukkitWorldAccessor.nameBasedAccessor() or BukkitWorldAccessor.keyBasedAccessor().
  • Some useful methods to convert things between the platform and lib api are available in <Platform-Name>PlatformUtil (for example BukkitPlatformUtil).
  • Using some implementation details to get access to a hidden thing is not supported anymore. If you need something and want support for it please report it to the issue tracker, so that we can discuss the problem.

Dependencies

At the moment the library is only available from jitpack. We will look into publising the library to a different repository like central soon, as there were some noteable problems with the jitpack recently.

Bug reports & Feature requests

If you found an issue with v3 or want to request a new feature please do so on the issue tracker.

2.6-RELEASE

21 Dec 20:44
c22a060
Compare
Choose a tag to compare

Changes:

  • Different per-player packet content
  • NPCs having the skins of the packet receiver
  • 1.18 support

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.juliarn</groupId>
    <artifactId>npc-lib</artifactId>
    <version>2.6-RELEASE</version>
</dependency>

Gradle

maven {
    name 'jitpack.io'
    url 'https://jitpack.io'
}

compile group: 'com.github.juliarn', name: 'npc-lib', version: '2.6-RELEASE'

2.5-RELEASE

13 May 21:24
807230b
Compare
Choose a tag to compare

Changes:

  • Cleanup code, add a lot of docs
  • Add LabyMod modifier
  • Add PlayerNPCHideEvent and PlayerNPCShowEvent
  • Fix sneaking for 1.16 clients
  • Attempt to fix NPC invisibility bug

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.juliarn</groupId>
    <artifactId>npc-lib</artifactId>
    <version>2.5-RELEASE</version>
</dependency>

Gradle

maven {
    name 'jitpack.io'
    url 'https://jitpack.io'
}

compile group: 'com.github.juliarn', name: 'npc-lib', version: '2.5-RELEASE'

2.4-RELEASE

13 Oct 15:14
7e85223
Compare
Choose a tag to compare

Changes:

  • Fix entity equipment packet for 1.16
  • Fixes regarding NPCs in different worlds
  • Method to exclude player from seeing the NPC

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.juliarn</groupId>
    <artifactId>npc-lib</artifactId>
    <version>2.4-RELEASE</version>
</dependency>

Gradle

maven {
    name 'jitpack.io'
    url 'https://jitpack.io'
}

compile group: 'com.github.juliarn', name: 'npc-lib', version: '2.4-RELEASE'