GithubHelp home page GithubHelp logo

timbru31 / silkspawners Goto Github PK

View Code? Open in Web Editor NEW
77.0 12.0 71.0 2.55 MB

โ› ๐Ÿท ๐Ÿ‘พ SilkSpawners plugin for CraftBukkit/Spigot

Home Page: https://dev.bukkit.org/projects/silkspawners

License: Other

Java 100.00%
spigot spigot-plugin bukkit bukkit-plugin craftbukkit minecraft silkspawners java spawner silkspawners-plugin

silkspawners's Introduction

SilkSpawners

Build Status Build the plugin

BukkitDev SpigotMC

License

Info

This Bukkit (compatible with CraftBukkit, Spigot, Paper) plugin adds a way to obtain the spawner with the corresponding mob when mined with Silk Touch enchanted pickaxes and offers a range of features to change, obtain or craft spawners, too.

  • Crafting of each spawner (own recipe for every mob if wanted)
  • Commands for player and console
  • Changing spawners with spawn eggs
  • Permissions support or OP fallback
  • Support for
    • Custom mobs added by client/server mods
    • Spawning any entity with spawn eggs (dragons, non-creature entities, etc.)
  • Compatible with
    • CraftBukkit++ and Spigot (see spawnersUnstackable)
    • MCPC(+) and ported mods (auto-detects IDs)
  • Flexible creature type names on input (pigman, zombiepigman, pigzombie, etc. all accepted), official names on output (Magma Cube, not "LavaSlime")
  • Localization
  • Economy addon SilkSpawnersEcoAddon
  • Shop addon SilkSpawnersShopAddon (login required, Premium Plugin)
  • BossBarAPI support for >= 1.9, otherwise BarAPI can be used
  • Support for multiple Minecraft versions, from 1.8.8 to 1.20.6 (with exlusion of 1.9 and 1.10)

Third party features, all of them can be disabled

License

This plugin is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. Please see LICENSE.md for more information.

Standard config

# See documentation at https://dev.bukkit.org/projects/silkspawners/pages/configuration

# Should the plugin automatically update if an update is available?
autoUpdater: true

# Should a permission be required when a spawner explodes by TNT to achieve a drop
permissionExplode: false

# Should be checked for WorldGuard build ability to change spawners
useWorldGuard: true

# Percentage of dropping a spawner block when TNT or creepers explode
explosionDropChance: 30

# Percentage of dropping a iron bars when a spawner is mined
destroyDropChance: 100

# Percentage of dropping an egg when a spawner is mined
eggDropChance: 100

# Percentage of dropping the spawner when mined
silkDropChance: 100

# When generic spawner items are placed, spawn this creature (e.g. from /give or other plugins)
# PIG (90) is Minecraft default (put NAMES or IDs (for Minecraft <1.13 here!)
defaultCreature: pig

# How far is the spawner reachable with your crosshair (disable with -1)
spawnerCommandReachDistance: 6

# Minimum silk touch level [can be changed via other plugins to a higher value]
# Set it to 0 to mine it without silk touch
minSilkTouchLevel: 1

# If a player in creative destroys a spawner nothing is dropped
noDropsCreative: true

# If a spawner is destroyed, should the egg be dropped
destroyDropEgg: false

# If a spawner is destroyed, should XP be dropped
destroyDropXP: 0

# If a spawner is mined, should it be directly added to the inventory of the player
dropSpawnerToInventory: false

# Amount of spawners to be dropped when mined with valid silk touch
dropAmount: 1

# Flag a spawner as already mined to prevent XP duping
preventXPFarming: true

# Drops XP only when a spawner is destroyed and not mined via SilkTouch
dropXPOnlyOnDestroy: false

# If a spawner is destroyed, should iron bars be dropped
destroyDropBars: 0

# Should the player be able to craft spawners
craftableSpawners: false

# Leave a slot empty (null/air)? Just make a space then, example 'A A' -> middle is free
# X is always the egg
recipeTop: AAA
recipeMiddle: AXA
recipeBottom: AAA
recipeAmount: 1

# Custom example:
#recipeTop: 'A A'
#recipeMiddle: 'BXA'
#recipeBottom: 'C D'
#ingredients:
#  - 'A,IRON_FENCE'
#  - 'B,DIRT'
#  - 'C,2'
#  - 'D,5'

# You can put IDs or the NAME here (please uppercase)
# Add it for each custom ingredient you add, too!
ingredients:
  - A,IRON_FENCE

# Should spawners be unstackable
spawnersUnstackable: false

# Should the egg be consumed when the spawner is changed with it
consumeEgg: true

# Fallback if the creature should be enabled, if not specified for the entity
enableCreatureDefault: true

# Disable left click to change spawners, spawns a mob instead. Still blocks Vanilla right click behavior.
disableChangeTypeWithEgg: false

# Should instead of spawning a mob a MonsterSpawner be placed? (Uses consumeEgg value, too)
spawnEggToSpawner: false

# Should the spawn algorithm be overridden? Allows spawning of non-standard entities
spawnEggOverride: false

# Fallback if the creature should be spawned, if not specified for the entity
spawnEggOverrideSpawnDefault: true

# Allowed set of tools which can mine a spawner. IDs are supported, too
allowedTools:
  - WOOD_PICKAXE
  - STONE_PICKAXE
  - IRON_PICKAXE
  - GOLD_PICKAXE
  - DIAMOND_PICKAXE
  - NETHERITE_PICKAXE

# Amount of spawners or eggs given to a player when the argument is omitted
defaultAmountGive: 1

# Notify the player about the spawner when he clicks it in the inventory
notifyOnClick: true

# Notify the player about the spawner when he holds the spawner in the hand
notifyOnHold: true

# Configure displaying with BarAPI, time is in seconds
barAPI:
  enable: false
  displayTime: 3

# Configure displaying with 1.9 BossBarApi, time is in seconds
vanillaBossBar:
  enable: true
  displayTime: 3

  # Valid colors are BLUE, GREEN, PINK, PURPLE, RED, WHITE, YELLOW
  color: RED

  # Valid styles are SEGMENTED_10, SEGMENTED_12, SEGMENTED_20, SEGMENTED_6, SOLID
  style: SOLID

# Prevent that a spawner is changed via eggs in other territories. Supported are Factions, Faction3 and FactionsUUID
factionsSupport: false

# If the inventory of a player is full, drop spawners/eggs from /ss give on the ground
spillSpawnersFromCommands: false

# Check for spigot.yml and paper.yml flags that conflict with SilkSpawners
checkForNerfFlags: true

# Puts more information out on startup and interactions, such as block placement and breaking
verboseMode: false

# Internal stuff, do NOT change unless advised - the plugin might break otherwise
useReflection: true
testMCVersion: true
useMetadata: true

Commands

Aliases:

  • silkspawners
  • silkspawner
  • ss
  • spawner
  • silk
  • spawnersilk
  • egg
  • eggs
  • eg
Command Description
/ss help Displays the help menu.
/ss list|all Displays all available creatures.
/ss view|info Displays information about the viewed spawner.
/ss reload|rl Reloads the configuration files.
/ss change|set <newMob> Changes the spawner you are currently holding or viewing at.
/ss give|add <player> <mob> [amount] Gives a spawner or egg to the player. Amount is optional.
/ss selfget|i <mob> [amount] Gives a spawner or egg to you. Amount is optional.

Permissions

(Fallback to OPs, if no permissions system is found)

  • Grant either wild card permission for all mobs (use the star [*])
  • or define per mob permissions by using creature and replace it with a real mob name.
    • spaces will be stripped out of names

General

Permission node Default Description
silkspawners.* false Grants access to all other permissions
silkspawners.info true See informative messages about the spawners as you place and break them
silkspawners.viewtype true View the spawner type using /spawner
silkspawners.reload op Reload the configs on the fly
silkspawners.explodedrop false Receive a drop when Spawner explodes via TNT (off by default, see permissionExplode)
silkspawners.list.* true Allows you to view the list of mobs in /ss list

Placing spawners

Permission node Default Description
silkspawners.place.* false Ability to place all spawners
silkspawners.place.creature false Ability to place a creature spawner

Crafting spawners

Permission node Default Description
silkspawners.craft.* false Ability to craft all spawners (if enabled)
silkspawners.craft.creature false Ability to craft a creature spawner (if enabled)

Mining spawners

Permission node Default Description
silkspawners.destroydrop.* false Allows you to destroy all mob spawners to acquire mob spawn eggs / iron bars / XP (as configured)
silkspawners.destroydrop.creature false Allows you to destroy mob a creature spawner to acquire mob spawn eggs / iron bars / XP (as configured)
silkspawners.silkdrop.* false Allows you to use silk touch to acquire all mob spawner items
silkspawners.silkdrop.creature false Allows you to use silk touch to acquire a creature mob spawner item
silkspawners.nosilk.* false Allows you to use any tool to acquire all mob spawner items
silkspawners.nosilk.creature false Allows you to use any tool to acquire a creature spawner items

Changing spawners

Permission node Default Description
silkspawners.changetype.* false Allows you to change all spawner types using /spawner creature
silkspawners.changetype.creature false Allows you to change a creature spawner type using /spawner creature
silkspawners.changetypewithegg.* false Allows you to change all spawner types by left-clicking with a spawn egg
silkspawners.changetypewithegg.creature false Allows you to change a creature spawner type by left-clicking with a spawn egg

Free spawners and eggs

Permission node Default Description
silkspawners.freeitem.* false Allows you to get all spawner items in your hand for free using /spawner creature
silkspawners.freeitem.creature false Allows you to get a creature spawner item in your hand for free using /spawner creature
silkspawners.freeitemegg.* false Allows you to get all spawner eggs in your hand for free using /egg creature
silkspawners.freeitemegg.creature false Allows you to get a creature spawner egg in your hand for free using /egg creature

Credits

  • mushroomhostage for the original SilkSpawners plugin
  • Thermo_Core alias Archarin for the logo
  • Kiracastle for the nice review
  • smsunrato for the review and Indonesian translation
  • Jeroendedoem for the Dutch translation
  • electronicboy and Chazza for the 1.14 and 1.15 support during my absence

Support

For support visit the Bukkit page, the SpigotMC thread or ask on Discord!

Reporting Bugs

Please open an issue and make sure to follow the issue template!

Pull Requests

Feel free to submit any PRs here. :)
Please follow the Sun Coding Guidelines, thanks!

Building

Unfortunately, I can't give access to https://repo.dustplanet.de/artifactory/private due to the DMCA of CraftBukkit and the prohibiton to distribute those or Spigot's binaries. To successfully build SilkSpawners using Maven, you must first run Spigot's BuildTools for several versions in order to compile each module - this will populate the local .m2 cache of yours.

mkdir -p BuildTools
cd BuildTools
wget -q https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
java -jar BuildTools.jar --rev 1.20.6 --remapped
java -jar BuildTools.jar --rev 1.20.4 --remapped
java -jar BuildTools.jar --rev 1.20.2 --remapped
java -jar BuildTools.jar --rev 1.20.1 --remapped
java -jar BuildTools.jar --rev 1.19.4 --remapped
java -jar BuildTools.jar --rev 1.19.3 --remapped
java -jar BuildTools.jar --rev 1.19.2 --remapped
java -jar BuildTools.jar --rev 1.18.2 --remapped
java -jar BuildTools.jar --rev 1.18.1 --remapped
java -jar BuildTools.jar --rev 1.17.1 --remapped
java -jar BuildTools.jar --rev 1.16.5
java -jar BuildTools.jar --rev 1.16.3
java -jar BuildTools.jar --rev 1.16.1
java -jar BuildTools.jar --rev 1.15.2
java -jar BuildTools.jar --rev 1.13.2
java -jar BuildTools.jar --rev 1.12.2
java -jar BuildTools.jar --rev 1.11.2
java -jar BuildTools.jar --rev 1.8.8

The final SilkSpawners.jar can now be generated by invoking mvn clean package. The location of this output can be found in the modules/SilkSpawners/target folder.

Usage statistics

Usage statistics

Data usage collection of bStats

Disabling bStats

The file ./plugins/bStats/config.yml contains an option to opt-out.

The following data is read and sent to https://bstats.org and can be seen under https://bstats.org/plugin/bukkit/SilkSpawners

  • Your server's randomly generated UUID
  • The amount of players on your server
  • The online mode of your server
  • The bukkit version of your server
  • The java version of your system (e.g. Java 8)
  • The name of your OS (e.g. Windows)
  • The version of your OS
  • The architecture of your OS (e.g. amd64)
  • The system cores of your OS (e.g. 8)
  • bStats-supported plugins
  • Plugin version of bStats-supported plugins

Donation

PayPal

BitCoin
1NnrRgdy7CfiYN63vKHiypSi3MSctCP55C

Support

In addition to reporting bugs here on GitHub you can join my Discord and ask your questions right away! Discord support

silkspawners's People

Stargazers

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

Watchers

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

silkspawners's Issues

Crafting permission also prevents buying spawners from custom villagers

https://github.com/timbru31/SilkSpawners/blob/master/src/main/java/de/dustplanet/silkspawners/listeners/SilkSpawnersInventoryListener.java#L63

This line only checks if the clicked slot is of type RESULT. However, other types of inventories have a result slot as well, like furnaces and villager trading windows (any maybe other inventory types as well).

This currently prevents not only crafting of spawners, but also trading (with customly setup villager trades).

Override recipe in mobs.yml section

When specified and the section does exist, override the custom recipe in the config.yml
Fallbacks are needed and it would be possible to have customAmounts, too

EnderDragons

Hmm, I thought in the 1.7 version I could change the spawners to EnderDragons. Do you plan to reimplement this or is it off the shelf for good? It doesn't seem to work in 1.8.

Crafting ingredient amount

Hi, i'm not sure if this is possible (at least without reflection) but would be nice to be able to set the ingredient amount of a recipe.
Example: 'B,DIRT,2'
Which would take 2 dirt in the recipe. I will search later if there's a way to do this but i'm suggesting it here anyway.

Potential compatibility issues with Dynamo

Originally reported via https://www.spigotmc.org/threads/69882/page-7#post-1690574

I just tested again with the latest SS version with Dynamo as discussed here: http://www.minecraftforum.net/forum...ally-spawning-seed-specific-structures?page=8

Dynamo creates spawners that spawn "minotaurs", "Spider Jockeys" (cave spiders riding normal spiders), "Frost Blaze" (a 'cold' version of Blaze) and other very cool, unique monsters. Unfortunately, it looks like SilkSpawners strips the EBT data so those revert to ordinary Zombie Pigmen, Skeletons, Blaze, and so on. Would it be possible to please see if the SilkSpawners plugin will preserve the unique data attached to the spawner?

--> Dynamo: http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/2584067-30-new-naturally-spawning-seed-specific-structures

Blaze spawner

Hey.
I'm using other spawner plugin, but I have one problem and I wonder if yours will solve this. Players can't mine blaze spawners in nether (that's good), but they can change it's type with an egg and then mine. Does you plugin block this?

Add no silktouch message

Can you add a configurable message to players that try to mine spawners without silktouch? Like right when they attempt to interact with the spawner, it displays "x" message?

Add debug mode and dump NBT data

It can be useful to have a dump of the NBT data of a block or item to examine why wrong mobs are spawning. An API of a paste service could be used to create correct pastes for better debugging

Identify cause of log message 'Skipping BlockEntity with id'

Originally reported in #28 by @AntZaro

When I log on and place spawners, these appear:

[08:39:48] [Server thread/WARN]: Skipping BlockEntity with id
[08:40:03] [Server thread/WARN]: Skipping BlockEntity with id
[08:40:21] [Server thread/WARN]: Skipping BlockEntity with id
[08:42:32] [Server thread/WARN]: Skipping BlockEntity with id

NO dropping items whatsoever

Any block, can not be dropped. Dirt, stone etc.

No errors in console.

Permission EX not even installed so permissions are not issue.

Please fix thankyou.

Configure drop at place event

Originally requested oliver276 from

Would there be a way for me to modify the item dropped by a SilkSpawner event (based on conditions within my plugin) [..]

slime spawner

slime spawner does not work, when placed there is no mob, and errors, I'm sure its just a missing space in code, current spawner is slimedisplayholographis

SilkTouch a spawner always gives the player a pig spawner

Spigot 1.8.7/PaperSpigot 1.8.7
EssentialsX

Latest version of SilkSpawners 3.6.6

I can use essentials to give me a different kind of spawner and place it into the world successfully.
When I silk touch the spawner I only get a pig spawner back.

Spawners changing to pigs when placed

Spigot 1.11 with SilkSpawners build off spigot page
Updated Spigot tonight and got Build #374
Same issue still
also Build #374 doesnt report version number when /ss help is called (like the changes say it will)

Spigot 1.8

Just an issue to note that Spigot 1.8 is released, Just wanted to make sure you was aware, and if there was any ETA on a release?

Thanks for the plugin, btw! ๐Ÿ‘

NO dropping items whatsoever

Any block, can not be dropped. Dirt, stone etc.

No errors in console.

Permission EX not even installed so permissions are not issue.

Please fix thankyou.

Add nosilk permission

Originally requested from BillyGalbreath via https://dev.bukkit.org/bukkit-plugins/silkspawners/?comment=1407

I'm looking, but I'm not finding any perm node or documentation on how to let certain players break/pickup spawners without silktouch tools. I've been using a plugin called PickUpSpawners which has a "nosilk" perm node to allow this, but its currently out of date and no signs of updating to 1.11. Does Silk Spawners have an equivalent? All I'm finding is all or none config setting for this.

EnderChest stacking issue

Reported from Fanikz via PM on SpigotMC

When I disable stacking for spawners they are still stackable in enderchests but the stacked spawners will dissapear.

Default localization.yml broken

I just downloaded this plugin on a small test server. The server had no issues at all before installation, and has very few plugins installed to begin with.

During the server startup, the following errors appear:
http://pastebin.com/WMmyP4pL

I am currently using a different spawner plugin on the main server, but it seems to be throwing entity errors. Since I saw SilkSpawners was updated so recently for 1.9.4, I thought there wouldn't be any errors like that. However, I still encountered these issues.

Changing eggs via commands is possible with changetypewithegg

Hello,

It seems anyone can change spawn eggs if they have this permmison: silkspawners.changetypewithegg.*

This permission is only meant to allow users to change spawners with the egg. Not allow them to change the spawner egg to what ever they like. If they hold a egg in there hand and do /ss change villager. it will change the egg to a villager egg.

Tried on the latest dev build. Even tried on the official release on bukkit.

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.