From 4c7bd8c96ab19f0e79034afaf6c1f580fe0a42a2 Mon Sep 17 00:00:00 2001 From: ementalo Date: Tue, 19 Apr 2011 10:49:17 +0000 Subject: [trunk] add optional playername param to home. Players with "essentials.homes.others" permission can teleport to other players homes. git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1243 e251c2fe-e539-e718-e476-b85c1f46cddb --- Essentials/src/com/earth2me/essentials/commands/Commandhome.java | 5 +++++ Essentials/src/plugin.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java index 0dc92d25a..004cc8e09 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java @@ -16,6 +16,11 @@ public class Commandhome extends EssentialsCommand { user.canAfford(this); user.teleportCooldown(); + if(args.length > 1 && user.isAuthorized("essentials.home.others")) + { + user.teleportToHome(args[0]); + return; + } user.teleportToHome(this.getName()); } } diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 9f75ec131..c8c16a949 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -92,7 +92,7 @@ commands: usage: / [message] home: description: Teleport to your home. - usage: / + usage: / info: description: Shows information set by the server owner usage: / [chapter] [page] -- cgit v1.2.3