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!
-
View User Profile
-
Send Message
Posted Jul 6, 2013@ValeraSTK
The main hurdle I ran into with that was I couldn't find an easy way to detect if a given player's permissions had changed. But yeah I'll see about finding a more efficient method.
Localization is also something I've wanted to implement.
-
View User Profile
-
Send Message
Posted Jul 6, 2013@sirrus86
I think that one of the most important things for this plugin - its full-working permission based powers assignment, whitout any additional command (including /powers power -u, etc)
Also would very nice, if I will be able to modify and translate all plugin messages, through lang files.
-
View User Profile
-
Send Message
Posted Jul 6, 2013At this point, as I've been unable to determine the cause of the memory and lag issues, I've decided to go ahead and rebuild S86 Powers from the ground up. It will likely be version 5.0 as I intend to change a few coding methods significantly.
This time however I'll keep v4.3.4 active as well in case new versions of Minecraft are released while I work on the new build (for example, I'll put out a version compatible with MC 1.6.2 when it comes out).
If anyone has any suggestions (other than "fix lag and memory") for v5.0 let me know as now's the best time to get them implemented.
-
View User Profile
-
Send Message
Posted Jul 6, 2013I sent you a detailed PM. Btw left out that the 1.5.2 I use is the Recommended Build.
-
View User Profile
-
Send Message
Posted Jul 6, 2013@n33dy1
Alright I'm gonna try to replicate this as best as I can.
Give me your Bukkit/Spigot build, and a list of all plugins you're running when this occurs (you can PM me if you prefer).
In other news, I did find that Java 6 doesn't seem to handle my plugin as well as Java 7 (I build it for 6 but run it on 7), but it still maxed out at around 600MB.
-
View User Profile
-
Send Message
Posted Jul 5, 2013http://i.picpar.com/q5r.png pretty sure it has a memory leak. That's 10GB. Restarted with it off and it stays around 2GB.
-
View User Profile
-
Send Message
Posted Jul 5, 2013@Makemyday17
Me neither... I'll keep looking.
@Chromish
Yes all powers not in use by players start disabled to save memory, they enable as people log in or add powers, and disable as they leave or remove powers. And yeah I'm thinking of adding an enable-all/disable-all/update-all command.
-
View User Profile
-
Send Message
Posted Jul 5, 2013Oh, never mind. Italicized is disabled, it seems. Are all powers supposed to start out disabled when not in use? P.S. It'd be very useful to have a command for reloading the plugin and/or the powers as a whole. Reloading each individual permission-given power is somewhat arduous.
-
View User Profile
-
Send Message
Posted Jul 5, 2013Is there a difference between italicized powers and non-italicized ones? Might it have to do with why permissions aren't working?
-
View User Profile
-
Send Message
Posted Jul 5, 2013Very weird, the last time, i thought it worked, because it didn't lagged the first few minutes I was online testing. However, I left the plugin and the server on, with people playing obviously. And when I can back few hours later It was lagging and people were complaining. So i'm not really sure what's causing it.
-
View User Profile
-
Send Message
Posted Jul 5, 2013@ValeraSTK
I'll check into this.
@Makemyday17
So I went ahead and downloaded as many of the plugins you listed as I could find, threw in NoLagg for testing and started it up in Bukkit. Results were the same, my server usually stayed around 500MB, of which my plugin was responsible for about 5%. NoLagg again reported minor tick lag, though about 25% more than most plugins.
So hell with it, I load Spigot and try it out. Total memory usage hovered around 550MB, but somehow my plugin wound up using less memory this time than with Bukkit. Unfortunately Spigot didn't like NoLagg so I couldn't test lag, but all in all it performed fine.
-
View User Profile
-
Send Message
Posted Jul 5, 2013i don't want to give it up, I really want to use it, and preferable now. So I'm in to help you speeding up the process in finding the issue and solving it as fast as possible. Here's a list of my plugins which most likely is the main issue: WorldGuard WorldEdit WayOfShadows Vault TeleportSigns TagAPI Sprint NinjaSneak Ninja NameTag Multiverse-core-2.4 Mcmmo Magicspells Jumpboost FleetingDisguises Factions Essentials (essentialsprotect, spawn, chat...) GroupManager EnjinMinecraft DoubleJump DisguiseCraft BattleAxe AssassinPack ServerSigns ProtocolLib-2.4.3 Build: Spigot allocated RAM: 1.5GB
As you can see there's a lot of plugins who can cause this issue. If I can get your plugin working, then I can remove almost 50% of all those. If anyone else having the same lag issues, that I have, could read this plugin list and spot out the plugins they also have, this would leave out the probably "infected" plugin(s) who's causing the issue. If it's a big plugin you may have to do a work around, if not then a simple remove is the option. Well, maybe you can see directly which plugin is causing it, if not maybe you could setup a test server with all these settings, Spigot, 1.5GB ram, all those plugins, and your plugin. And will see if you run same issue.
-
View User Profile
-
Send Message
Posted Jul 5, 2013Even on a clean restart I've been getting http://sharetext.org/hmZc
-
View User Profile
-
Send Message
Posted Jul 4, 2013@sirrus86
/powers power [power] -u. - its help, but do I need to use this command each time, when I assign permission to some player?
Btw, this not always help. I have 2 players with permissions for Grapplinghook power, and "/powers power [power] -u." make it works onlu for one of them.
<<reply 1610105>>
yes
-
View User Profile
-
Send Message
Posted Jul 4, 2013@n33dy1
With all powers enabled the highest amount of memory my server used was 500MB, followed by a garbage collection, ending with 200MB. At its absolute peak over six hours it only made it to 650MB. As I said in my previous post, if a problem exists I apologize and I'm continuing to look for the cause, but I can't reproduce it as the issue doesn't occur on my server.
@ValeraSTK
You may have to update the powers after assigning them via permission, try the command /powers power [power] -u.
-
View User Profile
-
Send Message
Posted Jul 4, 2013@ValeraSTK
You got your config set to use permissions?
-
View User Profile
-
Send Message
Posted Jul 4, 2013I made a clean install of 4.3.4 version, and then made some tests with "s86powers.use.GrapplingHook" and "s86powers.use.CookieStars" perms. And looks like perms are still dont work.. or may be I did something wrong?
-
View User Profile
-
Send Message
Posted Jul 4, 2013@sirrus86
I'm on a dedicated server with an i7-2600, 16GB DDR3 RAM, and a 120GB SSD all to myself only for my single Bukkit server. Nothing else. TPS was at 20 for over a day and 30 minutes after adding this plugin back (v4.3.4) with these powers enabled http://sharetext.org/nj1J the TPS drops to 11. :( Gonna' disable it again until it's fixed... love this plugin otherwise.
EDIT: Also with 10GB of the RAM allocated to Minecraft, the RAM got up to 50% when I used your plugin. Normally it's under 20%. This may mean a memory leak, because uhh 5GB is too much for most servers.
-
View User Profile
-
Send Message
Posted Jul 4, 2013@n33dy1
Yeah I noticed this bug momentarily in testing, not sure what causes it. This was previously caused by reloading the server rather than stopping and restarting it, see if it continues after doing that.
That error comes from the NoGrief class. One of the events uses a Bukkit event method that's only been around since MC 1.5, so it checks to see if the server is running that or a later version. In this instance, the NullPointer occurs because it's unable to detect your server's version for some reason... which also means it'll probably have issues with anything NMS-related unfortunately (packets, mainly). I'll look into it.
-
View User Profile
-
Send Message
Posted Jul 4, 2013@sirrus86
My bad it's working now. PowerRing is only doing beam shots though.
When I right-click one time to change it, it changes it twice, that is why.
Also what's this? http://sharetext.org/ch66
EDIT: Ignore what I said about PowerRing that was due to a /reload