added New Year Firework #15

Merged
MineTec merged 4 commits from feature/NewYearFirework into master 2026-10-13 21:58:04 +00:00
16 changed files with 80 additions and 27 deletions
Showing only changes of commit 1b79e35bd2 - Show all commits

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'com.gradleup.shadow' version "8.3.5"
id 'com.gradleup.shadow' version "9.6.1"
}
allprojects {
@@ -29,7 +29,7 @@ subprojects {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
dependencies {
implementation project(':core')
compileOnly 'io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT'
compileOnly 'io.papermc.paper:paper-api:26.2.build.129-stable'
compileOnly 'org.geysermc.floodgate:api:2.2.4-SNAPSHOT'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'com.sparkjava:spark-core:2.9.4'
@@ -25,7 +25,7 @@ public class ChatMessages extends Appliance {
public Component addReportActions(Component message, String username) {
return message
.hoverEvent(HoverEvent.showText(Component.text("Klicke, um diesen Spieler zu reporten").color(NamedTextColor.GOLD)))
.clickEvent(ClickEvent.clickEvent(ClickEvent.Action.SUGGEST_COMMAND, String.format("/report %s ", username)));
.clickEvent(ClickEvent.suggestCommand(String.format("/report %s ", username)));
}
@Override
@@ -85,7 +85,7 @@ public class Report extends Appliance {
.append(
Component
.text(createdReport.data().url(), NamedTextColor.GRAY)
.clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL, createdReport.data().url()))
.clickEvent(ClickEvent.openUrl(createdReport.data().url()))
)
.appendNewline()
.appendNewline()
@@ -32,7 +32,7 @@ public class AntiFormattedBook extends Appliance {
if (component instanceof TextComponent tc && tc.content().indexOf(SECTION) >= 0) return true;
if (component instanceof NBTComponent<?, ?> nbt) {
if (component instanceof NBTComponent<?> nbt) {
if (nbt.separator() != null && this.hasFormattingDeep(nbt.separator())) return true;
}
+1 -1
View File
@@ -1,5 +1,5 @@
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT'
compileOnly 'io.papermc.paper:paper-api:26.2.build.129-stable'
compileOnly 'org.geysermc.floodgate:api:2.2.4-SNAPSHOT'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'com.sparkjava:spark-core:2.9.4'
+1 -1
View File
@@ -2,7 +2,7 @@ dependencies {
implementation project(':core')
implementation project(':common')
compileOnly 'io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT'
compileOnly 'io.papermc.paper:paper-api:26.2.build.129-stable'
compileOnly 'org.geysermc.floodgate:api:2.2.4-SNAPSHOT'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'com.sparkjava:spark-core:2.9.4'
@@ -0,0 +1,42 @@
package eu.mhsl.craftattack.spawn.craftattack.appliances.gameplay.quarzRecipe;
import eu.mhsl.craftattack.spawn.core.Main;
import eu.mhsl.craftattack.spawn.core.appliance.Appliance;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ShapelessRecipe;
import org.jetbrains.annotations.NotNull;
import java.util.List;
public class QuarzRecipe extends Appliance {
private NamespacedKey recipeKey;
@Override
public void onEnable() {
this.recipeKey = new NamespacedKey(Main.instance(), "quarz_block_to_quarz");
ShapelessRecipe recipe = new ShapelessRecipe(this.recipeKey, new ItemStack(Material.QUARTZ, 4));
recipe.addIngredient(Material.QUARTZ_BLOCK);
Bukkit.addRecipe(recipe);
Bukkit.getOnlinePlayers().forEach(this::unlock);
}
@Override
public void onDisable() {
Bukkit.removeRecipe(this.recipeKey);
}
public void unlock(Player player) {
player.discoverRecipe(this.recipeKey);
}
@Override
protected @NotNull List<Listener> listeners() {
return List.of(new QuarzRecipeListener());
}
}
@@ -0,0 +1,12 @@
package eu.mhsl.craftattack.spawn.craftattack.appliances.gameplay.quarzRecipe;
import eu.mhsl.craftattack.spawn.core.appliance.ApplianceListener;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerJoinEvent;
public class QuarzRecipeListener extends ApplianceListener<QuarzRecipe> {
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
this.getAppliance().unlock(event.getPlayer());
}
}
@@ -20,7 +20,7 @@ import org.bukkit.event.Event;
import org.bukkit.event.Listener;
import org.jetbrains.annotations.NotNull;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
@@ -58,16 +58,15 @@ public class ProjectStart extends Appliance {
);
private final Map<GameRule<Boolean>, Boolean> gameRulesAfterStart = Map.ofEntries(
entry(GameRule.DO_DAYLIGHT_CYCLE, true),
entry(GameRule.DO_INSOMNIA, true),
entry(GameRule.DISABLE_RAIDS, false),
entry(GameRule.DO_FIRE_TICK, true),
entry(GameRule.DO_ENTITY_DROPS, true),
entry(GameRule.DO_PATROL_SPAWNING, true),
entry(GameRule.DO_TRADER_SPAWNING, true),
entry(GameRule.DO_WEATHER_CYCLE, true),
entry(GameRule.FALL_DAMAGE, true),
entry(GameRule.FIRE_DAMAGE, true)
entry(GameRules.ADVANCE_TIME, true),
entry(GameRules.SPAWN_PHANTOMS, true),
entry(GameRules.RAIDS, true),
entry(GameRules.ENTITY_DROPS, true),
entry(GameRules.SPAWN_PATROLS, true),
entry(GameRules.SPAWN_WANDERING_TRADERS, true),
entry(GameRules.ADVANCE_WEATHER, true),
entry(GameRules.FALL_DAMAGE, true),
entry(GameRules.FIRE_DAMAGE, true)
);
public ProjectStart() {
+1 -1
View File
@@ -2,7 +2,7 @@ dependencies {
implementation project(':common')
implementation project(':core')
compileOnly 'io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT'
compileOnly 'io.papermc.paper:paper-api:26.2.build.129-stable'
compileOnly 'org.geysermc.floodgate:api:2.2.4-SNAPSHOT'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'com.sparkjava:spark-core:2.9.4'
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+4 -4
View File
@@ -1,6 +1,6 @@
tasks.register('deployVaroPlugin', Copy) {
dependsOn ":varo:shadowJar"
from { project(":varo").shadowJar.archivePath }
from { project(":varo").shadowJar.archiveFile }
into file('path') // path to plugins folder
rename { fileName -> "varo.jar" }
}
@@ -10,15 +10,15 @@ tasks.register("uploadVaroPlugin") {
doLast {
def jarFile = project(":varo").tasks.named("shadowJar").get().outputs.files.singleFile
exec {
providers.exec {
commandLine "scp", "-4", "-P", "22", jarFile.absolutePath, "user@host:path/varo.jar"
}
}.result.get()
}
}
tasks.register('deployCraftAttackPlugin', Copy) {
dependsOn ":craftattack:shadowJar"
from { project(":craftattack").shadowJar.archivePath }
from { project(":craftattack").shadowJar.archiveFile }
into file('path') // path to plugins folder
rename { fileName -> "craftattack.jar" }
}
+1 -1
View File
@@ -2,7 +2,7 @@ dependencies {
implementation project(':core')
implementation project(':common')
compileOnly 'io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT'
compileOnly 'io.papermc.paper:paper-api:26.2.build.129-stable'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'com.sparkjava:spark-core:2.9.4'
}
@@ -11,7 +11,7 @@ import org.bukkit.event.player.PlayerItemConsumeEvent;
import org.bukkit.inventory.meta.PotionMeta;
import org.bukkit.potion.PotionEffect;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
class ForbiddenPotionsListener extends ApplianceListener<ForbiddenItems> {