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

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 topchoboy topchoboy Feb 28, 2015 at 14:28 UTC - 0 likes

    pls help me

    [16:42:13] [Server thread/ERROR]: PerWorldPlugins failed finding fields in the CommandMap, contact the Dev on BukkitDev java.lang.NoSuchFieldException: oldMap at java.lang.Class.getDeclaredField(Unknown Source) [?:1.8.0_31] at us.Myles.PWP.FakeSimpleCommandMap.<init>(FakeSimpleCommandMap.java:31) [PerWorldPlugins.jar:?] at us.Myles.PWP.Plugin.onEnable(Plugin.java:119) [PerWorldPlugins.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) [spigot.jar:git-Spigot-1564] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:329) [spigot.jar:git-Spigot-1564] at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader.enablePlugin(PerWorldPluginLoader.java:145) [PerWorldPlugins.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-1564] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:476) [spigot.jar:git-Spigot-1564] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:394) [spigot.jar:git-Spigot-1564] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.reload(CraftServer.java:866) [spigot.jar:git-Spigot-1564] at org.bukkit.Bukkit.reload(Bukkit.java:301) [spigot.jar:git-Spigot-1564] at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [spigot.jar:git-Spigot-1564] at us.Myles.PWP.FakeSimpleCommandMap.dispatch(FakeSimpleCommandMap.java:95) [PerWorldPlugins.jar:?] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767) [spigot.jar:git-Spigot-1564] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchServerCommand(CraftServer.java:753) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.DedicatedServer.aB(DedicatedServer.java:326) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:290) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1564] [16:42:13] [Server thread/INFO]: [UltimateHub] Enabling UltimateHub vUltimateHub v1.2.5 [16:42:13] [Server thread/WARN]: [UltimateHub] Could not save general.yml to plugins\UltimateHub\playerdata\general.yml because general.yml already exists. [16:42:13] [Server thread/ERROR]: Error occurred while enabling UltimateHub vUltimateHub v1.2.5 (Is it up to date?) java.lang.NullPointerException at me.kyledag500.UltimateHub.main.setupGeneral(main.java:103) [?:?] at me.kyledag500.UltimateHub.main.onEnable(main.java:45) [?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) [spigot.jar:git-Spigot-1564] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:329) [spigot.jar:git-Spigot-1564] at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader.enablePlugin(PerWorldPluginLoader.java:145) [PerWorldPlugins.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-1564] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:476) [spigot.jar:git-Spigot-1564] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:394) [spigot.jar:git-Spigot-1564] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.reload(CraftServer.java:866) [spigot.jar:git-Spigot-1564] at org.bukkit.Bukkit.reload(Bukkit.java:301) [spigot.jar:git-Spigot-1564] at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [spigot.jar:git-Spigot-1564] at us.Myles.PWP.FakeSimpleCommandMap.dispatch(FakeSimpleCommandMap.java:95) [PerWorldPlugins.jar:?] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767) [spigot.jar:git-Spigot-1564] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchServerCommand(CraftServer.java:753) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.DedicatedServer.aB(DedicatedServer.java:326) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:290) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1564] at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1564] [16:42:13] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it [16:42:13] [Server thread/INFO]: CONSOLE: Reload complete.

    Last edited Feb 28, 2015 by topchoboy
  • Avatar of Cjorange Cjorange Feb 26, 2015 at 00:07 UTC - 0 likes

    Is this plugin compatiable with 1.8?

  • Avatar of fr233 fr233 Feb 15, 2015 at 09:49 UTC - 0 likes

    when i do/reload on spigot1.8,it close all the plugins on the whole world,except the plugin which i add worldlist under it,please fix it,thanks( my English is bad,i am a chinese)

  • Avatar of Redstone_Pro_73 Redstone_Pro_73 Feb 14, 2015 at 19:30 UTC - 0 likes

    UPDATE TO 1.8!!!! Please I need this as soon as possible!

  • Avatar of frizzbee30 frizzbee30 Feb 14, 2015 at 12:36 UTC - 0 likes

    It works well for us, with very little trouble. However, some plugins don't like being limited by it, so it's a bit of trial and error. Also we edit the config directly and PWP reload with no issues at all. We are however very careful around what plugins go onto the server and have an established change control process of testing them in a cloned test environment first. This may be why we are more successful with it.

    http://www.minecraftsigs.com/banners/934016794199124.png

  • Avatar of Molo20 Molo20 Feb 10, 2015 at 16:18 UTC - 0 likes

    Same here, tragically crashing on Spigot 1.8

    Update pleaaaase ;_;

    Serio? Chciało Ci się to tłumaczyć w translatorze?

  • Avatar of GamingNorge GamingNorge Feb 09, 2015 at 17:20 UTC - 1 like
    not working on 1.8 - Spigot. edit: Tries to edit config, restarts server then the config resets itself lol.
    Last edited Feb 12, 2015 by GamingNorge
  • Avatar of latestduo latestduo Feb 08, 2015 at 14:17 UTC - 0 likes

    Whenever I change the "blocked-msg" from the default one, the config is reset to default. Why is this?

    EDIT: I figured out what causes it, putting ' in the blocked-msg will cause the config to reset to default. Not sure why but it does.

    Last edited Feb 08, 2015 by latestduo
  • Avatar of OtraigusNevets OtraigusNevets Feb 08, 2015 at 04:05 UTC - 0 likes

    Somehow I get this to work on my server but it seems like people can't get this to work. But whenever I want to reload the server I need to stop the server then start it again, if I don't my plugins won't work! (I'm using spigot protocol hack)

    So I'm going to tell how this plugin works

    1. Once you installed this plugin make sure to stop the server then start it again!

    2. If you want to set a plugin for a certain world do this:

    Essentials: [world1,world2]

    3. Once you've done that you can do /pwp reload

    4. If you want to reload the server make sure to stop the server then start it again

    5. If you want to set a plugin for all the worlds. Do this

    Essentials: []

    It works for me and if that doesn't work for you well just post a ticket see if other people can help you :D

    Last edited Feb 08, 2015 by OtraigusNevets
  • Avatar of OtraigusNevets OtraigusNevets Feb 08, 2015 at 03:52 UTC - 0 likes

    @mca93teck: Go

    It's not suppose to, you need to open [Server directory]/mstore/factions_mconf/instance.json and insert your world there Ex:

    "worldsNoClaiming": ["world1", "world2"],

    "worldsNoPowerLoss": ["world1", "world2"],

    "worldsIgnorePvP": ["world1", "world2"],

    Last edited Feb 08, 2015 by OtraigusNevets

Facts

Date created
Jun 12, 2013
Categories
Last update
Aug 26, 2014
Development stage
Release
Language
  • enUS
License
Public Domain
Curse link
PerWorldPlugins
Downloads
47,557
Recent files

Authors