Skip to content

Commit

Permalink
add alias /world to /whereintheworld and fix the message
Browse files Browse the repository at this point in the history
  • Loading branch information
eirworks committed Apr 19, 2013
1 parent 1f7715b commit 19e97b6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
11 changes: 0 additions & 11 deletions .classpath

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ RCS
RCSLOG
SCCS
_$*
.classpath
4 changes: 2 additions & 2 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ motd:
- '&r*** Please read the rules by typing &g/rules &r***'

whereintheworld:
world: "%player currently in %world"
noplayer: "%player is offline or not exists!"
world: "&Y%player&2 currently in &c%world&2"
noplayer: "&Y%player&2 is offline or not exists!"
6 changes: 4 additions & 2 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: OrphanageRules
main: orphanage.orphanagerules.OrphanageRules
description: Display rules for each world
version: 0.1
authors: [odiumxxx,virtualpain]
version: 0.1.1
commands:
rules:
description: Show rules of current world
Expand All @@ -14,4 +15,5 @@ commands:
whereintheworld:
description: Show Player's world currently in
usage: /whereintheworld [<playername>]
#permission: OrphanageRules.whereintheworld
#permission: OrphanageRules.whereintheworld
aliases: [world]
2 changes: 2 additions & 0 deletions src/orphanage/orphanagerules/commands/WhereInTheWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
{
message = plugin.getConfig().getString("whereintheworld.noplayer");
message = message.replace("%player",args[0]);
message = plugin.replaceColorMacros(message);
sender.sendMessage(message);
}
else
{
message = plugin.getConfig().getString("whereintheworld.world");
message = message.replace("%player",target.getName()).replace("%world", target.getWorld().getName() );
message = plugin.replaceColorMacros(message);
sender.sendMessage(message);

}
Expand Down

0 comments on commit 19e97b6

Please sign in to comment.