BedShout: Let everyone know who is and isn't sleeping! Updated and tested for recommended build 1317. Version: v1.3 BedShout is my first plugin for Bukkit. I created it for the server Wowcraft because there was oftentimes a problem with people not going to bed and no one knowing who it was. When anyone enters a bed, this plugin alerts everyone that "(playername) has gone to bed" and lists users that are not currently sleeping. Features: Know when someone enters a bed Broadcasts the names of everyone who isn't sleeping Download Link: Dropbox Source Code: Pastebin Installation: Drop the .jar file into your server's "plugins" folder. Changelog: Version 1.3 Rewrote most of the code A message is still sent on servers where there is only one player (mostly for testing purposes). It says that there are no other players online after the player enters a bed. Version 1.0.1 Added the plugin.yml that I forgot and changed a bit of code. Version 1.0 Created the plugin. It alerts everyone when someone enters a bed and says who isn't in a bed.
Sorry about that. I uploaded the new .jar with plugin.yml included. If anyone cares, I would appreciate it if someone looked at my code and warned me if I did anything horribly wrong c:
Now I'm really scared =) Nah not really, I'll try it out and tell you if it works when I get home, unless someone beats me to it. Still not so good bro Code: 21:33:10 [SEVERE] Could not load 'plugins\BedShout v1.0.1.jar' in folder 'plugins': java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:213) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110) at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:133) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337) at net.minecraft.server.ThreadServerApplication.run(SourceFile:422) Caused by: java.lang.NullPointerException at me.Dot145.BedShout.BedShout.<init>(BedShout.java:16) ... 13 more EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Besides turning them off one at a time till the error goes away, can you glean from the error what it could be? I'd like to help this author. Sorry bud, get the error with nothing but this plugin installed. Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Code: 8/23/2011 6:59:16 PM Could not load 'plugins\BedShout v1.0.2.jar' in folder 'plugins': 8/23/2011 6:59:16 PM java.lang.reflect.InvocationTargetException 8/23/2011 6:59:16 PM sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 8/23/2011 6:59:16 PM sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) 8/23/2011 6:59:16 PM sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 8/23/2011 6:59:16 PM java.lang.reflect.Constructor.newInstance(Unknown Source) 8/23/2011 6:59:16 PM org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173) 8/23/2011 6:59:16 PM org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:213) 8/23/2011 6:59:16 PM org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136) 8/23/2011 6:59:16 PM org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143) 8/23/2011 6:59:16 PM 12:00:00 AM rg.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110: org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110) 8/23/2011 6:59:16 PM 12:00:00 AM et.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51: net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51) 8/23/2011 6:59:16 PM net.minecraft.server.MinecraftServer.init(MinecraftServer.java:133) 8/23/2011 6:59:16 PM net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337) 8/23/2011 6:59:16 PM net.minecraft.server.ThreadServerApplication.run(SourceFile:422) 8/23/2011 6:59:16 PM by: java.lang.NullPointerException 8/23/2011 6:59:16 PM 12:00:00 AM e.Dot145.BedShout.BedShout.<init>(BedShout.java:16: me.Dot145.BedShout.BedShout.<init>(BedShout.java:16) 8/23/2011 6:59:16 PM 13 more EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I appreciate you guys trying to help I'll have a look at my line 16 because it said "BedShout.java:16:" ...That's my "PluginManager pm = this.getServer().getPluginManager();" line... odd. EDIT: I realized that I had put the event PLAYER_BED_ENTER in the blockListener, not the playerListener. I uploaded a new .jar and the code has been updated.
No dice! Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Code: 8/23/2011 9:40:25 PM Could not load 'plugins\BedShout v1.2.jar' in folder 'plugins': 8/23/2011 9:40:25 PM java.lang.reflect.InvocationTargetException 8/23/2011 9:40:25 PM sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 8/23/2011 9:40:25 PM sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) 8/23/2011 9:40:25 PM sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 8/23/2011 9:40:25 PM java.lang.reflect.Constructor.newInstance(Unknown Source) 8/23/2011 9:40:25 PM org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173) 8/23/2011 9:40:25 PM org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:213) 8/23/2011 9:40:25 PM org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136) 8/23/2011 9:40:25 PM org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143) 8/23/2011 9:40:25 PM 12:00:00 AM rg.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110: org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110) 8/23/2011 9:40:25 PM 12:00:00 AM et.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51: net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51) 8/23/2011 9:40:25 PM net.minecraft.server.MinecraftServer.init(MinecraftServer.java:133) 8/23/2011 9:40:25 PM net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337) 8/23/2011 9:40:25 PM net.minecraft.server.ThreadServerApplication.run(SourceFile:422) 8/23/2011 9:40:25 PM by: java.lang.NullPointerException 8/23/2011 9:40:25 PM 12:00:00 AM e.Dot145.BedShout.BedShout.<init>(BedShout.java:16: me.Dot145.BedShout.BedShout.<init>(BedShout.java:16) 8/23/2011 9:40:25 PM 13 more
>reloadall 22:51:01 [INFO] [Adminium] has been disabled. 22:51:01 [INFO] [AdminsCanFly] Shutting down... 22:51:01 [INFO] [AutoMessage] version [1.5] disabled 22:51:01 [INFO] Goodbye world! 22:51:01 [INFO] DreamLand version 2.4 is disabled! 22:51:01 [INFO] [BasicHerobrine] BasicHerobrine disabled. 22:51:01 [INFO] [HerobrineUnleashed] HerobrineUnleashed 0.3.4.5 is disabled! 22:51:01 [INFO] [HeroicRebuke] 1.2.7.87 disabled. 22:51:01 [INFO] IceGeoIP 1.0 was disabled! 22:51:01 [INFO] IllegalName version 1.3 is disabled! 22:51:01 [INFO] InstaBreak version 1.0 is disabled! 22:51:01 [INFO] [LazyRoad] : Plugin disabled 22:51:01 [INFO] Lockette: Closing all automatic doors. 22:51:01 [INFO] [LyTreeHelper] LyTreeHelper 2.5.1 disabled. 22:51:02 [INFO] [MinecraftViewer] v1.0d Plugin Disabled. 22:51:02 [INFO] [Permissions] (Yeti) saving data... 22:51:02 [INFO] [Permissions] (Yeti) saved all data. 22:51:02 [INFO] [Permissions] (Yeti) disabled successfully. 22:51:02 [INFO] PlgLogCmd version 1.0 stopping... 22:51:02 [INFO] Rakamak plugin disabled.... Shame on you! 22:51:02 [INFO] Reusable Glass 1.1 has been disabled. 22:51:02 [INFO] SelfPlanting: disabling... 22:51:02 [INFO] SelfPlanting v1.3 disabled. 22:51:02 [INFO] [SetRank] Shutting down... 22:51:02 [INFO] [SetRank] Done! 22:51:02 [INFO] [SignLift] Disabled 22:51:02 [INFO] [SimpleJail] SimpleJail v1.4.6 disabled. 22:51:02 [INFO] TimeAnnounce version 1.5 is disabled 22:51:02 [INFO] Goodbye world! 22:51:02 [INFO] [MobArena] Payment method was disabled. No longer accepting payments. 22:51:02 [INFO] [MobArena] disabled. 22:51:02 [SEVERE] Could not load 'plugins\BedShout v1.2.jar' in folder 'plugins': java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:213) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143) at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:450) at com.earth2me.essentials.commands.Commandreloadall.run(Commandreloadall.java:19) at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:94) at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:438) at com.earth2me.essentials.Essentials.onCommand(Essentials.java:353) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:344) at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:489) at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:468) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363) at net.minecraft.server.ThreadServerApplication.run(SourceFile:422) Caused by: java.lang.NullPointerException at me.Dot145.BedShout.BedShout.<init>(BedShout.java:16) ... 20 more 22:51:02 [INFO] MLog clients using java 1.4+ standard logging. 22:51:02 [INFO] [Permissions] (Yeti) was initialized. 22:51:02 [INFO] [Permissions] version [3.1.6] (Yeti) loaded 22:51:02 [INFO] [Adminium] version [1.1.0] is enabled! 22:51:02 [INFO] [AdminsCanFly] Version 1.2.0 - By Lappy 22:51:02 [INFO] [AdminsCanFly] Starting up... 22:51:02 [INFO] [AdminsCanFly] Registering event listeners... 22:51:02 [INFO] [AdminsCanFly] Started up successfully 22:51:02 [INFO] [AdminsCanFly] Permissions v3.1.6 support is enabled! 22:51:02 [INFO] [AutoMessage] version [1.5] loaded 22:51:02 [INFO] Backup v1.6 was sucessfully loaded! 22:51:02 [INFO] BedHealAdvanced v1.0 is loaded. 22:51:02 [INFO] DreamLand version 2.4 is enabled! 22:51:03 [INFO] Loaded Essentials build 2.5.5 by [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeo 22:51:03 [INFO] Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10] 22:51:03 [INFO] Loaded EssentialsProtect build 2.5.5 by essentials team 22:51:03 [INFO] Loaded EssentialsSpawn build 2.5.5 by essentials team 22:51:03 [INFO] [BasicHerobrine] BasicHerobrine version 1.2.1 has been enabled. 22:51:03 [INFO] [HerobrineUnleashed] HerobrineUnleashed 0.3.4.5 is enabled! 22:51:03 [INFO] [HerobrineUnleashed] Current configuration version: 0.3.4.5! 22:51:03 [INFO] [HeroicRebuke] Loaded 0 active warnings. 22:51:03 [INFO] [HeroicRebuke] 1.2.7.87 enabled. 22:51:03 [INFO] IceGeoIP 1.0 was loaded sucessfully! 22:51:03 [INFO] IllegalName version 1.3 is enabled with permissions! 22:51:03 [INFO] InstaBreak version 1.0 is enabled with permissions! 22:51:03 [INFO] [LazyRoad] : Version 0.5.2 is enabled! 22:51:03 [INFO] Lockette version 1.3.8 is being enabled! Yay! (Core version 1.0) 22:51:03 [INFO] Lockette: Detected craftbukkit build [1060] ok. 22:51:03 [INFO] Lockette: Linked to Permissions plugin version 3.1.6 22:51:03 [INFO] Lockette: Ready to protect your containers. 22:51:03 [INFO] [LockIP] Loading LockIP 22:51:03 [INFO] [LockIP] Loaded locked IPs 22:51:03 [INFO] [LockIP] Subnet mode is true 22:51:03 [INFO] [LyTreeHelper] Permission plugin detected, using Permissions plugin for permissions. 22:51:03 [INFO] [LyTreeHelper] LyTreeHelper 2.5.1 enabled. 22:51:03 [INFO] [MinecraftViewer] v1.0d Plugin Enabled. 22:51:03 [INFO] [MinecraftViewer] Query running on 127.0.0.1:25565 22:51:03 [INFO] PlgLogCmd version 1.0 is enabled! 22:51:03 [INFO] Rakamak activation... Security is yours 22:51:03 [INFO] Rakamak version 3.1.0 is enabled. Plugin provided by [Erwyn] 22:51:03 [INFO] Reusable Glass 1.1 has been enabled. 22:51:03 [INFO] SelfPlanting v1.3 enabled. 22:51:03 [INFO] [SetRank] Booting... 22:51:03 [INFO] [SetRank] Permissions system detected! 22:51:03 [INFO] [SetRank] Done! 22:51:03 [INFO] [SignLift] Version 0.9 - Copyright 2011 - Shannon Wynter (http://fremnet.net) is enabled 22:51:03 [INFO] [SimpleJail] SimpleJail v1.4.6 enabled. 22:51:03 [INFO] [TimeAnnounce] Version 1.5 - Copyright 2011 - Shannon Wynter (http://fremnet.net) is enabled 22:51:03 [INFO] Whitelist: Trying to load whitelist and settings... 22:51:03 [INFO] done. 22:51:03 [INFO] Whitelist version 2.7 is enabled! 22:51:03 [INFO] [MobArena] Payment method found (Essentials version: 2.2) 22:51:03 [INFO] [MobArena] v0.93.4 enabled. 22:51:03 [INFO] Server permissions file permissions.yml is empty, ignoring it 22:51:03 [INFO] Reloaded all plugins. > itried arestart insted of just a reload to same errors
@Buckethead we both are running a bunch of mods, and none of them are the same, yet we both want to run this one. I found that amusing.
lol yeah. also how do u put ur text in a spoiler or something like that i feel bad taking up half a page with all this lol
[.SPOILER]text[./SPOILER] And useful for logs [.SPOILER][.CODE]logs[./CODE][./SPOILER] I don't believe it is case sensitive, just makes it stand out better. Just remove the .'s from the tags and it'll do this... Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler text And useful for logs Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Code: logs I don't know why they don't add a spoiler button like they have a code button
Aww, you're making me feel bad. I have no clue why it doesn't work and you appreciate me making this, even though it still doesn't work. I don't know anything else to try.
The only problem is that I have no clue what's wrong, so it's sort of futile. EDIT: I think I may have found the problem. I looked through the source code of a currently working plugin and noticed my PluginManager line was in a different place. I moved it. Hopefully it will work, because that was probably causing the problem before.
Feel free to look at my code and try out my plugin at this thread: SleepAnnounce Just an FYI, SleepAnnounce has configurable sleep/awake announcements, listing of players asleep/awake, PermissionsBukkit, MultiVerse, and DispNameChanger support, etc. I just wanted to let you know since your plugin seems to be heading in the same direction. Have fun coding!