Skip to content

Commit

Permalink
Help message fixed. Other minor bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdesimp committed Mar 20, 2014
1 parent 0985120 commit cceff49
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/com/jcdesimp/landlord/LandMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public LandMap(Player p) {
this.schedulerId = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(Landlord.getInstance(), new BukkitRunnable() {
@Override
public void run() {
if(currDir!=getPlayerDirection(mapViewer) || currChunk!=mapViewer.getLocation().getChunk()){
if(!currDir.equals(getPlayerDirection(mapViewer)) || !currChunk.equals(mapViewer.getLocation().getChunk())){
displayMap(mapViewer);
currDir = getPlayerDirection(mapViewer);
}
Expand Down Expand Up @@ -71,8 +71,13 @@ private Scoreboard displayMap(Player p){
team.addPlayer(p);

Objective objective = board.registerNewObjective("Land Map", "dummy");
/*ChatColor.STRIKETHROUGH+""+ChatColor.DARK_GREEN+
"=== "+ChatColor.RESET+""+ChatColor.DARK_GREEN +"Land Map"
+ChatColor.STRIKETHROUGH+""+ChatColor.DARK_GREEN+" ==="*/
objective.setDisplaySlot(DisplaySlot.SIDEBAR);
//objective.setDisplayName("MAP");
objective.setDisplayName(ChatColor.YELLOW+""+ChatColor.STRIKETHROUGH+
"=="+ChatColor.RESET+""+ChatColor.GOLD +" Land Map "
+ChatColor.YELLOW+""+ChatColor.STRIKETHROUGH+"==");
String[] mapData = buildMap(p);
for(int i = 0; i<mapData.length; i++){
if(mapData[i].length()<21){
Expand Down
15 changes: 14 additions & 1 deletion src/com/jcdesimp/landlord/LandlordCommandExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
//landlord
return landlord(sender, args, label);

} else if(args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("buy")) {

//landlord claim
return landlord_help(sender, args, label);

} else if(args[0].equalsIgnoreCase("claim") || args[0].equalsIgnoreCase("buy")) {

//landlord claim
Expand Down Expand Up @@ -113,6 +118,14 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
* @return boolean
*/
private boolean landlord(CommandSender sender, String[] args, String label) {
sender.sendMessage(ChatColor.DARK_GREEN + "--|| Landlord v"+Landlord.getInstance().getDescription().getVersion() +
" Created by " + ChatColor.BLUE+"Jcdesimp "+ChatColor.DARK_GREEN +"||--\n"+
ChatColor.GRAY+"(Aliases: /landlord, /land, or /ll)\n"+
ChatColor.DARK_GREEN+"Type " +ChatColor.YELLOW+"/"+label+" help "+ChatColor.DARK_GREEN +"for a list of commands");
return true;
}

private boolean landlord_help(CommandSender sender, String[] args, String label) {
/*String helpMsg = "";
helpMsg+=ChatColor.DARK_GREEN + "--|| Landlord v"+Landlord.getInstance().getDescription().getVersion() +
" Created by " + ChatColor.BLUE+"Jcdesimp "+ChatColor.DARK_GREEN +"||--\n"+
Expand Down Expand Up @@ -178,7 +191,7 @@ private boolean landlord(CommandSender sender, String[] args, String label) {
helpList.add(ChatColor.DARK_AQUA+"/"+label + " info" + ChatColor.RESET + " - View info about this chunk.\n");
}
if(sender.hasPermission("landlord.admin.list")){
helpList.add(ChatColor.DARK_AQUA+"/"+label + " list <player>" + ChatColor.RESET + " - List land owned by another player.\n");
helpList.add(ChatColor.DARK_AQUA+"/"+label + " listplayer <player>" + ChatColor.RESET + " - List land owned by another player.\n");
}
if(sender.hasPermission("landlord.admin.clearworld")){
helpList.add(ChatColor.DARK_AQUA+"/"+label + " clearworld <world> [player]" + ChatColor.RESET + " - Delete land all owned by a player in a world." +
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Landlord
main: com.jcdesimp.landlord.Landlord
version: 0.3
version: 0.4
author: Jcdesimp
authors: []
website: http://dev.bukkit.org/bukkit-plugins/landlord/
Expand Down

0 comments on commit cceff49

Please sign in to comment.