SMP Swords

Transform your Minecraft SMP into a powerful custom ability experience! With a single command, every player receives a unique custom sword with special abilities. Designed for competitive SMP servers,

File Details

SMPSwords-2.0.0

  • R
  • Jun 20, 2026
  • 590.68 KB
  • 6
  • 1.21.11+10

File Name

SMPSwords-2.0.0.jar

Supported Versions

  • 1.21.11
  • 1.21.10
  • 1.21.9
  • 1.21.8
  • 1.21.7
  • 1.21.6
  • 1.21.5
  • 1.21.3
  • 1.21.2
  • 1.21.1
  • 1.21

Release Notes — v2.0.0

Initial release. The plugin was completely rebuilt from a broken and incomplete source. Below is a comprehensive changelog of everything that was added, fixed, changed, and removed.


Added

Visuals & Custom Textures

  • Custom 16×16 Textures: Added 5 distinct 16×16 sword textures (Fire, Lightning, Teleport, Life Steal, Freeze) featuring element-specific accent pixels.
  • Model JSON Overrides: Configured custom model overrides for netherite_sword mapping custom_model_data values 1001–1005 to their respective custom sword models.
  • Bundled Resource Pack: Packaged the resource pack directly inside the JAR (pack_format: 34, supported_formats: [34, 99]). It automatically extracts to plugins/SMPSwords/resourcepack/ on first startup.

Core Commands & Tab Completion

  • /smp reload:** Added a command to reload config.yml on the fly without needing to restart the server.
  • /smp pack:** Added a command to force-push the configured resource pack to all online players.
  • Tab Completion: Implemented proper tab completion for player names in /smp give <player> <type>.
  • /smpswords Alias:** Added /smpswords as an alternative command alias for /smp.

Abilities & Gameplay Mechanics

  • Safe-Landing Check (Teleport): The Teleport ability now performs a safety scan, walking up to 3 blocks up or down to find a solid, safe landing spot.
  • Teleport Effects: Added immersive particle and sound feedback on teleportation (portal particles accompanied by the Enderman teleport sound).
  • Action-Bar Cooldowns: Real-time cooldown countdown messages are now displayed on the action bar utilizing Spigot's player.spigot().sendMessage(...) API.
  • Inventory Overflow Handling: If a player's inventory is full when receiving a sword, the item is dropped at their feet, and a chat warning is sent.
  • Drop Intercept Feedback: Added a chat notification when a player attempts to drop a custom sword, clarifying why the action was blocked instead of cancelling silently.
  • Clean Item Presentation: Attached item flags to hide the default enchantment glint and unbreakable tags on all custom swords.

Fixed

Build & Dependency Management

  • Build Failure (XSeries Integration): Added the missing com.github.cryptomorin:XSeries:11.2.1 dependency and integrated the com.gradleup.shadow plugin to bundle it into the final JAR. XSeries classes are relocated to com.smpswords.libs.xseries to eliminate conflicts with other plugins.
  • Missing settings.gradle: Resolved a critical Gradle configuration issue where the project root could not be determined.
  • Missing Textures: Rectified an issue where only model JSON files existed while layer0 texture references pointed to non-existent PNGs (which previously caused swords to render as plain vanilla netherite swords).
  • Outdated Pack Format: Fixed an issue where pack.mcmeta targeted pack_format: 15 (Minecraft 1.19.4), causing Minecraft 1.21 to reject the resource pack. Bumped format to 34.
  • Duplicate Resource Pack Folder: Eliminated a duplicate resourcepack/ folder sitting at the project root. Only the functional copy inside src/main/resources/ remains.

Crash & Bug Fixes

  • LightningAbility.onRightClick NullPointerException (NPE): Fixed a crash where player.getTargetBlock(null, 20) returned null and was dereferenced without protection. It now safely falls back to a targeted coordinate 15 blocks in front of the player's line of sight.
  • Griefing/Self-Damage via Lightning: LightningAbility originally used strikeLightning, which inadvertently spread fire and damaged the attacker. Switched to strikeLightningEffect combined with manual damage() calls so only the intended target takes damage and no fire spreads.
  • LifeStealAbility Crash: Fixed an IllegalArgumentException thrown when calling setHealth() if the attacker died in the brief window between landing a hit and the ability firing. Added an isDead() / isValid() guard block and wrapped it in a try/catch.
  • Reflection-based Attribute Handling: Replaced the fragile reflection-based XAttribute.of("generic.max_health") in LifeStealAbility with the direct vanilla Attribute.GENERIC_MAX_HEALTH enum.
  • Tangled Cooldown Logic: Cleaned up overlapping logic where AbilityManager.triggerHit checked the cooldown while LightningAbility simultaneously checked and modified it. All cooldown tasks are now strictly centralized inside AbilityManager.
  • Outdated Resource Pack API: Upgraded ResourcePackManager from the deprecated setResourcePack(String) method—which ignored config options for prompts and required enforcement—to the modern Spigot 1.21 API: setResourcePack(String url, byte[] hash, String prompt, boolean required). It now correctly parses hex hashes into byte[].
  • SwordInfoGUI Ownership Bug: Fixed a flaw where hasSword was incorrectly calculated via type == playerSwords.get(uuid). This caused issues since a player can carry multiple custom swords. The GUI now scans the player's active inventory for any matches.
  • SwordManager.distributeToAll Skipping Flaw: Fixed a logic bug where a disabled sword type was only skipped once; if two consecutive types were disabled, the second one could still be distributed. The method now safely loops across all types until it matches an enabled option.
  • Thread Visibility Defect (smpActive): Marked SMPSwords.smpActive as volatile to fix a concurrency bug where state changes written by command threads weren't reliably seen by event threads.
  • Duplicate Listener Registration: Fixed a bug where ResourcePackManager registered itself as an event listener twice (once in its constructor and again in SMPSwords.onEnable).
  • Ugly Tab Completion Console Warnings: Corrected a behavior where tab completion returned null for player names under /smp give, producing console warnings. It now returns a properly filtered list of active player names.
  • plugin.yml Syntax Clean up: Quoted api-version: "1.21" for strict YAML compliance and documented the usage properties for the new /smp reload and /smp pack subcommands.

Changed

  • Namespaced Texture Paths: Updated model JSON references to use the safer, fully-namespaced minecraft:item/custom/<name> pathing structure instead of the looser item/custom/<name>.
  • Stateless Abilities: Refactored all abilities to be entirely stateless. Abilities no longer call plugin.getAbilityManager().isOnCooldown(...) internally; instead, AbilityManager evaluates the cooldown window prior to execution and triggers the cooldown timer immediately after.
  • Startup Logs: Added a clean info notification inside SMPSwords.onEnable() to log a proper startup confirmation message.
  • Configuration File Cleanup: Polished config.yml with cleaner indentation, structured spacing, and descriptive inline documentation.

Removed

  • Root-Level resourcepack/ Folder: Deleted the duplicate folder from the repository root to ensure all assets build cleanly out of src/main/resources/resourcepack/.