Stables
What does it do?
Stables is a plugin that assists with Horse ownership, protection, and other horse related things. Vanilla has no ownership or tracking of horses, only if it has been broken or not. Stables changes this behavior.
Important MC1.11 Notes!
This new version (1.9.11) MAY NOT WORK WITH OLDER MC VERSIONS! It has ONLY been tested with MC 1.11!
MC 1.11 changed a lot with horses. As of Stables v1.9.11, some changes must be made in order to accommodate Llamas, Donkeys, Mules, Zombie horses and Skeleton Horses. In your config.yml, In the "animals" section, you MUST add these to the "allowed" list. Anything NOT in the allowed list will NOT be covered by Stables! (example: allowed: HORSE, ZOMBIE_HORSE, SKELETON_HORSE, LLAMA, DONKEY)
Again, as far as 1.11 is concerned Mules, Donkeys, Zombie/Skeleton horses are NOT Horses, and must be entered SEPARATELY into the config!
As of right this moment, Llama carpet does NOT save. Testing of this version has been VERY limited. Please report any and all bugs via tickets - Be as specific in your reports as possible!
Another note: v1.9.11 will create a new table in your database for stored/stabled horses, and copy all the values over, converting what needs to be converted. For safety purposes, the old table will NOT be removed. It will just no longer be used. I would suggest NOT deleting it yourself for a bit, in case you need to restore a previous version.
All localization messages are still 'Horse' and 'Steed' specific. New default messages will be added in time. As always, you can edit them yourself in the 'language.yml' file.
Requirements
- To use COST based virtual stables, Vault is required. Free storage does not require any additional plugins.
Current Features
- Protect Horses from configurable outside damages, including PVP, Environmental (falling/lava) and Monsters
- Adds recipes for Horse Armor (Barding), Name Tags and Saddles
- Now has customizable recipes for these items!
- Adds 'ownership' to horses so others cannot steal them - Use a name tag on a horse to claim it!
- Store horses in virtual stables, and recover them!
- Abilities for Admin/Staff to Remove Ownership
- Sets a max amount of horses one player can own
- Anyone with the stables.admin permission can use horses without permission
- Allow a friend to ride a claimed horse
- Lure a horse from the wild using an item (defaults Golden Carrot - Other suggestions would be Emeralds, Golden Apples)
- Horse Spawning, including ZOMBIE and SKELETON horses!
- Teleport, Summon and Locate your claimed Horses!
- Allows staff to rename horses without changing ownership
- UUID storage for databases -
- Uses connections to 'api.mojang.com' and 'sessionserver.mojang.com' if UUID cannot be resolved on the server.
What's in store for new releases?
- Horse Trading
- (NPC) Races
- Horse purchasing (from NPC)
Permissions & Commands
Please see the Permissions & Config Page here.
How does it work?
Name a horse to claim it as your own. Hit it (as the owner) with a new Name Tag (un-renamed) to free it!
- To name a horse, you have to get a NAME TAG. Use the NAME TAG in an ANVIL and change it's name to what you want the horse to be called. Then USE (Right Click) The Horse with the NAMED NAME TAG to name it. This is a VANILLA MINECRAFT feature - it is not included with Stables. This action, however, is what will claim a horse with the Stables plugin.
- You can also set the config to 'AutoOwn = true' - This will automatically claim a horse as soon as it is tamed!
Stables also prevents horses from being killed by players, mobs, environmental, or any combination of these. All options are 100% toggle-able through the config.
Virtual Stables
This feature can be disabled by the admins by setting the 'allowCommand' config option to false, and then just not creating any stable signs.
To create a stable, simply place a sign with [stables] as the first line. Stables will take over from there. If 'allowCommand' is disabled, you can ONLY use the Virtual Stables feature with a sign. Punch the sign, or type /stables store to store a horse. Please note: Storage does *NOT* save chests right now, nor will it save saddles. This is a known bug.
- Please note: The stables does *NOT* save Horse Speed. This is a Minecraft/Bukkit shortfall, and will be addressed as soon as there is a way to do so.
The Config
Please see the Permissions & Config Page here.
Recipes
Stables makes several items craftable - specifically Saddles, Barding (Horse Armor) and Name Tags.
Setting the config option for hard mode recipes will change all ingots/bars to blocks instead.
Localization & Custom Messages
Upon the first run, a file called 'language.yml' will be generated. This will have all the phrases, in English. You may change the phrases to whatever you'd like, or any language you'd like.
@raum
I've updated and had my players reclaim their horses. They were willing to put up with the "effort" to have 1.7.9 :)
The 1.7.2 was the last RC0.3 -> beta, which is build 3020. I no longer use it, so the (lack of) conversion is not an issue for me.
I'm currently running on CraftBukkit version git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks (MC: 1.7.9) (Implementing API version 1.7.9-R0.2-SNAPSHOT)
Which is the 3086 built.
Indeed the stables_stables is empty, yet I see no errors. Only what I pasted. Since the horses are written and the stables_stables is there, I wonder what's missing.
I'll submit a ticket with the config.
Good luck with the RL crap!
@Perturbee
What you're saying is all accurately done .. According to the debug logs, all went according to plan - if it didn't write for some reason, there'd be an SQL error after the last 'Checking' world message.
What do you mean "but keeps the last info in the horses row of the database"? the horse database shouldn't change, regardless of if it's stored or not, as the horse still "exists", in essence .. it's just stabled. Nothing showing in stables_stables, however, means it's not writing ... which should be producing an error if that's the case, which it's not ... so I'm slightly confused.
What build number are you using of Craftbukkit? (if you do /ver, it'll say all that you posted - the CB-1.7.2-RC-yaddayadda-1234- I need those 4 numbers). If you can make a ticket and add that info to it, as well as post your config (remove any SQL login details), I'll set up the same environment you're using and see if I can't reproduce this issue and find out what's causing it.
@Perturbee
Thanks - The next version will definitely have the conversion fully working and all set - I'm hoping to get it pushed out by the end of the week, but all this RL crap is .. well, crap! :)
I wonder if I'm doing something wrong...
Either: CB-1.7.2-RC-0.3 or CB-1.7.9-RC-0.1
Version 1.9.0
Using mySQL (but tested with SQLlite too)
Using /stables store, then hitting a horse makes it disappear from world, but keeps the last info in the horses row of the database (and nothing happened in the stables_stables).
No horse in the /stables view, but is in the /stables list. (And no longer in-world Wonder). I also see no SQL statements when using store, retrieve or view in the log.
[17:28:54] [Server thread/INFO]: Perturbee issued server command: /stables store
[17:28:58] [Server thread/INFO]: Stables DEBUG: Horse beign damaged:Ummm
[17:28:58] [Server thread/INFO]: Stables DEBUG: Entity Damage
[17:28:58] [Server thread/INFO]: Stables DEBUG: Checking 'wonder_nether' vs 'Wonder'
[17:28:58] [Server thread/INFO]: Stables DEBUG: Checking 'wonder_the_end' vs 'Wonder'
[17:28:58] [Server thread/INFO]: Stables DEBUG: Checking 'buildworld' vs 'Wonder'
[17:29:04] [Server thread/INFO]: Perturbee issued server command: /stables view
[17:29:21] [Server thread/INFO]: Perturbee lost connection: Disconnected
@raum
Thank you for your quick reply! I'm sorry to hear that you've been sick, I do hope you're back on the healing track.
Re: part 2. I think I must have had a fried brain while testing. Obviously CB-1.7.2-RC0.3 does not have the offline-uuid-fetch capability. So ignore that.
The conversion does work on 1.7.9, I just tested it.
@Perturbee
Re part 1: 1.9.0 was released prior to the conversion being ready, hence the warning. It contained bug fixes that could not wait, however at the point we found said bugs, the flat file options had already been removed. Unfortunately I have been sick IRL, and haven't been able to work on it much to add the conversions fully.
Re Part 2: What version and build of bukkit are you using? Based on the quick glance, it looks as though the lookup methods for UUID don't exist in what you're currently using.
@raum: I'm confused. Is there or isn't there a conversion for flatfile to mySQL?
Part 1:
On the main page (this) it says:
Which means to me that I can convert from flatfile to mySQL, but...
Implies I can not.
I tried it on my test-server and while it does say "Database converted" and renamed the horses.yml to OLD-horses.yml, nothing has been moved/added into mySQL database.
(I also tried with a few older versions (1.8.8.10b, 1.8.11.1, 1.8.11.2), but they all seem to result in crashes.)
The stables rows (and columns/indexes) are present and stables can connect to mySQL.
I also tested adding horses to the database to make sure it was working as normal, which it did. So not a "user-error".
Do I need to wait for a future update or a separate converter?
Or will this be "end of the line" and no more updates while on flatfile?
Part 2:
There is also a problem with uuid-convert. (My test:) One horse in DB from 1.8.11.2 (so no owner UUID), updated to 1.9.0, horse is owned and fine, tried to "/stables uuid-convert" to get the owneruuid filled, but it crashes: http://pastebin.com/jvXrDas6
Adding another horse does work and fills in the uuid correctly.
All the above on cb1.7.2-rc0.3.
@raum
Can I use the latest build with cb1.7.2-r0.3?
@bjornleijdstrom
Aaah, that would be it - YEs, stables.addrider is an override permission, for people like Staff. Someone with that permission could add themselves to any rider. :) WITHOUT that permission, You have to be the owner.
@DrComputerGuy
Haven't heard of anyone else having issues like that ... Please open a bug ticket with all the requested info so I can set up an environment identical to yours and try to figure out what's going on. Thanks!
Hey @raum; I mentioned earlier the problem with users being able to add themselves to any horse even if it already has an owner. They have the stables.addrider-node, might that be what causes the problem? Does the node override some default-stuff or something?
Great Job! Keep up the good work! Can't wait for next update!
Thanks that's good to know, but every time I try to store a horse/mount it lets me store it, but if I try to recover it, it says I have no horses in the stables. I don't know if this is a bug, but it would be again appreciated if someone could reply.
Thank you for your time an concideration
@DrComputerGuy
If you're using SQLite, you don't have to actually do anything except make sure "useMySQL" is false, and "useSQLite" is set to true. The other variables are for if you were going to connect to MySQL.
Hello, I'm very new to SQLite but i'm not new to programming. I have been trying to connect connect a data bese to the plugin, but it wont work. It would be very apriciated if someone could give me a little help on what to do here.
Thank you for your time and concideration
I see, thanks for the clarification. I must have missed the caveat. I'll stay with 1.8.11.2 for now, and keep an eye out for the version that implements conversion.
Thanks again!
The conversion from Flatfile to MySQL does not exist yet, as mentioned in the caveat section of the file. There were several bugfixes that needed to go in before I the conversion was ready. When it is, it will simply be a single command you'll use. Provided no major bugs are reported, the next version will have this.
What are the steps required to convert from flatfile storage to MySQL?
I'm currently on version 1.8.11.2. I have configured my settings to connect to a MySQL database, and when I set useMySQL: true, it successfully creates four tables (horses, owners, riders, stables) in the MySQL database, but all of the tables have a row count of zero. In game, when i type /stables list, it does not show any horses that are owned by me, which it did show before setting UseMySQL: true. When I type the /stables convert command, it says 'database converted', but no rows are added to any of the database tables, and /stables list still shows no horses owned by me.
I also tried running the convert command with correct MySQL settings, but before switching useMySQL to true, with no success.
I'd very much like to preserve the horse ownership that exists in the flatfile, and migrate to MySQL so that I can continue to use the latest version and beyond.
Thanks!
@bjornleijdstrom
Which version are you using? Owned horses, as you mentioned, can't be /addrider'd, and whenever a horse is claimed, all riders are cleared - so it's still "safe" - but I'll verify that addrider cannot be done regardless, unless you're the owner. It'll be in the UUID update.
Quick one; my users can add themselves to other players horses via /addrider-command.
EDIT: apparently the horse was not owned by anyone, but still in DB / claimed. They could then add themselves to the horse since it had no owner.
ATTENTION! Version 1.9 will retire the flat file storage system! This means to update to 1.9 or higher from 1.8, you MUST be using mySQL or SQLite! An up-to-date database conversion will exist in this version that MUST be used to save your horse data if you are using the flat file database!!!
If you don't know if you're using flat file - you probably are not. The flat file was default in VERY early versions of Stables (1.4 and lower, iirc). You can verify by checking your config.yml and check that either 'useSQLite' or 'useMySQL' are set to true. As long as one of them is set to true, you do not need to worry about this.
If BOTH are set to FALSE, you WILL have to convert your database (instructions will be included in 1.9)
@uSoc_lifehome
Negative - Player UUID has NOT yet been added. I have been working on it, however - v1.9 will use UUID.