PerWorldPlugins

PerWorldPlugins


PerWorldPlugins

Limit plugins to certain worlds!
Plugin Creator: MylesC
Plugin Maintainer: Incomprehendable

What does this plugin do, and how does it work?

PerWorldPlugins will inject the Bukkit core with its own PluginManager and CommandMap, allowing you to control which plugins receive the events needed to function, and more importantly, where they receive those events. Using this plugin, you can block plugins in certain worlds. If you're hosting a hybrid server, you're probably overflowing with excitement. Sick of people using mcMMO in your minigames? Block mcMMO in the minigames world! Don't like LWC in your hardcore world? Block that, too!

Configuration

This is an example of the config

limit:
  WorldEdit:
    - world
    - world_nether
  ModReq: []

The configuration of PerWorldPlugins is simple and easy. Referring to the example above, WorldEdit would only work in the worlds 'world' and 'world_nether'. However, ModReq will work in any world.

REMEMBER: If a plugin has no world list, it will work in every world.

exempt-login-events is a self-explanatory feature. This controls whether or not PerWorldPlugins will allow login events to work in every world, no matter the limits. This is highly recommended to be true. It will cause some memory leaks. For example, most minigames plugins will save a player's inventory, so when they log out and log in, their inventory will be returned. If they return to a world that blocks the minigames plugin and this boolean is set to false, their inventory will be lost. Forever.

blocked-msg is also self-explanatory. This is just the string that is sent to players when they try a command from a plugin that is blocked in their current world. And no, there was no way to explain that easier.

You can also use these variables in the string:

  • %player% - The name of the player receiving the message
  • %world% - The name of the world that the player is currently in
  • %plugin% - The name of the plugin that is blocked in the world.

Developers

API: Currently we don't support one. If you want one, suggest the features you want!

If your plugin is incompatible, it is mainly because the plugin might extend to SimplePluginManager. PerWorldPlugins will not extend to that class due to its protection; how can you expect us to do so without some more l33t hacky code manipulation?

Here's an example on how to fix it:

Before: (incompatible)

SimplePluginManager spm = (SimplePluginManager)Bukkit.getServer().getPluginManager();
Field scmF = spm.getClass().getDeclaredField("commandMap");


After: (compatible!)

PluginManager pm = Bukkit.getServer().getPluginManager();
Field scmF = pm.getClass().getDeclaredField("commandMap");


Done! That's it. Even as a bonus, if someone decides to make another PluginManager, your plugin will already work with it.

Installation and Use

  1. Download PerWorldPlugins.
  2. Place PerWorldPlugins.jar into your plugin folder.
  3. Start up (or restart) your server.
  4. PerWorldPlugins should have created a folder, called "PerWorldPlugins". Go in there, and edit the configuration file. (server\plugins\PerWorldPlugins\config.yml)
  5. Type /pwp reload in-game, and enjoy the plugin!

Video Tutorials/Showcases

Bugs and Issues

  • PerWorldPlugins may break another plugin on reload. We haven't found any yet, but the cause of this is due to strange event registering. If it happens, just restart the server.
  • Some plugins may require a server reboot to limit. As above, this is caused by how that plugin handles its events.
  • We will probably never support plugins that use methods such as getAllPlayers() because we can't necessarily control that. Plugins that rename items may also be incompatible.
  • World-management plugins, like Multiworld or Multiverse, will cease to function properly if you limit them. If they do, do not limit them!
  • USE JAVA 7 UPDATE 60 OR HIGHER WHEN USING PWP!
  • Because it injects a customized PluginManager into the Bukkit core, PerWorldPlugins will appear during errors. This does not mean that PWP is the issue. Make sure that you can read stack traces well enough to determine whether or not the issue is from my end.

Benefits

  • Fix up and prevent certain exploits and unfair tactics in places. (like the mcMMO/Minigames example)
  • Cut down on server lag; some plugins like SurvivalGames check player movement, which fires everywhere, costing you RAM and CPU usage.
  • Add more features and plugins into your server.

Downloading


You can find the GitHub source here - https:github.com/MylesIsCool/PerWorldPlugins
You can download stable builds by looking at the Files tab at the top.

Commands


/pwp version - Displays the version of the plugin.

/pwp reload - Reloads the config.

Permissions


pwp.admin - Gives access to reload and view the plugin's version.

Developer's Server

Shameless self-advertising! If you want to join Incomprehendable's Minecraft server, you can do so below!


Sponsors


MylesC:
HostHorde.com

Incomprehendable:
GetNodeCraft.net

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of SkeTchy221 SkeTchy221 Apr 15, 2014 at 00:33 UTC - 0 likes

    Hi, I was just wondering is there a chance of adding a feature where you can let people with a certain permission node override the limitations? Would be useful for certain plugins. Just a suggestion.

    Last edited Apr 15, 2014 by SkeTchy221
  • Avatar of Incomprehendable Incomprehendable Apr 13, 2014 at 21:13 UTC - 0 likes

    @bmancraft: Go

    It's possible, but not with PWP.

    @Boomboomlhack: Go

    Yes, I believe so.

    @Drissing98: Go

    • update Java to Java 7 update 60 or higher
    • check the console for any errors on startup
    • make sure that mcore is updated to the most recent version and that there are no plugin managers

    Steven's Freebuild

  • Avatar of Drissing98 Drissing98 Apr 13, 2014 at 14:49 UTC - 0 likes

    m useing 1.7.2-R0.2 Because i cant get 1.7.2-R0.3 to work for some reason.

    When i start my server up with PerWorldPlugins v1.1.2 (fixed) for CB 1.7.2-R0.3 Mar 01, 2014, it does not work... it is like all my plugins is disabled and i can even do the /pwp command.

    anyone please help

  • Avatar of Boomboomlhack Boomboomlhack Apr 13, 2014 at 12:24 UTC - 0 likes

    Is work in 1.7.5?

  • Avatar of bmancraft bmancraft Apr 13, 2014 at 03:01 UTC - 0 likes

    Is there a way to have were there is different chat for different worlds because i have a skywars plugin that uses a weird chat thing and is there a way to make it only for the worlds that i pick. If so how. Thank You.

    Last edited Apr 13, 2014 by bmancraft
  • Avatar of Incomprehendable Incomprehendable Apr 11, 2014 at 22:09 UTC - 0 likes

    @Rexwer: Go

    Thanks for the kind words, and I'm glad that you sorted your issue out. Maybe I'll put in a feature that allows for multiple ways to configure PWP so people can set it up in whatever way they want to.

  • Avatar of Rexwer Rexwer Apr 09, 2014 at 20:57 UTC - 0 likes

    Everytime I reset the server, the plugin resets the config.yaml file? What could this be? Thank you for the awesome plugin and your hard work to keep it updated btw :)

    *FIX* So I realised my because of my own stupidity, my worlds in my config looked like this: WorldEdit: -Towny

    And like how it should be: WorldEdit: - Towny

    Notice the space between the "-" and the world...

    Thanks for a GREAT plugin :)

    Last edited Apr 09, 2014 by Rexwer: Found the Fix
  • Avatar of yngve7 yngve7 Apr 08, 2014 at 12:42 UTC - 0 likes

    @Incomprehendable: Go

    THANKS SOO much, I just updated MCore xD This plugin helped ALOT! Thanks.

  • Avatar of Incomprehendable Incomprehendable Apr 07, 2014 at 15:24 UTC - 1 like

    @yngve7: Go

    You're most likely using a plugin that replaces Bukkit's CommandMap. MCore used to do that, but a new update changed it.

  • Avatar of yngve7 yngve7 Apr 07, 2014 at 12:41 UTC - 0 likes

    I have a problem, when I added the plugin "PerWorldPlugins" into my server folder, and when I log into my server, I can't use any commands. Like /gm 1 < For essentials. But when I dont move it say Iam afk. So the plugin work, but I can't use commands. All my plugins are disabled. Can you help me? I need this plugin soo much. Thanks!

    MvH Yngve

    Last edited Apr 07, 2014 by yngve7

Facts

Date created
Jun 12, 2013
Categories
Last update
Mar 01, 2014
Development stage
Release
Language
  • enUS
License
Public Domain
Curse link
PerWorldPlugins
Downloads
14,558
Recent files

Authors