CustomVillager
CustomVillager
Features
- Customize villager offers.
- Make villagers invulnerable.
- Confine villagers to prevent them from wandering.
- Protect villages.
- Change villagers professions.
- Name villagers.
Version 1.2 supports CB 1.7.2 through 1.7.9 (NMS and OCB 1_7_R1, 1_7_R2 and 1_7_R3).
Version 1.4 additionally supports CB 1.7.10 (NMS and OCB 1_7_R4).
I'm currently working on preventing the villager from updating offers.
About
Minecraft's native economy is the barter system. Arguably, its native currency is the emerald. CustomVillager extends the usefulness of the villager by allowing you to customize offers, give them god mode and prevent them from wandering.
Overview
First, spawn a villager by typing /cvspawn. Recipes are added by first adding buy and sell items. Type /cvbuy with an item in-hand. The item will be added to the recipe. Up to two buy items may be added to the recipe. Add one sell item using /cvsell. Finally, type /cvadd to add the recipe to the offers of the villager. To clear a recipe and start over, type /cvclear.
To select another villager, type /cvselect and then right-click a villager. To cancel selection, type /cvcancel.
Make a villager invulnerable by selecting it and then type /cvgod on. Without parameter, /cvgod will tell you if the selected villager is invulnerable. Vulnerable villagers can update their own offers as they naturally do in Minecraft, adding to them as they are used. Setting a villager to invulnerable will also prevent the offers from being changed by the server.
A villager's name may be changed using the /cvname command. A villager's profession may be changed using the /cvprofession command.
Permissions
All commands use permission: customvillager.* or OP.
Commands
- cvspawn [name] [profession]
- Spawns a villager at the player's location. Optionally name and profession may be specified in any order.
Possible professions are: FARMER, LIBRARIAN, PRIEST, BLACKSMITH, BUTCHER
- cvselect
- alias: cvs
- Select a villager. Type /cvs and then right-click a villager.
- cvcancel
- Cancel villager selection and restore selection to last selected villager.
- cvrelease
- Release or unselect a villager.
- cvkill
- Remove the selected villager.
- cvname [name]
- alias: cvn
- Name or if no parameter is provided, unname a villager.
- cvprofession [FARMER|LIBRARIAN|PRIEST|BLACKSMITH|BUTCHER]
- alias: cvp
- Set or display a villager profession.
- cvinvulnerable [on|off]
- alias: cvgod
- Set or when no parameter is provided, display vulnerability for selected villager.
- cvinventory
- alias: cvi
- List selected villagers inventory.
- cvbuy
- Add buy item/quantity in hand to recipe. Up to two items may be added to a buy.
- cvsell
- Add sell item in hand to recipe.
- cvclear
- Clear buy and sell items.
- cvadd
- Add recipe created with /cvbuy and /cvsell to selected villager's offers.
- cvdelete <index>
- Delete the inventory at index from selected villager's offers. Use /cvinventory to list villager's inventory.
- cvconfine
- alias: cvc
- Confine villager to player location.
This plugin seems awesome. Would there be a way of getting this to work on MCPC+ 1.5.2? I can only use version 1.0 and when I do I get "An internal error occurred while attempting to perform this command." I have tried messing about with some of the files but I think I am way out of my depth. Thanks
@Talavar
It is the 1.8 full spigot release, newest version. Hasn't worked with any of the 3 releases so far.
@Nepenthesis
Nepenthesis, Your version, is it the spigot 1.7.9 hack to 1.8, or full release? Im not sure when the 1.8 full came out.
Plugin is *NOT* working for me in the newest version of Spigot 1.8 as of right now. None of the commands work.
Working well on Spigot 1.8 however as "fluffy" here said, god mode or not, they still update recipes.
How do I make them stop learning new recipes after someone buys from them?
It would be AWESOME if you could do /cvc [number] to keep them within a certain radius! Like /cvc 5 <
stay within 5 blocks of that point :D@Chrisbotcom
I have spigot-1.7.9-1543 that is the version We are running. As well as we have other worlds not sure if this would make the plugin not to work? Seems I found another bug when I set up trade and do /cvbuy for the first trade it seem to work but when want to buy same items again seems I'm unable to for that villager.
Ex-cvbuy 1 Diamond 1 Gold cvsell 1 Dirt=works cvbuy 1 Diamond 1 Gold cvsell 1 stone=Dose not add the trade to the same villager Wonder maybe if you add chest Gui then this would work Another thing is can you set up when you do /cvgod mobs do not see the villager. thx I like plugin.
@themanrules81
Are you getting any errors from CustomVillager in your console. I'm not seeing the wandering problem any more. Also, do a /ver and paste your server version in reply. If anyone else is seeing this issue, please, chime in.
I will look into the chest idea. I feel the same way about adding inventory.
Thank you for the feedback.
@Chrisbotcom
This still seems not to be fixed in v1.4 where villagers wonder off when server seems to restart or chunks are unloaded any way you could fix this and do you think in next update you could just add where you shift click on villager it open up a chest to set up trades it make it faster thx.
@Logannineninenine
From the log, your Bukkit version is craftbukkit.jar:git-Bukkit-1.7.9-R0.1. I'll add that. Give me a few days to update and for it to get approved.
@CloudeLecaw
All permissions are customvillager.* or OP. I'll update the docs.
@Logannineninenine
Looks like I may need to add support for your version of Bukkit. Please, type "ver" at console and paste the result in a reply. I'll see if I can add support.
THIS IS THE REAL ERROR REPORT FROM BELOW! :
[13:58:36 ERROR]: Could not load 'plugins/CustomVillager.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException java.lang.UnsupportedClassVersionError io/github/chrisbotcom/customvillager/CustomVillager : Unsupported major.minor version 51.0
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugins(CraftServer.java:355) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.<init>(CraftServer.java:317) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at net.minecraft.server.v1_7_R3.PlayerList.<init>(PlayerList.java:68) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at net.minecraft.server.v1_7_R3.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:126) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
Caused by: java.lang.UnsupportedClassVersionError io/github/chrisbotcom/customvillager/CustomVillager : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.6.0_65]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) ~[?:1.6.0_65]
at java.lang.ClassLoader.defineClass(ClassLoader.java:621) ~[?:1.6.0_65]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) ~[?:1.6.0_65]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) ~[?:1.6.0_65]
at java.net.URLClassLoader.access$000(URLClassLoader.java:58) ~[?:1.6.0_65]
at java.net.URLClassLoader$1.run(URLClassLoader.java:197) ~[?:1.6.0_65]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.6.0_65]
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) ~[?:1.6.0_65]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) ~[?:1.6.0_65]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ~[?:1.6.0_65]
at java.lang.Class.forName0(Native Method) ~[?:1.6.0_65]
at java.lang.Class.forName(Class.java:249) ~[?:1.6.0_65]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
... 9 more
When I download this and put it in my plugins folder (and run the server), it gives me an error: bukkit could not load the plugin from plugins/CustomVillager
Blah blah blah.
plz help!
@MeLikeChoco
Oh, yeah. I see. I'll work that in. Another good idea!
@Chrisbotcom
No, like an option. Like if the name plates of this villager will always be shown or not.
@MeLikeChoco
Do you mean in the docs above?
@Chrisbotcom
You should also include whether or not nameplates are always shown.
@MeLikeChoco
Good point. Will do.