JustEli / Coins

[Minecraft/Spigot] This plugin drops coins for killing mobs and mining. Includes a withdraw system. Can be used for drop parties. Highly configurable.
GNU General Public License v3.0
14 stars 24 forks source link

Armor stands drop coins if `dropWithAnyDeath: true` #31

Closed juzuuwastaken closed 3 years ago

juzuuwastaken commented 3 years ago

Version: Latest 1.16.4 Spigot

Minecraft: 1.16.4

Issue: Killing an armor stand drops coins

JustEli commented 3 years ago

can you provide

in the meantime you can set

mobMultiplier:
  ARMOR_STAND: 0
juzuuwastaken commented 3 years ago

Sure!

Config

# # # # # # # # # # # # # # # #
#   Configuration for Coins   #
# # # # # # # # # # # # # # # #

# What language should the plugin use? And what is your server's currency?
# All available languages can be found in folder 'languages' in the plugin folder.
# Included languages by default: english, dutch, german, french, spanish, swedish, italian, chinese & hungarian.
language: english
currencySymbol: "$"

# You aren't really going to notice this, but in hoppers you can see its name.
# See a list of all color codes here: http://minecraft.gamepedia.com/Formatting_codes
# 'multiSuffix's parameter will be added behind 'nameOfCoin' in case it's more than one coin.
nameOfCoin: "&6Coin"
multiSuffix: "s"

# What item will the dropped 'coin' (material) be? Find all materials at:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
coinItem: coin     # coin = sunflower

# Should the coin have an enchanted effect?
enchantedCoin: false

# You can also set a custom texture for the coin, as skull. Filling this will disable 'coinItem'.
# Find textures here (example): https://minecraft-heads.com/custom-heads/decoration/3005-money-bag
# Input the string from "Other > Value" at the bottom of the page, it's a 'texture value'.
# In case of the example, that would be the one starting with "eyJ0ZXh0dXJl[...]".
skullTexture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjBhN2I5NGM0ZTU4MWI2OTkxNTlkNDg4NDZlYzA5MTM5MjUwNjIzN2M4OWE5N2M5MzI0OGEwZDhhYmM5MTZkNSJ9fX0"

# This message is sent as action bar, telling the player how much money they have picked up.
# The variable {$} will be replaced by the 'currencySymbol', default: $.
pickupMessage: "&e+ &6{$}%amount%"

# This plugin will drop one coin, being worth what's set at 'moneyAmount'. But here you can
# set that a mob should drop 'moneyAmount's AMOUNT of coins, with each coin being worth $1.
dropEachCoin: true

# Also drop coins when the mob is NOT killed by a player?
# That means that any death cause will cause the mob to drop coins, not just players!
dropWithAnyDeath: true

# The amount of money one coin is worth. Creates a random number between
# 'from' and 'to' which - as money - will be given to the player on pickup.
# However, if 'dropEachCoin' is set to true, killed mobs will drop 'from' to 'to' coins,
# with each coin being worth $1. So by default it will drop 3 to 7 coins when 'dropEachCoin' is true.
moneyAmount:
  from: 3.0
  to: 10.0

# How many decimals should money have? Set to 0 for integers/rounded money (i.e. $3 $6 $8).
# Value 1 (default) means i.e. $2.3 $5.8 $8.0, value of 2 means i.e. $5.23, $3.70, $6.99, etc.
# This setting will be ignored (and set to 0) if 'dropEachCoin' is set to true.
moneyDecimals: 1

# Should coins be stacked? (Or should a coin be one on its own?)
# Stacked coins don't act like one coin. The stack is counted and the worth is multiplied.
# Not stacking coins is just for a cooler effect.
# This setting will be ignored (and set to false) if 'dropEachCoin' is set to true.
stackCoins: false

# The minimum percentage of damage a player needs to deal to a mob to drop coins.
# This can be useful for one-hit mob grinders that damage mobs by i.e. fall damage.
# Value from 0.0 to 1.0: 0.0 meaning 0%, 1.0 meaning 100% (so 0.9 meaning 90%).
# This feature does not work for Minecraft version 1.8.x.
percentagePlayerHit: 0.9

# Disable hoppers to pick up any kind of coins.
disableHoppers: false

# Put the amount of coins dropped for a specific mob here, by default: mobs drop one coin.
# ENDER_DRAGON is added by default, meaning that on kill of Ender Dragon, 64 coins drop.
# Set a mob type to 0 (i.e. 'BAT: 0') to disable coins for that specific type.
# You can find mob types via this URL (types that aren't creatures will be ignored):
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
mobMultiplier:
  ENDER_DRAGON: 50
  WITHER: 20
  PLAYER: 3

# When a player gets killed by another player, should (three; setting above) coins drop?
playerDrop: true

# And should coins NOT drop when both players have the same ip address?
# This means that no coin(s) will be dropped if both players are from the same computer.
# This prevents spam killing for unlimited money, unless you use this plugin for a local server.
preventAlts: true

# Should mobs from spawners drop a coin too?
# Mobs from spawners won't drop a coin by default.
# When 'false', mobs can still drop coins when the player (who killed) has permission: 'coins.spawner'.
spawnerDrop: true

# Should passive mobs also drop a coin?
# Passive mobs don't drop a coin by default.
passiveDrop: true

# Prevent slimes and magma cubes spawned by splits from dropping coins?
# I've noticed that players can easily get hundreds of coins in slime chunks keeping this 'false'.
preventSplits: true

# Play a sound on pickup of a coin.
# This sound is a 1.9+ sound, if you use 1.8, put another sound in there.
# If the sound name remains untouched, and you use 1.8, it will do an 1.8 sound automatically for you.
# Here is a list of 1.9+ sounds: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
pickupSound: true
soundName: "ITEM_ARMOR_EQUIP_GOLD"
soundPitch: 0.3
soundVolume: 0.5

# Chance of dropping a coin after a mob has been killed.
# Value from 0.0 to 1.0: 0.0 meaning 0%, 1.0 meaning 100% (so 0.9 meaning 90%).
dropChance: 1.0

# Set the amount of kills per location before coins stop dropping. Useful for overuse of grinders.
# Default: 1, after 1 kill at X Y Z, it won't drop coins there for two hours. Disable by inputting 0.
limitForLocation: 1

# List all worlds you want Coins to be disabled in here.
# Example for disabling two worlds called 'creative' and 'plots':
#    disabledWorlds:
#    - plots
#    - creative
disabledWorlds: []

# This value sets the Custom Model Data value for the coin. This can be used for custom textures.
# Default: 0 (disables the feature) You are probably only interested if you use a custom texture pack.
customModelData: 0

# Lets players use /withdraw <amount> to get a coin "<amount> <coin name>s": for example "53 Coins".
# This allows players to store the coins in chests, but won't be easier to give to others.
# When the coin gets dropped, and picked up after, give the player the amount of money the coin was worth.
enableWithdraw: true
maxWithdrawAmount: 10000.0

# Drop coins for mined blocks. What's the chance? (0.2 = 20% = 1 coin per 5 /experience/ blocks mined)
minePercentage: 0.3

# Only drop coins by the given chance for blocks that drop experience, like: lapis, iron, spawners.
onlyExperienceBlocks: true

# Should players lose money on death?
# It shows a title (in the middle of the screen) how much they lost on death.
loseOnDeath: true

# If so, how much will be taken? A random integer in between 10 and 30 by default.
moneyTaken:
  from: 10
  to: 30

# Should we take the *amount* of money from them, or the *percentage* of their money?
# Amount of 10 to 30 would be $10 to $30. Percentage of 10 to 30 would be 10% to 30%.
takePercentage: true

# And should the money be dropped, or just disappear? Disappears by default.
dropOnDeath: false

# The message in the middle of their screen.
deathMessage: "&4- &c{$}%amount%"

Plugin Ver

1.10.1

Yes, it always happens

Server Version:

1.16.4 Spigot

Also another bug i've found, i set my coins to a custom player head, but when it drops, the mobs can pick them up and put it as a helmet which i find a bit funny.

joex92 commented 3 years ago

@juzuuwastaken you now, there is a way to add code to comments, just add ``` in the beginning in a new line and at the end in a new line as well and it would look like this:

Sure!

Config

# # # # # # # # # # # # # # #
# Configuration for Coins
# # # # # # # # # # # # # # #
# What language should the plugin use? And what is your server's currency?
# All available languages can be found in folder 'languages' in the plugin folder.
# Included languages by default: english, dutch, german, french, spanish, swedish, italian, chinese & hungarian.
language: english
currencySymbol: "$"

# You aren't really going to notice this, but in hoppers you can see its name.
# See a list of all color codes here: http://minecraft.gamepedia.com/Formatting_codes
# 'multiSuffix's parameter will be added behind 'nameOfCoin' in case it's more than one coin.
nameOfCoin: "&6Coin"
multiSuffix: "s"

# What item will the dropped 'coin' (material) be? Find all materials at:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
coinItem: coin # coin = sunflower

# Should the coin have an enchanted effect?
enchantedCoin: false

# You can also set a custom texture for the coin, as skull. Filling this will disable 'coinItem'.
# Find textures here (example): https://minecraft-heads.com/custom-heads/decoration/3005-money-bag
# Input the string from "Other > Value" at the bottom of the page, it's a 'texture value'.
# In case of the example, that would be the one starting with "eyJ0ZXh0dXJl[...]".
skullTexture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjBhN2I5NGM0ZTU4MWI2OTkxNTlkNDg4NDZlYzA5MTM5MjUwNjIzN2M4OWE5N2M5MzI0OGEwZDhhYmM5MTZkNSJ9fX0"

# This message is sent as action bar, telling the player how much money they have picked up.
# The variable {$} will be replaced by the 'currencySymbol', default: $.
pickupMessage: "&e+ &6{$}%amount%"

# This plugin will drop one coin, being worth what's set at 'moneyAmount'. But here you can
# set that a mob should drop 'moneyAmount's AMOUNT of coins, with each coin being worth $1.
dropEachCoin: true

# Also drop coins when the mob is NOT killed by a player?
# That means that any death cause will cause the mob to drop coins, not just players!
dropWithAnyDeath: true

# The amount of money one coin is worth. Creates a random number between
# 'from' and 'to' which - as money - will be given to the player on pickup.
# However, if 'dropEachCoin' is set to true, killed mobs will drop 'from' to 'to' coins,
# with each coin being worth $1. So by default it will drop 3 to 7 coins when 'dropEachCoin' is true.
moneyAmount:
from: 3.0
to: 10.0

# How many decimals should money have? Set to 0 for integers/rounded money (i.e. $3 $6 $8).
# Value 1 (default) means i.e. $2.3 $5.8 $8.0, value of 2 means i.e. $5.23, $3.70, $6.99, etc.
# This setting will be ignored (and set to 0) if 'dropEachCoin' is set to true.
moneyDecimals: 1

# Should coins be stacked? (Or should a coin be one on its own?)
# Stacked coins don't act like one coin. The stack is counted and the worth is multiplied.
# Not stacking coins is just for a cooler effect.
# This setting will be ignored (and set to false) if 'dropEachCoin' is set to true.
stackCoins: false

# The minimum percentage of damage a player needs to deal to a mob to drop coins.
# This can be useful for one-hit mob grinders that damage mobs by i.e. fall damage.
# Value from 0.0 to 1.0: 0.0 meaning 0%, 1.0 meaning 100% (so 0.9 meaning 90%).
# This feature does not work for Minecraft version 1.8.x.
percentagePlayerHit: 0.9

# Disable hoppers to pick up any kind of coins.
disableHoppers: false

# Put the amount of coins dropped for a specific mob here, by default: mobs drop one coin.
# ENDER_DRAGON is added by default, meaning that on kill of Ender Dragon, 64 coins drop.
# Set a mob type to 0 (i.e. 'BAT: 0') to disable coins for that specific type.
# You can find mob types via this URL (types that aren't creatures will be ignored):
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
mobMultiplier:
ENDER_DRAGON: 50
WITHER: 20
PLAYER: 3

# When a player gets killed by another player, should (three; setting above) coins drop?
playerDrop: true

# And should coins NOT drop when both players have the same ip address?
# This means that no coin(s) will be dropped if both players are from the same computer.
# This prevents spam killing for unlimited money, unless you use this plugin for a local server.
preventAlts: true

# Should mobs from spawners drop a coin too?
# Mobs from spawners won't drop a coin by default.
# When 'false', mobs can still drop coins when the player (who killed) has permission: 'coins.spawner'.
spawnerDrop: true

# Should passive mobs also drop a coin?
# Passive mobs don't drop a coin by default.
passiveDrop: true

# Prevent slimes and magma cubes spawned by splits from dropping coins?
# I've noticed that players can easily get hundreds of coins in slime chunks keeping this 'false'.
preventSplits: true

# Play a sound on pickup of a coin.
# This sound is a 1.9+ sound, if you use 1.8, put another sound in there.
# If the sound name remains untouched, and you use 1.8, it will do an 1.8 sound automatically for you.
# Here is a list of 1.9+ sounds: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
pickupSound: true
soundName: "ITEM_ARMOR_EQUIP_GOLD"
soundPitch: 0.3
soundVolume: 0.5

# Chance of dropping a coin after a mob has been killed.
# Value from 0.0 to 1.0: 0.0 meaning 0%, 1.0 meaning 100% (so 0.9 meaning 90%).
dropChance: 1.0

# Set the amount of kills per location before coins stop dropping. Useful for overuse of grinders.
# Default: 1, after 1 kill at X Y Z, it won't drop coins there for two hours. Disable by inputting 0.
limitForLocation: 1

# List all worlds you want Coins to be disabled in here.
# Example for disabling two worlds called 'creative' and 'plots':
# disabledWorlds:
# - plots
# - creative
disabledWorlds: []

# This value sets the Custom Model Data value for the coin. This can be used for custom textures.
# Default: 0 (disables the feature) You are probably only interested if you use a custom texture pack.
customModelData: 0

# Lets players use /withdraw to get a coin " s": for example "53 Coins".
# This allows players to store the coins in chests, but won't be easier to give to others.
# When the coin gets dropped, and picked up after, give the player the amount of money the coin was worth.
enableWithdraw: true
maxWithdrawAmount: 10000.0

# Drop coins for mined blocks. What's the chance? (0.2 = 20% = 1 coin per 5 /experience/ blocks mined)
minePercentage: 0.3

# Only drop coins by the given chance for blocks that drop experience, like: lapis, iron, spawners.
onlyExperienceBlocks: true

# Should players lose money on death?
# It shows a title (in the middle of the screen) how much they lost on death.
loseOnDeath: true

# If so, how much will be taken? A random integer in between 10 and 30 by default.
moneyTaken:
from: 10
to: 30

# Should we take the _amount_ of money from them, or the _percentage_ of their money?
# Amount of 10 to 30 would be $10 to $30. Percentage of 10 to 30 would be 10% to 30%.
takePercentage: true

# And should the money be dropped, or just disappear? Disappears by default.
dropOnDeath: false

# The message in the middle of their screen.
deathMessage: "&4- &c{$}%amount%"

#Plugin Ver
1.10.1

Yes, it always happens

Server Version:

1.16.4 Spigot

Also another bug i've found, i set my coins to a custom player head, but when it drops, the mobs can pick them up and put it as a helmet which i find a bit funny.

readable and understandable...

JustEli commented 3 years ago

alright i found the issue, it's coming from dropWithAnyDeath i'll fix it when i have more time in a week or so

meanwhile, as mentioned before, you can do this:

mobMultiplier:
    ARMOR_STAND: 0
juzuuwastaken commented 3 years ago

@juzuuwastaken you now, there is a way to add code to comments, just add ``` in the beginning in a new line and at the end in a new line as well and it would look like this:

Sure!

Config

# # # # # # # # # # # # # # #
# Configuration for Coins
# # # # # # # # # # # # # # #
# What language should the plugin use? And what is your server's currency?
# All available languages can be found in folder 'languages' in the plugin folder.
# Included languages by default: english, dutch, german, french, spanish, swedish, italian, chinese & hungarian.
language: english
currencySymbol: "$"

# You aren't really going to notice this, but in hoppers you can see its name.
# See a list of all color codes here: http://minecraft.gamepedia.com/Formatting_codes
# 'multiSuffix's parameter will be added behind 'nameOfCoin' in case it's more than one coin.
nameOfCoin: "&6Coin"
multiSuffix: "s"

# What item will the dropped 'coin' (material) be? Find all materials at:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
coinItem: coin # coin = sunflower

# Should the coin have an enchanted effect?
enchantedCoin: false

# You can also set a custom texture for the coin, as skull. Filling this will disable 'coinItem'.
# Find textures here (example): https://minecraft-heads.com/custom-heads/decoration/3005-money-bag
# Input the string from "Other > Value" at the bottom of the page, it's a 'texture value'.
# In case of the example, that would be the one starting with "eyJ0ZXh0dXJl[...]".
skullTexture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjBhN2I5NGM0ZTU4MWI2OTkxNTlkNDg4NDZlYzA5MTM5MjUwNjIzN2M4OWE5N2M5MzI0OGEwZDhhYmM5MTZkNSJ9fX0"

# This message is sent as action bar, telling the player how much money they have picked up.
# The variable {$} will be replaced by the 'currencySymbol', default: $.
pickupMessage: "&e+ &6{$}%amount%"

# This plugin will drop one coin, being worth what's set at 'moneyAmount'. But here you can
# set that a mob should drop 'moneyAmount's AMOUNT of coins, with each coin being worth $1.
dropEachCoin: true

# Also drop coins when the mob is NOT killed by a player?
# That means that any death cause will cause the mob to drop coins, not just players!
dropWithAnyDeath: true

# The amount of money one coin is worth. Creates a random number between
# 'from' and 'to' which - as money - will be given to the player on pickup.
# However, if 'dropEachCoin' is set to true, killed mobs will drop 'from' to 'to' coins,
# with each coin being worth $1. So by default it will drop 3 to 7 coins when 'dropEachCoin' is true.
moneyAmount:
from: 3.0
to: 10.0

# How many decimals should money have? Set to 0 for integers/rounded money (i.e. $3 $6 $8).
# Value 1 (default) means i.e. $2.3 $5.8 $8.0, value of 2 means i.e. $5.23, $3.70, $6.99, etc.
# This setting will be ignored (and set to 0) if 'dropEachCoin' is set to true.
moneyDecimals: 1

# Should coins be stacked? (Or should a coin be one on its own?)
# Stacked coins don't act like one coin. The stack is counted and the worth is multiplied.
# Not stacking coins is just for a cooler effect.
# This setting will be ignored (and set to false) if 'dropEachCoin' is set to true.
stackCoins: false

# The minimum percentage of damage a player needs to deal to a mob to drop coins.
# This can be useful for one-hit mob grinders that damage mobs by i.e. fall damage.
# Value from 0.0 to 1.0: 0.0 meaning 0%, 1.0 meaning 100% (so 0.9 meaning 90%).
# This feature does not work for Minecraft version 1.8.x.
percentagePlayerHit: 0.9

# Disable hoppers to pick up any kind of coins.
disableHoppers: false

# Put the amount of coins dropped for a specific mob here, by default: mobs drop one coin.
# ENDER_DRAGON is added by default, meaning that on kill of Ender Dragon, 64 coins drop.
# Set a mob type to 0 (i.e. 'BAT: 0') to disable coins for that specific type.
# You can find mob types via this URL (types that aren't creatures will be ignored):
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
mobMultiplier:
ENDER_DRAGON: 50
WITHER: 20
PLAYER: 3

# When a player gets killed by another player, should (three; setting above) coins drop?
playerDrop: true

# And should coins NOT drop when both players have the same ip address?
# This means that no coin(s) will be dropped if both players are from the same computer.
# This prevents spam killing for unlimited money, unless you use this plugin for a local server.
preventAlts: true

# Should mobs from spawners drop a coin too?
# Mobs from spawners won't drop a coin by default.
# When 'false', mobs can still drop coins when the player (who killed) has permission: 'coins.spawner'.
spawnerDrop: true

# Should passive mobs also drop a coin?
# Passive mobs don't drop a coin by default.
passiveDrop: true

# Prevent slimes and magma cubes spawned by splits from dropping coins?
# I've noticed that players can easily get hundreds of coins in slime chunks keeping this 'false'.
preventSplits: true

# Play a sound on pickup of a coin.
# This sound is a 1.9+ sound, if you use 1.8, put another sound in there.
# If the sound name remains untouched, and you use 1.8, it will do an 1.8 sound automatically for you.
# Here is a list of 1.9+ sounds: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
pickupSound: true
soundName: "ITEM_ARMOR_EQUIP_GOLD"
soundPitch: 0.3
soundVolume: 0.5

# Chance of dropping a coin after a mob has been killed.
# Value from 0.0 to 1.0: 0.0 meaning 0%, 1.0 meaning 100% (so 0.9 meaning 90%).
dropChance: 1.0

# Set the amount of kills per location before coins stop dropping. Useful for overuse of grinders.
# Default: 1, after 1 kill at X Y Z, it won't drop coins there for two hours. Disable by inputting 0.
limitForLocation: 1

# List all worlds you want Coins to be disabled in here.
# Example for disabling two worlds called 'creative' and 'plots':
# disabledWorlds:
# - plots
# - creative
disabledWorlds: []

# This value sets the Custom Model Data value for the coin. This can be used for custom textures.
# Default: 0 (disables the feature) You are probably only interested if you use a custom texture pack.
customModelData: 0

# Lets players use /withdraw to get a coin " s": for example "53 Coins".
# This allows players to store the coins in chests, but won't be easier to give to others.
# When the coin gets dropped, and picked up after, give the player the amount of money the coin was worth.
enableWithdraw: true
maxWithdrawAmount: 10000.0

# Drop coins for mined blocks. What's the chance? (0.2 = 20% = 1 coin per 5 /experience/ blocks mined)
minePercentage: 0.3

# Only drop coins by the given chance for blocks that drop experience, like: lapis, iron, spawners.
onlyExperienceBlocks: true

# Should players lose money on death?
# It shows a title (in the middle of the screen) how much they lost on death.
loseOnDeath: true

# If so, how much will be taken? A random integer in between 10 and 30 by default.
moneyTaken:
from: 10
to: 30

# Should we take the _amount_ of money from them, or the _percentage_ of their money?
# Amount of 10 to 30 would be $10 to $30. Percentage of 10 to 30 would be 10% to 30%.
takePercentage: true

# And should the money be dropped, or just disappear? Disappears by default.
dropOnDeath: false

# The message in the middle of their screen.
deathMessage: "&4- &c{$}%amount%"

#Plugin Ver
1.10.1

Yes, it always happens

Server Version:

1.16.4 Spigot Also another bug i've found, i set my coins to a custom player head, but when it drops, the mobs can pick them up and put it as a helmet which i find a bit funny.

readable and understandable...

Sorry, i'm new to this whole github lol

joex92 commented 3 years ago

@juzuuwastaken don't worry, but at least now you know... 👍