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.
9:41:54 PM [INFO] This server is running CraftBukkit version git-Spigot-8dc4297-a7287cb (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)
sofar everything works sofar except changeing the recipies does nothing, i cant figure out how lure works.
and this error when i attempt to summon the horse, while haveing permission.
11:30:29 PM [INFO] test3 issued server command: /stables summon butter 11:30:29 PM [SEVERE] null 11:30:29 PM org.bukkit.command.CommandException: Unhandled exception executing command 'stables' in plugin Stables v1.9.10.6 11:30:29 PM at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:642) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at net.minecraft.server.v1_8_R1.PlayerConnection.handleCommand(PlayerConnection.java:1083) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:918) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:26) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:53) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_71] 11:30:29 PM at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_71] 11:30:29 PM at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:683) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:29 PM at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:623) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:30 PM at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:526) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:30 PM at java.lang.Thread.run(Unknown Source) [?:1.8.0_71] 11:30:30 PM Caused by: java.lang.NoSuchMethodError: org.bukkit.World.getNearbyEntities(Lorg/bukkit/Location;DDD)Ljava/util/Collection; 11:30:30 PM at me.raum.stables.Stables.onCommand(Stables.java:748) [?:?] 11:30:30 PM at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spigot.jar:git-Spigot-8dc4297-a7287cb] 11:30:30 PM ... 14 more
suggestion: add item to summon ur horse (maby rename item to ur horse name prefixed with summon), rename compass at anvil to "horse finder" right-click to locate your nearest horse), a way to toggle (/stables find "name") off to reset the compass to default. also change layout of recipies to a 3x3 grid layout to its waaay easier to understand, give explination how lure works/configureable (i.e multiple lure items) plz
@raum Ok we tested the last version of stables now (1.9.10.6 ). After changeing the player name, /stables listall (playername) shows correctly the list of horses owned by that player.
But he is still unable to recover any "old" horses from the virtual stables /stables recover (horsename), even though its shown in his list.
/stables addrider - delrider works fine now.
@Sandukhan
I did come cross one small issue regarding uuids, as they weren't saving correctly ... this SHOULDN'T have caused any loss errors, though, and I'm not seeing anything else that would cause these problems What exactly had happened? Did things stop showing up when they did /stables list, or did horses stop allowing them to ride, or ...?
I did find one small .. I guess typo? that would cause horses to not list correctly after a name change (if you did /stables list, or /stables listall), but that wouldn't have effected riding, summoning, etc etc. It's fixed in *.6.
@Sandukhan
Stables already does that, and should be only using the uuids, and not names for anything internal - only messages (ie: "That's xx's horse.") would use the name of the player. All uuids are logged when people log in, with their current username (that's the sql call people are having issues with elsewhere also :P)
I'll look into it this weekend to find out what the issue is.
@raum
We noticed that players "lose" thier horses in virtual stables after changeing the playername. They also cant addriders to thier "old" horses outside the virtual stables. These horses are still owned by the right player, but using the old players username.
Would it possible too fully support Players UUIDs? And keep the database updated with the current playernames?
We are using the latest version of stables with MySQL database on Spigot 1.9.2
edit* Would be also helpful if stables could create a own log file, specially when its runing on debug mode. ;)
@KevinEssence
There shouldn't be. I try to get anything of the sort fixed as soon as possible after they're reported. If there's any way currently, nobody's said anything about it. :)
We just updated to latest version, we actually just installed the plugin for the first time. So far so good, are there any dupes or exploits I should be a aware of as we just launched and I get ocd about that sort of stuff when using new plugins.
@Sandukhan
Thanks - fixed in 1.9.10.4
@raum
Found another bug in the last stables version. Players cant use /addrider.
[13:45:10 INFO]: LordSandukhan issued server command: /stables addrider Umbrax [13:45:12 ERROR]: Stables: Write Prep: Unknown type of object: 3b16a4df-72d0-4dfb-9bf4-815fdb3d27e1
@Jikoo_K
http://www.pic-upload.de/view-30576614/stables.png.html
Stables takes some more performance on player login but, still not that problematic for us.
@raum
I'm running MariaDB 5.5.38 on Debian 7.8. Pretty outdated.
Oddly, of all the main thread calls, the login query is the only one that really impacted performance for me, the rest seem to be responsive enough. Maybe the simple bandaid of throwing it inside a BukkitRunnable running asynchronously would be a good enough temporary hack.
@raum:
Thx for the quick fix.
@Jikoo_K:
We are using stables for a long time now, first with MySQL, later SQL-lite. Never had any problems with that. But the 1.9 itself got some performance issues. That should be fixed in 1.9.3.
http://www.pcgamesn.com/minecraft/minecraft-update-193
@Jikoo_K
I've mentioned in the past, the lag on login makes literally zero sense. It's literally 1 SQL call to cache uuids (so that we're not having to query the Mojang servers all the time) and nothing else. No timers, no huge complex queries or code - just an Insert/On Duplicate Key.
Out of curiosity, what version of mysql (or are you using sqlite?) are you using, and on what distro?
@raum
Interesting, you're running way more players than me. My machine's also dedicated, so shared hosting is not the issue in my case.
Definitely not trying to fault you for not pushing out a full rewrite, a lot of my plugins are in some state of decay or other due to a lack of time, and they're much smaller scale than Stables. I apologize for how harshly my previous comment comes across. I did want to state my issues with the plugin but didn't have a nicer way to put it. Life is and always will be way more important than a free service you provide as a hobby. Thanks for giving what time you can spare.
@Jikoo_K
Regarding sever loads: Our server has 10-20 on at slow times with peaks up to 50-60. Our database is on the same machine, and has over 40k entries for the uuids, 60k+ for the horse definitions. It's definitely not anything to do with the amount of people on a server - I imagine it's more so issues with shared hosting. The three servers I am a part of (the one I run, and the two I help with) are all on dedicated machines, and have never seen the login issue.
Regarding what 'should' be done: A lot of things should be done different. Stables was one of the first java projects I ever did - I am a C programmer by trade, and most methods were done with a C mentality. A rewrite has been in the works for quite some time, however all the RL fun of being very ill, and trying to still support a family, its' been very, VERY slow - I've had little time to do much else other than fix bugs.
@Sandukhan
Will be patched and fixed this evening or tomorrow morning.
@raum
Found a major bug in stables 1.9.10.2 using CraftBukkit version git-Spigot-e6f93f4-935f18b (MC: 1.9.2). Players can duplicate horses by using /stables store and /stables recover. They recover the same horse mutiple times from thier stables (using same horse name). That also duplicates Horsearmor and saddles.
@raum
Late to the party by a month or so, but I also had horrendous timings onPlayerLogin using SQLite and MySQL. I eventually uninstalled Stables with 1.9 because of how badly it was causing the server to hang, about 1-2 seconds per player logging in. Since it's just a SQL insert/update, why don't you use an asynchronous task to make the call rather than do it on the main thread where it will negatively impact server performance?
Out of curiosity, what kind of player counts (all-time and concurrent) do you see on the server those timings are from? I had around 2000 different players during a year or so of using Stables, and I consider myself small-time. My server's pretty good (an older KS-4A equivalent) and my MySQL database is hosted on the same box, so I'm stuck wondering if your database is just very tiny or you only have a couple players on at a time.
Really, you should be loading all the data you need into memory and not making any SQL calls on the main thread at all. Load player info async on login, unload async on logout. Load relevant horses when tamed or on chunk loads, unload when untamed, killed, or unloaded. You get the picture, using a little bit more memory to make performance way better.
I absolutely love the plugin and the ideas behind it but hate the execution.
When I try to add a rider, it tells me "The UUID of that player can not be found".
Console reports:
[Server] ERROR Stables: [Stables] Unable to fetch UUID for exampleusername
@dddylan98
Hm ... I'll look into Syntax - That should show .. well, the syntax. lol Is it JUST summon that has the Syntax error, or all commands? It may have just been a typo on my part. And by may, I mean probably was. :P
There is no automatic conversion for SQLite to MySQL - The /stables convert was to change the now unused YML to SQL. I have an MySQL <-> SQLite conversion on my todo list, but it is not in. You would be able to manually copy things directly over if you have the knowledge/ability to, as the databases are (basically) the same format regardless of which method you use. Now - you will not "lose" any data without converting - it won't delete the Sqlite database if you start using MySQL - it'd still be there, just not accessed, which might be worth it for the purpose of testing. Even if you cannot convert - as you mentioned: For a test, it'd be better than nothing else.. would at least give you some more information on if it's something wrong with the host, or what.
@raum
I have access to a MySQL server, just haven't used it. Is there any way I can convert the data to MySQL? Don't want to risk losing all the data, but I suppose having it lost is better than no plugin at all.
I also have a bug that I am not sure what's causing it with Stables. Whenever I do a command improperly, such as /stables summon without an id/name/I don't know, it just says: "Syntax is:"
It's confusing to learn how to use the command when it says this.
I see there is a /stables convert command. It says converts from YML to SQL? Not sure if that's really what it is, or SQLite to MySQL? Some more info on this would be nice