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 ZOO231 ZOO231 Apr 17, 2015 at 11:25 UTC - 0 likes

    @XxDalekZWhovianXx

    I am making aYouTube tutorial on how to do it correctly, the method I use works and I will let you know when it is uploaded.

  • Avatar of Duffa13 Duffa13 Apr 16, 2015 at 11:03 UTC - 0 likes

    Update please for 1.8.3?

  • Avatar of XxDalekZWhovianXx XxDalekZWhovianXx Apr 13, 2015 at 23:21 UTC - 0 likes

    @rheuer22: Go

    This error is caused by PerWorldPlugins & A Other Plugin. That they don't mix I think. I'm not an expert But I had the same error before, I deleted the plugin "KitPVP" & The errors stopped.

  • Avatar of XxDalekZWhovianXx XxDalekZWhovianXx Apr 13, 2015 at 23:17 UTC - 0 likes

    My problem is that everything installed correctly, No console spam errors. So the config loaded up as well. I watched a tutorial on how to edit the config It all has been done correctly. I have Factions & MassiveCore installed. Latest version. & On The factions config place I put (Example: WorldA,WorldB) & I did not put WorldC In It. Then I stopped my server, Put it up again. I deoped myself, Spawned in WorldC & I did the command (./f) And Factions worked on WorldC, Then I went to WorldA & WorldB And factions worked there too. So basically, It's working for every world, Even though I put on the config that it works For WorldA & WorldB. I did NOT put WorldC In the Config. Becuase I do not want Factions In WorldC. I have tried deupgradeing the version of PerWorldPlugins. That did not work either. So far in all this prosses I have gotten no seerver error stacks on the console with PerWorldPlugins. May you please help, Sorry if your busy, I don't mean to bug you or anything. It just would be some great help if I could get some assistance. :) If your busy, & can't fix this. It's ok I understand. :) -NortherDogAJ

  • Avatar of rheuer22 rheuer22 Apr 13, 2015 at 22:15 UTC - 0 likes

    Im having some weird annoyoing error where it keeps saying this...

    I feel that per world plugins is the problem... I dont know... Help?

    ERROR THIS IS NOT AN ISSUE TO DO WITH PER WORLD PLUGINS 13.04 16:03:37 [Server] INFO ... 18 more 13.04 16:03:37 [Server] INFO at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader$1.execute(PerWorldPluginLoader.java:120) [?:?] 13.04 16:03:37 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:606) [?:1.7.0_65] 13.04 16:03:37 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.7.0_65] 13.04 16:03:37 [Server] INFO at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source) [?:?] 13.04 16:03:37 [Server] INFO at com.zombies.Listeners.OnSignInteractEvent.RightClickSign(OnSignInteractEvent.java:246) [?:?] 13.04 16:03:37 [Server] INFO Caused by: java.lang.NullPointerException 13.04 16:03:37 [Server] INFO at java.lang.Thread.run(Thread.java:745) [?:1.7.0_65] 13.04 16:03:37 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:517) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:609) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:284) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:656) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_65] 13.04 16:03:37 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_65] 13.04 16:03:37 [Server] INFO at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at net.minecraft.server.v1_8_R1.PacketPlayInBlockDig.a(SourceFile:10) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at net.minecraft.server.v1_8_R1.PacketPlayInBlockDig.a(SourceFile:40) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:573) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at net.minecraft.server.v1_8_R1.PlayerInteractManager.a(PlayerInteractManager.java:107) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at org.bukkit.craftbukkit.v1_8_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:176) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at org.bukkit.craftbukkit.v1_8_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:209) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at us.Myles.PWP.TransparentListeners.PWPRegisteredListener.callEvent(PWPRegisteredListener.java:30) [PerWorldPlugins.jar:?] 13.04 16:03:37 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [craftbukkit-1.8.1-20150304a.jar:git-Bukkit-33d5de3] 13.04 16:03:37 [Server] INFO at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader$1.execute(PerWorldPluginLoader.java:122) [?:?] 13.04 16:03:37 [Server] INFO org.bukkit.event.EventException 13.04 16:03:37 [Server] INFO Could not pass event PlayerInteractEvent to COM_Zombies v1.1.10 13.04 16:03:37 [Server] ERROR THIS IS NOT AN ISSUE TO DO WITH PER WORLD PLUGINS 13.04 16:03:37 [Multicraft] Skipped 199 lines due to rate limit (30/s) 13.04 16:03:36 [Server] ERROR THIS IS NOT AN ISSUE TO DO WITH PER WORLD PLUGINS 13.04 16:03:36 [Server] INFO ... 18 more

    Last edited Apr 13, 2015 by rheuer22
  • Avatar of SanscraftMC SanscraftMC Apr 09, 2015 at 19:58 UTC - 0 likes

    Can I use plugins that take all the server (like network minigames)?

  • Avatar of Soudreg Soudreg Mar 26, 2015 at 23:44 UTC - 1 like

    Getting error: [00:39:42] [Server thread/ERROR]: Error occurred while enabling AuthMe v3.5-SNAPSHOT (Is it up to date?) java.lang.NullPointerException at fr.xephi.authme.AuthMe.onEnable(AuthMe.java:261) [?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader.enablePlugin(PerWorldPluginLoader.java:145) [PerWorldPlugins.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at org.bukkit.craftbukkit.v1_8_R2.CraftServer.loadPlugin(CraftServer.java:356) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at org.bukkit.craftbukkit.v1_8_R2.CraftServer.enablePlugins(CraftServer.java:316) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at org.bukkit.craftbukkit.v1_8_R2.CraftServer.reload(CraftServer.java:746) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at org.bukkit.Bukkit.reload(Bukkit.java:534) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at us.Myles.PWP.FakeSimpleCommandMap.dispatch(FakeSimpleCommandMap.java:95) [PerWorldPlugins.jar:?] at org.bukkit.craftbukkit.v1_8_R2.CraftServer.dispatchCommand(CraftServer.java:646) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at net.minecraft.server.v1_8_R2.PlayerConnection.handleCommand(PlayerConnection.java:1133) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at net.minecraft.server.v1_8_R2.PlayerConnection.a(PlayerConnection.java:968) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at net.minecraft.server.v1_8_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at net.minecraft.server.v1_8_R2.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at net.minecraft.server.v1_8_R2.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_76] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_76] at net.minecraft.server.v1_8_R2.SystemUtils.a(SourceFile:60) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at net.minecraft.server.v1_8_R2.MinecraftServer.A(MinecraftServer.java:710) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at net.minecraft.server.v1_8_R2.DedicatedServer.A(DedicatedServer.java:368) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at net.minecraft.server.v1_8_R2.MinecraftServer.z(MinecraftServer.java:651) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:554) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] at java.lang.Thread.run(Thread.java:745) [?:1.7.0_76]

  • Avatar of DiamondcraftDC DiamondcraftDC Mar 22, 2015 at 01:15 UTC - 0 likes

    Is this compatible with 1.8?

  • Avatar of coolMJW coolMJW Mar 21, 2015 at 13:32 UTC - 0 likes

    I mean it works, just it spams the console and I need to see that!

    Does anyone know how to get rid of the spam?

    Mine Physics Doctors of Awesome

  • Avatar of budopey budopey Mar 18, 2015 at 11:48 UTC - 0 likes
    No 1.8 update still? Yes, it does have issues with plugins for 1.8. Argue all you want but this doesn't allow worldguard to protect regions some times allowing players to some times randomly accidentally grief maps. We are at 1.8.3 these days and this has been broken since 1.8.
    -BuDoPeY-
    -Hack the planet, not my server!
    -Seek a good Admin to help build your servers? PM me for details! I can provide customization to your server and help install up-to-date plugins to help you acquire the content you seek for your server!

Facts

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

Authors