From bcd52a1fbd9695c7be9df9a3d177e21eaab6066d Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Sun, 6 Feb 2011 15:30:41 +0100 Subject: [PATCH] Fixed version number and version command. Updated folder structure for easier working with eclipse --- .gitignore | 4 ++-- packaging/MANIFEST.MF => MANIFEST.MF | 0 packaging/plugin.yml => plugin.yml | 2 +- src/com/bukkit/mcteam/factions/Commands.java | 13 ++++++++++++- src/com/bukkit/mcteam/factions/entities/Conf.java | 4 ++++ 5 files changed, 19 insertions(+), 4 deletions(-) rename packaging/MANIFEST.MF => MANIFEST.MF (100%) rename packaging/plugin.yml => plugin.yml (74%) diff --git a/.gitignore b/.gitignore index c55a2731..2e706a0f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ /build /bin /dist -/manifest.mf +/localexport.jardesc # Mac filesystem dust -/.DS_Store \ No newline at end of file +.DS_Store \ No newline at end of file diff --git a/packaging/MANIFEST.MF b/MANIFEST.MF similarity index 100% rename from packaging/MANIFEST.MF rename to MANIFEST.MF diff --git a/packaging/plugin.yml b/plugin.yml similarity index 74% rename from packaging/plugin.yml rename to plugin.yml index ef5f77d4..84457b96 100644 --- a/packaging/plugin.yml +++ b/plugin.yml @@ -1,3 +1,3 @@ name: Factions -version: 1.0 beta +version: 1.0 alpha main: com.bukkit.mcteam.factions.Factions \ No newline at end of file diff --git a/src/com/bukkit/mcteam/factions/Commands.java b/src/com/bukkit/mcteam/factions/Commands.java index 9411b6c2..2d22d148 100644 --- a/src/com/bukkit/mcteam/factions/Commands.java +++ b/src/com/bukkit/mcteam/factions/Commands.java @@ -81,6 +81,12 @@ public class Commands { pageLines.add(Conf.colorSystem+"also use this to create member only areas."); pageLines.add(Conf.colorSystem+"As dispensers are protected you can create traps without"); pageLines.add(Conf.colorSystem+"worrying about those arrows getting stolen."); + + helpPages.add(pageLines); + pageLines = new ArrayList(); + + pageLines.add(TextUtil.commandHelp(Conf.aliasVersion, "", "Wich version are you using")); + helpPages.add(pageLines); } @@ -204,7 +210,9 @@ public class Commands { relation(me, Relation.ENEMY, TextUtil.implode(tokens)); } else if (Conf.aliasDescription.contains(command)) { description(me, TextUtil.implode(tokens)); - } else { + } else if (Conf.aliasVersion.contains(command)) { + version(me); + } else { //me.sendMessage(Conf.colorSystem+"Unknown faction command"+Conf.colorCommand+" "+command); me.sendMessage(Conf.colorSystem+"Unknown faction command"+Conf.colorCommand+" "+command); //me.getPlayer().sendMessage(TextUtil.repeat(tokens.get(0), Integer.parseInt(tokens.get(1)))); @@ -691,6 +699,9 @@ public class Commands { } } + public static void version(Follower me) { + me.sendMessage(Conf.colorSystem+"You are running "+Factions.desc.getFullName()); + } } diff --git a/src/com/bukkit/mcteam/factions/entities/Conf.java b/src/com/bukkit/mcteam/factions/entities/Conf.java index 1d72488c..8ef4a0da 100644 --- a/src/com/bukkit/mcteam/factions/entities/Conf.java +++ b/src/com/bukkit/mcteam/factions/entities/Conf.java @@ -70,6 +70,8 @@ public class Conf { public static List aliasDescription = new ArrayList(); + public static List aliasVersion = new ArrayList(); + // Value aliases public static List aliasTrue = new ArrayList(); @@ -166,6 +168,8 @@ public class Conf { aliasDescription.add("desc"); + aliasVersion.add("version"); + aliasTrue.add("true"); aliasTrue.add("yes"); aliasTrue.add("y");