Skip to content

Atualizações diversas#26

Open
SrBedrock wants to merge 98 commits intomasterfrom
update
Open

Atualizações diversas#26
SrBedrock wants to merge 98 commits intomasterfrom
update

Conversation

@SrBedrock
Copy link
Member

No description provided.

Tzmo and others added 30 commits December 15, 2022 18:07
Co-authored-by: Desmond <73362074+Tzmo@users.noreply.github.com>
Co-authored-by: Mappors <86063981+Mappors@users.noreply.github.com>
Co-authored-by: skbeh <60107333+skbeh@users.noreply.github.com>
* Vault-1.6.7 -> Vault-1.7.1
* SimpleClans-2.14.4.1 -> SimpleClans-2.18.1
* EssentialsX-2.19.2 -> EssentialsX-2.19.7
* PlaceholderAPI-2.11.1 -> PlaceholderAPI-2.11.3
* CombatLogX-API-10.0.0.0-SNAPSHOT -> CombatLogX-API-11.3-SNAPSHOT
Fix Realizedd#87 by always checking whether Essentials is null
* Vault-1.6.7 -> Vault-1.7.1
* SimpleClans-2.14.4.1 -> SimpleClans-2.18.1
* PlaceholderAPI-2.11.1 -> PlaceholderAPI-2.11.3
* CombatLogX-API-10.0.0.0-SNAPSHOT -> CombatLogX-API-11.3-SNAPSHOT
commit 263fd71
Author: ThiagoROX <thiagokenis@live.com>
Date:   Thu Jun 1 03:05:07 2023 -0300

    Melhoria da sugestão de subcomandos
commit 0d278e8
Author: ThiagoROX <thiagokenis@live.com>
Date:   Thu Jun 1 03:05:58 2023 -0300

    Squashed commit of the following:

    commit 263fd71
    Author: ThiagoROX <thiagokenis@live.com>
    Date:   Thu Jun 1 03:05:07 2023 -0300

        Melhoria da sugestão de subcomandos

commit 10ed8ac
Author: ThiagoROX <thiagokenis@live.com>
Date:   Thu Jun 1 03:03:50 2023 -0300

    Adicionado suporte a alternar mcMMO por duelo
SrBedrock and others added 23 commits June 7, 2025 16:44
* formatação do código

* Bump gradle and fix combatlogx

* Add ignore functionality for duel requests and update version to 3.5.5-SNAPSHOT

* Add ignore command for duel requests and update related messages

* Rename 'stats' command to 'status' and update tab completion options

* Bump gradle to 8.14.2
Upgraded Spigot API to 1.21.8 and updated code to use new API conventions, including entity types, item flags, attributes, and potion types. Removed legacy compatibility code and adjusted usages to match latest Bukkit/Spigot changes for improved future compatibility.
Refactored Skulls.setProfile to use meta.setOwningPlayer directly and removed reflection and caching logic. This streamlines the method for newer Minecraft versions where GameProfile caching is handled internally.
Upgraded Gradle wrapper to 9.0.0 and the Shadow plugin to 9.0.2 in duels-plugin. Removed Java 21 compatibility settings from root build.gradle to streamline configuration.
Updated duels-plugin to use 'io.papermc.paper:paper-api' instead of Spigot API. Added the PaperMC Maven repository to the root build.gradle to support dependency resolution.
Replaces manual item flag and enchantment management with new API methods such as setHideTooltip and setEnchantmentGlintOverride for cleaner and more consistent item meta handling. Updates potion creation to use setBasePotionType instead of setBasePotionData. Minor variable naming improvements for clarity.
The GitHub Actions workflow now uses JDK 21, updates to the latest versions of checkout, setup-java, and upload-artifact actions, and switches to the recommended Gradle setup. The artifact name is changed to ArmaDuels, and workflow_dispatch is added for manual runs.
Bump Paper API dependency from 1.21.8-R0.1-SNAPSHOT to 1.21.10-R0.1-SNAPSHOT for improved compatibility and latest features.
Bump the EssentialsX dependency from 2.20.1 to 2.21.2 to use the latest features and fixes.
Replaced local JAR dependencies for BlueSlimeCore and CombatLogX with Maven dependencies in duels-plugin. Added sirblobman-public Maven repository to build.gradle and removed the corresponding JAR files from libs/.
Replaced the local Vault-1.7.1.jar dependency with a compileOnly dependency on VaultAPI from JitPack. Added jitpack.io to repositories and removed the Vault jar from libs to improve dependency management.
Replaced the local MVdWPlaceholderAPI-3.1.1.jar with a compileOnly Maven dependency in build.gradle and removed the jar from the libs directory. This streamlines dependency management and ensures consistent builds.
Reorganized and clarified dependency declarations in duels-plugin/build.gradle. Changed several dependencies from implementation to compileOnly, grouped dependencies by type, and added comments for better maintainability.
Replaced the local SimpleClans-2.18.1.jar with a Maven dependency on SimpleClans 2.19.2. Added the roinujnosde Maven repository to the build configuration and removed the old jar from the libs directory.
Replaces custom editMeta method with direct use of ItemStack.editMeta in Button and related button classes. Removes the Skulls utility class and its dependency, and updates setOwner to use editMeta with SkullMeta directly. Also removes the unused authlib dependency from build.gradle.
* Update Paper API to version 1.21.10

Bump Paper API dependency from 1.21.8-R0.1-SNAPSHOT to 1.21.10-R0.1-SNAPSHOT for improved compatibility and latest features.

* Update EssentialsX to version 2.21.2

Bump the EssentialsX dependency from 2.20.1 to 2.21.2 to use the latest features and fixes.

* Switch to Maven dependencies for BlueSlimeCore and CombatLogX

Replaced local JAR dependencies for BlueSlimeCore and CombatLogX with Maven dependencies in duels-plugin. Added sirblobman-public Maven repository to build.gradle and removed the corresponding JAR files from libs/.

* Switch Vault dependency to JitPack and remove jar

Replaced the local Vault-1.7.1.jar dependency with a compileOnly dependency on VaultAPI from JitPack. Added jitpack.io to repositories and removed the Vault jar from libs to improve dependency management.

* Switch MVdWPlaceholderAPI to Maven dependency

Replaced the local MVdWPlaceholderAPI-3.1.1.jar with a compileOnly Maven dependency in build.gradle and removed the jar from the libs directory. This streamlines dependency management and ensures consistent builds.

* Refactor dependencies in build.gradle

Reorganized and clarified dependency declarations in duels-plugin/build.gradle. Changed several dependencies from implementation to compileOnly, grouped dependencies by type, and added comments for better maintainability.

* Update SimpleClans dependency to use Maven repository

Replaced the local SimpleClans-2.18.1.jar with a Maven dependency on SimpleClans 2.19.2. Added the roinujnosde Maven repository to the build configuration and removed the old jar from the libs directory.

* Refactor item meta handling and remove Skulls util

Replaces custom editMeta method with direct use of ItemStack.editMeta in Button and related button classes. Removes the Skulls utility class and its dependency, and updates setOwner to use editMeta with SkullMeta directly. Also removes the unused authlib dependency from build.gradle.
Copilot AI review requested due to automatic review settings October 17, 2025 14:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request contains various updates to the Duels plugin, primarily focusing on:

  • Upgrading Gradle wrapper to version 9.0.0
  • Updating dependencies and build configuration
  • Adding new features including an ignore system for duel requests, mcMMO skills toggle, and boxing game mode
  • Refactoring code structure with improved import organization and consistency
  • Bug fixes and API improvements

Reviewed Changes

Copilot reviewed 187 out of 204 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
gradle/wrapper/gradle-wrapper.properties Updates Gradle version from 7.3.3 to 9.0.0
gradlew, gradlew.bat Updates Gradle wrapper scripts with license headers and improved compatibility
duels-plugin/build.gradle Updates dependencies to Paper API 1.21.10 and modern library versions
duels-plugin/src/main/resources/*.yml Adds new configuration options and language strings for features
duels-plugin/src/main/java/**/*.java Code refactoring: import reordering, private constructor formatting, method updates
duels-api/src/main/java/**/*.java Adds ignore system methods to User interface
Multiple build.gradle files Adds Java plugin declarations and updates dependency scopes
Comments suppressed due to low confidence (1)

duels-plugin/src/main/java/me/realized/duels/util/StringUtil.java:1

  • The COMMONS_LANG3 check and fallback to org.apache.commons.lang has been removed, but there's no guarantee that commons-lang3 is available. This could cause NoClassDefFoundError at runtime if the dependency is not present.
package me.realized.duels.util;

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

private EnumUtil() {
}

public static <E> E getByName(final String name, final Class<E> clazz) {
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method signature changed from <E extends Enum<E>> to <E>, removing the enum constraint. This allows non-enum types but breaks type safety. The method now attempts to handle both enums and classes with static fields, which violates the single responsibility principle and makes the API confusing.

Copilot uses AI. Check for mistakes.
PotionMeta meta = (PotionMeta) result.getItemMeta();
meta.setBasePotionData(new PotionData(type, extended, upgraded));
final PotionMeta meta = (PotionMeta) result.getItemMeta();
meta.setBasePotionType(type);
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed from setBasePotionData(new PotionData(type, extended, upgraded)) to setBasePotionType(type), ignoring the extended and upgraded parameters. This loses functionality as potion extensions and upgrades are no longer applied.

Suggested change
meta.setBasePotionType(type);
meta.setBasePotionData(new PotionData(type, extended, upgraded));

Copilot uses AI. Check for mistakes.
return player.getMaxHealth();
} else {
final AttributeInstance attribute = player.getAttribute(Attribute.GENERIC_MAX_HEALTH);
final AttributeInstance attribute = player.getAttribute(Attribute.MAX_HEALTH);
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed from Attribute.GENERIC_MAX_HEALTH to Attribute.MAX_HEALTH. This may be an API change in newer Minecraft versions, but could cause issues if the old constant is still the correct one for the supported server versions.

Copilot uses AI. Check for mistakes.
SIGN = CompatUtil.isPre1_14() ? Material.matchMaterial("SIGN") : Material.OAK_SIGN;
HEAL_SPLASH_POTION = (CompatUtil.isPre1_9() ? ItemBuilder.of(Material.POTION, 1, (short) 16421) : ItemBuilder.of(Material.SPLASH_POTION).potion(
PotionType.INSTANT_HEAL, false, true)).build();
PotionType.HEALING, false, true)).build();
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed PotionType from INSTANT_HEAL to HEALING. Combined with the ItemBuilder changes, this may not properly create the intended potion with upgrade/extension effects.

Copilot uses AI. Check for mistakes.
if (node.has("itemData") && !CompatUtil.isPre1_9()) {
final List<String> args = Arrays.asList(node.get("itemData").textValue().split("-"));
final PotionType potionType = EnumUtil.getByName(args.get(0), PotionType.class);
final PotionType potionType = EnumUtil.getByName(args.getFirst(), PotionType.class);
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed from args.get(0) to args.getFirst(). While functionally equivalent, this relies on Java 21+ List.getFirst() method which may not be available in older Java versions if the project targets Java 8 or 11.

Suggested change
final PotionType potionType = EnumUtil.getByName(args.getFirst(), PotionType.class);
final PotionType potionType = EnumUtil.getByName(args.get(0), PotionType.class);

Copilot uses AI. Check for mistakes.
@EventHandler
public void on(final PlayerInteractEvent event) {
if (!event.hasBlock() || !config.isPreventInteract()) {
if (event.getAction() != Action.RIGHT_CLICK_AIR && event.isCancelled() || !config.isPreventInteract()) {
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operator precedence issue: the condition evaluates as (event.getAction() != Action.RIGHT_CLICK_AIR && event.isCancelled()) || !config.isPreventInteract(). This likely needs to be event.getAction() != Action.RIGHT_CLICK_AIR && (event.isCancelled() || !config.isPreventInteract()).

Suggested change
if (event.getAction() != Action.RIGHT_CLICK_AIR && event.isCancelled() || !config.isPreventInteract()) {
if (event.getAction() != Action.RIGHT_CLICK_AIR && (event.isCancelled() || !config.isPreventInteract())) {

Copilot uses AI. Check for mistakes.
Comment on lines +144 to +147
looser = match.getLooserOfDamage();

if (winner != looser) {
looser.damage(1000);
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'looser' to 'loser'.

Suggested change
looser = match.getLooserOfDamage();
if (winner != looser) {
looser.damage(1000);
loser = match.getLoserOfDamage();
if (winner != loser) {
loser.damage(1000);

Copilot uses AI. Check for mistakes.
return completions;
}
default -> {
final Iterable<String> amount = List.of("10000", "20000", "30000", "40000", "50000", "60000", "70000", "80000", "90000", "99000");
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded bet amount suggestions don't align with the configurable min/max amounts in config (moneyBettingMinAmount and moneyBettingMaxAmount). These suggestions should be generated dynamically based on the configuration values.

Copilot uses AI. Check for mistakes.
queue:
duel:
description: Send, accept, or deny a duel request.
aliases: [ 1v1, x1, duelar ]
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Corrected spelling of 'duelar' to 'duelar' (assuming Portuguese) or 'duel' (English).

Copilot uses AI. Check for mistakes.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Copilot AI and others added 4 commits February 20, 2026 18:27
…urce with causing entity (#28)

* Initial plan

* Fix EntityDamageByEntityEvent error: add withDirectEntity to DamageSource builder

Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>
Update compileOnly dependencies in duels-plugin/build.gradle: bump io.papermc.paper:paper-api to 1.21.11-R0.1-SNAPSHOT and me.clip:placeholderapi to 2.12.2 to pick up API updates and compatibility fixes.
* Initial plan

* fix: restore player state on respawn after losing a duel (1.21.10+)

Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>

* fix: prevent entity desync by guarding PlayerUtil.reset on dead player and checking isDead at execution time

Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants