diff options
author | md_5 <md_5@bigpond.com> | 2012-05-27 17:24:49 +1000 |
---|---|---|
committer | md_5 <md_5@bigpond.com> | 2012-05-27 17:24:49 +1000 |
commit | 0559b935e94fd8cc3305fa48f98244136aed7377 (patch) | |
tree | f618119b6dc6f5d628c02295871713efb7fc687e | |
parent | 409f33797338c6c18f0f2949bbbf40314e1527b4 (diff) | |
download | Essentials-0559b935e94fd8cc3305fa48f98244136aed7377.tar Essentials-0559b935e94fd8cc3305fa48f98244136aed7377.tar.gz Essentials-0559b935e94fd8cc3305fa48f98244136aed7377.tar.lz Essentials-0559b935e94fd8cc3305fa48f98244136aed7377.tar.xz Essentials-0559b935e94fd8cc3305fa48f98244136aed7377.zip |
Add new command /hat and update translate keys as well as fix colour codes.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Essentials.java | 2 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandhat.java | 36 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandmail.java | 1 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandvanish.java | 4 | ||||
-rw-r--r-- | Essentials/src/messages.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_cs.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_da.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_de.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_en.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_es.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_fr.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_it.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_nl.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_pl.properties | 8 | ||||
-rw-r--r-- | Essentials/src/messages_pt.properties | 8 | ||||
-rw-r--r-- | Essentials/src/plugin.yml | 4 |
16 files changed, 128 insertions, 7 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 60045464b..5b6236c30 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -271,7 +271,7 @@ public class Essentials extends JavaPlugin implements IEssentials { if (getUser(p).isVanished()) { - p.sendMessage(ChatColor.RED + _("unvanishedReload")); + p.sendMessage(_("unvanishedReload")); } } i18n.onDisable(); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhat.java b/Essentials/src/com/earth2me/essentials/commands/Commandhat.java new file mode 100644 index 000000000..24d464275 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhat.java @@ -0,0 +1,36 @@ +package com.earth2me.essentials.commands; + +import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.User; +import org.bukkit.Material; +import org.bukkit.Server; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; + + +public class Commandhat extends EssentialsCommand +{ + public Commandhat() + { + super("hat"); + } + + @Override + protected void run(Server server, User user, String commandLabel, String[] args) throws Exception + { + if (user.getItemInHand().getType() != Material.AIR) + { + final ItemStack hand = user.getItemInHand(); + final PlayerInventory inv = user.getInventory(); + final ItemStack head = inv.getHelmet(); + inv.removeItem(hand); + inv.setHelmet(hand); + inv.setItemInHand(head); + user.sendMessage(_("hatPlaced")); + } + else + { + user.sendMessage(_("hatFail")); + } + } +} diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java index fa4643875..7a2dad1b1 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java @@ -4,7 +4,6 @@ import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; import java.util.List; -import org.bukkit.ChatColor; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandvanish.java b/Essentials/src/com/earth2me/essentials/commands/Commandvanish.java index 2c14f60ef..b55bd76a4 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandvanish.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandvanish.java @@ -23,7 +23,7 @@ public class Commandvanish extends EssentialsCommand { p.showPlayer(user); } - user.sendMessage(ChatColor.GREEN + _("vanished")); + user.sendMessage(_("vanished")); } else { @@ -33,7 +33,7 @@ public class Commandvanish extends EssentialsCommand { p.hidePlayer(user); } - user.sendMessage(ChatColor.GREEN + _("unvanished")); + user.sendMessage(_("unvanished")); } } user.toggleVanished(); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 0e941cc58..84f4734e6 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -111,6 +111,8 @@ geoipJoinFormat=Player {0} comes from {1} godDisabledFor=disabled for {0} godEnabledFor=enabled for {0} godMode=\u00a77God mode {0}. +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. @@ -380,8 +382,8 @@ unknownItemName=Unknown item name: {0} unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}. unlimitedItems=Unlimited items: unmutedPlayer=Player {0} unmuted. -unvanished=You are once again visible. -unvanishedReload=A reload has forced you to become visible. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. upgradingFilesError=Error while upgrading the files userDoesNotExist=The user {0} does not exist. userIsAway={0} is now AFK @@ -391,7 +393,7 @@ userUsedPortal={0} used an existing exit portal. userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp usingTempFolderForTesting=Using temp folder for testing: -vanished=You have now been vanished. +vanished=\u00a7aYou have now been vanished. versionMismatch=Version mismatch! Please update {0} to the same version. versionMismatchAll=Version mismatch! Please update all Essentials jars to the same version. voiceSilenced=\u00a77Your voice has been silenced diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index 7a43b559d..dc64cb5e1 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -426,3 +426,11 @@ youAreHealed=\u00a77Byl jsi uzdraven. youHaveNewMail=\u00a7cMas {0} zprav!\u00a7f Napis \u00a77/mail read\u00a7f aby jsi si precetl sve zpravy. currentWorld=Current World: {0} kickedAll=\u00a7cKicked all players from server +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +vanished=\u00a7aYou have now been vanished. +tps=Current TPS = {0} +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index a88863528..076e5a956 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -423,3 +423,11 @@ year=\u00e5r years=\u00e5r youAreHealed=\u00a77Du er blevet healed. Halleluja! youHaveNewMail=\u00a7cDu har {0} flaskeposter!\u00a7f Type \u00a77/mail read for at se din flaskepost. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +vanished=\u00a7aYou have now been vanished. +tps=Current TPS = {0} +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 6ac0e1809..6aa916542 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -423,3 +423,11 @@ year=Jahr years=Jahre youAreHealed=\u00a77Du wurdest geheilt. youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +vanished=\u00a7aYou have now been vanished. +tps=Current TPS = {0} +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 73ce00bee..84f4734e6 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -85,6 +85,8 @@ errorWithMessage=\u00a7cError: {0} essentialsHelp1=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, go to http://tiny.cc/EssentialsChat essentialsHelp2=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, either type /essentialshelp in game or go to http://tiny.cc/EssentialsChat essentialsReload=\u00a77Essentials Reloaded {0} +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. extinguish=\u00a77You extinguished yourself. extinguishOthers=\u00a77You extinguished {0}. failedToCloseConfig=Failed to close config {0} @@ -109,6 +111,8 @@ geoipJoinFormat=Player {0} comes from {1} godDisabledFor=disabled for {0} godEnabledFor=enabled for {0} godMode=\u00a77God mode {0}. +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. @@ -364,6 +368,7 @@ tradeSignEmptyOwner=There is nothing to collect from this trade sign. treeFailure=\u00a7cTree generation failure. Try again on grass or dirt. treeSpawned=\u00a77Tree spawned. true=true +tps=Current TPS = {0} typeTpaccept=\u00a77To teleport, type \u00a7c/tpaccept\u00a77. typeTpdeny=\u00a77To deny this request, type \u00a7c/tpdeny\u00a77. typeWorldName=\u00a77You can also type the name of a specific world. @@ -377,6 +382,8 @@ unknownItemName=Unknown item name: {0} unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}. unlimitedItems=Unlimited items: unmutedPlayer=Player {0} unmuted. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. upgradingFilesError=Error while upgrading the files userDoesNotExist=The user {0} does not exist. userIsAway={0} is now AFK @@ -386,6 +393,7 @@ userUsedPortal={0} used an existing exit portal. userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp usingTempFolderForTesting=Using temp folder for testing: +vanished=\u00a7aYou have now been vanished. versionMismatch=Version mismatch! Please update {0} to the same version. versionMismatchAll=Version mismatch! Please update all Essentials jars to the same version. voiceSilenced=\u00a77Your voice has been silenced diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 4469b284f..aa735be29 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -423,3 +423,11 @@ year=año years=años youAreHealed=\u00a77Has sido curado. youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f para ver tus emails no leidos!. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +vanished=\u00a7aYou have now been vanished. +tps=Current TPS = {0} +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 235b22479..9be26fa00 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -423,3 +423,11 @@ year=ann\u00e9e years=ann\u00e9es youAreHealed=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9. youHaveNewMail=\u00a7cVous avez {0} messages ! \u00a7fEntrez \u00a77/mail read\u00a7f pour voir votre courrier. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +vanished=\u00a7aYou have now been vanished. +tps=Current TPS = {0} +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index 1eaf84e6d..0bf67362e 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -423,3 +423,11 @@ year=anno years=anni youAreHealed=\u00a77Sei stato curato. youHaveNewMail=\u00a7cHai {0} messaggi!\u00a7f digita \u00a77/mail read\u00a7f per consultare la tua mail. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +vanished=\u00a7aYou have now been vanished. +tps=Current TPS = {0} +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index c0ac8c4d5..7a6827d2f 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -423,3 +423,11 @@ year=jaar years=jaren youAreHealed=\u00a77Je bent genezen. youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +vanished=\u00a7aYou have now been vanished. +tps=Current TPS = {0} +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index 58a5171c4..b7740ac12 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -423,3 +423,11 @@ year=rok years=lat youAreHealed=\u00a77Zostales/las uleczony/na. youHaveNewMail=\u00a7cMasz {0} wiadomosci!\u00a7f napisz \u00a77/mail read\u00a7f aby je przeczytac. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +vanished=\u00a7aYou have now been vanished. +tps=Current TPS = {0} +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index d12876d1a..9e91d1aa3 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -423,3 +423,11 @@ year=ano years=anos youAreHealed=\u00a77Voc\u00ea foi curado. youHaveNewMail=\u00a7cVoc\u00ea tem {0} mensagens!\u00a7f Digite \u00a77/mail read\u00a7f para ver seu email. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +vanished=\u00a7aYou have now been vanished. +tps=Current TPS = {0} +hatPlaced=\u00a7eEnjoy your new hat! +hatFail=\u00a7cYou must have something to wear in your hand. diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index bfa7ee602..8cacc0c11 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -135,6 +135,10 @@ commands: description: Enables your godly powers. usage: /<command> [player] aliases: [tgm,godmode,egod,etgm,egodmode] + hat: + description: Get some cool new headgear + usage: /<command> + aliases: [ehat] heal: description: Heals you or the given player. usage: /<command> [player] |