Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
chore: add local deps to repo (there's no public remote to take from)
docs: update readme, add note about deps
fix: detect bukkit version on all server versions correctly
  • Loading branch information
Wertik committed Aug 15, 2024
1 parent c60567a commit 1d7e04a
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 35 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ Watch a video about how this plugin works [here](https://www.youtube.com/watch?v

## Supported versions

``1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19`` (as of 3.6.11)
``1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21`` (as of 3.10.8)

### Notes

* Versions 1.8 (and any below) don't support boss bars for events.
* Versions 1.8 (and any below) don't support boss bars for events or particles.
* For materials on version 1.12 (and below) use their 1.13+ names.
* ex.: Cyan dye -> ~~INK_SACK;4~~ CYAN_DYE
* You can find a list of materials [here](https://github.com/CryptoMorin/XSeries/blob/master/src/main/java/com/cryptomorin/xseries/XMaterial.java).

## Development trello
## Development

You can find reported issues and requested features on [trello](https://trello.com/b/FfsHxZUW/blockregen).
If you wish to contribute or develop a fork of the plugin for yourself, you're more than welcome to.
Be sure to open a PR if you implement anything that could be meaningful for others using the plugin!

In order to install local dependencies distributed with the source, run `mvn initialize`. \
This is done because there's no public repository to take the latest dependencies from.

## Support discord

Expand Down
4 changes: 2 additions & 2 deletions blockregen-ancient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.7</version>
<version>3.10.8</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-version</artifactId>
<version>3.10.7</version>
<version>3.10.8</version>
<scope>compile</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion blockregen-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.7</version>
<version>3.10.8</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions blockregen-legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.7</version>
<version>3.10.8</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-version</artifactId>
<version>3.10.7</version>
<version>3.10.8</version>
<scope>compile</scope>
</dependency>

Expand Down
Binary file added blockregen-plugin/lib/Jobs5.2.4.0.jar
Binary file not shown.
Binary file added blockregen-plugin/lib/Residence5.1.6.0.jar
Binary file not shown.
54 changes: 47 additions & 7 deletions blockregen-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.7</version>
<version>3.10.8</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>blockregen-plugin</artifactId>

<name>BlockRegen</name>

<properties>
<project.dependencies.jobs.version>5.2.4.0</project.dependencies.jobs.version>
<project.dependencies.residence.version>5.1.6.0</project.dependencies.residence.version>
</properties>

<build>
<finalName>${project.name}-${project.version}</finalName>
<resources>
Expand Down Expand Up @@ -61,6 +66,41 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>jobs</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>lib/Jobs${project.dependencies.jobs.version}.jar</file>
<groupId>com.gamingmesh.jobs</groupId>
<artifactId>Jobs</artifactId>
<version>${project.dependencies.jobs.version}</version>
<packaging>jar</packaging>
</configuration>
</execution>
<execution>
<id>residence</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>lib/Residence${project.dependencies.residence.version}.jar</file>
<groupId>com.bekvon.bukkit</groupId>
<artifactId>Residence</artifactId>
<version>${project.dependencies.residence.version}</version>
<packaging>jar</packaging>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand All @@ -76,25 +116,25 @@
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-common</artifactId>
<version>3.10.7</version>
<version>3.10.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-version</artifactId>
<version>3.10.7</version>
<version>3.10.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-legacy</artifactId>
<version>3.10.7</version>
<version>3.10.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-ancient</artifactId>
<version>3.10.7</version>
<version>3.10.8</version>
<scope>compile</scope>
</dependency>
<!-- Spigot API -->
Expand Down Expand Up @@ -135,7 +175,7 @@
<dependency>
<groupId>com.bekvon.bukkit</groupId>
<artifactId>Residence</artifactId>
<version>5.0.1.5</version>
<version>${project.dependencies.residence.version}</version>
<scope>provided</scope>
</dependency>
<!-- Placeholder API -->
Expand Down Expand Up @@ -163,7 +203,7 @@
<dependency>
<groupId>com.gamingmesh.jobs</groupId>
<artifactId>Jobs</artifactId>
<version>5.0.2.1</version>
<version>${project.dependencies.jobs.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package nl.aurorion.blockregen.particles.impl;

import com.cryptomorin.xseries.particles.ParticleDisplay;
import com.cryptomorin.xseries.particles.Particles;
import com.cryptomorin.xseries.particles.XParticle;
import nl.aurorion.blockregen.BlockRegen;
import nl.aurorion.blockregen.particles.AbstractParticle;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.jetbrains.annotations.NotNull;

public class FlameCrown extends AbstractParticle {
Expand All @@ -19,7 +19,7 @@ public String name() {
@Override
public void display(@NotNull Location location) {
Location start = location.clone().add(.5, 1.2, .5);
ParticleDisplay display = ParticleDisplay.simple(start, Particle.FLAME);
Bukkit.getScheduler().runTaskAsynchronously(BlockRegen.getInstance(), () -> XParticle.circle(.5, 10, display));
ParticleDisplay display = ParticleDisplay.of(XParticle.FLAME).withLocation(start);
Bukkit.getScheduler().runTaskAsynchronously(BlockRegen.getInstance(), () -> Particles.circle(.5, 10, display));
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package nl.aurorion.blockregen.particles.impl;

import com.cryptomorin.xseries.particles.ParticleDisplay;
import com.cryptomorin.xseries.particles.Particles;
import com.cryptomorin.xseries.particles.XParticle;
import nl.aurorion.blockregen.particles.AbstractParticle;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.jetbrains.annotations.NotNull;

public class WitchSpell extends AbstractParticle {
Expand All @@ -16,7 +16,7 @@ public String name() {

@Override
public void display(@NotNull Location location) {
ParticleDisplay display = ParticleDisplay.simple(location.clone().add(.5, .5, .5), Particle.SPELL_WITCH);
XParticle.circle(.5, 10, display);
ParticleDisplay display = ParticleDisplay.of(XParticle.WITCH).withLocation(location.clone().add(.5, .5, .5));
Particles.circle(.5, 10, display);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,19 @@ public void useWorldEdit(WorldEditProvider provider) {
}

public String loadNMSVersion() {
Pattern pattern = Pattern.compile("v\\d+_\\d+");
// ex.: 1.20.1-R0.1-SNAPSHOT
String version = Bukkit.getServer().getBukkitVersion();

Matcher matcher = pattern.matcher(Bukkit.getServer().getClass().getPackage().getName());
// v1_8 -> 1.8
return matcher.find() ? matcher.group().replace("_", ".").substring(1) : null;
// remove snapshot part
version = version.substring(0, version.indexOf("-"));

// remove patch version
int lastDot = version.lastIndexOf(".");
if (lastDot > 2) {
version = version.substring(0, lastDot);
}

return version;
}

public boolean isCurrentAbove(String versionString, boolean include) {
Expand Down
4 changes: 2 additions & 2 deletions blockregen-version/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>BlockRegen</artifactId>
<groupId>nl.aurorion.blockregen</groupId>
<version>3.10.7</version>
<version>3.10.8</version>
</parent>

<artifactId>blockregen-version</artifactId>
Expand All @@ -16,7 +16,7 @@
<dependency>
<groupId>nl.aurorion.blockregen</groupId>
<artifactId>blockregen-common</artifactId>
<version>3.10.7</version>
<version>3.10.8</version>
<scope>compile</scope>
</dependency>
<!-- Spigot API -->
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>nl.aurorion.blockregen</groupId>
<artifactId>BlockRegen</artifactId>
<version>3.10.7</version>
<version>3.10.8</version>
<modules>
<module>blockregen-version</module>
<module>blockregen-common</module>
Expand Down Expand Up @@ -54,8 +54,8 @@
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>devport-dependencies</id>
<url>https://nexus.devport.space/dependencies</url>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>placeholderapi</id>
Expand All @@ -70,7 +70,7 @@
<dependencies>
<!-- Vault -->
<dependency>
<groupId>net.milkbowl.vault</groupId>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<exclusions>
Expand All @@ -84,20 +84,20 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
<version>1.18.34</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.1</version>
<version>24.1.0</version>
<scope>compile</scope>
</dependency>
<!-- Official XSeries release -->
<dependency>
<groupId>com.github.cryptomorin</groupId>
<artifactId>XSeries</artifactId>
<version>9.4.0</version>
<version>11.2.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit 1d7e04a

Please sign in to comment.