Skip to content

Commit

Permalink
feat: 3.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
qixils committed Sep 4, 2024
1 parent 8de4ee0 commit 9356bdd
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ A list of all changes made to the software in reverse chronological order.

## 3.6.2

- Fixed missing name and conditions for the _Language Shuffle_ effect
- Fixed missing name for the _Replace Water with Lava_ effect
- Paper: Fixed error handling for custom enchantments added by Spigot plugins
- Paper: Added workaround for upstream issue which broke Max Health effects

## 3.6.1

- Added new client-side effect _Language Shuffle_ which randomizes your language for 30s (requires Fabric client mod and [Language Reload](https://modrinth.com/mod/language-reload))
- Added support for sending Fabric client-side effects from Paper
- Updated the _Lootbox_ effects to prevent the inventory from being closed while it still contains items
- Paper: Fixed [experimental features](https://minecraft.wiki/w/Experiments) support on 1.21+
- [Hotfix 1] Paper: Fixed large mod file size

## 3.6.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public Response.Builder executeImmediately(@NotNull List<@NotNull P> players, @N
if ((current - newVal) == amount) {
result.type(Response.ResultType.SUCCESS).message("SUCCESS");
player.maxHealthOffset(newVal);
player.health(Math.min(player.health(), player.maxHealth()));
}
}

Expand Down
4 changes: 3 additions & 1 deletion common/src/main/resources/i18n/CrowdControl_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,13 @@ cc.effect.invincible.name=Invincible
cc.effect.keep_inventory_off.name=Disable Keep Inventory
cc.effect.keep_inventory_on.name=Enable Keep Inventory
cc.effect.kill.name=Kill Players
cc.effect.language_random.name=Language Shuffle
cc.effect.lit.name=Place Torches
cc.effect.lootbox.name=Open Lootbox
cc.effect.lootbox_5.name=Open Lucky Lootbox
cc.effect.lootbox_10.name=Open Very Lucky Lootbox
cc.effect.low_gravity.name=Low Gravity
cc.effect.make_lava.name=Replace Water with Lava
cc.effect.max_health.name=<0> Max Health
cc.effect.max_health_add.name=+<0> Max Health
cc.effect.max_health_sub.name=-<0> Max Health
Expand Down Expand Up @@ -171,7 +173,7 @@ cc.effect.tick_halve.name=HyperSlowSpeed
cc.effect.time_day.name=Set Time to Day
cc.effect.time_night.name=Set Time to Night
cc.effect.toast.name=Annoy Players
cc.effect.unite.name=Unite Players
cc.effect.unite.name=Reunite Players
cc.effect.vein.name=Spawn Ore Vein
cc.effect.xp_add.name=Give <0> XP
cc.effect.xp_sub.name=Take <0> XP
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.qixils.crowdcontrol.plugin.fabric.commands;

import dev.qixils.crowdcontrol.common.packets.util.ExtraFeature;
import dev.qixils.crowdcontrol.common.packets.util.LanguageState;
import dev.qixils.crowdcontrol.common.util.SemVer;
import dev.qixils.crowdcontrol.plugin.fabric.FabricCrowdControlPlugin;
Expand All @@ -8,31 +9,28 @@
import dev.qixils.crowdcontrol.socket.Request;
import dev.qixils.crowdcontrol.socket.Response;
import lombok.Getter;
import lombok.experimental.Accessors;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.minecraft.server.level.ServerPlayer;
import org.jetbrains.annotations.NotNull;

import java.time.Duration;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.*;
import java.util.concurrent.TimeUnit;

@Getter
public class LanguageCommand extends TimedImmediateCommand {
private static final @NotNull Set<UUID> ACTIVE = new HashSet<>();
private final @NotNull String effectName = "language_random";
private final @NotNull Duration defaultDuration = Duration.ofSeconds(30);
private final @NotNull SemVer minimumModVersion = LanguageState.RANDOM.addedIn();
@Accessors(fluent = true)
private final @NotNull Set<ExtraFeature> requiredExtraFeatures = EnumSet.of(ExtraFeature.LANGUAGE_RELOAD);

public LanguageCommand(@NotNull FabricCrowdControlPlugin plugin) {
super(plugin);
}

public @NotNull SemVer getMinimumModVersion() {
return LanguageState.RANDOM.addedIn();
}

@NotNull
@Override
public Response.Builder executeImmediately(@NotNull List<@NotNull ServerPlayer> players, @NotNull Request request) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group = dev.qixils.crowdcontrol.plugin
version = 3.6.2-SNAPSHOT
version = 3.6.1
# increase available memory
org.gradle.jvmargs=-Xmx2G
# variables
Expand Down
6 changes: 3 additions & 3 deletions oneclick/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export const ua = "qixils/minecraft-crowdcontrol/1.0.0";
export const uaheader = { "User-Agent": ua };
export const uaheaderfull = { "headers": uaheader };

export const jreMode: "static" | "dynamic" = "dynamic"
export const jreMode: "static" | "dynamic" = "static"
export const jrePaths = {
8: "jre8",
21: "jre21",
8: "jdk8u422-b05",
21: "jdk-21.0.4-7",
}

export async function mkdir(dir: string, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
package dev.qixils.crowdcontrol.plugin.paper.commands;

import dev.qixils.crowdcontrol.common.packets.SetLanguagePacketS2C;
import dev.qixils.crowdcontrol.common.packets.util.ExtraFeature;
import dev.qixils.crowdcontrol.common.packets.util.LanguageState;
import dev.qixils.crowdcontrol.common.util.SemVer;
import dev.qixils.crowdcontrol.plugin.paper.PaperCrowdControlPlugin;
import dev.qixils.crowdcontrol.plugin.paper.TimedImmediateCommand;
import dev.qixils.crowdcontrol.socket.Request;
import dev.qixils.crowdcontrol.socket.Response;
import lombok.Getter;
import lombok.experimental.Accessors;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

import java.time.Duration;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.*;
import java.util.concurrent.TimeUnit;

@Getter
public class LanguageCommand extends TimedImmediateCommand {
private static final @NotNull Set<UUID> ACTIVE = new HashSet<>();
private final @NotNull String effectName = "language_random";
private final @NotNull Duration defaultDuration = Duration.ofSeconds(30);
private final @NotNull SemVer minimumModVersion = LanguageState.RANDOM.addedIn();
@Accessors(fluent = true)
private final @NotNull Set<ExtraFeature> requiredExtraFeatures = EnumSet.of(ExtraFeature.LANGUAGE_RELOAD);

public LanguageCommand(@NotNull PaperCrowdControlPlugin plugin) {
super(plugin);
}

public @NotNull SemVer getMinimumModVersion() {
return LanguageState.RANDOM.addedIn();
}

@NotNull
@Override
public Response.Builder executeImmediately(@NotNull List<@NotNull Player> players, @NotNull Request request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public double maxHealthOffset() {

AttributeModifier modifier = null;
for (AttributeModifier attributeModifier : attribute.getModifiers()) {
if (attributeModifier.getUniqueId() == MAX_HEALTH_MODIFIER_UUID || attributeModifier.getName().equals(MAX_HEALTH_MODIFIER_NAME)) {
if (attributeModifier.getName().equals(MAX_HEALTH_MODIFIER_NAME) || attributeModifier.getName().equals(MAX_HEALTH_MODIFIER_UUID.toString())) {
modifier = attributeModifier;
break;
}
Expand Down

0 comments on commit 9356bdd

Please sign in to comment.