Orefinder is a Minecraft plugin that helps players locate ores by providing distance-based clues when they hit blocks while holding specific items. Hold a diamond and punch a wall — the plugin tells you how close the nearest diamond ore is.
Orefinder was forked from https://www.curseforge.com/minecraft/bukkit-plugins/orefinder-bukkit which appears to have been abandoned.
- Reports the distance to the nearest configured ore block as a "hot/cold" chat message.
- Configurable item-to-ore pairings — any held item can point at any block type.
- Per-player cooldown of one lookup per second, so the search cannot be spammed.
- Optional block-stealing "enderman" mechanic with a configurable chance.
/orefinder reloadto reloadconfig.ymlat runtime without restarting the server.
When a player left-clicks a block while holding a configured item, the plugin searches outward from the clicked block in expanding cubic shells and reports the Chebyshev distance to the nearest matching block, up to a radius of 20 blocks. Blocks outside the world's build height are skipped, and block-type matching is case-insensitive.
The distance is mapped to a message from config.yml:
| Distance | Message key | Default text | Colour |
|---|---|---|---|
| 0–1 | text.oneblock_hot |
One block away! | dark red |
| 2–3 | text.very_hot |
Very hot! | red |
| 4–5 | text.hot |
Hot! | red |
| 6–7 | text.warm |
Warm! | gold |
| 8–14 | text.lukewarm |
Lukewarm. | yellow |
| 15–19 | text.cold |
Cold. | aqua |
| not found | text.very_cold |
Ice cold! | blue |
- A Minecraft 26.2 server running Bukkit, Spigot, or Paper (
api-version: '26.2') - Java 25 or higher
- Maven (to build from source)
-
Clone the repository:
git clone https://github.com/mark-iid/orefinder.git cd orefinder -
Build the project using Maven:
mvn clean package
-
Copy the generated
target/Orefinder-<version>.jar(e.g.Orefinder-1.4.jar) to your server'spluginsdirectory. -
Start or restart your Minecraft server. A default
config.ymlis written toplugins/OreFinder/on first run.
Prebuilt jars are also attached to the releases,
and every CI build uploads a Package artifact.
config.yml is created on first startup and can be reloaded in-game with
/orefinder reload.
# Messages to players
text:
oneblock_hot: One block away!
very_hot: Very hot!
hot: Hot!
warm: Warm!
lukewarm: Lukewarm.
cold: Cold.
very_cold: Ice cold!
ender_steal: An enderman stole your block!
# 48 means a 1/48 chance per lookup
chance:
steal_block: 48
# Turn on/off optional functions
functions:
block_stealing: false
# Item/Block id
indicate:
inhand:
- diamond
- emerald
- ancient_debris
lookfor:
- diamond_ore
- emerald_ore
- ancient_debris| Setting | Description |
|---|---|
text.* |
Messages sent to the player for each distance band (see the table above). |
chance.steal_block |
Denominator of the steal chance — 48 means a 1-in-48 chance on each lookup. |
functions.block_stealing |
Enables the enderman mechanic: on a successful roll the player takes 1 damage and, in survival mode, loses one of the held items. |
indicate.inhand |
Items that activate the detector when held in the main hand. |
indicate.lookfor |
Block types to search for. |
indicate.inhand and indicate.lookfor are paired by position: the first item in
inhand looks for the first block in lookfor, and so on. If the lists are different
lengths the extra entries are ignored, and the plugin fails to start if either list is
empty. Names are Bukkit Material names and are matched case-insensitively.
- Ensure you have the
orefinder.usepermission (granted to everyone by default). - Hold one of the configured items (e.g. a diamond) in your main hand.
- Left-click any block to receive a distance-based clue about the paired ore.
/orefinder reload: Reloadsconfig.ymlfrom disk and rebuilds the item/ore mappings without restarting the server. Requires theorefinder.reloadpermission.
| Permission | Default | Description |
|---|---|---|
orefinder.use |
everyone | Allows the player to use the Orefinder detector. |
orefinder.reload |
operators | Allows reloading the configuration via /orefinder reload. |
orefinder.* |
— | Grants both of the above. |
- Java 25 (the build targets release 25; newer JDKs may fail the MockBukkit-based tests)
- Maven
mvn testThe suite has 39 tests running against MockBukkit,
which boots a mock server, loads the plugin, and drives real PlayerInteractEvents.
src/main/java/org/mystikos/minecraft/orefinder/
├── Orefinder.java # JavaPlugin entry point; /orefinder command executor
├── OrefinderContext.java # Config + logger interface, keeps logic testable
├── PlayerInteractionListener.java # Event handling, messaging, block stealing
├── OreLocator.java # Expanding cubic-shell nearest-block search
├── ItemConf.java # Loads and pairs the inhand/lookfor lists
└── PlayerCooldownManager.java # Per-player one-lookup-per-second cooldown
src/main/resources/ # plugin.yml and config.yml (Maven-filtered)
src/test/java/org/mystikos/minecraft/orefinder/
# Unit and MockBukkit integration tests
Only spigot-api is provided — nothing is shaded into the shipped jar. paper-api and
mockbukkit-v26.2 are test-scoped and must stay on the same Minecraft line as each other,
since the MockBukkit module bundles registry data for exactly its version. A few
transitive dependencies are pinned in pom.xml for CVE remediation; the comments there
explain why each pin exists and when it can be removed.
Dependabot watches Maven and GitHub Actions dependencies weekly, with the
Minecraft-version-locked artifacts grouped separately so they don't block self-contained
updates (see .github/dependabot.yml).
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Create a new Pull Request.
CI runs mvn -B package on JDK 25 for every push and pull request to main, and CodeQL
scans the codebase for security issues.
This project is licensed under the GNU General Public License v3.0. See the LICENSE.md
file for details.