Home›Java›Mods›Sauron - Dupe preventer [1.12 - 1.20.6]
Sauron - Dupe preventer [1.12 - 1.20.6]
ModsJava

Sauron - Dupe preventer [1.12 - 1.20.6]

⬇ Download on Spigot
Sauron
Keeps an eye on your players' items.
[​IMG]

Fully async operations
Supports from 1.12 to 1.20.6 servers
Depends on NBT API

/!\ The plugin can have unexpected behaviour, you should always test it before putting in production. Sauron will always keep logs but be cautious.
​
Sauron is a fully customizable open-source plugin that allows you to define groups of items that have to be tracked (for instance: the rares customs items).
Duplicates of those tracked items will be automatically cleared, making it virtually impossible to dupe the tracked items.

What's the point ?
Sauron is great in addition with logs plugins such as InventoryRollbackPlus and CoreProtect.
Spoiler
The idea being :
You'll be able to verify that the player had the item, that he didn't sell it to another player, and refund him. Even if he lied to you and hid the item somewhere, the item will be cleared before he'll be able to use it again.

Features

Usage

  1. Upload the jar to your plugins' folder and restart your server (or load the jar using a plugman)
  2. Design your tracking rules (see below) and customize the plugin based on your needs with the config
  3. /sauron reload and enjoy !
  4. Recommanded: Add the sauron.exempt perm to your (safe) admins to avoid them accidentally updating (like by duplicating) the timestamp of players' item!

Performance
Altough it will highly depend on how many items are tracked on your server, the plugin can handles large amounts of players/items very well. Sauron does not appear in a typical spark profile.

upload_2024-4-13_17-7-0.png
How does it work ?

Sauron keeps an eye on players' inventories. For every item, if it should be track, an unique sauron_id UUID and sauron_date timestamp is added automatically, making it tracked. It then add an entry in the database for that UUID.
Each time a tracked item is scanned, it compares the item's physical timestamp with the database item's timestamp. If item's timestamp is earlier than database's timestamp, then it means that the item has been duplicated in the interval of time between the two timestamps.

[​IMG]

/!\
By design, it is not possible to track stacked items. The plugin will never put a tracker on stacked items, except if specially told to do so.

Scanning process

Currently, the plugin scans items in two different ways:
The plugin will soon provide an API to add whatever way of scanning you'd like.

Designing Tracking Rules

Here's an example of 2 tracking rules in the config, one for tracking items and one for illegal item that have to be cleared :

Code (YAML):
 items-to-track:
    super-weapons
:
      contains
:
       - custom
        - OP
      materials
:
       - DIAMOND_SWORD
        - DIAMOND_AXE
      flags
:
       - HIDE_UNBREAKABLE
      unbreakable
: true
      has_nbt
:
       - yronusaTest
  illegal-items
:
    ruleIllegal
:
      unbreakable
: true
      materials
:
       - DIAMOND_SWORD

 
For an item to "check" a tracking rule, it has to check all of its compounds.
Inside each compound, it need to check at least one of the parameters provided.


You can specify the following parameters (inside a compound):

If the item verify all of those parameters, then it will be tracked.
If a parameter is not specified, the plugin will consider it being verified by default.

Spoiler: Why that design?
Tracking rules are made to be at most inclusive as possible. The idea is to be able to design "groups of items". Indeed in a lot of server there are a lot of different custom rares items and it would be too long to track each of them independently.

Commands
Permissions

Settings

Code (YAML):
settings :
## How precise should console outputs be ? HIGH, MEDIUM, LOW or NONE only.
  verbose-level
: HIGH
## Does the plugin should automatically updates all players' inventory ? If yes, at which rate between a general lookup, at which rate between each player, and at which rate between items in their inventories ?
  automatic-inventory-updating
:
    enabled
: true
    delay-between-checks
: 300
    delay-between-players
: 2
    delay-between-items
: 0.5
## Should the database store items' base64 data ? WARNING: can be heavy
  save-item-data
: false
## at which rate (in seconds) should the plugin update item's timestamp, when held in hand by a player?
  in-hand-update-interval
: 10
## If a container already has been checked within that interval, won't check it again.
  container-update-interval
: 10
  track-stacked-items
: false
  clear-stacked-items
: true




Roadmap

Although fully functional, the plugin is still in development and some features are missing but will be added soon:

Sauron is under GPL-3.0 license. Feel free to do everything you want with the source code. Please, consider contributing to the project, a lot can be improved !

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Sauron - Dupe preventer [1.12 - 1.20.6] is a free Minecraft Java mod. Compatible with Minecraft 1.12, 1.13, 1.14, 1.15 and newer. Downloaded 990 times (via Spigot). Download it and open it directly in the game.

Explore more