Sueta

Replenish Enchantment

1.2.6

Adds an Enchantment wich automatically replants seeds

·Plugin

Replensih Enchantment

This plugin adds an enchantment for hoes that automatically replants seeds when harvesting, making farming more efficient.

Usage

Commands
  • /replenish-get <BOOK/HOE/AXE> [<Material>] [<full-enchanted>] - gives you an Enchanted Book with the Replenish Enchantment on it or an enchanted hoe or axe of the material <Material>. When <full-enchanted> is set and is true the hoe or axe will also be enchanted with
    • Efficiency V
    • Fortune III
    • Mending
    • Unbreaking III

  • /replenish-give <Player> <BOOK/HOE/AXE> [<Material>] [<full-enchanted>] - gives <Player> an Enchanted Book with the Replenish Enchantment on it or an enchanted hoe or axe of the material <Material>. <full-enchanted> works just like above.

There currently is no survival way to get this enchantment, but you can use the commands above, manually or in combination with other plugins to let your players obtain the enchantment.

Villager Example

For example you can summon a Villager who trades the Enchanted Book. The command to summon a Villager who trades a book and 32 Emeralds for the Enchanted Book could look like this:

/summon minecraft:villager ~ ~ ~ {VillagerData:{type:plains,profession:farmer,level:2},Offers:{Recipes:[{buy:{id:book,Count:1},buyB:{id:emerald,Count:32},sell:{id:enchanted_book,Count:1,tag:{StoredEnchantments:[{id:"replenishenchantment:replenish",lvl:1}],display:{Lore:['[{"text":"Replenish","italic":false,"color":"gray"}]']}}}}]}}

You could also just add the Enchanted Book, or an enchanted tool to a Shopkeepers shop, if you have the Shopkeepers plugin installed.

Citizens Example

If you have the Citizens Plugin installed, you can also create a npc, which for example gives the player the enchanted book every 15 minutes.

  • first create a npc with
    /npc create <name>
  • configure it just like you want it to be
  • add the command with
    /npc cmd add r-get BOOK -o --cooldown 900

The Permissions can be configured and disabled in the config.yml.

The Messages can be configured in the language.yml.

Supported Crops:

  • Wheat
  • Potatoes
  • Carrots
  • Beetroots
  • Nether Wart
  • Cactus
  • Sugar Cane
  • Cocoa Beans

Configurations:

config.yml
# DO NOT CHANGE !!!
config-version: 7

crops:
  # A list of all crops you want to be affected by the replenish-enchantment
  # Currently supported:
  # - "WHEAT", "CARROTS", "POTATOES", "BEETROOTS", "NETHER_WART", "CACTUS", "SUGAR_CANE" and "COCOA"
  - "WHEAT"
  - "CARROTS"
  - "POTATOES"
  - "BEETROOTS"
  - "NETHER_WART"
  - "CACTUS"
  - "SUGAR_CANE"
  - "COCOA"

# The prerequisite for replenishing to work.
# ENCHANTMENT - The player needs a tool enchanted with the Replenish-Enchantment
# TOOL - The player needs a tool (Hoe/Axe) in the main hand
# NONE - The player just needs to break the crops, with whatever he wants
# Note: when set to "TOOL" or "NONE" all the following enchantment options are redundant!
requirement: ENCHANTMENT

# The name of the Enchantment
name: Replenish

application:
  # Whether it should be possible to apply the enchantment on the anvil (recommended)
  anvil: true

  # Whether it should be possible to apply the enchantment via drag & drop in the inventory (optional)
  # Only works in survival mode
  inventory: true

  # The levels it costs to apply the enchantment via drag & drop in the inventory (set to 0 to make the application via drag & drop in the inventory free)
  inventory-level-cost: 2

level-multiplier:
  # The following multipliers times the final level of the enchantment gives the level cost of this enchantment while combining two items on the anvil
  # The "book" value is used when the right item is an enchantment book, the "item" value otherwise
  item: 1
  book: 1

external-enchantment-level-multiplier:
  # Add the level multipliers for custom enchantments from other plugins here,
  # as this plugin completely overwrites the anvil (only when requirement is set to ENCHANTMENT) and the level costs for unknown enchantments defaults to 0
  # Format:
  # key: (you will get a message "Could not identify Enchantment "{key}"! Setting level cost to 0..." whenever this plugin detects an unknown enchantment,
  #       {key} will be replaced with the actual key)
  #   item: {item-multiplier}
  #   book: {book-multiplier}
  example_key:
    item: 6
    book: 3

################################
#         Permissions          #
################################

# The base permission for the /r-get command
# Set to "" to disable the permission (Players need to be OP then)
permission-get: re.cmd.get

# The base permission for the /r-give command
# Set to "" to disable the permission (Players need to be OP then)
permission-give: re.cmd.give

# The permission for the /r-get BOOK command
# Set to "" to disable the permission (Players need to be OP then)
permission-get-book: re.cmd.get.book

# The permission for the /r-give BOOK command
# Set to "" to disable the permission (Players need to be OP then)
permission-give-book: re.cmd.give.book

permission-get-hoe:
  # The permission for the wooden hoe with the /r-get HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  wood: re.cmd.get.hoe.wood

  # The permission for the stone hoe with the /r-get HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  stone: re.cmd.get.hoe.stone

  # The permission for the golden hoe with the /r-get HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  gold: re.cmd.get.hoe.gold

  # The permission for the iron hoe with the /r-get HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  iron: re.cmd.get.hoe.iron

  # The permission for the diamond hoe with the /r-get HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  diamond: re.cmd.get.hoe.diamond

  # The permission for the netherite hoe with the /r-get HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  netherite: re.cmd.get.hoe.netherite

  # The permission for the full-enchanted hoe option with the /r-get HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  full-enchanted: re.cmd.get.hoe.full-enchanted

permission-give-hoe:
  # The permission for the wooden hoe with the /r-give HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  wood: re.cmd.give.hoe.wood

  # The permission for the stone hoe with the /r-give HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  stone: re.cmd.give.hoe.stone

  # The permission for the golden hoe with the /r-give HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  gold: re.cmd.give.hoe.gold

  # The permission for the iron hoe with the /r-give HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  iron: re.cmd.give.hoe.iron

  # The permission for the diamond hoe with the /r-give HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  diamond: re.cmd.give.hoe.diamond

  # The permission for the netherite hoe with the /r-give HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  netherite: re.cmd.give.hoe.netherite

  # The permission for the full-enchanted hoe option with the /r-give HOE command
  # Set to "" to disable the permission (Players need to be OP then)
  full-enchanted: re.cmd.give.hoe.full-enchanted

permission-get-axe:
  # The permission for the wooden axe with the /r-get AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  wood: re.cmd.get.axe.wood

  # The permission for the stone axe with the /r-get AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  stone: re.cmd.get.axe.stone

  # The permission for the golden axe with the /r-get AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  gold: re.cmd.get.axe.gold

  # The permission for the iron axe with the /r-get AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  iron: re.cmd.get.axe.iron

  # The permission for the diamond axe with the /r-get AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  diamond: re.cmd.get.axe.diamond

  # The permission for the netherite axe with the /r-get AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  netherite: re.cmd.get.axe.netherite

  # The permission for the full-enchanted axe option with the /r-get AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  full-enchanted: re.cmd.get.axe.full-enchanted

permission-give-axe:
  # The permission for the wooden axe with the /r-give AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  wood: re.cmd.give.axe.wood

  # The permission for the stone axe with the /r-give AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  stone: re.cmd.give.axe.stone

  # The permission for the golden axe with the /r-give AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  gold: re.cmd.give.axe.gold

  # The permission for the iron axe with the /r-give AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  iron: re.cmd.give.axe.iron

  # The permission for the diamond axe with the /r-give AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  diamond: re.cmd.give.axe.diamond

  # The permission for the netherite axe with the /r-give AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  netherite: re.cmd.give.axe.netherite

  # The permission for the full-enchanted axe option with the /r-give AXE command
  # Set to "" to disable the permission (Players need to be OP then)
  full-enchanted: re.cmd.give.axe.full-enchanted

Similar projects

Plugin →