mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-23 10:35:18 +01:00
638b793040
My plans with this hook system are to make it easier to understand and maintain – Hopefully it is also more flexible Hooks now have a dedicated activation-life-cycle – I think this allows it to contain all the logic to do what it needs to do but also provide some helper methods like `#canBeActivated`. The activation should be used by the hooks to reduce the memory and performancec impact when not used. The de-activation also allows hooks to clean up themselves and not rely on the plugins used by the hook or the plugin using the hook to clean up. For example: You can see that the `DecentHologramsHook` has few class variables and they are kept as small as possible and reasonable when not activated. In `#deactivate` I call `#removeAll` to remove all holograms that still exist and I call `ArrayList#trimToSize` to reduce it's size again. This has a similar effect to setting the class varaible null or to a new List but with this I can make that field *final*. The exact implementation details and capabilities vary on the third-party plugins being supported by hooks, so it needs to be flexible and easy to understand, so we can easily add support for more plugins and especially new plugin categories like Maps (dynmap, BlueMap, PlexMap, ...). |
||
---|---|---|
.github | ||
Compatibility | ||
Core | ||
NMS | ||
.editorconfig | ||
.gitignore | ||
LICENSE | ||
pom.xml | ||
README.md |
CraftaroCore
An elaborate multi functional general Spigot plugin compatibility core and general use API.
Maven
Repository
<repository>
<id>songoda-public</id>
<url>https://repo.songoda.com/repository/public/</url>
</repository>
Artifact
<dependency>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore</artifactId>
<version>VERSION</version>
</dependency>
Gradle
Repository
repositories {
maven {
url 'https://repo.songoda.com/repository/public/'
}
}
Artifact
dependencies {
compileOnly 'com.songoda:SongodaCore:VERSION'
}