Get an Epic Experience with Premium

PerWorldPlugins

Admin Tools Login to Add Favorites
  • 0 Likes
  • Minecraft
  • 2,824 Monthly Downloads
  • Supports: CB 1.7.9-R0.2
  • 34,586 Total Downloads
  • Updated 08/26/2014
  • Created 06/12/2013
  • 2 Favorites
  • Project Site
  • Comments
  • Release Type: Release
  • License: Public Domain
  • Newest File: PerWorldPlugins v1.2.4
or

About PerWorldPlugins

PerWorldPlugins


PerWorldPlugins v1.2.4

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 todo 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.

Metrics


This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:

  • A unique identifier
  • The server's version of Java
  • Whether the server is in offline or online mode
  • The plugin's version
  • The server's version
  • The OS version/name and architecture
  • The core count for the CPU
  • The number of players online
  • The Metrics version

Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.

http://i.mcstats.org/PerWorldPlugins/Global+Statistics.borderless.png Produced by Metrics

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

- Added further null checks - Fixed issue addressing mcore - Fixed issue to do with injecting itself. (Should fix reloading)

Comments

  • #3

    Hello there, i recently installed PerWorldPlugins and it came up with this when i reload.

    [19:57:50] [Server thread/INFO]: [PerWorldPlugins] Enabling PerWorldPlugins v1.2.3
    [19:57:50] [Server thread/INFO]: [PerWorldPlugins] Enabled, attempting to inject CommandHandler...
    [19:57:50] [Server thread/ERROR]: PerWorldPlugins failed finding fields in the CommandMap, contact the Dev on BukkitDev
    java.lang.NoSuchFieldException: oldMap
    at java.lang.Class.getDeclaredField(Class.java:1948) ~[?:1.7.0_65]
    at us.Myles.PWP.FakeSimpleCommandMap.<init>(FakeSimpleCommandMap.java:28) [PerWorldPlugins.jar:?]
    at us.Myles.PWP.Plugin.onEnable(Plugin.java:119) [PerWorldPlugins.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:250) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:350) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader.enablePlugin(PerWorldPluginLoader.java:145) [PerWorldPlugins.jar:?]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:389) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugin(CraftServer.java:439) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at org.bukkit.craftbukkit.v1_7_R1.CraftServer.enablePlugins(CraftServer.java:375) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at org.bukkit.craftbukkit.v1_7_R1.CraftServer.reload(CraftServer.java:773) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at org.bukkit.Bukkit.reload(Bukkit.java:279) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at us.Myles.PWP.FakeSimpleCommandMap.dispatch(FakeSimpleCommandMap.java:94) [PerWorldPlugins.jar:?]
    at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:683) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:952) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:814) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:47) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:655) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]

     

    And when the reload is done all of my plugins don't work

  • #2

    please give a permission node so staff can bypass this and use all plugins in all worlds.

  • #1

    maybe add that for every world is another plugin folder?

  • To post a comment, please login or register a new account.
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

VIP trip to SMITE World Championship