Forester - Lets have some trees: Version: v1.02 Allows Players to generate a forest around them with set radius and density, of a certain tree type. Features: Generate forest around player. Commands: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler '/forest [radius] [density] <tree type> [ ] = Needed < > = Optional radius 20 - 200 density 1 - 100 treetypes = Birch, Tree, BigTree, Redwood, TallRedwood (not case sensetive) Permissions: (Superperms and op) Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler 'forester.forest' - Provides access to the forest command. Future additions Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Plant saplings instead of generating trees, (should be faster planting but would take time to grow) would yield different result in density. (50%) (should this be a different command or a extra option?) Biome dependant trees. (20%) Download: Forester , Jar Source Code: BitBucket Changelog: 1.02 Re jigged the density math. New scale of 1 to 100 for density now (arbitrary values) 1.01 Removed old permissions methods. fixed new permission method to default to op. 1.0 First release
Nice! Been looking for one of these for a while now. Was nearly going to write one myself! Beat me to it Request: SuperPerms support? Its easy just whenever you put a if statement to see whether the player has a permission just add || player.hasPermission("Your.Permission.Here") This was some of your code: Code: if(player.isOp() || perms(player, "forest") || permsOld(player, "forest")) Just change to Code: if(player.isOp() || perms(player, "forest") || permsOld(player, "forest") || player.hasPermission("forest")
Already has it. That's what the perms function is for. Old perms is for permissions plugins that don't seem to support it yet, like groupmanager (as far as i can tell it doesn't).
How does the density work? The forest became even more dense after I increased the density (from 3 to 8)
Higher number = higher density. I might lower it so that 1 produces a very sparse forest. Also this means most likely that you haven't got a permissions plugin that supports superperms .
Very nice! i have tried it out on a flat map, and it makes forest like nobody's concerns. i tried: tree, bigtree and birch so far, and they work perfectly. Well done!
Updated. Changed the density math. 1 should be sparser now and it goes all the way to 100 now. (though the values are relatively arbitrary) Biome dependant trees not in, (thought i should push the density change out faster).