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 tonemon tonemon May 21, 2015 at 06:49 UTC - 0 likes

    @Incomprehendable: Go

    The wrong version of what? My server or the plugin?

  • Avatar of games647 games647 May 20, 2015 at 18:17 UTC - 0 likes

    @NoHoPeLess: Go @Incomprehendable: Go

    You should compile your project at least with Java 1.7, because according to these statistics many servers still use the outdated java 6 and 7 versions. This will resolve these UnsupportedClassVersion errors.

  • Avatar of NoHoPeLess NoHoPeLess May 20, 2015 at 07:08 UTC - 1 like

    @Incomprehendable: Go

    Dont work we use spigot 1.8.3

    [08:55:26] [Server thread/ERROR]: Could not load 'plugins/PerWorldPlugins.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/incomprehendable/dev/pwp/PerWorldPlugins : Unsupported major.minor version 52.0
    	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[custom.jar:git-Spigot-870264a-0a645a2]
    	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[custom.jar:git-Spigot-870264a-0a645a2]
    	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [custom.jar:git-Spigot-870264a-0a645a2]
    	at org.bukkit.craftbukkit.v1_8_R2.CraftServer.loadPlugins(CraftServer.java:291) [custom.jar:git-Spigot-870264a-0a645a2]
    	at net.minecraft.server.v1_8_R2.DedicatedServer.init(DedicatedServer.java:199) [custom.jar:git-Spigot-870264a-0a645a2]
    	at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:522) [custom.jar:git-Spigot-870264a-0a645a2]
    	at java.lang.Thread.run(Thread.java:745) [?:1.7.0_76]
    Caused by: java.lang.UnsupportedClassVersionError: me/incomprehendable/dev/pwp/PerWorldPlugins : Unsupported major.minor version 52.0
    	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.7.0_76]
    	at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[?:1.7.0_76]
    	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.7.0_76]
    	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[?:1.7.0_76]
    	at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[?:1.7.0_76]
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[?:1.7.0_76]
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[?:1.7.0_76]
    	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_76]
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[?:1.7.0_76]
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[custom.jar:git-Spigot-870264a-0a645a2]
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[custom.jar:git-Spigot-870264a-0a645a2]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_76]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_76]
    	at java.lang.Class.forName0(Native Method) ~[?:1.7.0_76]
    	at java.lang.Class.forName(Class.java:274) ~[?:1.7.0_76]
    	at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[custom.jar:git-Spigot-870264a-0a645a2]
    	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[custom.jar:git-Spigot-870264a-0a645a2]
    	... 6 more
    

    PerWorldPlugins 3.0

    BalayaCraft! Der etwas andere Server!

    BalayaCraft! Server-IP server.balayacraft.de | BalayaCraft-Website | Facebook | Twitter | Youtube |

  • Avatar of Incomprehendable Incomprehendable May 20, 2015 at 06:19 UTC - 0 likes

    Submitted the project's 1.8-compatible counterpart.

    @tonemon: Go

    You probably have the wrong version.

    @FutureForce: Go

    Barely.

    @zachcronin63: Go

    PlotMe.

  • Avatar of tonemon tonemon May 19, 2015 at 17:19 UTC - 0 likes

    I tried to download this on my CB 1.7.9-R0.1 and it doesn't work. :( can someone help me?

  • Avatar of FutureForce FutureForce May 18, 2015 at 21:51 UTC - 0 likes

    is this plugin still active

    ValerianaCraft

    • Problems don't exist, only challenges
  • Avatar of flawlessbraz1 flawlessbraz1 May 11, 2015 at 21:38 UTC - 0 likes

    Please never abandon this plugin this is so vital you have no idea.

    1. Skype: socomftb21david
    2. Owner of DavidsCloud
    3. Teamspeak: ts.davidscloud.net
    4. Website: davidscloud.net
  • Avatar of zachcronin63 zachcronin63 May 09, 2015 at 14:31 UTC - 0 likes

    So on my server I will be having 2 plot worlds one creative and one survival, I don't want the people to be able to get from survival to creative how do I do this without getting two plot plugins?

  • Avatar of ChunkTreasure ChunkTreasure Apr 24, 2015 at 12:41 UTC - 1 like

    @Zilacon: Go

    I can try

  • Avatar of Zilacon Zilacon Apr 24, 2015 at 11:22 UTC - 0 likes

    @ChunkTreasure: Go

    Any chance you could make a working version for 1.6.4 & 1.7.10?

    Join APOC Gaming to play Bukkit, All Technic packs, and All FTB packs in one community! APOC Gaming Network

    To join our TRPG Custom Modpack server download our modpack on our modpacks page on our website!

Facts

Date created
Jun 12, 2013
Categories
Last update
May 20, 2015
Development stage
Release
Language
  • enUS
License
Public Domain
Curse link
PerWorldPlugins
Downloads
54,820
Recent files

Authors