1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-22 06:12:56 +02:00

Block explicit /home bed, unless user has "essentials.home.bed" permission.

This does not effect the '/home' command when used with no arguments.
In this case, a player will still be sent to the bed home, if they have no Ess home set.
This commit is contained in:
KHobbits
2012-10-20 16:12:28 +01:00
parent eb845cc6dd
commit 84f8ff055f

View File

@@ -44,7 +44,7 @@ public class Commandhome extends EssentialsCommand
} }
try try
{ {
if ("bed".equalsIgnoreCase(homeName)) if ("bed".equalsIgnoreCase(homeName) && user.isAuthorized("essentials.home.bed"))
{ {
final Location bed = player.getBedSpawnLocation(); final Location bed = player.getBedSpawnLocation();
if (bed != null && bed.getBlock().getType() == Material.BED_BLOCK) if (bed != null && bed.getBlock().getType() == Material.BED_BLOCK)