PerWorldPlugins

PerWorldPlugins


PerWorldPlugins v1.3.0

Limit plugins to certain worlds!

PerWorldPlugins v1.2+ was built with compatibility as a top priority. Because of this, we should be fully functional with other plugins. However, in the case that you do stumble upon an incompatibility, we urge you to create an informative ticket!

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 CommandMap as well as changing how the event system works using some neat (and totally not hacky in any way) tricks. This allows 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!

What's new?

We've updated our plugin to provide maximum compatibility, If you need the technical know-how, we've pushed the changes to our GitHub below. The biggest step in this update is the fact that we have stopped overriding Bukkit's PluginManager, meaning that all plugins should be compatible.

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 (You shouldn't need this v1.2.0+)

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

For russian https://www.youtube.com/watch?v=j-mWlh1zMyM

Bugs and Issues

  • PerWorldPlugins may appear in your stacktraces. This does not mean that PWP is the cause of that stacktrace, so we encourage that you are able to comprehend stacktraces. If you are confident that the issue may be our plugin, then please make a ticket!
  • May be bugs to do with aliases of commands, we're looking into it but isn't top priority as we're waiting for Bukkit 1.8 or the next stable platform.

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.

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.

Upcoming Features


  • Reversible configuration! Instead of whitelisting worlds, you can choose to blacklist them.
  • /pwp list E/D - list all of the plugins that are enabled/disabled in your current world.
  • /pwp add <plugin> <world> - configure the world whitelist/blacklist from in-game! Reloads automagically.
  • /pwp set <exemptLogin/blockedMsg/listMode - set configuration values from in-game! Reloads automagically.

Other Stuff

Source Code

YourKit supports this project with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications. We use it on this project to allow us optimise it for best experience. Check it out

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

  • Avatar of TheSpudmoe00 TheSpudmoe00 Jul 17, 2014 at 04:20 UTC - 0 likes

    so i have a problem. i put it in my plugin folder and i starter up the server nut the files don't get created PLEASE HELP!

  • Avatar of MylesC MylesC Jul 16, 2014 at 16:42 UTC - 0 likes

    @davidp5118: Go

    On disabling mcore & factions it should.

  • Avatar of davidp5118 davidp5118 Jul 15, 2014 at 18:11 UTC - 0 likes

    Is factions supported? I only need this for factions, but don't want to get it if it won't work.

    And if it DID work with factions...would it prevent the Faction Tag from being shown too?

  • Avatar of Rothmaw Rothmaw Jul 14, 2014 at 10:32 UTC - 0 likes

    Love the plugin, but since updating to 1.7.9 I've been having a problem where the config periodically gets reset to the default regardless of how i update it (Server live, Server off, retyping all the config options, copying and pasting from a backup config) Any advice on what could be causing this or how to fix it? Thanks in advance.

    I should probably add I'm using craftbukkit-1.7.9-R0.2 and Per World Plugins 1.2.3 list of other plugins;

    BKCommonLib, BattleArena, BossShop, Clearlag, CoreProtect, EchoPet, Essentials, EssentialsChat, GriefPrevention, Headhunter, Heavyspleef, HiddenCommandSigns, Hungergames, Multiverse, Multiverse-Inventories, Multiverse-Portals, NetherLiquids, Paintballv, Parkour, PermissionsBukkit, Plotme, SimpleCommandSigns, Spectate, Vault, Voidgenerator, VoxelSniper, WorldBorder, Worldedit, WorldGuard

    -Problem Solved, I wasn't parsing the config correctly.

    Last edited Jul 16, 2014 by Rothmaw: Solved
  • Avatar of Enderman09871234 Enderman09871234 Jul 13, 2014 at 12:11 UTC - 0 likes

    @MylesC: Go

    Having the same problem. Not supported with Factions.

  • Avatar of MylesC MylesC Jul 10, 2014 at 20:01 UTC - 0 likes

    @kazdj21: Go

    Looks right to me, using latest version?

  • Avatar of kazdj21 kazdj21 Jul 10, 2014 at 06:44 UTC - 0 likes

    This plugin is so amazing but i got one problem: I only allow the plugin Factions & Mcore in the Factions world but it still works in the Hub? Did i do something wrong?

    config:

    TimTheEnchanter: [] DKLib: [] WorldEdit: [] NoCheatPlus: [] UUID: [] FrameProtect: [] XPMultiplier: [] Lores: [] mcore: - Factions DakadoHealth: [] Vault: [] PlotMe: [] PermissionsEx: [] Advanced_Item_Effects: [] Multiverse-Core: [] PermissionFinder: [] UltraHardCoreMode: [] WorldGuard: [] TreeAssist: [] CloudTrade: [] NoteBlockAPI: [] ChestShop: [] ClearLag: [] MobArena: [] Essentials: [] AncientGates: [] EssentialsProtect: [] GenerousMobs: [] ServerSigns: [] EssentialsSpawn: [] Multiverse-Inventories: [] NoteBlockPlayer: [] EssentialsAntiBuild: [] EchoPet: [] AuthMe: [] EssentialsChat: [] Info-Board: [] Ultra_Hardcore: [] ChatPerWorld: [] Factions: - Factions

  • Avatar of MylesC MylesC Jul 09, 2014 at 15:23 UTC - 0 likes

    @supermaddud: Go

    Thanks, if you have any issues let me know :D

  • Avatar of supermaddud supermaddud Jul 09, 2014 at 11:03 UTC - 0 likes

    This is the best plugin ever, I love you.

  • Avatar of MylesC MylesC Jul 08, 2014 at 14:25 UTC - 0 likes

    @mattataki: Go

    Well, let's have an example: You have Survival Games, Spleef on your server and in the same world, and you also have Factions. Every time someone moves, Survival Games checks if they are in an arena and so does most spleef plugins. With PWP, these calls are never made as we override the actual handler which can reduce time, of course unless your using 100s of plugins this will be a very small time, nanoseconds most likely.

    @PlusMCPKBPK: Go

    Post a pastebin of the log before even making a post, no progress is made by you just saying it doesn't work. Also makesure you have the latest version for full compatibility.

Facts

Date created
Jun 12, 2013
Categories
Last update
May 20, 2015
Development stage
Release
Language
  • enUS
License
All Rights Reserved
Curse link
PerWorldPlugins
Downloads
59,585
Recent files

Authors