Code Monkey home page Code Monkey logo

eusminerhat's Introduction

MinerHat

⛏ Mining cryptocurrency with your Minecraft server (and player)

MinerHat is a Minecraft server plugin that utilizes your server at low load to mine cryptocurrency. Even more, it supports player contribution. Just let your players share their computing power to mine for you in exchange for in-game bonus!

Features

  • Toggles for local mining and player contribution modules. (In case your server provider disallows mining on their server, or whatever other reasons.)
  • Local Mining
    • Policies: Manage your miners
      • Decide the maximum player count at which the miner should be stopped
    • Timer for auto-switching miner
  • Player Contribution
    • Mining pool implement
    • Revenue factor: It will be multiplied with the actual revenue reported from the mining pool API in order to give your players adorable feedbacks
    • Economy plugin integration: A built-in exchange command which allows players exchanging revenue to your server's currency.
  • Localization Support

Get Started

TO USE LOCAL MINING: You need to put your miner into plugin's directory manually and then configure your mining wallet in the policy file. A detailed tutorial is available at: https://github.com/richardhyy/EusMinerHat/wiki/Quick-Start:-Local-Mining.

FOR PLAYERS WHO WANT TO CONTRIBUTE THEIR COMPUTING POWER: A detailed tutorial will be available soon.

Commands

Player's Commands

Command Description
/minerhat check Checkout revenue
/minerhat revenue Get revenue account information
/minerhat history Check revenue change history
/minerhat mining Get mining information, e.g. mining commandline, server's wallet address, and player's worker name
/minerhat exchange <amount> Exchange revenue to server's currency
/minerhat help Get help for player's commands

Admin's Commands

Command Description
/minerhatadmin status Get miner status
/minerhatadmin log Fetch miner output
/minerhatadmin start Start local miner manually
/minerhatadmin stop Stop local miner manually
/minerhatadmin reload Reload plugin configuration
/minerhatadmin help Get help for admin's commands

Permissions

Commands Permission Node
/minerhat * minerhat.contributor
/minerhatadmin * minerhat.admin

Plugin Directory Structure

──EusMinerHat
  ├─contribution
  │   └─[Player account data (.json)]
  ├─language
  │   └─<Language packs (.json)>
  ├─miner
  │   ├─[Miner dir]
  │   │   └─<Miner Executable>
  │   └─<Miner policies (.json)>
  └─config.yml

eusminerhat's People

Contributors

richardhyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eusminerhat's Issues

Cannot start despite file being present

Getting this error whenever I start the miner despite having the file:

image

[13:59:27 WARN]:        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1142)
[13:59:27 WARN]:        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
[13:59:27 WARN]:        at cc.eumc.eusminerhat.miner.MinerManager.startMining(MinerManager.java:141)
[13:59:27 WARN]:        at cc.eumc.eusminerhat.miner.MinerManager.checkAndToggleMining(MinerManager.java:115)
[13:59:27 WARN]:        at cc.eumc.eusminerhat.CheckIntervalTimer.run(CheckIntervalTimer.java:20)
[13:59:27 WARN]:        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100)
[13:59:27 WARN]:        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:469)
[13:59:27 WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1517)
[13:59:27 WARN]:        at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:461)
[13:59:27 WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1426)
[13:59:27 WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1147)
[13:59:27 WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:292)
[13:59:27 WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)
[13:59:27 WARN]: Caused by: java.io.IOException: error=2, No such file or directory
[13:59:27 WARN]:        at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
[13:59:27 WARN]:        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:313)
[13:59:27 WARN]:        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
[13:59:27 WARN]:        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1109)
[13:59:27 WARN]:        ... 12 more
[13:59:27 ERROR]: [EusMinerHat] Failed starting miner: Cannot run program "plugins/EusMinerHat/miner/xmrig/xmrig" (in directory "plugins/EusMinerHat/miner/xmrig"): error=2, No such file or directory
[13:59:27 INFO]: [EusMinerHat] Miner status changed: stopped

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.