Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.12.0 #215

Merged
merged 80 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
704ccd4
Update dependency gradle to v8.5
renovate[bot] Nov 29, 2023
605036a
Update actions/setup-java action to v4
renovate[bot] Nov 29, 2023
60edbe9
Update dependency org.mockito:mockito-core to v5.8.0
renovate[bot] Dec 2, 2023
ef61892
Update dependency io.lumine:Mythic-Dist to v5.5.0
renovate[bot] Dec 3, 2023
acdc627
Update dependency io.lumine:Mythic-Dist to v5.5.1
renovate[bot] Dec 10, 2023
f65a444
Update dependency net.kyori:adventure-platform-bukkit to v4.3.2
renovate[bot] Dec 21, 2023
744803b
Update dependency org.mockito:mockito-core to v5.9.0
renovate[bot] Jan 14, 2024
0b00592
Update plugin de.chojo.publishdata to v1.3.0
renovate[bot] Jan 16, 2024
143ef43
Update dependency org.mockito:mockito-core to v5.10.0
renovate[bot] Jan 24, 2024
aded5ae
Update dependency gradle to v8.6
renovate[bot] Feb 2, 2024
370c9b4
Update dependency org.junit.jupiter:junit-jupiter-api to v5.10.2
renovate[bot] Feb 4, 2024
3f36854
Update dependency io.lumine:Mythic-Dist to v5.6.0
renovate[bot] Feb 10, 2024
4169f46
Update dependency io.lumine:Mythic-Dist to v5.6.1
renovate[bot] Feb 24, 2024
00512e5
Update dependency org.mockito:mockito-core to v5.11.0
renovate[bot] Mar 1, 2024
c4756bb
Feature: Util migration (#212)
rainbowdashlabs Mar 12, 2024
10d1acf
Update dependency org.projectlombok:lombok to v1.18.32
renovate[bot] Mar 20, 2024
9561ade
Update dependency gradle to v8.7
renovate[bot] Mar 22, 2024
9929a08
Replace mm color codes with legacy for item lores
rainbowdashlabs Mar 25, 2024
2788928
Only use legacy for items
rainbowdashlabs Mar 25, 2024
fff643a
Replace run command with suggest command for changable value button
rainbowdashlabs Apr 4, 2024
f7467ca
Fix inverted conditions for force night
rainbowdashlabs Apr 4, 2024
9400881
Update dependency io.lumine:Mythic-Dist to v5.6.2
renovate[bot] Apr 17, 2024
f3a0b32
Fix some UI issues
rainbowdashlabs May 2, 2024
fd3bc28
Update dependency org.mockito:mockito-core to v5.12.0
renovate[bot] May 11, 2024
74a0932
Update dependency me.clip:placeholderapi to v2.11.6
renovate[bot] May 21, 2024
d36e71b
Update dependency gradle to v8.8
renovate[bot] May 31, 2024
451974d
Update dependency net.kyori:adventure-platform-bukkit to v4.3.3
renovate[bot] Jun 2, 2024
cd912a8
Update eldoutil to v2.0.9
renovate[bot] Jun 22, 2024
b87cef7
Update eldoutil to v2.0.10
renovate[bot] Jun 22, 2024
8ffb6ee
Update dependency org.junit.jupiter:junit-jupiter-api to v5.10.3
renovate[bot] Jun 27, 2024
1084225
Update dependency org.projectlombok:lombok to v1.18.34
renovate[bot] Jun 28, 2024
d34b4a7
Use library loader for util and adventure
rainbowdashlabs Jun 29, 2024
f22fc65
Update plugin io.github.goooler.shadow to v8.1.8
renovate[bot] Jun 29, 2024
bd0a2ec
Fix plugin not loading correctly
rainbowdashlabs Jun 30, 2024
bd936da
Update dependency gradle to v8.9
renovate[bot] Jul 11, 2024
43892c3
Update eldoutil to v2.1.0
renovate[bot] Jul 27, 2024
e5aa519
Update eldoutil to v2.1.1
renovate[bot] Jul 27, 2024
7d67d30
Update eldoutil to v2.1.2
renovate[bot] Jul 27, 2024
06fe95c
Update dependency net.kyori:adventure-platform-bukkit to v4.3.4
renovate[bot] Aug 7, 2024
a33847a
Update dependency org.junit.jupiter:junit-jupiter-api to v5.11.0
renovate[bot] Aug 14, 2024
dc88cbf
Update dependency gradle to v8.10
renovate[bot] Aug 14, 2024
3317e4a
Update eldoutil to v2.1.3
renovate[bot] Aug 15, 2024
ff2d883
Update eldoutil to v2.1.4
renovate[bot] Aug 16, 2024
1bd29d2
Update dependency org.bstats:bstats-bukkit to v3.0.3
renovate[bot] Aug 19, 2024
9d8370f
Update eldoutil to v2.1.5
renovate[bot] Aug 19, 2024
6646edf
Patch eldo util version and migrate to new localizer creation
rainbowdashlabs Aug 24, 2024
cdb23a7
Update dependency io.lumine:Mythic-Dist to v5.7.1
renovate[bot] Aug 24, 2024
9e53c07
Update dependency org.mockito:mockito-core to v5.13.0
renovate[bot] Aug 27, 2024
3d706dd
Update dependency gradle to v8.10.1
renovate[bot] Sep 9, 2024
fb14280
Update plugin com.gradleup.shadow to v8.3.1
renovate[bot] Sep 10, 2024
9e0f4df
Update plugin com.gradleup.shadow to v8.3.2
renovate[bot] Sep 18, 2024
b67f273
Update dependency org.bstats:bstats-bukkit to v3.1.0
renovate[bot] Sep 22, 2024
fc3bc1b
Update dependency org.junit.jupiter:junit-jupiter-api to v5.11.1
renovate[bot] Sep 25, 2024
3e62990
Update dependency gradle to v8.10.2
renovate[bot] Sep 25, 2024
71711c7
Update dependency org.jetbrains:annotations to v25
renovate[bot] Sep 25, 2024
090b9be
Update dependency org.mockito:mockito-core to v5.14.0
renovate[bot] Sep 27, 2024
8fcd05d
Update dependency io.lumine:Mythic-Dist to v5.7.2
renovate[bot] Sep 28, 2024
0e44977
Update dependency org.mockito:mockito-core to v5.14.1
renovate[bot] Sep 30, 2024
cebb877
Update plugin com.gradleup.shadow to v8.3.3
renovate[bot] Oct 2, 2024
1fc7523
Update dependency org.junit.jupiter:junit-jupiter-api to v5.11.2
renovate[bot] Oct 4, 2024
6ded055
Update dependency org.jetbrains:annotations to v26
renovate[bot] Oct 14, 2024
261209a
Update dependency org.mockito:mockito-core to v5.14.2
renovate[bot] Oct 15, 2024
ccabf36
Update dependency org.junit.jupiter:junit-jupiter-api to v5.11.3
renovate[bot] Oct 21, 2024
ee90e2b
Update plugin com.gradleup.shadow to v8.3.4
renovate[bot] Oct 29, 2024
4b1246a
Update plugin com.gradleup.shadow to v8.3.5
renovate[bot] Nov 3, 2024
797d2bb
Update dependency gradle to v8.11 (#258)
renovate[bot] Nov 11, 2024
5c69c46
Update dependency org.projectlombok:lombok to v1.18.36 (#259)
renovate[bot] Nov 15, 2024
f46e2c6
Update eldoutil to v2.1.7 (#260)
renovate[bot] Nov 18, 2024
efcaabc
Update dependency gradle to v8.11.1 (#261)
renovate[bot] Nov 20, 2024
948dcc0
Update dependency org.junit.jupiter:junit-jupiter-api to v5.11.4 (#262)
renovate[bot] Dec 16, 2024
54f7325
Update dependency gradle to v8.12 (#263)
renovate[bot] Dec 20, 2024
c4c97ac
Update dependency org.mockito:mockito-core to v5.15.2 (#265)
renovate[bot] Jan 2, 2025
acaba00
Update plugin com.diffplug.spotless to v7 (#266)
renovate[bot] Jan 7, 2025
68aed51
Update eldoutil to v2.1.8 (#267)
renovate[bot] Jan 8, 2025
685d315
Update plugin com.diffplug.spotless to v7.0.1 (#268)
renovate[bot] Jan 8, 2025
acc943d
Update eldoutil to v2.1.9 (#269)
renovate[bot] Jan 8, 2025
0a7a8dd
Update plugin com.diffplug.spotless to v7.0.2 (#270)
renovate[bot] Jan 14, 2025
473dd8d
Update dependency org.jetbrains:annotations to v26.0.2 (#271)
renovate[bot] Jan 22, 2025
82439da
Update dependency gradle to v8.12.1 (#272)
renovate[bot] Jan 24, 2025
86b2545
Update plugin com.gradleup.shadow to v8.3.6 (#273)
renovate[bot] Feb 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
6 changes: 3 additions & 3 deletions .github/workflows/publish_to_nexus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
java-version: 21
- name: Build with Gradle
run: ./gradlew --build-cache build
- name: Test with Gradle
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
java-version: 21
- name: Build with Gradle
run: ./gradlew --build-cache build
- name: Test with Gradle
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.direnv
8 changes: 0 additions & 8 deletions BloodNight-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
plugins {
id("de.eldoria.library-conventions")
}

description = "BloodNight-api"

java {
withJavadocJar()
}

publishData {
useEldoNexusRepos()
publishComponent("java")
Expand Down
1 change: 1 addition & 0 deletions BloodNight-core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run/
71 changes: 36 additions & 35 deletions BloodNight-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,36 +1,26 @@
plugins {
id("de.eldoria.library-conventions")
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
alias(libs.plugins.pluginyml)
alias(libs.plugins.runpaper)
}

dependencies {
implementation(project(":BloodNight-api"))
implementation("de.eldoria", "eldo-util", "1.10.2-SNAPSHOT")
implementation("net.kyori", "adventure-platform-bukkit", "4.3.1")
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.10.1")
implementation("org.bstats", "bstats-bukkit", "3.1.0")
bukkitLibrary(libs.bundles.eldoutil)
bukkitLibrary("net.kyori", "adventure-platform-bukkit", "4.3.4")
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.11.4")
testImplementation("junit", "junit", "4.13.2")
testImplementation("org.mockito", "mockito-core", "5.7.0")
compileOnly("io.lumine", "Mythic-Dist", "5.4.1")
compileOnly("me.clip", "placeholderapi", "2.11.5")
testImplementation("org.mockito", "mockito-core", "5.15.2")
compileOnly("io.lumine", "Mythic-Dist", "5.7.2")
compileOnly("me.clip", "placeholderapi", "2.11.6")
compileOnly("com.onarandombox.multiversecore", "Multiverse-Core", "4.3.1")
compileOnly("se.hyperver.hyperverse", "Core", "0.10.0")
}

configurations {
all {
resolutionStrategy{
cacheChangingModulesFor(0, "SECONDS")
}
}
}

description = "BloodNight-core"
val shadebase = project.group as String + ".bloodnight."

java {
withJavadocJar()
}

publishData {
addBuildData()
useEldoNexusRepos()
Expand Down Expand Up @@ -61,28 +51,16 @@ publishing {

tasks {
shadowJar {
relocate("de.eldoria.eldoutilities", shadebase + "eldoutilities")
relocate("net.kyori", shadebase + "kyori")
relocate("org.bstats", "de.eldoria.bloodnight.libs.bstats")
mergeServiceFiles()
archiveBaseName.set(project.parent?.name)
}

processResources {
from(sourceSets.main.get().resources.srcDirs) {
filesMatching("plugin.yml") {
expand(
"version" to publishData.getVersion(true)
)
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}

build{
build {
dependsOn(shadowJar)
}

register<Copy>("copyToServer") {
register<Copy>("copyToServer") {
val path = project.property("targetDir") ?: "";
if (path.toString().isEmpty()) {
println("targetDir is not set in gradle properties")
Expand All @@ -91,4 +69,27 @@ tasks {
from(shadowJar)
destinationDir = File(path.toString())
}

runServer{
minecraftVersion("1.21.1")
}
}

bukkit {
name = "BloodNight"
description = "Make your nights a nightmare again"
authors = listOf("RainbowDashLabs")
version = publishData.getVersion(true)
main = "de.eldoria.bloodnight.core.BloodNight"
website = "https://www.spigotmc.org/resources/85095"
apiVersion = "1.16"
softDepend = listOf("Multiverse-Core", "Hyperverse", "MythicMobs", "PlaceholderAPI")

commands {
register("bloodnight") {
description = "Main Blood Night command"
usage = "/bloodnight help"
aliases = listOf("bn", "bnight")
}
}
}
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
package de.eldoria.bloodnight.command;

import de.eldoria.bloodnight.command.bloodnight.*;
import de.eldoria.bloodnight.command.bloodnight.CancelNight;
import de.eldoria.bloodnight.command.bloodnight.ForceNight;
import de.eldoria.bloodnight.command.bloodnight.Help;
import de.eldoria.bloodnight.command.bloodnight.ManageDeathActions;
import de.eldoria.bloodnight.command.bloodnight.ManageMob;
import de.eldoria.bloodnight.command.bloodnight.ManageMobs;
import de.eldoria.bloodnight.command.bloodnight.ManageNight;
import de.eldoria.bloodnight.command.bloodnight.ManageNightSelection;
import de.eldoria.bloodnight.command.bloodnight.ManageWorlds;
import de.eldoria.bloodnight.command.bloodnight.Reload;
import de.eldoria.bloodnight.command.bloodnight.SpawnMob;
import de.eldoria.bloodnight.config.Configuration;
import de.eldoria.bloodnight.core.manager.mobmanager.MobManager;
import de.eldoria.bloodnight.core.manager.nightmanager.NightManager;
import de.eldoria.bloodnight.util.Permissions;
import de.eldoria.eldoutilities.simplecommands.EldoCommand;
import de.eldoria.eldoutilities.simplecommands.commands.DefaultDebug;
import de.eldoria.eldoutilities.commands.command.AdvancedCommand;
import de.eldoria.eldoutilities.commands.command.CommandMeta;
import de.eldoria.eldoutilities.commands.defaultcommands.DefaultAbout;
import de.eldoria.eldoutilities.commands.defaultcommands.DefaultDebug;
import org.bukkit.plugin.Plugin;

public class BloodNightCommand extends EldoCommand {
public class BloodNightCommand extends AdvancedCommand {

public BloodNightCommand(Configuration configuration, Plugin plugin,
NightManager nightManager, MobManager mobManager, InventoryListener inventoryListener) {
super(plugin);
Help help = new Help(plugin);
setDefaultCommand(help);
registerCommand("help", help);
registerCommand("about", new About(plugin));
registerCommand("spawnMob", new SpawnMob(plugin, nightManager, mobManager));
registerCommand("cancelNight", new CancelNight(plugin, nightManager, configuration));
registerCommand("forceNight", new ForceNight(plugin, nightManager, configuration));
registerCommand("manageWorlds", new ManageWorlds(plugin, configuration));
registerCommand("manageMob", new ManageMob(plugin, configuration, inventoryListener));
registerCommand("manageNight", new ManageNight(plugin, configuration));
registerCommand("manageMobs", new ManageMobs(plugin, configuration, inventoryListener));
registerCommand("nightSelection", new ManageNightSelection(plugin, configuration, inventoryListener));
registerCommand("deathActions", new ManageDeathActions(plugin, configuration));
registerCommand("reload", new Reload(plugin));
registerCommand("debug", new DefaultDebug(plugin, Permissions.Admin.RELOAD));
meta(CommandMeta.builder("bloodnight")
.withDefaultCommand(help)
.withSubCommand(help)
.withSubCommand(new DefaultAbout(plugin, "https://bn.discord.eldoria.de", "commands.about"))
.withSubCommand(new SpawnMob(plugin, nightManager, mobManager))
.withSubCommand(new CancelNight(plugin, nightManager, configuration))
.withSubCommand(new ForceNight(plugin, nightManager, configuration))
.withSubCommand(new ManageWorlds(plugin, configuration))
.withSubCommand(new ManageMob(plugin, configuration, inventoryListener))
.withSubCommand(new ManageNight(plugin, configuration))
.withSubCommand(new ManageMobs(plugin, configuration, inventoryListener))
.withSubCommand(new ManageNightSelection(plugin, configuration, inventoryListener))
.withSubCommand(new ManageDeathActions(plugin, configuration))
.withSubCommand(new Reload(plugin))
.withSubCommand(new DefaultDebug(plugin, Permissions.Admin.RELOAD))
.build()
);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
import de.eldoria.bloodnight.config.Configuration;
import de.eldoria.bloodnight.core.manager.nightmanager.NightManager;
import de.eldoria.bloodnight.util.Permissions;
import de.eldoria.eldoutilities.localization.Replacement;
import de.eldoria.eldoutilities.simplecommands.EldoCommand;
import de.eldoria.eldoutilities.simplecommands.TabCompleteUtil;
import de.eldoria.eldoutilities.utils.ArgumentUtils;
import de.eldoria.eldoutilities.commands.Completion;
import de.eldoria.eldoutilities.commands.command.AdvancedCommand;
import de.eldoria.eldoutilities.commands.command.CommandMeta;
import de.eldoria.eldoutilities.commands.command.util.Argument;
import de.eldoria.eldoutilities.commands.command.util.Arguments;
import de.eldoria.eldoutilities.commands.command.util.CommandAssertions;
import de.eldoria.eldoutilities.commands.exceptions.CommandException;
import de.eldoria.eldoutilities.commands.executor.ITabExecutor;
import de.eldoria.eldoutilities.messages.Replacement;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
Expand All @@ -18,60 +22,42 @@
import java.util.Collections;
import java.util.List;

public class CancelNight extends EldoCommand {
public class CancelNight extends AdvancedCommand implements ITabExecutor {
private final NightManager nightManager;
private final Configuration configuration;

public CancelNight(Plugin plugin, NightManager nightManager, Configuration configuration) {
super(plugin);
super(plugin, CommandMeta.builder("cancelNight")
.withPermission(Permissions.Admin.CANCEL_NIGHT)
.addArgument("syntax.worldName", false)
.build());
this.nightManager = nightManager;
this.configuration = configuration;
}

@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (denyAccess(sender, Permissions.Admin.CANCEL_NIGHT)) {
return true;
}

public void onCommand(@NotNull CommandSender sender, @NotNull String alias, @NotNull Arguments args) throws CommandException {
World world = null;
if (sender instanceof Player player) {
world = player.getWorld();
} else {
if (argumentsInvalid(sender, args, 1, "[" + localizer().getMessage("syntax.worldName") + "]")) {
return true;
}
CommandAssertions.invalidArguments(args, Argument.input("syntax.worldName", true));
}

world = ArgumentUtils.getOrDefault(args, 0, ArgumentUtils::getWorld, world);

if (world == null) {
messageSender().sendError(sender, localizer().getMessage("error.invalidWorld"));
return true;
}
world = args.asWorld(0, world);

boolean enabled = configuration.getWorldSettings(world).isEnabled();
if (!enabled) {
messageSender().sendLocalizedError(sender, "error.worldNotEnabled",
Replacement.create("WORLD", world.getName(), '6'));
return true;
}
if (nightManager.isBloodNightActive(world)) {
nightManager.cancelNight(world);
messageSender().sendMessage(sender, localizer().getMessage("cancelNight.canceled",
Replacement.create("WORLD", world.getName()).addFormatting('6')));
} else {
messageSender().sendError(sender, localizer().getMessage("cancelNight.notActive",
Replacement.create("WORLD", world.getName()).addFormatting('6')));
}
return true;
CommandAssertions.isTrue(!enabled, "error.worldNotEnabled", Replacement.create("WORLD", world));
CommandAssertions.isTrue(nightManager.isBloodNightActive(world), "cancelNight.notActive", Replacement.create("WORLD", world));
nightManager.cancelNight(world);
messageSender().sendMessage(sender, "cancelNight.canceled",
Replacement.create("WORLD", world.getName()));
}

@Override
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command
command, @NotNull String alias, @NotNull String[] args) {
if (args.length == 1) {
return TabCompleteUtil.completeWorlds(args[0]);
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull Arguments args) throws CommandException {
if (args.sizeIs(1)) {
return Completion.completeWorlds(args.asString(0));
}
return Collections.emptyList();
}
Expand Down
Loading