S86 Powers
Introduction
Minecraft is a great game on its own, but chances are if you're here and you're a server admin then you're looking for more to offer your clients. As you may know by now, when it comes to the extras every player wants something unique. Some want new mechanics, others want better weapons. Some want to help their friends, others want to dominate them. The problem is most plugins often offer a blanket solution. While it may fulfill the needs of a few, the remaining may not want to participate. Sure you can mess with permissions to exclude some people, but why not just cut to the chase and give every player EXACTLY what they want?
For the server that wants its players to each have individual benefits and abilities, S86 Powers is the plugin for you.
How It Works
S86 Powers is a plugin that allows users to have powers assigned to them. The core plugin comes with internal powers, but is also capable of importing powers made by others (more info to come).
To get started, simply place the S86Powers.jar file where you put your other plugins. Note that ProtocolLib is required for S86 Powers to function. On first run, several configuration files are created with default values. It is recommended that you not edit these files directly unless the server is off, as entered values may be overwritten the next time the server shuts down or restarts.
Next, you'll want to review permissions and configuration options. Operators by default get permission to everything, otherwise assigning the permission s86powers.admin will accomplish the same thing. To view configuration options, use the command /p config list [page#] (for example, /p config list 2 shows you page 2). For more information on what an option does, use the command /p config info [config], and to change config options use the command /p config set [config] [value].
Finally, for players to use powers they must first have them assigned, and before they can do that they'll want to know what's available. Use the command /p power list to get a list of loaded powers, then /p power [power] for more info on a specific power. If you don't like how a power is setup, you can check and set its configurable options with /p power [power] option. Note that changes to power options affect all users, and may require a server reload/restart for changes to take effect.
Players can be assigned powers in several ways, the two most prominent being admin-assigned or self-assigned. Admin-assigned requires a user with the s86powers.manage.user permission to use the command /p user [player] add [power]. Note that the above permission allows the user to set anyone's powers and shouldn't be given to most players. Self-assigned requires a user to have the s86powers.manage.self permission, and use the command /p add [power]. This method is safer, as the user can only modify their own powers.
What Are Powers?
Most powers come in three categories: offensive, defensive, and passive. Offensive and defensive powers operate similarly: the player does something with a specified item, and it causes an effect. Offensive powers usually do something that causes damage to others, while defensive powers usually do something to protect the player in some way. Passive powers tend to work automatically and provide some kind of bonus that neither hurts others nor protects the player (though there are exceptions).
An example of an offensive power is Laser. In its default configuration, left-clicking while holding a dispenser will fire a laser in the direction that the player is looking. This laser steadily does damage to anything it hits but uses redstone dust as fuel. The laser turns off when either the player left-clicks while holding a dispenser again, or when the player runs out of redstone dust. After using Laser, the player has to wait for a 10 second cooldown before using it again.
An example of a defensive power is Celestial Pillars. Left-clicking the ground while holding a sea lantern will create pillars of light around you. While these pillars stand, nothing can pass between the pillars except for the player. Pillars last for 45 seconds, however the player can't create new ones until the old ones expire.
An example of a passive power is Lumberjack. With Lumberjack assigned, breaking one log block of a tree with an axe will cause all adjacent tree blocks to break as well, essentially harvesting the entire tree at once. By default, a threshold is put in place so players can't level entire jungles.
Some powers have additional effects when they're used a lot. For example, after creating 60 pillars with the Celestial Pillars power, you gain the ability to create a second set of pillars by left-clicking the same block with a sea lantern again.
By default, players can only have one of each of the above power types assigned to them, though this limit can be removed with config options.
The last power type is utility. Utility powers can be used by anyone, including players with no assigned powers. Neutralizer Grenade allows players to throw lapis lazuli like a grenade, temporarily disabling the powers of any players nearby when it hits. Neutralizer Beacon allows players to create a block that constantly disables the powers of players who go near it.
Commands / Permissions
All commands can be viewed by simply using the /powers help command. You can view additional pages using /powers help [page], or view help on specific topics like /powers help player.
Donate
Creating and maintaining a plugin this size can be a full-time job on its own. I enjoy working on this plugin and don't mind doing it for free, but the fact remains that I must commit a majority of my free time to do this. If you like my work and would like to support it, please consider donating.
Need support? Have an idea for a power? Join my Discord server!
@RandomSomething98
Webslinger wasn't the original name :)
@RandomSomething98
Webslinger - Yes but you can only do so much with what Minecraft and Bukkit give you. Tripwires would be fine for horizontal shots, but what about vertical?
Grenades - Resistant to themselves? How do you mean?
pConfig allows server admins to modify certain parts of powers to their liking. For example Aquaphile heals the user when in water 1 health per 1 second by default. This might be too fast for server A, so they can increase the heal cooldown to make it 1 health per 5 seconds. Or maybe server B wants insta-heal, so they can set it to 20 health per 1 tick. If nothing else it takes a lot of balancing work off my shoulders; rather than me tweak it, you guys can do it yourselves...
Also, could you make neutralizer grenades resistant to themselves? Maybe as a option in the pConfig file? Oh, and what purpose does the S86 Powers/pConfig fulfill?
Also, looking at The List, i noticed the power webslinger. Wouldn't that name be more fit for a power that allowed shooting tripwire instead of wire? :P Webslinger is a nickname of Spider-Man after all!
@RandomSomething98
Yeah I like that idea... you got it!
Would it be possible to have a power which can allow the player to keep some of his items upon death? I think it would be an awesome passive power! Of course, maybe there can be a option in one of the configs to make it limited ( say, some items that can't be saved).
@fletch_to_99
Try locking Inhibitor Field, Spawn Crafter, and Time Bomb, do a reload, then see if the lag persists. Other than that all I've added is the mcStats metrics class and a few fixes that're marked in the change log.
Your item cleanup plugin shouldn't interfere with mine. Some powers like AeroBlade and Feather Fall use item drops to simulate effects, but most of the time they remove the item once the effect is over.
@sirrus86
I couldn't really say which one the lag appeared in as I started using the plugin when you introduced the s86powers.groups.(power) node. So it really only started to lag after 3.2.3? I've got a plugin that kills drops ever 5 minutes, to prevent lag from occurring on the server. Perhaps this is interfering with your plugin?
-Fletch
@wolfnether
Do you mean errors in the console or messages in-game? Can you upload a picture of what's happening?
@fletch_to_99
I'm hearing more reports of S86 Powers causing lag and tick lag. BlastBlade and Jackpot don't use the scheduler, and the events they hook into aren't intensive, so they probably aren't the culprit. Bulwark uses the scheduler to run a fairly simple code 4 times per second, which shouldn't cause much lag on its own. My guess is it's possibly related to Cookie Star's "death spots" as that would mean that all thrown cookies are staying in memory and constantly scanning for nearby entities. Cookie Star also runs the scheduler 20 times per second, which normally isn't a big deal but can bog down the server fast if it's too complex or memory isn't handled properly (which it isn't if it's causing "death spots").
Is the lag new? What version are you using, and what version did you use prior that didn't have lag?
@sirrus86
I also noticed the timings for the events were really slow when using powers. It caused the chat to lag for almost 4 seconds. Tnt would take almost 20 seconds to explode and water/lava would stop flowing. All of this happened only when powers was enabled. Were only using 4 powers, cookie stars, blastblade, bulwark and jackpot. I'm not sure if any of those powers are the cause but disabling powers fixes all of the lag issues.
Thanks
-Fletch
I'm flood by your plugins when i'm standing in a neutral region
(Sorry for my so bad english)
@fletch_to_99
Ah thought I fixed that...
Here's how Cookie Stars works: When the player left-clicks while holding a cookie, a cookie item is dropped in front of them, added to a list, then given a velocity. The power checks all of the cookies on the list every server tick. If a given cookie is within 1 block of an entity, they're damaged. It keeps this up until the cookie's pickup delay has expired (as in the cookie has stopped moving and can now be picked up), then removes it from the list.
This worked as intended until MC 1.3.1 I believe, and sounds like the cookies are either being picked up before the delay ends (which shouldn't be possible), or the delay is no longer recognized. Either of these would be a change in Minecraft or Bukkit's mechanics, meaining I ultimately need to recode it.
If all else fails I can add what I call a "victim list" to cookies. What this does is, if a given cookie damages an entity, that entity is added to a list and can't be damaged by that cookie again. El'druin uses this to prevent excessive damage. Cookie Stars originally didn't need it because of its speed, but it would mitigate the severity of death spots.
@sirrus86
Hey I ran the plugin and there were no errors. However the cookie stars seem to be leaving little "kill spots" where the cookie lands. If you walk there when the cookie disappeared you randomly take damage. It kills you pretty fast. Thanks for all of the quick replies!! :D
@fletch_to_99
Heh it's always something...
Good news is the first few WARNING NPE's were easy to locate and fix, I just forgot to add a check to make sure a given player in the database was assigned a group before finding out what the group was.
Bad news is the SEVERE NPE's you pasted cut off the info I need. For example:
Usually after that last line there's a few more lines pointing to where in my plugin the NPE occurred. Hopefully it's related to the first WARNING and fixed. Keep in mind giving a player two groups that use the same power may cause duplicated effects.
Since I know you and others are really depending on this feature working, I added the fix and created a version 3.2.3b, which you can download here. Again, this version has not been reviewed by BukkitDev.
@sirrus86
Hey, I was so excited to run the new version with the permissions! I got it all set up on my server and it started spamming the console with errors. :( I've got permissions set up so all my groups get the permissions however lets say I have Iron and Diamond groups. I give iron s86powers.groups.Iron and diamond has s86powers.groups.Diamond. The diamond group inherits the iron permissions so it in theory has the powers for the iron group as well. I'm wondering if that could be causing the errors. Iron has bulwark, jackpot and cookiestars. Diamond has bulwark, jackpot and blastblade. Perhas that is cusing the issue? Here is the stacktrace: http://pastebin.com/8Auy0K7x (it spammed the console for 10k lines in about a minute before I stopped the server) I was going to look through the source buy I couldn't find a github link or the src anywhere.
Thanks, Fletch
When it comes to this plugin I do my best to meet the expectations of as many people as possible. A plugin should be worth the sum of its parts, and unlike many plugins out there, S86 Powers is the sum of you guys' requests, ideas, and bug reports. All I'm doing is writing the code; it's you guys who are truly molding this into a great plugin. In short, without the input of its users, this plugin would be nothing.
So it really upsets me when I make promises then fail to deliver. Your suggestions do nothing but improve the plugin, and it's my job to listen and apply these suggestions.
To make it up to you guys, I'm offering a direct link to S86 Powers v3.2.3a. This version contains the following changes:
Version 3.2.3a can be downloaded here. Understand that this version has not been reviewed by BukkitDev.
Once again, thank you for helping make S86 Powers what it is, and for your continued efforts in helping me improve it further.
@TheSymmes
Cookie Stars is hopefully fixed in v3.2.3, if not then some mechanic seriously changed between Minecraft's / Bukkit's 1.2.5 to 1.3.1 transition.
Aquaphile was supposed to be fixed in v3.2.3 but... I totally forgot -_-. I'll be sure to fix it in v3.2.4.
@Chalkie19
Yeah I remember Nether Cloak, for some reason I didn't mark it down... I'll make sure this is done in v3.2.4.
Beacons - I just can't win! But that's strange; I think the only thing I changed for beacons in 3.2.2 was to have it check if the player was in the correct world (the beacon rewrite was done on v3.2.1). It might be caused by one of the new powers or fixes...
@TheSymmes
Reported the cloak thing a couple of patches ago, hope there will be a limit added soon.
Also had to down grade to 3.2.1 since just 1 person on the server made it 8tps and in a beacon zone <2. Removed it and went back to 3.2.1 20tps with 22+ people ect.
On my server someone has the cookie throwing power, and often there will be places where u just can't go without taking damage after the cookies are gone. Also, aquafile doesn't seem to work right, people still move slowly. You may already know about this, but I just want to make sure.
It may be good to put a time limit on the nether cloak ability, my friends and I do pvp, and one kid just always cloaks the entire time.
@sirrus86
Sweet! Thanks :)