SleepPotion
SleepPotion
SleepPotion is a plugin which adds the Potion of Sleeping. Once thrown, all players within the splash radius will be put to sleep for a set period of time (5 seconds, or 10 seconds with an extended potion).
Crafting
The Potion of Sleeping is crafted from a water bottle and wool around it:

The Extended Potion of Sleeping is crafted from a water bottle, redstone around it and wool around that:

Commands (Version 1.1+)
The amount is optional and the <Player> has to be player's name.
To give a player a sleep potion: /sleeppotion give <Player> (amount)
To give a player an extended sleep potion: /sleeppotion giveextend <Player> (amount)
| Command syntax | Description |
|---|---|
| /sleeppotion give Skepter 5 | Give Skepter 5 sleep potions |
| /sleeppotion giveextend Skepter | Give Skepter 1 extended sleep potion |
Permissions
The permissions are relatively simple:
| Potion to craft | Permission required |
|---|---|
| Potion of Sleeping | SleepPotion.potion |
| Extended Potion of Sleeping | SleepPotion.potionExtended |
| Use command | SleepPotion.command |
Config (Version 1.2+)
The duration for each sleep potion can be changed in the config.yml file, in seconds (Must be whole numbers).
#SleepPotion time adjustments (seconds) potionTime: 5 extendedPotionTime: 10
Uses
Why use this? Here are a few reasons why you would want a sleeping potion:
- Hunger game maps
- PVP
- Trolling players
Installation
Installing the plugin is as simple as putting the plugin.jar file into your /plugins/ folder and restart/reloading the server.
From version 1.4 onwards, SleepPotion requires ProtocolLib to handle bed packets. ProtocolLib can be downloaded here.
Source
Source code is available on GitHub: here
-
View User Profile
-
Send Message
Posted Dec 25, 20241.20.1 pleas?
-
View User Profile
-
Send Message
Posted Feb 16, 2016@China6666
Sure thing
-
View User Profile
-
Send Message
Posted Dec 9, 2015Can I transfer it to www.mcbbs.net Minecraft Chinese Forum
-
View User Profile
-
Send Message
Posted Dec 19, 2014@Clawshot
@toxictroop
Added configurable sleep times in version 1.2 Fixed bug with command in version 1.2 (awaiting approval)
-
View User Profile
-
Send Message
Posted Dec 19, 2014How about configuring the Sleep Times? Like that you can configure the Time of an Normal and Extended Sleep Potion
-
View User Profile
-
Send Message
Posted Dec 19, 2014[20:47:44 ERROR]: null org.bukkit.command.CommandException: Unhandled exception executing command 'slee ppotion' in plugin SleepPotion v1.1 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) [spi got.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18 1) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServe r.java:767) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerCon nection.java:1043) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java :880) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java :28) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat .java:65) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:186 ) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java :81) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:7 34) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:2 89) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:5 84) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java :490) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6 28) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at io.github.Skepter.SleepPotion.Main.onCommand(Main.java:78) [?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spi got.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] ... 13 more
-
View User Profile
-
Send Message
Posted Dec 19, 2014@Dillzzzzz
Added /sleeppotion command to version 1.1 - awaiting download to be approved.
-
View User Profile
-
Send Message
Posted Dec 19, 2014Command to give the potion? Would be good if you could add quantity such as: /givesleep <player> <2>
Want it as donor perk :)