Skip to content

CorneliusMa/SilkSpawners_v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

419 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SilkSpawners - A lightweight plugin to make spawners mineable
Latest Release Release Status Build Status Tested Versions CodeFactor Crowdin Localization
This plugin makes spawners minable using SilkTouch tools.
Compatible with Paper, Spigot, Purpur, Bukkit and Folia servers.

Visit on Modrinth Visit on Hangar Visit on Spigot

Contributing

Contributions and translations are welcome. See Contributing for more.

Building

Requirements: JDK 17 (any distribution)

Simply download the source and build it using Gradle.

./gradlew :Plugin:assemble --no-daemon

Your build of SilkSpawners will be available at build/libs/SilkSpawners_v2.jar.

Commands

  • /silkspawners help [command]
  • /silkspawners give <Player> <Type> [Amount]
  • /silkspawners set <Type>
  • /silkspawners explosion <enable/disable/setting> <Player>
  • /silkspawners locale <setting/reload/update>
  • /silkspawners config <reload>
  • /silkspawners entities
  • /silkspawners version

Permissions

Commands

  • silkspawners.command.give - Use this command to give spawners to players.

In addition, set silkspawners.command.give.* to allow all entities or replace the star with an entity name.

  • silkspawners.command.set - Use this command to change already placed spawners.

In addition, set silkspawners.command.set.* to allow all entities or replace the star with an entity name.

  • silkspawners.command.explosion - Use this command to temporarily enable or disable spawner explosions for a specific player.
  • silkspawners.command.locale - Use this command to reload and update locale files.
  • silkspawners.command.config - Use this command to reload the configuration.
  • silkspawners.command.entities - Use this command to see the entities you can use in permissions and commands.
  • silkspawners.command.version - Use this command to see if updates are available.

Spawners

  • silkspawners.break.* - Permission to set if players will receive destroyed spawners.
  • silkspawners.place.* - Permission to set if players can place silk spawners.
  • silkspawners.change.* - Permission to set if players can change spawners with eggs.
  • silkspawners.explosion - If set, spawner explosion is enabled.

If you want to allow only specific types of spawners you can replace the * with an entity name. Use the entities command to see spawnable entities.

Configuration

Default configuration:

messages:
  prefix: $8[$bSilkSpawners$8] # The plugin prefix used in all messages
  locale: en # The locale file to be used
spawner:
  dropChance: 100 # Probability that the spawner will drop when mined (0-100)
  destroyable: true  # If set to false, it won't be possible to destroy spawners without SilkTouch or without the permission
  pickaxeRequired: true # If set to false, spawners will always drop regardless of what the player is holding in his hand
  silktouchRequired: true # If set to false, spawners will drop even if the used pickaxe does not have SilkTouch
  silktouchLevel: 1 # The minimum SilkTouch level the pickaxe needs to mine spawners (useful for custom pickaxes with higher enchantment levels)
  item:
    name: $d{entity} Spawner # The name of the spawner item dropped, {entity} is replaced with the mob name
    color: $e # The color of the mob name in chat messages
    prefix: $7Spawns $e # The text before the mob name in the lore
    prefixOld: [] # If you change your prefix, add the previous value to this list to keep existing spawners functional
    lore: [] # Set an array for this value to set a custom lore
  explosion:
    all: [] # Explosion tiers rolled whenever spawners are mined, with or without SilkTouch (see below)
    normal: [] # Explosion tiers rolled when spawners are mined without SilkTouch (see below)
    silktouch: [] # Explosion tiers rolled when spawners are mined with SilkTouch (see below)
  message:
    denyDestroy: true # If set to true, a message will be sent to the player if the spawner cannot be destroyed
    denyPlace: true # If set to true, a message will be sent to the player if the spawner cannot be placed
    denyChange: true # If set to true, a message will be sent to the player if the spawner cannot be changed
  permission:
    disableDestroy: false # If set to true, no permission is required to receive destroyed spawners
    disablePlace: false # If set to true, no permission is required to place spawners
    disableChange: false # If set to true, no permission is required to change spawners with eggs
update:
  configVersion: 4 # Do not change this value manually! It is automatically managed by the plugin
  check:
    enabled: true # If set to true, the plugin will check for updates
    interval: 24 # The interval in hours at which to check for updates
hooks:
  shopguiplus: true # If set to true, SilkSpawners will hook into ShopGUI+ if it is installed

If you want to use a dollar sign in a value, you can escape it by putting a backslash in front of it.

All messages (in the configuration and in locale files) can be formatted with either legacy color codes or MiniMessage tags. Mixing both formats within the same message is not supported.

Explosion tiers:

explosion.normal and explosion.silktouch each take a list of tiers, and explosion.all tiers apply on top of both. On each break (by a player with silkspawners.explosion), one roll picks at most one tier: each tier's chance is its percentage share and must have a power. Shares under 100% leave the remainder as no explosion (power: 0 is an explicit no-explosion share); shares over 100% are scaled down proportionally. A silktouch explosion fires before the item drops, so it never destroys the drop. The example below gives 50% a small explosion, 30% a large one and 10% a massive one that ignites fires:

spawner:
  explosion:
    normal:
    - chance: 50 # This tier's share of a single roll, in percent (decimals allowed, default 100)
      power: 2.0 # Required: the explosion strength (TNT is 4.0); 0 means no explosion
    - chance: 30
      power: 4.0
    - chance: 10
      power: 8.0
      setFire: true # Optional: the explosion ignites fires (default false)
      breakBlocks: true # Optional: the explosion damages surrounding blocks (default true)

Changes to the tiers take effect after /silkspawners config reload or a server restart.

Custom messages

To protect your locale files from unwanted overwriting, you must manually update the locale files with the /silkspawners locale command after an update.

If you want to create your own locale file, you should create a new file to prevent your changes from being overwritten when you update the locale files. Locale files must be named accordingly to the messages_myfile.properties naming schema and can be used by setting myfile as locale.

If you have created your own translation, it would be awesome if you could submit it at our translation program, so other people can use it too.

FAQ

Common questions and problems are answered in the FAQ.

Integrations

EconomyShopGUI

EconomyShopGUI supports SilkSpawners out of the box, so spawners bought and sold in its shops are SilkSpawners items. Its spawner-provider option detects SilkSpawners automatically when set to AUTO (the default), or can be pinned with spawner-provider: SILKSPAWNERSV2.

ShopGUI+

If ShopGUI+ is installed, SilkSpawners automatically registers itself as its spawner provider, so spawners bought and sold in shops are SilkSpawners items. The hook can be disabled by setting hooks.shopguiplus to false in the configuration.

For developers

SilkSpawners provides a developer API (via JitPack) with a SilkSpawnersAPI service and custom Bukkit events. See the Developer documentation and the Javadoc for details.

Tutorial

SilkSpawners Tutorial

Thanks to KasaiSora for creating this great tutorial!

Statistics

Statistics Statistics from bStats

About

SilkSpawners - A Minecraft plugin to make Spawners mineable

Topics

Resources

License

Contributing

Stars

20 stars

Watchers

2 watching

Forks

Contributors