{"id":16332,"date":"2026-05-31T22:01:23","date_gmt":"2026-05-31T19:01:23","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/"},"modified":"2026-05-31T22:01:23","modified_gmt":"2026-05-31T19:01:23","slug":"antiswap","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/","title":{"rendered":"AntiSwap (Attribute Swap Fix)"},"content":{"rendered":"<p>## Overview<\/p>\n<p>Anti-Swap Fix addresses a critical combat exploit where players can swap weapons mid-attack to gain unintended attribute bonuses. This exploit allows players to combine the attack speed of one weapon with the damage or attributes of another, creating an unfair advantage in PvP and PvE scenarios.<\/p>\n<p>This mod was specifically designed for large modpack SMPs where players have access to weapons with unique attributes and special effects. In these environments, the exploit becomes particularly problematic as players can mix and match powerful modded weapon attributes, completely breaking the intended game balance and progression systems.<\/p>\n<p>## The Problem<\/p>\n<p>In vanilla Minecraft, when a player initiates an attack, the game calculates damage and applies attributes based on the item held at the moment the attack connects, not when it was initiated. This creates a window of opportunity where players can:<\/p>\n<p>1.  Start an attack with a fast weapon (e.g., dagger with high attack speed)<br \/>\n2.  Swap to a powerful weapon mid-attack (e.g., sword with high damage)<br \/>\n3.  Deal damage with the powerful weapon while maintaining the attack speed of the fast weapon<\/p>\n<p>This exploit is commonly known as &#8220;Attribute Swap&#8221; or &#8220;Weapon Swap&#8221; and can severely impact game balance, especially on servers with custom weapons or RPG-style combat systems.<\/p>\n<p>## How It Works<\/p>\n<p>Anti-Swap Fix uses a simple but effective approach:<\/p>\n<p>1.  **Snapshot System**: At the start of each player tick, the mod records which item the player is holding<br \/>\n2.  **Attack Validation**: When a player attempts to attack, the mod compares the current held item with the snapshot<br \/>\n3.  **Exploit Prevention**: If the items don&#8217;t match, the attack is cancelled<\/p>\n<p>This &#8220;snapshot-and-validate&#8221; strategy ensures that players can only deal damage with the weapon they were actually holding when they initiated the attack.<\/p>\n<p>## Features<\/p>\n<p>*   **Server-Side Only**: No client installation required<br \/>\n*   **Lightweight**: Minimal performance impact with efficient snapshot caching<br \/>\n*   **Configurable**: Enable\/disable protection via server config or commands<br \/>\n*   **Debug Mode**: Optional per-player debug messages for testing and verification<br \/>\n*   **Zero False Positives**: Only cancels attacks when an actual swap is detected<\/p>\n<p>## Configuration<\/p>\n<p>The mod creates a configuration file at `config\/antiswapfix-server.toml` with the following options:<\/p>\n<p>&#8220;`<br \/>\n[General Settings]<br \/>\n    # Enables protection against the Attribute Swap exploit<br \/>\n    enabled = true<\/p>\n<p>    # Sends debug messages to players when attacks are cancelled<br \/>\n    debugMode = false<br \/>\n&#8220;`<\/p>\n<p>## Commands<\/p>\n<p>All commands require operator permission (level 2).<\/p>\n<p>### Toggle Protection<\/p>\n<p>&#8220;`<br \/>\n\/antiswap toggle true\/false<br \/>\n&#8220;`<\/p>\n<p>Enables or disables the anti-swap protection.<\/p>\n<p>### Toggle Debug Mode<\/p>\n<p>&#8220;`<br \/>\n\/antiswap debug true\/false<br \/>\n&#8220;`<\/p>\n<p>Enables or disables debug messages for the player who executes the command. When enabled, you will receive detailed messages showing which items were swapped when an attack is cancelled.<\/p>\n<p>Debug messages show:<\/p>\n<p>*   The item held at the start of the tick<br \/>\n*   The item held when the attack was attempted<br \/>\n*   Color-coded information for easy identification<\/p>\n<p>## Compatibility<\/p>\n<p>*   **Minecraft Version**: 1.20.1<br \/>\n*   **Mod Loader**: Forge 47.4.10+<br \/>\n*   **Side**: Server-side (client installation optional but not required)<\/p>\n<p>## Why This Mod?<\/p>\n<p>In large modpack environments, the Attribute Swap exploit becomes exponentially more dangerous. Players can exploit combinations of:<\/p>\n<p>*   High attack speed weapons from one mod with high damage weapons from another<br \/>\n*   Weapons with special effects combined with weapons that have high base damage<br \/>\n*   Enchantments and custom attributes that were never meant to work together A player with a fast dagger and a powerful greatsword can effectively have both at once, trivializing boss fights and making PvP completely unbalanced. Anti-Swap Fix provides a clean, universal solution that works with any item, any mod, and any combat system. It doesn&#8217;t care about attributes, enchantments, or special effects &#8211; it simply ensures you attack with the weapon you&#8217;re actually holding.<\/p>\n<p>## Credits<\/p>\n<p>**Author**: SatDPhoe<\/p>\n<p>![ko-fi](https:\/\/ko-fi.com\/satdphoe)<\/p>\n<p>![Donate](https:\/\/paypal.me\/SatDPhoe)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prevents players from using attribute swap exploits by fast-swapping items to their offhand. Highly configurable and perfect for Modpack, PvP and SMP servers!<\/p>\n","protected":false},"featured_media":16333,"template":"","meta":{"_minecraft_slug":"antiswap","_minecraft_project_id":"fDtmzE4v","_minecraft_author":"SatDPhoe","_minecraft_license":"LicenseRef-All-Rights-Reserved","_minecraft_downloads":14,"_minecraft_follows":0,"_minecraft_client_side":"unsupported","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"antiswap.zip","_minecraft_size_bytes":8976,"_minecraft_version_count":1,"_minecraft_updated_at":"2026-05-16T12:52:58.847709Z","_minecraft_date_created":"2026-05-08T02:12:55.052892Z","_minecraft_date_modified":"2026-05-07T10:22:18.608164Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/antiswap","_minecraft_icon_attachment_id":16333,"_minecraft_imported_at":"2026-05-31T19:01:24+00:00","_minecraft_import_hash":"6c112695d817e5902f4b06beb6a9bf21","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[88,104,89,92],"mod_loader":[106],"minecraft_version":[36,60,93,94,101,102],"class_list":["post-16332","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-equipment","mod_category-forge","mod_category-game-mechanics","mod_category-utility","mod_loader-forge","minecraft_version-1-20-1","minecraft_version-1-20-2","minecraft_version-1-20-3","minecraft_version-1-20-4","minecraft_version-1-20-5","minecraft_version-1-20-6"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AntiSwap (Attribute Swap Fix) - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AntiSwap (Attribute Swap Fix) - Minecraft\" \/>\n<meta property=\"og:description\" content=\"Prevents players from using attribute swap exploits by fast-swapping items to their offhand. Highly configurable and perfect for Modpack, PvP and SMP servers!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/antiswap\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/antiswap\\\/\",\"name\":\"AntiSwap (Attribute Swap Fix) - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/antiswap\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/antiswap\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/antiswap-icon-0d91afc8d6d3b5c7ef81520aec2e8405ab30c12c_96.webp\",\"datePublished\":\"2026-05-31T19:01:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/antiswap\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/antiswap\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/antiswap\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/antiswap-icon-0d91afc8d6d3b5c7ef81520aec2e8405ab30c12c_96.webp\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/antiswap-icon-0d91afc8d6d3b5c7ef81520aec2e8405ab30c12c_96.webp\",\"width\":96,\"height\":96},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/antiswap\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"AntiSwap (Attribute Swap Fix)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AntiSwap (Attribute Swap Fix) - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/","og_locale":"en_US","og_type":"article","og_title":"AntiSwap (Attribute Swap Fix) - Minecraft","og_description":"Prevents players from using attribute swap exploits by fast-swapping items to their offhand. Highly configurable and perfect for Modpack, PvP and SMP servers!","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/","name":"AntiSwap (Attribute Swap Fix) - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/05\/antiswap-icon-0d91afc8d6d3b5c7ef81520aec2e8405ab30c12c_96.webp","datePublished":"2026-05-31T19:01:23+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/05\/antiswap-icon-0d91afc8d6d3b5c7ef81520aec2e8405ab30c12c_96.webp","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/05\/antiswap-icon-0d91afc8d6d3b5c7ef81520aec2e8405ab30c12c_96.webp","width":96,"height":96},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/antiswap\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"AntiSwap (Attribute Swap Fix)"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/16332","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/16333"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=16332"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=16332"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=16332"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=16332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}