summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--Essentials/nbproject/pmd.settings1
-rw-r--r--Essentials/nbproject/project.properties6
-rw-r--r--Essentials/src/com/earth2me/essentials/AlternativeCommandsHandler.java117
-rw-r--r--Essentials/src/com/earth2me/essentials/Backup.java9
-rw-r--r--Essentials/src/com/earth2me/essentials/Console.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/DescParseTickFormat.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java231
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java1
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsConf.java34
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java26
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java84
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java82
-rw-r--r--Essentials/src/com/earth2me/essentials/ExecuteTimer.java19
-rw-r--r--Essentials/src/com/earth2me/essentials/FakeWorld.java99
-rw-r--r--Essentials/src/com/earth2me/essentials/I18n.java171
-rw-r--r--Essentials/src/com/earth2me/essentials/IEssentials.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/ISettings.java22
-rw-r--r--Essentials/src/com/earth2me/essentials/ItemDb.java23
-rw-r--r--Essentials/src/com/earth2me/essentials/Jail.java13
-rw-r--r--Essentials/src/com/earth2me/essentials/JailPlayerListener.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/ManagedFile.java18
-rw-r--r--Essentials/src/com/earth2me/essentials/Mob.java31
-rw-r--r--Essentials/src/com/earth2me/essentials/OfflinePlayer.java240
-rw-r--r--Essentials/src/com/earth2me/essentials/PlayerExtension.java54
-rw-r--r--Essentials/src/com/earth2me/essentials/Settings.java51
-rw-r--r--Essentials/src/com/earth2me/essentials/Spawn.java1
-rw-r--r--Essentials/src/com/earth2me/essentials/TNTExplodeListener.java52
-rw-r--r--Essentials/src/com/earth2me/essentials/TargetBlock.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/Teleport.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/Trade.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/User.java83
-rw-r--r--Essentials/src/com/earth2me/essentials/UserData.java47
-rw-r--r--Essentials/src/com/earth2me/essentials/UserMap.java69
-rw-r--r--Essentials/src/com/earth2me/essentials/Util.java267
-rw-r--r--Essentials/src/com/earth2me/essentials/Warps.java21
-rw-r--r--Essentials/src/com/earth2me/essentials/Worth.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/api/Economy.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/api/NoLoanPermittedException.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/api/UserDoesNotExistException.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandafk.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandantioch.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandback.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbackup.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbalance.java21
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java17
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandban.java34
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbanip.java17
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java20
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandburn.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java25
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandcompass.java26
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java25
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commanddeljail.java13
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commanddelwarp.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commanddepth.java18
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandeco.java23
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandessentials.java17
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandext.java18
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandfireball.java12
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java57
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgc.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgive.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgod.java22
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandheal.java20
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhelp.java220
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java18
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhome.java28
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandignore.java28
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandinfo.java180
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java20
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commanditem.java19
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandjails.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandjump.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkick.java32
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkickall.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkill.java12
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkit.java52
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandlightning.java19
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandlist.java51
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmail.java39
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandme.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmotd.java17
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmsg.java24
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmute.java31
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandnick.java110
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandnuke.java9
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandpay.java11
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandping.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandpowertool.java26
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandpowertooltoggle.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandptime.java34
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandr.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandrealname.java13
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandreloadall.java21
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandrepair.java29
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandrules.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandseen.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsell.java20
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsethome.java22
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsetjail.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandspawner.java17
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java89
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsudo.java42
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtempban.java37
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandthunder.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtime.java44
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java71
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtop.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtp.java43
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpa.java22
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java28
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java29
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java20
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpall.java22
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpdeny.java16
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtphere.java18
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpo.java20
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java20
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtppos.java30
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtptoggle.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtree.java26
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandunban.java12
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java41
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandwarp.java103
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandweather.java35
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandwhois.java53
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandworld.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandworth.java84
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java19
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/IEssentialsCommand.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/NotEnoughArgumentsException.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/craftbukkit/FakeExplosion.java51
-rw-r--r--Essentials/src/com/earth2me/essentials/craftbukkit/ShowInventory.java47
-rw-r--r--Essentials/src/com/earth2me/essentials/perm/BPermissionsHandler.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/perm/GroupManagerHandler.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/Method.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/Methods.java1
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java40
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE7.java40
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/methods/MCUR.java28
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java28
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/methods/iCo5.java41
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/methods/iCo6.java28
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Backup.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Chat.java9
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Commands.java11
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Economy.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/General.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/GroupOptions.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Groups.java11
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Location.java28
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Locations.java22
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Settings.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Worth.java29
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/commands/Afk.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/commands/God.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/commands/Help.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/commands/Home.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/commands/Kit.java18
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/commands/KitObject.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/commands/Lightning.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/commands/Spawnmob.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java53
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignBalance.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java9
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignBuy.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignDisposal.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignFree.java18
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignGameMode.java37
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignHeal.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignMail.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignProtection.java45
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignSell.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignSpawnmob.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignTime.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignTrade.java26
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignWarp.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignWeather.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/Signs.java1
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java182
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/Comment.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/IStorageReader.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/IStorageWriter.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/MapKeyType.java (renamed from Essentials/src/com/earth2me/essentials/storage/MapType.java)2
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/MapValueType.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/StorageObject.java246
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/YamlStorageReader.java126
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/YamlStorageWriter.java295
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/HelpInput.java146
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/IText.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java112
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/TextInput.java106
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/TextPager.java169
-rw-r--r--Essentials/src/com/earth2me/essentials/userdata/Ban.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/userdata/Inventory.java27
-rw-r--r--Essentials/src/com/earth2me/essentials/userdata/User.java65
-rw-r--r--Essentials/src/com/earth2me/essentials/userdata/UserData.java61
-rw-r--r--Essentials/src/config.yml30
-rw-r--r--Essentials/src/info.txt35
-rw-r--r--Essentials/src/items.csv226
-rw-r--r--Essentials/src/messages.properties734
-rw-r--r--Essentials/src/messages_da.properties731
-rw-r--r--Essentials/src/messages_de.properties736
-rw-r--r--Essentials/src/messages_en.properties731
-rw-r--r--Essentials/src/messages_es.properties379
-rw-r--r--Essentials/src/messages_fr.properties731
-rw-r--r--Essentials/src/messages_nl.properties731
-rw-r--r--Essentials/src/motd.txt3
-rw-r--r--Essentials/src/plugin.yml136
-rw-r--r--Essentials/src/rules.txt3
-rw-r--r--Essentials/test/com/earth2me/essentials/FakeServer.java38
-rw-r--r--Essentials/test/com/earth2me/essentials/StorageTest.java130
-rw-r--r--Essentials/test/com/earth2me/essentials/UtilTest.java18
-rw-r--r--EssentialsChat/nbproject/project.properties6
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java18
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java155
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java146
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java50
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java35
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java76
-rw-r--r--EssentialsGeoIP/nbproject/project.properties6
-rw-r--r--EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java12
-rw-r--r--EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java27
-rw-r--r--EssentialsGeoIP/src/com/maxmind/geoip/DatabaseInfo.java4
-rw-r--r--EssentialsGeoIP/src/com/maxmind/geoip/LookupService.java4
-rw-r--r--EssentialsGroupBridge/nbproject/project.properties4
-rw-r--r--EssentialsGroupManager/nbproject/project.properties4
-rw-r--r--EssentialsPermissionsCommands/nbproject/project.properties4
-rw-r--r--EssentialsProtect/nbproject/project.properties8
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java12
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java23
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java112
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java21
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java4
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/IProtectedBlock.java11
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/OwnedBlock.java4
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java9
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMySQL.java94
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockSQLite.java54
-rw-r--r--EssentialsSpawn/nbproject/project.properties6
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandsetspawn.java6
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java2
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java7
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java4
-rw-r--r--EssentialsUpdate/nbproject/project.properties41
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/AbstractWorkListener.java10
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsHelp.java9
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java4
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/GetFile.java6
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java4
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java2
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/chat/AbstractFileCommand.java6
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/chat/ConfigCommand.java10
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractState.java5
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java2
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java2
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/states/UpdateOrInstallation.java7
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/tasks/InstallModule.java2
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/tasks/SelfUpdate.java6
-rwxr-xr-xEssentialsUpdate/src/org/jibble/pircbot/InputThread.java4
-rwxr-xr-xEssentialsUpdate/src/org/jibble/pircbot/OutputThread.java3
-rwxr-xr-xEssentialsUpdate/src/org/jibble/pircbot/PircBot.java13
-rwxr-xr-xEssentialsUpdate/src/org/jibble/pircbot/User.java6
-rw-r--r--EssentialsUpdate/test/com/earth2me/essentials/update/VersionTest.java1
-rw-r--r--EssentialsXMPP/nbproject/project.properties6
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java2
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmpp.java3
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java15
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java18
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java22
-rw-r--r--WebPush/index.php37
-rw-r--r--WebPush/upload.php47
-rw-r--r--lib/bukkit-1.0.0-R1-SNAPSHOT.jar (renamed from lib/bukkit-0.0.1-SNAPSHOT.jar)bin4382157 -> 4391224 bytes
-rw-r--r--lib/craftbukkit-1.0.0-SNAPSHOT.jar (renamed from lib/craftbukkit-0.0.1-SNAPSHOT.jar)bin9590762 -> 9770541 bytes
286 files changed, 7970 insertions, 5652 deletions
diff --git a/.gitignore b/.gitignore
index c1c78f213..adc931227 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,4 @@
/EssentialsUpdate/dist/
/EssentialsUpdate/build/
/WebPush/apikey.php
-
-/WebPush/apikey.php
-/WebPush/apikey.php \ No newline at end of file
+/WebPush/nbproject/private \ No newline at end of file
diff --git a/Essentials/nbproject/pmd.settings b/Essentials/nbproject/pmd.settings
index 824aa3ac9..29baf7ea1 100644
--- a/Essentials/nbproject/pmd.settings
+++ b/Essentials/nbproject/pmd.settings
@@ -1,2 +1,3 @@
DoNotUseThreads
+LongVariable
SignatureDeclareThrowsException
diff --git a/Essentials/nbproject/project.properties b/Essentials/nbproject/project.properties
index 079cf2b0c..0d7673bbd 100644
--- a/Essentials/nbproject/project.properties
+++ b/Essentials/nbproject/project.properties
@@ -29,6 +29,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blank
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
@@ -37,6 +38,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.place
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateImportGroups=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
@@ -64,7 +66,7 @@ endorsed.classpath=
excludes=
file.reference.BOSEconomy7.jar=../lib/BOSEconomy7.jar
file.reference.bPermissions.jar=../lib/bPermissions.jar
-file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar
+file.reference.craftbukkit-1.0.0-SNAPSHOT.jar=../lib/craftbukkit-1.0.0-SNAPSHOT.jar
file.reference.iCo4.jar=../lib/iCo4.jar
file.reference.iCo5.jar=../lib/iCo5.jar
file.reference.iCo6.jar=../lib/iCo6.jar
@@ -90,7 +92,7 @@ javac.classpath=\
${file.reference.PermissionsBukkit-1.2.jar}:\
${file.reference.lombok-0.10.1.jar}:\
${reference.EssentialsGroupManager.jar}:\
- ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}
+ ${file.reference.craftbukkit-1.0.0-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/Essentials/src/com/earth2me/essentials/AlternativeCommandsHandler.java b/Essentials/src/com/earth2me/essentials/AlternativeCommandsHandler.java
new file mode 100644
index 000000000..a9291e629
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/AlternativeCommandsHandler.java
@@ -0,0 +1,117 @@
+package com.earth2me.essentials;
+
+import java.util.*;
+import org.bukkit.Bukkit;
+import org.bukkit.command.Command;
+import org.bukkit.command.PluginCommand;
+import org.bukkit.command.PluginCommandYamlParser;
+import org.bukkit.plugin.Plugin;
+
+
+public class AlternativeCommandsHandler
+{
+ private final transient Map<String, List<PluginCommand>> altcommands = new HashMap<String, List<PluginCommand>>();
+ private final transient IEssentials ess;
+
+ public AlternativeCommandsHandler(final IEssentials ess)
+ {
+ this.ess = ess;
+ for (Plugin plugin : ess.getServer().getPluginManager().getPlugins())
+ {
+ if (plugin.isEnabled()) {
+ addPlugin(plugin);
+ }
+ }
+ }
+
+ public final void addPlugin(final Plugin plugin)
+ {
+ if (plugin.getDescription().getMain().contains("com.earth2me.essentials"))
+ {
+ return;
+ }
+ final List<Command> commands = PluginCommandYamlParser.parse(plugin);
+ final String pluginName = plugin.getDescription().getName().toLowerCase(Locale.ENGLISH);
+
+ for (Command command : commands)
+ {
+ final PluginCommand pc = (PluginCommand)command;
+ final List<String> labels = new ArrayList<String>(pc.getAliases());
+ labels.add(pc.getName());
+
+ PluginCommand reg = ess.getServer().getPluginCommand(pluginName + ":" + pc.getName().toLowerCase(Locale.ENGLISH));
+ if (reg == null)
+ {
+ reg = ess.getServer().getPluginCommand(pc.getName().toLowerCase(Locale.ENGLISH));
+ }
+ if (reg == null || !reg.getPlugin().equals(plugin))
+ {
+ continue;
+ }
+ for (String label : labels)
+ {
+ List<PluginCommand> plugincommands = altcommands.get(label.toLowerCase(Locale.ENGLISH));
+ if (plugincommands == null)
+ {
+ plugincommands = new ArrayList<PluginCommand>();
+ altcommands.put(label.toLowerCase(Locale.ENGLISH), plugincommands);
+ }
+ boolean found = false;
+ for (PluginCommand pc2 : plugincommands)
+ {
+ if (pc2.getPlugin().equals(plugin))
+ {
+ found = true;
+ }
+ }
+ if (!found)
+ {
+ plugincommands.add(reg);
+ }
+ }
+ }
+ }
+
+ public void removePlugin(final Plugin plugin)
+ {
+ final Iterator<Map.Entry<String, List<PluginCommand>>> iterator = altcommands.entrySet().iterator();
+ while (iterator.hasNext())
+ {
+ final Map.Entry<String, List<PluginCommand>> entry = iterator.next();
+ final Iterator<PluginCommand> pcIterator = entry.getValue().iterator();
+ while (pcIterator.hasNext())
+ {
+ final PluginCommand pc = pcIterator.next();
+ if (pc.getPlugin() == null || pc.getPlugin().equals(plugin))
+ {
+ pcIterator.remove();
+ }
+ }
+ if (entry.getValue().isEmpty())
+ {
+ iterator.remove();
+ }
+ }
+ }
+
+ public PluginCommand getAlternative(final String label)
+ {
+ final List<PluginCommand> commands = altcommands.get(label);
+ if (commands == null || commands.isEmpty())
+ {
+ return null;
+ }
+ if (commands.size() == 1)
+ {
+ return commands.get(0);
+ }
+ // return the first command that is not an alias
+ for (PluginCommand command : commands) {
+ if (command.getName().equalsIgnoreCase(label)) {
+ return command;
+ }
+ }
+ // return the first alias
+ return commands.get(0);
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/Backup.java b/Essentials/src/com/earth2me/essentials/Backup.java
index 02a3d54ba..ada36c9d7 100644
--- a/Essentials/src/com/earth2me/essentials/Backup.java
+++ b/Essentials/src/com/earth2me/essentials/Backup.java
@@ -1,5 +1,6 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
@@ -7,7 +8,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
-import org.bukkit.craftbukkit.CraftServer;
public class Backup implements Runnable
@@ -48,6 +48,7 @@ public class Backup implements Runnable
}
}
+ @Override
public void run()
{
if (active)
@@ -60,7 +61,7 @@ public class Backup implements Runnable
{
return;
}
- LOGGER.log(Level.INFO, Util.i18n("backupStarted"));
+ LOGGER.log(Level.INFO, _("backupStarted"));
final CommandSender cs = server.getConsoleSender();
server.dispatchCommand(cs, "save-all");
server.dispatchCommand(cs, "save-off");
@@ -68,6 +69,7 @@ public class Backup implements Runnable
ess.scheduleAsyncDelayedTask(
new Runnable()
{
+ @Override
public void run()
{
try
@@ -109,6 +111,7 @@ public class Backup implements Runnable
ess.scheduleSyncDelayedTask(
new Runnable()
{
+ @Override
public void run()
{
server.dispatchCommand(cs, "save-on");
@@ -121,7 +124,7 @@ public class Backup implements Runnable
}
}
active = false;
- LOGGER.log(Level.INFO, Util.i18n("backupFinished"));
+ LOGGER.log(Level.INFO, _("backupFinished"));
}
});
}
diff --git a/Essentials/src/com/earth2me/essentials/Console.java b/Essentials/src/com/earth2me/essentials/Console.java
index dcdb65a0d..d07171c63 100644
--- a/Essentials/src/com/earth2me/essentials/Console.java
+++ b/Essentials/src/com/earth2me/essentials/Console.java
@@ -19,11 +19,13 @@ public final class Console implements IReplyTo
return server.getConsoleSender();
}
+ @Override
public void setReplyTo(CommandSender user)
{
replyTo = user;
}
+ @Override
public CommandSender getReplyTo()
{
return replyTo;
diff --git a/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java b/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java
index 0fd2e9047..bf3037e59 100644
--- a/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java
+++ b/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials;
-import com.earth2me.essentials.commands.Commandtime;
+import static com.earth2me.essentials.I18n._;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -72,7 +72,7 @@ public final class DescParseTickFormat
public static long parse(String desc) throws NumberFormatException
{
// Only look at alphanumeric and lowercase and : for 24:00
- desc = desc.toLowerCase().replaceAll("[^A-Za-z0-9:]", "");
+ desc = desc.toLowerCase(Locale.ENGLISH).replaceAll("[^A-Za-z0-9:]", "");
// Detect ticks format
try
@@ -133,7 +133,7 @@ public final class DescParseTickFormat
throw new NumberFormatException();
}
- desc = desc.toLowerCase().replaceAll("[^0-9]", "");
+ desc = desc.toLowerCase(Locale.ENGLISH).replaceAll("[^0-9]", "");
if (desc.length() != 4)
{
@@ -156,7 +156,7 @@ public final class DescParseTickFormat
int hours = 0;
int minutes = 0;
- desc = desc.toLowerCase().replaceAll("[^0-9]", "");
+ desc = desc.toLowerCase(Locale.ENGLISH).replaceAll("[^0-9]", "");
if (desc.length() > 4)
{
@@ -185,12 +185,12 @@ public final class DescParseTickFormat
{
throw new NumberFormatException();
}
-
+
if (desc.endsWith("pm") && hours != 12)
{
hours += 12;
}
-
+
if (desc.endsWith("am") && hours == 12)
{
hours -= 12;
@@ -231,7 +231,7 @@ public final class DescParseTickFormat
// --------------------------------------------
public static String format(final long ticks)
{
- return Util.format("timeFormat", format24(ticks), format12(ticks), formatTicks(ticks));
+ return _("timeFormat", format24(ticks), format12(ticks), formatTicks(ticks));
}
public static String formatTicks(final long ticks)
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index a571483f6..9679aa64e 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -1,30 +1,25 @@
/*
* Essentials - a bukkit plugin
* Copyright (C) 2011 Essentials Team
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.api.Economy;
import com.earth2me.essentials.commands.EssentialsCommand;
-import java.io.*;
-import java.util.*;
-import java.util.logging.*;
-import org.bukkit.*;
-import org.bukkit.command.Command;
-import org.bukkit.command.CommandSender;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.commands.NoChargeException;
import com.earth2me.essentials.commands.NotEnoughArgumentsException;
@@ -33,20 +28,35 @@ import com.earth2me.essentials.register.payment.Methods;
import com.earth2me.essentials.signs.SignBlockListener;
import com.earth2me.essentials.signs.SignEntityListener;
import com.earth2me.essentials.signs.SignPlayerListener;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.bukkit.Server;
+import org.bukkit.World;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.event.Event.Priority;
import org.bukkit.event.Event.Type;
-import org.bukkit.plugin.*;
-import org.bukkit.plugin.java.*;
+import org.bukkit.plugin.InvalidDescriptionException;
+import org.bukkit.plugin.Plugin;
+import org.bukkit.plugin.PluginDescriptionFile;
+import org.bukkit.plugin.PluginManager;
+import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitScheduler;
public class Essentials extends JavaPlugin implements IEssentials
{
- public static final int BUKKIT_VERSION = 1060;
+ public static final int BUKKIT_VERSION = 1501;
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private transient ISettings settings;
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
@@ -59,8 +69,10 @@ public class Essentials extends JavaPlugin implements IEssentials
private transient ItemDb itemDb;
private transient final Methods paymentMethod = new Methods();
private transient PermissionsHandler permissionsHandler;
+ private transient AlternativeCommandsHandler alternativeCommandsHandler;
private transient UserMap userMap;
private transient ExecuteTimer execTimer;
+ private transient I18n i18n;
@Override
public ISettings getSettings()
@@ -79,10 +91,13 @@ public class Essentials extends JavaPlugin implements IEssentials
{
throw new IOException();
}
- LOGGER.log(Level.INFO, Util.i18n("usingTempFolderForTesting"));
+ i18n = new I18n(this);
+ i18n.onEnable();
+ LOGGER.log(Level.INFO, _("usingTempFolderForTesting"));
LOGGER.log(Level.INFO, dataFolder.toString());
this.initialize(null, server, new PluginDescriptionFile(new FileReader(new File("src" + File.separator + "plugin.yml"))), dataFolder, null, null);
settings = new Settings(this);
+ i18n.updateLocale("en");
userMap = new UserMap(this);
permissionsHandler = new PermissionsHandler(this, false);
Economy.setEss(this);
@@ -93,11 +108,9 @@ public class Essentials extends JavaPlugin implements IEssentials
{
execTimer = new ExecuteTimer();
execTimer.start();
- final String[] javaversion = System.getProperty("java.version").split("\\.", 3);
- if (javaversion == null || javaversion.length < 2 || Integer.parseInt(javaversion[1]) < 6)
- {
- LOGGER.log(Level.SEVERE, "Java version not supported! Please install Java 1.6. You have " + System.getProperty("java.version"));
- }
+ i18n = new I18n(this);
+ i18n.onEnable();
+ execTimer.mark("I18n1");
final EssentialsUpgrade upgrade = new EssentialsUpgrade(this);
upgrade.beforeSettings();
execTimer.mark("Upgrade");
@@ -107,7 +120,7 @@ public class Essentials extends JavaPlugin implements IEssentials
execTimer.mark("Settings");
upgrade.afterSettings();
execTimer.mark("Upgrade2");
- Util.updateLocale(settings.getLocale(), this);
+ i18n.updateLocale(settings.getLocale());
userMap = new UserMap(this);
confList.add(userMap);
execTimer.mark("Init(Usermap)");
@@ -130,24 +143,27 @@ public class Essentials extends JavaPlugin implements IEssentials
if (plugin.getDescription().getName().startsWith("Essentials")
&& !plugin.getDescription().getVersion().equals(this.getDescription().getVersion()))
{
- LOGGER.log(Level.WARNING, Util.format("versionMismatch", plugin.getDescription().getName()));
+ LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName()));
}
}
- final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-[0-9]+-[0-9a-z]+-b([0-9]+)jnks.*").matcher(getServer().getVersion());
+ final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-R[0-9]+-[0-9]+-[0-9a-z]+-b([0-9]+)jnks.*").matcher(getServer().getVersion());
if (versionMatch.matches())
{
final int versionNumber = Integer.parseInt(versionMatch.group(4));
if (versionNumber < BUKKIT_VERSION)
{
- LOGGER.log(Level.WARNING, Util.i18n("notRecommendedBukkit"));
+ LOGGER.log(Level.WARNING, _("notRecommendedBukkit"));
}
}
else
{
- LOGGER.log(Level.INFO, Util.i18n("bukkitFormatChanged"));
+ LOGGER.log(Level.INFO, _("bukkitFormatChanged"));
+ LOGGER.log(Level.INFO, getServer().getVersion());
+ LOGGER.log(Level.INFO, getServer().getBukkitVersion());
}
permissionsHandler = new PermissionsHandler(this, settings.useBukkitPermissions());
+ alternativeCommandsHandler = new AlternativeCommandsHandler(this);
final EssentialsPluginListener serverListener = new EssentialsPluginListener(this);
pm.registerEvent(Type.PLUGIN_ENABLE, serverListener, Priority.Low, this);
pm.registerEvent(Type.PLUGIN_DISABLE, serverListener, Priority.Low, this);
@@ -165,6 +181,7 @@ public class Essentials extends JavaPlugin implements IEssentials
pm.registerEvent(Type.PLAYER_EGG_THROW, playerListener, Priority.High, this);
pm.registerEvent(Type.PLAYER_BUCKET_EMPTY, playerListener, Priority.High, this);
pm.registerEvent(Type.PLAYER_ANIMATION, playerListener, Priority.High, this);
+ pm.registerEvent(Type.PLAYER_CHANGED_WORLD, playerListener, Priority.Normal, this);
final EssentialsBlockListener blockListener = new EssentialsBlockListener(this);
pm.registerEvent(Type.BLOCK_PLACE, blockListener, Priority.Lowest, this);
@@ -210,7 +227,7 @@ public class Essentials extends JavaPlugin implements IEssentials
getScheduler().scheduleSyncRepeatingTask(this, timer, 1, 100);
Economy.setEss(this);
execTimer.mark("RegListeners");
- LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Util.joinList(this.getDescription().getAuthors())));
+ LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Util.joinList(this.getDescription().getAuthors())));
final String timeroutput = execTimer.end();
if (getSettings().isDebug())
{
@@ -221,6 +238,8 @@ public class Essentials extends JavaPlugin implements IEssentials
@Override
public void onDisable()
{
+ i18n.onDisable();
+ Economy.setEss(null);
Trade.closeLog();
}
@@ -235,121 +254,7 @@ public class Essentials extends JavaPlugin implements IEssentials
execTimer.mark("Reload(" + iConf.getClass().getSimpleName() + ")");
}
- Util.updateLocale(settings.getLocale(), this);
-
- // for motd
- getConfiguration().load();
- }
-
- @Override
- public String[] getMotd(final CommandSender sender, final String def)
- {
- return getLines(sender, "motd", def);
- }
-
- @Override
- public String[] getLines(final CommandSender sender, final String node, final String def)
- {
- List<String> lines = (List<String>)getConfiguration().getProperty(node);
- if (lines == null)
- {
- return new String[0];
- }
- String[] retval = new String[lines.size()];
-
- if (lines.isEmpty() || lines.get(0) == null)
- {
- try
- {
- lines = new ArrayList<String>();
- // "[]" in YaML indicates empty array, so respect that
- if (!getConfiguration().getString(node, def).equals("[]"))
- {
- lines.add(getConfiguration().getString(node, def));
- retval = new String[lines.size()];
- }
- }
- catch (Throwable ex2)
- {
- LOGGER.log(Level.WARNING, Util.format("corruptNodeInConfig", node));
- return new String[0];
- }
- }
-
- // if still empty, call it a day
- if (lines == null || lines.isEmpty() || lines.get(0) == null)
- {
- return new String[0];
- }
-
- for (int i = 0; i < lines.size(); i++)
- {
- String m = lines.get(i);
- if (m == null)
- {
- continue;
- }
- m = m.replace('&', '§').replace("§§", "&");
-
- if (sender instanceof User || sender instanceof Player)
- {
- User user = getUser(sender);
- m = m.replace("{PLAYER}", user.getDisplayName());
- m = m.replace("{IP}", user.getAddress().toString());
- m = m.replace("{BALANCE}", Double.toString(user.getMoney()));
- m = m.replace("{MAILS}", Integer.toString(user.getMails().size()));
- m = m.replace("{WORLD}", user.getLocation().getWorld().getName());
- }
- int playerHidden = 0;
- for (Player p : getServer().getOnlinePlayers())
- {
- if (getUser(p).isHidden())
- {
- playerHidden++;
- }
- }
- m = m.replace("{ONLINE}", Integer.toString(getServer().getOnlinePlayers().length - playerHidden));
- m = m.replace("{UNIQUE}", Integer.toString(userMap.getUniqueUsers()));
-
- if (m.matches(".*\\{PLAYERLIST\\}.*"))
- {
- StringBuilder online = new StringBuilder();
- for (Player p : getServer().getOnlinePlayers())
- {
- if (getUser(p).isHidden())
- {
- continue;
- }
- if (online.length() > 0)
- {
- online.append(", ");
- }
- online.append(p.getDisplayName());
- }
- m = m.replace("{PLAYERLIST}", online.toString());
- }
-
- if (sender instanceof Player)
- {
- try
- {
- Class User = getClassLoader().loadClass("bukkit.Vandolis.User");
- Object vuser = User.getConstructor(User.class).newInstance((Player)sender);
- m = m.replace("{RED:BALANCE}", User.getMethod("getMoney").invoke(vuser).toString());
- m = m.replace("{RED:BUYS}", User.getMethod("getNumTransactionsBuy").invoke(vuser).toString());
- m = m.replace("{RED:SELLS}", User.getMethod("getNumTransactionsSell").invoke(vuser).toString());
- }
- catch (Throwable ex)
- {
- m = m.replace("{RED:BALANCE}", "N/A");
- m = m.replace("{RED:BUYS}", "N/A");
- m = m.replace("{RED:SELLS}", "N/A");
- }
- }
-
- retval[i] = m + " ";
- }
- return retval;
+ i18n.updateLocale(settings.getLocale());
}
@Override
@@ -364,29 +269,11 @@ public class Essentials extends JavaPlugin implements IEssentials
// Allow plugins to override the command via onCommand
if (!getSettings().isCommandOverridden(command.getName()) && !commandLabel.startsWith("e"))
{
- for (Plugin p : getServer().getPluginManager().getPlugins())
+ final PluginCommand pc = alternativeCommandsHandler.getAlternative(commandLabel);
+ if (pc != null)
{
- if (p.getDescription().getMain().contains("com.earth2me.essentials"))
- {
- continue;
- }
-
- final PluginDescriptionFile desc = p.getDescription();
- if (desc == null)
- {
- continue;
- }
-
- if (desc.getName() == null)
- {
- continue;
- }
-
- final PluginCommand pc = getServer().getPluginCommand(desc.getName() + ":" + commandLabel);
- if (pc != null)
- {
- return pc.execute(sender, commandLabel, args);
- }
+ LOGGER.info("Essentials: Alternative command " + commandLabel + " found, using " + pc.getLabel());
+ return pc.execute(sender, commandLabel, args);
}
}
@@ -405,7 +292,7 @@ public class Essentials extends JavaPlugin implements IEssentials
final List<String> mail = user.getMails();
if (mail != null && !mail.isEmpty())
{
- user.sendMessage(Util.format("youHaveNewMail", mail.size()));
+ user.sendMessage(_("youHaveNewMail", mail.size()));
}
}
@@ -423,16 +310,16 @@ public class Essentials extends JavaPlugin implements IEssentials
}
catch (Exception ex)
{
- sender.sendMessage(Util.format("commandNotLoaded", commandLabel));
- LOGGER.log(Level.SEVERE, Util.format("commandNotLoaded", commandLabel), ex);
+ sender.sendMessage(_("commandNotLoaded", commandLabel));
+ LOGGER.log(Level.SEVERE, _("commandNotLoaded", commandLabel), ex);
return true;
}
// Check authorization
if (user != null && !user.isAuthorized(cmd, permissionPrefix))
{
- LOGGER.log(Level.WARNING, Util.format("deniedAccessCommand", user.getName()));
- user.sendMessage(Util.i18n("noAccessCommand"));
+ LOGGER.log(Level.WARNING, _("deniedAccessCommand", user.getName()));
+ user.sendMessage(_("noAccessCommand"));
return true;
}
@@ -467,7 +354,7 @@ public class Essentials extends JavaPlugin implements IEssentials
}
catch (Throwable ex)
{
- LOGGER.log(Level.SEVERE, Util.format("commandFailed", commandLabel), ex);
+ LOGGER.log(Level.SEVERE, _("commandFailed", commandLabel), ex);
return true;
}
}
@@ -475,8 +362,8 @@ public class Essentials extends JavaPlugin implements IEssentials
@Override
public void showError(final CommandSender sender, final Throwable exception, final String commandLabel)
{
- sender.sendMessage(Util.format("errorWithMessage", exception.getMessage()));
- final LogRecord logRecord = new LogRecord(Level.WARNING, Util.format("errorCallingCommand", commandLabel));
+ sender.sendMessage(_("errorWithMessage", exception.getMessage()));
+ final LogRecord logRecord = new LogRecord(Level.WARNING, _("errorCallingCommand", commandLabel));
logRecord.setThrown(exception);
if (getSettings().isDebug())
{
@@ -663,6 +550,12 @@ public class Essentials extends JavaPlugin implements IEssentials
}
@Override
+ public AlternativeCommandsHandler getAlternativeCommandsHandler()
+ {
+ return alternativeCommandsHandler;
+ }
+
+ @Override
public ItemDb getItemDb()
{
return itemDb;
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
index 72c308655..88e536015 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
@@ -99,6 +99,7 @@ public class EssentialsBlockListener extends BlockListener
ess.scheduleSyncDelayedTask(
new Runnable()
{
+ @Override
public void run()
{
user.getInventory().addItem(is);
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java
index c48f9f987..512b9c60a 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java
@@ -1,12 +1,7 @@
package com.earth2me.essentials;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+import static com.earth2me.essentials.I18n._;
+import java.io.*;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
@@ -44,7 +39,7 @@ public class EssentialsConf extends Configuration
{
if (!configFile.getParentFile().mkdirs())
{
- LOGGER.log(Level.SEVERE, Util.format("failedToCreateConfig", configFile.toString()));
+ LOGGER.log(Level.SEVERE, _("failedToCreateConfig", configFile.toString()));
}
}
// This will delete files where the first character is 0. In most cases they are broken.
@@ -87,22 +82,22 @@ public class EssentialsConf extends Configuration
{
if (templateName != null)
{
- LOGGER.log(Level.INFO, Util.format("creatingConfigFromTemplate", configFile.toString()));
+ LOGGER.log(Level.INFO, _("creatingConfigFromTemplate", configFile.toString()));
createFromTemplate();
}
else
{
try
{
- LOGGER.log(Level.INFO, Util.format("creatingEmptyConfig", configFile.toString()));
+ LOGGER.log(Level.INFO, _("creatingEmptyConfig", configFile.toString()));
if (!configFile.createNewFile())
{
- LOGGER.log(Level.SEVERE, Util.format("failedToCreateConfig", configFile.toString()));
+ LOGGER.log(Level.SEVERE, _("failedToCreateConfig", configFile.toString()));
}
}
catch (IOException ex)
{
- LOGGER.log(Level.SEVERE, Util.format("failedToCreateConfig", configFile.toString()), ex);
+ LOGGER.log(Level.SEVERE, _("failedToCreateConfig", configFile.toString()), ex);
}
}
}
@@ -132,7 +127,7 @@ public class EssentialsConf extends Configuration
istr = resourceClass.getResourceAsStream(templateName);
if (istr == null)
{
- LOGGER.log(Level.SEVERE, Util.format("couldNotFindTemplate", templateName));
+ LOGGER.log(Level.SEVERE, _("couldNotFindTemplate", templateName));
return;
}
ostr = new FileOutputStream(configFile);
@@ -147,8 +142,7 @@ public class EssentialsConf extends Configuration
}
catch (IOException ex)
{
- LOGGER.log(Level.SEVERE, Util.format("failedToWriteConfig", configFile.toString()), ex);
- return;
+ LOGGER.log(Level.SEVERE, _("failedToWriteConfig", configFile.toString()), ex);
}
finally
{
@@ -172,7 +166,7 @@ public class EssentialsConf extends Configuration
}
catch (IOException ex)
{
- LOGGER.log(Level.SEVERE, Util.format("failedToCloseConfig", configFile.toString()), ex);
+ LOGGER.log(Level.SEVERE, _("failedToCloseConfig", configFile.toString()), ex);
}
}
}
@@ -208,7 +202,7 @@ public class EssentialsConf extends Configuration
final World world = server.getWorld(worldName);
if (world == null)
{
- throw new Exception(Util.i18n("invalidWorld"));
+ throw new Exception(_("invalidWorld"));
}
return new Location(world,
getDouble((path == null ? "" : path + ".") + "x", 0),
@@ -233,8 +227,10 @@ public class EssentialsConf extends Configuration
return new ItemStack(
Material.valueOf(getString(path + ".type", "AIR")),
getInt(path + ".amount", 1),
- (short)getInt(path + ".damage", 0)/*,
- (byte)getInt(path + ".data", 0)*/);
+ (short)getInt(path + ".damage", 0)/*
+ * ,
+ * (byte)getInt(path + ".data", 0)
+ */);
}
public void setProperty(final String path, final ItemStack stack)
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
index fed7a2956..322d94d8f 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
@@ -1,19 +1,14 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import java.util.List;
-import java.util.logging.Level;
import java.util.logging.Logger;
+import org.bukkit.Material;
+import org.bukkit.entity.Animals;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
-import org.bukkit.event.entity.EntityCombustEvent;
-import org.bukkit.event.entity.EntityDamageByEntityEvent;
-import org.bukkit.event.entity.EntityDamageEvent;
-import org.bukkit.event.entity.EntityDeathEvent;
-import org.bukkit.event.entity.EntityListener;
-import org.bukkit.event.entity.EntityRegainHealthEvent;
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
-import org.bukkit.event.entity.FoodLevelChangeEvent;
-import org.bukkit.event.entity.PlayerDeathEvent;
+import org.bukkit.event.entity.*;
import org.bukkit.inventory.ItemStack;
@@ -56,6 +51,17 @@ public class EssentialsEntityListener extends EntityListener
}
}
}
+ if (eDefend instanceof Animals && eAttack instanceof Player)
+ {
+ User player = ess.getUser(eAttack);
+ ItemStack hand = player.getItemInHand();
+ if (hand != null && hand.getType() == Material.MILK_BUCKET) {
+ ((Animals)eDefend).setAge(-24000);
+ player.setItemInHand(new ItemStack(Material.BUCKET, hand.getAmount()));
+ player.updateInventory();
+ event.setCancelled(true);
+ }
+ }
}
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
{
@@ -85,7 +91,7 @@ public class EssentialsEntityListener extends EntityListener
if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back"))
{
user.setLastLocation();
- user.sendMessage(Util.i18n("backAfterDeath"));
+ user.sendMessage(_("backAfterDeath"));
}
if (!ess.getSettings().areDeathMessagesEnabled())
{
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index 3205d4d91..c6cbfe232 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -1,33 +1,24 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.textreader.IText;
+import com.earth2me.essentials.textreader.KeywordReplacer;
+import com.earth2me.essentials.textreader.TextInput;
+import com.earth2me.essentials.textreader.TextPager;
+import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Server;
-import org.bukkit.World;
-import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.block.Action;
-import org.bukkit.event.player.PlayerAnimationEvent;
-import org.bukkit.event.player.PlayerAnimationType;
-import org.bukkit.event.player.PlayerBedEnterEvent;
-import org.bukkit.event.player.PlayerBucketEmptyEvent;
-import org.bukkit.event.player.PlayerChatEvent;
-import org.bukkit.event.player.PlayerCommandPreprocessEvent;
-import org.bukkit.event.player.PlayerEggThrowEvent;
-import org.bukkit.event.player.PlayerInteractEvent;
-import org.bukkit.event.player.PlayerJoinEvent;
-import org.bukkit.event.player.PlayerListener;
-import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerLoginEvent.Result;
-import org.bukkit.event.player.PlayerMoveEvent;
-import org.bukkit.event.player.PlayerQuitEvent;
-import org.bukkit.event.player.PlayerRespawnEvent;
-import org.bukkit.event.player.PlayerTeleportEvent;
+import org.bukkit.event.player.*;
import org.bukkit.inventory.ItemStack;
@@ -47,11 +38,10 @@ public class EssentialsPlayerListener extends PlayerListener
public void onPlayerRespawn(final PlayerRespawnEvent event)
{
final User user = ess.getUser(event.getPlayer());
- user.setDisplayNick(user.getNick());
updateCompass(user);
if (ess.getSettings().changeDisplayName())
{
- user.setDisplayNick(user.getNick());
+ user.setDisplayNick();
}
}
@@ -62,8 +52,8 @@ public class EssentialsPlayerListener extends PlayerListener
if (user.isMuted())
{
event.setCancelled(true);
- user.sendMessage(Util.i18n("playerMuted"));
- LOGGER.info(Util.format("mutedUserSpeaks", user.getName()));
+ user.sendMessage(_("playerMuted"));
+ LOGGER.info(_("mutedUserSpeaks", user.getName()));
}
final Iterator<Player> it = event.getRecipients().iterator();
while (it.hasNext())
@@ -77,7 +67,7 @@ public class EssentialsPlayerListener extends PlayerListener
user.updateActivity(true);
if (ess.getSettings().changeDisplayName())
{
- user.setDisplayNick(user.getNick());
+ user.setDisplayNick();
}
}
@@ -136,6 +126,7 @@ public class EssentialsPlayerListener extends PlayerListener
}
final Thread thread = new Thread(new Runnable()
{
+ @Override
public void run()
{
try
@@ -147,11 +138,10 @@ public class EssentialsPlayerListener extends PlayerListener
rt.gc();
mem = rt.freeMemory() - mem;
mem /= 1024 * 1024;
- LOGGER.log(Level.INFO, Util.format("freedMemory", mem));
+ LOGGER.log(Level.INFO, _("freedMemory", mem));
}
catch (InterruptedException ex)
{
- return;
}
}
});
@@ -167,8 +157,9 @@ public class EssentialsPlayerListener extends PlayerListener
if (ess.getSettings().changeDisplayName())
{
- user.setDisplayNick(user.getNick());
+ user.setDisplayNick();
}
+ user.setLastLoginAddress(user.getAddress().getAddress().getHostAddress());
user.updateActivity(false);
if (user.isAuthorized("essentials.sleepingignored"))
{
@@ -177,13 +168,16 @@ public class EssentialsPlayerListener extends PlayerListener
if (!ess.getSettings().isCommandDisabled("motd") && user.isAuthorized("essentials.motd"))
{
- for (String m : ess.getMotd(user, null))
+ try
{
- if (m == null)
- {
- continue;
- }
- user.sendMessage(m);
+ final IText input = new TextInput(user, "motd", true, ess);
+ final IText output = new KeywordReplacer(input, user, ess);
+ final TextPager pager = new TextPager(output, true);
+ pager.showPage("1", null, user);
+ }
+ catch (IOException ex)
+ {
+ LOGGER.log(Level.WARNING, ex.getMessage(), ex);
}
}
@@ -192,11 +186,11 @@ public class EssentialsPlayerListener extends PlayerListener
final List<String> mail = user.getMails();
if (mail.isEmpty())
{
- user.sendMessage(Util.i18n("noNewMail"));
+ user.sendMessage(_("noNewMail"));
}
else
{
- user.sendMessage(Util.format("youHaveNewMail", mail.size()));
+ user.sendMessage(_("youHaveNewMail", mail.size()));
}
}
}
@@ -213,20 +207,20 @@ public class EssentialsPlayerListener extends PlayerListener
user.setNPC(false);
final long currentTime = System.currentTimeMillis();
- boolean banExpired = user.checkBanTimeout(currentTime);
+ final boolean banExpired = user.checkBanTimeout(currentTime);
user.checkMuteTimeout(currentTime);
user.checkJailTimeout(currentTime);
if (banExpired == false && (user.isBanned() || event.getResult() == Result.KICK_BANNED))
{
final String banReason = user.getBanReason();
- event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : Util.i18n("defaultBanReason"));
+ event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : _("defaultBanReason"));
return;
}
if (server.getOnlinePlayers().length >= server.getMaxPlayers() && !user.isAuthorized("essentials.joinfullserver"))
{
- event.disallow(Result.KICK_FULL, Util.i18n("serverFull"));
+ event.disallow(Result.KICK_FULL, _("serverFull"));
return;
}
event.allow();
@@ -256,7 +250,7 @@ public class EssentialsPlayerListener extends PlayerListener
final User user = ess.getUser(event.getPlayer());
if (ess.getSettings().changeDisplayName())
{
- user.setDisplayNick(user.getNick());
+ user.setDisplayNick();
}
updateCompass(user);
}
@@ -279,7 +273,7 @@ public class EssentialsPlayerListener extends PlayerListener
{
final User user = ess.getUser(event.getPlayer());
user.setHome();
- user.sendMessage(Util.i18n("homeSetToBed"));
+ user.sendMessage(_("homeSetToBed"));
}
catch (Throwable ex)
{
@@ -308,6 +302,7 @@ public class EssentialsPlayerListener extends PlayerListener
event.getItemStack().setType(event.getBucket());
ess.scheduleSyncDelayedTask(new Runnable()
{
+ @Override
public void run()
{
user.updateInventory();
@@ -372,7 +367,7 @@ public class EssentialsPlayerListener extends PlayerListener
return;
}
final User user = ess.getUser(event.getPlayer());
- final String cmd = event.getMessage().toLowerCase().split(" ")[0].replace("/", "").toLowerCase();
+ final String cmd = event.getMessage().toLowerCase(Locale.ENGLISH).split(" ")[0].replace("/", "").toLowerCase(Locale.ENGLISH);
final List<String> commands = Arrays.asList("msg", "r", "mail", "m", "t", "emsg", "tell", "er", "reply", "ereply", "email");
if (commands.contains(cmd))
{
@@ -390,4 +385,15 @@ public class EssentialsPlayerListener extends PlayerListener
user.updateActivity(true);
}
}
+
+ @Override
+ public void onPlayerChangedWorld(PlayerChangedWorldEvent event)
+ {
+ if (ess.getSettings().getNoGodWorlds().contains(event.getPlayer().getLocation().getWorld().getName())) {
+ User user = ess.getUser(event.getPlayer());
+ if (user.isGodModeEnabledRaw()) {
+ user.sendMessage(_("noGodWorldWarning"));
+ }
+ }
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java
index 6b92d7aa2..b0ee0b543 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java
@@ -21,6 +21,7 @@ public class EssentialsPluginListener extends ServerListener implements IConf
public void onPluginEnable(final PluginEnableEvent event)
{
ess.getPermissionsHandler().checkPermissions();
+ ess.getAlternativeCommandsHandler().addPlugin(event.getPlugin());
if (!ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().setMethod(ess.getServer().getPluginManager()))
{
LOGGER.log(Level.INFO, "[Essentials] Payment method found (" + ess.getPaymentMethod().getMethod().getName() + " version: " + ess.getPaymentMethod().getMethod().getVersion() + ")");
@@ -31,6 +32,7 @@ public class EssentialsPluginListener extends ServerListener implements IConf
public void onPluginDisable(final PluginDisableEvent event)
{
ess.getPermissionsHandler().checkPermissions();
+ ess.getAlternativeCommandsHandler().removePlugin(event.getPlugin());
// Check to see if the plugin thats being disabled is the one we are using
if (ess.getPaymentMethod() != null && ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().checkDisabled(event.getPlugin()))
{
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java
index 409250a00..9070e25ac 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java
@@ -1,21 +1,11 @@
package com.earth2me.essentials;
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
+import static com.earth2me.essentials.I18n._;
+import java.io.*;
import java.math.BigInteger;
import java.security.DigestInputStream;
import java.security.MessageDigest;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
@@ -78,7 +68,51 @@ public class EssentialsUpgrade
}
catch (Throwable e)
{
- LOGGER.log(Level.SEVERE, Util.i18n("upgradingFilesError"), e);
+ LOGGER.log(Level.SEVERE, _("upgradingFilesError"), e);
+ }
+ }
+
+ private void moveMotdRulesToFile(String name)
+ {
+ if (doneFile.getBoolean("move" + name + "ToFile", false))
+ {
+ return;
+ }
+ try
+ {
+ final File file = new File(ess.getDataFolder(), name + ".txt");
+ if (file.exists())
+ {
+ return;
+ }
+ final File configFile = new File(ess.getDataFolder(), "config.yml");
+ if (!configFile.exists())
+ {
+ return;
+ }
+ final EssentialsConf conf = new EssentialsConf(configFile);
+ conf.load();
+ List<String> lines = conf.getStringList(name, null);
+ if (lines != null && !lines.isEmpty())
+ {
+ if (!file.createNewFile())
+ {
+ throw new IOException("Failed to create file " + file);
+ }
+ PrintWriter writer = new PrintWriter(file);
+
+ for (String line : lines)
+ {
+ writer.println(line);
+ }
+ writer.close();
+ }
+ doneFile.setProperty("move" + name + "ToFile", true);
+ doneFile.save();
+ }
+ catch (Throwable e)
+ {
+ LOGGER.log(Level.SEVERE, _("upgradingFilesError"), e);
}
}
@@ -128,11 +162,11 @@ public class EssentialsUpgrade
{
if (!file.renameTo(new File(file.getParentFile(), file.getName().concat("." + System.currentTimeMillis() + ".upgradebackup"))))
{
- throw new Exception(Util.i18n("configFileMoveError"));
+ throw new Exception(_("configFileMoveError"));
}
if (!tempFile.renameTo(file))
{
- throw new Exception(Util.i18n("configFileRenameError"));
+ throw new Exception(_("configFileRenameError"));
}
}
else
@@ -187,7 +221,7 @@ public class EssentialsUpgrade
((Number)vals.get(3)).floatValue(),
((Number)vals.get(4)).floatValue());
- final String worldName = world.getName().toLowerCase();
+ final String worldName = world.getName().toLowerCase(Locale.ENGLISH);
if (worldName != null && !worldName.isEmpty())
{
config.removeProperty("home");
@@ -314,7 +348,7 @@ public class EssentialsUpgrade
{
continue;
}
- worldName = loc.getWorld().getName().toLowerCase();
+ worldName = loc.getWorld().getName().toLowerCase(Locale.ENGLISH);
if (worldName != null && !worldName.isEmpty())
{
config.setProperty("homes." + worldName, loc);
@@ -460,7 +494,7 @@ public class EssentialsUpgrade
ess.getWarps().setWarp(filename.substring(0, filename.length() - 4), loc);
if (!listOfFiles[i].renameTo(new File(warpsFolder, filename + ".old")))
{
- throw new Exception(Util.format("fileRenameError", filename));
+ throw new Exception(_("fileRenameError", filename));
}
}
catch (Exception ex)
@@ -508,7 +542,7 @@ public class EssentialsUpgrade
ess.getWarps().setWarp(name, loc);
if (!warpFile.renameTo(new File(ess.getDataFolder(), "warps.txt.old")))
{
- throw new Exception(Util.format("fileRenameError", "warps.txt"));
+ throw new Exception(_("fileRenameError", "warps.txt"));
}
}
}
@@ -552,17 +586,17 @@ public class EssentialsUpgrade
final File newFile = new File(listOfFiles[i].getParentFile(), sanitizedFilename);
if (!listOfFiles[i].renameTo(tmpFile))
{
- LOGGER.log(Level.WARNING, Util.format("userdataMoveError", filename, sanitizedFilename));
+ LOGGER.log(Level.WARNING, _("userdataMoveError", filename, sanitizedFilename));
continue;
}
if (newFile.exists())
{
- LOGGER.log(Level.WARNING, Util.format("duplicatedUserdata", filename, sanitizedFilename));
+ LOGGER.log(Level.WARNING, _("duplicatedUserdata", filename, sanitizedFilename));
continue;
}
if (!tmpFile.renameTo(newFile))
{
- LOGGER.log(Level.WARNING, Util.format("userdataMoveBackError", sanitizedFilename, sanitizedFilename));
+ LOGGER.log(Level.WARNING, _("userdataMoveBackError", sanitizedFilename, sanitizedFilename));
}
}
doneFile.setProperty("sanitizeAllUserFilenames", true);
@@ -654,6 +688,8 @@ public class EssentialsUpgrade
ess.getDataFolder().mkdirs();
}
moveWorthValuesToWorthYml();
+ moveMotdRulesToFile("motd");
+ moveMotdRulesToFile("rules");
}
public void afterSettings()
diff --git a/Essentials/src/com/earth2me/essentials/ExecuteTimer.java b/Essentials/src/com/earth2me/essentials/ExecuteTimer.java
index 7a88018c2..301669428 100644
--- a/Essentials/src/com/earth2me/essentials/ExecuteTimer.java
+++ b/Essentials/src/com/earth2me/essentials/ExecuteTimer.java
@@ -1,12 +1,17 @@
package com.earth2me.essentials;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
public class ExecuteTimer
{
- private final List<ExecuteRecord> times;
+ private final transient List<ExecuteRecord> times;
+ private final transient DecimalFormat decimalFormat = new DecimalFormat("#0.000", DecimalFormatSymbols.getInstance(Locale.US));
+
public ExecuteTimer()
{
@@ -24,7 +29,7 @@ public class ExecuteTimer
{
if (!times.isEmpty() || "start".equals(label))
{
- times.add(new ExecuteRecord(label, System.currentTimeMillis()));
+ times.add(new ExecuteRecord(label, System.nanoTime()));
}
}
@@ -36,7 +41,7 @@ public class ExecuteTimer
long time0 = 0;
long time1 = 0;
long time2 = 0;
- long duration;
+ double duration;
for (ExecuteRecord pair : times)
{
@@ -44,8 +49,8 @@ public class ExecuteTimer
time2 = (Long)pair.getTime();
if (time1 > 0)
{
- duration = time2 - time1;
- output.append(mark).append(": ").append(duration).append("ms - ");
+ duration = (time2 - time1)/1000000.0;
+ output.append(mark).append(": ").append(decimalFormat.format(duration)).append("ms - ");
}
else
{
@@ -53,8 +58,8 @@ public class ExecuteTimer
}
time1 = time2;
}
- duration = time1 - time0;
- output.append("Total: ").append(duration).append("ms");
+ duration = (time1 - time0)/1000000.0;
+ output.append("Total: ").append(decimalFormat.format(duration)).append("ms");
times.clear();
return output.toString();
}
diff --git a/Essentials/src/com/earth2me/essentials/FakeWorld.java b/Essentials/src/com/earth2me/essentials/FakeWorld.java
index 0b5d68be1..0032b6845 100644
--- a/Essentials/src/com/earth2me/essentials/FakeWorld.java
+++ b/Essentials/src/com/earth2me/essentials/FakeWorld.java
@@ -1,24 +1,12 @@
package com.earth2me.essentials;
+import java.io.File;
import java.util.List;
import java.util.UUID;
-import org.bukkit.BlockChangeDelegate;
-import org.bukkit.Chunk;
-import org.bukkit.ChunkSnapshot;
-import org.bukkit.Difficulty;
-import org.bukkit.Effect;
-import org.bukkit.Location;
-import org.bukkit.TreeType;
-import org.bukkit.World;
+import org.bukkit.*;
import org.bukkit.block.Biome;
import org.bukkit.block.Block;
-import org.bukkit.entity.Arrow;
-import org.bukkit.entity.CreatureType;
-import org.bukkit.entity.Entity;
-import org.bukkit.entity.Item;
-import org.bukkit.entity.LightningStrike;
-import org.bukkit.entity.LivingEntity;
-import org.bukkit.entity.Player;
+import org.bukkit.entity.*;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.inventory.ItemStack;
@@ -36,367 +24,440 @@ public class FakeWorld implements World
this.env = environment;
}
+ @Override
public Block getBlockAt(int i, int i1, int i2)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Block getBlockAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public int getBlockTypeIdAt(int i, int i1, int i2)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public int getBlockTypeIdAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public int getHighestBlockYAt(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public int getHighestBlockYAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Chunk getChunkAt(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Chunk getChunkAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Chunk getChunkAt(Block block)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean isChunkLoaded(Chunk chunk)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Chunk[] getLoadedChunks()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void loadChunk(Chunk chunk)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean isChunkLoaded(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void loadChunk(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean loadChunk(int i, int i1, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean unloadChunk(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean unloadChunk(int i, int i1, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean unloadChunk(int i, int i1, boolean bln, boolean bln1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean unloadChunkRequest(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean unloadChunkRequest(int i, int i1, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean regenerateChunk(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean refreshChunk(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Item dropItem(Location lctn, ItemStack is)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Item dropItemNaturally(Location lctn, ItemStack is)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Arrow spawnArrow(Location lctn, Vector vector, float f, float f1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean generateTree(Location lctn, TreeType tt)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean generateTree(Location lctn, TreeType tt, BlockChangeDelegate bcd)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public LivingEntity spawnCreature(Location lctn, CreatureType ct)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public LightningStrike strikeLightning(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public LightningStrike strikeLightningEffect(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public List<Entity> getEntities()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public List<LivingEntity> getLivingEntities()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public List<Player> getPlayers()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public String getName()
{
return name;
}
+ @Override
public long getId()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Location getSpawnLocation()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean setSpawnLocation(int i, int i1, int i2)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public long getTime()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setTime(long l)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public long getFullTime()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setFullTime(long l)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean hasStorm()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setStorm(boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public int getWeatherDuration()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setWeatherDuration(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean isThundering()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setThundering(boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public int getThunderDuration()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setThunderDuration(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Environment getEnvironment()
{
return env;
}
+ @Override
public long getSeed()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean getPVP()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setPVP(boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void save()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean createExplosion(double d, double d1, double d2, float f)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean createExplosion(Location lctn, float f)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public ChunkGenerator getGenerator()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public List<BlockPopulator> getPopulators()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void playEffect(Location lctn, Effect effect, int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void playEffect(Location lctn, Effect effect, int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean createExplosion(double d, double d1, double d2, float f, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean createExplosion(Location lctn, float f, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public <T extends Entity> T spawn(Location lctn, Class<T> type) throws IllegalArgumentException
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public ChunkSnapshot getEmptyChunkSnapshot(int i, int i1, boolean bln, boolean bln1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setSpawnFlags(boolean bln, boolean bln1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean getAllowAnimals()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean getAllowMonsters()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public UUID getUID()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Block getHighestBlockAt(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Block getHighestBlockAt(Location lctn)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Biome getBiome(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public double getTemperature(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public double getHumidity(int i, int i1)
{
throw new UnsupportedOperationException("Not supported yet.");
@@ -454,5 +515,11 @@ public class FakeWorld implements World
public int getSeaLevel()
{
throw new UnsupportedOperationException("Not supported yet.");
- }
+ }
+
+ @Override
+ public File getWorldFolder()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/I18n.java b/Essentials/src/com/earth2me/essentials/I18n.java
new file mode 100644
index 000000000..d3ffe5f76
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/I18n.java
@@ -0,0 +1,171 @@
+package com.earth2me.essentials;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+
+public class I18n
+{
+ private static I18n instance;
+ private static final String MESSAGES = "messages";
+ private final transient Locale defaultLocale = Locale.getDefault();
+ private transient Locale currentLocale = defaultLocale;
+ private transient ResourceBundle customBundle;
+ private transient ResourceBundle localeBundle;
+ private final transient ResourceBundle defaultBundle;
+ private final transient Map<String, MessageFormat> messageFormatCache = new HashMap<String, MessageFormat>();
+ private final transient IEssentials ess;
+
+ public I18n(final IEssentials ess)
+ {
+ this.ess = ess;
+ customBundle = ResourceBundle.getBundle(MESSAGES, defaultLocale);
+ localeBundle = ResourceBundle.getBundle(MESSAGES, defaultLocale);
+ defaultBundle = ResourceBundle.getBundle(MESSAGES, Locale.ENGLISH);
+ }
+
+ public void onEnable()
+ {
+ instance = this;
+ }
+
+ public void onDisable()
+ {
+ instance = null;
+ }
+
+ public Locale getCurrentLocale()
+ {
+ return currentLocale;
+ }
+
+ public String translate(final String string)
+ {
+ try
+ {
+ try
+ {
+ return customBundle.getString(string);
+ }
+ catch (MissingResourceException ex)
+ {
+ return localeBundle.getString(string);
+ }
+ }
+ catch (MissingResourceException ex)
+ {
+ Logger.getLogger("Minecraft").log(Level.WARNING, String.format("Missing translation key \"%s\" in translation file %s", ex.getKey(), localeBundle.getLocale().toString()), ex);
+ return defaultBundle.getString(string);
+ }
+ }
+
+ public static String _(final String string, final Object... objects)
+ {
+ if (objects.length == 0)
+ {
+ return instance.translate(string);
+ }
+ else
+ {
+ return instance.format(string, objects);
+ }
+ }
+
+ public String format(final String string, final Object... objects)
+ {
+ final String format = translate(string);
+ MessageFormat messageFormat = messageFormatCache.get(format);
+ if (messageFormat == null)
+ {
+ messageFormat = new MessageFormat(format);
+ messageFormatCache.put(format, messageFormat);
+ }
+ return messageFormat.format(objects);
+ }
+
+ public void updateLocale(final String loc)
+ {
+ if (loc == null || loc.isEmpty())
+ {
+ return;
+ }
+ final String[] parts = loc.split("[_\\.]");
+ if (parts.length == 1)
+ {
+ currentLocale = new Locale(parts[0]);
+ }
+ if (parts.length == 2)
+ {
+ currentLocale = new Locale(parts[0], parts[1]);
+ }
+ if (parts.length == 3)
+ {
+ currentLocale = new Locale(parts[0], parts[1], parts[2]);
+ }
+ Logger.getLogger("Minecraft").log(Level.INFO, String.format("Using locale %s", currentLocale.toString()));
+ customBundle = ResourceBundle.getBundle(MESSAGES, currentLocale, new FileResClassLoader(I18n.class.getClassLoader(), ess));
+ localeBundle = ResourceBundle.getBundle(MESSAGES, currentLocale);
+ }
+
+ public static String capitalCase(final String input)
+ {
+ return input == null || input.length() == 0
+ ? input
+ : input.toUpperCase(Locale.ENGLISH).charAt(0)
+ + input.toLowerCase(Locale.ENGLISH).substring(1);
+ }
+
+
+ private static class FileResClassLoader extends ClassLoader
+ {
+ private final transient File dataFolder;
+
+ public FileResClassLoader(final ClassLoader classLoader, final IEssentials ess)
+ {
+ super(classLoader);
+ this.dataFolder = ess.getDataFolder();
+ }
+
+ @Override
+ public URL getResource(final String string)
+ {
+ final File file = new File(dataFolder, string);
+ if (file.exists())
+ {
+ try
+ {
+ return file.toURI().toURL();
+ }
+ catch (MalformedURLException ex)
+ {
+ }
+ }
+ return super.getResource(string);
+ }
+
+ @Override
+ public InputStream getResourceAsStream(final String string)
+ {
+ final File file = new File(dataFolder, string);
+ if (file.exists())
+ {
+ try
+ {
+ return new FileInputStream(file);
+ }
+ catch (FileNotFoundException ex)
+ {
+ }
+ }
+ return super.getResourceAsStream(string);
+ }
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/IEssentials.java b/Essentials/src/com/earth2me/essentials/IEssentials.java
index 9dca96e81..ef54b0776 100644
--- a/Essentials/src/com/earth2me/essentials/IEssentials.java
+++ b/Essentials/src/com/earth2me/essentials/IEssentials.java
@@ -29,10 +29,6 @@ public interface IEssentials extends Plugin
BukkitScheduler getScheduler();
- String[] getMotd(CommandSender sender, String def);
-
- String[] getLines(CommandSender sender, String node, String def);
-
Jail getJail();
Warps getWarps();
@@ -56,6 +52,8 @@ public interface IEssentials extends Plugin
TNTExplodeListener getTNTListener();
PermissionsHandler getPermissionsHandler();
+
+ AlternativeCommandsHandler getAlternativeCommandsHandler();
void showError(final CommandSender sender, final Throwable exception, final String commandLabel);
diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java
index 7ffa0c138..7891190dc 100644
--- a/Essentials/src/com/earth2me/essentials/ISettings.java
+++ b/Essentials/src/com/earth2me/essentials/ISettings.java
@@ -3,12 +3,12 @@ package com.earth2me.essentials;
import com.earth2me.essentials.commands.IEssentialsCommand;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.bukkit.ChatColor;
public interface ISettings extends IConf
{
-
boolean areSignsDisabled();
String format(String format, IUser user);
@@ -64,11 +64,11 @@ public interface ISettings extends IConf
boolean getReclaimSetting();
boolean getRespawnAtHome();
-
+
List getMultipleHomes();
-
+
int getHomeLimit(String set);
-
+
int getHomeLimit(User user);
boolean getSortListByGroups();
@@ -110,11 +110,11 @@ public interface ISettings extends IConf
boolean warnOnBuildDisallow();
boolean warnOnSmite();
-
+
double getMaxMoney();
boolean isEcoLogEnabled();
-
+
boolean removeGodOnDisconnect();
boolean changeDisplayName();
@@ -124,9 +124,9 @@ public interface ISettings extends IConf
boolean useBukkitPermissions();
boolean addPrefixSuffix();
-
+
boolean disablePrefix();
-
+
boolean disableSuffix();
long getAutoAfk();
@@ -134,6 +134,10 @@ public interface ISettings extends IConf
long getAutoAfkKick();
boolean getFreezeAfkPlayers();
-
+
boolean areDeathMessagesEnabled();
+
+ public void setDebug(boolean debug);
+
+ Set<String> getNoGodWorlds();
}
diff --git a/Essentials/src/com/earth2me/essentials/ItemDb.java b/Essentials/src/com/earth2me/essentials/ItemDb.java
index e978a312d..cbdca198d 100644
--- a/Essentials/src/com/earth2me/essentials/ItemDb.java
+++ b/Essentials/src/com/earth2me/essentials/ItemDb.java
@@ -1,7 +1,9 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
@@ -24,8 +26,9 @@ public class ItemDb implements IConf
public void reloadConfig()
{
final List<String> lines = file.getLines();
-
- if (lines.isEmpty()) {
+
+ if (lines.isEmpty())
+ {
return;
}
@@ -34,7 +37,7 @@ public class ItemDb implements IConf
for (String line : lines)
{
- line = line.trim().toLowerCase();
+ line = line.trim().toLowerCase(Locale.ENGLISH);
if (line.length() > 0 && line.charAt(0) == '#')
{
continue;
@@ -48,14 +51,14 @@ public class ItemDb implements IConf
final int numeric = Integer.parseInt(parts[1]);
- durabilities.put(parts[0].toLowerCase(), parts.length > 2 && !parts[2].equals("0") ? Short.parseShort(parts[2]) : 0);
- items.put(parts[0].toLowerCase(), numeric);
+ durabilities.put(parts[0].toLowerCase(Locale.ENGLISH), parts.length > 2 && !parts[2].equals("0") ? Short.parseShort(parts[2]) : 0);
+ items.put(parts[0].toLowerCase(Locale.ENGLISH), numeric);
}
}
public ItemStack get(final String id, final int quantity) throws Exception
{
- final ItemStack retval = get(id.toLowerCase());
+ final ItemStack retval = get(id.toLowerCase(Locale.ENGLISH));
retval.setAmount(quantity);
return retval;
}
@@ -76,12 +79,12 @@ public class ItemDb implements IConf
}
else if (id.matches("^[^:+',;.]+[:+',;.]\\d+$"))
{
- itemname = id.split("[:+',;.]")[0].toLowerCase();
+ itemname = id.split("[:+',;.]")[0].toLowerCase(Locale.ENGLISH);
metaData = Short.parseShort(id.split("[:+',;.]")[1]);
}
else
{
- itemname = id.toLowerCase();
+ itemname = id.toLowerCase(Locale.ENGLISH);
}
if (itemname != null)
@@ -101,14 +104,14 @@ public class ItemDb implements IConf
}
else
{
- throw new Exception(Util.format("unknownItemName", id));
+ throw new Exception(_("unknownItemName", id));
}
}
final Material mat = Material.getMaterial(itemid);
if (mat == null)
{
- throw new Exception(Util.format("unknownItemId", itemid));
+ throw new Exception(_("unknownItemId", itemid));
}
final ItemStack retval = new ItemStack(mat);
retval.setAmount(ess.getSettings().getDefaultStackSize());
diff --git a/Essentials/src/com/earth2me/essentials/Jail.java b/Essentials/src/com/earth2me/essentials/Jail.java
index ff3bec2f7..fbbb4376e 100644
--- a/Essentials/src/com/earth2me/essentials/Jail.java
+++ b/Essentials/src/com/earth2me/essentials/Jail.java
@@ -1,7 +1,9 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import java.io.File;
import java.util.List;
+import java.util.Locale;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.event.block.BlockBreakEvent;
@@ -25,18 +27,18 @@ public class Jail extends BlockListener implements IConf
public void setJail(Location loc, String jailName) throws Exception
{
- config.setProperty(jailName.toLowerCase(), loc);
+ config.setProperty(jailName.toLowerCase(Locale.ENGLISH), loc);
config.save();
}
public Location getJail(String jailName) throws Exception
{
- if (jailName == null || config.getProperty(jailName.toLowerCase()) == null)
+ if (jailName == null || config.getProperty(jailName.toLowerCase(Locale.ENGLISH)) == null)
{
- throw new Exception(Util.i18n("jailNotExist"));
+ throw new Exception(_("jailNotExist"));
}
- Location loc = config.getLocation(jailName.toLowerCase(), ess.getServer());
+ Location loc = config.getLocation(jailName.toLowerCase(Locale.ENGLISH), ess.getServer());
return loc;
}
@@ -51,7 +53,7 @@ public class Jail extends BlockListener implements IConf
public void delJail(String jail) throws Exception
{
- config.removeProperty(jail.toLowerCase());
+ config.removeProperty(jail.toLowerCase(Locale.ENGLISH));
config.save();
}
@@ -60,6 +62,7 @@ public class Jail extends BlockListener implements IConf
return config.getKeys(null);
}
+ @Override
public void reloadConfig()
{
config.load();
diff --git a/Essentials/src/com/earth2me/essentials/JailPlayerListener.java b/Essentials/src/com/earth2me/essentials/JailPlayerListener.java
index da8c165cb..ed632b1ad 100644
--- a/Essentials/src/com/earth2me/essentials/JailPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/JailPlayerListener.java
@@ -1,12 +1,9 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import java.util.logging.Level;
import java.util.logging.Logger;
-import org.bukkit.event.player.PlayerInteractEvent;
-import org.bukkit.event.player.PlayerJoinEvent;
-import org.bukkit.event.player.PlayerListener;
-import org.bukkit.event.player.PlayerRespawnEvent;
-import org.bukkit.event.player.PlayerTeleportEvent;
+import org.bukkit.event.player.*;
public class JailPlayerListener extends PlayerListener
@@ -59,9 +56,9 @@ public class JailPlayerListener extends PlayerListener
}
catch (Exception ex)
{
- LOGGER.log(Level.WARNING, Util.i18n("returnPlayerToJailError"), ex);
+ LOGGER.log(Level.WARNING, _("returnPlayerToJailError"), ex);
}
- user.sendMessage(Util.i18n("jailMessage"));
+ user.sendMessage(_("jailMessage"));
}
@Override
@@ -76,9 +73,9 @@ public class JailPlayerListener extends PlayerListener
}
catch (Exception ex)
{
- LOGGER.log(Level.WARNING, Util.i18n("returnPlayerToJailError"), ex);
+ LOGGER.log(Level.WARNING, _("returnPlayerToJailError"), ex);
}
- u.sendMessage(Util.i18n("jailMessage"));
+ u.sendMessage(_("jailMessage"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/ManagedFile.java b/Essentials/src/com/earth2me/essentials/ManagedFile.java
index 759261e02..a1918fa20 100644
--- a/Essentials/src/com/earth2me/essentials/ManagedFile.java
+++ b/Essentials/src/com/earth2me/essentials/ManagedFile.java
@@ -1,15 +1,7 @@
package com.earth2me.essentials;
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
+import static com.earth2me.essentials.I18n._;
+import java.io.*;
import java.math.BigInteger;
import java.security.DigestInputStream;
import java.security.DigestOutputStream;
@@ -54,7 +46,7 @@ public class ManagedFile
}
catch (IOException ex)
{
- Bukkit.getLogger().log(Level.SEVERE, Util.i18n("itemsCsvNotLoaded"), ex);
+ Bukkit.getLogger().log(Level.SEVERE, _("itemsCsvNotLoaded"), ex);
}
}
}
@@ -138,12 +130,12 @@ public class ManagedFile
try
{
String hash = reader.readLine();
- if (hash.matches("#[a-f0-9]{32}"))
+ if (hash != null && hash.matches("#[a-f0-9]{32}"))
{
hash = hash.substring(1);
bais.reset();
final String versionline = reader.readLine();
- if (versionline.matches("#version: .+"))
+ if (versionline != null && versionline.matches("#version: .+"))
{
final String versioncheck = versionline.substring(10);
if (!versioncheck.equalsIgnoreCase(version))
diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java
index d937ba0fb..e9b269218 100644
--- a/Essentials/src/com/earth2me/essentials/Mob.java
+++ b/Essentials/src/com/earth2me/essentials/Mob.java
@@ -1,6 +1,8 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -29,8 +31,12 @@ public enum Mob
WOLF("Wolf", Enemies.NEUTRAL, CreatureType.WOLF),
CAVESPIDER("CaveSpider", Enemies.ENEMY, CreatureType.CAVE_SPIDER),
ENDERMAN("Enderman", Enemies.ENEMY, "", CreatureType.ENDERMAN),
- SILVERFISH("Silverfish", Enemies.ENEMY, "", CreatureType.SILVERFISH);
-
+ SILVERFISH("Silverfish", Enemies.ENEMY, "", CreatureType.SILVERFISH),
+ ENDERDRAGON("EnderDragon", Enemies.ENEMY, CreatureType.ENDER_DRAGON),
+ VILLAGER("Villager", Enemies.FRIENDLY, CreatureType.VILLAGER),
+ BLAZE("Blaze", Enemies.ENEMY, CreatureType.BLAZE),
+ MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, CreatureType.MUSHROOM_COW);
+ //TODO: Snowman
public static final Logger logger = Logger.getLogger("Minecraft");
private Mob(String n, Enemies en, String s, CreatureType type)
@@ -47,7 +53,6 @@ public enum Mob
this.type = en;
this.bukkitType = type;
}
-
public String suffix = "s";
final public String name;
final public Enemies type;
@@ -58,7 +63,7 @@ public enum Mob
{
for (Mob mob : Mob.values())
{
- hashMap.put(mob.name, mob);
+ hashMap.put(mob.name.toLowerCase(Locale.ENGLISH), mob);
}
}
@@ -68,7 +73,7 @@ public enum Mob
final LivingEntity entity = player.getWorld().spawnCreature(loc, this.bukkitType);
if (entity == null)
{
- logger.log(Level.WARNING, Util.i18n("unableToSpawnMob"));
+ logger.log(Level.WARNING, _("unableToSpawnMob"));
throw new MobException();
}
return entity;
@@ -81,24 +86,26 @@ public enum Mob
NEUTRAL("neutral"),
ENEMY("enemy");
- private Enemies(final String t)
+ private Enemies(final String type)
{
- this.type = t;
+ this.type = type;
}
final protected String type;
}
- public CreatureType getType () {
+ public CreatureType getType()
+ {
return bukkitType;
}
- public static class MobException extends Exception
+ public static Mob fromName(final String name)
{
- private static final long serialVersionUID = 1L;
+ return hashMap.get(name.toLowerCase(Locale.ENGLISH));
}
- public static Mob fromName(String n)
+
+ public static class MobException extends Exception
{
- return hashMap.get(n);
+ private static final long serialVersionUID = 1L;
}
}
diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
index 8e50aa1bd..d8c871b5b 100644
--- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
+++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
@@ -1,28 +1,15 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import lombok.Delegate;
-import org.bukkit.Achievement;
-import org.bukkit.Effect;
-import org.bukkit.GameMode;
-import org.bukkit.Instrument;
-import org.bukkit.Location;
-import org.bukkit.Material;
-import org.bukkit.Note;
-import org.bukkit.Server;
-import org.bukkit.Statistic;
-import org.bukkit.World;
+import org.bukkit.*;
import org.bukkit.block.Block;
-import org.bukkit.entity.Arrow;
-import org.bukkit.entity.Egg;
-import org.bukkit.entity.Entity;
-import org.bukkit.entity.Player;
-import org.bukkit.entity.Snowball;
-import org.bukkit.entity.Vehicle;
+import org.bukkit.entity.*;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
@@ -40,7 +27,7 @@ public class OfflinePlayer implements Player
private Location location = new Location(null, 0, 0, 0, 0, 0);
private World world;
private UUID uniqueId = UUID.randomUUID();
- @Delegate(types=org.bukkit.OfflinePlayer.class)
+ @Delegate(types = org.bukkit.OfflinePlayer.class)
private final org.bukkit.OfflinePlayer base;
public OfflinePlayer(final String name, final IEssentials ess)
@@ -66,77 +53,93 @@ public class OfflinePlayer implements Player
{
}
+ @Override
public void setCompassTarget(Location lctn)
{
}
+ @Override
public InetSocketAddress getAddress()
{
return null;
}
+ @Override
public void kickPlayer(String string)
{
}
+ @Override
public PlayerInventory getInventory()
{
return null;
}
+ @Override
public ItemStack getItemInHand()
{
return null;
}
+ @Override
public void setItemInHand(ItemStack is)
{
}
+ @Override
public int getHealth()
{
return 0;
}
+ @Override
public void setHealth(int i)
{
}
+ @Override
public Egg throwEgg()
{
return null;
}
+ @Override
public Snowball throwSnowball()
{
return null;
}
+ @Override
public Arrow shootArrow()
{
return null;
}
+ @Override
public boolean isInsideVehicle()
{
return false;
}
+ @Override
public boolean leaveVehicle()
{
return false;
}
+ @Override
public Vehicle getVehicle()
{
return null;
}
+ @Override
public Location getLocation()
{
return location;
}
+ @Override
public World getWorld()
{
return world;
@@ -156,11 +159,13 @@ public class OfflinePlayer implements Player
{
}
+ @Override
public int getEntityId()
{
return -1;
}
+ @Override
public boolean performCommand(String string)
{
return false;
@@ -171,91 +176,109 @@ public class OfflinePlayer implements Player
return false;
}
+ @Override
public int getRemainingAir()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setRemainingAir(int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public int getMaximumAir()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setMaximumAir(int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean isSneaking()
{
return false;
}
+ @Override
public void setSneaking(boolean bln)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void updateInventory()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void chat(String string)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public double getEyeHeight()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public double getEyeHeight(boolean bln)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public List<Block> getLineOfSight(HashSet<Byte> hs, int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public Block getTargetBlock(HashSet<Byte> hs, int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public List<Block> getLastTwoTargetBlocks(HashSet<Byte> hs, int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public int getFireTicks()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public int getMaxFireTicks()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setFireTicks(int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void remove()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public Server getServer()
{
return ess == null ? null : ess.getServer();
@@ -263,308 +286,367 @@ public class OfflinePlayer implements Player
public Vector getMomentum()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
public void setMomentum(Vector vector)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setVelocity(Vector vector)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public Vector getVelocity()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void damage(int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void damage(int i, Entity entity)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public Location getEyeLocation()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void sendRawMessage(String string)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public Location getCompassTarget()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public int getMaximumNoDamageTicks()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setMaximumNoDamageTicks(int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public int getLastDamage()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setLastDamage(int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public int getNoDamageTicks()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setNoDamageTicks(int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean teleport(Location lctn)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean teleport(Entity entity)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public Entity getPassenger()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean setPassenger(Entity entity)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean isEmpty()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean eject()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void saveData()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void loadData()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean isSleeping()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public int getSleepTicks()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public List<Entity> getNearbyEntities(double d, double d1, double d2)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean isDead()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public float getFallDistance()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setFallDistance(float f)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setSleepingIgnored(boolean bln)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean isSleepingIgnored()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void awardAchievement(Achievement a)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void incrementStatistic(Statistic ststc)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void incrementStatistic(Statistic ststc, int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void incrementStatistic(Statistic ststc, Material mtrl)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void incrementStatistic(Statistic ststc, Material mtrl, int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void playNote(Location lctn, byte b, byte b1)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void sendBlockChange(Location lctn, Material mtrl, byte b)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void sendBlockChange(Location lctn, int i, byte b)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void setLastDamageCause(EntityDamageEvent ede)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public EntityDamageEvent getLastDamageCause()
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public void playEffect(Location lctn, Effect effect, int i)
{
- throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
+ throw new UnsupportedOperationException(_("notSupportedYet"));
}
+ @Override
public boolean sendChunkChange(Location lctn, int i, int i1, int i2, byte[] bytes)
{
return true;
}
+ @Override
public UUID getUniqueId()
{
return uniqueId;
}
+ @Override
public void playNote(Location lctn, Instrument i, Note note)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setPlayerTime(long l, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public long getPlayerTime()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public long getPlayerTimeOffset()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean isPlayerTimeRelative()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void resetPlayerTime()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean isPermissionSet(String string)
{
return false;
}
+ @Override
public boolean isPermissionSet(Permission prmsn)
{
return false;
}
+ @Override
public boolean hasPermission(String string)
{
return false;
}
+ @Override
public boolean hasPermission(Permission prmsn)
{
return false;
}
+ @Override
public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public PermissionAttachment addAttachment(Plugin plugin)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln, int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public PermissionAttachment addAttachment(Plugin plugin, int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void removeAttachment(PermissionAttachment pa)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void recalculatePermissions()
{
}
+ @Override
public Set<PermissionAttachmentInfo> getEffectivePermissions()
{
throw new UnsupportedOperationException("Not supported yet.");
}
-
+
@Override
public void sendMap(MapView mv)
{
@@ -696,4 +778,10 @@ public class OfflinePlayer implements Player
{
throw new UnsupportedOperationException("Not supported yet.");
}
+
+ @Override
+ public int getMaxHealth()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/PlayerExtension.java b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
index 11c17761c..7c52e40d1 100644
--- a/Essentials/src/com/earth2me/essentials/PlayerExtension.java
+++ b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
@@ -1,12 +1,8 @@
package com.earth2me.essentials;
import lombok.Delegate;
-import org.bukkit.craftbukkit.entity.CraftPlayer;
-import net.minecraft.server.EntityPlayer;
-import net.minecraft.server.IInventory;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
-import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.LivingEntity;
@@ -17,21 +13,19 @@ import org.bukkit.permissions.ServerOperator;
public class PlayerExtension implements Player
{
- protected final transient IEssentials ess;
@Delegate(types =
{
- Player.class, Entity.class, CommandSender.class, ServerOperator.class,
+ Player.class, Entity.class, CommandSender.class, ServerOperator.class,
HumanEntity.class, ConfigurationSerializable.class, LivingEntity.class,
Permissible.class
})
protected Player base;
-
- public PlayerExtension(final Player base, final IEssentials ess)
+
+ public PlayerExtension(final Player base)
{
this.base = base;
- this.ess = ess;
}
-
+
public final Player getBase()
{
return base;
@@ -41,44 +35,4 @@ public class PlayerExtension implements Player
{
return this.base = base;
}
-
- public void showInventory(final IInventory inventory)
- {
- getHandle().a(inventory);
- }
-
- public void showInventory(final CraftInventoryPlayer inventory)
- {
- showInventory((IInventory)inventory.getInventory());
- }
-
- public TargetBlock getTarget()
- {
- return new TargetBlock(getBase());
- }
-
- public String getGroup()
- {
- return ess.getPermissionsHandler().getGroup(base);
- }
-
- public boolean inGroup(final String group)
- {
- return ess.getPermissionsHandler().inGroup(base, group);
- }
-
- public boolean canBuild()
- {
- return ess.getPermissionsHandler().canBuild(base, getGroup());
- }
-
- public EntityPlayer getHandle()
- {
- return getCraftPlayer().getHandle();
- }
-
- public CraftPlayer getCraftPlayer()
- {
- return (CraftPlayer)base;
- }
}
diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java
index ca076c272..47a102326 100644
--- a/Essentials/src/com/earth2me/essentials/Settings.java
+++ b/Essentials/src/com/earth2me/essentials/Settings.java
@@ -1,13 +1,18 @@
package com.earth2me.essentials;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.bukkit.ChatColor;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.commands.IEssentialsCommand;
import java.io.File;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.bukkit.ChatColor;
import org.bukkit.inventory.ItemStack;
@@ -111,7 +116,7 @@ public class Settings implements ISettings
}
return true;
}
- return config.getBoolean("disable-" + label.toLowerCase(), false);
+ return config.getBoolean("disable-" + label.toLowerCase(Locale.ENGLISH), false);
}
@Override
@@ -131,7 +136,7 @@ public class Settings implements ISettings
}
return true;
}
- return config.getBoolean("restrict-" + label.toLowerCase(), false);
+ return config.getBoolean("restrict-" + label.toLowerCase(Locale.ENGLISH), false);
}
@Override
@@ -161,7 +166,7 @@ public class Settings implements ISettings
}
return true;
}
- return config.getBoolean("override-" + name.toLowerCase(), false);
+ return config.getBoolean("override-" + name.toLowerCase(Locale.ENGLISH), false);
}
@Override
@@ -339,6 +344,7 @@ public class Settings implements ISettings
public void reloadConfig()
{
config.load();
+ noGodWorlds = new HashSet<String>(config.getStringList("no-god-in-worlds",Collections.<String>emptyList()));
}
@Override
@@ -360,7 +366,7 @@ public class Settings implements ISettings
}
catch (Exception ex)
{
- logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "item-spawn-blacklist"));
+ logger.log(Level.SEVERE, _("unknownItemInList", itemName, "item-spawn-blacklist"));
}
}
return epItemSpwn;
@@ -377,11 +383,12 @@ public class Settings implements ISettings
{
return config.getBoolean("protect.disable.warn-on-build-disallow", false);
}
+ private boolean debug = false;
@Override
public boolean isDebug()
{
- return config.getBoolean("debug", false);
+ return debug || config.getBoolean("debug", false);
}
@Override
@@ -445,7 +452,7 @@ public class Settings implements ISettings
}
catch (Exception ex)
{
- logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, configName));
+ logger.log(Level.SEVERE, _("unknownItemInList", itemName, configName));
}
}
return list;
@@ -464,6 +471,7 @@ public class Settings implements ISettings
}
private final static double MAXMONEY = 10000000000000.0;
+ @Override
public double getMaxMoney()
{
double max = config.getDouble("max-money", MAXMONEY);
@@ -474,36 +482,43 @@ public class Settings implements ISettings
return max;
}
+ @Override
public boolean isEcoLogEnabled()
{
return config.getBoolean("economy-log-enabled", false);
}
+ @Override
public boolean removeGodOnDisconnect()
{
return config.getBoolean("remove-god-on-disconnect", false);
}
+ @Override
public boolean changeDisplayName()
{
return config.getBoolean("change-displayname", true);
}
+ @Override
public boolean useBukkitPermissions()
{
return config.getBoolean("use-bukkit-permissions", false);
}
+ @Override
public boolean addPrefixSuffix()
{
return config.getBoolean("add-prefix-suffix", ess.getServer().getPluginManager().isPluginEnabled("EssentialsChat"));
}
-
+
+ @Override
public boolean disablePrefix()
{
return config.getBoolean("disablePrefix", false);
}
-
+
+ @Override
public boolean disableSuffix()
{
return config.getBoolean("disableSuffix", false);
@@ -532,4 +547,18 @@ public class Settings implements ISettings
{
return config.getBoolean("death-messages", true);
}
+
+ Set <String> noGodWorlds = new HashSet<String>();
+ @Override
+ public Set<String> getNoGodWorlds()
+ {
+ return noGodWorlds;
+
+ }
+
+ @Override
+ public void setDebug(final boolean debug)
+ {
+ this.debug = debug;
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/Spawn.java b/Essentials/src/com/earth2me/essentials/Spawn.java
index b1e06d50c..ab2d21c03 100644
--- a/Essentials/src/com/earth2me/essentials/Spawn.java
+++ b/Essentials/src/com/earth2me/essentials/Spawn.java
@@ -95,6 +95,7 @@ public class Spawn implements IConf
return retval;
}
+ @Override
public void reloadConfig()
{
config.load();
diff --git a/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java b/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java
index 0f3ca01cc..4ae259a32 100644
--- a/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java
+++ b/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java
@@ -1,31 +1,20 @@
package com.earth2me.essentials;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.minecraft.server.ChunkPosition;
-import net.minecraft.server.Packet60Explosion;
-import org.bukkit.Location;
-import org.bukkit.block.Block;
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
+import com.earth2me.essentials.craftbukkit.FakeExplosion;
import org.bukkit.entity.LivingEntity;
-import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityListener;
public class TNTExplodeListener extends EntityListener implements Runnable
{
- private final IEssentials ess;
- private boolean enabled = false;
- private int timer = -1;
+ private final transient IEssentials ess;
+ private transient boolean enabled = false;
+ private transient int timer = -1;
- public TNTExplodeListener(IEssentials ess)
+ public TNTExplodeListener(final IEssentials ess)
{
+ super();
this.ess = ess;
}
@@ -55,36 +44,11 @@ public class TNTExplodeListener extends EntityListener implements Runnable
{
return;
}
- try
- {
- final Set<ChunkPosition> set = new HashSet<ChunkPosition>(event.blockList().size());
- final Player[] players = ess.getServer().getOnlinePlayers();
- final List<ChunkPosition> blocksUnderPlayers = new ArrayList<ChunkPosition>(players.length);
- final Location loc = event.getLocation();
- for (Player player : players)
- {
- if (player.getWorld().equals(loc.getWorld()))
- {
- blocksUnderPlayers.add(new ChunkPosition(player.getLocation().getBlockX(), player.getLocation().getBlockY() - 1, player.getLocation().getBlockZ()));
- }
- }
- for (Block block : event.blockList())
- {
- final ChunkPosition cp = new ChunkPosition(block.getX(), block.getY(), block.getZ());
- if (!blocksUnderPlayers.contains(cp))
- {
- set.add(cp);
- }
- }
- ((CraftServer)ess.getServer()).getHandle().sendPacketNearby(loc.getX(), loc.getY(), loc.getZ(), 64.0, ((CraftWorld)loc.getWorld()).getHandle().worldProvider.dimension, new Packet60Explosion(loc.getX(), loc.getY(), loc.getZ(), 3.0F, set));
- }
- catch (Throwable ex)
- {
- Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex);
- }
+ FakeExplosion.createExplosion(event, ess.getServer(), ess.getServer().getOnlinePlayers());
event.setCancelled(true);
}
+ @Override
public void run()
{
enabled = false;
diff --git a/Essentials/src/com/earth2me/essentials/TargetBlock.java b/Essentials/src/com/earth2me/essentials/TargetBlock.java
index 3d45afc55..fb6bfabb6 100644
--- a/Essentials/src/com/earth2me/essentials/TargetBlock.java
+++ b/Essentials/src/com/earth2me/essentials/TargetBlock.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials;
import java.util.List;
-import org.bukkit.block.Block;
import org.bukkit.Location;
import org.bukkit.Material;
+import org.bukkit.block.Block;
import org.bukkit.entity.Player;
diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java
index 845f9c3a3..94371fdde 100644
--- a/Essentials/src/com/earth2me/essentials/Teleport.java
+++ b/Essentials/src/com/earth2me/essentials/Teleport.java
@@ -1,5 +1,6 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import java.util.Calendar;
import java.util.GregorianCalendar;
@@ -67,6 +68,7 @@ public class Teleport implements Runnable
this.chargeFor = chargeFor;
}
+ @Override
public void run()
{
@@ -92,7 +94,7 @@ public class Teleport implements Runnable
try
{
cooldown(false);
- user.sendMessage(Util.i18n("teleportationCommencing"));
+ user.sendMessage(_("teleportationCommencing"));
try
{
@@ -106,11 +108,10 @@ public class Teleport implements Runnable
{
ess.showError(user.getBase(), ex, "teleport");
}
- return;
}
catch (Exception ex)
{
- user.sendMessage(Util.format("cooldownWithMessage", ex.getMessage()));
+ user.sendMessage(_("cooldownWithMessage", ex.getMessage()));
}
}
}
@@ -130,7 +131,7 @@ public class Teleport implements Runnable
{
Location loc = ess.getWarps().getWarp(warp);
teleport(new Target(loc), chargeFor);
- user.sendMessage(Util.format("warpingTo", warp));
+ user.sendMessage(_("warpingTo", warp));
}
public void cooldown(boolean check) throws Exception
@@ -145,7 +146,7 @@ public class Teleport implements Runnable
cooldownTime.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0));
if (cooldownTime.after(now) && !user.isAuthorized("essentials.teleport.cooldown.bypass"))
{
- throw new Exception(Util.format("timeBeforeTeleport", Util.formatDateDiff(cooldownTime.getTimeInMillis())));
+ throw new Exception(_("timeBeforeTeleport", Util.formatDateDiff(cooldownTime.getTimeInMillis())));
}
}
// if justCheck is set, don't update lastTeleport; we're just checking
@@ -166,7 +167,7 @@ public class Teleport implements Runnable
ess.getServer().getScheduler().cancelTask(teleTimer);
if (notifyUser)
{
- user.sendMessage(Util.i18n("pendingTeleportCancelled"));
+ user.sendMessage(_("pendingTeleportCancelled"));
}
}
finally
@@ -214,7 +215,7 @@ public class Teleport implements Runnable
Calendar c = new GregorianCalendar();
c.add(Calendar.SECOND, (int)delay);
c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
- user.sendMessage(Util.format("dontMoveMessage", Util.formatDateDiff(c.getTimeInMillis())));
+ user.sendMessage(_("dontMoveMessage", Util.formatDateDiff(c.getTimeInMillis())));
initTimer((long)(delay * 1000.0), target, chargeFor);
teleTimer = ess.scheduleSyncRepeatingTask(this, 10, 10);
diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java
index 69f6478f7..7d2480660 100644
--- a/Essentials/src/com/earth2me/essentials/Trade.java
+++ b/Essentials/src/com/earth2me/essentials/Trade.java
@@ -1,10 +1,12 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.DateFormat;
import java.util.Date;
+import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -50,13 +52,13 @@ public class Trade
&& getMoney() > 0
&& !user.isAuthorized("essentials.eco.loan"))
{
- throw new ChargeException(Util.i18n("notEnoughMoney"));
+ throw new ChargeException(_("notEnoughMoney"));
}
if (getItemStack() != null
&& !InventoryWorkaround.containsItem(user.getInventory(), true, itemStack))
{
- throw new ChargeException(Util.format("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase().replace("_", " ")));
+ throw new ChargeException(_("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " ")));
}
if (command != null && !command.isEmpty()
@@ -66,7 +68,7 @@ public class Trade
&& 0 < ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command)
&& !user.isAuthorized("essentials.eco.loan"))
{
- throw new ChargeException(Util.i18n("notEnoughMoney"));
+ throw new ChargeException(_("notEnoughMoney"));
}
}
@@ -108,7 +110,7 @@ public class Trade
final double mon = user.getMoney();
if (mon < getMoney() && getMoney() > 0 && !user.isAuthorized("essentials.eco.loan"))
{
- throw new ChargeException(Util.i18n("notEnoughMoney"));
+ throw new ChargeException(_("notEnoughMoney"));
}
user.takeMoney(getMoney());
}
@@ -116,7 +118,7 @@ public class Trade
{
if (!InventoryWorkaround.containsItem(user.getInventory(), true, itemStack))
{
- throw new ChargeException(Util.format("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase().replace("_", " ")));
+ throw new ChargeException(_("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " ")));
}
InventoryWorkaround.removeItem(user.getInventory(), true, getItemStack());
user.updateInventory();
@@ -129,7 +131,7 @@ public class Trade
final double cost = ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command);
if (mon < cost && cost > 0 && !user.isAuthorized("essentials.eco.loan"))
{
- throw new ChargeException(Util.i18n("notEnoughMoney"));
+ throw new ChargeException(_("notEnoughMoney"));
}
user.takeMoney(cost);
}
diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java
index f0754cdb4..3c1166240 100644
--- a/Essentials/src/com/earth2me/essentials/User.java
+++ b/Essentials/src/com/earth2me/essentials/User.java
@@ -1,9 +1,12 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.register.payment.Method;
import java.util.Calendar;
import java.util.GregorianCalendar;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
@@ -20,6 +23,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
private transient long lastActivity = System.currentTimeMillis();
private boolean hidden = false;
private transient Location afkPosition;
+ private static final Logger logger = Logger.getLogger("Minecraft");
User(final Player base, final IEssentials ess)
{
@@ -79,7 +83,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
cooldownTime.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0));
if (cooldownTime.after(now) && !isAuthorized("essentials.heal.cooldown.bypass"))
{
- throw new Exception(Util.format("timeBeforeHeal", Util.formatDateDiff(cooldownTime.getTimeInMillis())));
+ throw new Exception(_("timeBeforeHeal", Util.formatDateDiff(cooldownTime.getTimeInMillis())));
}
}
setLastHealTimestamp(now.getTimeInMillis());
@@ -98,10 +102,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
return;
}
setMoney(getMoney() + value);
- sendMessage(Util.format("addedToAccount", Util.formatCurrency(value, ess)));
+ sendMessage(_("addedToAccount", Util.formatCurrency(value, ess)));
if (initiator != null)
{
- initiator.sendMessage(Util.format("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName()));
+ initiator.sendMessage(_("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName()));
}
}
@@ -115,12 +119,12 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
setMoney(getMoney() - value);
reciever.setMoney(reciever.getMoney() + value);
- sendMessage(Util.format("moneySentTo", Util.formatCurrency(value, ess), reciever.getDisplayName()));
- reciever.sendMessage(Util.format("moneyRecievedFrom", Util.formatCurrency(value, ess), getDisplayName()));
+ sendMessage(_("moneySentTo", Util.formatCurrency(value, ess), reciever.getDisplayName()));
+ reciever.sendMessage(_("moneyRecievedFrom", Util.formatCurrency(value, ess), getDisplayName()));
}
else
{
- throw new Exception(Util.i18n("notEnoughMoney"));
+ throw new Exception(_("notEnoughMoney"));
}
}
@@ -137,10 +141,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
return;
}
setMoney(getMoney() - value);
- sendMessage(Util.format("takenFromAccount", Util.formatCurrency(value, ess)));
+ sendMessage(_("takenFromAccount", Util.formatCurrency(value, ess)));
if (initiator != null)
{
- initiator.sendMessage(Util.format("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName()));
+ initiator.sendMessage(_("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName()));
}
}
@@ -232,7 +236,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
return teleportRequestHere;
}
- public String getNick()
+ public String getNick(boolean addprefixsuffix)
{
final StringBuilder nickname = new StringBuilder();
final String nick = getNickname();
@@ -256,9 +260,8 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
}
- if (ess.getSettings().addPrefixSuffix())
+ if (addprefixsuffix && ess.getSettings().addPrefixSuffix())
{
-
if (!ess.getSettings().disablePrefix())
{
final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
@@ -282,19 +285,35 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
return nickname.toString();
}
- public void setDisplayNick(String name)
+ public void setDisplayNick()
{
+ String name = getNick(true);
setDisplayName(name);
- //TODO: Maybe we need to limit nick length, or try use a string trim.
- if (name.length() <= 16)
+ if (name.length() > 16)
+ {
+ name = getNick(false);
+ }
+ if (name.length() > 16)
+ {
+ name = name.substring(0, name.charAt(15) == '§' ? 15 : 16);
+ }
+ try
{
setPlayerListName(name);
}
+ catch (IllegalArgumentException e)
+ {
+ logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Use a shorter displayname prefix.");
+ }
}
@Override
public String getDisplayName()
{
+ if (!(base instanceof OfflinePlayer) && ess.getSettings().changeDisplayName())
+ {
+ setDisplayNick();
+ }
return super.getDisplayName() == null ? super.getName() : super.getDisplayName();
}
@@ -376,6 +395,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
return now;
}
+ @Override
public boolean isHidden()
{
return hidden;
@@ -393,7 +413,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
setJailTimeout(0);
setJailed(false);
- sendMessage(Util.i18n("haveBeenReleased"));
+ sendMessage(_("haveBeenReleased"));
setJail(null);
try
{
@@ -413,7 +433,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
if (getMuteTimeout() > 0 && getMuteTimeout() < currentTime && isMuted())
{
setMuteTimeout(0);
- sendMessage(Util.i18n("canTalkAgain"));
+ sendMessage(_("canTalkAgain"));
setMuted(false);
return true;
}
@@ -439,7 +459,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
setAfk(false);
if (broadcast && !isHidden())
{
- ess.broadcastMessage(this, Util.format("userIsNotAway", getDisplayName()));
+ ess.broadcastMessage(this, _("userIsNotAway", getDisplayName()));
}
}
lastActivity = System.currentTimeMillis();
@@ -451,7 +471,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
if (autoafkkick > 0 && lastActivity + autoafkkick * 1000 < System.currentTimeMillis()
&& !isHidden() && !isAuthorized("essentials.kick.exempt") && !isAuthorized("essentials.afk.kickexempt"))
{
- final String kickReason = Util.format("autoAfkKickReason", autoafkkick / 60.0);
+ final String kickReason = _("autoAfkKickReason", autoafkkick / 60.0);
kickPlayer(kickReason);
@@ -460,7 +480,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
final User user = ess.getUser(player);
if (user.isAuthorized("essentials.kick.notify"))
{
- player.sendMessage(Util.format("playerKicked", Console.NAME, getName(), kickReason));
+ player.sendMessage(_("playerKicked", Console.NAME, getName(), kickReason));
}
}
}
@@ -470,7 +490,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
setAfk(true);
if (!isHidden())
{
- ess.broadcastMessage(this, Util.format("userIsAway", getDisplayName()));
+ ess.broadcastMessage(this, _("userIsAway", getDisplayName()));
}
}
}
@@ -493,6 +513,27 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
@Override
public boolean isGodModeEnabled()
{
- return super.isGodModeEnabled() || (isAfk() && ess.getSettings().getFreezeAfkPlayers());
+ return (super.isGodModeEnabled() && !ess.getSettings().getNoGodWorlds().contains(getLocation().getWorld().getName()))
+ || (isAfk() && ess.getSettings().getFreezeAfkPlayers());
+ }
+
+ public boolean isGodModeEnabledRaw()
+ {
+ return super.isGodModeEnabled();
+ }
+
+ public String getGroup()
+ {
+ return ess.getPermissionsHandler().getGroup(base);
+ }
+
+ public boolean inGroup(final String group)
+ {
+ return ess.getPermissionsHandler().inGroup(base, group);
+ }
+
+ public boolean canBuild()
+ {
+ return ess.getPermissionsHandler().canBuild(base, getGroup());
}
}
diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java
index f0a461b70..d9dad769d 100644
--- a/Essentials/src/com/earth2me/essentials/UserData.java
+++ b/Essentials/src/com/earth2me/essentials/UserData.java
@@ -1,11 +1,7 @@
package com.earth2me.essentials;
-import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -15,12 +11,14 @@ import org.bukkit.inventory.ItemStack;
public abstract class UserData extends PlayerExtension implements IConf
{
+ protected final transient IEssentials ess;
private final EssentialsConf config;
private static final Logger logger = Logger.getLogger("Minecraft");
protected UserData(Player base, IEssentials ess)
{
- super(base, ess);
+ super(base);
+ this.ess = ess;
File folder = new File(ess.getDataFolder(), "userdata");
if (!folder.exists())
{
@@ -30,6 +28,7 @@ public abstract class UserData extends PlayerExtension implements IConf
reloadConfig();
}
+ @Override
public final void reloadConfig()
{
config.load();
@@ -52,6 +51,7 @@ public abstract class UserData extends PlayerExtension implements IConf
jailTimeout = _getJailTimeout();
lastLogin = _getLastLogin();
lastLogout = _getLastLogout();
+ lastLoginAddress = _getLastLoginAddress();
afk = getAfk();
newplayer = getNew();
geolocation = _getGeoLocation();
@@ -277,7 +277,7 @@ public abstract class UserData extends PlayerExtension implements IConf
public boolean hasPowerTools()
{
- return powertools.size() > 0;
+ return !powertools.isEmpty();
}
private Location lastLocation;
@@ -502,18 +502,18 @@ public abstract class UserData extends PlayerExtension implements IConf
public boolean isIgnoredPlayer(String name)
{
- return ignoredPlayers.contains(name.toLowerCase());
+ return ignoredPlayers.contains(name.toLowerCase(Locale.ENGLISH));
}
public void setIgnoredPlayer(String name, boolean set)
{
if (set)
{
- ignoredPlayers.add(name.toLowerCase());
+ ignoredPlayers.add(name.toLowerCase(Locale.ENGLISH));
}
else
{
- ignoredPlayers.remove(name.toLowerCase());
+ ignoredPlayers.remove(name.toLowerCase(Locale.ENGLISH));
}
setIgnoredPlayers(ignoredPlayers);
}
@@ -686,6 +686,24 @@ public abstract class UserData extends PlayerExtension implements IConf
config.setProperty("timestamps.logout", time);
config.save();
}
+ private String lastLoginAddress;
+
+ private String _getLastLoginAddress()
+ {
+ return config.getString("ipAddress", "");
+ }
+
+ public String getLastLoginAddress()
+ {
+ return lastLoginAddress;
+ }
+
+ public void setLastLoginAddress(String address)
+ {
+ lastLoginAddress = address;
+ config.setProperty("ipAddress", address);
+ config.save();
+ }
private boolean afk;
private boolean getAfk()
@@ -834,14 +852,19 @@ public abstract class UserData extends PlayerExtension implements IConf
public Long getKitTimestamp(final String name)
{
- final Number num = (Number)kitTimestamps.get(name.toLowerCase());
+ final Number num = (Number)kitTimestamps.get(name.toLowerCase(Locale.ENGLISH));
return num == null ? null : num.longValue();
}
public void setKitTimestamp(final String name, final long time)
{
- kitTimestamps.put(name.toLowerCase(), time);
+ kitTimestamps.put(name.toLowerCase(Locale.ENGLISH), time);
config.setProperty("timestamps.kits", kitTimestamps);
config.save();
}
+
+ public void save()
+ {
+ config.save();
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/UserMap.java b/Essentials/src/com/earth2me/essentials/UserMap.java
index 580b2aaf9..3de18080a 100644
--- a/Essentials/src/com/earth2me/essentials/UserMap.java
+++ b/Essentials/src/com/earth2me/essentials/UserMap.java
@@ -1,24 +1,28 @@
package com.earth2me.essentials;
-import com.google.common.base.Function;
-import com.google.common.collect.ComputationException;
-import com.google.common.collect.MapMaker;
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.collect.ConcurrentHashMultiset;
import java.io.File;
import java.util.HashSet;
+import java.util.Locale;
import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
-public class UserMap implements Function<String, User>, IConf
+public class UserMap extends CacheLoader<String, User> implements IConf
{
private final transient IEssentials ess;
- private final transient ConcurrentMap<String, User> users = new MapMaker().softValues().makeComputingMap(this);
+ private final transient Cache<String, User> users = CacheBuilder.newBuilder().softValues().build(this);
+ private final transient ConcurrentHashMultiset<String> keys = ConcurrentHashMultiset.create();
public UserMap(final IEssentials ess)
{
+ super();
this.ess = ess;
loadAllUsersAsync(ess);
}
@@ -35,6 +39,8 @@ public class UserMap implements Function<String, User>, IConf
{
return;
}
+ keys.clear();
+ users.invalidateAll();
for (String string : userdir.list())
{
if (!string.endsWith(".yml"))
@@ -42,18 +48,7 @@ public class UserMap implements Function<String, User>, IConf
continue;
}
final String name = string.substring(0, string.length() - 4);
- try
- {
- users.get(name.toLowerCase());
- }
- catch (NullPointerException ex)
- {
- // Ignore these
- }
- catch (ComputationException ex)
- {
- Bukkit.getLogger().log(Level.INFO, "Failed to preload user " + name, ex);
- }
+ keys.add(name.toLowerCase(Locale.ENGLISH));
}
}
});
@@ -61,21 +56,29 @@ public class UserMap implements Function<String, User>, IConf
public boolean userExists(final String name)
{
- return users.containsKey(name.toLowerCase());
+ return keys.contains(name.toLowerCase(Locale.ENGLISH));
}
public User getUser(final String name) throws NullPointerException
{
- return users.get(name.toLowerCase());
+ try
+ {
+ return users.get(name.toLowerCase(Locale.ENGLISH));
+ }
+ catch (ExecutionException ex)
+ {
+ throw new NullPointerException();
+ }
}
@Override
- public User apply(final String name)
+ public User load(final String name) throws Exception
{
for (Player player : ess.getServer().getOnlinePlayers())
{
if (player.getName().equalsIgnoreCase(name))
{
+ keys.add(name.toLowerCase(Locale.ENGLISH));
return new User(player, ess);
}
}
@@ -83,37 +86,43 @@ public class UserMap implements Function<String, User>, IConf
final File userFile = new File(userFolder, Util.sanitizeFileName(name) + ".yml");
if (userFile.exists())
{
+ keys.add(name.toLowerCase(Locale.ENGLISH));
return new User(new OfflinePlayer(name, ess), ess);
}
- return null;
+ throw new Exception("User not found!");
}
@Override
public void reloadConfig()
{
- for (User user : users.values())
- {
- user.reloadConfig();
- }
+ loadAllUsersAsync(ess);
}
public void removeUser(final String name)
{
- users.remove(name.toLowerCase());
+ keys.remove(name.toLowerCase(Locale.ENGLISH));
+ users.invalidate(name.toLowerCase(Locale.ENGLISH));
}
public Set<User> getAllUsers()
{
final Set<User> userSet = new HashSet<User>();
- for (String name : users.keySet())
+ for (String name : keys)
{
- userSet.add(users.get(name));
+ try
+ {
+ userSet.add(users.get(name));
+ }
+ catch (ExecutionException ex)
+ {
+ Bukkit.getLogger().log(Level.INFO, "Failed to load user " + name, ex);
+ }
}
return userSet;
}
public int getUniqueUsers()
{
- return users.size();
+ return keys.size();
}
}
diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java
index c1b0ed7bf..f73c4daa8 100644
--- a/Essentials/src/com/earth2me/essentials/Util.java
+++ b/Essentials/src/com/earth2me/essentials/Util.java
@@ -1,26 +1,9 @@
package com.earth2me.essentials;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
+import static com.earth2me.essentials.I18n._;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
-import java.text.MessageFormat;
-import java.util.Calendar;
-import java.util.Enumeration;
-import java.util.GregorianCalendar;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.Set;
-import java.util.logging.Level;
+import java.util.*;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -28,6 +11,7 @@ import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
+import org.bukkit.entity.LivingEntity;
public class Util
@@ -39,7 +23,7 @@ public class Util
public static String sanitizeFileName(String name)
{
- return name.toLowerCase().replaceAll("[^a-z0-9]", "_");
+ return name.toLowerCase(Locale.ENGLISH).replaceAll("[^a-z0-9]", "_");
}
public static String formatDateDiff(long date)
@@ -55,7 +39,7 @@ public class Util
boolean future = false;
if (toDate.equals(fromDate))
{
- return Util.i18n("now");
+ return _("now");
}
if (toDate.after(fromDate))
{
@@ -74,18 +58,18 @@ public class Util
};
String[] names = new String[]
{
- Util.i18n("year"),
- Util.i18n("years"),
- Util.i18n("month"),
- Util.i18n("months"),
- Util.i18n("day"),
- Util.i18n("days"),
- Util.i18n("hour"),
- Util.i18n("hours"),
- Util.i18n("minute"),
- Util.i18n("minutes"),
- Util.i18n("second"),
- Util.i18n("seconds")
+ _("year"),
+ _("years"),
+ _("month"),
+ _("months"),
+ _("day"),
+ _("days"),
+ _("hour"),
+ _("hours"),
+ _("minute"),
+ _("minutes"),
+ _("second"),
+ _("seconds")
};
for (int i = 0; i < types.length; i++)
{
@@ -185,7 +169,7 @@ public class Util
}
if (!found)
{
- throw new Exception(Util.i18n("illegalDate"));
+ throw new Exception(_("illegalDate"));
}
Calendar c = new GregorianCalendar();
if (years > 0)
@@ -218,11 +202,12 @@ public class Util
}
return c.getTimeInMillis();
}
-
// The player can stand inside these materials
private static final Set<Integer> AIR_MATERIALS = new HashSet<Integer>();
-
- static {
+ private static final HashSet<Byte> AIR_MATERIALS_TARGET = new HashSet<Byte>();
+
+ static
+ {
AIR_MATERIALS.add(Material.AIR.getId());
AIR_MATERIALS.add(Material.SAPLING.getId());
AIR_MATERIALS.add(Material.POWERED_RAIL.getId());
@@ -232,7 +217,7 @@ public class Util
AIR_MATERIALS.add(Material.YELLOW_FLOWER.getId());
AIR_MATERIALS.add(Material.RED_ROSE.getId());
AIR_MATERIALS.add(Material.BROWN_MUSHROOM.getId());
- AIR_MATERIALS.add(Material.RED_MUSHROOM.getId());
+ AIR_MATERIALS.add(Material.RED_MUSHROOM.getId());
AIR_MATERIALS.add(Material.TORCH.getId());
AIR_MATERIALS.add(Material.REDSTONE_WIRE.getId());
AIR_MATERIALS.add(Material.SEEDS.getId());
@@ -244,32 +229,48 @@ public class Util
AIR_MATERIALS.add(Material.LEVER.getId());
AIR_MATERIALS.add(Material.STONE_PLATE.getId());
AIR_MATERIALS.add(Material.IRON_DOOR_BLOCK.getId());
- AIR_MATERIALS.add(Material.WOOD_PLATE.getId());
+ AIR_MATERIALS.add(Material.WOOD_PLATE.getId());
AIR_MATERIALS.add(Material.REDSTONE_TORCH_OFF.getId());
AIR_MATERIALS.add(Material.REDSTONE_TORCH_ON.getId());
AIR_MATERIALS.add(Material.STONE_BUTTON.getId());
- AIR_MATERIALS.add(Material.SUGAR_CANE_BLOCK.getId());
+ AIR_MATERIALS.add(Material.SUGAR_CANE_BLOCK.getId());
AIR_MATERIALS.add(Material.DIODE_BLOCK_OFF.getId());
- AIR_MATERIALS.add(Material.DIODE_BLOCK_ON.getId());
+ AIR_MATERIALS.add(Material.DIODE_BLOCK_ON.getId());
AIR_MATERIALS.add(Material.TRAP_DOOR.getId());
AIR_MATERIALS.add(Material.PUMPKIN_STEM.getId());
AIR_MATERIALS.add(Material.MELON_STEM.getId());
AIR_MATERIALS.add(Material.VINE.getId());
//TODO: Add 1.9 materials
-
+
+ for (Integer integer : AIR_MATERIALS)
+ {
+ AIR_MATERIALS_TARGET.add(integer.byteValue());
+ }
+ AIR_MATERIALS_TARGET.add((byte)Material.WATER.getId());
+ AIR_MATERIALS_TARGET.add((byte)Material.STATIONARY_WATER.getId());
+ }
+
+ public static Location getTarget(final LivingEntity entity) throws Exception
+ {
+ final Block block = entity.getTargetBlock(AIR_MATERIALS_TARGET, 300);
+ if (block == null)
+ {
+ throw new Exception("Not targeting a block");
+ }
+ return block.getLocation();
}
-
+
public static Location getSafeDestination(final Location loc) throws Exception
{
if (loc == null || loc.getWorld() == null)
{
- throw new Exception(Util.i18n("destinationNotSet"));
+ throw new Exception(_("destinationNotSet"));
}
final World world = loc.getWorld();
int x = loc.getBlockX();
int y = (int)Math.round(loc.getY());
int z = loc.getBlockZ();
-
+
while (isBlockAboveAir(world, x, y, z))
{
y -= 1;
@@ -297,7 +298,7 @@ public class Util
x += 1;
if (x - 32 > loc.getBlockX())
{
- throw new Exception(Util.i18n("holeInFloor"));
+ throw new Exception(_("holeInFloor"));
}
}
}
@@ -346,175 +347,24 @@ public class Util
return Math.round(d * 100.0) / 100.0;
}
- public static Locale getCurrentLocale()
- {
- return currentLocale;
- }
-
-
- private static class ConfigClassLoader extends ClassLoader
- {
- private final transient File dataFolder;
- private final transient ClassLoader cl;
- private final transient IEssentials ess;
-
- public ConfigClassLoader(final ClassLoader cl, final IEssentials ess)
- {
- this.ess = ess;
- this.dataFolder = ess.getDataFolder();
- this.cl = cl;
- }
-
- @Override
- public URL getResource(final String string)
- {
- final File file = new File(dataFolder, string);
- if (file.exists())
- {
- try
- {
- return file.toURI().toURL();
- }
- catch (MalformedURLException ex)
- {
- return cl.getResource(string);
- }
- }
- return cl.getResource(string);
- }
-
- @Override
- public synchronized void clearAssertionStatus()
- {
- cl.clearAssertionStatus();
- }
-
- @Override
- public InputStream getResourceAsStream(final String string)
- {
- final File file = new File(dataFolder, string);
- if (file.exists())
- {
- BufferedReader br = null;
- try
- {
- br = new BufferedReader(new FileReader(file));
- final String version = br.readLine();
-
- if (version == null || !version.equals("#version: " + ess.getDescription().getVersion()))
- {
- logger.log(Level.WARNING, String.format("Translation file %s is not updated for Essentials version. Will use default.", file));
- return cl.getResourceAsStream(string);
- }
- return new FileInputStream(file);
- }
- catch (IOException ex)
- {
- return cl.getResourceAsStream(string);
- }
- finally
- {
- if (br != null)
- {
- try
- {
- br.close();
- }
- catch (IOException ex)
- {
- }
- }
- }
- }
- return cl.getResourceAsStream(string);
- }
-
- @Override
- public Enumeration<URL> getResources(final String string) throws IOException
- {
- return cl.getResources(string);
- }
-
- @Override
- public Class<?> loadClass(final String string) throws ClassNotFoundException
- {
- return cl.loadClass(string);
- }
-
- @Override
- public synchronized void setClassAssertionStatus(final String string, final boolean bln)
- {
- cl.setClassAssertionStatus(string, bln);
- }
-
- @Override
- public synchronized void setDefaultAssertionStatus(final boolean bln)
- {
- cl.setDefaultAssertionStatus(bln);
- }
-
- @Override
- public synchronized void setPackageAssertionStatus(final String string, final boolean bln)
- {
- cl.setPackageAssertionStatus(string, bln);
- }
- }
- private static final Locale defaultLocale = Locale.getDefault();
- private static Locale currentLocale = defaultLocale;
- private static ResourceBundle bundle = ResourceBundle.getBundle("messages", defaultLocale);
- private static ResourceBundle defaultBundle = ResourceBundle.getBundle("messages", Locale.US);
-
- public static String i18n(String string)
+ public static boolean isInt(final String sInt)
{
try
{
- return bundle.getString(string);
+ Integer.parseInt(sInt);
}
- catch (MissingResourceException ex)
+ catch (NumberFormatException e)
{
- logger.log(Level.WARNING, String.format("Missing translation key \"%s\" in translation file %s", ex.getKey(), bundle.getLocale().toString()), ex);
- return defaultBundle.getString(string);
- }
- }
-
- public static String format(String string, Object... objects)
- {
- MessageFormat mf = new MessageFormat(i18n(string));
- return mf.format(objects);
- }
-
- public static void updateLocale(String loc, IEssentials ess)
- {
- if (loc == null || loc.isEmpty())
- {
- return;
- }
- String[] parts = loc.split("[_\\.]");
- if (parts.length == 1)
- {
- currentLocale = new Locale(parts[0]);
- }
- if (parts.length == 2)
- {
- currentLocale = new Locale(parts[0], parts[1]);
- }
- if (parts.length == 3)
- {
- currentLocale = new Locale(parts[0], parts[1], parts[2]);
- }
- logger.log(Level.INFO, String.format("Using locale %s", currentLocale.toString()));
- bundle = ResourceBundle.getBundle("messages", currentLocale, new ConfigClassLoader(Util.class.getClassLoader(), ess));
- if (!bundle.keySet().containsAll(defaultBundle.keySet()))
- {
- logger.log(Level.WARNING, String.format("Translation file %s does not contain all translation keys.", currentLocale.toString()));
+ return false;
}
+ return true;
}
public static String joinList(Object... list)
{
return joinList(", ", list);
}
-
+
public static String joinList(String seperator, Object... list)
{
StringBuilder buf = new StringBuilder();
@@ -524,14 +374,14 @@ public class Util
{
buf.append(seperator);
}
-
- if(each instanceof List)
+
+ if (each instanceof List)
{
buf.append(joinList(seperator, ((List)each).toArray()));
}
else
{
- try
+ try
{
buf.append(each.toString());
}
@@ -543,9 +393,4 @@ public class Util
}
return buf.toString();
}
-
- public static String capitalCase(String s)
- {
- return s.toUpperCase().charAt(0) + s.toLowerCase().substring(1);
- }
}
diff --git a/Essentials/src/com/earth2me/essentials/Warps.java b/Essentials/src/com/earth2me/essentials/Warps.java
index adf665f2a..57326b54a 100644
--- a/Essentials/src/com/earth2me/essentials/Warps.java
+++ b/Essentials/src/com/earth2me/essentials/Warps.java
@@ -1,12 +1,8 @@
package com.earth2me.essentials;
+import static com.earth2me.essentials.I18n._;
import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
@@ -52,7 +48,7 @@ public class Warps implements IConf
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(warp));
if (conf == null)
{
- throw new Exception(Util.i18n("warpNotExist"));
+ throw new Exception(_("warpNotExist"));
}
return conf.getLocation(null, server);
}
@@ -66,7 +62,7 @@ public class Warps implements IConf
File confFile = new File(warpsFolder, filename + ".yml");
if (confFile.exists())
{
- throw new Exception(Util.i18n("similarWarpExist"));
+ throw new Exception(_("similarWarpExist"));
}
conf = new EssentialsConf(confFile);
warpPoints.put(new StringIgnoreCase(name), conf);
@@ -81,15 +77,16 @@ public class Warps implements IConf
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name));
if (conf == null)
{
- throw new Exception(Util.i18n("warpNotExist"));
+ throw new Exception(_("warpNotExist"));
}
if (!conf.getFile().delete())
{
- throw new Exception(Util.i18n("warpDeleteError"));
+ throw new Exception(_("warpDeleteError"));
}
warpPoints.remove(new StringIgnoreCase(name));
}
+ @Override
public final void reloadConfig()
{
warpPoints.clear();
@@ -113,7 +110,7 @@ public class Warps implements IConf
}
catch (Exception ex)
{
- logger.log(Level.WARNING, Util.format("loadWarpError", filename), ex);
+ logger.log(Level.WARNING, _("loadWarpError", filename), ex);
}
}
}
@@ -133,7 +130,7 @@ public class Warps implements IConf
@Override
public int hashCode()
{
- return getString().toLowerCase().hashCode();
+ return getString().toLowerCase(Locale.ENGLISH).hashCode();
}
@Override
diff --git a/Essentials/src/com/earth2me/essentials/Worth.java b/Essentials/src/com/earth2me/essentials/Worth.java
index fd1426f10..b597bd3e8 100644
--- a/Essentials/src/com/earth2me/essentials/Worth.java
+++ b/Essentials/src/com/earth2me/essentials/Worth.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials;
import java.io.File;
+import java.util.Locale;
import java.util.logging.Logger;
import org.bukkit.inventory.ItemStack;
@@ -19,7 +20,7 @@ public class Worth implements IConf
public double getPrice(ItemStack itemStack)
{
- String itemname = itemStack.getType().toString().toLowerCase().replace("_", "");
+ String itemname = itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
double result;
result = config.getDouble("worth." + itemname + "." + itemStack.getDurability(), Double.NaN);
if (Double.isNaN(result))
@@ -41,17 +42,18 @@ public class Worth implements IConf
{
if (itemStack.getType().getData() == null)
{
- config.setProperty("worth." + itemStack.getType().toString().toLowerCase().replace("_", ""), price);
+ config.setProperty("worth." + itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), price);
}
else
{
// Bukkit-bug: getDurability still contains the correct value, while getData().getData() is 0.
- config.setProperty("worth." + itemStack.getType().toString().toLowerCase().replace("_", "") + "." + itemStack.getDurability(), price);
+ config.setProperty("worth." + itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "") + "." + itemStack.getDurability(), price);
}
config.removeProperty("worth-" + itemStack.getTypeId());
config.save();
}
+ @Override
public void reloadConfig()
{
config.load();
diff --git a/Essentials/src/com/earth2me/essentials/api/Economy.java b/Essentials/src/com/earth2me/essentials/api/Economy.java
index b0a267345..1d45c8df9 100644
--- a/Essentials/src/com/earth2me/essentials/api/Economy.java
+++ b/Essentials/src/com/earth2me/essentials/api/Economy.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.EssentialsConf;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -59,7 +60,7 @@ public final class Economy
{
if (!config.delete())
{
- logger.log(Level.WARNING, Util.format("deleteFileError", config));
+ logger.log(Level.WARNING, _("deleteFileError", config));
}
ess.getUserMap().removeUser(name);
}
diff --git a/Essentials/src/com/earth2me/essentials/api/NoLoanPermittedException.java b/Essentials/src/com/earth2me/essentials/api/NoLoanPermittedException.java
index 8bead2076..f21bf98cc 100644
--- a/Essentials/src/com/earth2me/essentials/api/NoLoanPermittedException.java
+++ b/Essentials/src/com/earth2me/essentials/api/NoLoanPermittedException.java
@@ -1,13 +1,12 @@
package com.earth2me.essentials.api;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
+
public class NoLoanPermittedException extends Exception
{
-
public NoLoanPermittedException()
{
- super(Util.i18n("negativeBalanceError"));
+ super(_("negativeBalanceError"));
}
-
}
diff --git a/Essentials/src/com/earth2me/essentials/api/UserDoesNotExistException.java b/Essentials/src/com/earth2me/essentials/api/UserDoesNotExistException.java
index f48bd0856..531d9ead6 100644
--- a/Essentials/src/com/earth2me/essentials/api/UserDoesNotExistException.java
+++ b/Essentials/src/com/earth2me/essentials/api/UserDoesNotExistException.java
@@ -1,13 +1,12 @@
package com.earth2me.essentials.api;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
+
public class UserDoesNotExistException extends Exception
{
-
public UserDoesNotExistException(String name)
{
- super(Util.format("userDoesNotExist", name));
+ super(_("userDoesNotExist", name));
}
-
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
index 8bf70873d..a1c83606c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandafk extends EssentialsCommand
@@ -29,23 +29,23 @@ public class Commandafk extends EssentialsCommand
}
}
- private final void toggleAfk(User user)
+ private void toggleAfk(User user)
{
if (!user.toggleAfk())
{
- //user.sendMessage(Util.i18n("markedAsNotAway"));
+ //user.sendMessage(_("markedAsNotAway"));
if (!user.isHidden())
{
- ess.broadcastMessage(user, Util.format("userIsNotAway", user.getDisplayName()));
+ ess.broadcastMessage(user, _("userIsNotAway", user.getDisplayName()));
}
user.updateActivity(false);
}
else
{
- //user.sendMessage(Util.i18n("markedAsAway"));
+ //user.sendMessage(_("markedAsAway"));
if (!user.isHidden())
{
- ess.broadcastMessage(user, Util.format("userIsAway", user.getDisplayName()));
+ ess.broadcastMessage(user, _("userIsAway", user.getDisplayName()));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java
index 5bfdd3835..54277d466 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import org.bukkit.Location;
import org.bukkit.Server;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.TargetBlock;
import org.bukkit.entity.TNTPrimed;
@@ -20,7 +20,7 @@ public class Commandantioch extends EssentialsCommand
ess.broadcastMessage(user, "...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,");
ess.broadcastMessage(user, "who being naughty in My sight, shall snuff it.");
- final Location loc = new TargetBlock(user).getTargetBlock().getLocation();
+ final Location loc = Util.getTarget(user);
loc.getWorld().spawn(loc, TNTPrimed.class);
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandback.java b/Essentials/src/com/earth2me/essentials/commands/Commandback.java
index 26456a5d7..67698598a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandback.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandback.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
@@ -14,11 +14,11 @@ public class Commandback extends EssentialsCommand
}
@Override
- protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- Trade charge = new Trade(this.getName(), ess);
+ final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
- user.sendMessage(Util.i18n("backUsageMsg"));
+ user.sendMessage(_("backUsageMsg"));
user.getTeleport().back(charge);
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java b/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java
index 6bbf8361c..32c8c9e80 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Backup;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -14,14 +14,14 @@ public class Commandbackup extends EssentialsCommand
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
- Backup backup = ess.getBackup();
+ final Backup backup = ess.getBackup();
if (backup == null)
{
throw new Exception();
}
backup.run();
- sender.sendMessage(Util.i18n("backupStarted"));
+ sender.sendMessage(_("backupStarted"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java
index d26df68cb..58f164ad6 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java
@@ -1,8 +1,9 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -14,23 +15,23 @@ public class Commandbalance extends EssentialsCommand
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- sender.sendMessage(Util.format("balance", Util.formatCurrency(getPlayer(server, args, 0, true).getMoney(), ess)));
+ sender.sendMessage(_("balance", Util.formatCurrency(getPlayer(server, args, 0, true).getMoney(), ess)));
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- double bal = (args.length < 1
- || !(user.isAuthorized("essentials.balance.others")
- || user.isAuthorized("essentials.balance.other"))
- ? user
- : getPlayer(server, args, 0, true)).getMoney();
- user.sendMessage(Util.format("balance", Util.formatCurrency(bal, ess)));
+ final double bal = (args.length < 1
+ || !(user.isAuthorized("essentials.balance.others")
+ || user.isAuthorized("essentials.balance.other"))
+ ? user
+ : getPlayer(server, args, 0, true)).getMoney();
+ user.sendMessage(_("balance", Util.formatCurrency(bal, ess)));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java
index a162ea73f..838e27628 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java
@@ -1,15 +1,11 @@
package com.earth2me.essentials.commands;
-import java.util.Map.Entry;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.Map.Entry;
+import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -21,7 +17,7 @@ public class Commandbalancetop extends EssentialsCommand
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
int max = 10;
if (args.length > 0)
@@ -47,13 +43,14 @@ public class Commandbalancetop extends EssentialsCommand
final List<Map.Entry<User, Double>> sortedEntries = new ArrayList<Map.Entry<User, Double>>(balances.entrySet());
Collections.sort(sortedEntries, new Comparator<Map.Entry<User, Double>>()
{
+ @Override
public int compare(final Entry<User, Double> entry1, final Entry<User, Double> entry2)
{
return -entry1.getValue().compareTo(entry2.getValue());
}
});
int count = 0;
- sender.sendMessage(Util.format("balanceTop", max));
+ sender.sendMessage(_("balanceTop", max));
for (Map.Entry<User, Double> entry : sortedEntries)
{
if (count == max)
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandban.java b/Essentials/src/com/earth2me/essentials/commands/Commandban.java
index a4a5e2839..d39419686 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandban.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandban.java
@@ -1,11 +1,11 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.OfflinePlayer;
+import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.entity.Player;
@@ -23,21 +23,21 @@ public class Commandban extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- final User player = getPlayer(server, args, 0, true);
- if (player.getBase() instanceof OfflinePlayer)
+ final User user = getPlayer(server, args, 0, true);
+ if (user.getBase() instanceof OfflinePlayer)
{
if (sender instanceof Player
&& !ess.getUser(sender).isAuthorized("essentials.ban.offline"))
{
- sender.sendMessage(Util.i18n("banExempt"));
+ sender.sendMessage(_("banExempt"));
return;
}
}
else
{
- if (player.isAuthorized("essentials.ban.exempt"))
+ if (user.isAuthorized("essentials.ban.exempt"))
{
- sender.sendMessage(Util.i18n("banExempt"));
+ sender.sendMessage(_("banExempt"));
return;
}
}
@@ -46,22 +46,22 @@ public class Commandban extends EssentialsCommand
if (args.length > 1)
{
banReason = getFinalArg(args, 1);
- player.setBanReason(banReason);
+ user.setBanReason(banReason);
}
else
{
- banReason = Util.i18n("defaultBanReason");
+ banReason = _("defaultBanReason");
}
- player.setBanned(true);
- player.kickPlayer(banReason);
- String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
-
- for(Player p : server.getOnlinePlayers())
+ user.setBanned(true);
+ user.kickPlayer(banReason);
+ final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
+
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- User u = ess.getUser(p);
- if(u.isAuthorized("essentials.ban.notify"))
+ final User player = ess.getUser(onlinePlayer);
+ if (player.isAuthorized("essentials.ban.notify"))
{
- p.sendMessage(Util.format("playerBanned", senderName, player.getName(), banReason));
+ onlinePlayer.sendMessage(_("playerBanned", senderName, user.getName(), banReason));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java b/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java
index 591542bcb..5459bd8fc 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -21,17 +21,22 @@ public class Commandbanip extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- final User u = ess.getUser(args[0]);
+ final User player = ess.getUser(args[0]);
- if (u == null)
+ if (player == null)
{
ess.getServer().banIP(args[0]);
- sender.sendMessage(Util.i18n("banIpAddress"));
+ sender.sendMessage(_("banIpAddress"));
}
else
{
- ess.getServer().banIP(u.getAddress().getAddress().getHostAddress());
- sender.sendMessage(Util.i18n("banIpAddress"));
+ final String ipAddress = player.getLastLoginAddress();
+ if (ipAddress.length() == 0)
+ {
+ throw new Exception(_("playerNotFound"));
+ }
+ ess.getServer().banIP(player.getLastLoginAddress());
+ sender.sendMessage(_("banIpAddress"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java
index ded3ffdaf..78d557934 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java
@@ -1,11 +1,11 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.TargetBlock;
-import org.bukkit.Server;
-import org.bukkit.TreeType;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Location;
+import org.bukkit.Server;
+import org.bukkit.TreeType;
public class Commandbigtree extends EssentialsCommand
@@ -16,7 +16,7 @@ public class Commandbigtree extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
TreeType tree;
if (args.length > 0 && args[0].equalsIgnoreCase("redwood"))
@@ -32,20 +32,16 @@ public class Commandbigtree extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- final int[] ignore =
- {
- 8, 9
- };
- final Location loc = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock().getLocation();
+ final Location loc = Util.getTarget(user);
final Location safeLocation = Util.getSafeDestination(loc);
- final boolean success = user.getWorld().generateTree(safeLocation, (TreeType)tree);
+ final boolean success = user.getWorld().generateTree(safeLocation, tree);
if (success)
{
- user.sendMessage(Util.i18n("bigTreeSuccess"));
+ user.sendMessage(_("bigTreeSuccess"));
}
else
{
- throw new Exception(Util.i18n("bigTreeFailure"));
+ throw new Exception(_("bigTreeFailure"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java b/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java
index 9b92434a4..95bb967c6 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java
@@ -1,9 +1,8 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
-import org.bukkit.entity.Player;
public class Commandbroadcast extends EssentialsCommand
@@ -21,7 +20,6 @@ public class Commandbroadcast extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- ess.broadcastMessage(null,
- Util.format("broadcast", getFinalArg(args, 0)));
+ ess.broadcastMessage(null, _("broadcast", getFinalArg(args, 0)));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandburn.java b/Essentials/src/com/earth2me/essentials/commands/Commandburn.java
index 5df3cb5d8..5d8d38ce7 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandburn.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandburn.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -14,7 +14,7 @@ public class Commandburn extends EssentialsCommand
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
@@ -24,7 +24,7 @@ public class Commandburn extends EssentialsCommand
for (Player p : server.matchPlayer(args[0]))
{
p.setFireTicks(Integer.parseInt(args[1]) * 20);
- sender.sendMessage(Util.format("burnMsg", p.getDisplayName(), Integer.parseInt(args[1])));
+ sender.sendMessage(_("burnMsg", p.getDisplayName(), Integer.parseInt(args[1])));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
index 447689691..ef2502b9b 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
@@ -1,11 +1,11 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
+import java.util.List;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.util.List;
public class Commandclearinventory extends EssentialsCommand
@@ -15,6 +15,7 @@ public class Commandclearinventory extends EssentialsCommand
super("clearinventory");
}
+ //TODO: Cleanup
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
@@ -30,11 +31,11 @@ public class Commandclearinventory extends EssentialsCommand
for (Player p : online)
{
p.getInventory().clear();
- user.sendMessage(Util.format("inventoryClearedOthers", p.getDisplayName()));
+ user.sendMessage(_("inventoryClearedOthers", p.getDisplayName()));
}
return;
}
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
else
{
@@ -42,18 +43,18 @@ public class Commandclearinventory extends EssentialsCommand
if (p != null)
{
p.getInventory().clear();
- user.sendMessage(Util.format("inventoryClearedOthers", p.getDisplayName()));
+ user.sendMessage(_("inventoryClearedOthers", p.getDisplayName()));
}
else
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
}
}
else
{
user.getInventory().clear();
- user.sendMessage(Util.i18n("inventoryCleared"));
+ user.sendMessage(_("inventoryCleared"));
}
}
@@ -74,11 +75,11 @@ public class Commandclearinventory extends EssentialsCommand
for (Player p : online)
{
p.getInventory().clear();
- sender.sendMessage(Util.format("inventoryClearedOthers", p.getDisplayName()));
+ sender.sendMessage(_("inventoryClearedOthers", p.getDisplayName()));
}
return;
}
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
else
{
@@ -86,11 +87,11 @@ public class Commandclearinventory extends EssentialsCommand
if (u != null)
{
u.getInventory().clear();
- sender.sendMessage(Util.format("inventoryClearedOthers", u.getDisplayName()));
+ sender.sendMessage(_("inventoryClearedOthers", u.getDisplayName()));
}
else
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandcompass.java b/Essentials/src/com/earth2me/essentials/commands/Commandcompass.java
index eae10f0a5..25f8c34f6 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandcompass.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandcompass.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandcompass extends EssentialsCommand
@@ -13,39 +13,39 @@ public class Commandcompass extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- int r = (int)(user.getLocation().getYaw() + 180 + 360) % 360;
+ final int bearing = (int)(user.getLocation().getYaw() + 180 + 360) % 360;
String dir;
- if (r < 23)
+ if (bearing < 23)
{
dir = "N";
}
- else if (r < 68)
+ else if (bearing < 68)
{
dir = "NE";
}
- else if (r < 113)
+ else if (bearing < 113)
{
dir = "E";
}
- else if (r < 158)
+ else if (bearing < 158)
{
dir = "SE";
}
- else if (r < 203)
+ else if (bearing < 203)
{
dir = "S";
}
- else if (r < 248)
+ else if (bearing < 248)
{
dir = "SW";
}
- else if (r < 293)
+ else if (bearing < 293)
{
dir = "W";
}
- else if (r < 338)
+ else if (bearing < 338)
{
dir = "NW";
}
@@ -53,6 +53,6 @@ public class Commandcompass extends EssentialsCommand
{
dir = "N";
}
- user.sendMessage(Util.format("compassBearing", dir, r));
+ user.sendMessage(_("compassBearing", dir, bearing));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java b/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java
index 1d80b6a17..0e8918d9e 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java
@@ -1,9 +1,10 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
+import java.util.Locale;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
-import com.earth2me.essentials.Util;
public class Commanddelhome extends EssentialsCommand
@@ -14,25 +15,21 @@ public class Commanddelhome extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
//Allowing both formats /delhome khobbits house | /delhome khobbits:house
- final String[] nameParts = args[0].split(":");
- if (nameParts[0].length() != args[0].length())
- {
- args = nameParts;
- }
+ final String[] expandedArgs = args[0].split(":");
User user = ess.getUser(sender);
String name;
- if (args.length < 1)
+ if (expandedArgs.length < 1)
{
throw new NotEnoughArgumentsException();
}
- else if (args.length > 1 && (user == null || user.isAuthorized("essentials.delhome.others")))
+ else if (expandedArgs.length > 1 && (user == null || user.isAuthorized("essentials.delhome.others")))
{
- user = getPlayer(server, args, 0, true);
- name = args[1];
+ user = getPlayer(server, expandedArgs, 0, true);
+ name = expandedArgs[1];
}
else
{
@@ -40,9 +37,9 @@ public class Commanddelhome extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- name = args[0];
+ name = expandedArgs[0];
}
- user.delHome(name.toLowerCase());
- sender.sendMessage(Util.format("deleteHome", name));
+ user.delHome(name.toLowerCase(Locale.ENGLISH));
+ sender.sendMessage(_("deleteHome", name));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanddeljail.java b/Essentials/src/com/earth2me/essentials/commands/Commanddeljail.java
index 23ec04c4e..5b8e5d720 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commanddeljail.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commanddeljail.java
@@ -1,22 +1,25 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
-public class Commanddeljail extends EssentialsCommand {
- public Commanddeljail() {
+public class Commanddeljail extends EssentialsCommand
+{
+ public Commanddeljail()
+ {
super("deljail");
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception {
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
+ {
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
ess.getJail().delJail(args[0]);
- sender.sendMessage(Util.format("deleteJail", args[0]));
+ sender.sendMessage(_("deleteJail", args[0]));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanddelwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commanddelwarp.java
index 7c2795dda..5eab72b33 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commanddelwarp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commanddelwarp.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
-import com.earth2me.essentials.Util;
public class Commanddelwarp extends EssentialsCommand
@@ -13,13 +13,13 @@ public class Commanddelwarp extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
ess.getWarps().delWarp(args[0]);
- sender.sendMessage(Util.format("deleteWarp", args[0]));
+ sender.sendMessage(_("deleteWarp", args[0]));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java b/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java
index 5ceb62591..6c4fa2647 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commanddepth extends EssentialsCommand
@@ -13,20 +13,20 @@ public class Commanddepth extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- int y = user.getLocation().getBlockY() - 63;
- if (y > 0)
+ final int depth = user.getLocation().getBlockY() - 63;
+ if (depth > 0)
{
- user.sendMessage(Util.format("depthAboveSea", y));
+ user.sendMessage(_("depthAboveSea", depth));
}
- else if (y < 0)
+ else if (depth < 0)
{
- user.sendMessage(Util.format("depthBelowSea", (-y)));
+ user.sendMessage(_("depthBelowSea", (-depth)));
}
else
{
- user.sendMessage(Util.i18n("depth"));
+ user.sendMessage(_("depth"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
index 2aa883bbf..f4a653ce3 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import com.earth2me.essentials.User;
public class Commandeco extends EssentialsCommand
@@ -14,7 +14,7 @@ public class Commandeco extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
@@ -34,45 +34,46 @@ public class Commandeco extends EssentialsCommand
if (args[1].contentEquals("*"))
{
- for (Player p : server.getOnlinePlayers())
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- User u = ess.getUser(p);
+ final User player = ess.getUser(onlinePlayer);
switch (cmd)
{
case GIVE:
- u.giveMoney(amount);
+ player.giveMoney(amount);
break;
case TAKE:
- u.takeMoney(amount);
+ player.takeMoney(amount);
break;
case RESET:
- u.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
+ player.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
break;
}
}
}
else
{
- User u = getPlayer(server, args, 1, true);
+ final User player = getPlayer(server, args, 1, true);
switch (cmd)
{
case GIVE:
- u.giveMoney(amount, sender);
+ player.giveMoney(amount, sender);
break;
case TAKE:
- u.takeMoney(amount, sender);
+ player.takeMoney(amount, sender);
break;
case RESET:
- u.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
+ player.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
break;
}
}
}
+
private enum EcoCommands
{
GIVE, TAKE, RESET
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
index 328a4a8b5..cc541299d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.Location;
@@ -23,6 +23,12 @@ public class Commandessentials extends EssentialsCommand
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
+ if (args.length > 0 && args[0].equalsIgnoreCase("debug"))
+ {
+ ess.getSettings().setDebug(!ess.getSettings().isDebug());
+ sender.sendMessage("Essentials " + ess.getDescription().getVersion() + " debug mode " + (ess.getSettings().isDebug() ? "enabled" : "disabled"));
+ return;
+ }
final Map<String, Byte> noteMap = new HashMap<String, Byte>();
noteMap.put("1F#", (byte)0x0);
noteMap.put("1G", (byte)0x1);
@@ -74,6 +80,7 @@ public class Commandessentials extends EssentialsCommand
{
int i = 0;
+ @Override
public void run()
{
final String note = tune[i];
@@ -87,21 +94,21 @@ public class Commandessentials extends EssentialsCommand
return;
}
Map<Player, Block> noteBlocks = Commandessentials.this.noteBlocks;
- for (Player player : server.getOnlinePlayers())
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- Block block = noteBlocks.get(player);
+ final Block block = noteBlocks.get(onlinePlayer);
if (block == null || block.getType() != Material.NOTE_BLOCK)
{
continue;
}
- player.playNote(block.getLocation(), (byte)0, noteMap.get(note));
+ onlinePlayer.playNote(block.getLocation(), (byte)0, noteMap.get(note));
}
}
}, 20, 2);
return;
}
ess.reload();
- sender.sendMessage(Util.format("essentialsReload", ess.getDescription().getVersion()));
+ sender.sendMessage(_("essentialsReload", ess.getDescription().getVersion()));
}
private void stopTune()
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandext.java b/Essentials/src/com/earth2me/essentials/commands/Commandext.java
index afb9fa3a6..3855e7b68 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandext.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandext.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -15,7 +15,7 @@ public class Commandext extends EssentialsCommand
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -26,24 +26,24 @@ public class Commandext extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
user.setFireTicks(0);
- user.sendMessage(Util.i18n("extinguish"));
+ user.sendMessage(_("extinguish"));
return;
}
extinguishPlayers(server, user, commandLabel);
}
- private void extinguishPlayers(Server server, CommandSender sender, String name) throws Exception
+ private void extinguishPlayers(final Server server, final CommandSender sender, final String name) throws Exception
{
- for (Player p : server.matchPlayer(name))
+ for (Player matchPlayer : server.matchPlayer(name))
{
- p.setFireTicks(0);
- sender.sendMessage(Util.format("extinguishOthers", p.getDisplayName()));
+ matchPlayer.setFireTicks(0);
+ sender.sendMessage(_("extinguishOthers", matchPlayer.getDisplayName()));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java b/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java
index 19e7eddf1..671d0f72b 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java
@@ -3,12 +3,12 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.entity.Fireball;
+import org.bukkit.entity.SmallFireball;
import org.bukkit.util.Vector;
public class Commandfireball extends EssentialsCommand
{
-
public Commandfireball()
{
super("fireball");
@@ -17,7 +17,13 @@ public class Commandfireball extends EssentialsCommand
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- final Vector direction = user.getEyeLocation().getDirection().multiply(2);
- user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), Fireball.class);
+ boolean small = false;
+ if (args.length > 0 && args[0].equalsIgnoreCase("small"))
+ {
+ small = true;
+ }
+ final Vector direction = user.getEyeLocation().getDirection().multiply(2);
+ Fireball fireball = user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), small ? SmallFireball.class : Fireball.class);
+ fireball.setShooter(user.getBase());
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java b/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java
new file mode 100644
index 000000000..821692464
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java
@@ -0,0 +1,57 @@
+package com.earth2me.essentials.commands;
+
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
+import java.util.Locale;
+import org.bukkit.GameMode;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+
+public class Commandgamemode extends EssentialsCommand
+{
+ public Commandgamemode()
+ {
+ super("gamemode");
+ }
+
+ @Override
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+
+ gamemodeOtherPlayers(server, sender, args[0]);
+ }
+
+ @Override
+ protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
+ {
+ if (args.length > 0 && user.isAuthorized("essentials.gamemode.others"))
+ {
+ gamemodeOtherPlayers(server, user, args[0]);
+ return;
+ }
+
+ user.setGameMode(user.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL);
+ user.sendMessage(_("gameMode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)), user.getDisplayName()));
+ }
+
+ private void gamemodeOtherPlayers(final Server server, final CommandSender sender, final String name)
+ {
+ for (Player matchPlayer : server.matchPlayer(name))
+ {
+ final User player = ess.getUser(matchPlayer);
+ if (player.isHidden())
+ {
+ continue;
+ }
+
+ player.setGameMode(player.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL);
+ sender.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
+ }
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java
index 28164bd78..9429bc5a8 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
@@ -14,17 +14,18 @@ public class Commandgc extends EssentialsCommand
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
- sender.sendMessage(Util.format("gcmax", (Runtime.getRuntime().maxMemory() / 1024 / 1024)));
- sender.sendMessage(Util.format("gcfree", (Runtime.getRuntime().freeMemory() / 1024 / 1024)));
- sender.sendMessage(Util.format("gctotal", (Runtime.getRuntime().totalMemory() / 1024 / 1024)));
+ sender.sendMessage(_("gcmax", (Runtime.getRuntime().maxMemory() / 1024 / 1024)));
+ sender.sendMessage(_("gctotal", (Runtime.getRuntime().totalMemory() / 1024 / 1024)));
+ sender.sendMessage(_("gcfree", (Runtime.getRuntime().freeMemory() / 1024 / 1024)));
+
for (World w : server.getWorlds())
{
sender.sendMessage(
(w.getEnvironment() == World.Environment.NETHER ? "Nether" : "World") + " \"" + w.getName() + "\": "
- + w.getLoadedChunks().length + Util.i18n("gcchunks")
- + w.getEntities().size() + Util.i18n("gcentities"));
+ + w.getLoadedChunks().length + _("gcchunks")
+ + w.getEntities().size() + _("gcentities"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java b/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java
index 6f1fd7d6c..b79df021c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.User;
import org.bukkit.Location;
import org.bukkit.Server;
-import com.earth2me.essentials.User;
public class Commandgetpos extends EssentialsCommand
@@ -13,9 +13,9 @@ public class Commandgetpos extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- Location coords = user.getLocation();
+ final Location coords = user.getLocation();
user.sendMessage("§7X: " + coords.getBlockX() + " (+East <-> -West)");
user.sendMessage("§7Y: " + coords.getBlockY() + " (+Up <-> -Down)");
user.sendMessage("§7Z: " + coords.getBlockZ() + " (+South <-> -North)");
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java
index 065b76d03..ebda30dd5 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java
@@ -1,10 +1,11 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
-import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
+import java.util.Locale;
import org.bukkit.ChatColor;
import org.bukkit.Material;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@@ -18,16 +19,16 @@ public class Commandgive extends EssentialsCommand
//TODO: move these messages to message file
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
- ItemStack stack = ess.getItemDb().get(args[1]);
+ final ItemStack stack = ess.getItemDb().get(args[1]);
- String itemname = stack.getType().toString().toLowerCase().replace("_", "");
+ final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
if (sender instanceof Player
&& (ess.getSettings().permissionBasedItemSpawn()
? (!ess.getUser(sender).isAuthorized("essentials.give.item-all")
@@ -48,8 +49,8 @@ public class Commandgive extends EssentialsCommand
throw new Exception(ChatColor.RED + "You can't give air.");
}
- User giveTo = getPlayer(server, args, 0);
- String itemName = stack.getType().toString().toLowerCase().replace('_', ' ');
+ final User giveTo = getPlayer(server, args, 0);
+ final String itemName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
sender.sendMessage(ChatColor.BLUE + "Giving " + stack.getAmount() + " of " + itemName + " to " + giveTo.getDisplayName() + ".");
giveTo.getInventory().addItem(stack);
giveTo.updateInventory();
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgod.java b/Essentials/src/com/earth2me/essentials/commands/Commandgod.java
index d4c35e113..9506e48b5 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgod.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgod.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -15,7 +15,7 @@ public class Commandgod extends EssentialsCommand
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -26,7 +26,7 @@ public class Commandgod extends EssentialsCommand
}
@Override
- protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.god.others"))
{
@@ -34,21 +34,21 @@ public class Commandgod extends EssentialsCommand
return;
}
- user.sendMessage(Util.format("godMode", (user.toggleGodModeEnabled()? Util.i18n("enabled") : Util.i18n("disabled"))));
+ user.sendMessage(_("godMode", (user.toggleGodModeEnabled() ? _("enabled") : _("disabled"))));
}
- private void godOtherPlayers(Server server, CommandSender sender, String name)
+ private void godOtherPlayers(final Server server, final CommandSender sender, final String name)
{
- for (Player p : server.matchPlayer(name))
+ for (Player matchPlayer : server.matchPlayer(name))
{
- User u = ess.getUser(p);
- if (u.isHidden())
+ final User player = ess.getUser(matchPlayer);
+ if (player.isHidden())
{
continue;
}
- boolean enabled = u.toggleGodModeEnabled();
- u.sendMessage(Util.format("godMode", (enabled ? Util.i18n("enabled") : Util.i18n("disabled"))));
- sender.sendMessage(Util.format("godMode",Util.format(enabled ? "godEnabledFor": "godDisabledFor", p.getDisplayName())));
+ final boolean enabled = player.toggleGodModeEnabled();
+ player.sendMessage(_("godMode", (enabled ? _("enabled") : _("disabled"))));
+ sender.sendMessage(_("godMode", _(enabled ? "godEnabledFor" : "godDisabledFor", matchPlayer.getDisplayName())));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
index 68de488af..02b8ed30c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
@@ -1,11 +1,11 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
+import java.util.List;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.util.List;
public class Commandheal extends EssentialsCommand
@@ -16,7 +16,7 @@ public class Commandheal extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.heal.others"))
@@ -35,11 +35,11 @@ public class Commandheal extends EssentialsCommand
}
user.setHealth(20);
user.setFoodLevel(20);
- user.sendMessage(Util.i18n("heal"));
+ user.sendMessage(_("heal"));
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -49,12 +49,12 @@ public class Commandheal extends EssentialsCommand
healOtherPlayers(server, sender, args[0]);
}
- private void healOtherPlayers(Server server, CommandSender sender, String name)
+ private void healOtherPlayers(final Server server, final CommandSender sender, final String name)
{
- List<Player> players = server.matchPlayer(name);
+ final List<Player> players = server.matchPlayer(name);
if (players.isEmpty())
{
- sender.sendMessage(Util.i18n("playerNotFound"));
+ sender.sendMessage(_("playerNotFound"));
return;
}
for (Player p : players)
@@ -64,7 +64,7 @@ public class Commandheal extends EssentialsCommand
continue;
}
p.setHealth(20);
- sender.sendMessage(Util.format("healOther", p.getDisplayName()));
+ sender.sendMessage(_("healOther", p.getDisplayName()));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
index 8e99dc1ed..24f463740 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
@@ -1,30 +1,15 @@
package com.earth2me.essentials.commands;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import org.bukkit.Server;
-import org.bukkit.command.CommandSender;
-import org.bukkit.plugin.Plugin;
-import org.bukkit.plugin.PluginDescriptionFile;
-import org.yaml.snakeyaml.Yaml;
-import org.yaml.snakeyaml.constructor.SafeConstructor;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
-import java.util.Map.Entry;
-import java.util.logging.Level;
+import com.earth2me.essentials.textreader.*;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
public class Commandhelp extends EssentialsCommand
{
- private static final String DESCRIPTION = "description";
- private static final String PERMISSION = "permission";
- private static final String PERMISSIONS = "permissions";
- public final Yaml yaml = new Yaml(new SafeConstructor());
-
public Commandhelp()
{
super("help");
@@ -33,198 +18,35 @@ public class Commandhelp extends EssentialsCommand
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- int page = 1;
- String match = "";
- try
+ IText output;
+ String pageStr = args.length > 0 ? args[0] : null;
+ String chapterPageStr = args.length > 1 ? args[1] : null;
+ final IText input = new TextInput(user, "help", false, ess);
+
+ if (input.getLines().isEmpty())
{
- if (args.length > 0)
+ if (Util.isInt(pageStr) || pageStr == null)
{
- match = args[0].toLowerCase();
- page = Integer.parseInt(args[args.length - 1]);
- if (args.length == 1)
- {
- match = "";
- }
+ output = new HelpInput(user, "", ess);
}
-
- }
- catch (Exception ex)
- {
- if (args.length == 1)
+ else
{
- match = args[0].toLowerCase();
+ output = new HelpInput(user, pageStr, ess);
+ pageStr = chapterPageStr;
}
+ chapterPageStr = null;
}
-
- final List<String> lines = getHelpLines(user, match);
- if (lines.isEmpty())
+ else
{
- throw new Exception(Util.i18n("noHelpFound"));
- }
-
- final int start = (page - 1) * 9;
- final int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
-
- user.sendMessage(Util.format("helpPages", page, pages));
- for (int i = start; i < lines.size() && i < start + 9; i++)
- {
- user.sendMessage(lines.get(i));
+ output = new KeywordReplacer(input, user, ess);
}
+ final TextPager pager = new TextPager(output);
+ pager.showPage(pageStr, chapterPageStr, user);
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
- sender.sendMessage(Util.i18n("helpConsole"));
- }
-
- @SuppressWarnings("CallToThreadDumpStack")
- private List<String> getHelpLines(final User user, final String match) throws Exception
- {
- final List<String> retval = new ArrayList<String>();
- File helpFile = new File(ess.getDataFolder(), "help_" + Util.sanitizeFileName(user.getName()) + ".txt");
- if (!helpFile.exists())
- {
- helpFile = new File(ess.getDataFolder(), "help_" + Util.sanitizeFileName(user.getGroup()) + ".txt");
- }
- if (!helpFile.exists())
- {
- helpFile = new File(ess.getDataFolder(), "help.txt");
- }
- if (helpFile.exists())
- {
- final BufferedReader bufferedReader = new BufferedReader(new FileReader(helpFile));
- try
- {
-
- while (bufferedReader.ready())
- {
- final String line = bufferedReader.readLine();
- retval.add(line.replace('&', '§'));
- }
- }
- finally
- {
- bufferedReader.close();
- }
- return retval;
- }
-
- boolean reported = false;
- String pluginName = "";
- for (Plugin p : ess.getServer().getPluginManager().getPlugins())
- {
- try
- {
- final PluginDescriptionFile desc = p.getDescription();
- final HashMap<String, HashMap<String, Object>> cmds = (HashMap<String, HashMap<String, Object>>)desc.getCommands();
- pluginName = p.getDescription().getName().toLowerCase();
- for (Entry<String, HashMap<String, Object>> k : cmds.entrySet())
- {
- try
- {
- if ((!match.equalsIgnoreCase(""))
- && (!k.getKey().toLowerCase().contains(match))
- && (!(k.getValue().get(DESCRIPTION) instanceof String
- && ((String)k.getValue().get(DESCRIPTION)).toLowerCase().contains(match)))
- && (!pluginName.contains(match)))
- {
- continue;
- }
-
- if (pluginName.contains("essentials"))
- {
- final String node = "essentials." + k.getKey();
- if (!ess.getSettings().isCommandDisabled(k.getKey()) && user.isAuthorized(node))
- {
- retval.add("§c" + k.getKey() + "§7: " + k.getValue().get(DESCRIPTION));
- }
- }
- else
- {
- if (ess.getSettings().showNonEssCommandsInHelp())
- {
- final HashMap<String, Object> value = k.getValue();
- if (value.containsKey(PERMISSION) && value.get(PERMISSION) instanceof String && !(value.get(PERMISSION).equals("")))
- {
- if (user.isAuthorized((String)value.get(PERMISSION)))
- {
- retval.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
- }
- }
- else if (value.containsKey(PERMISSION) && value.get(PERMISSION) instanceof List && !((List<Object>)value.get(PERMISSION)).isEmpty())
- {
- boolean enabled = false;
- for (Object o : (List<Object>)value.get(PERMISSION))
- {
- if (o instanceof String && user.isAuthorized((String)o))
- {
- enabled = true;
- break;
- }
- }
- if (enabled)
- {
- retval.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
- }
- }
- else if (value.containsKey(PERMISSIONS) && value.get(PERMISSIONS) instanceof String && !(value.get(PERMISSIONS).equals("")))
- {
- if (user.isAuthorized((String)value.get(PERMISSIONS)))
- {
- retval.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
- }
- }
- else if (value.containsKey(PERMISSIONS) && value.get(PERMISSIONS) instanceof List && !((List<Object>)value.get(PERMISSIONS)).isEmpty())
- {
- boolean enabled = false;
- for (Object o : (List<Object>)value.get(PERMISSIONS))
- {
- if (o instanceof String && user.isAuthorized((String)o))
- {
- enabled = true;
- break;
- }
- }
- if (enabled)
- {
- retval.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
- }
- }
- else if (user.isAuthorized("essentials.help." + pluginName))
- {
- retval.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
- }
- else
- {
- if (!ess.getSettings().hidePermissionlessHelp())
- {
- retval.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
- }
- }
- }
- }
- }
- catch (NullPointerException ex)
- {
- continue;
- }
- }
- }
- catch (NullPointerException ex)
- {
- continue;
- }
- catch (Exception ex)
- {
- if (!reported)
- {
- logger.log(Level.WARNING, Util.format("commandHelpFailedForPlugin", pluginName), ex);
- }
- reported = true;
- continue;
- }
- }
- return retval;
+ sender.sendMessage(_("helpConsole"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java b/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java
index 158b0d40b..f558a1b52 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
-import org.bukkit.entity.Player;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import java.util.logging.Level;
+import org.bukkit.Server;
+import org.bukkit.entity.Player;
public class Commandhelpop extends EssentialsCommand
@@ -15,23 +15,23 @@ public class Commandhelpop extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- final String message = Util.format("helpOp", user.getDisplayName(), getFinalArg(args, 0));
+ final String message = _("helpOp", user.getDisplayName(), getFinalArg(args, 0));
logger.log(Level.INFO, message);
- for (Player p : server.getOnlinePlayers())
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- User u = ess.getUser(p);
- if (!u.isAuthorized("essentials.helpop.receive"))
+ final User player = ess.getUser(onlinePlayer);
+ if (!player.isAuthorized("essentials.helpop.receive"))
{
continue;
}
- u.sendMessage(message);
+ player.sendMessage(message);
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
index 16b9fca2a..1c0591bee 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
@@ -1,10 +1,12 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
-import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.List;
+import java.util.Locale;
+import org.bukkit.Server;
public class Commandhome extends EssentialsCommand
@@ -15,11 +17,11 @@ public class Commandhome extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- Trade charge = new Trade(this.getName(), ess);
+ final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
- User u = user;
+ User player = user;
String homeName = "";
String[] nameParts;
if (args.length > 0)
@@ -31,7 +33,7 @@ public class Commandhome extends EssentialsCommand
}
else
{
- u = getPlayer(server, nameParts[0].split(" "), 0, true);
+ player = getPlayer(server, nameParts[0].split(" "), 0, true);
if (nameParts.length > 1)
{
homeName = nameParts[1];
@@ -40,26 +42,26 @@ public class Commandhome extends EssentialsCommand
}
try
{
- user.getTeleport().home(u, homeName.toLowerCase(), charge);
+ user.getTeleport().home(player, homeName.toLowerCase(Locale.ENGLISH), charge);
}
catch (NotEnoughArgumentsException e)
{
- List<String> homes = u.getHomes();
- if (homes.isEmpty() && u.equals(user) && ess.getSettings().spawnIfNoHome())
+ final List<String> homes = player.getHomes();
+ if (homes.isEmpty() && player.equals(user) && ess.getSettings().spawnIfNoHome())
{
- user.getTeleport().respawn(ess.getSpawn(), charge);
+ user.getTeleport().respawn(ess.getSpawn(), charge);
}
else if (homes.isEmpty())
{
- throw new Exception(u == user ? Util.i18n("noHomeSet") : Util.i18n("noHomeSetPlayer"));
+ throw new Exception(player == user ? _("noHomeSet") : _("noHomeSetPlayer"));
}
- else if (homes.size() == 1 && u.equals(user))
+ else if (homes.size() == 1 && player.equals(user))
{
- user.getTeleport().home(u, homes.get(0), charge);
+ user.getTeleport().home(player, homes.get(0), charge);
}
else
{
- user.sendMessage(Util.format("homes", Util.joinList(homes)));
+ user.sendMessage(_("homes", Util.joinList(homes)));
}
}
throw new NoChargeException();
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandignore.java b/Essentials/src/com/earth2me/essentials/commands/Commandignore.java
index 953bf742c..93dd029a8 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandignore.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandignore.java
@@ -1,49 +1,47 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
public class Commandignore extends EssentialsCommand
{
-
public Commandignore()
{
super("ignore");
}
@Override
- protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- User u;
+ User player;
try
{
- u = getPlayer(server, args, 0);
+ player = getPlayer(server, args, 0);
}
- catch(NoSuchFieldException ex)
+ catch (NoSuchFieldException ex)
{
- u = ess.getOfflineUser(args[0]);
+ player = ess.getOfflineUser(args[0]);
}
- if (u == null)
+ if (player == null)
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
- String name = u.getName();
- if (user.isIgnoredPlayer(name)) {
+ final String name = player.getName();
+ if (user.isIgnoredPlayer(name))
+ {
user.setIgnoredPlayer(name, false);
- user.sendMessage(Util.format("unignorePlayer", u.getName()));
+ user.sendMessage(_("unignorePlayer", player.getName()));
}
else
{
user.setIgnoredPlayer(name, true);
- user.sendMessage(Util.format("ignorePlayer", u.getName()));
+ user.sendMessage(_("ignorePlayer", player.getName()));
}
}
-
-
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java b/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java
index 97dd71d35..2ae348696 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java
@@ -1,17 +1,11 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import com.earth2me.essentials.textreader.IText;
+import com.earth2me.essentials.textreader.KeywordReplacer;
+import com.earth2me.essentials.textreader.TextInput;
+import com.earth2me.essentials.textreader.TextPager;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
-import org.bukkit.entity.Player;
public class Commandinfo extends EssentialsCommand
@@ -22,167 +16,11 @@ public class Commandinfo extends EssentialsCommand
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
- String pageStr = args.length > 0 ? args[0].trim() : null;
-
- List<String> lines = new ArrayList<String>();
- List<String> chapters = new ArrayList<String>();
- Map<String, Integer> bookmarks = new HashMap<String, Integer>();
- File file = null;
- if (sender instanceof Player)
- {
- User user = ess.getUser(sender);
- file = new File(ess.getDataFolder(), "info_"+Util.sanitizeFileName(user.getName()) +".txt");
- if (!file.exists())
- {
- file = new File(ess.getDataFolder(), "info_"+Util.sanitizeFileName(user.getGroup()) +".txt");
- }
- }
- if (file == null || !file.exists())
- {
- file = new File(ess.getDataFolder(), "info.txt");
- }
- if (file.exists())
- {
- final BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
- try
- {
- int lineNumber = 0;
- while (bufferedReader.ready())
- {
- final String line = bufferedReader.readLine();
- if (line.length() > 0 && line.charAt(0) == '#')
- {
- bookmarks.put(line.substring(1).toLowerCase().replaceAll("&[0-9a-f]", ""), lineNumber);
- chapters.add(line.substring(1).replace('&', '§'));
- }
- lines.add(line.replace('&', '§'));
- lineNumber++;
- }
- }
- finally
- {
- bufferedReader.close();
- }
- }
- else
- {
- file.createNewFile();
- throw new Exception(Util.i18n("infoFileDoesNotExist"));
- }
-
- if (bookmarks.isEmpty())
- {
- int page = 1;
- try
- {
- page = Integer.parseInt(pageStr);
- }
- catch (Exception ex)
- {
- page = 1;
- }
-
- int start = (page - 1) * 9;
- int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
-
- sender.sendMessage(Util.format("infoPages", page, pages ));
- for (int i = start; i < lines.size() && i < start + 9; i++)
- {
- sender.sendMessage(lines.get(i));
- }
- return;
- }
-
- if (pageStr == null || pageStr.isEmpty() || pageStr.matches("[0-9]+"))
- {
- if (lines.get(0).startsWith("#"))
- {
- sender.sendMessage(Util.i18n("infoChapter"));
- StringBuilder sb = new StringBuilder();
- boolean first = true;
- for (String string : chapters)
- {
- if (!first)
- {
- sb.append(", ");
- }
- first = false;
- sb.append(string);
- }
- sender.sendMessage(sb.toString());
- return;
- }
- else
- {
- int page = 1;
- try
- {
- page = Integer.parseInt(pageStr);
- }
- catch (Exception ex)
- {
- page = 1;
- }
-
- int start = (page - 1) * 9;
- int end;
- for (end = 0; end < lines.size(); end++)
- {
- String line = lines.get(end);
- if (line.startsWith("#"))
- {
- break;
- }
- }
- int pages = end / 9 + (end % 9 > 0 ? 1 : 0);
-
- sender.sendMessage(Util.format("infoPages", page, pages ));
- for (int i = start; i < end && i < start + 9; i++)
- {
- sender.sendMessage(lines.get(i));
- }
- return;
- }
- }
-
- int chapterpage = 0;
- if (args.length >= 2)
- {
- try
- {
- chapterpage = Integer.parseInt(args[1]) - 1;
- }
- catch (Exception ex)
- {
- chapterpage = 0;
- }
- }
-
- if (!bookmarks.containsKey(pageStr.toLowerCase()))
- {
- sender.sendMessage(Util.i18n("infoUnknownChapter"));
- return;
- }
- int chapterstart = bookmarks.get(pageStr.toLowerCase()) + 1;
- int chapterend;
- for (chapterend = chapterstart; chapterend < lines.size(); chapterend++)
- {
- String line = lines.get(chapterend);
- if (line.startsWith("#"))
- {
- break;
- }
- }
- int start = chapterstart + chapterpage * 9;
- int page = chapterpage + 1;
- int pages = (chapterend - chapterstart) / 9 + ((chapterend - chapterstart) % 9 > 0 ? 1 : 0);
-
- sender.sendMessage(Util.format("infoChapterPages", pageStr, page , pages));
- for (int i = start; i < chapterend && i < start + 9; i++)
- {
- sender.sendMessage(lines.get(i));
- }
+ final IText input = new TextInput(sender, "info", true, ess);
+ final IText output = new KeywordReplacer(input, sender, ess);
+ final TextPager pager = new TextPager(output);
+ pager.showPage(args.length > 0 ? args[0] : null, args.length > 1 ? args[1] : null, sender);
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java
index 2a730b533..1f5c32faa 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import java.util.Arrays;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@@ -15,7 +15,7 @@ public class Commandinvsee extends EssentialsCommand
}
@Override
- protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1 && user.getSavedInventory() == null)
@@ -31,7 +31,7 @@ public class Commandinvsee extends EssentialsCommand
{
invUser.getInventory().setContents(user.getSavedInventory());
user.setSavedInventory(null);
- user.sendMessage(Util.i18n("invRestored"));
+ user.sendMessage(_("invRestored"));
throw new NoChargeException();
}
@@ -40,16 +40,18 @@ public class Commandinvsee extends EssentialsCommand
user.setSavedInventory(user.getInventory().getContents());
}
ItemStack[] invUserStack = invUser.getInventory().getContents();
- int userStackLength = user.getInventory().getContents().length;
- if (invUserStack.length < userStackLength) {
+ final int userStackLength = user.getInventory().getContents().length;
+ if (invUserStack.length < userStackLength)
+ {
invUserStack = Arrays.copyOf(invUserStack, userStackLength);
}
- if (invUserStack.length > userStackLength) {
- throw new Exception(Util.i18n("invBigger"));
+ if (invUserStack.length > userStackLength)
+ {
+ throw new Exception(_("invBigger"));
}
user.getInventory().setContents(invUserStack);
- user.sendMessage(Util.format("invSee", invUser.getDisplayName()));
- user.sendMessage(Util.i18n("invSeeHelp"));
+ user.sendMessage(_("invSee", invUser.getDisplayName()));
+ user.sendMessage(_("invSeeHelp"));
throw new NoChargeException();
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java
index 352ce18eb..3bd35353a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java
@@ -1,9 +1,10 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import java.util.Locale;
import org.bukkit.Material;
+import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@@ -15,15 +16,15 @@ public class Commanditem extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- ItemStack stack = ess.getItemDb().get(args[0]);
+ final ItemStack stack = ess.getItemDb().get(args[0]);
- String itemname = stack.getType().toString().toLowerCase().replace("_", "");
+ final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
if (ess.getSettings().permissionBasedItemSpawn()
? (!user.isAuthorized("essentials.itemspawn.item-all")
&& !user.isAuthorized("essentials.itemspawn.item-" + itemname)
@@ -31,7 +32,7 @@ public class Commanditem extends EssentialsCommand
: (!user.isAuthorized("essentials.itemspawn.exempt")
&& !user.canSpawnItem(stack.getTypeId())))
{
- throw new Exception(Util.format("cantSpawnItem", itemname));
+ throw new Exception(_("cantSpawnItem", itemname));
}
if (args.length > 1 && Integer.parseInt(args[1]) > 0)
@@ -41,11 +42,11 @@ public class Commanditem extends EssentialsCommand
if (stack.getType() == Material.AIR)
{
- throw new Exception(Util.format("cantSpawnItem", "Air"));
+ throw new Exception(_("cantSpawnItem", "Air"));
}
- String itemName = stack.getType().toString().toLowerCase().replace('_', ' ');
- user.sendMessage(Util.format("itemSpawn", stack.getAmount(), itemName));
+ final String displayName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
+ user.sendMessage(_("itemSpawn", stack.getAmount(), displayName));
user.getInventory().addItem(stack);
user.updateInventory();
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandjails.java b/Essentials/src/com/earth2me/essentials/commands/Commandjails.java
index 36eb633fc..c5473e08d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandjails.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandjails.java
@@ -13,7 +13,7 @@ public class Commandjails extends EssentialsCommand
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
sender.sendMessage("§7" + Util.joinList(" ", ess.getJail().getJails()));
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
index 5cdcbb2f2..93ce45fd4 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
@@ -1,11 +1,11 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.TargetBlock;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.User;
import org.bukkit.Location;
import org.bukkit.Server;
-import com.earth2me.essentials.TargetBlock;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class Commandjump extends EssentialsCommand
@@ -15,11 +15,12 @@ public class Commandjump extends EssentialsCommand
super("jump");
}
+ //TODO: Update to use new target methods
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
Location loc;
- Location cloc = user.getLocation();
+ final Location cloc = user.getLocation();
try
{
@@ -33,10 +34,10 @@ public class Commandjump extends EssentialsCommand
}
catch (NullPointerException ex)
{
- throw new Exception(Util.i18n("jumpError"), ex);
+ throw new Exception(_("jumpError"), ex);
}
- Trade charge = new Trade(this.getName(), ess);
+ final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().teleport(loc, charge);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkick.java b/Essentials/src/com/earth2me/essentials/commands/Commandkick.java
index fd0d4a8e0..ae5db48fb 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkick.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkick.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.entity.Player;
@@ -14,30 +14,30 @@ public class Commandkick extends EssentialsCommand
{
super("kick");
}
-
+
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
-
- User player = getPlayer(server, args, 0);
- if (player.isAuthorized("essentials.kick.exempt"))
+
+ final User user = getPlayer(server, args, 0);
+ if (user.isAuthorized("essentials.kick.exempt"))
{
- throw new Exception(Util.i18n("kickExempt"));
+ throw new Exception(_("kickExempt"));
}
- final String kickReason = args.length > 1 ? getFinalArg(args, 1) : Util.i18n("kickDefault");
- player.kickPlayer(kickReason);
- String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
-
- for(Player p : server.getOnlinePlayers())
+ final String kickReason = args.length > 1 ? getFinalArg(args, 1) : _("kickDefault");
+ user.kickPlayer(kickReason);
+ final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
+
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- User u = ess.getUser(p);
- if(u.isAuthorized("essentials.kick.notify"))
+ User player = ess.getUser(onlinePlayer);
+ if (player.isAuthorized("essentials.kick.notify"))
{
- p.sendMessage(Util.format("playerKicked", senderName, player.getName(), kickReason));
+ onlinePlayer.sendMessage(_("playerKicked", senderName, user.getName(), kickReason));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java
index 8d36f50d5..6d97b6af9 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -14,17 +14,17 @@ public class Commandkickall extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
- for (Player p : server.getOnlinePlayers())
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- if (sender instanceof Player && p.getName().equalsIgnoreCase(((Player)sender).getName()))
+ if (sender instanceof Player && onlinePlayer.getName().equalsIgnoreCase(((Player)sender).getName()))
{
continue;
}
else
{
- p.kickPlayer(args.length > 0 ? getFinalArg(args, 0) : Util.i18n("kickDefault"));
+ onlinePlayer.kickPlayer(args.length > 0 ? getFinalArg(args, 0) : _("kickDefault"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java
index e976faa42..e56f9d67b 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -15,24 +15,24 @@ public class Commandkill extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- for (Player p : server.matchPlayer(args[0]))
+ for (Player matchPlayer : server.matchPlayer(args[0]))
{
- final EntityDamageEvent ede = new EntityDamageEvent(p, sender instanceof Player && ((Player)sender).getName().equals(p.getName()) ? EntityDamageEvent.DamageCause.SUICIDE : EntityDamageEvent.DamageCause.CUSTOM, 1000);
+ final EntityDamageEvent ede = new EntityDamageEvent(matchPlayer, sender instanceof Player && ((Player)sender).getName().equals(matchPlayer.getName()) ? EntityDamageEvent.DamageCause.SUICIDE : EntityDamageEvent.DamageCause.CUSTOM, 1000);
server.getPluginManager().callEvent(ede);
if (ede.isCancelled() && !sender.hasPermission("essentials.kill.force"))
{
continue;
}
- p.setHealth(0);
- sender.sendMessage(Util.format("kill", p.getDisplayName()));
+ matchPlayer.setHealth(0);
+ sender.sendMessage(_("kill", matchPlayer.getDisplayName()));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
index ae7963c5e..f1aad4394 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
@@ -1,15 +1,12 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
-import java.util.GregorianCalendar;
+import java.util.*;
import org.bukkit.Material;
+import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@@ -29,38 +26,38 @@ public class Commandkit extends EssentialsCommand
{
final Map<String, Object> kits = ess.getSettings().getKits();
final StringBuilder list = new StringBuilder();
- for (String k : kits.keySet())
+ for (String kiteItem : kits.keySet())
{
- if (user.isAuthorized("essentials.kit." + k.toLowerCase()))
+ if (user.isAuthorized("essentials.kit." + kiteItem.toLowerCase(Locale.ENGLISH)))
{
- list.append(" ").append(k);
+ list.append(" ").append(kiteItem);
}
}
if (list.length() > 0)
{
- user.sendMessage(Util.format("kits", list.toString()));
+ user.sendMessage(_("kits", list.toString()));
}
else
{
- user.sendMessage(Util.i18n("noKits"));
+ user.sendMessage(_("noKits"));
}
}
catch (Exception ex)
{
- user.sendMessage(Util.i18n("kitError"));
+ user.sendMessage(_("kitError"));
}
}
else
{
try
{
- final String kitName = args[0].toLowerCase();
+ final String kitName = args[0].toLowerCase(Locale.ENGLISH);
final Object kit = ess.getSettings().getKit(kitName);
List<String> items;
if (!user.isAuthorized("essentials.kit." + kitName))
{
- user.sendMessage(Util.format("noKitPermission", "essentials.kit." + kitName));
+ user.sendMessage(_("noKitPermission", "essentials.kit." + kitName));
return;
}
@@ -73,20 +70,23 @@ public class Commandkit extends EssentialsCommand
final double delay = els.containsKey("delay") ? ((Number)els.get("delay")).doubleValue() : 0L;
final Calendar c = new GregorianCalendar();
c.add(Calendar.SECOND, -(int)delay);
- c.add(Calendar.MILLISECOND, -(int)((delay*1000.0)%1000.0));
-
+ c.add(Calendar.MILLISECOND, -(int)((delay * 1000.0) % 1000.0));
+
final long mintime = c.getTimeInMillis();
-
+
final Long lastTime = user.getKitTimestamp(kitName);
- if (lastTime == null || lastTime < mintime) {
+ if (lastTime == null || lastTime < mintime)
+ {
final Calendar now = new GregorianCalendar();
user.setKitTimestamp(kitName, now.getTimeInMillis());
- } else {
+ }
+ else
+ {
final Calendar future = new GregorianCalendar();
future.setTimeInMillis(lastTime);
future.add(Calendar.SECOND, (int)delay);
- future.add(Calendar.MILLISECOND, (int)((delay*1000.0)%1000.0));
- user.sendMessage(Util.format("kitTimed", Util.formatDateDiff(future.getTimeInMillis())));
+ future.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
+ user.sendMessage(_("kitTimed", Util.formatDateDiff(future.getTimeInMillis())));
return;
}
}
@@ -113,7 +113,7 @@ public class Commandkit extends EssentialsCommand
final int id = Material.getMaterial(Integer.parseInt(parts[0])).getId();
final int amount = parts.length > 1 ? Integer.parseInt(parts[parts.length > 2 ? 2 : 1]) : 1;
final short data = parts.length > 2 ? Short.parseShort(parts[1]) : 0;
- final HashMap<Integer,ItemStack> overfilled = user.getInventory().addItem(new ItemStack(id, amount, data));
+ final HashMap<Integer, ItemStack> overfilled = user.getInventory().addItem(new ItemStack(id, amount, data));
for (ItemStack itemStack : overfilled.values())
{
user.getWorld().dropItemNaturally(user.getLocation(), itemStack);
@@ -122,7 +122,7 @@ public class Commandkit extends EssentialsCommand
}
if (spew)
{
- user.sendMessage(Util.i18n("kitInvFull"));
+ user.sendMessage(_("kitInvFull"));
}
try
{
@@ -132,12 +132,12 @@ public class Commandkit extends EssentialsCommand
{
user.sendMessage(ex.getMessage());
}
- user.sendMessage(Util.format("kitGive", kitName));
+ user.sendMessage(_("kitGive", kitName));
}
catch (Exception ex)
{
- user.sendMessage(Util.i18n("kitError2"));
- user.sendMessage(Util.i18n("kitErrorHelp"));
+ user.sendMessage(_("kitError2"));
+ user.sendMessage(_("kitErrorHelp"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
index dc4387833..582f048a1 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -15,7 +15,7 @@ public class Commandlightning extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
User user = null;
@@ -31,19 +31,20 @@ public class Commandlightning extends EssentialsCommand
if (server.matchPlayer(args[0]).isEmpty())
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
- for (Player p : server.matchPlayer(args[0]))
+ for (Player matchPlayer : server.matchPlayer(args[0]))
{
- sender.sendMessage(Util.format("lightningUse", p.getDisplayName()));
- p.getWorld().strikeLightning(p.getLocation());
- if (!ess.getUser(p).isGodModeEnabled()) {
- p.setHealth(p.getHealth() < 5 ? 0 : p.getHealth() - 5);
+ sender.sendMessage(_("lightningUse", matchPlayer.getDisplayName()));
+ matchPlayer.getWorld().strikeLightning(matchPlayer.getLocation());
+ if (!ess.getUser(matchPlayer).isGodModeEnabled())
+ {
+ matchPlayer.setHealth(matchPlayer.getHealth() < 5 ? 0 : matchPlayer.getHealth() - 5);
}
if (ess.getSettings().warnOnSmite())
{
- p.sendMessage(Util.i18n("lightningSmited"));
+ matchPlayer.sendMessage(_("lightningSmited"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java
index 98066d7e7..549f6efac 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java
@@ -1,17 +1,12 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
+import java.util.*;
+import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.bukkit.ChatColor;
public class Commandlist extends EssentialsCommand
@@ -22,7 +17,7 @@ public class Commandlist extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
boolean showhidden = false;
if (sender instanceof Player)
@@ -37,15 +32,15 @@ public class Commandlist extends EssentialsCommand
showhidden = true;
}
int playerHidden = 0;
- for (Player p : server.getOnlinePlayers())
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- if (ess.getUser(p).isHidden())
+ if (ess.getUser(onlinePlayer).isHidden())
{
playerHidden++;
}
}
//TODO: move these to messages file
- StringBuilder online = new StringBuilder();
+ final StringBuilder online = new StringBuilder();
online.append(ChatColor.BLUE).append("There are ").append(ChatColor.RED).append(server.getOnlinePlayers().length - playerHidden);
if (showhidden && playerHidden > 0)
{
@@ -58,29 +53,29 @@ public class Commandlist extends EssentialsCommand
if (ess.getSettings().getSortListByGroups())
{
Map<String, List<User>> sort = new HashMap<String, List<User>>();
- for (Player p : server.getOnlinePlayers())
+ for (Player OnlinePlayer : server.getOnlinePlayers())
{
- User u = ess.getUser(p);
- if (u.isHidden() && !showhidden)
+ final User player = ess.getUser(OnlinePlayer);
+ if (player.isHidden() && !showhidden)
{
continue;
}
- String group = u.getGroup();
+ final String group = player.getGroup();
List<User> list = sort.get(group);
if (list == null)
{
list = new ArrayList<User>();
sort.put(group, list);
}
- list.add(u);
+ list.add(player);
}
- String[] groups = sort.keySet().toArray(new String[0]);
+ final String[] groups = sort.keySet().toArray(new String[0]);
Arrays.sort(groups, String.CASE_INSENSITIVE_ORDER);
for (String group : groups)
{
- StringBuilder groupString = new StringBuilder();
+ final StringBuilder groupString = new StringBuilder();
groupString.append(group).append(": ");
- List<User> users = sort.get(group);
+ final List<User> users = sort.get(group);
Collections.sort(users);
boolean first = true;
for (User user : users)
@@ -109,20 +104,20 @@ public class Commandlist extends EssentialsCommand
}
else
{
- List<User> users = new ArrayList<User>();
- for (Player p : server.getOnlinePlayers())
+ final List<User> users = new ArrayList<User>();
+ for (Player OnlinePlayer : server.getOnlinePlayers())
{
- final User u = ess.getUser(p);
- if (u.isHidden() && !showhidden)
+ final User player = ess.getUser(OnlinePlayer);
+ if (player.isHidden() && !showhidden)
{
continue;
}
- users.add(u);
+ users.add(player);
}
Collections.sort(users);
- StringBuilder onlineUsers = new StringBuilder();
- onlineUsers.append(Util.i18n("connectedPlayers"));
+ final StringBuilder onlineUsers = new StringBuilder();
+ onlineUsers.append(_("connectedPlayers"));
boolean first = true;
for (User user : users)
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java
index ddc26aadc..d02e5a13a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.commands;
-import java.util.List;
-import org.bukkit.Server;
+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;
@@ -16,29 +16,30 @@ public class Commandmail extends EssentialsCommand
super("mail");
}
+ //TODO: Tidy this up
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length >= 1 && "read".equalsIgnoreCase(args[0]))
{
- List<String> mail = user.getMails();
+ final List<String> mail = user.getMails();
if (mail.isEmpty())
{
- user.sendMessage(Util.i18n("noMail"));
+ user.sendMessage(_("noMail"));
throw new NoChargeException();
}
- for (String s : mail)
+ for (String messages : mail)
{
- user.sendMessage(s);
+ user.sendMessage(messages);
}
- user.sendMessage(Util.i18n("mailClear"));
+ user.sendMessage(_("mailClear"));
return;
}
if (args.length >= 3 && "send".equalsIgnoreCase(args[0]))
{
if (!user.isAuthorized("essentials.mail.send"))
{
- throw new Exception(Util.i18n("noMailSendPerm"));
+ throw new Exception(_("noMailSendPerm"));
}
Player player = server.getPlayer(args[1]);
@@ -53,19 +54,19 @@ public class Commandmail extends EssentialsCommand
}
if (u == null)
{
- throw new Exception(Util.format("playerNeverOnServer", args[1]));
+ throw new Exception(_("playerNeverOnServer", args[1]));
}
if (!u.isIgnoredPlayer(user.getName()))
{
u.addMail(ChatColor.stripColor(user.getDisplayName()) + ": " + getFinalArg(args, 2));
}
- user.sendMessage(Util.i18n("mailSent"));
+ user.sendMessage(_("mailSent"));
return;
}
if (args.length >= 1 && "clear".equalsIgnoreCase(args[0]))
{
user.setMails(null);
- user.sendMessage(Util.i18n("mailCleared"));
+ user.sendMessage(_("mailCleared"));
return;
}
throw new NotEnoughArgumentsException();
@@ -76,11 +77,11 @@ public class Commandmail extends EssentialsCommand
{
if (args.length >= 1 && "read".equalsIgnoreCase(args[0]))
{
- throw new Exception(Util.format("onlyPlayers", commandLabel + " read"));
+ throw new Exception(_("onlyPlayers", commandLabel + " read"));
}
else if (args.length >= 1 && "clear".equalsIgnoreCase(args[0]))
{
- throw new Exception(Util.format("onlyPlayers", commandLabel + " clear"));
+ throw new Exception(_("onlyPlayers", commandLabel + " clear"));
}
else if (args.length >= 3 && "send".equalsIgnoreCase(args[0]))
{
@@ -96,10 +97,10 @@ public class Commandmail extends EssentialsCommand
}
if (u == null)
{
- throw new Exception(Util.format("playerNeverOnServer", args[1]));
+ throw new Exception(_("playerNeverOnServer", args[1]));
}
u.addMail("Server: " + getFinalArg(args, 2));
- sender.sendMessage(Util.i18n("mailSent"));
+ sender.sendMessage(_("mailSent"));
return;
}
else if (args.length >= 2)
@@ -117,10 +118,10 @@ public class Commandmail extends EssentialsCommand
}
if (u == null)
{
- throw new Exception(Util.format("playerNeverOnServer", args[0]));
+ throw new Exception(_("playerNeverOnServer", args[0]));
}
u.addMail("Server: " + getFinalArg(args, 1));
- sender.sendMessage(Util.i18n("mailSent"));
+ sender.sendMessage(_("mailSent"));
return;
}
throw new NotEnoughArgumentsException();
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandme.java b/Essentials/src/com/earth2me/essentials/commands/Commandme.java
index 779e78420..7ae87251d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandme.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandme.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandme extends EssentialsCommand
@@ -17,7 +17,7 @@ public class Commandme extends EssentialsCommand
{
if (user.isMuted())
{
- throw new Exception(Util.i18n("voiceSilenced"));
+ throw new Exception(_("voiceSilenced"));
}
if (args.length < 1)
@@ -31,6 +31,6 @@ public class Commandme extends EssentialsCommand
message = message.replaceAll("&([0-9a-f])", "§$1");
}
- ess.broadcastMessage(user, Util.format("action", user.getDisplayName(), message));
+ ess.broadcastMessage(user, _("action", user.getDisplayName(), message));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java b/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
index c695338f6..5d2d6994a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
@@ -1,6 +1,9 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import com.earth2me.essentials.textreader.IText;
+import com.earth2me.essentials.textreader.KeywordReplacer;
+import com.earth2me.essentials.textreader.TextInput;
+import com.earth2me.essentials.textreader.TextPager;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -11,13 +14,13 @@ public class Commandmotd extends EssentialsCommand
{
super("motd");
}
-
+
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
- for (String m : ess.getMotd(sender, Util.i18n("noMotd")))
- {
- sender.sendMessage(m);
- }
+ final IText input = new TextInput(sender, "motd", true, ess);
+ final IText output = new KeywordReplacer(input, sender, ess);
+ final TextPager pager = new TextPager(output);
+ pager.showPage(args.length > 0 ? args[0] : null, args.length > 1 ? args[1] : null, sender);
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
index f14935648..34754ec9c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
@@ -1,13 +1,13 @@
package com.earth2me.essentials.commands;
-import java.util.List;
-import org.bukkit.Server;
-import org.bukkit.entity.Player;
import com.earth2me.essentials.Console;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IReplyTo;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import java.util.List;
+import org.bukkit.Server;
import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
public class Commandmsg extends EssentialsCommand
@@ -30,21 +30,21 @@ public class Commandmsg extends EssentialsCommand
User user = ess.getUser(sender);
if (user.isMuted())
{
- throw new Exception(Util.i18n("voiceSilenced"));
+ throw new Exception(_("voiceSilenced"));
}
}
String message = getFinalArg(args, 1);
- String translatedMe = Util.i18n("me");
+ String translatedMe = _("me");
IReplyTo replyTo = sender instanceof Player ? ess.getUser((Player)sender) : Console.getConsoleReplyTo();
String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
if (args[0].equalsIgnoreCase(Console.NAME))
{
- sender.sendMessage(Util.format("msgFormat", translatedMe, Console.NAME, message));
+ sender.sendMessage(_("msgFormat", translatedMe, Console.NAME, message));
CommandSender cs = Console.getCommandSender(server);
- cs.sendMessage(Util.format("msgFormat", senderName, translatedMe, message));
+ cs.sendMessage(_("msgFormat", senderName, translatedMe, message));
replyTo.setReplyTo(cs);
Console.getConsoleReplyTo().setReplyTo(sender);
return;
@@ -54,7 +54,7 @@ public class Commandmsg extends EssentialsCommand
if (matches.isEmpty())
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
int i = 0;
@@ -68,18 +68,18 @@ public class Commandmsg extends EssentialsCommand
}
if (i == matches.size())
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
for (Player p : matches)
{
- sender.sendMessage(Util.format("msgFormat", translatedMe, p.getDisplayName(), message));
+ sender.sendMessage(_("msgFormat", translatedMe, p.getDisplayName(), message));
final User u = ess.getUser(p);
if (sender instanceof Player && (u.isIgnoredPlayer(((Player)sender).getName()) || u.isHidden()))
{
continue;
}
- p.sendMessage(Util.format("msgFormat", senderName, translatedMe, message));
+ p.sendMessage(_("msgFormat", senderName, translatedMe, message));
replyTo.setReplyTo(ess.getUser(p));
ess.getUser(p).setReplyTo(sender);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmute.java b/Essentials/src/com/earth2me/essentials/commands/Commandmute.java
index 1777c5b48..3e70cc507 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmute.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmute.java
@@ -1,9 +1,10 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
-import org.bukkit.command.CommandSender;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
public class Commandmute extends EssentialsCommand
@@ -14,17 +15,17 @@ public class Commandmute extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- User p = getPlayer(server, args, 0, true);
- if (!p.isMuted() && p.isAuthorized("essentials.mute.exempt"))
+ final User player = getPlayer(server, args, 0, true);
+ if (!player.isMuted() && player.isAuthorized("essentials.mute.exempt"))
{
- throw new Exception(Util.i18n("muteExempt"));
+ throw new Exception(_("muteExempt"));
}
long muteTimestamp = 0;
if (args.length > 1)
@@ -32,19 +33,19 @@ public class Commandmute extends EssentialsCommand
String time = getFinalArg(args, 1);
muteTimestamp = Util.parseDateDiff(time, true);
}
- p.setMuteTimeout(muteTimestamp);
- boolean muted = p.toggleMuted();
+ player.setMuteTimeout(muteTimestamp);
+ final boolean muted = player.toggleMuted();
sender.sendMessage(
muted
? (muteTimestamp > 0
- ? Util.format("mutedPlayerFor", p.getDisplayName(), Util.formatDateDiff(muteTimestamp))
- : Util.format("mutedPlayer", p.getDisplayName()))
- : Util.format("unmutedPlayer", p.getDisplayName()));
- p.sendMessage(
+ ? _("mutedPlayerFor", player.getDisplayName(), Util.formatDateDiff(muteTimestamp))
+ : _("mutedPlayer", player.getDisplayName()))
+ : _("unmutedPlayer", player.getDisplayName()));
+ player.sendMessage(
muted
? (muteTimestamp > 0
- ? Util.format("playerMutedFor", Util.formatDateDiff(muteTimestamp))
- : Util.i18n("playerMuted"))
- : Util.i18n("playerUnmuted"));
+ ? _("playerMutedFor", Util.formatDateDiff(muteTimestamp))
+ : _("playerMuted"))
+ : _("playerUnmuted"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java b/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
index f2165aebc..a1f1c77ca 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
@@ -1,10 +1,11 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
+import java.util.Locale;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class Commandnick extends EssentialsCommand
@@ -15,96 +16,85 @@ public class Commandnick extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
-
- if (!ess.getSettings().changeDisplayName()) {
- throw new Exception(Util.i18n("nickDisplayName"));
+ if (!ess.getSettings().changeDisplayName())
+ {
+ throw new Exception(_("nickDisplayName"));
}
-
if (args.length > 1)
{
if (!user.isAuthorized("essentials.nick.others"))
{
- throw new Exception(Util.i18n("nickOthersPermission"));
+ throw new Exception(_("nickOthersPermission"));
}
-
- setOthersNickname(server, user, args);
- return;
- }
-
-
- String nick = args[0];
- if ("off".equalsIgnoreCase(nick) || user.getName().equalsIgnoreCase(nick))
- {
- user.setDisplayNick(user.getName());
- user.setNickname(null);
- user.sendMessage(Util.i18n("nickNoMore"));
+ setNickname(server, getPlayer(server, args, 0), formatNickname(user, args[1]));
+ user.sendMessage(_("nickChanged"));
return;
}
+ setNickname(server, user, formatNickname(user, args[0]));
+ }
- if (nick.matches("[^a-zA-Z_0-9]"))
+ @Override
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
+ {
+ if (args.length < 2)
{
- throw new Exception(Util.i18n("nickNamesAlpha"));
+ throw new NotEnoughArgumentsException();
}
-
- for (Player p : server.getOnlinePlayers())
+ if (!ess.getSettings().changeDisplayName())
{
- if (user == p)
- {
- continue;
- }
- String dn = p.getDisplayName().toLowerCase();
- String n = p.getName().toLowerCase();
- String nk = nick.toLowerCase();
- if (nk.equals(dn) || nk.equals(n))
- {
- throw new Exception(Util.i18n("nickInUse"));
- }
+ throw new Exception(_("nickDisplayName"));
}
-
- user.setDisplayNick(ess.getSettings().getNicknamePrefix() + nick);
- user.setNickname(nick);
- user.sendMessage(Util.format("nickSet", user.getDisplayName() + "§7."));
+ setNickname(server, getPlayer(server, args, 0), formatNickname(null, args[1]));
+ sender.sendMessage(_("nickChanged"));
}
- @Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ private String formatNickname(final User user, final String nick)
{
- if (args.length < 2)
+ if (user == null || user.isAuthorized("essentials.nick.color"))
{
- throw new NotEnoughArgumentsException();
+ return nick.replace('&', '\u00a7').replace("\u00a7\u00a7", "&");
}
-
- if (!ess.getSettings().changeDisplayName()) {
- sender.sendMessage(Util.i18n("nickDisplayName"));
- return;
- }
-
- setOthersNickname(server, sender, args);
-
+ return nick;
}
- private void setOthersNickname(Server server, CommandSender sender, String[] args) throws Exception
+ private void setNickname(final Server server, final User target, final String nick) throws Exception
{
- User target = getPlayer(server, args, 0);
- String nick = args[1];
- if ("off".equalsIgnoreCase(nick) || target.getName().equalsIgnoreCase(nick))
+ if (nick.matches("[^a-zA-Z_0-9]"))
+ {
+ throw new Exception(_("nickNamesAlpha"));
+ }
+ else if ("off".equalsIgnoreCase(nick) || target.getName().equalsIgnoreCase(nick))
{
- target.setDisplayNick(target.getName());
target.setNickname(null);
- target.sendMessage(Util.i18n("nickNoMore"));
+ target.setDisplayNick();
+ target.sendMessage(_("nickNoMore"));
}
else
{
- target.setDisplayNick(ess.getSettings().getNicknamePrefix() + nick);
+ for (Player p : server.getOnlinePlayers())
+ {
+ if (target.getBase() == p)
+ {
+ continue;
+ }
+ String dn = p.getDisplayName().toLowerCase(Locale.ENGLISH);
+ String n = p.getName().toLowerCase(Locale.ENGLISH);
+ String nk = nick.toLowerCase(Locale.ENGLISH);
+ if (nk.equals(dn) || nk.equals(n))
+ {
+ throw new Exception(_("nickInUse"));
+ }
+ }
+
target.setNickname(nick);
- target.sendMessage(Util.format("nickSet", target.getDisplayName() + "§7."));
+ target.setDisplayNick();
+ target.sendMessage(_("nickSet", target.getDisplayName() + "§7."));
}
- sender.sendMessage(Util.i18n("nickChanged"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java
index 9aa4f8ac0..df497a352 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java
@@ -22,7 +22,7 @@ public class Commandnuke extends EssentialsCommand
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws NoSuchFieldException, NotEnoughArgumentsException
{
List<Player> targets;
- if (args.length > 0)
+ if (args.length > 0)
{
targets = new ArrayList<Player>();
int pos = 0;
@@ -34,14 +34,15 @@ public class Commandnuke extends EssentialsCommand
}
else
{
- targets = Arrays.asList(server.getOnlinePlayers());
+ targets = Arrays.asList(server.getOnlinePlayers());
}
ess.getTNTListener().enable();
for (Player player : targets)
{
- if (player == null) {
+ if (player == null)
+ {
continue;
- }
+ }
player.sendMessage("May death rain upon them");
final Location loc = player.getLocation();
final World world = loc.getWorld();
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandpay.java b/Essentials/src/com/earth2me/essentials/commands/Commandpay.java
index 9be844996..23ca5c465 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandpay.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandpay.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.entity.Player;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class Commandpay extends EssentialsCommand
@@ -34,9 +34,10 @@ public class Commandpay extends EssentialsCommand
user.payUser(u, amount);
foundUser = true;
}
-
- if(foundUser == false) {
- throw new NoSuchFieldException(Util.i18n("playerNotFound"));
+
+ if (foundUser == false)
+ {
+ throw new NoSuchFieldException(_("playerNotFound"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandping.java b/Essentials/src/com/earth2me/essentials/commands/Commandping.java
index 1f4cdd3dc..1fad701b2 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandping.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandping.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandping extends EssentialsCommand
@@ -15,6 +15,6 @@ public class Commandping extends EssentialsCommand
@Override
public void run(Server server, User player, String commandLabel, String[] args) throws Exception
{
- player.sendMessage(Util.i18n("pong"));
+ player.sendMessage(_("pong"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandpowertool.java b/Essentials/src/com/earth2me/essentials/commands/Commandpowertool.java
index c9e8dea58..b442d4db8 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandpowertool.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandpowertool.java
@@ -1,9 +1,11 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@@ -22,20 +24,20 @@ public class Commandpowertool extends EssentialsCommand
String command = getFinalArg(args, 0);
// check to see if this is a clear all command
- if(command != null && command.equalsIgnoreCase("clearall"))
+ if (command != null && command.equalsIgnoreCase("c:"))
{
user.clearAllPowertools();
- user.sendMessage(Util.i18n("powerToolClearAll"));
+ user.sendMessage(_("powerToolClearAll"));
return;
}
-
+
final ItemStack itemStack = user.getItemInHand();
if (itemStack == null || itemStack.getType() == Material.AIR)
{
- throw new Exception(Util.i18n("powerToolAir"));
+ throw new Exception(_("powerToolAir"));
}
- final String itemName = itemStack.getType().toString().toLowerCase().replaceAll("_", " ");
+ final String itemName = itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replaceAll("_", " ");
List<String> powertools = user.getPowertool(itemStack);
if (command != null && !command.isEmpty())
{
@@ -43,11 +45,11 @@ public class Commandpowertool extends EssentialsCommand
{
if (powertools == null || powertools.isEmpty())
{
- throw new Exception(Util.format("powerToolListEmpty", itemName));
+ throw new Exception(_("powerToolListEmpty", itemName));
}
else
{
- user.sendMessage(Util.format("powerToolList", Util.joinList(powertools), itemName));
+ user.sendMessage(_("powerToolList", Util.joinList(powertools), itemName));
}
return;
}
@@ -58,11 +60,11 @@ public class Commandpowertool extends EssentialsCommand
command = command.substring(2);
if (!powertools.contains(command))
{
- throw new Exception(Util.format("powerToolNoSuchCommandAssigned", command, itemName));
+ throw new Exception(_("powerToolNoSuchCommandAssigned", command, itemName));
}
powertools.remove(command);
- user.sendMessage(Util.format("powerToolRemove", command, itemName));
+ user.sendMessage(_("powerToolRemove", command, itemName));
}
catch (Exception e)
{
@@ -77,7 +79,7 @@ public class Commandpowertool extends EssentialsCommand
command = command.substring(2);
if (powertools.contains(command))
{
- throw new Exception(Util.format("powerToolAlreadySet", command, itemName));
+ throw new Exception(_("powerToolAlreadySet", command, itemName));
}
}
else if (powertools != null && !powertools.isEmpty())
@@ -91,7 +93,7 @@ public class Commandpowertool extends EssentialsCommand
}
powertools.add(command);
- user.sendMessage(Util.format("powerToolAttach", Util.joinList(powertools), itemName));
+ user.sendMessage(_("powerToolAttach", Util.joinList(powertools), itemName));
}
}
else
@@ -100,7 +102,7 @@ public class Commandpowertool extends EssentialsCommand
{
powertools.clear();
}
- user.sendMessage(Util.format("powerToolRemoveAll", itemName));
+ user.sendMessage(_("powerToolRemoveAll", itemName));
}
user.setPowertool(itemStack, powertools);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandpowertooltoggle.java b/Essentials/src/com/earth2me/essentials/commands/Commandpowertooltoggle.java
index af51f2628..c8b737dfa 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandpowertooltoggle.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandpowertooltoggle.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
@@ -15,15 +15,13 @@ public class Commandpowertooltoggle extends EssentialsCommand
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- if(!user.hasPowerTools())
+ if (!user.hasPowerTools())
{
- user.sendMessage(Util.i18n("noPowerTools"));
+ user.sendMessage(_("noPowerTools"));
return;
- }
+ }
user.sendMessage(user.togglePowerToolsEnabled()
- ? Util.i18n("powerToolsEnabled")
- : Util.i18n("powerToolsDisabled"));
+ ? _("powerToolsEnabled")
+ : _("powerToolsDisabled"));
}
-
-
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java
index 115bb20ef..b16cbdc34 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java
@@ -1,17 +1,12 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.DescParseTickFormat;
-import org.bukkit.Server;
-import org.bukkit.command.CommandSender;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
+import java.util.*;
+import org.bukkit.Server;
import org.bukkit.World;
+import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -53,7 +48,7 @@ public class Commandptime extends EssentialsCommand
User user = ess.getUser(sender);
if ((!users.contains(user) || users.size() > 1) && user != null && !user.isAuthorized("essentials.ptime.others"))
{
- user.sendMessage(Util.i18n("pTimeOthersPermission"));
+ user.sendMessage(_("pTimeOthersPermission"));
return;
}
@@ -98,30 +93,28 @@ public class Commandptime extends EssentialsCommand
{
if (users.size() > 1)
{
- sender.sendMessage(Util.format("pTimePlayers"));
+ sender.sendMessage(_("pTimePlayers"));
}
for (User user : users)
{
if (user.getPlayerTimeOffset() == 0)
{
- sender.sendMessage(Util.format("pTimeNormal", user.getName()));
+ sender.sendMessage(_("pTimeNormal", user.getName()));
}
else
{
String time = DescParseTickFormat.format(user.getPlayerTime());
if (!user.isPlayerTimeRelative())
{
- sender.sendMessage(Util.format("pTimeCurrentFixed", user.getName(), time));
+ sender.sendMessage(_("pTimeCurrentFixed", user.getName(), time));
}
else
{
- sender.sendMessage(Util.format("pTimeCurrent", user.getName(), time));
+ sender.sendMessage(_("pTimeCurrent", user.getName(), time));
}
}
}
-
- return;
}
/**
@@ -169,18 +162,18 @@ public class Commandptime extends EssentialsCommand
// Inform the sender of the change
if (ticks == null)
{
- sender.sendMessage(Util.format("pTimeReset", msg.toString()));
+ sender.sendMessage(_("pTimeReset", msg.toString()));
}
else
{
String time = DescParseTickFormat.format(ticks);
if (!relative)
{
- sender.sendMessage(Util.format("pTimeSetFixed", time, msg.toString()));
+ sender.sendMessage(_("pTimeSetFixed", time, msg.toString()));
}
else
{
- sender.sendMessage(Util.format("pTimeSet", time, msg.toString()));
+ sender.sendMessage(_("pTimeSet", time, msg.toString()));
}
}
}
@@ -232,7 +225,7 @@ public class Commandptime extends EssentialsCommand
// We failed to understand the world target...
else
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
return users;
@@ -242,6 +235,7 @@ public class Commandptime extends EssentialsCommand
class UserNameComparator implements Comparator<User>
{
+ @Override
public int compare(User a, User b)
{
return a.getName().compareTo(b.getName());
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandr.java b/Essentials/src/com/earth2me/essentials/commands/Commandr.java
index daf83034a..c53ef1bf0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandr.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandr.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IReplyTo;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import org.bukkit.*;
+import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -32,10 +32,10 @@ public class Commandr extends EssentialsCommand
if (target == null)
{
- throw new Exception(Util.i18n("foreverAlone"));
+ throw new Exception(_("foreverAlone"));
}
- sender.sendMessage(Util.format("msgFormat", Util.i18n("me"), targetName, message));
+ sender.sendMessage(_("msgFormat", _("me"), targetName, message));
if (target instanceof Player)
{
User u = ess.getUser(target);
@@ -44,7 +44,7 @@ public class Commandr extends EssentialsCommand
return;
}
}
- target.sendMessage(Util.format("msgFormat", senderName, Util.i18n("me"), message));
+ target.sendMessage(_("msgFormat", senderName, _("me"), message));
replyTo.setReplyTo(target);
if (target != sender)
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java b/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java
index 5ed4ef9e6..d3d82860d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java
@@ -1,11 +1,12 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
+import java.util.Locale;
+import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import org.bukkit.ChatColor;
public class Commandrealname extends EssentialsCommand
@@ -22,7 +23,7 @@ public class Commandrealname extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- final String whois = args[0].toLowerCase();
+ final String whois = args[0].toLowerCase(Locale.ENGLISH);
for (Player p : server.getOnlinePlayers())
{
final User u = ess.getUser(p);
@@ -30,14 +31,14 @@ public class Commandrealname extends EssentialsCommand
{
continue;
}
- final String displayName = ChatColor.stripColor(u.getDisplayName()).toLowerCase();
+ final String displayName = ChatColor.stripColor(u.getDisplayName()).toLowerCase(Locale.ENGLISH);
if (!whois.equals(displayName)
&& !displayName.equals(ChatColor.stripColor(ess.getSettings().getNicknamePrefix()) + whois)
&& !whois.equalsIgnoreCase(u.getName()))
{
continue;
}
- sender.sendMessage(u.getDisplayName() + " " + Util.i18n("is") + " " + u.getName());
+ sender.sendMessage(u.getDisplayName() + " " + _("is") + " " + u.getName());
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandreloadall.java b/Essentials/src/com/earth2me/essentials/commands/Commandreloadall.java
deleted file mode 100644
index bd4f59dcc..000000000
--- a/Essentials/src/com/earth2me/essentials/commands/Commandreloadall.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.earth2me.essentials.commands;
-
-import com.earth2me.essentials.Util;
-import org.bukkit.Server;
-import org.bukkit.command.CommandSender;
-
-
-public class Commandreloadall extends EssentialsCommand
-{
- public Commandreloadall()
- {
- super("reloadall");
- }
-
- @Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
- {
- server.reload();
- sender.sendMessage(Util.i18n("reloadAllPlugins"));
- }
-}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java
index d6bcad464..50c6ac7af 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java
@@ -1,12 +1,10 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.ChargeException;
-import com.earth2me.essentials.IUser;
-import com.earth2me.essentials.Trade;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.*;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@@ -32,9 +30,9 @@ public class Commandrepair extends EssentialsCommand
final ItemStack item = user.getItemInHand();
if (item == null)
{
- throw new Exception(Util.i18n("repairInvalidType"));
+ throw new Exception(_("repairInvalidType"));
}
- final String itemName = item.getType().toString().toLowerCase();
+ final String itemName = item.getType().toString().toLowerCase(Locale.ENGLISH);
final Trade charge = new Trade("repair-" + itemName.replace('_', '-'), ess);
charge.isAffordableFor(user);
@@ -43,22 +41,25 @@ public class Commandrepair extends EssentialsCommand
charge.charge(user);
- user.sendMessage(Util.format("repair", itemName.replace('_', ' ')));
+ user.sendMessage(_("repair", itemName.replace('_', ' ')));
}
else if (args[0].equalsIgnoreCase("all"))
{
final List<String> repaired = new ArrayList<String>();
repairItems(user.getInventory().getContents(), user, repaired);
- repairItems(user.getInventory().getArmorContents(), user, repaired);
+ if (user.isAuthorized("essentials.repair.armor"))
+ {
+ repairItems(user.getInventory().getArmorContents(), user, repaired);
+ }
if (repaired.isEmpty())
{
- throw new Exception(Util.format("repairNone"));
+ throw new Exception(_("repairNone"));
}
else
{
- user.sendMessage(Util.format("repair", Util.joinList(repaired)));
+ user.sendMessage(_("repair", Util.joinList(repaired)));
}
}
@@ -73,12 +74,12 @@ public class Commandrepair extends EssentialsCommand
final Material material = Material.getMaterial(item.getTypeId());
if (material.isBlock() || material.getMaxDurability() < 0)
{
- throw new Exception(Util.i18n("repairInvalidType"));
+ throw new Exception(_("repairInvalidType"));
}
if (item.getDurability() == 0)
{
- throw new Exception(Util.i18n("repairAlreadyFixed"));
+ throw new Exception(_("repairAlreadyFixed"));
}
item.setDurability((short)0);
@@ -92,7 +93,7 @@ public class Commandrepair extends EssentialsCommand
{
continue;
}
- final String itemName = item.getType().toString().toLowerCase();
+ final String itemName = item.getType().toString().toLowerCase(Locale.ENGLISH);
final Trade charge = new Trade("repair-" + itemName.replace('_', '-'), ess);
try
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrules.java b/Essentials/src/com/earth2me/essentials/commands/Commandrules.java
index 39f7de68e..32cadf69e 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandrules.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandrules.java
@@ -1,6 +1,9 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import com.earth2me.essentials.textreader.IText;
+import com.earth2me.essentials.textreader.KeywordReplacer;
+import com.earth2me.essentials.textreader.TextInput;
+import com.earth2me.essentials.textreader.TextPager;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -13,11 +16,11 @@ public class Commandrules extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, String[] args) throws Exception
{
- for (String m : ess.getLines(sender, "rules", Util.i18n("noRules")))
- {
- sender.sendMessage(m);
- }
+ final IText input = new TextInput(sender, "rules", true, ess);
+ final IText output = new KeywordReplacer(input, sender, ess);
+ final TextPager pager = new TextPager(output);
+ pager.showPage(args.length > 0 ? args[0] : null, args.length > 1 ? args[1] : null, sender);
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java
index c355f5aff..391ed36b3 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java
@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
@@ -23,16 +24,16 @@ public class Commandseen extends EssentialsCommand
try
{
User u = getPlayer(server, args, 0);
- sender.sendMessage(Util.format("seenOnline",u.getDisplayName(), Util.formatDateDiff(u.getLastLogin())));
+ sender.sendMessage(_("seenOnline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogin())));
}
catch (NoSuchFieldException e)
{
User u = ess.getOfflineUser(args[0]);
if (u == null)
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
- sender.sendMessage(Util.format("seenOffline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogout())));
+ sender.sendMessage(_("seenOffline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogout())));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java
index a8ef83dc0..9ca622aef 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java
@@ -1,12 +1,14 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.InventoryWorkaround;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import java.util.Locale;
import java.util.logging.Level;
import org.bukkit.Material;
+import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@@ -76,7 +78,7 @@ public class Commandsell extends EssentialsCommand
{
if (is == null || is.getType() == Material.AIR)
{
- throw new Exception(Util.i18n("itemSellAir"));
+ throw new Exception(_("itemSellAir"));
}
int id = is.getTypeId();
int amount = 0;
@@ -94,11 +96,11 @@ public class Commandsell extends EssentialsCommand
if (Double.isNaN(worth))
{
- throw new Exception(Util.i18n("itemCannotBeSold"));
+ throw new Exception(_("itemCannotBeSold"));
}
if (requireStack && !stack)
{
- throw new Exception(Util.i18n("itemMustBeStacked"));
+ throw new Exception(_("itemMustBeStacked"));
}
@@ -137,9 +139,9 @@ public class Commandsell extends EssentialsCommand
{
if (!isBulkSell)
{
- user.sendMessage(Util.i18n("itemNotEnough1"));
- user.sendMessage(Util.i18n("itemNotEnough2"));
- throw new Exception(Util.i18n("itemNotEnough3"));
+ user.sendMessage(_("itemNotEnough1"));
+ user.sendMessage(_("itemNotEnough2"));
+ throw new Exception(_("itemNotEnough3"));
}
else
{
@@ -152,8 +154,8 @@ public class Commandsell extends EssentialsCommand
user.updateInventory();
Trade.log("Command", "Sell", "Item", user.getName(), new Trade(ris, ess), user.getName(), new Trade(worth * amount, ess), user.getLocation(), ess);
user.giveMoney(worth * amount);
- user.sendMessage(Util.format("itemSold", Util.formatCurrency(worth * amount, ess), amount, is.getType().toString().toLowerCase(), Util.formatCurrency(worth, ess)));
- logger.log(Level.INFO, Util.format("itemSoldConsole", user.getDisplayName(), is.getType().toString().toLowerCase(), Util.formatCurrency(worth * amount, ess), amount, Util.formatCurrency(worth, ess)));
+ user.sendMessage(_("itemSold", Util.formatCurrency(worth * amount, ess), amount, is.getType().toString().toLowerCase(Locale.ENGLISH), Util.formatCurrency(worth, ess)));
+ logger.log(Level.INFO, _("itemSoldConsole", user.getDisplayName(), is.getType().toString().toLowerCase(Locale.ENGLISH), Util.formatCurrency(worth * amount, ess), amount, Util.formatCurrency(worth, ess)));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java
index b59984f05..6d05e4e3e 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java
@@ -1,8 +1,9 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import java.util.Locale;
+import org.bukkit.Server;
public class Commandsethome extends EssentialsCommand
@@ -29,18 +30,19 @@ public class Commandsethome extends EssentialsCommand
if (user.isAuthorized("essentials.sethome.multiple"))
{
if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomes().size() < ess.getSettings().getHomeLimit(user))
- || (user.getHomes().contains(args[0].toLowerCase())))
+ || (user.getHomes().contains(args[0].toLowerCase(Locale.ENGLISH))))
{
- user.setHome(args[0].toLowerCase());
+ user.setHome(args[0].toLowerCase(Locale.ENGLISH));
}
else
{
- throw new Exception(Util.format("maxHomes", ess.getSettings().getHomeLimit(user)));
+ throw new Exception(_("maxHomes", ess.getSettings().getHomeLimit(user)));
}
}
- else {
- throw new Exception(Util.format("maxHomes", 1));
+ else
+ {
+ throw new Exception(_("maxHomes", 1));
}
}
else
@@ -54,9 +56,9 @@ public class Commandsethome extends EssentialsCommand
}
if (usersHome == null)
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
- String name = args[1].toLowerCase();
+ String name = args[1].toLowerCase(Locale.ENGLISH);
if (!user.isAuthorized("essentials.sethome.multiple"))
{
name = "home";
@@ -69,7 +71,7 @@ public class Commandsethome extends EssentialsCommand
{
user.setHome();
}
- user.sendMessage(Util.i18n("homeSet"));
+ user.sendMessage(_("homeSet"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetjail.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetjail.java
index d9b0eac4d..506829ad9 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsetjail.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetjail.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandsetjail extends EssentialsCommand
@@ -11,7 +11,7 @@ public class Commandsetjail extends EssentialsCommand
{
super("setjail");
}
-
+
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
@@ -20,7 +20,7 @@ public class Commandsetjail extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
ess.getJail().setJail(user.getLocation(), args[0]);
- user.sendMessage(Util.format("jailSet",args[0]));
-
+ user.sendMessage(_("jailSet", args[0]));
+
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java
index ccdacab57..77bbee7c0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
import org.bukkit.Location;
import org.bukkit.Server;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class Commandsetwarp extends EssentialsCommand
@@ -23,6 +23,6 @@ public class Commandsetwarp extends EssentialsCommand
Location loc = user.getLocation();
ess.getWarps().setWarp(args[0], loc);
- user.sendMessage(Util.format("warpSet", args[0]));
+ user.sendMessage(_("warpSet", args[0]));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java
index 086b1549d..3f80fddf1 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@@ -23,6 +23,6 @@ public class Commandsetworth extends EssentialsCommand
ItemStack stack = ess.getItemDb().get(args[0]);
ess.getWorth().setPrice(stack, Double.parseDouble(args[1]));
- user.sendMessage(Util.i18n("worthSet"));
+ user.sendMessage(_("worthSet"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java b/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java
index 8e95e8237..b7ce4edcb 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.commands;
+
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
-
public class Commandsocialspy extends EssentialsCommand
{
public Commandsocialspy()
@@ -15,6 +15,6 @@ public class Commandsocialspy extends EssentialsCommand
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
- user.sendMessage("§7SocialSpy " + (user.toggleSocialSpy() ? Util.i18n("enabled") : Util.i18n("disabled")));
+ user.sendMessage("§7SocialSpy " + (user.toggleSocialSpy() ? _("enabled") : _("disabled")));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
index 18e4fb349..e92b29a93 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
@@ -1,8 +1,10 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Mob;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
@@ -25,30 +27,29 @@ public class Commandspawner extends EssentialsCommand
//TODO: user.sendMessage("§7Mobs: Zombie PigZombie Skeleton Slime Chicken Pig Monster Spider Creeper Ghast Squid Giant Cow Sheep Wolf");
}
- final Block target = user.getTarget().getTargetBlock();
- if (target.getType() != Material.MOB_SPAWNER)
+ final Location target = Util.getTarget(user);
+ if (target == null || target.getBlock().getType() != Material.MOB_SPAWNER)
{
- throw new Exception(Util.i18n("mobSpawnTarget"));
+ throw new Exception(_("mobSpawnTarget"));
}
try
{
String name = args[0];
- name = name.equalsIgnoreCase("CaveSpider") ? "CaveSpider" : name.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(name);
Mob mob = null;
mob = Mob.fromName(name);
if (mob == null)
{
- user.sendMessage(Util.i18n("invalidMob"));
+ user.sendMessage(_("invalidMob"));
return;
}
- ((CreatureSpawner)target.getState()).setCreatureType(mob.getType());
- user.sendMessage(Util.format("setSpawner", mob.name));
+ ((CreatureSpawner)target.getBlock().getState()).setCreatureType(mob.getType());
+ user.sendMessage(_("setSpawner", mob.name));
}
catch (Throwable ex)
{
- throw new Exception(Util.i18n("mobSpawnError"), ex);
+ throw new Exception(_("mobSpawnError"), ex);
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
index 3ea3aae40..eb26d29b1 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
@@ -1,20 +1,17 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Location;
-import org.bukkit.Server;
-import com.earth2me.essentials.User;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Mob;
import com.earth2me.essentials.Mob.MobException;
-import com.earth2me.essentials.TargetBlock;
+import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import java.util.Locale;
import java.util.Random;
import org.bukkit.DyeColor;
+import org.bukkit.Location;
+import org.bukkit.Server;
import org.bukkit.block.Block;
-import org.bukkit.entity.Creeper;
-import org.bukkit.entity.Entity;
-import org.bukkit.entity.Sheep;
-import org.bukkit.entity.Slime;
-import org.bukkit.entity.Wolf;
+import org.bukkit.entity.*;
public class Commandspawnmob extends EssentialsCommand
@@ -37,7 +34,6 @@ public class Commandspawnmob extends EssentialsCommand
String[] mountparts = args[0].split(",");
String[] parts = mountparts[0].split(":");
String mobType = parts[0];
- mobType = mobType.equalsIgnoreCase("CaveSpider") ? "CaveSpider" : mobType.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(mobType);
String mobData = null;
if (parts.length == 2)
{
@@ -49,7 +45,6 @@ public class Commandspawnmob extends EssentialsCommand
{
parts = mountparts[1].split(":");
mountType = parts[0];
- mountType = mountType.equalsIgnoreCase("CaveSpider") ? "CaveSpider" : mountType.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(mountType);
if (parts.length == 2)
{
mountData = parts[1];
@@ -65,22 +60,18 @@ public class Commandspawnmob extends EssentialsCommand
mob = Mob.fromName(mobType);
if (mob == null)
{
- throw new Exception(Util.i18n("invalidMob"));
+ throw new Exception(_("invalidMob"));
}
-
- if (ess.getSettings().getProtectPreventSpawn(mob.getType().toString().toLowerCase()))
+
+ if (ess.getSettings().getProtectPreventSpawn(mob.getType().toString().toLowerCase(Locale.ENGLISH)))
{
- throw new Exception(Util.i18n("unableToSpawnMob"));
+ throw new Exception(_("unableToSpawnMob"));
}
- int[] ignore =
- {
- 8, 9
- };
- Block block = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock();
+ final Block block = Util.getTarget(user).getBlock();
if (block == null)
{
- throw new Exception(Util.i18n("unableToSpawnMob"));
+ throw new Exception(_("unableToSpawnMob"));
}
Location loc = block.getLocation();
Location sloc = Util.getSafeDestination(loc);
@@ -90,7 +81,7 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (MobException e)
{
- throw new Exception(Util.i18n("unableToSpawnMob"));
+ throw new Exception(_("unableToSpawnMob"));
}
if (mountType != null)
@@ -98,13 +89,13 @@ public class Commandspawnmob extends EssentialsCommand
mobMount = Mob.fromName(mountType);
if (mobMount == null)
{
- user.sendMessage(Util.i18n("invalidMob"));
+ user.sendMessage(_("invalidMob"));
return;
}
-
- if (ess.getSettings().getProtectPreventSpawn(mobMount.getType().toString().toLowerCase()))
+
+ if (ess.getSettings().getProtectPreventSpawn(mobMount.getType().toString().toLowerCase(Locale.ENGLISH)))
{
- throw new Exception(Util.i18n("unableToSpawnMob"));
+ throw new Exception(_("unableToSpawnMob"));
}
try
{
@@ -112,7 +103,7 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (MobException e)
{
- throw new Exception(Util.i18n("unableToSpawnMob"));
+ throw new Exception(_("unableToSpawnMob"));
}
spawnedMob.setPassenger(spawnedMount);
}
@@ -131,7 +122,7 @@ public class Commandspawnmob extends EssentialsCommand
if (mobCount > serverLimit)
{
mobCount = serverLimit;
- user.sendMessage(Util.i18n("mobSpawnLimit"));
+ user.sendMessage(_("mobSpawnLimit"));
}
try
@@ -147,7 +138,7 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (MobException e)
{
- throw new Exception(Util.i18n("unableToSpawnMob"));
+ throw new Exception(_("unableToSpawnMob"));
}
spawnedMob.setPassenger(spawnedMount);
}
@@ -160,24 +151,24 @@ public class Commandspawnmob extends EssentialsCommand
changeMobData(mobMount.name, spawnedMount, mountData, user);
}
}
- user.sendMessage(args[1] + " " + mob.name.toLowerCase() + mob.suffix + " " + Util.i18n("spawned"));
+ user.sendMessage(args[1] + " " + mob.name.toLowerCase(Locale.ENGLISH) + mob.suffix + " " + _("spawned"));
}
catch (MobException e1)
{
- throw new Exception(Util.i18n("unableToSpawnMob"), e1);
+ throw new Exception(_("unableToSpawnMob"), e1);
}
catch (NumberFormatException e2)
{
- throw new Exception(Util.i18n("numberRequired"), e2);
+ throw new Exception(_("numberRequired"), e2);
}
catch (NullPointerException np)
{
- throw new Exception(Util.i18n("soloMob"), np);
+ throw new Exception(_("soloMob"), np);
}
}
else
{
- user.sendMessage(mob.name + " " + Util.i18n("spawned"));
+ user.sendMessage(mob.name + " " + _("spawned"));
}
}
@@ -191,9 +182,19 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (Exception e)
{
- throw new Exception(Util.i18n("slimeMalformedSize"), e);
+ throw new Exception(_("slimeMalformedSize"), e);
}
}
+ if (("Sheep".equalsIgnoreCase(type)
+ || "Cow".equalsIgnoreCase(type)
+ || "Chicken".equalsIgnoreCase(type)
+ || "Pig".equalsIgnoreCase(type)
+ || "Wolf".equalsIgnoreCase(type))
+ && data.equalsIgnoreCase("baby"))
+ {
+ ((Animals)spawned).setAge(-24000);
+ return;
+ }
if ("Sheep".equalsIgnoreCase(type))
{
try
@@ -210,19 +211,29 @@ public class Commandspawnmob extends EssentialsCommand
}
catch (Exception e)
{
- throw new Exception(Util.i18n("sheepMalformedColor"), e);
+ throw new Exception(_("sheepMalformedColor"), e);
}
}
- if ("Wolf".equalsIgnoreCase(type) && data.equalsIgnoreCase("tamed"))
+ if ("Wolf".equalsIgnoreCase(type)
+ && data.toLowerCase(Locale.ENGLISH).startsWith("tamed"))
{
- Wolf wolf = ((Wolf)spawned);
+ final Wolf wolf = ((Wolf)spawned);
wolf.setTamed(true);
wolf.setOwner(user);
wolf.setSitting(true);
+ if (data.equalsIgnoreCase("tamedbaby"))
+ {
+ ((Animals)spawned).setAge(-24000);
+ }
}
- if ("Wolf".equalsIgnoreCase(type) && data.equalsIgnoreCase("angry"))
+ if ("Wolf".equalsIgnoreCase(type)
+ && data.toLowerCase(Locale.ENGLISH).startsWith("angry"))
{
((Wolf)spawned).setAngry(true);
+ if (data.equalsIgnoreCase("angrybaby"))
+ {
+ ((Animals)spawned).setAge(-24000);
+ }
}
if ("Creeper".equalsIgnoreCase(type) && data.equalsIgnoreCase("powered"))
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java
new file mode 100644
index 000000000..7f758ad2e
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java
@@ -0,0 +1,42 @@
+package com.earth2me.essentials.commands;
+
+import com.earth2me.essentials.User;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+import org.bukkit.command.PluginCommand;
+
+
+public class Commandsudo extends EssentialsCommand
+{
+ public Commandsudo()
+ {
+ super("sudo");
+ }
+
+ @Override
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+
+ final User user = getPlayer(server, args, 0, false);
+ final String command = args[1];
+ final String[] arguments = new String[args.length - 2];
+ if (arguments.length > 0)
+ {
+ System.arraycopy(args, 2, arguments, 0, args.length - 2);
+ }
+
+ //TODO: Translate this.
+ sender.sendMessage("Running the command as " + user.getDisplayName());
+
+ final PluginCommand execCommand = ess.getServer().getPluginCommand(command);
+ if (execCommand != null)
+ {
+ execCommand.execute(user.getBase(), command, arguments);
+ }
+
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java b/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java
index ca9fee47b..aa2ed5567 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandsuicide extends EssentialsCommand
@@ -13,11 +13,11 @@ public class Commandsuicide extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
user.setHealth(0);
- user.sendMessage(Util.i18n("suicideMessage"));
+ user.sendMessage(_("suicideMessage"));
ess.broadcastMessage(user,
- Util.format("suicideSuccess",user.getDisplayName()));
+ _("suicideSuccess", user.getDisplayName()));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
index bc8442da4..144d19d15 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
@@ -1,11 +1,12 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.OfflinePlayer;
-import org.bukkit.Server;
-import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -23,40 +24,40 @@ public class Commandtempban extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- final User player = getPlayer(server, args, 0, true);
- if (player.getBase() instanceof OfflinePlayer)
+ final User user = getPlayer(server, args, 0, true);
+ if (user.getBase() instanceof OfflinePlayer)
{
if (sender instanceof Player
&& !ess.getUser(sender).isAuthorized("essentials.tempban.offline"))
{
- sender.sendMessage(Util.i18n("tempbanExempt"));
+ sender.sendMessage(_("tempbanExempt"));
return;
}
}
else
{
- if (player.isAuthorized("essentials.tempban.exempt"))
+ if (user.isAuthorized("essentials.tempban.exempt"))
{
- sender.sendMessage(Util.i18n("tempbanExempt"));
+ sender.sendMessage(_("tempbanExempt"));
return;
}
}
final String time = getFinalArg(args, 1);
final long banTimestamp = Util.parseDateDiff(time, true);
- final String banReason = Util.format("tempBanned", Util.formatDateDiff(banTimestamp));
- player.setBanReason(banReason);
- player.setBanTimeout(banTimestamp);
- player.setBanned(true);
- player.kickPlayer(banReason);
- String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
-
- for(Player p : server.getOnlinePlayers())
+ final String banReason = _("tempBanned", Util.formatDateDiff(banTimestamp));
+ user.setBanReason(banReason);
+ user.setBanTimeout(banTimestamp);
+ user.setBanned(true);
+ user.kickPlayer(banReason);
+ final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
+
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- User u = ess.getUser(p);
- if(u.isAuthorized("essentials.ban.notify"))
+ final User player = ess.getUser(onlinePlayer);
+ if (player.isAuthorized("essentials.ban.notify"))
{
- p.sendMessage(Util.format("playerBanned", senderName, player.getName(), banReason));
+ onlinePlayer.sendMessage(_("playerBanned", senderName, user.getName(), banReason));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandthunder.java b/Essentials/src/com/earth2me/essentials/commands/Commandthunder.java
index 34f5c3fed..3cb60e6e3 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandthunder.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandthunder.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.World;
@@ -14,27 +14,27 @@ public class Commandthunder extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- World world = user.getWorld();
- boolean setThunder = args[0].equalsIgnoreCase("true");
+ final World world = user.getWorld();
+ final boolean setThunder = args[0].equalsIgnoreCase("true");
if (args.length > 1)
{
world.setThundering(setThunder ? true : false);
world.setThunderDuration(Integer.parseInt(args[1]) * 20);
- user.sendMessage(Util.format("thunderDuration", (setThunder ? Util.i18n("enabled") : Util.i18n("disabled")), Integer.parseInt(args[1])));
-
+ user.sendMessage(_("thunderDuration", (setThunder ? _("enabled") : _("disabled")), Integer.parseInt(args[1])));
+
}
else
{
world.setThundering(setThunder ? true : false);
- user.sendMessage(Util.format("thunder", setThunder ? Util.i18n("enabled") : Util.i18n("disabled")));
+ user.sendMessage(_("thunder", setThunder ? _("enabled") : _("disabled")));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtime.java b/Essentials/src/com/earth2me/essentials/commands/Commandtime.java
index 687396f53..c49f34fbd 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtime.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtime.java
@@ -1,12 +1,12 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.DescParseTickFormat;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
+import java.util.*;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.util.*;
public class Commandtime extends EssentialsCommand
@@ -37,7 +37,7 @@ public class Commandtime extends EssentialsCommand
final User user = ess.getUser(sender);
if (user != null && !user.isAuthorized("essentials.time.set"))
{
- user.sendMessage(Util.i18n("timeSetPermission"));
+ user.sendMessage(_("timeSetPermission"));
return;
}
@@ -58,26 +58,25 @@ public class Commandtime extends EssentialsCommand
/**
* Used to get the time and inform
*/
- private void getWorldsTime(CommandSender sender, Collection<World> worlds)
+ private void getWorldsTime(final CommandSender sender, final Collection<World> worlds)
{
if (worlds.size() == 1)
{
- Iterator<World> iter = worlds.iterator();
+ final Iterator<World> iter = worlds.iterator();
sender.sendMessage(DescParseTickFormat.format(iter.next().getTime()));
return;
}
for (World world : worlds)
{
- sender.sendMessage(Util.format("timeCurrentWorld", world.getName(), DescParseTickFormat.format(world.getTime())));
+ sender.sendMessage(_("timeWorldCurrent", world.getName(), DescParseTickFormat.format(world.getTime())));
}
- return;
}
/**
* Used to set the time and inform of the change
*/
- private void setWorldsTime(CommandSender sender, Collection<World> worlds, long ticks)
+ private void setWorldsTime(final CommandSender sender, final Collection<World> worlds, final long ticks)
{
// Update the time
for (World world : worlds)
@@ -87,35 +86,31 @@ public class Commandtime extends EssentialsCommand
world.setTime(time + 24000 + ticks);
}
- // Inform the sender of the change
- //sender.sendMessage("");
-
- StringBuilder msg = new StringBuilder();
- boolean first = true;
+ final StringBuilder output = new StringBuilder();
for (World world : worlds)
{
- if (msg.length() > 0)
+ if (output.length() > 0)
{
- msg.append(", ");
+ output.append(", ");
}
- msg.append(world.getName());
+ output.append(world.getName());
}
- sender.sendMessage(Util.format("timeWorldSet", DescParseTickFormat.format(ticks), msg.toString()));
+ sender.sendMessage(_("timeWorldSet", DescParseTickFormat.format(ticks), output.toString()));
}
/**
* Used to parse an argument of the type "world(s) selector"
*/
- private Set<World> getWorlds(Server server, CommandSender sender, String selector) throws Exception
+ private Set<World> getWorlds(final Server server, final CommandSender sender, final String selector) throws Exception
{
- Set<World> worlds = new TreeSet<World>(new WorldNameComparator());
+ final Set<World> worlds = new TreeSet<World>(new WorldNameComparator());
// If there is no selector we want the world the user is currently in. Or all worlds if it isn't a user.
if (selector == null)
{
- User user = ess.getUser(sender);
+ final User user = ess.getUser(sender);
if (user == null)
{
worlds.addAll(server.getWorlds());
@@ -128,7 +123,7 @@ public class Commandtime extends EssentialsCommand
}
// Try to find the world with name = selector
- World world = server.getWorld(selector);
+ final World world = server.getWorld(selector);
if (world != null)
{
worlds.add(world);
@@ -141,7 +136,7 @@ public class Commandtime extends EssentialsCommand
// We failed to understand the world target...
else
{
- throw new Exception(Util.i18n("invalidWorld"));
+ throw new Exception(_("invalidWorld"));
}
return worlds;
@@ -151,7 +146,8 @@ public class Commandtime extends EssentialsCommand
class WorldNameComparator implements Comparator<World>
{
- public int compare(World a, World b)
+ @Override
+ public int compare(final World a, final World b)
{
return a.getName().compareTo(b.getName());
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java
index 625a375d8..323836ffb 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java
@@ -1,10 +1,11 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.OfflinePlayer;
-import org.bukkit.Server;
-import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -16,90 +17,90 @@ public class Commandtogglejail extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- User p = getPlayer(server, args, 0, true);
+ final User player = getPlayer(server, args, 0, true);
- if (args.length >= 2 && !p.isJailed())
+ if (args.length >= 2 && !player.isJailed())
{
- if (p.getBase() instanceof OfflinePlayer)
+ if (player.getBase() instanceof OfflinePlayer)
{
if (sender instanceof Player
&& !ess.getUser(sender).isAuthorized("essentials.togglejail.offline"))
{
- sender.sendMessage(Util.i18n("mayNotJail"));
+ sender.sendMessage(_("mayNotJail"));
return;
}
}
else
{
- if (p.isAuthorized("essentials.jail.exempt"))
+ if (player.isAuthorized("essentials.jail.exempt"))
{
- sender.sendMessage(Util.i18n("mayNotJail"));
+ sender.sendMessage(_("mayNotJail"));
return;
}
}
- if (!(p.getBase() instanceof OfflinePlayer))
+ if (!(player.getBase() instanceof OfflinePlayer))
{
- ess.getJail().sendToJail(p, args[1]);
+ ess.getJail().sendToJail(player, args[1]);
}
else
{
// Check if jail exists
ess.getJail().getJail(args[1]);
}
- p.setJailed(true);
- p.sendMessage(Util.i18n("userJailed"));
- p.setJail(null);
- p.setJail(args[1]);
+ player.setJailed(true);
+ player.sendMessage(_("userJailed"));
+ player.setJail(null);
+ player.setJail(args[1]);
long timeDiff = 0;
if (args.length > 2)
{
- String time = getFinalArg(args, 2);
+ final String time = getFinalArg(args, 2);
timeDiff = Util.parseDateDiff(time, true);
- p.setJailTimeout(timeDiff);
+ player.setJailTimeout(timeDiff);
}
sender.sendMessage((timeDiff > 0
- ? Util.format("playerJailedFor", p.getName(), Util.formatDateDiff(timeDiff))
- : Util.format("playerJailed", p.getName())));
+ ? _("playerJailedFor", player.getName(), Util.formatDateDiff(timeDiff))
+ : _("playerJailed", player.getName())));
return;
}
- if (args.length >= 2 && p.isJailed() && !args[1].equalsIgnoreCase(p.getJail()))
+ if (args.length >= 2 && player.isJailed() && !args[1].equalsIgnoreCase(player.getJail()))
{
- sender.sendMessage(Util.format("jailAlreadyIncarcerated", p.getJail()));
+ sender.sendMessage(_("jailAlreadyIncarcerated", player.getJail()));
return;
}
- if (args.length >= 2 && p.isJailed() && args[1].equalsIgnoreCase(p.getJail()))
+ if (args.length >= 2 && player.isJailed() && args[1].equalsIgnoreCase(player.getJail()))
{
- String time = getFinalArg(args, 2);
- long timeDiff = Util.parseDateDiff(time, true);
- p.setJailTimeout(timeDiff);
- sender.sendMessage(Util.format("jailSentenceExtended", Util.formatDateDiff(timeDiff)));
+ final String time = getFinalArg(args, 2);
+ final long timeDiff = Util.parseDateDiff(time, true);
+ player.setJailTimeout(timeDiff);
+ sender.sendMessage(_("jailSentenceExtended", Util.formatDateDiff(timeDiff)));
return;
}
- if (args.length == 1 || (args.length == 2 && args[1].equalsIgnoreCase(p.getJail())))
+ if (args.length == 1 || (args.length == 2 && args[1].equalsIgnoreCase(player.getJail())))
{
- if (!p.isJailed())
+ if (!player.isJailed())
{
throw new NotEnoughArgumentsException();
}
- p.setJailed(false);
- p.setJailTimeout(0);
- p.sendMessage(Util.format("jailReleasedPlayerNotify"));
- p.setJail(null);
- if (!(p.getBase() instanceof OfflinePlayer))
+ player.setJailed(false);
+ player.setJailTimeout(0);
+ player.sendMessage(_("jailReleasedPlayerNotify"));
+ player.setJail(null);
+ if (!(player.getBase() instanceof OfflinePlayer))
{
- p.getTeleport().back();
+ player.getTeleport().back();
}
- sender.sendMessage(Util.format("jailReleased", p.getName()));
+ sender.sendMessage(_("jailReleased", player.getName()));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
index ee5bfbe45..5cd9376cd 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.User;
import org.bukkit.Location;
import org.bukkit.Server;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class Commandtop extends EssentialsCommand
@@ -15,12 +15,12 @@ public class Commandtop extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- int topX = user.getLocation().getBlockX();
- int topZ = user.getLocation().getBlockZ();
- int topY = user.getWorld().getHighestBlockYAt(topX, topZ);
+ final int topX = user.getLocation().getBlockX();
+ final int topZ = user.getLocation().getBlockZ();
+ final int topY = user.getWorld().getHighestBlockYAt(topX, topZ);
user.getTeleport().teleport(new Location(user.getWorld(), user.getLocation().getX(), topY + 1, user.getLocation().getZ()), new Trade(this.getName(), ess));
- user.sendMessage(Util.i18n("teleportTop"));
+ user.sendMessage(_("teleportTop"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
index 480fb6153..ac3991060 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Trade;
import com.earth2me.essentials.Console;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -16,7 +16,7 @@ public class Commandtp extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
switch (args.length)
{
@@ -24,44 +24,43 @@ public class Commandtp extends EssentialsCommand
throw new NotEnoughArgumentsException();
case 1:
- User p = getPlayer(server, args, 0);
- if (!p.isTeleportEnabled())
+ final User player = getPlayer(server, args, 0);
+ if (!player.isTeleportEnabled())
{
- throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
+ throw new Exception(_("teleportDisabled", player.getDisplayName()));
}
- user.sendMessage(Util.i18n("teleporting"));
- Trade charge = new Trade(this.getName(), ess);
+ user.sendMessage(_("teleporting"));
+ final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
- user.getTeleport().teleport(p, charge);
+ user.getTeleport().teleport(player, charge);
throw new NoChargeException();
- case 2:
+ default:
if (!user.isAuthorized("essentials.tpohere"))
{
throw new Exception("You need access to /tpohere to teleport other players.");
}
- user.sendMessage(Util.i18n("teleporting"));
- User target = getPlayer(server, args, 0);
- User toPlayer = getPlayer(server, args, 1);
+ user.sendMessage(_("teleporting"));
+ final User target = getPlayer(server, args, 0);
+ final User toPlayer = getPlayer(server, args, 1);
target.getTeleport().now(toPlayer, false);
- target.sendMessage(Util.format("teleportAtoB", user.getDisplayName(), toPlayer.getDisplayName()));
+ target.sendMessage(_("teleportAtoB", user.getDisplayName(), toPlayer.getDisplayName()));
break;
- }
+ }
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
- sender.sendMessage(Util.i18n("teleporting"));
- User target = getPlayer(server, args, 0);
- User toPlayer = getPlayer(server, args, 1);
+ sender.sendMessage(_("teleporting"));
+ final User target = getPlayer(server, args, 0);
+ final User toPlayer = getPlayer(server, args, 1);
target.getTeleport().now(toPlayer, false);
- target.sendMessage(Util.format("teleportAtoB", Console.NAME, toPlayer.getDisplayName()));
- return;
+ target.sendMessage(_("teleportAtoB", Console.NAME, toPlayer.getDisplayName()));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java
index 32cbe3bd9..5b810e611 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandtpa extends EssentialsCommand
@@ -20,18 +20,18 @@ public class Commandtpa extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- User p = getPlayer(server, args, 0);
- if (!p.isTeleportEnabled())
+ User player = getPlayer(server, args, 0);
+ if (!player.isTeleportEnabled())
{
- throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
+ throw new Exception(_("teleportDisabled", player.getDisplayName()));
}
- if (!p.isIgnoredPlayer(user.getName()))
+ if (!player.isIgnoredPlayer(user.getName()))
{
- p.requestTeleport(user, false);
- p.sendMessage(Util.format("teleportRequest", user.getDisplayName()));
- p.sendMessage(Util.i18n("typeTpaccept"));
- p.sendMessage(Util.i18n("typeTpdeny"));
+ player.requestTeleport(user, false);
+ player.sendMessage(_("teleportRequest", user.getDisplayName()));
+ player.sendMessage(_("typeTpaccept"));
+ player.sendMessage(_("typeTpdeny"));
}
- user.sendMessage(Util.format("requestSent", p.getDisplayName()));
+ user.sendMessage(_("requestSent", player.getDisplayName()));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java
index 97897852f..7a5d078f3 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -15,7 +15,7 @@ public class Commandtpaall extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -27,29 +27,29 @@ public class Commandtpaall extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- User p = getPlayer(server, args, 0);
- teleportAAllPlayers(server, sender, p);
+ final User player = getPlayer(server, args, 0);
+ teleportAAllPlayers(server, sender, player);
}
- private void teleportAAllPlayers(Server server, CommandSender sender, User p)
+ private void teleportAAllPlayers(final Server server, final CommandSender sender, final User user)
{
- sender.sendMessage(Util.i18n("teleportAAll"));
- for (Player player : server.getOnlinePlayers())
+ sender.sendMessage(_("teleportAAll"));
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- User u = ess.getUser(player);
- if (p == u)
+ final User player = ess.getUser(onlinePlayer);
+ if (user == player)
{
continue;
}
- if (!u.isTeleportEnabled())
+ if (!player.isTeleportEnabled())
{
continue;
}
try
{
- u.requestTeleport(p, true);
- u.sendMessage(Util.format("teleportHereRequest", p.getDisplayName()));
- u.sendMessage(Util.i18n("typeTpaccept"));
+ player.requestTeleport(user, true);
+ player.sendMessage(_("teleportHereRequest", user.getDisplayName()));
+ player.sendMessage(_("typeTpaccept"));
}
catch (Exception ex)
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
index 043f23172..164a1afad 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
@@ -1,9 +1,10 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.OfflinePlayer;
import com.earth2me.essentials.Trade;
-import org.bukkit.Server;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandtpaccept extends EssentialsCommand
@@ -14,34 +15,36 @@ public class Commandtpaccept extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- User p = user.getTeleportRequest();
- if (p == null)
+ final User target = user.getTeleportRequest();
+ if (target == null
+ || target.getBase() instanceof OfflinePlayer
+ || (user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpahere")))
{
- throw new Exception(Util.i18n("noPendingRequest"));
+ throw new Exception(_("noPendingRequest"));
}
- Trade charge = new Trade(this.getName(), ess);
+ final Trade charge = new Trade(this.getName(), ess);
if (user.isTeleportRequestHere())
{
charge.isAffordableFor(user);
}
else
{
- charge.isAffordableFor(p);
+ charge.isAffordableFor(target);
}
- user.sendMessage(Util.i18n("requestAccepted"));
- p.sendMessage(Util.format("requestAcceptedFrom", user.getDisplayName()));
-
+ user.sendMessage(_("requestAccepted"));
+ target.sendMessage(_("requestAcceptedFrom", user.getDisplayName()));
+
if (user.isTeleportRequestHere())
{
- user.getTeleport().teleport(p, charge);
+ user.getTeleport().teleport(target, charge);
}
else
{
- p.getTeleport().teleport(user, charge);
+ target.getTeleport().teleport(user, charge);
}
user.requestTeleport(null, false);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java
index 935721345..751fc628c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandtpahere extends EssentialsCommand
@@ -13,21 +13,21 @@ public class Commandtpahere extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- User p = getPlayer(server, args, 0);
- if (!p.isTeleportEnabled())
+ final User player = getPlayer(server, args, 0);
+ if (!player.isTeleportEnabled())
{
- throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
+ throw new Exception(_("teleportDisabled", player.getDisplayName()));
}
- p.requestTeleport(user, true);
- p.sendMessage(Util.format("teleportHereRequest", user.getDisplayName()));
- p.sendMessage(Util.i18n("typeTpaccept"));
- user.sendMessage(Util.format("requestSent", p.getDisplayName()));
+ player.requestTeleport(user, true);
+ player.sendMessage(_("teleportHereRequest", user.getDisplayName()));
+ player.sendMessage(_("typeTpaccept"));
+ user.sendMessage(_("requestSent", player.getDisplayName()));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
index 1cb6321ea..d3b8917aa 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -15,7 +15,7 @@ public class Commandtpall extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -27,23 +27,23 @@ public class Commandtpall extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- User p = getPlayer(server, args, 0);
- teleportAllPlayers(server, sender, p);
+ final User player = getPlayer(server, args, 0);
+ teleportAllPlayers(server, sender, player);
}
- private void teleportAllPlayers(Server server, CommandSender sender, User p)
+ private void teleportAllPlayers(Server server, CommandSender sender, User user)
{
- sender.sendMessage(Util.i18n("teleportAll"));
- for (Player player : server.getOnlinePlayers())
+ sender.sendMessage(_("teleportAll"));
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- User u = ess.getUser(player);
- if (p == u)
+ final User player = ess.getUser(onlinePlayer);
+ if (user == player)
{
continue;
}
try
{
- u.getTeleport().now(p, false);
+ player.getTeleport().now(user, false);
}
catch (Exception ex)
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpdeny.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpdeny.java
index 5d7764ae6..92bba1054 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpdeny.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpdeny.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandtpdeny extends EssentialsCommand
@@ -13,16 +13,16 @@ public class Commandtpdeny extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- User p = user.getTeleportRequest();
- if (p == null)
+ final User player = user.getTeleportRequest();
+ if (player == null)
{
- throw new Exception(Util.i18n("noPendingRequest"));
+ throw new Exception(_("noPendingRequest"));
}
- user.sendMessage(Util.i18n("requestDenied"));
- p.sendMessage(Util.format("requestDeniedFrom", user.getDisplayName()));
+ user.sendMessage(_("requestDenied"));
+ player.sendMessage(_("requestDeniedFrom", user.getDisplayName()));
user.requestTeleport(null, false);
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
index bba8d8743..ecfb6b6a6 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
-import org.bukkit.Server;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandtphere extends EssentialsCommand
@@ -14,16 +14,16 @@ public class Commandtphere extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- User p = getPlayer(server, args, 0);
- if (!p.isTeleportEnabled())
+ final User player = getPlayer(server, args, 0);
+ if (!player.isTeleportEnabled())
{
- throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
+ throw new Exception(_("teleportDisabled", player.getDisplayName()));
}
- p.getTeleport().teleport(user, new Trade(this.getName(), ess));
- user.sendMessage(Util.i18n("teleporting"));
- p.sendMessage(Util.i18n("teleporting"));
+ player.getTeleport().teleport(user, new Trade(this.getName(), ess));
+ user.sendMessage(_("teleporting"));
+ player.sendMessage(_("teleporting"));
throw new NoChargeException();
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
index 5a4e082e0..d225725be 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.OfflinePlayer;
-import org.bukkit.Server;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandtpo extends EssentialsCommand
@@ -14,7 +14,7 @@ public class Commandtpo extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -22,22 +22,22 @@ public class Commandtpo extends EssentialsCommand
}
//Just basically the old tp command
- User p = getPlayer(server, args, 0, true);
+ final User player = getPlayer(server, args, 0, true);
// Check if user is offline
- if (p.getBase() instanceof OfflinePlayer)
+ if (player.getBase() instanceof OfflinePlayer)
{
- throw new NoSuchFieldException(Util.i18n("playerNotFound"));
+ throw new NoSuchFieldException(_("playerNotFound"));
}
// Verify permission
- if (!p.isHidden() || user.isAuthorized("essentials.teleport.hidden"))
+ if (!player.isHidden() || user.isAuthorized("essentials.teleport.hidden"))
{
- user.getTeleport().now(p, false);
- user.sendMessage(Util.i18n("teleporting"));
+ user.getTeleport().now(player, false);
+ user.sendMessage(_("teleporting"));
}
else
{
- throw new NoSuchFieldException(Util.i18n("playerNotFound"));
+ throw new NoSuchFieldException(_("playerNotFound"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java
index 7af39854f..0a6bc5180 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.OfflinePlayer;
-import org.bukkit.Server;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandtpohere extends EssentialsCommand
@@ -14,7 +14,7 @@ public class Commandtpohere extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -22,23 +22,23 @@ public class Commandtpohere extends EssentialsCommand
}
//Just basically the old tphere command
- User p = getPlayer(server, args, 0, true);
+ final User player = getPlayer(server, args, 0, true);
// Check if user is offline
- if (p.getBase() instanceof OfflinePlayer)
+ if (player.getBase() instanceof OfflinePlayer)
{
- throw new NoSuchFieldException(Util.i18n("playerNotFound"));
+ throw new NoSuchFieldException(_("playerNotFound"));
}
// Verify permission
- if (!p.isHidden() || user.isAuthorized("essentials.teleport.hidden"))
+ if (!player.isHidden() || user.isAuthorized("essentials.teleport.hidden"))
{
- p.getTeleport().now(user, false);
- user.sendMessage(Util.i18n("teleporting"));
+ player.getTeleport().now(user, false);
+ user.sendMessage(_("teleporting"));
}
else
{
- throw new NoSuchFieldException(Util.i18n("playerNotFound"));
+ throw new NoSuchFieldException(_("playerNotFound"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
index ce7c369e4..7aa0e66f8 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.User;
import org.bukkit.Location;
import org.bukkit.Server;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class Commandtppos extends EssentialsCommand
@@ -15,27 +15,29 @@ public class Commandtppos extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 3)
{
throw new NotEnoughArgumentsException();
}
- int x = Integer.parseInt(args[0]);
- int y = Integer.parseInt(args[1]);
- int z = Integer.parseInt(args[2]);
- Location l = new Location(user.getWorld(), x, y, z);
- if (args.length > 3) {
- l.setYaw(Float.parseFloat(args[3]));
+ final int x = Integer.parseInt(args[0]);
+ final int y = Integer.parseInt(args[1]);
+ final int z = Integer.parseInt(args[2]);
+ final Location location = new Location(user.getWorld(), x, y, z);
+ if (args.length > 3)
+ {
+ location.setYaw(Float.parseFloat(args[3]));
}
- if (args.length > 4) {
- l.setPitch(Float.parseFloat(args[4]));
+ if (args.length > 4)
+ {
+ location.setPitch(Float.parseFloat(args[4]));
}
- Trade charge = new Trade(this.getName(), ess);
+ final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
- user.sendMessage(Util.i18n("teleporting"));
- user.getTeleport().teleport(l, charge);
+ user.sendMessage(_("teleporting"));
+ user.getTeleport().teleport(location, charge);
throw new NoChargeException();
}
} \ No newline at end of file
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtptoggle.java b/Essentials/src/com/earth2me/essentials/commands/Commandtptoggle.java
index f880c5d34..1fc4c2aa4 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtptoggle.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtptoggle.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import org.bukkit.Server;
public class Commandtptoggle extends EssentialsCommand
@@ -13,10 +13,10 @@ public class Commandtptoggle extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
user.sendMessage(user.toggleTeleportEnabled()
- ? Util.i18n("teleportationEnabled")
- : Util.i18n("teleportationDisabled"));
+ ? _("teleportationEnabled")
+ : _("teleportationDisabled"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java
index 8013453ab..538611972 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java
@@ -1,13 +1,11 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.TargetBlock;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.TreeType;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import org.bukkit.Material;
-import org.bukkit.block.Block;
public class Commandtree extends EssentialsCommand
@@ -18,9 +16,9 @@ public class Commandtree extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- Object tree = new Object();
+ TreeType tree;
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
@@ -41,21 +39,17 @@ public class Commandtree extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
-
- final int[] ignore =
- {
- 8, 9
- };
- final Location loc = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock().getLocation();
+
+ final Location loc = Util.getTarget(user);
final Location safeLocation = Util.getSafeDestination(loc);
- final boolean success = user.getWorld().generateTree(safeLocation, (TreeType)tree);
+ final boolean success = user.getWorld().generateTree(safeLocation, tree);
if (success)
{
- user.sendMessage(Util.i18n("treeSpawned"));
+ user.sendMessage(_("treeSpawned"));
}
else
{
- user.sendMessage(Util.i18n("treeFailure"));
+ user.sendMessage(_("treeFailure"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
index 4877c2aeb..8bc3ad068 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -20,16 +20,16 @@ public class Commandunban extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
-
+
try
{
- final User u = getPlayer(server, args, 0, true);
- u.setBanned(false);
- sender.sendMessage(Util.i18n("unbannedPlayer"));
+ final User player = getPlayer(server, args, 0, true);
+ player.setBanned(false);
+ sender.sendMessage(_("unbannedPlayer"));
}
catch (NoSuchFieldException e)
{
- sender.sendMessage(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java b/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java
index ea2c88f78..2c1d06f39 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -21,6 +21,6 @@ public class Commandunbanip extends EssentialsCommand
}
ess.getServer().unbanIP(args[0]);
- sender.sendMessage(Util.i18n("unbannedIP"));
+ sender.sendMessage(_("unbannedIP"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java b/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java
index cebbcaf8c..8891036c6 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java
@@ -1,9 +1,10 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.InventoryWorkaround;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import java.util.List;
+import java.util.Locale;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
@@ -17,7 +18,7 @@ public class Commandunlimited extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -33,17 +34,17 @@ public class Commandunlimited extends EssentialsCommand
if (args[0].equalsIgnoreCase("list"))
{
- String list = getList(target);
+ final String list = getList(target);
user.sendMessage(list);
}
else if (args[0].equalsIgnoreCase("clear"))
{
- List<Integer> itemList = target.getUnlimited();
+ final List<Integer> itemList = target.getUnlimited();
int index = 0;
while (itemList.size() > index)
{
- Integer item = itemList.get(index);
+ final Integer item = itemList.get(index);
if (toggleUnlimited(user, target, item.toString()) == false)
{
index++;
@@ -56,36 +57,36 @@ public class Commandunlimited extends EssentialsCommand
}
}
- private String getList(User target)
+ private String getList(final User target)
{
- StringBuilder sb = new StringBuilder();
- sb.append(Util.i18n("unlimitedItems")).append(" ");
+ final StringBuilder output = new StringBuilder();
+ output.append(_("unlimitedItems")).append(" ");
boolean first = true;
- List<Integer> items = target.getUnlimited();
+ final List<Integer> items = target.getUnlimited();
if (items.isEmpty())
{
- sb.append(Util.i18n("none"));
+ output.append(_("none"));
}
for (Integer integer : items)
{
if (!first)
{
- sb.append(", ");
+ output.append(", ");
}
first = false;
- String matname = Material.getMaterial(integer).toString().toLowerCase().replace("_", "");
- sb.append(matname);
+ final String matname = Material.getMaterial(integer).toString().toLowerCase(Locale.ENGLISH).replace("_", "");
+ output.append(matname);
}
- return sb.toString();
+ return output.toString();
}
- private Boolean toggleUnlimited(User user, User target, String item) throws Exception
+ private Boolean toggleUnlimited(final User user, final User target, final String item) throws Exception
{
- ItemStack stack = ess.getItemDb().get(item, 1);
+ final ItemStack stack = ess.getItemDb().get(item, 1);
stack.setAmount(Math.min(stack.getType().getMaxStackSize(), 2));
- String itemname = stack.getType().toString().toLowerCase().replace("_", "");
+ final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
if (ess.getSettings().permissionBasedItemSpawn()
&& (!user.isAuthorized("essentials.unlimited.item-all")
&& !user.isAuthorized("essentials.unlimited.item-" + itemname)
@@ -93,7 +94,7 @@ public class Commandunlimited extends EssentialsCommand
&& !((stack.getType() == Material.WATER_BUCKET || stack.getType() == Material.LAVA_BUCKET)
&& user.isAuthorized("essentials.unlimited.item-bucket"))))
{
- throw new Exception(Util.format("unlimitedItemPermission", itemname));
+ throw new Exception(_("unlimitedItemPermission", itemname));
}
String message = "disableUnlimited";
@@ -110,9 +111,9 @@ public class Commandunlimited extends EssentialsCommand
if (user != target)
{
- user.sendMessage(Util.format(message, itemname, target.getDisplayName()));
+ user.sendMessage(_(message, itemname, target.getDisplayName()));
}
- target.sendMessage(Util.format(message, itemname, target.getDisplayName()));
+ target.sendMessage(_(message, itemname, target.getDisplayName()));
target.setUnlimited(stack, enableUnlimited);
return true;
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
index 36d1d0df0..b15af349d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
@@ -1,13 +1,15 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
-import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import com.earth2me.essentials.Warps;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
public class Commandwarp extends EssentialsCommand
@@ -20,41 +22,15 @@ public class Commandwarp extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length == 0 || args[0].matches("[0-9]+"))
{
if (!user.isAuthorized("essentials.warp.list"))
{
- throw new Exception(Util.i18n("warpListPermission"));
- }
-
- Warps warps = ess.getWarps();
- if (warps.isEmpty())
- {
- throw new Exception(Util.i18n("noWarpsDefined"));
- }
- final List<String> warpNameList = new ArrayList<String>(warps.getWarpNames());
- final Iterator<String> iterator = warpNameList.iterator();
- while (iterator.hasNext())
- {
- final String warpName = iterator.next();
- if (ess.getSettings().getPerWarpPermission() && !user.isAuthorized("essentials.warp." + warpName))
- {
- iterator.remove();
- }
- }
- int page = 1;
- if (args.length > 0)
- {
- page = Integer.parseInt(args[0]);
- }
- if (warpNameList.size() > WARPS_PER_PAGE)
- {
- user.sendMessage(Util.format("warpsCount", warpNameList.size(), page, (int)Math.ceil(warpNameList.size() / (double)WARPS_PER_PAGE)));
+ throw new Exception(_("warpListPermission"));
}
- final int warpPage = (page - 1) * WARPS_PER_PAGE;
- user.sendMessage(Util.joinList(warpNameList.subList(warpPage, warpPage+Math.min(warpNameList.size() - warpPage, WARPS_PER_PAGE))));
+ warpList(user, args);
throw new NoChargeException();
}
if (args.length > 0)
@@ -65,7 +41,7 @@ public class Commandwarp extends EssentialsCommand
otherUser = ess.getUser(server.getPlayer(args[1]));
if (otherUser == null)
{
- throw new Exception(Util.i18n("playerNotFound"));
+ throw new Exception(_("playerNotFound"));
}
warpUser(otherUser, args[0]);
throw new NoChargeException();
@@ -75,9 +51,68 @@ public class Commandwarp extends EssentialsCommand
}
}
- private void warpUser(User user, String name) throws Exception
+ @Override
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
+ {
+ if (args.length < 2 || args[0].matches("[0-9]+"))
+ {
+ warpList(sender, args);
+ throw new NoChargeException();
+ }
+ User otherUser = ess.getUser(server.getPlayer(args[1]));
+ if (otherUser == null)
+ {
+ throw new Exception(_("playerNotFound"));
+ }
+ warpUser(otherUser, args[0]);
+ throw new NoChargeException();
+
+ }
+
+ private void warpList(final CommandSender sender, final String[] args) throws Exception
+ {
+ final Warps warps = ess.getWarps();
+ if (warps.isEmpty())
+ {
+ throw new Exception(_("noWarpsDefined"));
+ }
+ final List<String> warpNameList = new ArrayList<String>(warps.getWarpNames());
+
+ if (sender instanceof User)
+ {
+ final Iterator<String> iterator = warpNameList.iterator();
+ while (iterator.hasNext())
+ {
+ final String warpName = iterator.next();
+ if (ess.getSettings().getPerWarpPermission() && !((User)sender).isAuthorized("essentials.warp." + warpName))
+ {
+ iterator.remove();
+ }
+ }
+ }
+ int page = 1;
+ if (args.length > 0)
+ {
+ page = Integer.parseInt(args[0]);
+ }
+
+ final int warpPage = (page - 1) * WARPS_PER_PAGE;
+ final String warpList = Util.joinList(warpNameList.subList(warpPage, warpPage + Math.min(warpNameList.size() - warpPage, WARPS_PER_PAGE)));
+
+ if (warpNameList.size() > WARPS_PER_PAGE)
+ {
+ sender.sendMessage(_("warpsCount", warpNameList.size(), page, (int)Math.ceil(warpNameList.size() / (double)WARPS_PER_PAGE)));
+ sender.sendMessage(warpList);
+ }
+ else
+ {
+ sender.sendMessage(_("warps", warpList));
+ }
+ }
+
+ private void warpUser(final User user, final String name) throws Exception
{
- Trade charge = new Trade(this.getName(), ess);
+ final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
if (ess.getSettings().getPerWarpPermission())
{
@@ -86,7 +121,7 @@ public class Commandwarp extends EssentialsCommand
user.getTeleport().warp(name, charge);
return;
}
- throw new Exception(Util.i18n("warpUsePermission"));
+ throw new Exception(_("warpUsePermission"));
}
user.getTeleport().warp(name, charge);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandweather.java b/Essentials/src/com/earth2me/essentials/commands/Commandweather.java
index 9603e9f72..bb1fc0927 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandweather.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandweather.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
@@ -14,46 +14,45 @@ public class Commandweather extends EssentialsCommand
super("weather");
}
+ //TODO: Remove duplication
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- boolean isStorm = args[0].equalsIgnoreCase("storm");
- World world = user.getWorld();
+ final boolean isStorm = args[0].equalsIgnoreCase("storm");
+ final World world = user.getWorld();
if (args.length > 1)
{
world.setStorm(isStorm ? true : false);
world.setWeatherDuration(Integer.parseInt(args[1]) * 20);
user.sendMessage(isStorm
- ? Util.format("weatherStormFor", world.getName(), args[1])
- : Util.format("weatherSunFor", world.getName(), args[1]));
- return;
+ ? _("weatherStormFor", world.getName(), args[1])
+ : _("weatherSunFor", world.getName(), args[1]));
}
else
{
world.setStorm(isStorm ? true : false);
user.sendMessage(isStorm
- ? Util.format("weatherStorm", world.getName())
- : Util.format("weatherSun", world.getName()));
- return;
+ ? _("weatherStorm", world.getName())
+ : _("weatherSun", world.getName()));
}
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2) //running from console means inserting a world arg before other args
{
throw new Exception("When running from console, usage is: /" + commandLabel + " <world> <storm/sun> [duration]");
}
- boolean isStorm = args[1].equalsIgnoreCase("storm");
- World world = server.getWorld(args[0]);
+ final boolean isStorm = args[1].equalsIgnoreCase("storm");
+ final World world = server.getWorld(args[0]);
if (world == null)
{
throw new Exception("World named " + args[0] + " not found!");
@@ -64,17 +63,15 @@ public class Commandweather extends EssentialsCommand
world.setStorm(isStorm ? true : false);
world.setWeatherDuration(Integer.parseInt(args[2]) * 20);
sender.sendMessage(isStorm
- ? Util.format("weatherStormFor", world.getName(), args[2])
- : Util.format("weatherSunFor", world.getName(), args[2]));
- return;
+ ? _("weatherStormFor", world.getName(), args[2])
+ : _("weatherSunFor", world.getName(), args[2]));
}
else
{
world.setStorm(isStorm ? true : false);
sender.sendMessage(isStorm
- ? Util.format("weatherStorm", world.getName())
- : Util.format("weatherSun", world.getName()));
- return;
+ ? _("weatherStorm", world.getName())
+ : _("weatherSun", world.getName()));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java
index 1769202f5..c5d10a2e8 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java
@@ -1,11 +1,13 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
-import org.bukkit.command.CommandSender;
-import org.bukkit.entity.Player;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import java.util.Locale;
import org.bukkit.ChatColor;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
public class Commandwhois extends EssentialsCommand
@@ -16,7 +18,7 @@ public class Commandwhois extends EssentialsCommand
}
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -34,39 +36,42 @@ public class Commandwhois extends EssentialsCommand
{
showhidden = true;
}
- String whois = args[0].toLowerCase();
- int prefixLength = ChatColor.stripColor(ess.getSettings().getNicknamePrefix()).length();
- for (Player p : server.getOnlinePlayers())
+ final String whois = args[0].toLowerCase(Locale.ENGLISH);
+ final int prefixLength = ChatColor.stripColor(ess.getSettings().getNicknamePrefix()).length();
+ for (Player onlinePlayer : server.getOnlinePlayers())
{
- User u = ess.getUser(p);
- if (u.isHidden() && !showhidden)
+ final User user = ess.getUser(onlinePlayer);
+ if (user.isHidden() && !showhidden)
{
continue;
}
- String dn = ChatColor.stripColor(u.getNick());
- if (!whois.equalsIgnoreCase(dn)
- && !whois.equalsIgnoreCase(dn.substring(prefixLength))
- && !whois.equalsIgnoreCase(u.getName()))
+ final String nickName = ChatColor.stripColor(user.getNickname());
+ if (!whois.equalsIgnoreCase(nickName)
+ && !whois.substring(prefixLength).equalsIgnoreCase(nickName)
+ && !whois.equalsIgnoreCase(user.getName()))
{
continue;
}
sender.sendMessage("");
- sender.sendMessage(Util.format("whoisIs", u.getDisplayName(), u.getName()));
- sender.sendMessage(Util.format("whoisHealth", u.getHealth()));
- sender.sendMessage(Util.format("whoisLocation", u.getLocation().getWorld().getName(), u.getLocation().getBlockX(), u.getLocation().getBlockY(), u.getLocation().getBlockZ()));
+ sender.sendMessage(_("whoisIs", user.getDisplayName(), user.getName()));
+ sender.sendMessage(_("whoisHealth", user.getHealth()));
+ sender.sendMessage(_("whoisOP", (user.isOp() ? _("true") : _("false"))));
+ sender.sendMessage(_("whoisGod", (user.isGodModeEnabled() ? _("true") : _("false"))));
+ sender.sendMessage(_("whoisGamemode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH))));
+ sender.sendMessage(_("whoisLocation", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ()));
if (!ess.getSettings().isEcoDisabled())
{
- sender.sendMessage(Util.format("whoisMoney", Util.formatCurrency(u.getMoney(), ess)));
+ sender.sendMessage(_("whoisMoney", Util.formatCurrency(user.getMoney(), ess)));
}
- sender.sendMessage(u.isAfk()
- ? Util.i18n("whoisStatusAway")
- : Util.i18n("whoisStatusAvailable"));
- sender.sendMessage(Util.format("whoisIPAddress", u.getAddress().getAddress().toString()));
- final String location = u.getGeoLocation();
- if (location != null
+ sender.sendMessage(user.isAfk()
+ ? _("whoisStatusAway")
+ : _("whoisStatusAvailable"));
+ sender.sendMessage(_("whoisIPAddress", user.getAddress().getAddress().toString()));
+ final String location = user.getGeoLocation();
+ if (location != null
&& (sender instanceof Player ? ess.getUser(sender).isAuthorized("essentials.geoip.show") : true))
{
- sender.sendMessage(Util.format("whoisGeoLocation", location));
+ sender.sendMessage(_("whoisGeoLocation", location));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java
index 557f46dbf..7380b23ae 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java
@@ -1,12 +1,12 @@
package com.earth2me.essentials.commands;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.User;
import java.util.List;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.World;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class Commandworld extends EssentialsCommand
@@ -24,7 +24,7 @@ public class Commandworld extends EssentialsCommand
if (args.length < 1)
{
World nether = null;
-
+
final List<World> worlds = server.getWorlds();
for (World world2 : worlds)
@@ -46,9 +46,9 @@ public class Commandworld extends EssentialsCommand
world = ess.getWorld(getFinalArg(args, 0));
if (world == null)
{
- user.sendMessage(Util.i18n("invalidWorld"));
- user.sendMessage(Util.format("possibleWorlds", server.getWorlds().size() - 1));
- user.sendMessage(Util.i18n("typeWorldName"));
+ user.sendMessage(_("invalidWorld"));
+ user.sendMessage(_("possibleWorlds", server.getWorlds().size() - 1));
+ user.sendMessage(_("typeWorldName"));
throw new NoChargeException();
}
}
@@ -62,7 +62,8 @@ public class Commandworld extends EssentialsCommand
{
factor = 1.0 / 8.0;
}
- else {
+ else
+ {
factor = 1.0;
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandworth.java b/Essentials/src/com/earth2me/essentials/commands/Commandworth.java
index 2a7e107bc..586b31873 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandworth.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandworth.java
@@ -1,9 +1,10 @@
package com.earth2me.essentials.commands;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
-
+import java.util.Locale;
+import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.inventory.ItemStack;
@@ -15,15 +16,16 @@ public class Commandworth extends EssentialsCommand
super("worth");
}
+ //TODO: Remove duplication
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- ItemStack is = user.getInventory().getItemInHand();
- int amount = is.getAmount();
+ ItemStack iStack = user.getInventory().getItemInHand();
+ int amount = iStack.getAmount();
if (args.length > 0)
{
- is = ess.getItemDb().get(args[0]);
+ iStack = ess.getItemDb().get(args[0]);
}
try
@@ -35,40 +37,40 @@ public class Commandworth extends EssentialsCommand
}
catch (NumberFormatException ex)
{
- amount = is.getType().getMaxStackSize();
+ amount = iStack.getType().getMaxStackSize();
}
- is.setAmount(amount);
- double worth = ess.getWorth().getPrice(is);
+ iStack.setAmount(amount);
+ final double worth = ess.getWorth().getPrice(iStack);
if (Double.isNaN(worth))
{
- throw new Exception(Util.i18n("itemCannotBeSold"));
+ throw new Exception(_("itemCannotBeSold"));
}
- user.sendMessage(is.getDurability() != 0
- ? Util.format("worthMeta",
- is.getType().toString().toLowerCase().replace("_", ""),
- is.getDurability(),
- Util.formatCurrency(worth * amount, ess),
- amount,
- Util.formatCurrency(worth, ess))
- : Util.format("worth",
- is.getType().toString().toLowerCase().replace("_", ""),
- Util.formatCurrency(worth * amount, ess),
- amount,
- Util.formatCurrency(worth, ess)));
+ user.sendMessage(iStack.getDurability() != 0
+ ? _("worthMeta",
+ iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""),
+ iStack.getDurability(),
+ Util.formatCurrency(worth * amount, ess),
+ amount,
+ Util.formatCurrency(worth, ess))
+ : _("worth",
+ iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""),
+ Util.formatCurrency(worth * amount, ess),
+ amount,
+ Util.formatCurrency(worth, ess)));
}
@Override
- protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
- ItemStack is = ess.getItemDb().get(args[0]);
- int amount = is.getAmount();
+ ItemStack iStack = ess.getItemDb().get(args[0]);
+ int amount = iStack.getAmount();
try
{
@@ -79,28 +81,28 @@ public class Commandworth extends EssentialsCommand
}
catch (NumberFormatException ex)
{
- amount = is.getType().getMaxStackSize();
+ amount = iStack.getType().getMaxStackSize();
}
- is.setAmount(amount);
- double worth = ess.getWorth().getPrice(is);
+ iStack.setAmount(amount);
+ final double worth = ess.getWorth().getPrice(iStack);
if (Double.isNaN(worth))
{
- throw new Exception(Util.i18n("itemCannotBeSold"));
+ throw new Exception(_("itemCannotBeSold"));
}
- sender.sendMessage(is.getDurability() != 0
- ? Util.format("worthMeta",
- is.getType().toString().toLowerCase().replace("_", ""),
- is.getDurability(),
- Util.formatCurrency(worth * amount, ess),
- amount,
- Util.formatCurrency(worth, ess))
- : Util.format("worth",
- is.getType().toString().toLowerCase().replace("_", ""),
- Util.formatCurrency(worth * amount, ess),
- amount,
- Util.formatCurrency(worth, ess)));
+ sender.sendMessage(iStack.getDurability() != 0
+ ? _("worthMeta",
+ iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""),
+ iStack.getDurability(),
+ Util.formatCurrency(worth * amount, ess),
+ amount,
+ Util.formatCurrency(worth, ess))
+ : _("worth",
+ iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""),
+ Util.formatCurrency(worth * amount, ess),
+ amount,
+ Util.formatCurrency(worth, ess)));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
index 58da18c21..63717fcae 100644
--- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
+++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
@@ -1,17 +1,16 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.OfflinePlayer;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.User;
import java.util.List;
+import java.util.logging.Logger;
import org.bukkit.Server;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
-import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.OfflinePlayer;
import org.bukkit.entity.Player;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.util.logging.Logger;
public abstract class EssentialsCommand implements IEssentialsCommand
@@ -25,11 +24,13 @@ public abstract class EssentialsCommand implements IEssentialsCommand
this.name = name;
}
+ @Override
public void setEssentials(final IEssentials ess)
{
this.ess = ess;
}
+ @Override
public String getName()
{
return name;
@@ -51,7 +52,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
{
if (!getOffline && (user.getBase() instanceof OfflinePlayer || user.isHidden()))
{
- throw new NoSuchFieldException(Util.i18n("playerNotFound"));
+ throw new NoSuchFieldException(_("playerNotFound"));
}
return user;
}
@@ -73,7 +74,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
return userMatch;
}
}
- throw new NoSuchFieldException(Util.i18n("playerNotFound"));
+ throw new NoSuchFieldException(_("playerNotFound"));
}
@Override
@@ -98,7 +99,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
- throw new Exception(Util.format("onlyPlayers", commandLabel));
+ throw new Exception(_("onlyPlayers", commandLabel));
}
public static String getFinalArg(final String[] args, final int start)
diff --git a/Essentials/src/com/earth2me/essentials/commands/IEssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/IEssentialsCommand.java
index a5192ba10..f16d3059c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/IEssentialsCommand.java
+++ b/Essentials/src/com/earth2me/essentials/commands/IEssentialsCommand.java
@@ -2,9 +2,9 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
+import org.bukkit.Server;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
-import org.bukkit.Server;
public interface IEssentialsCommand
@@ -16,6 +16,6 @@ public interface IEssentialsCommand
void run(Server server, CommandSender sender, String commandLabel, Command cmd, String[] args)
throws Exception;
-
+
void setEssentials(IEssentials ess);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/NotEnoughArgumentsException.java b/Essentials/src/com/earth2me/essentials/commands/NotEnoughArgumentsException.java
index 615a556b9..9513fc934 100644
--- a/Essentials/src/com/earth2me/essentials/commands/NotEnoughArgumentsException.java
+++ b/Essentials/src/com/earth2me/essentials/commands/NotEnoughArgumentsException.java
@@ -1,15 +1,15 @@
package com.earth2me.essentials.commands;
-public class NotEnoughArgumentsException extends Exception {
+public class NotEnoughArgumentsException extends Exception
+{
public NotEnoughArgumentsException()
{
super();
}
-
+
public NotEnoughArgumentsException(final Throwable ex)
{
super(ex);
}
-
}
diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeExplosion.java b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeExplosion.java
new file mode 100644
index 000000000..934d94fa2
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeExplosion.java
@@ -0,0 +1,51 @@
+package com.earth2me.essentials.craftbukkit;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import net.minecraft.server.ChunkPosition;
+import net.minecraft.server.Packet60Explosion;
+import org.bukkit.Location;
+import org.bukkit.Server;
+import org.bukkit.block.Block;
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.craftbukkit.CraftWorld;
+import org.bukkit.entity.Player;
+import org.bukkit.event.entity.EntityExplodeEvent;
+
+
+public class FakeExplosion
+{
+ public static void createExplosion(final EntityExplodeEvent event, final Server server, final Player[] players)
+ {
+ try
+ {
+ final Set<ChunkPosition> set = new HashSet<ChunkPosition>(event.blockList().size());
+ final List<ChunkPosition> blocksUnderPlayers = new ArrayList<ChunkPosition>(players.length);
+ final Location loc = event.getLocation();
+ for (Player player : players)
+ {
+ if (player.getWorld().equals(loc.getWorld()))
+ {
+ blocksUnderPlayers.add(new ChunkPosition(player.getLocation().getBlockX(), player.getLocation().getBlockY() - 1, player.getLocation().getBlockZ()));
+ }
+ }
+ for (Block block : event.blockList())
+ {
+ final ChunkPosition cp = new ChunkPosition(block.getX(), block.getY(), block.getZ());
+ if (!blocksUnderPlayers.contains(cp))
+ {
+ set.add(cp);
+ }
+ }
+ ((CraftServer)server).getHandle().sendPacketNearby(loc.getX(), loc.getY(), loc.getZ(), 64.0, ((CraftWorld)loc.getWorld()).getHandle().worldProvider.dimension, new Packet60Explosion(loc.getX(), loc.getY(), loc.getZ(), 3.0F, set));
+ }
+ catch (Throwable ex)
+ {
+ Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex);
+ }
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/ShowInventory.java b/Essentials/src/com/earth2me/essentials/craftbukkit/ShowInventory.java
new file mode 100644
index 000000000..f77b20208
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/craftbukkit/ShowInventory.java
@@ -0,0 +1,47 @@
+package com.earth2me.essentials.craftbukkit;
+
+import com.earth2me.essentials.InventoryWorkaround;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import net.minecraft.server.EntityPlayer;
+import net.minecraft.server.IInventory;
+import net.minecraft.server.InventoryPlayer;
+import org.bukkit.craftbukkit.entity.CraftPlayer;
+import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
+import org.bukkit.entity.Player;
+import org.bukkit.inventory.ItemStack;
+
+
+public class ShowInventory
+{
+ public static void showEmptyInventory(final Player player)
+ {
+ try
+ {
+ final EntityPlayer entityPlayer = ((CraftPlayer)player).getHandle();
+ final CraftInventoryPlayer inv = new CraftInventoryPlayer(new InventoryPlayer(((CraftPlayer)player).getHandle()));
+ inv.clear();
+ entityPlayer.a((IInventory)inv.getInventory());
+ }
+ catch (Throwable ex)
+ {
+ Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex);
+ }
+ }
+
+ public static void showFilledInventory(final Player player, final ItemStack stack)
+ {
+ try
+ {
+ final EntityPlayer entityPlayer = ((CraftPlayer)player).getHandle();
+ final CraftInventoryPlayer inv = new CraftInventoryPlayer(new InventoryPlayer(((CraftPlayer)player).getHandle()));
+ inv.clear();
+ InventoryWorkaround.addItem(inv, true, stack);
+ entityPlayer.a((IInventory)inv.getInventory());
+ }
+ catch (Throwable ex)
+ {
+ Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex);
+ }
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/perm/BPermissionsHandler.java b/Essentials/src/com/earth2me/essentials/perm/BPermissionsHandler.java
index b30a7c0c7..b0f8e90c6 100644
--- a/Essentials/src/com/earth2me/essentials/perm/BPermissionsHandler.java
+++ b/Essentials/src/com/earth2me/essentials/perm/BPermissionsHandler.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.perm;
import de.bananaco.permissions.Permissions;
+import de.bananaco.permissions.info.InfoReader;
import de.bananaco.permissions.interfaces.PermissionSet;
import de.bananaco.permissions.worlds.WorldPermissionsManager;
-import de.bananaco.permissions.info.InfoReader;
import java.util.List;
import org.bukkit.entity.Player;
@@ -12,6 +12,7 @@ public class BPermissionsHandler implements IPermissionsHandler
{
private final transient WorldPermissionsManager wpm;
private final transient InfoReader info;
+
public BPermissionsHandler()
{
wpm = Permissions.getWorldPermissionsManager();
@@ -51,13 +52,13 @@ public class BPermissionsHandler implements IPermissionsHandler
}
return groups.contains(group);
}
-
+
@Override
public boolean canBuild(final Player base, final String group)
{
return hasPermission(base, "essentials.build") || hasPermission(base, "bPermissions.build");
}
-
+
@Override
public String getPrefix(final Player base)
{
diff --git a/Essentials/src/com/earth2me/essentials/perm/GroupManagerHandler.java b/Essentials/src/com/earth2me/essentials/perm/GroupManagerHandler.java
index 20b3806e0..8fd375eae 100644
--- a/Essentials/src/com/earth2me/essentials/perm/GroupManagerHandler.java
+++ b/Essentials/src/com/earth2me/essentials/perm/GroupManagerHandler.java
@@ -2,11 +2,10 @@ package com.earth2me.essentials.perm;
import java.util.Arrays;
import java.util.List;
-import org.bukkit.entity.Player;
-import org.bukkit.plugin.Plugin;
-
import org.anjocaido.groupmanager.GroupManager;
import org.anjocaido.groupmanager.permissions.AnjoPermissionsHandler;
+import org.bukkit.entity.Player;
+import org.bukkit.plugin.Plugin;
public class GroupManagerHandler implements IPermissionsHandler
diff --git a/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java b/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java
index 4062a162c..5d8e62232 100644
--- a/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java
+++ b/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java
@@ -88,7 +88,7 @@ public class PermissionsExHandler implements IPermissionsHandler
{
return null;
}
-
+
return user.getSuffix(base.getWorld().getName());
}
}
diff --git a/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java b/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java
index ab69d9fe4..8c16aab7a 100644
--- a/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java
+++ b/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java
@@ -99,7 +99,7 @@ public class PermissionsHandler implements IPermissionsHandler
public void checkPermissions()
{
final PluginManager pluginManager = plugin.getServer().getPluginManager();
-
+
final Plugin permExPlugin = pluginManager.getPlugin("PermissionsEx");
if (permExPlugin != null && permExPlugin.isEnabled())
{
@@ -121,7 +121,7 @@ public class PermissionsHandler implements IPermissionsHandler
}
return;
}
-
+
final Plugin GMplugin = pluginManager.getPlugin("GroupManager");
if (GMplugin != null && GMplugin.isEnabled())
{
@@ -132,7 +132,7 @@ public class PermissionsHandler implements IPermissionsHandler
}
return;
}
-
+
final Plugin permBukkitPlugin = pluginManager.getPlugin("PermissionsBukkit");
if (permBukkitPlugin != null && permBukkitPlugin.isEnabled())
{
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/Method.java b/Essentials/src/com/earth2me/essentials/register/payment/Method.java
index ea4477077..a942667e8 100644
--- a/Essentials/src/com/earth2me/essentials/register/payment/Method.java
+++ b/Essentials/src/com/earth2me/essentials/register/payment/Method.java
@@ -13,15 +13,15 @@ import org.bukkit.plugin.Plugin;
public interface Method
{
/**
- * Encodes the Plugin into an Object disguised as the Plugin.
- * If you want the original Plugin Class you must cast it to the correct
- * Plugin, to do so you have to verify the name and or version then cast.
+ * Encodes the Plugin into an Object disguised as the Plugin. If you want the original Plugin Class you must cast it
+ * to the correct Plugin, to do so you have to verify the name and or version then cast.
*
* <pre>
* if(method.getName().equalsIgnoreCase("iConomy"))
* iConomy plugin = ((iConomy)method.getPlugin());</pre>
- *
- * @return <code>Object</code>
+ *
+ * @return
+ * <code>Object</code>
* @see #getName()
* @see #getVersion()
*/
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/Methods.java b/Essentials/src/com/earth2me/essentials/register/payment/Methods.java
index 34acf9837..32acc0442 100644
--- a/Essentials/src/com/earth2me/essentials/register/payment/Methods.java
+++ b/Essentials/src/com/earth2me/essentials/register/payment/Methods.java
@@ -2,7 +2,6 @@ package com.earth2me.essentials.register.payment;
import java.util.HashSet;
import java.util.Set;
-
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java
index bc3893d5e..c3b71d4e3 100644
--- a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java
+++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java
@@ -1,7 +1,6 @@
package com.earth2me.essentials.register.payment.methods;
import com.earth2me.essentials.register.payment.Method;
-
import cosine.boseconomy.BOSEconomy;
import org.bukkit.plugin.Plugin;
@@ -18,26 +17,31 @@ public class BOSE6 implements Method
{
private BOSEconomy BOSEconomy;
+ @Override
public BOSEconomy getPlugin()
{
return this.BOSEconomy;
}
+ @Override
public String getName()
{
return "BOSEconomy";
}
+ @Override
public String getVersion()
{
return "0.6.2";
}
+ @Override
public int fractionalDigits()
{
return 0;
}
+ @Override
public String format(double amount)
{
String currency = this.BOSEconomy.getMoneyNamePlural();
@@ -50,27 +54,32 @@ public class BOSE6 implements Method
return amount + " " + currency;
}
+ @Override
public boolean hasBanks()
{
return true;
}
+ @Override
public boolean hasBank(String bank)
{
return this.BOSEconomy.bankExists(bank);
}
+ @Override
public boolean hasAccount(String name)
{
return this.BOSEconomy.playerRegistered(name, false);
}
+ @Override
public boolean hasBankAccount(String bank, String name)
{
return this.BOSEconomy.isBankOwner(bank, name)
|| this.BOSEconomy.isBankMember(bank, name);
}
+ @Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@@ -82,6 +91,7 @@ public class BOSE6 implements Method
return true;
}
+ @Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@@ -94,6 +104,7 @@ public class BOSE6 implements Method
return true;
}
+ @Override
public MethodAccount getAccount(String name)
{
if (!hasAccount(name))
@@ -104,6 +115,7 @@ public class BOSE6 implements Method
return new BOSEAccount(name, this.BOSEconomy);
}
+ @Override
public MethodBankAccount getBankAccount(String bank, String name)
{
if (!hasBankAccount(bank, name))
@@ -114,6 +126,7 @@ public class BOSE6 implements Method
return new BOSEBankAccount(bank, BOSEconomy);
}
+ @Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("boseconomy")
@@ -121,6 +134,7 @@ public class BOSE6 implements Method
&& plugin.getDescription().getVersion().equals("0.6.2");
}
+ @Override
public void setPlugin(Plugin plugin)
{
BOSEconomy = (BOSEconomy)plugin;
@@ -138,23 +152,27 @@ public class BOSE6 implements Method
this.BOSEconomy = bOSEconomy;
}
+ @Override
public double balance()
{
return (double)this.BOSEconomy.getPlayerMoney(this.name);
}
+ @Override
public boolean set(double amount)
{
int IntAmount = (int)Math.ceil(amount);
return this.BOSEconomy.setPlayerMoney(this.name, IntAmount, false);
}
+ @Override
public boolean add(double amount)
{
int IntAmount = (int)Math.ceil(amount);
return this.BOSEconomy.addPlayerMoney(this.name, IntAmount, false);
}
+ @Override
public boolean subtract(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@@ -162,6 +180,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setPlayerMoney(this.name, (balance - IntAmount), false);
}
+ @Override
public boolean multiply(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@@ -169,6 +188,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setPlayerMoney(this.name, (balance * IntAmount), false);
}
+ @Override
public boolean divide(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@@ -176,26 +196,31 @@ public class BOSE6 implements Method
return this.BOSEconomy.setPlayerMoney(this.name, (balance / IntAmount), false);
}
+ @Override
public boolean hasEnough(double amount)
{
return (this.balance() >= amount);
}
+ @Override
public boolean hasOver(double amount)
{
return (this.balance() > amount);
}
+ @Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
+ @Override
public boolean isNegative()
{
return (this.balance() < 0);
}
+ @Override
public boolean remove()
{
return false;
@@ -214,27 +239,32 @@ public class BOSE6 implements Method
this.BOSEconomy = bOSEconomy;
}
+ @Override
public String getBankName()
{
return this.bank;
}
+ @Override
public int getBankId()
{
return -1;
}
+ @Override
public double balance()
{
return (double)this.BOSEconomy.getBankMoney(bank);
}
+ @Override
public boolean set(double amount)
{
int IntAmount = (int)Math.ceil(amount);
return this.BOSEconomy.setBankMoney(bank, IntAmount, true);
}
+ @Override
public boolean add(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@@ -242,6 +272,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setBankMoney(bank, (balance + IntAmount), false);
}
+ @Override
public boolean subtract(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@@ -249,6 +280,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setBankMoney(bank, (balance - IntAmount), false);
}
+ @Override
public boolean multiply(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@@ -256,6 +288,7 @@ public class BOSE6 implements Method
return this.BOSEconomy.setBankMoney(bank, (balance * IntAmount), false);
}
+ @Override
public boolean divide(double amount)
{
int IntAmount = (int)Math.ceil(amount);
@@ -263,26 +296,31 @@ public class BOSE6 implements Method
return this.BOSEconomy.setBankMoney(bank, (balance / IntAmount), false);
}
+ @Override
public boolean hasEnough(double amount)
{
return (this.balance() >= amount);
}
+ @Override
public boolean hasOver(double amount)
{
return (this.balance() > amount);
}
+ @Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
+ @Override
public boolean isNegative()
{
return (this.balance() < 0);
}
+ @Override
public boolean remove()
{
return this.BOSEconomy.removeBank(bank);
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE7.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE7.java
index 72d1f763e..d21ea6244 100644
--- a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE7.java
+++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE7.java
@@ -1,7 +1,6 @@
package com.earth2me.essentials.register.payment.methods;
import com.earth2me.essentials.register.payment.Method;
-
import cosine.boseconomy.BOSEconomy;
import org.bukkit.plugin.Plugin;
@@ -18,26 +17,31 @@ public class BOSE7 implements Method
{
private BOSEconomy BOSEconomy;
+ @Override
public BOSEconomy getPlugin()
{
return this.BOSEconomy;
}
+ @Override
public String getName()
{
return "BOSEconomy";
}
+ @Override
public String getVersion()
{
return "0.7.0";
}
+ @Override
public int fractionalDigits()
{
return this.BOSEconomy.getFractionalDigits();
}
+ @Override
public String format(double amount)
{
String currency = this.BOSEconomy.getMoneyNamePlural();
@@ -50,26 +54,31 @@ public class BOSE7 implements Method
return amount + " " + currency;
}
+ @Override
public boolean hasBanks()
{
return true;
}
+ @Override
public boolean hasBank(String bank)
{
return this.BOSEconomy.bankExists(bank);
}
+ @Override
public boolean hasAccount(String name)
{
return this.BOSEconomy.playerRegistered(name, false);
}
+ @Override
public boolean hasBankAccount(String bank, String name)
{
return this.BOSEconomy.isBankOwner(bank, name) || this.BOSEconomy.isBankMember(bank, name);
}
+ @Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@@ -81,6 +90,7 @@ public class BOSE7 implements Method
return true;
}
+ @Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@@ -93,6 +103,7 @@ public class BOSE7 implements Method
return true;
}
+ @Override
public MethodAccount getAccount(String name)
{
if (!hasAccount(name))
@@ -103,6 +114,7 @@ public class BOSE7 implements Method
return new BOSEAccount(name, this.BOSEconomy);
}
+ @Override
public MethodBankAccount getBankAccount(String bank, String name)
{
if (!hasBankAccount(bank, name))
@@ -113,6 +125,7 @@ public class BOSE7 implements Method
return new BOSEBankAccount(bank, BOSEconomy);
}
+ @Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("boseconomy")
@@ -120,6 +133,7 @@ public class BOSE7 implements Method
&& !plugin.getDescription().getVersion().equals("0.6.2");
}
+ @Override
public void setPlugin(Plugin plugin)
{
BOSEconomy = (BOSEconomy)plugin;
@@ -137,59 +151,70 @@ public class BOSE7 implements Method
this.BOSEconomy = bOSEconomy;
}
+ @Override
public double balance()
{
return this.BOSEconomy.getPlayerMoneyDouble(this.name);
}
+ @Override
public boolean set(double amount)
{
return this.BOSEconomy.setPlayerMoney(this.name, amount, false);
}
+ @Override
public boolean add(double amount)
{
return this.BOSEconomy.addPlayerMoney(this.name, amount, false);
}
+ @Override
public boolean subtract(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setPlayerMoney(this.name, (balance - amount), false);
}
+ @Override
public boolean multiply(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setPlayerMoney(this.name, (balance * amount), false);
}
+ @Override
public boolean divide(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setPlayerMoney(this.name, (balance / amount), false);
}
+ @Override
public boolean hasEnough(double amount)
{
return (this.balance() >= amount);
}
+ @Override
public boolean hasOver(double amount)
{
return (this.balance() > amount);
}
+ @Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
+ @Override
public boolean isNegative()
{
return (this.balance() < 0);
}
+ @Override
public boolean remove()
{
return false;
@@ -208,70 +233,83 @@ public class BOSE7 implements Method
this.BOSEconomy = bOSEconomy;
}
+ @Override
public String getBankName()
{
return this.bank;
}
+ @Override
public int getBankId()
{
return -1;
}
+ @Override
public double balance()
{
return this.BOSEconomy.getBankMoneyDouble(bank);
}
+ @Override
public boolean set(double amount)
{
return this.BOSEconomy.setBankMoney(bank, amount, true);
}
+ @Override
public boolean add(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setBankMoney(bank, (balance + amount), false);
}
+ @Override
public boolean subtract(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setBankMoney(bank, (balance - amount), false);
}
+ @Override
public boolean multiply(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setBankMoney(bank, (balance * amount), false);
}
+ @Override
public boolean divide(double amount)
{
double balance = this.balance();
return this.BOSEconomy.setBankMoney(bank, (balance / amount), false);
}
+ @Override
public boolean hasEnough(double amount)
{
return (this.balance() >= amount);
}
+ @Override
public boolean hasOver(double amount)
{
return (this.balance() > amount);
}
+ @Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
+ @Override
public boolean isNegative()
{
return (this.balance() < 0);
}
+ @Override
public boolean remove()
{
return this.BOSEconomy.removeBank(bank);
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/MCUR.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/MCUR.java
index 53d8ed120..87d633b5c 100644
--- a/Essentials/src/com/earth2me/essentials/register/payment/methods/MCUR.java
+++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/MCUR.java
@@ -1,10 +1,8 @@
package com.earth2me.essentials.register.payment.methods;
import com.earth2me.essentials.register.payment.Method;
-
import me.ashtheking.currency.Currency;
import me.ashtheking.currency.CurrencyList;
-
import org.bukkit.plugin.Plugin;
@@ -19,73 +17,87 @@ public class MCUR implements Method
{
private Currency currencyList;
+ @Override
public Object getPlugin()
{
return this.currencyList;
}
+ @Override
public String getName()
{
return "MultiCurrency";
}
+ @Override
public String getVersion()
{
return "0.09";
}
+ @Override
public int fractionalDigits()
{
return -1;
}
+ @Override
public String format(double amount)
{
return amount + " Currency";
}
+ @Override
public boolean hasBanks()
{
return false;
}
+ @Override
public boolean hasBank(String bank)
{
return false;
}
+ @Override
public boolean hasAccount(String name)
{
return true;
}
+ @Override
public boolean hasBankAccount(String bank, String name)
{
return false;
}
+ @Override
public boolean createAccount(String name)
{
CurrencyList.setValue((String)CurrencyList.maxCurrency(name)[0], name, 0);
return true;
}
+ @Override
public boolean createAccount(String name, Double balance)
{
CurrencyList.setValue((String)CurrencyList.maxCurrency(name)[0], name, balance);
return true;
}
+ @Override
public MethodAccount getAccount(String name)
{
return new MCurrencyAccount(name);
}
+ @Override
public MethodBankAccount getBankAccount(String bank, String name)
{
return null;
}
+ @Override
public boolean isCompatible(Plugin plugin)
{
return (plugin.getDescription().getName().equalsIgnoreCase("Currency")
@@ -93,6 +105,7 @@ public class MCUR implements Method
&& plugin instanceof Currency;
}
+ @Override
public void setPlugin(Plugin plugin)
{
currencyList = (Currency)plugin;
@@ -108,57 +121,68 @@ public class MCUR implements Method
this.name = name;
}
+ @Override
public double balance()
{
return CurrencyList.getValue((String)CurrencyList.maxCurrency(name)[0], name);
}
+ @Override
public boolean set(double amount)
{
CurrencyList.setValue((String)CurrencyList.maxCurrency(name)[0], name, amount);
return true;
}
+ @Override
public boolean add(double amount)
{
return CurrencyList.add(name, amount);
}
+ @Override
public boolean subtract(double amount)
{
return CurrencyList.subtract(name, amount);
}
+ @Override
public boolean multiply(double amount)
{
return CurrencyList.multiply(name, amount);
}
+ @Override
public boolean divide(double amount)
{
return CurrencyList.divide(name, amount);
}
+ @Override
public boolean hasEnough(double amount)
{
return CurrencyList.hasEnough(name, amount);
}
+ @Override
public boolean hasOver(double amount)
{
return CurrencyList.hasOver(name, amount);
}
+ @Override
public boolean hasUnder(double amount)
{
return CurrencyList.hasUnder(name, amount);
}
+ @Override
public boolean isNegative()
{
return CurrencyList.isNegative(name);
}
+ @Override
public boolean remove()
{
return CurrencyList.remove(name);
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java
index 1f33df12c..52fb36e15 100644
--- a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java
+++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java
@@ -3,8 +3,6 @@ package com.earth2me.essentials.register.payment.methods;
import com.earth2me.essentials.register.payment.Method;
import com.nijiko.coelho.iConomy.iConomy;
import com.nijiko.coelho.iConomy.system.Account;
-
-
import org.bukkit.plugin.Plugin;
@@ -19,51 +17,61 @@ public class iCo4 implements Method
{
private iConomy iConomy;
+ @Override
public iConomy getPlugin()
{
return this.iConomy;
}
+ @Override
public String getName()
{
return "iConomy";
}
+ @Override
public String getVersion()
{
return "4";
}
+ @Override
public int fractionalDigits()
{
return 2;
}
+ @Override
public String format(double amount)
{
return com.nijiko.coelho.iConomy.iConomy.getBank().format(amount);
}
+ @Override
public boolean hasBanks()
{
return false;
}
+ @Override
public boolean hasBank(String bank)
{
return false;
}
+ @Override
public boolean hasAccount(String name)
{
return com.nijiko.coelho.iConomy.iConomy.getBank().hasAccount(name);
}
+ @Override
public boolean hasBankAccount(String bank, String name)
{
return false;
}
+ @Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@@ -83,6 +91,7 @@ public class iCo4 implements Method
return true;
}
+ @Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@@ -102,16 +111,19 @@ public class iCo4 implements Method
return true;
}
+ @Override
public MethodAccount getAccount(String name)
{
return new iCoAccount(com.nijiko.coelho.iConomy.iConomy.getBank().getAccount(name));
}
+ @Override
public MethodBankAccount getBankAccount(String bank, String name)
{
return null;
}
+ @Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("iconomy")
@@ -119,6 +131,7 @@ public class iCo4 implements Method
&& plugin instanceof iConomy;
}
+ @Override
public void setPlugin(Plugin plugin)
{
iConomy = (iConomy)plugin;
@@ -139,11 +152,13 @@ public class iCo4 implements Method
return account;
}
+ @Override
public double balance()
{
return this.account.getBalance();
}
+ @Override
public boolean set(double amount)
{
if (this.account == null)
@@ -154,6 +169,7 @@ public class iCo4 implements Method
return true;
}
+ @Override
public boolean add(double amount)
{
if (this.account == null)
@@ -164,6 +180,7 @@ public class iCo4 implements Method
return true;
}
+ @Override
public boolean subtract(double amount)
{
if (this.account == null)
@@ -174,6 +191,7 @@ public class iCo4 implements Method
return true;
}
+ @Override
public boolean multiply(double amount)
{
if (this.account == null)
@@ -184,6 +202,7 @@ public class iCo4 implements Method
return true;
}
+ @Override
public boolean divide(double amount)
{
if (this.account == null)
@@ -194,26 +213,31 @@ public class iCo4 implements Method
return true;
}
+ @Override
public boolean hasEnough(double amount)
{
return this.account.hasEnough(amount);
}
+ @Override
public boolean hasOver(double amount)
{
return this.account.hasOver(amount);
}
+ @Override
public boolean hasUnder(double amount)
{
return (this.balance() < amount);
}
+ @Override
public boolean isNegative()
{
return this.account.isNegative();
}
+ @Override
public boolean remove()
{
if (this.account == null)
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo5.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo5.java
index d56873c3f..3b2fb2f6d 100644
--- a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo5.java
+++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo5.java
@@ -6,8 +6,6 @@ import com.iConomy.system.Account;
import com.iConomy.system.BankAccount;
import com.iConomy.system.Holdings;
import com.iConomy.util.Constants;
-
-
import org.bukkit.plugin.Plugin;
@@ -22,51 +20,61 @@ public class iCo5 implements Method
{
private iConomy iConomy;
+ @Override
public iConomy getPlugin()
{
return this.iConomy;
}
+ @Override
public String getName()
{
return "iConomy";
}
+ @Override
public String getVersion()
{
return "5";
}
+ @Override
public int fractionalDigits()
{
return 2;
}
+ @Override
public String format(double amount)
{
return com.iConomy.iConomy.format(amount);
}
+ @Override
public boolean hasBanks()
{
return Constants.Banking;
}
+ @Override
public boolean hasBank(String bank)
{
return (hasBanks()) && com.iConomy.iConomy.Banks.exists(bank);
}
+ @Override
public boolean hasAccount(String name)
{
return com.iConomy.iConomy.hasAccount(name);
}
+ @Override
public boolean hasBankAccount(String bank, String name)
{
return (hasBank(bank)) && com.iConomy.iConomy.getBank(bank).hasAccount(name);
}
+ @Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@@ -77,6 +85,7 @@ public class iCo5 implements Method
return com.iConomy.iConomy.Accounts.create(name);
}
+ @Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@@ -94,16 +103,19 @@ public class iCo5 implements Method
return true;
}
+ @Override
public MethodAccount getAccount(String name)
{
return new iCoAccount(com.iConomy.iConomy.getAccount(name));
}
+ @Override
public MethodBankAccount getBankAccount(String bank, String name)
{
return new iCoBankAccount(com.iConomy.iConomy.getBank(bank).getAccount(name));
}
+ @Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("iconomy")
@@ -111,6 +123,7 @@ public class iCo5 implements Method
&& plugin instanceof iConomy;
}
+ @Override
public void setPlugin(Plugin plugin)
{
iConomy = (iConomy)plugin;
@@ -133,11 +146,13 @@ public class iCo5 implements Method
return account;
}
+ @Override
public double balance()
{
return this.holdings.balance();
}
+ @Override
public boolean set(double amount)
{
if (this.holdings == null)
@@ -148,6 +163,7 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean add(double amount)
{
if (this.holdings == null)
@@ -158,6 +174,7 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean subtract(double amount)
{
if (this.holdings == null)
@@ -168,6 +185,7 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean multiply(double amount)
{
if (this.holdings == null)
@@ -178,6 +196,7 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean divide(double amount)
{
if (this.holdings == null)
@@ -188,26 +207,31 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean hasEnough(double amount)
{
return this.holdings.hasEnough(amount);
}
+ @Override
public boolean hasOver(double amount)
{
return this.holdings.hasOver(amount);
}
+ @Override
public boolean hasUnder(double amount)
{
return this.holdings.hasUnder(amount);
}
+ @Override
public boolean isNegative()
{
return this.holdings.isNegative();
}
+ @Override
public boolean remove()
{
if (this.account == null)
@@ -236,21 +260,25 @@ public class iCo5 implements Method
return account;
}
+ @Override
public String getBankName()
{
return this.account.getBankName();
}
+ @Override
public int getBankId()
{
return this.account.getBankId();
}
+ @Override
public double balance()
{
return this.holdings.balance();
}
+ @Override
public boolean set(double amount)
{
if (this.holdings == null)
@@ -261,6 +289,7 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean add(double amount)
{
if (this.holdings == null)
@@ -271,6 +300,7 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean subtract(double amount)
{
if (this.holdings == null)
@@ -281,6 +311,7 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean multiply(double amount)
{
if (this.holdings == null)
@@ -291,6 +322,7 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean divide(double amount)
{
if (this.holdings == null)
@@ -301,26 +333,31 @@ public class iCo5 implements Method
return true;
}
+ @Override
public boolean hasEnough(double amount)
{
return this.holdings.hasEnough(amount);
}
+ @Override
public boolean hasOver(double amount)
{
return this.holdings.hasOver(amount);
}
+ @Override
public boolean hasUnder(double amount)
{
return this.holdings.hasUnder(amount);
}
+ @Override
public boolean isNegative()
{
return this.holdings.isNegative();
}
+ @Override
public boolean remove()
{
if (this.account == null)
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo6.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo6.java
index 1feee30af..1a2950847 100644
--- a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo6.java
+++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo6.java
@@ -5,8 +5,6 @@ import com.iCo6.iConomy;
import com.iCo6.system.Account;
import com.iCo6.system.Accounts;
import com.iCo6.system.Holdings;
-
-
import org.bukkit.plugin.Plugin;
@@ -21,51 +19,61 @@ public class iCo6 implements Method
{
private iConomy iConomy;
+ @Override
public iConomy getPlugin()
{
return this.iConomy;
}
+ @Override
public String getName()
{
return "iConomy";
}
+ @Override
public String getVersion()
{
return "6";
}
+ @Override
public int fractionalDigits()
{
return 2;
}
+ @Override
public String format(double amount)
{
return com.iCo6.iConomy.format(amount);
}
+ @Override
public boolean hasBanks()
{
return false;
}
+ @Override
public boolean hasBank(String bank)
{
return false;
}
+ @Override
public boolean hasAccount(String name)
{
return (new Accounts()).exists(name);
}
+ @Override
public boolean hasBankAccount(String bank, String name)
{
return false;
}
+ @Override
public boolean createAccount(String name)
{
if (hasAccount(name))
@@ -76,6 +84,7 @@ public class iCo6 implements Method
return (new Accounts()).create(name);
}
+ @Override
public boolean createAccount(String name, Double balance)
{
if (hasAccount(name))
@@ -86,16 +95,19 @@ public class iCo6 implements Method
return (new Accounts()).create(name, balance);
}
+ @Override
public MethodAccount getAccount(String name)
{
return new iCoAccount((new Accounts()).get(name));
}
+ @Override
public MethodBankAccount getBankAccount(String bank, String name)
{
return null;
}
+ @Override
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("iconomy")
@@ -103,6 +115,7 @@ public class iCo6 implements Method
&& plugin instanceof iConomy;
}
+ @Override
public void setPlugin(Plugin plugin)
{
iConomy = (iConomy)plugin;
@@ -125,11 +138,13 @@ public class iCo6 implements Method
return account;
}
+ @Override
public double balance()
{
return this.holdings.getBalance();
}
+ @Override
public boolean set(double amount)
{
if (this.holdings == null)
@@ -140,6 +155,7 @@ public class iCo6 implements Method
return true;
}
+ @Override
public boolean add(double amount)
{
if (this.holdings == null)
@@ -150,6 +166,7 @@ public class iCo6 implements Method
return true;
}
+ @Override
public boolean subtract(double amount)
{
if (this.holdings == null)
@@ -160,6 +177,7 @@ public class iCo6 implements Method
return true;
}
+ @Override
public boolean multiply(double amount)
{
if (this.holdings == null)
@@ -170,6 +188,7 @@ public class iCo6 implements Method
return true;
}
+ @Override
public boolean divide(double amount)
{
if (this.holdings == null)
@@ -180,26 +199,31 @@ public class iCo6 implements Method
return true;
}
+ @Override
public boolean hasEnough(double amount)
{
return this.holdings.hasEnough(amount);
}
+ @Override
public boolean hasOver(double amount)
{
return this.holdings.hasOver(amount);
}
+ @Override
public boolean hasUnder(double amount)
{
return this.holdings.hasUnder(amount);
}
+ @Override
public boolean isNegative()
{
return this.holdings.isNegative();
}
+ @Override
public boolean remove()
{
if (this.account == null)
diff --git a/Essentials/src/com/earth2me/essentials/settings/Backup.java b/Essentials/src/com/earth2me/essentials/settings/Backup.java
index 1b59260db..f43af47c0 100644
--- a/Essentials/src/com/earth2me/essentials/settings/Backup.java
+++ b/Essentials/src/com/earth2me/essentials/settings/Backup.java
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Backup extends StorageObject
+public class Backup implements StorageObject
{
@Comment("Interval in minutes")
private long interval = 60;
diff --git a/Essentials/src/com/earth2me/essentials/settings/Chat.java b/Essentials/src/com/earth2me/essentials/settings/Chat.java
index 7c02c0e88..623228c4e 100644
--- a/Essentials/src/com/earth2me/essentials/settings/Chat.java
+++ b/Essentials/src/com/earth2me/essentials/settings/Chat.java
@@ -8,17 +8,15 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Chat extends StorageObject
+public class Chat implements StorageObject
{
@Comment("The character(s) to prefix all nicknames, so that you know they are not true usernames.")
private String nicknamePrefix = "~";
-
@Comment("Disable this if you have any other plugin, that modifies the displayname of a user.")
private boolean changeDisplayname = true;
-
private String displaynameFormat = "{PREFIX}{NICKNAMEPREFIX}{NAME}{SUFFIX}";
-
- @Comment({
+ @Comment(
+ {
"If EssentialsChat is installed, this will define how far a player's voice travels, in blocks. Set to 0 to make all chat global.",
"Note that users with the \"essentials.chat.spy\" permission will hear everything, regardless of this setting.",
"Users with essentials.chat.shout can override this by prefixing text with an exclamation mark (!)",
@@ -26,7 +24,6 @@ public class Chat extends StorageObject
"You can add command costs for shout/question by adding chat-shout and chat-question to the command costs section."
})
private int localRadius = 0;
-
@Comment("Set the default chat format here, it will be overwritten by group specific chat formats.")
private String defaultFormat = "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}";
}
diff --git a/Essentials/src/com/earth2me/essentials/settings/Commands.java b/Essentials/src/com/earth2me/essentials/settings/Commands.java
index 771cef12b..08efc881c 100644
--- a/Essentials/src/com/earth2me/essentials/settings/Commands.java
+++ b/Essentials/src/com/earth2me/essentials/settings/Commands.java
@@ -1,12 +1,6 @@
package com.earth2me.essentials.settings;
-import com.earth2me.essentials.settings.commands.Afk;
-import com.earth2me.essentials.settings.commands.God;
-import com.earth2me.essentials.settings.commands.Help;
-import com.earth2me.essentials.settings.commands.Home;
-import com.earth2me.essentials.settings.commands.Kit;
-import com.earth2me.essentials.settings.commands.Lightning;
-import com.earth2me.essentials.settings.commands.Spawnmob;
+import com.earth2me.essentials.settings.commands.*;
import com.earth2me.essentials.storage.Comment;
import com.earth2me.essentials.storage.ListType;
import com.earth2me.essentials.storage.StorageObject;
@@ -18,7 +12,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Commands extends StorageObject
+public class Commands implements StorageObject
{
private Afk afk = new Afk();
private God god = new God();
@@ -40,7 +34,6 @@ public class Commands extends StorageObject
"If god is set using WorldGuard, use /ungod to remove then use whichever you see fit."
})
private List<String> overwritten = new ArrayList<String>();
-
@ListType
@Comment("Disabled commands will be completelly unavailable on the server.")
private List<String> disabled = new ArrayList<String>();
diff --git a/Essentials/src/com/earth2me/essentials/settings/Economy.java b/Essentials/src/com/earth2me/essentials/settings/Economy.java
index b18f05b96..5872dada9 100644
--- a/Essentials/src/com/earth2me/essentials/settings/Economy.java
+++ b/Essentials/src/com/earth2me/essentials/settings/Economy.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.settings;
import com.earth2me.essentials.storage.Comment;
-import com.earth2me.essentials.storage.MapType;
+import com.earth2me.essentials.storage.MapValueType;
import com.earth2me.essentials.storage.StorageObject;
import java.util.HashMap;
import java.util.Map;
@@ -11,11 +11,11 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Economy extends StorageObject
+public class Economy implements StorageObject
{
@Comment("Defines the balance with which new players begin. Defaults to 0.")
private double startingBalance = 0.0;
- @MapType(Double.class)
+ @MapValueType(Double.class)
@Comment("Defines the cost to use the given commands PER USE")
private Map<String, Double> commandCosts = new HashMap<String, Double>();
@Comment("Set this to a currency symbol you want to use.")
@@ -39,4 +39,5 @@ public class Economy extends StorageObject
}
@Comment("Enable this to log all interactions with trade/buy/sell signs and sell command")
private boolean logEnabled = false;
+ private Worth worth = new Worth();
}
diff --git a/Essentials/src/com/earth2me/essentials/settings/General.java b/Essentials/src/com/earth2me/essentials/settings/General.java
index 77143eb1a..a7cf537bb 100644
--- a/Essentials/src/com/earth2me/essentials/settings/General.java
+++ b/Essentials/src/com/earth2me/essentials/settings/General.java
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class General extends StorageObject
+public class General implements StorageObject
{
@Comment("Backup runs a command while saving is disabled")
private Backup backup = new Backup();
diff --git a/Essentials/src/com/earth2me/essentials/settings/GroupOptions.java b/Essentials/src/com/earth2me/essentials/settings/GroupOptions.java
index 1e0137302..7b16a471b 100644
--- a/Essentials/src/com/earth2me/essentials/settings/GroupOptions.java
+++ b/Essentials/src/com/earth2me/essentials/settings/GroupOptions.java
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class GroupOptions extends StorageObject
+public class GroupOptions implements StorageObject
{
@Comment("Message format of chat messages")
private String messageFormat;
diff --git a/Essentials/src/com/earth2me/essentials/settings/Groups.java b/Essentials/src/com/earth2me/essentials/settings/Groups.java
index 06565d376..5e67db890 100644
--- a/Essentials/src/com/earth2me/essentials/settings/Groups.java
+++ b/Essentials/src/com/earth2me/essentials/settings/Groups.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.settings;
import com.earth2me.essentials.storage.Comment;
-import com.earth2me.essentials.storage.MapType;
+import com.earth2me.essentials.storage.MapValueType;
import com.earth2me.essentials.storage.StorageObject;
import java.util.LinkedHashMap;
import lombok.Data;
@@ -10,9 +10,10 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Groups extends StorageObject
-{
- public Groups() {
+public class Groups implements StorageObject
+{
+ public Groups()
+ {
GroupOptions defaultOptions = new GroupOptions();
groups.put("default", defaultOptions);
}
@@ -22,6 +23,6 @@ public class Groups extends StorageObject
"All group names have to be lower case.",
"The groups can be connected to users using the permission essentials.groups.groupname"
})
- @MapType(GroupOptions.class)
+ @MapValueType(GroupOptions.class)
private LinkedHashMap<String, GroupOptions> groups = new LinkedHashMap<String, GroupOptions>();
}
diff --git a/Essentials/src/com/earth2me/essentials/settings/Location.java b/Essentials/src/com/earth2me/essentials/settings/Location.java
deleted file mode 100644
index 0535fdf52..000000000
--- a/Essentials/src/com/earth2me/essentials/settings/Location.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.earth2me.essentials.settings;
-
-import com.earth2me.essentials.storage.StorageObject;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.bukkit.Server;
-
-
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class Location extends StorageObject
-{
- private String worldName = "Test";
- private double x;
- private double y;
- private double z;
- private Float yaw;
- private Float pitch;
-
- public org.bukkit.Location getBukkit(Server server)
- {
- if (yaw == null || pitch == null)
- {
- return new org.bukkit.Location(server.getWorld(worldName), x, y, z);
- }
- return new org.bukkit.Location(server.getWorld(worldName), x, y, z, yaw, pitch);
- }
-}
diff --git a/Essentials/src/com/earth2me/essentials/settings/Locations.java b/Essentials/src/com/earth2me/essentials/settings/Locations.java
new file mode 100644
index 000000000..7e7f1a63d
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/settings/Locations.java
@@ -0,0 +1,22 @@
+package com.earth2me.essentials.settings;
+
+import com.earth2me.essentials.storage.MapValueType;
+import com.earth2me.essentials.storage.StorageObject;
+import java.util.HashMap;
+import java.util.Map;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.bukkit.Location;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class Locations implements StorageObject
+{
+ @MapValueType(Location.class)
+ Map<String, Location> jails = new HashMap<String, Location>();
+ @MapValueType(Location.class)
+ Map<String, Location> warps = new HashMap<String, Location>();
+ @MapValueType(Location.class)
+ Map<String, Location> spawns = new HashMap<String, Location>();
+}
diff --git a/Essentials/src/com/earth2me/essentials/settings/Settings.java b/Essentials/src/com/earth2me/essentials/settings/Settings.java
index 890bfef4e..4c2ff2dd9 100644
--- a/Essentials/src/com/earth2me/essentials/settings/Settings.java
+++ b/Essentials/src/com/earth2me/essentials/settings/Settings.java
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Settings extends StorageObject
+public class Settings implements StorageObject
{
@Comment(
{
diff --git a/Essentials/src/com/earth2me/essentials/settings/Worth.java b/Essentials/src/com/earth2me/essentials/settings/Worth.java
new file mode 100644
index 000000000..939cdd883
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/settings/Worth.java
@@ -0,0 +1,29 @@
+package com.earth2me.essentials.settings;
+
+import com.earth2me.essentials.storage.MapKeyType;
+import com.earth2me.essentials.storage.MapValueType;
+import com.earth2me.essentials.storage.StorageObject;
+import java.util.HashMap;
+import java.util.Map;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.bukkit.Material;
+import org.bukkit.material.MaterialData;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class Worth implements StorageObject
+{
+ @MapKeyType(MaterialData.class)
+ @MapValueType(Double.class)
+ private Map<MaterialData, Double> sell = new HashMap<MaterialData, Double>();
+ @MapKeyType(MaterialData.class)
+ @MapValueType(Double.class)
+ private Map<MaterialData, Double> buy = new HashMap<MaterialData, Double>();
+
+ public Worth()
+ {
+ sell.put(new MaterialData(Material.APPLE, (byte)0), 1.0);
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Afk.java b/Essentials/src/com/earth2me/essentials/settings/commands/Afk.java
index 20076c273..80cae7e8a 100644
--- a/Essentials/src/com/earth2me/essentials/settings/commands/Afk.java
+++ b/Essentials/src/com/earth2me/essentials/settings/commands/Afk.java
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Afk extends StorageObject
+public class Afk implements StorageObject
{
@Comment(
{
diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/God.java b/Essentials/src/com/earth2me/essentials/settings/commands/God.java
index 7740eaab1..a6f5dbfc3 100644
--- a/Essentials/src/com/earth2me/essentials/settings/commands/God.java
+++ b/Essentials/src/com/earth2me/essentials/settings/commands/God.java
@@ -5,9 +5,10 @@ import com.earth2me.essentials.storage.StorageObject;
import lombok.Data;
import lombok.EqualsAndHashCode;
+
@Data
-@EqualsAndHashCode(callSuper=false)
-public class God extends StorageObject
+@EqualsAndHashCode(callSuper = false)
+public class God implements StorageObject
{
@Comment("Turn off god mode when people exit")
private boolean removeOnDisconnect = false;
diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Help.java b/Essentials/src/com/earth2me/essentials/settings/commands/Help.java
index 03a9d5958..0b4787471 100644
--- a/Essentials/src/com/earth2me/essentials/settings/commands/Help.java
+++ b/Essentials/src/com/earth2me/essentials/settings/commands/Help.java
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Help extends StorageObject
+public class Help implements StorageObject
{
@Comment("Show other plugins commands in help")
private boolean showNonEssCommandsInHelp = true;
diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Home.java b/Essentials/src/com/earth2me/essentials/settings/commands/Home.java
index 6ec2f1339..8b3a0ca82 100644
--- a/Essentials/src/com/earth2me/essentials/settings/commands/Home.java
+++ b/Essentials/src/com/earth2me/essentials/settings/commands/Home.java
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Home extends StorageObject
+public class Home implements StorageObject
{
@Comment("When players die, should they respawn at their homes, instead of the spawnpoint?")
private boolean respawnAtHome = false;
diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Kit.java b/Essentials/src/com/earth2me/essentials/settings/commands/Kit.java
index 59b0b9a82..87aa42d3c 100644
--- a/Essentials/src/com/earth2me/essentials/settings/commands/Kit.java
+++ b/Essentials/src/com/earth2me/essentials/settings/commands/Kit.java
@@ -1,28 +1,28 @@
package com.earth2me.essentials.settings.commands;
-import com.earth2me.essentials.storage.MapType;
+import com.earth2me.essentials.storage.MapValueType;
import com.earth2me.essentials.storage.StorageObject;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import lombok.Data;
import lombok.EqualsAndHashCode;
+import org.bukkit.Material;
+import org.bukkit.inventory.ItemStack;
@Data
@EqualsAndHashCode(callSuper = false)
-public class Kit extends StorageObject
+public class Kit implements StorageObject
{
-
public Kit()
{
final KitObject kit = new KitObject();
kit.setDelay(10.0);
- kit.setItems(Arrays.asList("277 1,278 1,279 1".split(",")));
+ kit.getItems().add(new ItemStack(Material.DIAMOND_SPADE, 1));
+ kit.getItems().add(new ItemStack(Material.DIAMOND_PICKAXE, 1));
+ kit.getItems().add(new ItemStack(Material.DIAMOND_AXE, 1));
kits.put("tools", kit);
}
-
-
- @MapType(KitObject.class)
- private Map<String,KitObject> kits = new HashMap<String, KitObject>();
+ @MapValueType(KitObject.class)
+ private Map<String, KitObject> kits = new HashMap<String, KitObject>();
}
diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/KitObject.java b/Essentials/src/com/earth2me/essentials/settings/commands/KitObject.java
index 93f6c6ade..fe0353be9 100644
--- a/Essentials/src/com/earth2me/essentials/settings/commands/KitObject.java
+++ b/Essentials/src/com/earth2me/essentials/settings/commands/KitObject.java
@@ -6,13 +6,14 @@ import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
+import org.bukkit.inventory.ItemStack;
@Data
@EqualsAndHashCode(callSuper = false)
-public class KitObject extends StorageObject
+public class KitObject implements StorageObject
{
- @ListType
- private List<String> items = new ArrayList<String>();
+ @ListType(ItemStack.class)
+ private List<ItemStack> items = new ArrayList<ItemStack>();
private Double delay;
}
diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Lightning.java b/Essentials/src/com/earth2me/essentials/settings/commands/Lightning.java
index 510857247..e40e645da 100644
--- a/Essentials/src/com/earth2me/essentials/settings/commands/Lightning.java
+++ b/Essentials/src/com/earth2me/essentials/settings/commands/Lightning.java
@@ -5,9 +5,10 @@ import com.earth2me.essentials.storage.StorageObject;
import lombok.Data;
import lombok.EqualsAndHashCode;
+
@Data
@EqualsAndHashCode(callSuper = false)
-public class Lightning extends StorageObject
+public class Lightning implements StorageObject
{
@Comment("Shall we notify users when using /lightning")
private boolean warnPlayer = true;
diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Spawnmob.java b/Essentials/src/com/earth2me/essentials/settings/commands/Spawnmob.java
index 771da32d1..37d41c296 100644
--- a/Essentials/src/com/earth2me/essentials/settings/commands/Spawnmob.java
+++ b/Essentials/src/com/earth2me/essentials/settings/commands/Spawnmob.java
@@ -5,9 +5,10 @@ import com.earth2me.essentials.storage.StorageObject;
import lombok.Data;
import lombok.EqualsAndHashCode;
+
@Data
@EqualsAndHashCode(callSuper = false)
-public class Spawnmob extends StorageObject
+public class Spawnmob implements StorageObject
{
@Comment("The maximum amount of monsters, a player can spawn with a call of /spawnmob.")
private int limit = 10;
diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
index b9d224cec..aaf040c02 100644
--- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
+++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
@@ -1,11 +1,9 @@
package com.earth2me.essentials.signs;
-import com.earth2me.essentials.Trade;
-import com.earth2me.essentials.ChargeException;
-import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.*;
import java.util.HashSet;
+import java.util.Locale;
import java.util.Set;
import org.bukkit.Material;
import org.bukkit.block.Block;
@@ -30,14 +28,14 @@ public class EssentialsSign
{
final ISign sign = new EventSign(event);
final User user = ess.getUser(event.getPlayer());
- if (!(user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".create")
- || user.isAuthorized("essentials.signs.create." + signName.toLowerCase())))
+ if (!(user.isAuthorized("essentials.signs." + signName.toLowerCase(Locale.ENGLISH) + ".create")
+ || user.isAuthorized("essentials.signs.create." + signName.toLowerCase(Locale.ENGLISH))))
{
// Return true, so other plugins can use the same sign title, just hope
// they won't change it to §1[Signname]
return true;
}
- sign.setLine(0, Util.format("signFormatFail", this.signName));
+ sign.setLine(0, _("signFormatFail", this.signName));
try
{
final boolean ret = onSignCreate(sign, user, getUsername(user), ess);
@@ -61,12 +59,12 @@ public class EssentialsSign
public String getSuccessName()
{
- return Util.format("signFormatSuccess", this.signName);
+ return _("signFormatSuccess", this.signName);
}
public String getTemplateName()
{
- return Util.format("signFormatTemplate", this.signName);
+ return _("signFormatTemplate", this.signName);
}
private String getUsername(final User user)
@@ -80,8 +78,8 @@ public class EssentialsSign
final User user = ess.getUser(player);
try
{
- return (user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".use")
- || user.isAuthorized("essentials.signs.use." + signName.toLowerCase()))
+ return (user.isAuthorized("essentials.signs." + signName.toLowerCase(Locale.ENGLISH) + ".use")
+ || user.isAuthorized("essentials.signs.use." + signName.toLowerCase(Locale.ENGLISH)))
&& onSignInteract(sign, user, getUsername(user), ess);
}
catch (ChargeException ex)
@@ -102,8 +100,8 @@ public class EssentialsSign
final User user = ess.getUser(player);
try
{
- return (user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".break")
- || user.isAuthorized("essentials.signs.break." + signName.toLowerCase()))
+ return (user.isAuthorized("essentials.signs." + signName.toLowerCase(Locale.ENGLISH) + ".break")
+ || user.isAuthorized("essentials.signs.break." + signName.toLowerCase(Locale.ENGLISH)))
&& onSignBreak(sign, user, getUsername(user), ess);
}
catch (SignException ex)
@@ -177,7 +175,7 @@ public class EssentialsSign
}
return false;
}
-
+
public boolean onBlockBreak(final Block block, final IEssentials ess)
{
return true;
@@ -192,7 +190,7 @@ public class EssentialsSign
{
return true;
}
-
+
public boolean onBlockIgnite(final Block block, final IEssentials ess)
{
return true;
@@ -289,7 +287,7 @@ public class EssentialsSign
final int amount = Math.min(getIntegerPositive(sign.getLine(amountIndex)), item.getType().getMaxStackSize() * player.getInventory().getSize());
if (item.getTypeId() == 0 || amount < 1)
{
- throw new SignException(Util.i18n("moreThanZero"));
+ throw new SignException(_("moreThanZero"));
}
item.setAmount(amount);
return new Trade(item, ess);
@@ -311,7 +309,7 @@ public class EssentialsSign
final int quantity = getInteger(line);
if (quantity < 1)
{
- throw new SignException(Util.i18n("moreThanZero"));
+ throw new SignException(_("moreThanZero"));
}
return quantity;
}
@@ -355,7 +353,7 @@ public class EssentialsSign
final double quantity = getDouble(line);
if (Math.round(quantity * 100.0) < 1.0)
{
- throw new SignException(Util.i18n("moreThanZero"));
+ throw new SignException(_("moreThanZero"));
}
return quantity;
}
@@ -382,7 +380,7 @@ public class EssentialsSign
final String line = sign.getLine(index).trim();
if (line.isEmpty())
{
- return new Trade(signName.toLowerCase() + "sign", ess);
+ return new Trade(signName.toLowerCase(Locale.ENGLISH) + "sign", ess);
}
final Double money = getMoney(line);
@@ -391,15 +389,15 @@ public class EssentialsSign
final String[] split = line.split("[ :]+", 2);
if (split.length != 2)
{
- throw new SignException(Util.i18n("invalidCharge"));
+ throw new SignException(_("invalidCharge"));
}
final int quantity = getIntegerPositive(split[0]);
- final String item = split[1].toLowerCase();
+ final String item = split[1].toLowerCase(Locale.ENGLISH);
if (item.equalsIgnoreCase("times"))
{
sign.setLine(index, (quantity - decrement) + " times");
- return new Trade(signName.toLowerCase() + "sign", ess);
+ return new Trade(signName.toLowerCase(Locale.ENGLISH) + "sign", ess);
}
else
{
@@ -426,24 +424,27 @@ public class EssentialsSign
this.block = event.getBlock();
}
+ @Override
public final String getLine(final int index)
{
return event.getLine(index);
}
+ @Override
public final void setLine(final int index, final String text)
{
event.setLine(index, text);
}
+ @Override
public Block getBlock()
{
return block;
}
+ @Override
public void updateSign()
{
- return;
}
}
@@ -459,21 +460,25 @@ public class EssentialsSign
this.sign = (Sign)block.getState();
}
+ @Override
public final String getLine(final int index)
{
return sign.getLine(index);
}
+ @Override
public final void setLine(final int index, final String text)
{
sign.setLine(index, text);
}
+ @Override
public final Block getBlock()
{
return block;
}
+ @Override
public final void updateSign()
{
sign.update();
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBalance.java b/Essentials/src/com/earth2me/essentials/signs/SignBalance.java
index 3b961eef6..0b7328ba5 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignBalance.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignBalance.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.signs;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class SignBalance extends EssentialsSign
@@ -15,7 +15,7 @@ public class SignBalance extends EssentialsSign
@Override
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
{
- player.sendMessage(Util.format("balance", player.getMoney()));
+ player.sendMessage(_("balance", player.getMoney()));
return true;
}
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java
index 7320f27a4..2840df298 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java
@@ -8,14 +8,7 @@ import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
-import org.bukkit.event.block.BlockBreakEvent;
-import org.bukkit.event.block.BlockBurnEvent;
-import org.bukkit.event.block.BlockIgniteEvent;
-import org.bukkit.event.block.BlockListener;
-import org.bukkit.event.block.BlockPistonExtendEvent;
-import org.bukkit.event.block.BlockPistonRetractEvent;
-import org.bukkit.event.block.BlockPlaceEvent;
-import org.bukkit.event.block.SignChangeEvent;
+import org.bukkit.event.block.*;
public class SignBlockListener extends BlockListener
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBuy.java b/Essentials/src/com/earth2me/essentials/signs/SignBuy.java
index 39704ff0d..aa4e41426 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignBuy.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignBuy.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.signs;
-import com.earth2me.essentials.Trade;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
@@ -27,7 +27,8 @@ public class SignBuy extends EssentialsSign
final Trade items = getTrade(sign, 1, 2, player, ess);
final Trade charge = getTrade(sign, 3, ess);
charge.isAffordableFor(player);
- if (!items.pay(player, false)) {
+ if (!items.pay(player, false))
+ {
throw new ChargeException("Inventory full");
}
charge.charge(player);
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java
index e4d050305..f747ac07c 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java
@@ -2,8 +2,7 @@ package com.earth2me.essentials.signs;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import net.minecraft.server.InventoryPlayer;
-import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
+import com.earth2me.essentials.craftbukkit.ShowInventory;
public class SignDisposal extends EssentialsSign
@@ -16,9 +15,7 @@ public class SignDisposal extends EssentialsSign
@Override
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess)
{
- final CraftInventoryPlayer inv = new CraftInventoryPlayer(new InventoryPlayer(player.getHandle()));
- inv.clear();
- player.showInventory(inv);
+ ShowInventory.showEmptyInventory(player.getBase());
return true;
}
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java b/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java
index 4f6736989..09bdbeea5 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java
@@ -4,7 +4,6 @@ import com.earth2me.essentials.IEssentials;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.event.entity.EndermanPickupEvent;
-import org.bukkit.event.entity.EndermanPlaceEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityListener;
@@ -70,5 +69,5 @@ public class SignEntityListener extends EntityListener
return;
}
}
- }
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java
index 8939f4bea..7af7dffd7 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java
@@ -1,11 +1,11 @@
package com.earth2me.essentials.signs;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.InventoryWorkaround;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
-import net.minecraft.server.InventoryPlayer;
-import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
+import com.earth2me.essentials.craftbukkit.ShowInventory;
+import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
@@ -27,11 +27,13 @@ public class SignFree extends EssentialsSign
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
{
final ItemStack item = getItemStack(sign.getLine(1), 1, ess);
- item.setAmount(item.getType().getMaxStackSize()*9*4);
- final CraftInventoryPlayer inv = new CraftInventoryPlayer(new InventoryPlayer(player.getHandle()));
- inv.clear();
- InventoryWorkaround.addItem(inv, true, item);
- player.showInventory(inv);
+ if (item.getType() == Material.AIR)
+ {
+ throw new SignException(_("cantSpawnItem", "Air"));
+ }
+
+ item.setAmount(item.getType().getMaxStackSize() * 9 * 4);
+ ShowInventory.showFilledInventory(player.getBase(), item);
Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess);
return true;
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java b/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java
new file mode 100644
index 000000000..37a9fb1b8
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java
@@ -0,0 +1,37 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.User;
+import java.util.Locale;
+import org.bukkit.GameMode;
+
+
+public class SignGameMode extends EssentialsSign
+{
+ public SignGameMode()
+ {
+ super("GameMode");
+ }
+
+ @Override
+ protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ validateTrade(sign, 1, ess);
+ return true;
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ final Trade charge = getTrade(sign, 1, ess);
+ charge.isAffordableFor(player);
+
+ player.setGameMode(player.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL);
+ player.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
+ charge.charge(player);
+ return true;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignHeal.java b/Essentials/src/com/earth2me/essentials/signs/SignHeal.java
index cc932c5e2..be8b7ba1d 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignHeal.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignHeal.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.signs;
-import com.earth2me.essentials.Trade;
import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class SignHeal extends EssentialsSign
@@ -29,7 +29,7 @@ public class SignHeal extends EssentialsSign
player.setHealth(20);
player.setFoodLevel(20);
player.setFireTicks(0);
- player.sendMessage(Util.i18n("youAreHealed"));
+ player.sendMessage(_("youAreHealed"));
charge.charge(player);
return true;
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignMail.java b/Essentials/src/com/earth2me/essentials/signs/SignMail.java
index 1c3d162c4..b220fb2f5 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignMail.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignMail.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.signs;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import java.util.List;
@@ -19,14 +19,14 @@ public class SignMail extends EssentialsSign
final List<String> mail = player.getMails();
if (mail.isEmpty())
{
- player.sendMessage(Util.i18n("noNewMail"));
+ player.sendMessage(_("noNewMail"));
return false;
}
for (String s : mail)
{
player.sendMessage(s);
}
- player.sendMessage(Util.i18n("markMailAsRead"));
+ player.sendMessage(_("markMailAsRead"));
return true;
}
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java
index 157535cd9..e82759655 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java
@@ -1,14 +1,11 @@
package com.earth2me.essentials.signs;
import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -35,12 +32,17 @@ public class SignProtection extends EssentialsSign
protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
{
sign.setLine(3, "§4" + username);
- if (hasAdjacentBlock(sign.getBlock()) && isBlockProtected(sign.getBlock(), player, username, true) != SignProtectionState.NOT_ALLOWED)
+ if (hasAdjacentBlock(sign.getBlock()))
{
- sign.setLine(3, "§1" + username);
- return true;
+ final SignProtectionState state = isBlockProtected(sign.getBlock(), player, username, true);
+ if (state == SignProtectionState.NOSIGN || state == SignProtectionState.OWNER
+ || player.isAuthorized("essentials.signs.protection.override"))
+ {
+ sign.setLine(3, "§1" + username);
+ return true;
+ }
}
- player.sendMessage(Util.i18n("signProtectInvalidLocation"));
+ player.sendMessage(_("signProtectInvalidLocation"));
return false;
}
@@ -183,11 +185,6 @@ public class SignProtection extends EssentialsSign
SignProtectionState retstate = SignProtectionState.NOSIGN;
for (SignProtectionState state : signs.values())
{
-
- if (state == SignProtectionState.OWNER)
- {
- return state;
- }
if (state == SignProtectionState.ALLOWED)
{
retstate = state;
@@ -197,6 +194,16 @@ public class SignProtection extends EssentialsSign
retstate = state;
}
}
+ if (!secure || retstate == SignProtectionState.NOSIGN)
+ {
+ for (SignProtectionState state : signs.values())
+ {
+ if (state == SignProtectionState.OWNER)
+ {
+ return state;
+ }
+ }
+ }
return retstate;
}
@@ -249,7 +256,7 @@ public class SignProtection extends EssentialsSign
if ((state == SignProtectionState.ALLOWED || state == SignProtectionState.NOT_ALLOWED)
&& !player.isAuthorized("essentials.signs.protection.override"))
{
- player.sendMessage(Util.format("noPlacePermission", block.getType().toString().toLowerCase()));
+ player.sendMessage(_("noPlacePermission", block.getType().toString().toLowerCase(Locale.ENGLISH)));
return false;
}
}
@@ -274,7 +281,7 @@ public class SignProtection extends EssentialsSign
}
- player.sendMessage(Util.format("noAccessPermission", block.getType().toString().toLowerCase()));
+ player.sendMessage(_("noAccessPermission", block.getType().toString().toLowerCase(Locale.ENGLISH)));
return false;
}
@@ -297,10 +304,10 @@ public class SignProtection extends EssentialsSign
}
- player.sendMessage(Util.format("noDestroyPermission", block.getType().toString().toLowerCase()));
+ player.sendMessage(_("noDestroyPermission", block.getType().toString().toLowerCase(Locale.ENGLISH)));
return false;
}
-
+
@Override
public boolean onBlockBreak(final Block block, final IEssentials ess)
{
@@ -324,7 +331,7 @@ public class SignProtection extends EssentialsSign
return state == SignProtectionState.NOSIGN;
}
-
+
@Override
public boolean onBlockIgnite(final Block block, final IEssentials ess)
{
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignSell.java b/Essentials/src/com/earth2me/essentials/signs/SignSell.java
index 2a5a8cfcc..442a503c2 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignSell.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignSell.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.signs;
-import com.earth2me.essentials.Trade;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignSpawnmob.java b/Essentials/src/com/earth2me/essentials/signs/SignSpawnmob.java
index 071b61be1..7c4cfcd54 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignSpawnmob.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignSpawnmob.java
@@ -9,7 +9,6 @@ import com.earth2me.essentials.commands.Commandspawnmob;
public class SignSpawnmob extends EssentialsSign
{
-
public SignSpawnmob()
{
super("Spawnmob");
@@ -30,7 +29,8 @@ public class SignSpawnmob extends EssentialsSign
charge.isAffordableFor(player);
Commandspawnmob command = new Commandspawnmob();
command.setEssentials(ess);
- String[] args = new String[] {
+ String[] args = new String[]
+ {
sign.getLine(2), sign.getLine(1)
};
try
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTime.java b/Essentials/src/com/earth2me/essentials/signs/SignTime.java
index 120347467..99c579ff4 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignTime.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignTime.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.signs;
-import com.earth2me.essentials.Trade;
import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class SignTime extends EssentialsSign
@@ -29,7 +29,7 @@ public class SignTime extends EssentialsSign
sign.setLine(1, "§2Night");
return true;
}
- throw new SignException(Util.i18n("onlyDayNight"));
+ throw new SignException(_("onlyDayNight"));
}
@Override
@@ -52,6 +52,6 @@ public class SignTime extends EssentialsSign
charge.charge(player);
return true;
}
- throw new SignException(Util.i18n("onlyDayNight"));
+ throw new SignException(_("onlyDayNight"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
index 6c956165a..c2f3eb8e4 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
@@ -1,10 +1,7 @@
package com.earth2me.essentials.signs;
-import com.earth2me.essentials.ChargeException;
-import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.Trade;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.*;
import org.bukkit.inventory.ItemStack;
@@ -45,7 +42,7 @@ public class SignTrade extends EssentialsSign
{
if (store == null)
{
- throw new SignException(Util.i18n("tradeSignEmptyOwner"), e);
+ throw new SignException(_("tradeSignEmptyOwner"), e);
}
}
Trade.log("Sign", "Trade", "OwnerInteract", username, store, username, stored, sign.getBlock().getLocation(), ess);
@@ -150,7 +147,7 @@ public class SignTrade extends EssentialsSign
amount -= amount % money;
if (amount < 0.01 || money < 0.01)
{
- throw new SignException(Util.i18n("moreThanZero"));
+ throw new SignException(_("moreThanZero"));
}
sign.setLine(index, Util.formatCurrency(money, ess) + ":" + Util.formatCurrency(amount, ess).substring(1));
return;
@@ -163,7 +160,7 @@ public class SignTrade extends EssentialsSign
final ItemStack item = getItemStack(split[1], amount, ess);
if (amount < 1 || item.getTypeId() == 0)
{
- throw new SignException(Util.i18n("moreThanZero"));
+ throw new SignException(_("moreThanZero"));
}
String newline = amount + " " + split[1] + ":0";
if ((newline + amount).length() > 15)
@@ -182,12 +179,12 @@ public class SignTrade extends EssentialsSign
amount -= amount % stackamount;
if (amount < 1 || stackamount < 1 || item.getTypeId() == 0)
{
- throw new SignException(Util.i18n("moreThanZero"));
+ throw new SignException(_("moreThanZero"));
}
sign.setLine(index, stackamount + " " + split[1] + ":" + amount);
return;
}
- throw new SignException(Util.format("invalidSignLine", index + 1));
+ throw new SignException(_("invalidSignLine", index + 1));
}
protected final Trade getTrade(final ISign sign, final int index, final boolean fullAmount, final boolean notEmpty, final IEssentials ess) throws SignException
@@ -212,7 +209,7 @@ public class SignTrade extends EssentialsSign
}
catch (SignException e)
{
- throw new SignException(Util.i18n("tradeSignEmpty"));
+ throw new SignException(_("tradeSignEmpty"));
}
}
@@ -224,12 +221,12 @@ public class SignTrade extends EssentialsSign
amount -= amount % stackamount;
if (notEmpty && (amount < 1 || stackamount < 1 || item.getTypeId() == 0))
{
- throw new SignException(Util.i18n("tradeSignEmpty"));
+ throw new SignException(_("tradeSignEmpty"));
}
item.setAmount(fullAmount ? amount : stackamount);
return new Trade(item, ess);
}
- throw new SignException(Util.format("invalidSignLine", index + 1));
+ throw new SignException(_("invalidSignLine", index + 1));
}
protected final void substractAmount(final ISign sign, final int index, final Trade trade, final IEssentials ess) throws SignException
@@ -288,6 +285,7 @@ public class SignTrade extends EssentialsSign
if (split.length == 3)
{
final int stackamount = getIntegerPositive(split[0]);
+ //TODO: Unused local variable
final ItemStack item = getItemStack(split[1], stackamount, ess);
final int amount = getInteger(split[2]);
final String newline = stackamount + " " + split[1] + ":" + (amount + Math.round(value));
@@ -298,6 +296,6 @@ public class SignTrade extends EssentialsSign
sign.setLine(index, newline);
return;
}
- throw new SignException(Util.format("invalidSignLine", index + 1));
+ throw new SignException(_("invalidSignLine", index + 1));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java
index 244450d8a..bd56be46e 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.signs;
-import com.earth2me.essentials.Trade;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
@@ -35,7 +35,7 @@ public class SignWarp extends EssentialsSign
throw new SignException(ex.getMessage(), ex);
}
final String group = sign.getLine(2);
- if ("Everyone".equalsIgnoreCase(group))
+ if ("Everyone".equalsIgnoreCase(group) || "Everybody".equalsIgnoreCase(group))
{
sign.setLine(2, "§2Everyone");
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignWeather.java b/Essentials/src/com/earth2me/essentials/signs/SignWeather.java
index 05496ac14..559fcc2e3 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignWeather.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignWeather.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.signs;
import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
public class SignWeather extends EssentialsSign
@@ -29,7 +29,7 @@ public class SignWeather extends EssentialsSign
sign.setLine(1, "§2Storm");
return true;
}
- throw new SignException(Util.i18n("onlySunStorm"));
+ throw new SignException(_("onlySunStorm"));
}
@Override
@@ -50,7 +50,6 @@ public class SignWeather extends EssentialsSign
charge.charge(player);
return true;
}
- throw new SignException(Util.i18n("onlySunStorm"));
+ throw new SignException(_("onlySunStorm"));
}
}
-
diff --git a/Essentials/src/com/earth2me/essentials/signs/Signs.java b/Essentials/src/com/earth2me/essentials/signs/Signs.java
index 53ed1d6b0..d7c0d2086 100644
--- a/Essentials/src/com/earth2me/essentials/signs/Signs.java
+++ b/Essentials/src/com/earth2me/essentials/signs/Signs.java
@@ -7,6 +7,7 @@ public enum Signs
BUY(new SignBuy()),
DISPOSAL(new SignDisposal()),
FREE(new SignFree()),
+ GAMEMODE(new SignGameMode()),
HEAL(new SignHeal()),
MAIL(new SignMail()),
PROTECTION(new SignProtection()),
diff --git a/Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java b/Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java
new file mode 100644
index 000000000..2656d183d
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java
@@ -0,0 +1,182 @@
+package com.earth2me.essentials.storage;
+
+import java.util.regex.Pattern;
+import org.bukkit.Bukkit;
+import org.bukkit.Location;
+import org.bukkit.Material;
+import org.bukkit.World;
+import org.bukkit.inventory.ItemStack;
+import org.bukkit.material.MaterialData;
+import org.yaml.snakeyaml.constructor.Constructor;
+import org.yaml.snakeyaml.nodes.MappingNode;
+import org.yaml.snakeyaml.nodes.Node;
+import org.yaml.snakeyaml.nodes.NodeId;
+import org.yaml.snakeyaml.nodes.NodeTuple;
+import org.yaml.snakeyaml.nodes.ScalarNode;
+
+
+public class BukkitConstructor extends Constructor
+{
+ private final transient Pattern NUMPATTERN = Pattern.compile("\\d+");
+
+ public BukkitConstructor(Class clazz)
+ {
+ super(clazz);
+ yamlClassConstructors.put(NodeId.scalar, new ConstructBukkitScalar());
+ yamlClassConstructors.put(NodeId.mapping, new ConstructBukkitMapping());
+ }
+
+
+ private class ConstructBukkitScalar extends ConstructScalar
+ {
+ @Override
+ public Object construct(final Node node)
+ {
+ if (node.getType().equals(Material.class))
+ {
+ final String val = (String)constructScalar((ScalarNode)node);
+ Material mat;
+ if (NUMPATTERN.matcher(val).matches())
+ {
+ final int typeId = Integer.parseInt(val);
+ mat = Material.getMaterial(typeId);
+ }
+ else
+ {
+ mat = Material.matchMaterial(val);
+ }
+ return mat;
+ }
+ if (node.getType().equals(MaterialData.class))
+ {
+ final String val = (String)constructScalar((ScalarNode)node);
+ if (val.isEmpty())
+ {
+ return null;
+ }
+ final String[] split = val.split("[:+',;.]", 2);
+ if (split.length == 0)
+ {
+ return null;
+ }
+ Material mat;
+ if (NUMPATTERN.matcher(split[0]).matches())
+ {
+ final int typeId = Integer.parseInt(split[0]);
+ mat = Material.getMaterial(typeId);
+ }
+ else
+ {
+ mat = Material.matchMaterial(split[0]);
+ }
+ byte data = 0;
+ if (split.length == 2 && NUMPATTERN.matcher(split[1]).matches())
+ {
+ data = Byte.parseByte(split[1]);
+ }
+ return new MaterialData(mat, data);
+ }
+ if (node.getType().equals(ItemStack.class))
+ {
+ final String val = (String)constructScalar((ScalarNode)node);
+ if (val.isEmpty())
+ {
+ return null;
+ }
+ final String[] split1 = val.split("\\W", 2);
+ if (split1.length == 0)
+ {
+ return null;
+ }
+ final String[] split2 = split1[0].split("[:+',;.]", 2);
+ if (split2.length == 0)
+ {
+ return null;
+ }
+ Material mat;
+ if (NUMPATTERN.matcher(split2[0]).matches())
+ {
+ final int typeId = Integer.parseInt(split2[0]);
+ mat = Material.getMaterial(typeId);
+ }
+ else
+ {
+ mat = Material.matchMaterial(split2[0]);
+ }
+ short data = 0;
+ if (split2.length == 2 && NUMPATTERN.matcher(split2[1]).matches())
+ {
+ data = Short.parseShort(split2[1]);
+ }
+ int size = mat.getMaxStackSize();
+ if (split1.length == 2 && NUMPATTERN.matcher(split1[1]).matches())
+ {
+ size = Integer.parseInt(split1[1]);
+ }
+ return new ItemStack(mat, size, data);
+ }
+ return super.construct(node);
+ }
+ }
+
+
+ private class ConstructBukkitMapping extends ConstructMapping
+ {
+ @Override
+ public Object construct(final Node node)
+ {
+ if (node.getType().equals(Location.class))
+ {
+ //TODO: NPE checks
+ final MappingNode mnode = (MappingNode)node;
+ String worldName = "";
+ double x = 0, y = 0, z = 0;
+ float yaw = 0, pitch = 0;
+ if (mnode.getValue().size() < 4)
+ {
+ return null;
+ }
+ for (NodeTuple nodeTuple : mnode.getValue())
+ {
+ final String key = (String)constructScalar((ScalarNode)nodeTuple.getKeyNode());
+ final ScalarNode snode = (ScalarNode)nodeTuple.getValueNode();
+ if (key.equalsIgnoreCase("world"))
+ {
+ worldName = (String)constructScalar(snode);
+ }
+ if (key.equalsIgnoreCase("x"))
+ {
+ x = Double.parseDouble((String)constructScalar(snode));
+ }
+ if (key.equalsIgnoreCase("y"))
+ {
+ y = Double.parseDouble((String)constructScalar(snode));
+ }
+ if (key.equalsIgnoreCase("z"))
+ {
+ z = Double.parseDouble((String)constructScalar(snode));
+ }
+ if (key.equalsIgnoreCase("yaw"))
+ {
+ yaw = Float.parseFloat((String)constructScalar(snode));
+ }
+ if (key.equalsIgnoreCase("pitch"))
+ {
+ pitch = Float.parseFloat((String)constructScalar(snode));
+ }
+ }
+ if (worldName == null || worldName.isEmpty())
+ {
+ return null;
+ }
+ final World world = Bukkit.getWorld(worldName);
+ if (world == null)
+ {
+ return null;
+ }
+ return new Location(world, x, y, z, yaw, pitch);
+ }
+ return super.construct(node);
+ }
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/storage/Comment.java b/Essentials/src/com/earth2me/essentials/storage/Comment.java
index b43cec980..8cb9d4d31 100644
--- a/Essentials/src/com/earth2me/essentials/storage/Comment.java
+++ b/Essentials/src/com/earth2me/essentials/storage/Comment.java
@@ -1,10 +1,6 @@
package com.earth2me.essentials.storage;
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
+import java.lang.annotation.*;
@Target(ElementType.FIELD)
diff --git a/Essentials/src/com/earth2me/essentials/storage/IStorageReader.java b/Essentials/src/com/earth2me/essentials/storage/IStorageReader.java
new file mode 100644
index 000000000..5e259a322
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/storage/IStorageReader.java
@@ -0,0 +1,7 @@
+package com.earth2me.essentials.storage;
+
+
+public interface IStorageReader
+{
+ <T extends StorageObject> T load(final Class<? extends T> clazz);
+}
diff --git a/Essentials/src/com/earth2me/essentials/storage/IStorageWriter.java b/Essentials/src/com/earth2me/essentials/storage/IStorageWriter.java
new file mode 100644
index 000000000..5b8498869
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/storage/IStorageWriter.java
@@ -0,0 +1,7 @@
+package com.earth2me.essentials.storage;
+
+
+public interface IStorageWriter
+{
+ void save(final StorageObject object);
+}
diff --git a/Essentials/src/com/earth2me/essentials/storage/MapType.java b/Essentials/src/com/earth2me/essentials/storage/MapKeyType.java
index dc5636315..aa162e51c 100644
--- a/Essentials/src/com/earth2me/essentials/storage/MapType.java
+++ b/Essentials/src/com/earth2me/essentials/storage/MapKeyType.java
@@ -8,7 +8,7 @@ import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
-public @interface MapType
+public @interface MapKeyType
{
Class value() default String.class;
} \ No newline at end of file
diff --git a/Essentials/src/com/earth2me/essentials/storage/MapValueType.java b/Essentials/src/com/earth2me/essentials/storage/MapValueType.java
new file mode 100644
index 000000000..1b5fff978
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/storage/MapValueType.java
@@ -0,0 +1,14 @@
+package com.earth2me.essentials.storage;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MapValueType
+{
+ Class value() default String.class;
+} \ No newline at end of file
diff --git a/Essentials/src/com/earth2me/essentials/storage/StorageObject.java b/Essentials/src/com/earth2me/essentials/storage/StorageObject.java
index a35338516..0c66fefcf 100644
--- a/Essentials/src/com/earth2me/essentials/storage/StorageObject.java
+++ b/Essentials/src/com/earth2me/essentials/storage/StorageObject.java
@@ -1,250 +1,6 @@
package com.earth2me.essentials.storage;
-import java.io.PrintWriter;
-import java.io.Reader;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.yaml.snakeyaml.DumperOptions;
-import org.yaml.snakeyaml.TypeDescription;
-import org.yaml.snakeyaml.Yaml;
-import org.yaml.snakeyaml.composer.Composer;
-import org.yaml.snakeyaml.constructor.Constructor;
-import org.yaml.snakeyaml.introspector.PropertyUtils;
-
-public class StorageObject
+public interface StorageObject
{
- protected Class<? extends StorageObject> clazz;
-
- protected StorageObject()
- {
- }
- private static Map<Class, Constructor> constructors = new HashMap<Class, Constructor>();
-
- public static <T extends StorageObject> T load(Class<? extends T> clazz, Reader reader)
- {
- Constructor constructor;
- if (constructors.containsKey(clazz))
- {
- constructor = constructors.get(clazz);
- }
- else
- {
- constructor = prepareConstructor(clazz);
- constructors.put(clazz, constructor);
- }
-
- final Yaml yaml = new Yaml(constructor);
- T ret = (T)yaml.load(reader);
- if (ret == null)
- {
- try
- {
- ret = (T)clazz.newInstance();
- }
- catch (InstantiationException ex)
- {
- Logger.getLogger(StorageObject.class.getName()).log(Level.SEVERE, null, ex);
- }
- catch (IllegalAccessException ex)
- {
- Logger.getLogger(StorageObject.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
- ret.clazz = clazz;
- return ret;
- }
-
- private static Constructor prepareConstructor(final Class<?> clazz)
- {
- final Constructor constructor = new Constructor(clazz);
- final Set<Class> classes = new HashSet<Class>();
-
- prepareConstructor(constructor, classes, clazz);
- return constructor;
- }
-
- private static void prepareConstructor(final Constructor constructor, final Set<Class> classes, final Class clazz)
- {
- classes.add(clazz);
- final TypeDescription description = new TypeDescription(clazz);
- for (Field field : clazz.getDeclaredFields())
- {
- final ListType listType = field.getAnnotation(ListType.class);
- if (listType != null)
- {
- description.putListPropertyType(field.getName(), listType.value());
- if (StorageObject.class.isAssignableFrom(listType.value())
- && !classes.contains(listType.value()))
- {
- prepareConstructor(constructor, classes, listType.value());
- }
- }
- final MapType mapType = field.getAnnotation(MapType.class);
- if (mapType != null)
- {
- description.putMapPropertyType(field.getName(), String.class, mapType.value());
- if (StorageObject.class.isAssignableFrom(mapType.value())
- && !classes.contains(mapType.value()))
- {
- prepareConstructor(constructor, classes, mapType.value());
- }
- }
- if (StorageObject.class.isAssignableFrom(field.getType())
- && !classes.contains(field.getType()))
- {
- prepareConstructor(constructor, classes, field.getType());
- }
- }
- constructor.addTypeDescription(description);
- }
- private transient Yaml yaml;
-
- public void save(final PrintWriter writer)
- {
- final DumperOptions ops = new DumperOptions();
- yaml = new Yaml(ops);
- try
- {
- writeToFile(this, writer, 0, clazz);
- }
- catch (IllegalArgumentException ex)
- {
- Logger.getLogger(StorageObject.class.getName()).log(Level.SEVERE, null, ex);
- }
- catch (IllegalAccessException ex)
- {
- Logger.getLogger(StorageObject.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
-
- private void writeToFile(final Object object, final PrintWriter writer, final int depth, final Class clazz) throws IllegalArgumentException, IllegalAccessException
- {
- for (Field field : clazz.getDeclaredFields())
- {
- final int modifier = field.getModifiers();
- if (Modifier.isPrivate(modifier) && !Modifier.isTransient(modifier) && !Modifier.isStatic(modifier))
- {
- field.setAccessible(true);
- final boolean commentPresent = field.isAnnotationPresent(Comment.class);
- final String name = field.getName();
- if (commentPresent)
- {
- final Comment comments = field.getAnnotation(Comment.class);
- for (String comment : comments.value())
- {
- final String trimmed = comment.trim();
- if (trimmed.isEmpty())
- {
- continue;
- }
- writeIndention(writer, depth);
- writer.print("# ");
- writer.print(trimmed);
- writer.println();
- }
- }
-
- final Object data = field.get(object);
- if (data == null && !commentPresent)
- {
- continue;
- }
- writeIndention(writer, depth);
- if (data == null && commentPresent)
- {
- writer.print('#');
- }
- writer.print(name);
- writer.print(": ");
- if (data == null && commentPresent)
- {
- writer.println();
- writer.println();
- continue;
- }
- if (data instanceof StorageObject)
- {
- writer.println();
- writeToFile(data, writer, depth + 1, data.getClass());
- }
- else if (data instanceof Map)
- {
- writer.println();
- for (Entry<String, Object> entry : ((Map<String, Object>)data).entrySet())
- {
- final Object value = entry.getValue();
- if (value != null)
- {
- writeIndention(writer, depth + 1);
- writer.print(entry.getKey());
- writer.print(": ");
- if (value instanceof StorageObject)
- {
- writer.println();
- writeToFile(value, writer, depth + 2, value.getClass());
- }
- else if (value instanceof String || value instanceof Boolean || value instanceof Number)
- {
- yaml.dumpAll(Collections.singletonList(value).iterator(), writer);
- writer.println();
- }
- else
- {
- throw new UnsupportedOperationException();
- }
-
- }
- }
- }
- else if (data instanceof Collection)
- {
- writer.println();
- for (Object entry : (Collection<Object>)data)
- {
- if (entry != null)
- {
- writeIndention(writer, depth + 1);
- writer.print("- ");
- if (entry instanceof String || entry instanceof Boolean || entry instanceof Number)
- {
- yaml.dumpAll(Collections.singletonList(entry).iterator(), writer);
- }
- else
- {
- throw new UnsupportedOperationException();
- }
- }
- }
- writer.println();
- }
- else if (data instanceof String || data instanceof Boolean || data instanceof Number)
- {
- yaml.dumpAll(Collections.singletonList(data).iterator(), writer);
- writer.println();
- }
- else
- {
- throw new UnsupportedOperationException();
- }
- }
- }
- }
-
- private void writeIndention(final PrintWriter writer, final int depth)
- {
- for (int i = 0; i < depth; i++)
- {
- writer.print(" ");
- }
- }
}
diff --git a/Essentials/src/com/earth2me/essentials/storage/YamlStorageReader.java b/Essentials/src/com/earth2me/essentials/storage/YamlStorageReader.java
new file mode 100644
index 000000000..2881c1f18
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/storage/YamlStorageReader.java
@@ -0,0 +1,126 @@
+package com.earth2me.essentials.storage;
+
+import java.io.Reader;
+import java.lang.reflect.Field;
+import java.util.*;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.yaml.snakeyaml.TypeDescription;
+import org.yaml.snakeyaml.Yaml;
+import org.yaml.snakeyaml.constructor.Constructor;
+
+
+public class YamlStorageReader implements IStorageReader
+{
+ private transient static Map<Class, Yaml> preparedYamls = Collections.synchronizedMap(new HashMap<Class, Yaml>());
+ private transient static Map<Class, ReentrantLock> locks = new HashMap<Class, ReentrantLock>();
+ private transient final Reader reader;
+
+ public YamlStorageReader(final Reader reader)
+ {
+ this.reader = reader;
+ }
+
+ public <T extends StorageObject> T load(final Class<? extends T> clazz)
+ {
+ Yaml yaml = preparedYamls.get(clazz);
+ if (yaml == null)
+ {
+ yaml = new Yaml(prepareConstructor(clazz));
+ preparedYamls.put(clazz, yaml);
+ }
+ ReentrantLock lock;
+ synchronized (locks)
+ {
+ lock = locks.get(clazz);
+ if (lock == null)
+ {
+ lock = new ReentrantLock();
+ }
+ }
+ T ret;
+ lock.lock();
+ try
+ {
+ ret = (T)yaml.load(reader);
+ }
+ finally
+ {
+ lock.unlock();
+ }
+ if (ret == null)
+ {
+ try
+ {
+ ret = (T)clazz.newInstance();
+ }
+ catch (InstantiationException ex)
+ {
+ Logger.getLogger(StorageObject.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ catch (IllegalAccessException ex)
+ {
+ Logger.getLogger(StorageObject.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
+ return ret;
+ }
+
+ private static Constructor prepareConstructor(final Class<?> clazz)
+ {
+ final Constructor constructor = new BukkitConstructor(clazz);
+ final Set<Class> classes = new HashSet<Class>();
+
+ prepareConstructor(constructor, classes, clazz);
+ return constructor;
+ }
+
+ private static void prepareConstructor(final Constructor constructor, final Set<Class> classes, final Class clazz)
+ {
+ classes.add(clazz);
+ final TypeDescription description = new TypeDescription(clazz);
+ for (Field field : clazz.getDeclaredFields())
+ {
+ prepareList(field, description, classes, constructor);
+ prepareMap(field, description, classes, constructor);
+ if (StorageObject.class.isAssignableFrom(field.getType())
+ && !classes.contains(field.getType()))
+ {
+ prepareConstructor(constructor, classes, field.getType());
+ }
+ }
+ constructor.addTypeDescription(description);
+ }
+
+ private static void prepareList(final Field field, final TypeDescription description, final Set<Class> classes, final Constructor constructor)
+ {
+ final ListType listType = field.getAnnotation(ListType.class);
+ if (listType != null)
+ {
+ description.putListPropertyType(field.getName(), listType.value());
+ if (StorageObject.class.isAssignableFrom(listType.value())
+ && !classes.contains(listType.value()))
+ {
+ prepareConstructor(constructor, classes, listType.value());
+ }
+ }
+ }
+
+ private static void prepareMap(final Field field, final TypeDescription description, final Set<Class> classes, final Constructor constructor)
+ {
+ final MapValueType mapType = field.getAnnotation(MapValueType.class);
+ if (mapType != null)
+ {
+ final MapKeyType mapKeyType = field.getAnnotation(MapKeyType.class);
+ description.putMapPropertyType(field.getName(),
+ mapKeyType == null ? String.class : mapKeyType.value(),
+ mapType.value());
+ if (StorageObject.class.isAssignableFrom(mapType.value())
+ && !classes.contains(mapType.value()))
+ {
+ prepareConstructor(constructor, classes, mapType.value());
+ }
+ }
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/storage/YamlStorageWriter.java b/Essentials/src/com/earth2me/essentials/storage/YamlStorageWriter.java
new file mode 100644
index 000000000..048abe737
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/storage/YamlStorageWriter.java
@@ -0,0 +1,295 @@
+package com.earth2me.essentials.storage;
+
+import java.io.PrintWriter;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.regex.Pattern;
+import org.bukkit.Location;
+import org.bukkit.Material;
+import org.bukkit.inventory.ItemStack;
+import org.bukkit.material.MaterialData;
+import org.yaml.snakeyaml.Yaml;
+
+
+public class YamlStorageWriter implements IStorageWriter
+{
+ private transient static final Pattern NON_WORD_PATTERN = Pattern.compile("\\W");
+ private transient final PrintWriter writer;
+ private transient static final Yaml YAML = new Yaml();
+
+ public YamlStorageWriter(final PrintWriter writer)
+ {
+ this.writer = writer;
+ }
+
+ public void save(final StorageObject object)
+ {
+ try
+ {
+ writeToFile(object, 0, object.getClass());
+ }
+ catch (IllegalArgumentException ex)
+ {
+ Logger.getLogger(YamlStorageWriter.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ catch (IllegalAccessException ex)
+ {
+ Logger.getLogger(YamlStorageWriter.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
+
+ private void writeToFile(final Object object, final int depth, final Class clazz) throws IllegalAccessException
+ {
+ for (Field field : clazz.getDeclaredFields())
+ {
+ final int modifier = field.getModifiers();
+ if (Modifier.isPrivate(modifier) && !Modifier.isTransient(modifier) && !Modifier.isStatic(modifier))
+ {
+ field.setAccessible(true);
+
+ final Object data = field.get(object);
+ if (writeKey(field, depth, data))
+ {
+ continue;
+ }
+ if (data instanceof StorageObject)
+ {
+ writer.println();
+ writeToFile(data, depth + 1, data.getClass());
+ }
+ else if (data instanceof Map)
+ {
+ writeMap((Map<Object, Object>)data, depth + 1);
+ }
+ else if (data instanceof Collection)
+ {
+ writeCollection((Collection<Object>)data, depth + 1);
+ }
+ else if (data instanceof Location)
+ {
+ writeLocation((Location)data, depth + 1);
+ }
+ else
+ {
+ writeScalar(data);
+ writer.println();
+ }
+ }
+ }
+ }
+
+ private boolean writeKey(final Field field, final int depth, final Object data)
+ {
+ final boolean commentPresent = writeComment(field, depth);
+ if (data == null && !commentPresent)
+ {
+ return true;
+ }
+ writeIndention(depth);
+ if (data == null && commentPresent)
+ {
+ writer.print('#');
+ }
+ final String name = field.getName();
+ writer.print(name);
+ writer.print(": ");
+ if (data == null && commentPresent)
+ {
+ writer.println();
+ writer.println();
+ return true;
+ }
+ return false;
+ }
+
+ private boolean writeComment(final Field field, final int depth)
+ {
+ final boolean commentPresent = field.isAnnotationPresent(Comment.class);
+ if (commentPresent)
+ {
+ final Comment comments = field.getAnnotation(Comment.class);
+ for (String comment : comments.value())
+ {
+ final String trimmed = comment.trim();
+ if (trimmed.isEmpty())
+ {
+ continue;
+ }
+ writeIndention(depth);
+ writer.print("# ");
+ writer.print(trimmed);
+ writer.println();
+ }
+ }
+ return commentPresent;
+ }
+
+ private void writeCollection(final Collection<Object> data, final int depth) throws IllegalAccessException
+ {
+ writer.println();
+ if (data.isEmpty())
+ {
+ writer.println();
+ }
+ for (Object entry : data)
+ {
+ if (entry != null)
+ {
+ writeIndention(depth);
+ writer.print("- ");
+ if (entry instanceof StorageObject)
+ {
+ writer.println();
+ writeToFile(entry, depth + 1, entry.getClass());
+ }
+ else if (entry instanceof Location)
+ {
+ writeLocation((Location)entry, depth + 1);
+ }
+ else
+ {
+ writeScalar(entry);
+ }
+ }
+ }
+ writer.println();
+ }
+
+ private void writeMap(final Map<Object, Object> data, final int depth) throws IllegalArgumentException, IllegalAccessException
+ {
+ writer.println();
+ if (data.isEmpty())
+ {
+ writer.println();
+ }
+ for (Entry<Object, Object> entry : data.entrySet())
+ {
+ final Object value = entry.getValue();
+ if (value != null)
+ {
+ writeIndention(depth);
+ writeKey(entry.getKey());
+ writer.print(": ");
+ if (value instanceof StorageObject)
+ {
+ writer.println();
+ writeToFile(value, depth + 1, value.getClass());
+ }
+ else if (value instanceof Collection)
+ {
+ writeCollection((Collection<Object>)value, depth + 1);
+ }
+ else if (value instanceof Location)
+ {
+ writeLocation((Location)value, depth + 1);
+ }
+ else
+ {
+ writeScalar(value);
+ writer.println();
+ }
+ }
+ }
+ }
+
+ private void writeIndention(final int depth)
+ {
+ for (int i = 0; i < depth; i++)
+ {
+ writer.print(" ");
+ }
+ }
+
+ private void writeScalar(final Object data)
+ {
+ if (data instanceof String || data instanceof Boolean || data instanceof Number)
+ {
+ synchronized (YAML)
+ {
+ YAML.dumpAll(Collections.singletonList(data).iterator(), writer);
+ }
+ }
+ else if (data instanceof Material)
+ {
+ writer.println(data.toString().toLowerCase());
+ }
+ else if (data instanceof MaterialData)
+ {
+ final MaterialData matData = (MaterialData)data;
+ writer.println(matData.getItemType().toString().toLowerCase()
+ + (matData.getData() > 0 ? ":" + matData.getData() : ""));
+ }
+ else if (data instanceof ItemStack)
+ {
+ final ItemStack itemStack = (ItemStack)data;
+ writer.println(itemStack.getType().toString().toLowerCase()
+ + (itemStack.getDurability() > 0 ? ":" + itemStack.getDurability() : "")
+ + " " + itemStack.getAmount());
+ }
+ else
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ private void writeKey(final Object data)
+ {
+ if (data instanceof String || data instanceof Boolean || data instanceof Number)
+ {
+ String output = data.toString();
+ if (NON_WORD_PATTERN.matcher(output).find())
+ {
+ writer.print('"');
+ writer.print(output.replace("\"", "\\\""));
+ writer.print('"');
+ }
+ else
+ {
+ writer.print(output);
+ }
+ }
+ else if (data instanceof Material)
+ {
+ writer.print(data.toString().toLowerCase());
+ }
+ else if (data instanceof MaterialData)
+ {
+ final MaterialData matData = (MaterialData)data;
+ writer.print(matData.getItemType().toString().toLowerCase()
+ + (matData.getData() > 0 ? ":" + matData.getData() : ""));
+ }
+ else
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ private void writeLocation(final Location entry, final int depth)
+ {
+ writer.println();
+ writeIndention(depth);
+ writer.print("world: ");
+ writeScalar(entry.getWorld().getName());
+ writeIndention(depth);
+ writer.print("x: ");
+ writeScalar(entry.getX());
+ writeIndention(depth);
+ writer.print("y: ");
+ writeScalar(entry.getY());
+ writeIndention(depth);
+ writer.print("z: ");
+ writeScalar(entry.getZ());
+ writeIndention(depth);
+ writer.print("yaw: ");
+ writeScalar(entry.getYaw());
+ writeIndention(depth);
+ writer.print("pitch: ");
+ writeScalar(entry.getPitch());
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java
new file mode 100644
index 000000000..85c00c1b6
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java
@@ -0,0 +1,146 @@
+package com.earth2me.essentials.textreader;
+
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import java.io.IOException;
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.bukkit.plugin.Plugin;
+import org.bukkit.plugin.PluginDescriptionFile;
+
+
+public class HelpInput implements IText
+{
+ private static final String DESCRIPTION = "description";
+ private static final String PERMISSION = "permission";
+ private static final String PERMISSIONS = "permissions";
+ private final transient List<String> lines = new ArrayList<String>();
+ private final transient List<String> chapters = new ArrayList<String>();
+ private final transient Map<String, Integer> bookmarks = new HashMap<String, Integer>();
+ private final static Logger logger = Logger.getLogger("Minecraft");
+
+ public HelpInput(final User user, final String match, final IEssentials ess) throws IOException
+ {
+ boolean reported = false;
+ String pluginName = "";
+ for (Plugin p : ess.getServer().getPluginManager().getPlugins())
+ {
+ try
+ {
+ final PluginDescriptionFile desc = p.getDescription();
+ final HashMap<String, HashMap<String, Object>> cmds = (HashMap<String, HashMap<String, Object>>)desc.getCommands();
+ pluginName = p.getDescription().getName().toLowerCase(Locale.ENGLISH);
+ for (Map.Entry<String, HashMap<String, Object>> k : cmds.entrySet())
+ {
+ try
+ {
+ if ((!match.equalsIgnoreCase(""))
+ && (!k.getKey().toLowerCase(Locale.ENGLISH).contains(match))
+ && (!(k.getValue().get(DESCRIPTION) instanceof String
+ && ((String)k.getValue().get(DESCRIPTION)).toLowerCase(Locale.ENGLISH).contains(match)))
+ && (!pluginName.contains(match)))
+ {
+ continue;
+ }
+
+ if (pluginName.contains("essentials"))
+ {
+ final String node = "essentials." + k.getKey();
+ if (!ess.getSettings().isCommandDisabled(k.getKey()) && user.isAuthorized(node))
+ {
+ lines.add("§c" + k.getKey() + "§7: " + k.getValue().get(DESCRIPTION));
+ }
+ }
+ else
+ {
+ if (ess.getSettings().showNonEssCommandsInHelp())
+ {
+ final HashMap<String, Object> value = k.getValue();
+ Object permissions = null;
+ if (value.containsKey(PERMISSION))
+ {
+ permissions = value.get(PERMISSION);
+ }
+ else if (value.containsKey(PERMISSIONS))
+ {
+ permissions = value.get(PERMISSIONS);
+ }
+ if (user.isAuthorized("essentials.help." + pluginName))
+ {
+ lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
+ }
+ else if (permissions instanceof List && !((List<Object>)permissions).isEmpty())
+ {
+ boolean enabled = false;
+ for (Object o : (List<Object>)permissions)
+ {
+ if (o instanceof String && user.isAuthorized(o.toString()))
+ {
+ enabled = true;
+ break;
+ }
+ }
+ if (enabled)
+ {
+ lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
+ }
+ }
+ else if (permissions instanceof String && !"".equals(permissions))
+ {
+ if (user.isAuthorized(permissions.toString()))
+ {
+ lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
+ }
+ }
+ else
+ {
+ if (!ess.getSettings().hidePermissionlessHelp())
+ {
+ lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION));
+ }
+ }
+ }
+ }
+ }
+ catch (NullPointerException ex)
+ {
+ continue;
+ }
+ }
+ }
+ catch (NullPointerException ex)
+ {
+ continue;
+ }
+ catch (Exception ex)
+ {
+ if (!reported)
+ {
+ logger.log(Level.WARNING, _("commandHelpFailedForPlugin", pluginName), ex);
+ }
+ reported = true;
+ continue;
+ }
+ }
+ }
+
+ @Override
+ public List<String> getLines()
+ {
+ return lines;
+ }
+
+ @Override
+ public List<String> getChapters()
+ {
+ return chapters;
+ }
+
+ @Override
+ public Map<String, Integer> getBookmarks()
+ {
+ return bookmarks;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/textreader/IText.java b/Essentials/src/com/earth2me/essentials/textreader/IText.java
new file mode 100644
index 000000000..851119701
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/textreader/IText.java
@@ -0,0 +1,14 @@
+package com.earth2me.essentials.textreader;
+
+import java.util.List;
+import java.util.Map;
+
+
+public interface IText
+{
+ List<String> getLines();
+
+ List<String> getChapters();
+
+ Map<String, Integer> getBookmarks();
+}
diff --git a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
new file mode 100644
index 000000000..29e44a682
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
@@ -0,0 +1,112 @@
+package com.earth2me.essentials.textreader;
+
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import java.util.List;
+import java.util.Map;
+import org.bukkit.World;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+
+public class KeywordReplacer implements IText
+{
+ private final transient IText input;
+ private final transient IEssentials ess;
+
+ public KeywordReplacer(final IText input, final CommandSender sender, final IEssentials ess)
+ {
+ this.input = input;
+ this.ess = ess;
+ replaceKeywords(sender);
+ }
+
+ private void replaceKeywords(final CommandSender sender)
+ {
+ String displayName, ipAddress, balance, mails, world;
+ String worlds, online, unique, playerlist;
+ if (sender instanceof Player)
+ {
+ final User user = ess.getUser(sender);
+ displayName = user.getDisplayName();
+ ipAddress = user.getAddress().getAddress().toString();
+ balance = Double.toString(user.getMoney());
+ mails = Integer.toString(user.getMails().size());
+ world = user.getLocation().getWorld().getName();
+ }
+ else
+ {
+ displayName = ipAddress = balance = mails = world = "";
+ }
+
+ int playerHidden = 0;
+ for (Player p : ess.getServer().getOnlinePlayers())
+ {
+ if (ess.getUser(p).isHidden())
+ {
+ playerHidden++;
+ }
+ }
+ online = Integer.toString(ess.getServer().getOnlinePlayers().length - playerHidden);
+ unique = Integer.toString(ess.getUserMap().getUniqueUsers());
+
+ final StringBuilder worldsBuilder = new StringBuilder();
+ for (World w : ess.getServer().getWorlds())
+ {
+ if (worldsBuilder.length() > 0)
+ {
+ worldsBuilder.append(", ");
+ }
+ worldsBuilder.append(w.getName());
+ }
+ worlds = worldsBuilder.toString();
+
+ final StringBuilder playerlistBuilder = new StringBuilder();
+ for (Player p : ess.getServer().getOnlinePlayers())
+ {
+ if (ess.getUser(p).isHidden())
+ {
+ continue;
+ }
+ if (playerlistBuilder.length() > 0)
+ {
+ playerlistBuilder.append(", ");
+ }
+ playerlistBuilder.append(p.getDisplayName());
+ }
+ playerlist = playerlistBuilder.toString();
+
+ for (int i = 0; i < input.getLines().size(); i++)
+ {
+ String line = input.getLines().get(i);
+ line = line.replace("{PLAYER}", displayName);
+ line = line.replace("{IP}", ipAddress);
+ line = line.replace("{BALANCE}", balance);
+ line = line.replace("{MAILS}", mails);
+ line = line.replace("{WORLD}", world);
+ line = line.replace("{ONLINE}", online);
+ line = line.replace("{UNIQUE}", unique);
+ line = line.replace("{WORLDS}", worlds);
+ line = line.replace("{PLAYERLIST}", playerlist);
+ input.getLines().set(i, line);
+ }
+ }
+
+ @Override
+ public List<String> getLines()
+ {
+ return input.getLines();
+ }
+
+ @Override
+ public List<String> getChapters()
+ {
+ return input.getChapters();
+ }
+
+ @Override
+ public Map<String, Integer> getBookmarks()
+ {
+ return input.getBookmarks();
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/textreader/TextInput.java b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java
new file mode 100644
index 000000000..b25c30d51
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java
@@ -0,0 +1,106 @@
+package com.earth2me.essentials.textreader;
+
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
+import java.io.*;
+import java.util.*;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+
+public class TextInput implements IText
+{
+ private final transient List<String> lines = new ArrayList<String>();
+ private final transient List<String> chapters = new ArrayList<String>();
+ private final transient Map<String, Integer> bookmarks = new HashMap<String, Integer>();
+
+ public TextInput(final CommandSender sender, final String filename, final boolean createFile, final IEssentials ess) throws IOException
+ {
+
+ File file = null;
+ if (sender instanceof Player)
+ {
+ final User user = ess.getUser(sender);
+ file = new File(ess.getDataFolder(), filename + "_" + Util.sanitizeFileName(user.getName()) + ".txt");
+ if (!file.exists())
+ {
+ file = new File(ess.getDataFolder(), filename + "_" + Util.sanitizeFileName(user.getGroup()) + ".txt");
+ }
+ }
+ if (file == null || !file.exists())
+ {
+ file = new File(ess.getDataFolder(), filename + ".txt");
+ }
+ if (file.exists())
+ {
+ final BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
+ try
+ {
+ int lineNumber = 0;
+ while (bufferedReader.ready())
+ {
+ final String line = bufferedReader.readLine();
+ if (line == null)
+ {
+ break;
+ }
+ if (line.length() > 0 && line.charAt(0) == '#')
+ {
+ bookmarks.put(line.substring(1).toLowerCase(Locale.ENGLISH).replaceAll("&[0-9a-f]", ""), lineNumber);
+ chapters.add(line.substring(1).replace('&', '§').replace("§§", "&"));
+ }
+ lines.add(line.replace('&', '§').replace("§§", "&"));
+ lineNumber++;
+ }
+ }
+ finally
+ {
+ bufferedReader.close();
+ }
+ }
+ else
+ {
+ if (createFile)
+ {
+ final InputStream input = ess.getResource(filename + ".txt");
+ final OutputStream output = new FileOutputStream(file);
+ try
+ {
+ final byte[] buffer = new byte[1024];
+ int length = 0;
+ length = input.read(buffer);
+ while (length > 0)
+ {
+ output.write(buffer, 0, length);
+ length = input.read(buffer);
+ }
+ }
+ finally
+ {
+ output.close();
+ input.close();
+ }
+ throw new FileNotFoundException("File " + filename + ".txt does not exist. Creating one for you.");
+ }
+ }
+ }
+
+ @Override
+ public List<String> getLines()
+ {
+ return lines;
+ }
+
+ @Override
+ public List<String> getChapters()
+ {
+ return chapters;
+ }
+
+ @Override
+ public Map<String, Integer> getBookmarks()
+ {
+ return bookmarks;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/textreader/TextPager.java b/Essentials/src/com/earth2me/essentials/textreader/TextPager.java
new file mode 100644
index 000000000..dd8422580
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/textreader/TextPager.java
@@ -0,0 +1,169 @@
+package com.earth2me.essentials.textreader;
+
+import static com.earth2me.essentials.I18n._;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import org.bukkit.command.CommandSender;
+
+
+public class TextPager
+{
+ private final transient IText text;
+ private final transient boolean onePage;
+
+ public TextPager(final IText text)
+ {
+ this(text, false);
+ }
+
+ public TextPager(final IText text, final boolean onePage)
+ {
+ this.text = text;
+ this.onePage = onePage;
+ }
+
+ public void showPage(final String pageStr, final String chapterPageStr, final CommandSender sender)
+ {
+ List<String> lines = text.getLines();
+ List<String> chapters = text.getChapters();
+ Map<String, Integer> bookmarks = text.getBookmarks();
+
+ if (bookmarks.isEmpty())
+ {
+ int page = 1;
+ try
+ {
+ page = Integer.parseInt(pageStr);
+ }
+ catch (Exception ex)
+ {
+ page = 1;
+ }
+ if (page < 1)
+ {
+ page = 1;
+ }
+
+ int start = onePage ? 0 : (page - 1) * 9;
+ if (!onePage)
+ {
+ int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
+ sender.sendMessage(_("infoPages", page, pages));
+ }
+ for (int i = start; i < lines.size() && i < start + (onePage ? 20 : 9); i++)
+ {
+ sender.sendMessage(lines.get(i));
+ }
+ return;
+ }
+
+ if (pageStr == null || pageStr.isEmpty() || pageStr.matches("[0-9]+"))
+ {
+ if (lines.get(0).startsWith("#"))
+ {
+ if (onePage)
+ {
+ return;
+ }
+ sender.sendMessage(_("infoChapter"));
+ final StringBuilder sb = new StringBuilder();
+ boolean first = true;
+ for (String string : chapters)
+ {
+ if (!first)
+ {
+ sb.append(", ");
+ }
+ first = false;
+ sb.append(string);
+ }
+ sender.sendMessage(sb.toString());
+ return;
+ }
+ else
+ {
+ int page = 1;
+ try
+ {
+ page = Integer.parseInt(pageStr);
+ }
+ catch (Exception ex)
+ {
+ page = 1;
+ }
+ if (page < 1)
+ {
+ page = 1;
+ }
+
+ int start = onePage ? 0 : (page - 1) * 9;
+ int end;
+ for (end = 0; end < lines.size(); end++)
+ {
+ String line = lines.get(end);
+ if (line.startsWith("#"))
+ {
+ break;
+ }
+ }
+
+ if (!onePage)
+ {
+ int pages = end / 9 + (end % 9 > 0 ? 1 : 0);
+ sender.sendMessage(_("infoPages", page, pages));
+ }
+ for (int i = start; i < end && i < start + (onePage ? 20 : 9); i++)
+ {
+ sender.sendMessage(lines.get(i));
+ }
+ return;
+ }
+ }
+
+ int chapterpage = 0;
+ if (chapterPageStr != null)
+ {
+ try
+ {
+ chapterpage = Integer.parseInt(chapterPageStr) - 1;
+ }
+ catch (Exception ex)
+ {
+ chapterpage = 0;
+ }
+ if (chapterpage < 0)
+ {
+ chapterpage = 0;
+ }
+ }
+
+ if (!bookmarks.containsKey(pageStr.toLowerCase(Locale.ENGLISH)))
+ {
+ sender.sendMessage(_("infoUnknownChapter"));
+ return;
+ }
+ final int chapterstart = bookmarks.get(pageStr.toLowerCase(Locale.ENGLISH)) + 1;
+ int chapterend;
+ for (chapterend = chapterstart; chapterend < lines.size(); chapterend++)
+ {
+ final String line = lines.get(chapterend);
+ if (line.length() > 0 && line.charAt(0) == '#')
+ {
+ break;
+ }
+ }
+ final int start = chapterstart + (onePage ? 0 : chapterpage * 9);
+
+ if (!onePage)
+ {
+ final int page = chapterpage + 1;
+ final int pages = (chapterend - chapterstart) / 9 + ((chapterend - chapterstart) % 9 > 0 ? 1 : 0);
+ sender.sendMessage(_("infoChapterPages", pageStr, page, pages));
+ }
+ for (int i = start; i < chapterend && i < start + (onePage ? 20 : 9); i++)
+ {
+ sender.sendMessage(lines.get(i));
+ }
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/userdata/Ban.java b/Essentials/src/com/earth2me/essentials/userdata/Ban.java
new file mode 100644
index 000000000..6e86780cf
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/userdata/Ban.java
@@ -0,0 +1,14 @@
+package com.earth2me.essentials.userdata;
+
+import com.earth2me.essentials.storage.StorageObject;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class Ban implements StorageObject
+{
+ private String reason;
+ private long timeout;
+}
diff --git a/Essentials/src/com/earth2me/essentials/userdata/Inventory.java b/Essentials/src/com/earth2me/essentials/userdata/Inventory.java
new file mode 100644
index 000000000..91a19e2d1
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/userdata/Inventory.java
@@ -0,0 +1,27 @@
+package com.earth2me.essentials.userdata;
+
+import com.earth2me.essentials.storage.MapKeyType;
+import com.earth2me.essentials.storage.MapValueType;
+import com.earth2me.essentials.storage.StorageObject;
+import java.util.HashMap;
+import java.util.Map;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.bukkit.Material;
+import org.bukkit.inventory.ItemStack;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class Inventory implements StorageObject
+{
+ private int size;
+ @MapKeyType(Integer.class)
+ @MapValueType(ItemStack.class)
+ private Map<Integer, ItemStack> items = new HashMap<Integer, ItemStack>();
+
+ public Inventory()
+ {
+ items.put(1, new ItemStack(Material.APPLE, 64));
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/userdata/User.java b/Essentials/src/com/earth2me/essentials/userdata/User.java
new file mode 100644
index 000000000..232e0b95e
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/userdata/User.java
@@ -0,0 +1,65 @@
+package com.earth2me.essentials.userdata;
+
+import com.earth2me.essentials.storage.YamlStorageReader;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import lombok.Cleanup;
+
+// this is a prototype for locking userdata
+public class User
+{
+ UserData data = new UserData();
+ ReentrantReadWriteLock rwl = new ReentrantReadWriteLock();
+
+ public void loadUserData()
+ {
+ data = new YamlStorageReader(null).load(UserData.class);
+ }
+
+ public void aquireReadLock()
+ {
+ rwl.readLock().lock();
+ }
+
+ public void aquireWriteLock()
+ {
+ while (rwl.getReadHoldCount() > 0)
+ {
+ rwl.readLock().unlock();
+ }
+ rwl.writeLock().lock();
+ rwl.readLock().lock();
+ }
+
+ public void close()
+ {
+ if (rwl.isWriteLockedByCurrentThread())
+ {
+ scheduleSaving();
+ rwl.writeLock().unlock();
+ }
+ while (rwl.getReadHoldCount() > 0)
+ {
+ rwl.readLock().unlock();
+ }
+ }
+
+ public void example()
+ {
+ // Cleanup will call close at the end of the function
+ @Cleanup
+ final User user = this;
+
+ // read lock allows to read data from the user
+ user.aquireReadLock();
+ double i = user.data.getMoney();
+
+ // write lock allows only one thread to modify the data
+ user.aquireWriteLock();
+ user.data.setMoney(10 + user.data.getMoney());
+ }
+
+ private void scheduleSaving()
+ {
+ System.out.println("Schedule saving...");
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/userdata/UserData.java b/Essentials/src/com/earth2me/essentials/userdata/UserData.java
new file mode 100644
index 000000000..bce62f5fa
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/userdata/UserData.java
@@ -0,0 +1,61 @@
+package com.earth2me.essentials.userdata;
+
+import com.earth2me.essentials.storage.ListType;
+import com.earth2me.essentials.storage.MapKeyType;
+import com.earth2me.essentials.storage.MapValueType;
+import com.earth2me.essentials.storage.StorageObject;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.bukkit.Location;
+import org.bukkit.Material;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class UserData implements StorageObject
+{
+ private String nickname;
+ private double money;
+ @MapValueType(Location.class)
+ private Map<String, Location> homes = new HashMap<String, Location>();
+ @ListType(Material.class)
+ private Set<Material> unlimited = new HashSet<Material>();
+ @MapValueType(List.class)
+ @MapKeyType(Material.class)
+ private Map<Material, List<String>> powerTools = new HashMap<Material, List<String>>();
+ private Location lastLocation;
+ @MapValueType(Long.class)
+ private Map<String, Long> timestamps;
+ private String jail;
+ @ListType
+ private List<String> mails;
+ private Inventory inventory;
+ private boolean teleportEnabled;
+ @ListType
+ private Set<String> ignore;
+ private boolean godmode;
+ private boolean muted;
+ private boolean jailed;
+ private Ban ban;
+ private String ipAddress;
+ private boolean afk;
+ private boolean newplayer = true;
+ private String geolocation;
+ private boolean socialspy;
+ private boolean npc;
+ private boolean powertoolsenabled;
+
+ public UserData()
+ {
+ unlimited.add(Material.AIR);
+ unlimited.add(Material.ARROW);
+ unlimited.add(Material.APPLE);
+ powerTools.put(Material.DEAD_BUSH, Collections.singletonList("test"));
+ }
+}
diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml
index 472887d5d..cf39007e3 100644
--- a/Essentials/src/config.yml
+++ b/Essentials/src/config.yml
@@ -76,28 +76,14 @@ permission-based-item-spawn: false
# HOWEVER, it is known to cause lag upon users logging OUT, so beware!
reclaim-onlogout: false
-# Should primitive spawn protection be enabled? For most servers, this should be flase; it is better to use a third-party plugin to protect it.
-spawn-protection: false
-
# Mob limit on spawnmob
spawnmob-limit: 10
# Shall we notify users when using /lightning
warn-on-smite: true
-# The message of the day, displayed on connect and by typing /motd.
-# Valid tags are: {PLAYER}, {IP}, {BALANCE}, {MAILS}, {WORLD}, {ONLINE}, {UNIQUE}, {PLAYERLIST}
-motd:
- - '&cWelcome, {PLAYER}&c!'
- - '&fType &c/help&f for a list of commands.'
- - 'Currently online: {PLAYERLIST}'
-
-# The server rules, available by typing /rules
-rules:
- - '[1] Be respectful'
- - '[2] Be ethical'
- - '[3] Use common sense'
-
+# motd and rules are now configured in the files motd.txt and rules.txt
+
# When a command conflicts with another plugin, by default, Essentials will try to force the OTHER plugin to take
# priority. If a command is in this list, Essentials will try to give ITSELF priority. This does not always work:
# usually whichever plugin was updated most recently wins out. However, the full name of the command will always work.
@@ -240,6 +226,10 @@ freeze-afk-players: false
# You can disable the death messages of minecraft here
death-messages: true
+# Add worlds to this list, if you want to automatically disable god mode there
+no-god-in-worlds:
+# - world_nether
+
############################################################
# +------------------------------------------------------+ #
# | EssentialsHome | #
@@ -410,14 +400,14 @@ protect:
chicken: false
cow: false
creeper: false
- ghast: true
+ ghast: false
giant: false
monster: false
pig: false
pig_zombie: false
sheep: false
skeleton: false
- slime: true
+ slime: false
spider: false
squid: false
zombie: false
@@ -425,6 +415,10 @@ protect:
cave_spider: false
enderman: false
silverfish: false
+ ender_dragon: false
+ villager: false
+ blaze: false
+ mushroom_cow: false
# Maximum height the creeper should explode. -1 allows them to explode everywhere.
# Set prevent.creeper-explosion to true, if you want to disable creeper explosions.
diff --git a/Essentials/src/info.txt b/Essentials/src/info.txt
new file mode 100644
index 000000000..4435364fe
--- /dev/null
+++ b/Essentials/src/info.txt
@@ -0,0 +1,35 @@
+This is the info file.
+
+This file format works for the info.txt, motd.txt and rules.txt
+
+You can create a specific file for a user or a group:
+Name it info_username.txt or info_groupname.txt
+
+This also works with motd and rules.
+
+It can contain chapters like the Chapter1 below:
+
+#Chapter1
+Lines starting with # begin a new chapter
+The user has to type /info Chapter1 to read this chapter
+
+If the file starts with a # then the user is shown a chapter selection,
+when he does not select a chapter.
+
+#Colors
+Minecraft colors:
+&0 &&0 &1 &&1 &2 &&2 &3 &&3
+&4 &&4 &5 &&5 &6 &&6 &7 &&7
+&8 &&8 &9 &&9 &a &&a &b &&b
+&c &&c &d &&d &e &&e &f &&f
+
+#Tags
+PLAYER: {PLAYER}
+IP: {IP}
+BALANCE: {BALANCE}
+MAILS: {MAILS}
+WORLD: {WORLD}
+WORLDS: {WORLDS}
+ONLINE: {ONLINE}
+UNIQUE: {UNIQUE}
+PLAYERLIST: {PLAYERLIST} \ No newline at end of file
diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv
index 9dfe37218..3803cb6fe 100644
--- a/Essentials/src/items.csv
+++ b/Essentials/src/items.csv
@@ -360,100 +360,100 @@ wtree,17,2
wlog,17,2
wtrunk,17,2
wwood,17,2
-leaves,18,0
-leaf,18,0
-treeleaves,18,0
-logleaves,18,0
-trunkleaves,18,0
-woodleaves,18,0
-oaktreeleaves,18,0
-oaklogleaves,18,0
-oaktrunkleaves,18,0
-oakwoodleaves,18,0
-normaltreeleaves,18,0
-normallogleaves,18,0
-normaltrunkleaves,18,0
-normalwoodleaves,18,0
-otreeleaves,18,0
-ologleaves,18,0
-otrunkleaves,18,0
-owoodleaves,18,0
-ntreeleaves,18,0
-nlogleaves,18,0
-ntrunkleaves,18,0
-nwoodleaves,18,0
-treeleaf,18,0
-logleaf,18,0
-trunkleaf,18,0
-woodleaf,18,0
-oaktreeleaf,18,0
-oaklogleaf,18,0
-oaktrunkleaf,18,0
-oakwoodleaf,18,0
-normaltreeleaf,18,0
-normallogleaf,18,0
-normaltrunkleaf,18,0
-normalwoodleaf,18,0
-otreeleaf,18,0
-ologleaf,18,0
-otrunkleaf,18,0
-owoodleaf,18,0
-ntreeleaf,18,0
-nlogleaf,18,0
-ntrunkleaf,18,0
-nwoodleaf,18,0
-pineleaves,18,1
-pineleaf,18,1
-pinetreeleaves,18,1
-pinelogleaves,18,1
-pinetrunkleaves,18,1
-pinewoodleaves,18,1
-ptreeleaves,18,1
-plogleaves,18,1
-ptrunkleaves,18,1
-pwoodleaves,18,1
-pitreeleaves,18,1
-pilogleaves,18,1
-pitrunkleaves,18,1
-piwoodleaves,18,1
-pinetreeleaf,18,1
-pinelogleaf,18,1
-pinetrunkleaf,18,1
-pinewoodleaf,18,1
-ptreeleaf,18,1
-plogleaf,18,1
-ptrunkleaf,18,1
-pwoodleaf,18,1
-pitreeleaf,18,1
-pilogleaf,18,1
-pitrunkleaf,18,1
-piwoodleaf,18,1
-birchleaves,18,2
-birchleaf,18,2
-birchtreeleaves,18,2
-birchlogleaves,18,2
-birchtrunkleaves,18,2
-birchwoodleaves,18,2
-btreeleaves,18,2
-blogleaves,18,2
-btrunkleaves,18,2
-bwoodleaves,18,2
-bitreeleaves,18,2
-bilogleaves,18,2
-bitrunkleaves,18,2
-biwoodleaves,18,2
-birchtreeleaf,18,2
-birchlogleaf,18,2
-birchtrunkleaf,18,2
-birchwoodleaf,18,2
-btreeleaf,18,2
-blogleaf,18,2
-btrunkleaf,18,2
-bwoodleaf,18,2
-bitreeleaf,18,2
-bilogleaf,18,2
-bitrunkleaf,18,2
-biwoodleaf,18,2
+leaves,18,4
+leaf,18,4
+treeleaves,18,4
+logleaves,18,4
+trunkleaves,18,4
+woodleaves,18,4
+oaktreeleaves,18,4
+oaklogleaves,18,4
+oaktrunkleaves,18,4
+oakwoodleaves,18,4
+normaltreeleaves,18,4
+normallogleaves,18,4
+normaltrunkleaves,18,4
+normalwoodleaves,18,4
+otreeleaves,18,4
+ologleaves,18,4
+otrunkleaves,18,4
+owoodleaves,18,4
+ntreeleaves,18,4
+nlogleaves,18,4
+ntrunkleaves,18,4
+nwoodleaves,18,4
+treeleaf,18,4
+logleaf,18,4
+trunkleaf,18,4
+woodleaf,18,4
+oaktreeleaf,18,4
+oaklogleaf,18,4
+oaktrunkleaf,18,4
+oakwoodleaf,18,4
+normaltreeleaf,18,4
+normallogleaf,18,4
+normaltrunkleaf,18,4
+normalwoodleaf,18,4
+otreeleaf,18,4
+ologleaf,18,4
+otrunkleaf,18,4
+owoodleaf,18,4
+ntreeleaf,18,4
+nlogleaf,18,4
+ntrunkleaf,18,4
+nwoodleaf,18,4
+pineleaves,18,5
+pineleaf,18,5
+pinetreeleaves,18,5
+pinelogleaves,18,5
+pinetrunkleaves,18,5
+pinewoodleaves,18,5
+ptreeleaves,18,5
+plogleaves,18,5
+ptrunkleaves,18,5
+pwoodleaves,18,5
+pitreeleaves,18,5
+pilogleaves,18,5
+pitrunkleaves,18,5
+piwoodleaves,18,5
+pinetreeleaf,18,5
+pinelogleaf,18,5
+pinetrunkleaf,18,5
+pinewoodleaf,18,5
+ptreeleaf,18,5
+plogleaf,18,5
+ptrunkleaf,18,5
+pwoodleaf,18,5
+pitreeleaf,18,5
+pilogleaf,18,5
+pitrunkleaf,18,5
+piwoodleaf,18,5
+birchleaves,18,6
+birchleaf,18,6
+birchtreeleaves,18,6
+birchlogleaves,18,6
+birchtrunkleaves,18,6
+birchwoodleaves,18,6
+btreeleaves,18,6
+blogleaves,18,6
+btrunkleaves,18,6
+bwoodleaves,18,6
+bitreeleaves,18,6
+bilogleaves,18,6
+bitrunkleaves,18,6
+biwoodleaves,18,6
+birchtreeleaf,18,6
+birchlogleaf,18,6
+birchtrunkleaf,18,6
+birchwoodleaf,18,6
+btreeleaf,18,6
+blogleaf,18,6
+btrunkleaf,18,6
+bwoodleaf,18,6
+bitreeleaf,18,6
+bilogleaf,18,6
+bitrunkleaf,18,6
+biwoodleaf,18,6
sponge,19,0
glass,20,0
lapislazuliore,21,0
@@ -1340,6 +1340,19 @@ cementstairs,109,0
cementbstairs,109,0
greybrickstairs,109,0
greybstairs,109,0
+mycel,110,0
+waterlily,111,0
+netherbrick,112,0
+netherfence,113,0
+netherbrickstairs,114,0
+netherwarts,115,0
+enchantmenttable,116,0
+brewingstand,117,0
+cauldron,118,0
+enderportal,119,0
+enderportalframe,120,0
+enderstone,121,0
+dragonegg,122,0
ironshovel,256,0
ironspade,256,0
ishovel,256,0
@@ -2210,6 +2223,20 @@ pearl,368,0
epearl,368,0
bluepearl,368,0
endergem,368,0
+blazerod,369,0
+ghasttear,370,0
+goldnugget,371,0
+netherstalk,372,0
+potion,373,0
+glassbottle,374,0
+spidereye,375,0
+fermentedspidereye,376,0
+blazepowder,377,0
+magmacream,378,0
+brewingsstanditem,379,0
+cauldronitem,380,0
+eyeofender,381,0
+speckledmelon,382,0
goldmusicrecord,2256,0
goldmusicdisk,2256,0
goldmusiccd,2256,0
@@ -2245,4 +2272,13 @@ greendisk,2257,0
greencd,2257,0
grrecord,2257,0
grdisk,2257,0
-grcd,2257,0 \ No newline at end of file
+grcd,2257,0
+record3,2258,0
+record4,2259,0
+record5,2260,0
+record6,2261,0
+record7,2262,0
+record8,2263,0
+record9,2264,0
+record10,2265,0
+record11,2266,0
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
index ef149d68c..fdbe917df 100644
--- a/Essentials/src/messages.properties
+++ b/Essentials/src/messages.properties
@@ -2,368 +2,378 @@
# Single quotes have to be doubled: ''
# Translations start here
# by:
-action = * {0} {1}
-addedToAccount = \u00a7a{0} has been added to your account.
-addedToOthersAccount = \u00a7a{0} has been added to {1} account.
-alertBroke = broke:
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
-alertPlaced = placed:
-alertUsed = used:
+action=* {0} {1}
+addedToAccount=\u00a7a{0} has been added to your account.
+addedToOthersAccount=\u00a7a{0} has been added to {1} account.
+alertBroke=broke:
+alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
+alertPlaced=placed:
+alertUsed=used:
autoAfkKickReason=You have been kicked for idling more than {0} minutes.
-backAfterDeath = \u00a77Use the /back command to return to your death point.
-backUsageMsg = \u00a77Returning to previous location.
-backupFinished = Backup finished
-backupStarted = Backup started
-balance = \u00a77Balance: {0}
-balanceTop = \u00a77Top {0} balances
-banExempt = \u00a7cYou can not ban that player.
-banIpAddress = \u00a77Banned IP address
-bannedIpsFileError = Error reading banned-ips.txt
-bannedIpsFileNotFound = banned-ips.txt not found
-bannedPlayersFileError = Error reading banned-players.txt
-bannedPlayersFileNotFound = banned-players.txt not found
-bigTreeFailure = \u00a7cBig tree generation failure. Try again on grass or dirt.
-bigTreeSuccess = \u00a77Big tree spawned.
-broadcast = [\u00a7cBroadcast\u00a7f]\u00a7a {0}
-buildAlert = \u00a7cYou are not permitted to build
-bukkitFormatChanged = Bukkit version format changed. Version not checked.
-burnMsg = \u00a77You set {0} on fire for {1} seconds.
-canTalkAgain = \u00a77You can talk again
-cantFindGeoIpDB = Can''t find GeoIP database!
-cantReadGeoIpDB = Failed to read GeoIP database!
-cantSpawnItem = \u00a7cYou are not allowed to spawn the item {0}
-commandFailed = Command {0} failed:
-commandHelpFailedForPlugin = Error getting help for: {0}
-commandNotLoaded = \u00a7cCommand {0} is improperly loaded.
-compassBearing = \u00a77Bearing: {0} ({1} degrees).
-configFileMoveError = Failed to move config.yml to backup location.
-configFileRenameError = Failed to rename temp file to config.yml
-connectedPlayers = Connected players:
-connectionFailed = Failed to open connection.
-cooldownWithMessage = \u00a7cCooldown: {0}
-corruptNodeInConfig = \u00a74Notice: Your configuration file has a corrupt {0} node.
-couldNotFindTemplate = Could not find template {0}
-creatingConfigFromTemplate = Creating config from template: {0}
-creatingEmptyConfig = Creating empty config: {0}
-day = day
-days = days
-defaultBanReason = The Ban Hammer has spoken!
-deleteFileError = Could not delete file: {0}
-deleteHome = \u00a77Home {0} has been removed.
-deleteJail = \u00a77Jail {0} has been removed.
-deleteWarp = \u00a77Warp {0} has been removed.
-deniedAccessCommand = {0} was denied access to command.
-dependancyDownloaded = [Essentials] Dependancy {0} downloaded successfully.
-dependancyException = [Essentials] An error occurred when trying to download a dependacy
-dependancyNotFound = [Essentials] A required dependancy was not found, downloading now.
-depth = \u00a77You are at sea level.
-depthAboveSea = \u00a77You are {0} block(s) above sea level.
-depthBelowSea = \u00a77You are {0} block(s) below sea level.
-destinationNotSet = Destination not set
-disableUnlimited = \u00a77Disabled unlimited placing of {0} for {1}.
-disabled = disabled
-dontMoveMessage = \u00a77Teleportation will commence in {0}. Don''t move.
-downloadingGeoIp = Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB)
-duplicatedUserdata = Duplicated userdata: {0} and {1}
-enableUnlimited = \u00a77Giving unlimited amount of {0} to {1}.
-enabled = enabled
-errorCallingCommand = Error calling command /{0}
-errorWithMessage = \u00a7cError: {0}
-essentialsReload = \u00a77Essentials Reloaded {0}
-extinguish = \u00a77You extinguished yourself.
-extinguishOthers = \u00a77You extinguished {0}.
-failedToCloseConfig = Failed to close config {0}
-failedToCreateConfig = Failed to create config {0}
-failedToWriteConfig = Failed to write config {0}
-fileRenameError = Renaming file {0} failed
-foreverAlone = \u00a7cYou have nobody to whom you can reply.
-freedMemory = Freed {0} MB.
-gcchunks = chunks,
-gcentities = entities
-gcfree = Free memory: {0} MB
-gcmax = Maximum memory: {0} MB
-gctotal = Allocated memory: {0} MB
-geoIpUrlEmpty = GeoIP download url is empty.
-geoIpUrlInvalid = GeoIP download url is invalid.
-geoipJoinFormat = Player {0} comes from {1}
-godDisabledFor = disabled for {0}
-godEnabledFor = enabled for {0}
-godMode = \u00a77God mode {0}.
-haveBeenReleased = \u00a77You have been released
-heal = \u00a77You have been healed.
-healOther = \u00a77Healed {0}.
-helpConsole = To view help from the console, type ?.
-helpOp = \u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
-helpPages = Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
-holeInFloor = Hole in floor
-homeSet = \u00a77Home set.
-homeSetToBed = \u00a77Your home is now set to this bed.
-homes = Homes: {0}
-hour = hour
-hours = hours
-ignorePlayer = You ignore player {0} from now on.
-illegalDate = Illegal date format.
-infoChapter = Select chapter:
-infoChapterPages = Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f:
-infoFileDoesNotExist = File info.txt does not exist. Creating one for you.
-infoPages = Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
-infoUnknownChapter = Unknown chapter.
-invBigger = The other users inventory is bigger than yours.
-invRestored = Your inventory has been restored.
-invSee = You see the inventory of {0}.
-invSeeHelp = Use /invsee to restore your inventory.
-invalidCharge = \u00a7cInvalid charge.
-invalidMob = Invalid mob type.
-invalidServer = Invalid server!
-invalidSignLine = Line {0} on sign is invalid.
-invalidWorld = \u00a7cInvalid world.
-inventoryCleared = \u00a77Inventory Cleared.
-inventoryClearedOthers = \u00a77Inventory of \u00a7c{0}\u00a77 cleared.
-is = is
-itemCannotBeSold = That item cannot be sold to the server.
-itemMustBeStacked = Item must be traded in stacks. A quantity of 2s would be two stacks, etc.
-itemNotEnough1 = \u00a7cYou do not have enough of that item to sell.
-itemNotEnough2 = \u00a77If you meant to sell all of your items of that type, use /sell itemname
-itemNotEnough3 = \u00a77/sell itemname -1 will sell all but one item, etc.
-itemSellAir = You really tried to sell Air? Put an item in your hand.
-itemSold = \u00a77Sold for \u00a7c{0} \u00a77({1} {2} at {3} each)
-itemSoldConsole = {0} sold {1} for \u00a77{2} \u00a77({3} items at {4} each)
-itemSpawn = \u00a77Giving {0} of {1}
-itemsCsvNotLoaded = Could not load items.csv.
-jailAlreadyIncarcerated = \u00a7cPerson is already in jail: {0}
-jailMessage = \u00a7cYou do the crime, you do the time.
-jailNotExist = That jail does not exist.
-jailReleased = \u00a77Player \u00a7e{0}\u00a77 unjailed.
-jailReleasedPlayerNotify = \u00a77You have been released!
-jailSentenceExtended = Jail time extend to: {0)
-jailSet = \u00a77Jail {0} has been set
-jumpError = That would hurt your computer''s brain.
-kickDefault = Kicked from server
-kickExempt = \u00a7cYou can not kick that person.
-kill = \u00a77Killed {0}.
-kitError = \u00a7cThere are no valid kits.
-kitError2 = \u00a7cThat kit does not exist or is improperly defined.
-kitErrorHelp = \u00a7cPerhaps an item is missing a quantity in the configuration?
-kitGive = \u00a77Giving kit {0}.
-kitInvFull = \u00a7cYour inventory was full, placing kit on the floor
-kitTimed = \u00a7cYou can''t use that kit again for another {0}.
-kits = \u00a77Kits: {0}
-lightningSmited = \u00a77You have just been smited
-lightningUse = \u00a77Smiting {0}
-loadWarpError = Failed to load warp {0}
-loadinfo = Loaded {0} build {1} by: {2}
-localFormat = Local: <{0}> {1}
-mailClear = \u00a7cTo mark your mail as read, type /mail clear
-mailCleared = \u00a77Mail Cleared!
-mailSent = \u00a77Mail sent!
-markMailAsRead = \u00a7cTo mark your mail as read, type /mail clear
-markedAsAway = \u00a77You are now marked as away.
-markedAsNotAway = \u00a77You are no longer marked as away.
+backAfterDeath=\u00a77Use the /back command to return to your death point.
+backUsageMsg=\u00a77Returning to previous location.
+backupFinished=Backup finished
+backupStarted=Backup started
+balance=\u00a77Balance: {0}
+balanceTop=\u00a77Top {0} balances
+banExempt=\u00a7cYou can not ban that player.
+banIpAddress=\u00a77Banned IP address
+bannedIpsFileError=Error reading banned-ips.txt
+bannedIpsFileNotFound=banned-ips.txt not found
+bannedPlayersFileError=Error reading banned-players.txt
+bannedPlayersFileNotFound=banned-players.txt not found
+bigTreeFailure=\u00a7cBig tree generation failure. Try again on grass or dirt.
+bigTreeSuccess= \u00a77Big tree spawned.
+broadcast=[\u00a7cBroadcast\u00a7f]\u00a7a {0}
+buildAlert=\u00a7cYou are not permitted to build
+bukkitFormatChanged=Bukkit version format changed. Version not checked.
+burnMsg=\u00a77You set {0} on fire for {1} seconds.
+canTalkAgain=\u00a77You can talk again
+cantFindGeoIpDB=Can''t find GeoIP database!
+cantReadGeoIpDB=Failed to read GeoIP database!
+cantSpawnItem=\u00a7cYou are not allowed to spawn the item {0}
+commandFailed=Command {0} failed:
+commandHelpFailedForPlugin=Error getting help for: {0}
+commandNotLoaded=\u00a7cCommand {0} is improperly loaded.
+compassBearing=\u00a77Bearing: {0} ({1} degrees).
+configFileMoveError=Failed to move config.yml to backup location.
+configFileRenameError=Failed to rename temp file to config.yml
+connectedPlayers=Connected players:
+connectionFailed=Failed to open connection.
+cooldownWithMessage=\u00a7cCooldown: {0}
+corruptNodeInConfig=\u00a74Notice: Your configuration file has a corrupt {0} node.
+couldNotFindTemplate=Could not find template {0}
+creatingConfigFromTemplate=Creating config from template: {0}
+creatingEmptyConfig=Creating empty config: {0}
+creative=creative
+day=day
+days=days
+defaultBanReason=The Ban Hammer has spoken!
+deleteFileError=Could not delete file: {0}
+deleteHome=\u00a77Home {0} has been removed.
+deleteJail=\u00a77Jail {0} has been removed.
+deleteWarp=\u00a77Warp {0} has been removed.
+deniedAccessCommand={0} was denied access to command.
+dependancyDownloaded=[Essentials] Dependancy {0} downloaded successfully.
+dependancyException=[Essentials] An error occurred when trying to download a dependacy
+dependancyNotFound=[Essentials] A required dependancy was not found, downloading now.
+depth=\u00a77You are at sea level.
+depthAboveSea=\u00a77You are {0} block(s) above sea level.
+depthBelowSea=\u00a77You are {0} block(s) below sea level.
+destinationNotSet=Destination not set
+disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}.
+disabled=disabled
+dontMoveMessage=\u00a77Teleportation will commence in {0}. Don''t move.
+downloadingGeoIp=Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB)
+duplicatedUserdata=Duplicated userdata: {0} and {1}
+enableUnlimited=\u00a77Giving unlimited amount of {0} to {1}.
+enabled=enabled
+errorCallingCommand=Error calling command /{0}
+errorWithMessage=\u00a7cError: {0}
+essentialsReload=\u00a77Essentials Reloaded {0}
+extinguish=\u00a77You extinguished yourself.
+extinguishOthers=\u00a77You extinguished {0}.
+failedToCloseConfig=Failed to close config {0}
+failedToCreateConfig=Failed to create config {0}
+failedToWriteConfig=Failed to write config {0}
+false=false
+fileRenameError=Renaming file {0} failed
+foreverAlone=\u00a7cYou have nobody to whom you can reply.
+freedMemory=Freed {0} MB.
+gameMode=\u00a77Set game mode {0} for {1}.
+gcchunks= chunks,
+gcentities= entities
+gcfree=Free memory: {0} MB
+gcmax=Maximum memory: {0} MB
+gctotal=Allocated memory: {0} MB
+geoIpUrlEmpty=GeoIP download url is empty.
+geoIpUrlInvalid=GeoIP download url is invalid.
+geoipJoinFormat=Player {0} comes from {1}
+godDisabledFor=disabled for {0}
+godEnabledFor=enabled for {0}
+godMode=\u00a77God mode {0}.
+haveBeenReleased=\u00a77You have been released
+heal=\u00a77You have been healed.
+healOther=\u00a77Healed {0}.
+helpConsole=To view help from the console, type ?.
+helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
+helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
+holeInFloor=Hole in floor
+homeSet=\u00a77Home set.
+homeSetToBed=\u00a77Your home is now set to this bed.
+homes=Homes: {0}
+hour=hour
+hours=hours
+ignorePlayer=You ignore player {0} from now on.
+illegalDate=Illegal date format.
+infoChapter=Select chapter:
+infoChapterPages=Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f:
+infoFileDoesNotExist=File info.txt does not exist. Creating one for you.
+infoPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
+infoUnknownChapter=Unknown chapter.
+invBigger=The other users inventory is bigger than yours.
+invRestored=Your inventory has been restored.
+invSee=You see the inventory of {0}.
+invSeeHelp=Use /invsee to restore your inventory.
+invalidCharge=\u00a7cInvalid charge.
+invalidMob=Invalid mob type.
+invalidServer=Invalid server!
+invalidSignLine=Line {0} on sign is invalid.
+invalidWorld=\u00a7cInvalid world.
+inventoryCleared=\u00a77Inventory Cleared.
+inventoryClearedOthers=\u00a77Inventory of \u00a7c{0}\u00a77 cleared.
+is=is
+itemCannotBeSold=That item cannot be sold to the server.
+itemMustBeStacked=Item must be traded in stacks. A quantity of 2s would be two stacks, etc.
+itemNotEnough1=\u00a7cYou do not have enough of that item to sell.
+itemNotEnough2=\u00a77If you meant to sell all of your items of that type, use /sell itemname
+itemNotEnough3=\u00a77/sell itemname -1 will sell all but one item, etc.
+itemSellAir=You really tried to sell Air? Put an item in your hand.
+itemSold=\u00a77Sold for \u00a7c{0} \u00a77({1} {2} at {3} each)
+itemSoldConsole={0} sold {1} for \u00a77{2} \u00a77({3} items at {4} each)
+itemSpawn=\u00a77Giving {0} of {1}
+itemsCsvNotLoaded=Could not load items.csv.
+jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0}
+jailMessage=\u00a7cYou do the crime, you do the time.
+jailNotExist=That jail does not exist.
+jailReleased=\u00a77Player \u00a7e{0}\u00a77 unjailed.
+jailReleasedPlayerNotify=\u00a77You have been released!
+jailSentenceExtended=Jail time extend to: {0)
+jailSet=\u00a77Jail {0} has been set
+jumpError=That would hurt your computer''s brain.
+kickDefault=Kicked from server
+kickExempt=\u00a7cYou can not kick that person.
+kill=\u00a77Killed {0}.
+kitError=\u00a7cThere are no valid kits.
+kitError2=\u00a7cThat kit does not exist or is improperly defined.
+kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration?
+kitGive=\u00a77Giving kit {0}.
+kitInvFull=\u00a7cYour inventory was full, placing kit on the floor
+kitTimed=\u00a7cYou can''t use that kit again for another {0}.
+kits=\u00a77Kits: {0}
+lightningSmited=\u00a77You have just been smited
+lightningUse=\u00a77Smiting {0}
+loadWarpError=Failed to load warp {0}
+loadinfo=Loaded {0} build {1} by: {2}
+localFormat=Local: <{0}> {1}
+mailClear=\u00a7cTo mark your mail as read, type /mail clear
+mailCleared=\u00a77Mail Cleared!
+mailSent=\u00a77Mail sent!
+markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear
+markedAsAway=\u00a77You are now marked as away.
+markedAsNotAway=\u00a77You are no longer marked as away.
maxHomes=You cannot set more than {0} homes.
-mayNotJail = \u00a7cYou may not jail that person
-me = me
-minute = minute
-minutes = minutes
-missingItems = You do not have {0}x {1}.
-missingPrefixSuffix = Missing a prefix or suffix for {0}
-mobsAvailable = \u00a77Mobs: {0}
-mobSpawnError = Error while changing mob spawner.
-mobSpawnLimit = Mob quantity limited to server limit
-mobSpawnTarget = Target block must be a mob spawner.
-moneyRecievedFrom = \u00a7a{0} has been received from {1}
-moneySentTo = \u00a7a{0} has been sent to {1}
-moneyTaken = {0} taken from your bank account.
-month = month
-months = months
-moreThanZero = Quantities must be greater than 0.
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-muteExempt = \u00a7cYou may not mute that player.
-mutedPlayer = Player {0} muted.
-mutedPlayerFor = Player {0} muted for {1}.
-mutedUserSpeaks = {0} tried to speak, but is muted.
-needTpohere = You need access to /tpohere to teleport other players.
-negativeBalanceError = User is not allowed to have a negative balance.
-nickChanged = Nickname changed.
+mayNotJail=\u00a7cYou may not jail that person
+me=me
+minute=minute
+minutes=minutes
+missingItems=You do not have {0}x {1}.
+missingPrefixSuffix=Missing a prefix or suffix for {0}
+mobSpawnError=Error while changing mob spawner.
+mobSpawnLimit=Mob quantity limited to server limit
+mobSpawnTarget=Target block must be a mob spawner.
+mobsAvailable=\u00a77Mobs: {0}
+moneyRecievedFrom=\u00a7a{0} has been received from {1}
+moneySentTo=\u00a7a{0} has been sent to {1}
+moneyTaken={0} taken from your bank account.
+month=month
+months=months
+moreThanZero=Quantities must be greater than 0.
+msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
+muteExempt=\u00a7cYou may not mute that player.
+mutedPlayer=Player {0} muted.
+mutedPlayerFor=Player {0} muted for {1}.
+mutedUserSpeaks={0} tried to speak, but is muted.
+needTpohere=You need access to /tpohere to teleport other players.
+negativeBalanceError=User is not allowed to have a negative balance.
+nickChanged=Nickname changed.
nickDisplayName=\u00a77You have to enable change-displayname in Essentials config.
-nickInUse = \u00a7cThat name is already in use.
-nickNamesAlpha = \u00a7cNicknames must be alphanumeric.
-nickNoMore = \u00a77You no longer have a nickname.
-nickOthersPermission = \u00a7cYou do not have permission to change the nickname of others
-nickSet = \u00a77Your nickname is now \u00a7c{0}
-noAccessCommand = \u00a7cYou do not have access to that command.
-noAccessPermission = \u00a7cYou do not have permission to access that {0}.
-noDestroyPermission = \u00a7cYou do not have permission to destroy that {0}.
-noHelpFound = \u00a7cNo matching commands.
-noHomeSet = You have not set a home.
-noHomeSetPlayer = Player has not set a home.
-noKitPermission = \u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit.
-noKits = \u00a77There are no kits available yet
-noMail = You do not have any mail
-noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
-noMotd = \u00a7cThere is no message of the day.
-noNewMail = \u00a77You have no new mail.
-noPendingRequest = You do not have a pending request.
-noPowerTools = You have no power tools assigned.
-noPlacePermission = \u00a7cYou do not have permission to place a block near that sign.
-noRules = \u00a7cThere are no rules specified yet.
-noWarpsDefined = No warps defined
-none = none
-notAllowedToQuestion = \u00a7cYou are not authorized to use question.
-notAllowedToShout = \u00a7cYou are not authorized to shout.
-notEnoughMoney = You do not have sufficient funds.
-notRecommendedBukkit = Bukkit version is not the recommended build for Essentials.
-notSupportedYet = Not supported yet.
-now = now
-numberRequired = A number goes there, silly.
-onlyDayNight = /time only supports day/night.
-onlyPlayers = Only in-game players can use {0}.
-onlySunStorm = /weather only supports sun/storm.
-pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
-pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
-pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
-pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
-pTimePlayers = These players have their own time:
-pTimeReset = Player time has been reset for: \u00a7e{0}
-pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
-pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
-parseError = Error parsing {0} on line {1}
-pendingTeleportCancelled = \u00a7cPending teleportation request cancelled.
-permissionsError = Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
-playerBanned = \u00a7cPlayer {0} banned {1} for {2}
-playerInJail = \u00a7cPlayer is already in jail {0}.
-playerJailed = \u00a77Player {0} jailed.
-playerJailedFor = \u00a77Player {0} jailed for {1}.
-playerKicked = \u00a7cPlayer {0} kicked {1} for {2}
-playerMuted = \u00a77You have been muted
-playerMutedFor = \u00a77You have been muted for {0}
-playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
-playerNotFound = \u00a7cPlayer not found.
-playerUnmuted = \u00a77You have been unmuted
-pong = Pong!
-possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
-powerToolAir = Command can''t be attached to air.
-powerToolAlreadySet = Command \u00a7c{0}\u00a7f is already assigned to {1}.
-powerToolAttach = \u00a7c{0}\u00a7f command assigned to {1}.
-powerToolClearAll = All powertool commands have been cleared.
-powerToolList = {1} has the following commands: \u00a7c{0}\u00a7f.
-powerToolListEmpty = {0} has no commands assigned.
-powerToolNoSuchCommandAssigned = Command \u00a7c{0}\u00a7f has not been assigned to {1}.
-powerToolRemove = Command \u00a7c{0}\u00a7f removed from {1}.
-powerToolRemoveAll = All commands removed from {0}.
-powerToolsEnabled = All of your power tools have been enabled.
-powerToolsDisabled = All of your power tools have been disabled.
-protectionOwner = \u00a76[EssentialsProtect] Protection owner: {0}
-questionFormat = \u00a77[Question]\u00a7f {0}
-reloadAllPlugins = \u00a77Reloaded all plugins.
-repair = You have successfully repaired your: \u00a7e{0}.
-repairAlreadyFixed = \u00a77This item does not need repairing.
-repairInvalidType = \u00a7cThis item cannot be repaired.
-repairNone = There were no items that needing repairing.
-requestAccepted = \u00a77Teleport request accepted.
-requestAcceptedFrom = \u00a77{0} accepted your teleport request.
-requestDenied = \u00a77Teleport request denied.
-requestDeniedFrom = \u00a77{0} denied your teleport request.
-requestSent = \u00a77Request sent to {0}\u00a77.
-returnPlayerToJailError = Error occurred when trying to return player to jail.
-second = second
-seconds = seconds
-seenOffline = Player {0} is offline since {1}
-seenOnline = Player {0} is online since {1}
-serverFull = Server is full
-setSpawner = Changed spawner type to {0}
-sheepMalformedColor = Malformed color.
-shoutFormat = \u00a77[Shout]\u00a7f {0}
-signFormatFail = \u00a74[{0}]
-signFormatSuccess = \u00a71[{0}]
-signFormatTemplate = [{0}]
-signProtectInvalidLocation = \u00a74You are not allowed to create sign here.
-similarWarpExist = A warp with a similar name already exists.
-slimeMalformedSize = Malformed size.
-soloMob = That mob likes to be alone
-spawnSet = \u00a77Spawn location set for group {0}.
-spawned = spawned
-suicideMessage = \u00a77Goodbye Cruel World...
-suicideSuccess = \u00a77{0} took their own life
-takenFromAccount = \u00a7c{0} has been taken from your account.
-takenFromOthersAccount = \u00a7c{0} has been taken from {1} account.
-teleportAAll = \u00a77Teleporting request sent to all players...
-teleportAll = \u00a77Teleporting all players...
-teleportAtoB = \u00a77{0}\u00a77 teleported you to {1}\u00a77.
-teleportDisabled = {0} has teleportation disabled.
-teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to them.
-teleportNewPlayerError = Failed to teleport new player
-teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
-teleportTop = \u00a77Teleporting to top.
-teleportationCommencing = \u00a77Teleportation commencing...
-teleportationDisabled = \u00a77Teleportation disabled.
-teleportationEnabled = \u00a77Teleportation enabled.
-teleporting = \u00a77Teleporting...
-teleportingPortal = \u00a77Teleporting via portal.
-tempBanned = Temporarily banned from server for {0}
-tempbanExempt = \u00a77You may not tempban that player
-thunder = You {0} thunder in your world
-thunderDuration = You {0} thunder in your world for {1} seconds.
-timeBeforeHeal = Time before next heal: {0}
-timeBeforeTeleport = Time before next teleport: {0}
-timeFormat = \u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
-timePattern = (?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-timeSet = Time set in all worlds.
-timeSetPermission = \u00a7cYou are not authorized to set the time.
-timeWorldCurrent = The current time in {0} is \u00a73{1}
-timeWorldSet = The time was set to {0} in: \u00a7c{1}
-tradeCompleted = \u00a77Trade completed.
-tradeSignEmpty = The trade sign has nothing available for you.
-tradeSignEmptyOwner = There is nothing to collect from this trade sign.
-treeFailure = \u00a7cTree generation failure. Try again on grass or dirt.
-treeSpawned = \u00a77Tree spawned.
-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.
-unableToSpawnMob = Unable to spawn mob.
-unbannedIP = Unbanned IP address.
-unbannedPlayer = Unbanned player.
-unignorePlayer = You are not ignoring player {0} anymore.
-unknownItemId = Unknown item id: {0}
-unknownItemInList = Unknown item {0} in {1} list.
-unknownItemName = Unknown item name: {0}
-unlimitedItemPermission = \u00a7cNo permission for unlimited item {0}.
-unlimitedItems = Unlimited items:
-unmutedPlayer = Player {0} unmuted.
-upgradingFilesError = Error while upgrading the files
-userDoesNotExist = The user {0} does not exist.
-userIsAway = {0} is now AFK
-userIsNotAway = {0} is no longer AFK
-userJailed = \u00a77You have been jailed
-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:
-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
-warpDeleteError = Problem deleting the warp file.
-warpListPermission = \u00a7cYou do not have Permission to list that warps.
-warpNotExist = That warp does not exist.
-warpSet = \u00a77Warp {0} set.
-warpUsePermission = \u00a7cYou do not have Permission to use that warp.
-warpingTo = \u00a77Warping to {0}.
-warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
-weatherStorm = \u00a77You set the weather to storm in {0}
-weatherStormFor = \u00a77You set the weather to storm in {0} for {1} seconds
-weatherSun = \u00a77You set the weather to sun in {0}
-weatherSunFor = \u00a77You set the weather to sun in {0} for {1} seconds
-whoisGeoLocation = \u00a79 - Location: {0}
-whoisHealth = \u00a79 - Health: {0}/20
-whoisIPAddress = \u00a79 - IP Address: {0}
-whoisIs = {0} is {1}
-whoisLocation = \u00a79 - Location: ({0}, {1}, {2}, {3})
-whoisMoney = \u00a79 - Money: {0}
-whoisStatusAvailable = \u00a79 - Status: Available
-whoisStatusAway = \u00a79 - Status: \u00a7cAway\u00a7f
-worth = \u00a77Stack of {0} worth \u00a7c{1}\u00a77 ({2} item(s) at {3} each)
-worthMeta = \u00a77Stack of {0} with metadata of {1} worth \u00a7c{2}\u00a77 ({3} item(s) at {4} each)
-worthSet = Worth value set
-year = year
-years = years
-youAreHealed = \u00a77You have been healed.
-youHaveNewMail = \u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
+nickInUse=\u00a7cThat name is already in use.
+nickNamesAlpha=\u00a7cNicknames must be alphanumeric.
+nickNoMore=\u00a77You no longer have a nickname.
+nickOthersPermission=\u00a7cYou do not have permission to change the nickname of others
+nickSet=\u00a77Your nickname is now \u00a7c{0}
+noAccessCommand=\u00a7cYou do not have access to that command.
+noAccessPermission=\u00a7cYou do not have permission to access that {0}.
+noDestroyPermission=\u00a7cYou do not have permission to destroy that {0}.
+noGodWorldWarning=\u00a7cWarning! God mode in this world disabled.
+noHelpFound=\u00a7cNo matching commands.
+noHomeSet=You have not set a home.
+noHomeSetPlayer=Player has not set a home.
+noKitPermission=\u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit.
+noKits=\u00a77There are no kits available yet
+noMail=You do not have any mail
+noMailSendPerm=\u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
+noMotd=\u00a7cThere is no message of the day.
+noNewMail=\u00a77You have no new mail.
+noPendingRequest=You do not have a pending request.
+noPlacePermission=\u00a7cYou do not have permission to place a block near that sign.
+noPowerTools=You have no power tools assigned.
+noRules=\u00a7cThere are no rules specified yet.
+noWarpsDefined=No warps defined
+none=none
+notAllowedToQuestion=\u00a7cYou are not authorized to use question.
+notAllowedToShout=\u00a7cYou are not authorized to shout.
+notEnoughMoney=You do not have sufficient funds.
+notRecommendedBukkit=Bukkit version is not the recommended build for Essentials.
+notSupportedYet=Not supported yet.
+now=now
+numberRequired=A number goes there, silly.
+onlyDayNight=/time only supports day/night.
+onlyPlayers=Only in-game players can use {0}.
+onlySunStorm=/weather only supports sun/storm.
+pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
+pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
+pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
+pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time.
+pTimePlayers=These players have their own time:
+pTimeReset=Player time has been reset for: \u00a7e{0}
+pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
+pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
+parseError=Error parsing {0} on line {1}
+pendingTeleportCancelled=\u00a7cPending teleportation request cancelled.
+permissionsError=Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
+playerBanned=\u00a7cPlayer {0} banned {1} for {2}
+playerInJail=\u00a7cPlayer is already in jail {0}.
+playerJailed=\u00a77Player {0} jailed.
+playerJailedFor= \u00a77Player {0} jailed for {1}.
+playerKicked=\u00a7cPlayer {0} kicked {1} for {2}
+playerMuted=\u00a77You have been muted
+playerMutedFor=\u00a77You have been muted for {0}
+playerNeverOnServer=\u00a7cPlayer {0} was never on this server.
+playerNotFound=\u00a7cPlayer not found.
+playerUnmuted=\u00a77You have been unmuted
+pong=Pong!
+possibleWorlds=\u00a77Possible worlds are the numbers 0 through {0}.
+powerToolAir=Command can''t be attached to air.
+powerToolAlreadySet=Command \u00a7c{0}\u00a7f is already assigned to {1}.
+powerToolAttach=\u00a7c{0}\u00a7f command assigned to {1}.
+powerToolClearAll=All powertool commands have been cleared.
+powerToolList={1} has the following commands: \u00a7c{0}\u00a7f.
+powerToolListEmpty={0} has no commands assigned.
+powerToolNoSuchCommandAssigned=Command \u00a7c{0}\u00a7f has not been assigned to {1}.
+powerToolRemove=Command \u00a7c{0}\u00a7f removed from {1}.
+powerToolRemoveAll=All commands removed from {0}.
+powerToolsDisabled=All of your power tools have been disabled.
+powerToolsEnabled=All of your power tools have been enabled.
+protectionOwner=\u00a76[EssentialsProtect] Protection owner: {0}
+questionFormat=\u00a77[Question]\u00a7f {0}
+reloadAllPlugins=\u00a77Reloaded all plugins.
+repair=You have successfully repaired your: \u00a7e{0}.
+repairAlreadyFixed=\u00a77This item does not need repairing.
+repairInvalidType=\u00a7cThis item cannot be repaired.
+repairNone=There were no items that needing repairing.
+requestAccepted=\u00a77Teleport request accepted.
+requestAcceptedFrom=\u00a77{0} accepted your teleport request.
+requestDenied=\u00a77Teleport request denied.
+requestDeniedFrom=\u00a77{0} denied your teleport request.
+requestSent=\u00a77Request sent to {0}\u00a77.
+returnPlayerToJailError=Error occurred when trying to return player to jail.
+second=second
+seconds=seconds
+seenOffline=Player {0} is offline since {1}
+seenOnline=Player {0} is online since {1}
+serverFull=Server is full
+setSpawner=Changed spawner type to {0}
+sheepMalformedColor=Malformed color.
+shoutFormat=\u00a77[Shout]\u00a7f {0}
+signFormatFail=\u00a74[{0}]
+signFormatSuccess=\u00a71[{0}]
+signFormatTemplate=[{0}]
+signProtectInvalidLocation=\u00a74You are not allowed to create sign here.
+similarWarpExist=A warp with a similar name already exists.
+slimeMalformedSize=Malformed size.
+soloMob=That mob likes to be alone
+spawnSet=\u00a77Spawn location set for group {0}.
+spawned=spawned
+suicideMessage=\u00a77Goodbye Cruel World...
+suicideSuccess= \u00a77{0} took their own life
+survival=survival
+takenFromAccount=\u00a7c{0} has been taken from your account.
+takenFromOthersAccount=\u00a7c{0} has been taken from {1} account.
+teleportAAll=\u00a77Teleporting request sent to all players...
+teleportAll=\u00a77Teleporting all players...
+teleportAtoB=\u00a77{0}\u00a77 teleported you to {1}\u00a77.
+teleportDisabled={0} has teleportation disabled.
+teleportHereRequest=\u00a7c{0}\u00a7c has requested that you teleport to them.
+teleportNewPlayerError=Failed to teleport new player
+teleportRequest=\u00a7c{0}\u00a7c has requested to teleport to you.
+teleportTop=\u00a77Teleporting to top.
+teleportationCommencing=\u00a77Teleportation commencing...
+teleportationDisabled=\u00a77Teleportation disabled.
+teleportationEnabled=\u00a77Teleportation enabled.
+teleporting=\u00a77Teleporting...
+teleportingPortal=\u00a77Teleporting via portal.
+tempBanned=Temporarily banned from server for {0}
+tempbanExempt=\u00a77You may not tempban that player
+thunder= You {0} thunder in your world
+thunderDuration=You {0} thunder in your world for {1} seconds.
+timeBeforeHeal=Time before next heal: {0}
+timeBeforeTeleport=Time before next teleport: {0}
+timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
+timePattern=(?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
+timeSet=Time set in all worlds.
+timeSetPermission=\u00a7cYou are not authorized to set the time.
+timeWorldCurrent=The current time in {0} is \u00a73{1}
+timeWorldSet=The time was set to {0} in: \u00a7c{1}
+tradeCompleted=\u00a77Trade completed.
+tradeSignEmpty=The trade sign has nothing available for you.
+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
+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.
+unableToSpawnMob=Unable to spawn mob.
+unbannedIP=Unbanned IP address.
+unbannedPlayer=Unbanned player.
+unignorePlayer=You are not ignoring player {0} anymore.
+unknownItemId=Unknown item id: {0}
+unknownItemInList=Unknown item {0} in {1} list.
+unknownItemName=Unknown item name: {0}
+unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}.
+unlimitedItems=Unlimited items:
+unmutedPlayer=Player {0} unmuted.
+upgradingFilesError=Error while upgrading the files
+userDoesNotExist=The user {0} does not exist.
+userIsAway={0} is now AFK
+userIsNotAway={0} is no longer AFK
+userJailed=\u00a77You have been jailed
+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:
+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
+warpDeleteError=Problem deleting the warp file.
+warpListPermission=\u00a7cYou do not have Permission to list that warps.
+warpNotExist=That warp does not exist.
+warpSet=\u00a77Warp {0} set.
+warpUsePermission=\u00a7cYou do not have Permission to use that warp.
+warpingTo=\u00a77Warping to {0}.
+warps=Warps: {0}
+warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}.
+weatherStorm=\u00a77You set the weather to storm in {0}
+weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds
+weatherSun=\u00a77You set the weather to sun in {0}
+weatherSunFor=\u00a77You set the weather to sun in {0} for {1} seconds
+whoisGamemode=\u00a79 - Gamemode: {0}
+whoisGeoLocation=\u00a79 - Location: {0}
+whoisGod=\u00a79 - God mode: {0}
+whoisHealth=\u00a79 - Health: {0}/20
+whoisIPAddress=\u00a79 - IP Address: {0}
+whoisIs={0} is {1}
+whoisLocation=\u00a79 - Location: ({0}, {1}, {2}, {3})
+whoisMoney=\u00a79 - Money: {0}
+whoisOP=\u00a79 - OP: {0}
+whoisStatusAvailable=\u00a79 - Status: Available
+whoisStatusAway=\u00a79 - Status: \u00a7cAway\u00a7f
+worth=\u00a77Stack of {0} worth \u00a7c{1}\u00a77 ({2} item(s) at {3} each)
+worthMeta=\u00a77Stack of {0} with metadata of {1} worth \u00a7c{2}\u00a77 ({3} item(s) at {4} each)
+worthSet=Worth value set
+year=year
+years=years
+youAreHealed=\u00a77You have been healed.
+youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties
index 960fd8321..dd2ee3b97 100644
--- a/Essentials/src/messages_da.properties
+++ b/Essentials/src/messages_da.properties
@@ -2,369 +2,378 @@
# Single quotes have to be doubled: ''
# Translations start here
# by: papand13, papand13@gmail.com
-action = * {0} {1}
-addedToAccount = \u00a7a{0} er tilf\u00f8jet til din konto.
-addedToOthersAccount = \u00a7a{0} er blevet tilf\u00f8jet til {1} konto.
-alertBroke = \u00f8delagde:
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3}
-alertPlaced = placerede:
-alertUsed = brugte:
+action=* {0} {1}
+addedToAccount=\u00a7a{0} er tilf\u00f8jet til din konto.
+addedToOthersAccount=\u00a7a{0} er blevet tilf\u00f8jet til {1} konto.
+alertBroke=\u00f8delagde:
+alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3}
+alertPlaced=placerede:
+alertUsed=brugte:
autoAfkKickReason=You have been kicked for idling more than {0} minutes.
-backAfterDeath = \u00a77Brug /back kommandoen for at retunere til dit d\u00f8ds punkt.
-backUsageMsg = \u00a77Returnere til tidligere placering.
-backupFinished = Backup sluttede
-backupStarted = Backup startede
-balance = \u00a77Balance: {0}
-balanceTop = \u00a77 Top {0} saldi
-banExempt = \u00a7cDu kan ikke forbyde den p\u00e5g\u00e6ldende spiller.
-banIpAddress = \u00a77Bannede IP addresse
-bannedIpsFileError = Fejl i l\u00e6sning af banned-ips.txt
-bannedIpsFileNotFound = banned-ips.txt ikke fundet
-bannedPlayersFileError = Fejl i l\u00e6sning af banned-players.txt
-bannedPlayersFileNotFound = banned-players.txt ikke fundet
-bigTreeFailure = \u00a7cStort tr\u00e6 genererings fejl. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord.
-bigTreeSuccess = \u00a77Stort tr\u00e6 fremkaldt.
-broadcast = [\u00a7cMeddelelse\u00a7f]\u00a7a {0}
-buildAlert = \u00a7cDu er ikke tilladt at bygge!
-bukkitFormatChanged = Bukkit version format \u00e6ndret. Version er ikke checket.
-burnMsg = \u00a77Du satte ild til {0} for {1} sekunder.
-canTalkAgain = \u00a77Du kan snakke igen
-cantFindGeoIpDB = Kan ikke finde GeoIP database!
-cantReadGeoIpDB = Fejl ved l\u00e6sning af GeoIP database!
-cantSpawnItem = \u00a7cDu er ikke tilladt at spawne elementet {0}
-commandFailed = Kommando {0} fejlede:
-commandHelpFailedForPlugin=Fejl ved at f\u00e5 hj\u00e6lp til: {0}
-commandNotLoaded = \u00a7cCommand {0} er ikke indl\u00e6st korrekt.
-compassBearing = \u00a77B\u00e6rer: {0} ({1} grader).
-configFileMoveError = Kunne ikke flytte config.yml til backup placering.
-configFileRenameError = Kunne ikke omd\u00f8be temp fil til config.yml
-connectedPlayers = Tilsluttede spillere:
-connectionFailed = Failed ved \u00e5bning af forbindelse.
-cooldownWithMessage = \u00a7cNedk\u00f8lning: {0}
-corruptNodeInConfig = \u00a74Notice: Din konfigurations fil har en korrupt {0} node.
-couldNotFindTemplate = Kunne ikke finde skabelon {0}
-creatingConfigFromTemplate = Opretter config fra skabelon: {0}
-creatingEmptyConfig = Opretter tom config: {0}
-day = dag
-days = dage
-defaultBanReason = Ban hammeren har talt!
-deleteFileError = Kunne ikke slette fil: {0}
-deleteHome = \u00a77Home {0} has been removed.
-deleteJail = \u00a77F\u00e6ngsel {0} er fjernet.
-deleteWarp = \u00a77Warp {0} er fjernet.
-deniedAccessCommand = {0} var n\u00e6gtet adgang til kommando.
-dependancyDownloaded = [Essentials] Dependancy {0} downloaded successfully.
-dependancyException = [Essentials] An error occured when trying to download a dependacy
-dependancyNotFound = [Essentials] A required dependancy was not found, downloading now.
-depth = \u00a77Du er ved havoverfladen.
-depthAboveSea = \u00a77Du er {0} blok(ke) over havoverfladen.
-depthBelowSea = \u00a77Du er {0} blok(ke) under havoverfladen.
-destinationNotSet = Destination er ikke sat
-disableUnlimited = \u00a77Deaktiverede ubergr\u00e6nset placering af {0} for {1}.
-disabled = deaktiveret
-dontMoveMessage = \u00a77Teleportering vil begynde om {0}. Bev\u00e6g dig ikke.
-downloadingGeoIp = Downloader GeoIP database ... det her kan tage et stykke tid (land: 0.6 MB, by: 20MB)
-duplicatedUserdata = Duplikerede userdata: {0} og {1}
-enableUnlimited = \u00a77Giver ubegr\u00e6nset m\u00e6ngde af {0} til {1}.
-enabled = aktiveret
-errorCallingCommand = Fejl ved opkald af kommando /{0}
-errorWithMessage = \u00a7cFejl: {0}
-essentialsReload = \u00a77Essentials Genindl\u00e6st {0}
-extinguish = \u00a77Du slukkede dig selv.
-extinguishOthers = \u00a77Du slukkede {0}.
-failedToCloseConfig = Fejlede i at lukke config {0}
-failedToCreateConfig = Fejl i oprettelse af config {0}
-failedToWriteConfig = Fejlede i at skrive config {0}
-fileRenameError = Resterende fil {0} fejlede
-foreverAlone = \u00a7cDu har ingen du kan svare.
-freedMemory = Befriede {0} MB.
-gcchunks = stykker,
-gcentities = enheder
-gcfree = Free memory: {0} MB
-gcmax = Maximum memory: {0} MB
-gctotal = Allocated memory: {0} MB
-geoIpUrlEmpty = GeoIP download url er tom.
-geoIpUrlInvalid = GeoIP download url er ugyldig.
-geoipJoinFormat = Spiller {0} kommer fra {1}
-godDisabledFor = deaktiveret for {0}
-godEnabledFor = aktiveret for {0}
-godMode = \u00a77Gud tilstand {0}.
-haveBeenReleased = \u00a77Du er blevet l\u00f8sladt
-heal = \u00a77Du er blevet helbredt.
-healOther = \u00a77Helbredt {0}.
-helpConsole = For at se hj\u00e6lp fra konsolen, skriv ?.
-helpOp = \u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
-helpPages = Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f:
-holeInFloor = Hul i gulv
-homeSet = \u00a77Hjem sat.
-homeSetToBed = \u00a77Dit hjem er nu sat til denne seng.
-homes = Homes: {0}
-hour = time
-hours = timer
-ignorePlayer = Du ignorere spiller {0} fra nu af.
-illegalDate = Ilegal dato format.
-infoChapter = V\u00e6lg kapitel:
-infoChapterPages = Kapitel {0}, side \u00a7c{1}\u00a7f af \u00a7c{2}\u00a7f:
-infoFileDoesNotExist = Fil info.txt eksisterer ikke. Laver en for dig.
-infoPages = Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f:
-infoUnknownChapter = Ukendt kapitel.
-invBigger = Den anden brugers inventory er st\u00f8rre end din.
-invRestored = Din inventory er blevet genoprettet.
-invSee = Du ser inventoryen af {0}.
-invSeeHelp = Brug /invsee for at genoprette din inventory.
-invalidCharge = \u00a7cUgyldig opladning.
-invalidMob = Ugyldig mob type.
-invalidServer = Ugyldig server!
-invalidSignLine = Linje {0} p\u00e5 skilt er ugyldig.
-invalidWorld = \u00a7cUgyldig verden.
-inventoryCleared = \u00a77Inventory ryddet.
-inventoryClearedOthers = \u00a77Inventory af \u00a7c{0}\u00a77 ryddet.
-is = er
-itemCannotBeSold = Det element kan ikke s\u00e6lges til serveren.
-itemMustBeStacked = Element skal handles i stakke. En m\u00e6ngde af 2s ville v\u00e6re to stakke, osv.
-itemNotEnough1 = \u00a7cDu har ikke nok af det element til at s\u00e6lge.
-itemNotEnough2 = \u00a77Hvis du ville have solgt alle dine elementer af den type, brug /sell elementnavn
-itemNotEnough3 = \u00a77/sell elementnavn -1 vil s\u00e6lge alle p\u00e5 n\u00e6r et element, osv.
-itemSellAir = Fors\u00f8gte du virkelig at s\u00e6lge luft? Kom et element i din h\u00e5nd.
-itemSold = \u00a77Solgte for \u00a7c{0} \u00a77({1} {2} elementer for {3} hver)
-itemSoldConsole = {0} solgte {1} for \u00a77{2} \u00a77({3} elementer for {4} hver)
-itemSpawn = \u00a77Giver {0} af {1}
-itemsCsvNotLoaded = Kunne ikke indl\u00e6se items.csv.
-jailAlreadyIncarcerated = \u00a7cPerson is already in jail: {0}
-jailMessage = \u00a7cBryd reglerne, og tag din straf.
-jailNotExist = Det f\u00e6ngsel eksisterer ikke.
-jailReleased = \u00a77Player \u00a7e{0}\u00a77 unjailed.
-jailReleasedPlayerNotify = \u00a77You have been released!
-jailSentenceExtended = Jail time extend to: {0)
-jailSet = \u00a77F\u00e6ngsel {0} er blevet sat
-jumpError = Det ville skade din computer''s hjerne.
-kickDefault = Kicket fra serveren
-kickExempt = \u00a77Du kan ikke sparke denne spiller.
-kill = \u00a77Dr\u00e6bte {0}.
-kitError = \u00a7cDer er ikke nogen gyldige pakker.
-kitError2 = \u00a7cDen pakke eksisterer ikke eller er forkert defineret.
-kitErrorHelp = \u00a7cM\u00e5ske mangler et element en m\u00e6ngde i konfigurationen?
-kitGive = \u00a77Giver pakke {0}.
-kitInvFull = \u00a7cDin inventory var fuld, placere pakken p\u00e5 gulvet
-kitTimed = \u00a7cDu kan ikke den pakke igen f\u00f8r om {0}.
-kits = \u00a77Pakker: {0}
-lightningSmited = \u00a77Du er blevet sl\u00e5et
-lightningUse = \u00a77Sl\u00e5r {0}
-loadWarpError = Kunne ikke indl\u00e6se warp {0}
-loadinfo = Indl\u00e6ste {0} byg {1} af {2}
-localFormat = Lokal: <{0}> {1}
-mailClear = \u00a7cFor at markere din post som l\u00e6st, skriv /mail clear
-mailCleared = \u00a77Post ryddet!
-mailSent = \u00a77Post sendt!
-markMailAsRead = \u00a7cTo marker din post som l\u00e6st, skriv /post ryd
-markedAsAway = \u00a77Du er nu markeret som v\u00e6k.
-markedAsNotAway = \u00a77Du er ikke l\u00e6ngere markeret som v\u00e6k.
+backAfterDeath=\u00a77Brug /back kommandoen for at retunere til dit d\u00f8ds punkt.
+backUsageMsg=\u00a77Returnere til tidligere placering.
+backupFinished=Backup sluttede
+backupStarted=Backup startede
+balance=\u00a77Balance: {0}
+balanceTop=\u00a77 Top {0} saldi
+banExempt=\u00a7cDu kan ikke forbyde den p\u00e5g\u00e6ldende spiller.
+banIpAddress=\u00a77Bannede IP addresse
+bannedIpsFileError=Fejl i l\u00e6sning af banned-ips.txt
+bannedIpsFileNotFound=banned-ips.txt ikke fundet
+bannedPlayersFileError=Fejl i l\u00e6sning af banned-players.txt
+bannedPlayersFileNotFound=banned-players.txt ikke fundet
+bigTreeFailure=\u00a7cStort tr\u00e6 genererings fejl. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord.
+bigTreeSuccess= \u00a77Stort tr\u00e6 fremkaldt.
+broadcast=[\u00a7cMeddelelse\u00a7f]\u00a7a {0}
+buildAlert=\u00a7cDu er ikke tilladt at bygge!
+bukkitFormatChanged=Bukkit version format \u00e6ndret. Version er ikke checket.
+burnMsg=\u00a77Du satte ild til {0} for {1} sekunder.
+canTalkAgain=\u00a77Du kan snakke igen
+cantFindGeoIpDB=Kan ikke finde GeoIP database!
+cantReadGeoIpDB=Fejl ved l\u00e6sning af GeoIP database!
+cantSpawnItem=\u00a7cDu er ikke tilladt at spawne elementet {0}
+commandFailed=Kommando {0} fejlede:
+commandHelpFailedForPlugin=Fejl ved at f\u00e5 hj\u00e6lp til: {0}
+commandNotLoaded=\u00a7cCommand {0} er ikke indl\u00e6st korrekt.
+compassBearing=\u00a77B\u00e6rer: {0} ({1} grader).
+configFileMoveError=Kunne ikke flytte config.yml til backup placering.
+configFileRenameError=Kunne ikke omd\u00f8be temp fil til config.yml
+connectedPlayers=Tilsluttede spillere:
+connectionFailed=Failed ved \u00e5bning af forbindelse.
+cooldownWithMessage=\u00a7cNedk\u00f8lning: {0}
+corruptNodeInConfig=\u00a74Notice: Din konfigurations fil har en korrupt {0} node.
+couldNotFindTemplate=Kunne ikke finde skabelon {0}
+creatingConfigFromTemplate=Opretter config fra skabelon: {0}
+creatingEmptyConfig=Opretter tom config: {0}
+creative=creative
+day=dag
+days=dage
+defaultBanReason=Ban hammeren har talt!
+deleteFileError=Kunne ikke slette fil: {0}
+deleteHome=\u00a77Home {0} has been removed.
+deleteJail=\u00a77F\u00e6ngsel {0} er fjernet.
+deleteWarp=\u00a77Warp {0} er fjernet.
+deniedAccessCommand={0} var n\u00e6gtet adgang til kommando.
+dependancyDownloaded=[Essentials] Dependancy {0} downloaded successfully.
+dependancyException=[Essentials] An error occured when trying to download a dependacy
+dependancyNotFound=[Essentials] A required dependancy was not found, downloading now.
+depth=\u00a77Du er ved havoverfladen.
+depthAboveSea=\u00a77Du er {0} blok(ke) over havoverfladen.
+depthBelowSea=\u00a77Du er {0} blok(ke) under havoverfladen.
+destinationNotSet=Destination er ikke sat
+disableUnlimited=\u00a77Deaktiverede ubergr\u00e6nset placering af {0} for {1}.
+disabled=deaktiveret
+dontMoveMessage=\u00a77Teleportering vil begynde om {0}. Bev\u00e6g dig ikke.
+downloadingGeoIp=Downloader GeoIP database ... det her kan tage et stykke tid (land: 0.6 MB, by: 20MB)
+duplicatedUserdata=Duplikerede userdata: {0} og {1}
+enableUnlimited=\u00a77Giver ubegr\u00e6nset m\u00e6ngde af {0} til {1}.
+enabled=aktiveret
+errorCallingCommand=Fejl ved opkald af kommando /{0}
+errorWithMessage=\u00a7cFejl: {0}
+essentialsReload=\u00a77Essentials Genindl\u00e6st {0}
+extinguish=\u00a77Du slukkede dig selv.
+extinguishOthers=\u00a77Du slukkede {0}.
+failedToCloseConfig=Fejlede i at lukke config {0}
+failedToCreateConfig=Fejl i oprettelse af config {0}
+failedToWriteConfig=Fejlede i at skrive config {0}
+false=false
+fileRenameError=Resterende fil {0} fejlede
+foreverAlone=\u00a7cDu har ingen du kan svare.
+freedMemory=Befriede {0} MB.
+gameMode=\u00a77Set game mode {0} for {1}.
+gcchunks= stykker,
+gcentities= enheder
+gcfree=Free memory: {0} MB
+gcmax=Maximum memory: {0} MB
+gctotal=Allocated memory: {0} MB
+geoIpUrlEmpty=GeoIP download url er tom.
+geoIpUrlInvalid=GeoIP download url er ugyldig.
+geoipJoinFormat=Spiller {0} kommer fra {1}
+godDisabledFor=deaktiveret for {0}
+godEnabledFor=aktiveret for {0}
+godMode=\u00a77Gud tilstand {0}.
+haveBeenReleased=\u00a77Du er blevet l\u00f8sladt
+heal=\u00a77Du er blevet helbredt.
+healOther=\u00a77Helbredt {0}.
+helpConsole=For at se hj\u00e6lp fra konsolen, skriv ?.
+helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
+helpPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f:
+holeInFloor=Hul i gulv
+homeSet=\u00a77Hjem sat.
+homeSetToBed=\u00a77Dit hjem er nu sat til denne seng.
+homes=Homes: {0}
+hour=time
+hours=timer
+ignorePlayer=Du ignorere spiller {0} fra nu af.
+illegalDate=Ilegal dato format.
+infoChapter=V\u00e6lg kapitel:
+infoChapterPages=Kapitel {0}, side \u00a7c{1}\u00a7f af \u00a7c{2}\u00a7f:
+infoFileDoesNotExist=Fil info.txt eksisterer ikke. Laver en for dig.
+infoPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f:
+infoUnknownChapter=Ukendt kapitel.
+invBigger=Den anden brugers inventory er st\u00f8rre end din.
+invRestored=Din inventory er blevet genoprettet.
+invSee=Du ser inventoryen af {0}.
+invSeeHelp=Brug /invsee for at genoprette din inventory.
+invalidCharge=\u00a7cUgyldig opladning.
+invalidMob=Ugyldig mob type.
+invalidServer=Ugyldig server!
+invalidSignLine=Linje {0} p\u00e5 skilt er ugyldig.
+invalidWorld=\u00a7cUgyldig verden.
+inventoryCleared=\u00a77Inventory ryddet.
+inventoryClearedOthers=\u00a77Inventory af \u00a7c{0}\u00a77 ryddet.
+is=er
+itemCannotBeSold=Det element kan ikke s\u00e6lges til serveren.
+itemMustBeStacked=Element skal handles i stakke. En m\u00e6ngde af 2s ville v\u00e6re to stakke, osv.
+itemNotEnough1=\u00a7cDu har ikke nok af det element til at s\u00e6lge.
+itemNotEnough2=\u00a77Hvis du ville have solgt alle dine elementer af den type, brug /sell elementnavn
+itemNotEnough3=\u00a77/sell elementnavn -1 vil s\u00e6lge alle p\u00e5 n\u00e6r et element, osv.
+itemSellAir=Fors\u00f8gte du virkelig at s\u00e6lge luft? Kom et element i din h\u00e5nd.
+itemSold=\u00a77Solgte for \u00a7c{0} \u00a77({1} {2} elementer for {3} hver)
+itemSoldConsole={0} solgte {1} for \u00a77{2} \u00a77({3} elementer for {4} hver)
+itemSpawn=\u00a77Giver {0} af {1}
+itemsCsvNotLoaded=Kunne ikke indl\u00e6se items.csv.
+jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0}
+jailMessage=\u00a7cBryd reglerne, og tag din straf.
+jailNotExist=Det f\u00e6ngsel eksisterer ikke.
+jailReleased=\u00a77Player \u00a7e{0}\u00a77 unjailed.
+jailReleasedPlayerNotify=\u00a77You have been released!
+jailSentenceExtended=Jail time extend to: {0)
+jailSet=\u00a77F\u00e6ngsel {0} er blevet sat
+jumpError=Det ville skade din computer''s hjerne.
+kickDefault=Kicket fra serveren
+kickExempt=\u00a77Du kan ikke sparke denne spiller.
+kill=\u00a77Dr\u00e6bte {0}.
+kitError=\u00a7cDer er ikke nogen gyldige pakker.
+kitError2=\u00a7cDen pakke eksisterer ikke eller er forkert defineret.
+kitErrorHelp=\u00a7cM\u00e5ske mangler et element en m\u00e6ngde i konfigurationen?
+kitGive=\u00a77Giver pakke {0}.
+kitInvFull=\u00a7cDin inventory var fuld, placere pakken p\u00e5 gulvet
+kitTimed=\u00a7cDu kan ikke den pakke igen f\u00f8r om {0}.
+kits=\u00a77Pakker: {0}
+lightningSmited=\u00a77Du er blevet sl\u00e5et
+lightningUse=\u00a77Sl\u00e5r {0}
+loadWarpError=Kunne ikke indl\u00e6se warp {0}
+loadinfo=Indl\u00e6ste {0} byg {1} af {2}
+localFormat=Lokal: <{0}> {1}
+mailClear=\u00a7cFor at markere din post som l\u00e6st, skriv /mail clear
+mailCleared=\u00a77Post ryddet!
+mailSent=\u00a77Post sendt!
+markMailAsRead=\u00a7cTo marker din post som l\u00e6st, skriv /post ryd
+markedAsAway=\u00a77Du er nu markeret som v\u00e6k.
+markedAsNotAway=\u00a77Du er ikke l\u00e6ngere markeret som v\u00e6k.
maxHomes=You cannot set more than {0} homes.
-mayNotJail = \u00a7cDu m\u00e5 ikke f\u00e6ngsle den person
-me = mig
-minute = minut
-minutes = minutter
-missingItems = Du har ikke {0}x {1}.
-missingPrefixSuffix = Mangler et pr\u00e6fiks eller suffiks for {0}
-mobSpawnError = Fejl ved \u00e6ndring af mob fremkalder.
-mobSpawnLimit = Mob m\u00e6ngde begr\u00e6nset til server gr\u00e6nse
-mobSpawnTarget = M\u00e5l blok skal v\u00e6re en mob fremkalder.
-moneyRecievedFrom = \u00a7a{0} er modtaget fra {1}
-moneySentTo = \u00a7a{0} er sendt til {1}
-moneyTaken = {0} taget fra din bank konto.
-month = m\u00e5ned
-months = m\u00e5neder
-moreThanZero = M\u00e6ngder skal v\u00e6re st\u00f8rre end 0.
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-muteExempt = \u00a7cYou may not mute that player.
-mutedPlayer = Spiller {0} d\u00e6mpet.
-mutedPlayerFor = Spiller {0} d\u00e6mpet for {1}.
-mutedUserSpeaks = {0} pr\u00f8vede at snakke, men er muted.
-needTpohere = Du skal have adgang til /tpohere for at teleporter andre spillere.
-negativeBalanceError = Brugeren er ikke tilladt at have en negativ saldo.
-nickChanged = Kaldenavn \u00e6ndret.
+mayNotJail=\u00a7cDu m\u00e5 ikke f\u00e6ngsle den person
+me=mig
+minute=minut
+minutes=minutter
+missingItems=Du har ikke {0}x {1}.
+missingPrefixSuffix=Mangler et pr\u00e6fiks eller suffiks for {0}
+mobSpawnError=Fejl ved \u00e6ndring af mob fremkalder.
+mobSpawnLimit=Mob m\u00e6ngde begr\u00e6nset til server gr\u00e6nse
+mobSpawnTarget=M\u00e5l blok skal v\u00e6re en mob fremkalder.
+mobsAvailable=\u00a77Mobs: {0}
+moneyRecievedFrom=\u00a7a{0} er modtaget fra {1}
+moneySentTo=\u00a7a{0} er sendt til {1}
+moneyTaken={0} taget fra din bank konto.
+month=m\u00e5ned
+months=m\u00e5neder
+moreThanZero=M\u00e6ngder skal v\u00e6re st\u00f8rre end 0.
+msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
+muteExempt=\u00a7cYou may not mute that player.
+mutedPlayer=Spiller {0} d\u00e6mpet.
+mutedPlayerFor=Spiller {0} d\u00e6mpet for {1}.
+mutedUserSpeaks={0} pr\u00f8vede at snakke, men er muted.
+needTpohere=Du skal have adgang til /tpohere for at teleporter andre spillere.
+negativeBalanceError=Brugeren er ikke tilladt at have en negativ saldo.
+nickChanged=Kaldenavn \u00e6ndret.
nickDisplayName=\u00a77You have to enable change-displayname in Essentials config.
-nickInUse = \u00a7cDet navn er allerede i brug.
-nickNamesAlpha = \u00a7cKaldenavne skal v\u00e6re alfanumeriske.
-nickNoMore = \u00a7Du har ikke l\u00e6ngere et kaldenavn.
-nickOthersPermission = \u00a7cDu har ikke tilladelse til at \u00e6ndre andres kaldenavn
-nickSet = \u00a77Dit kaldenavn er nu \u00a7c{0}
-noAccessCommand = \u00a7cDu har ikke adgang til den kommando.
-noAccessPermission = \u00a7cDu har ikke tilladelse til at f\u00e5 adgang til det {0}.
-noDestroyPermission = \u00a7cDu har ikke tilladelse til at \u00f8del\u00e6gge det {0}.
-noHelpFound = \u00a7cNo matching commands.
-noHomeSet = Du har sat et nyt hjem.
-noHomeSetPlayer = Spiller har ikke sat et hjem.
-noKitPermission = \u00a7cDu har brug for \u00a7c{0}\u00a7c tilladelsen for at bruge den pakke.
-noKits = \u00a77Der er ikke nogen pakker tilg\u00e6ngelig endnu
-noMail = Du har ikke noget post
-noMailSendPerm = \u00a7cDu har ikke \u00a7fessentials.mail.send\u00a7c tilladelsen.
-noMotd = \u00a7cDer er ikke nogen besked for dagen.
-noNewMail = \u00a77Du har ingen ny post.
-noPendingRequest = Du har ikke en ventende anmodning.
-noPlacePermission = \u00a7cYou do not have permission to place a block near that sign.
+nickInUse=\u00a7cDet navn er allerede i brug.
+nickNamesAlpha=\u00a7cKaldenavne skal v\u00e6re alfanumeriske.
+nickNoMore=\u00a7Du har ikke l\u00e6ngere et kaldenavn.
+nickOthersPermission=\u00a7cDu har ikke tilladelse til at \u00e6ndre andres kaldenavn
+nickSet=\u00a77Dit kaldenavn er nu \u00a7c{0}
+noAccessCommand=\u00a7cDu har ikke adgang til den kommando.
+noAccessPermission=\u00a7cDu har ikke tilladelse til at f\u00e5 adgang til det {0}.
+noDestroyPermission=\u00a7cDu har ikke tilladelse til at \u00f8del\u00e6gge det {0}.
+noHelpFound=\u00a7cNo matching commands.
+noGodWorldWarning=\u00a7cWarning! God mode in this world disabled.
+noHomeSet=Du har sat et nyt hjem.
+noHomeSetPlayer=Spiller har ikke sat et hjem.
+noKitPermission=\u00a7cDu har brug for \u00a7c{0}\u00a7c tilladelsen for at bruge den pakke.
+noKits=\u00a77Der er ikke nogen pakker tilg\u00e6ngelig endnu
+noMail=Du har ikke noget post
+noMailSendPerm=\u00a7cDu har ikke \u00a7fessentials.mail.send\u00a7c tilladelsen.
+noMotd=\u00a7cDer er ikke nogen besked for dagen.
+noNewMail=\u00a77Du har ingen ny post.
+noPendingRequest=Du har ikke en ventende anmodning.
+noPlacePermission=\u00a7cYou do not have permission to place a block near that sign.
noPowerTools= You have no power tools assigned.
-noRules = \u00a7cDer er ingen regler fastsat endnu.
-noWarpsDefined = Ingen warps defineret
-none = ingen
-notAllowedToQuestion = \u00a7cDu er ikke autoriseret til at bruge et sp\u00f8rgsm\u00e5l.
-notAllowedToShout = \u00a7cDu er ikke autoriseret til at r\u00e5be.
-notEnoughMoney = Du har ikke tilstr\u00e6kkelig penge.
-notRecommendedBukkit = Bukkit version er ikke den anbefalede byg for Essentials.
-notSupportedYet = Ikke underst\u00f8ttet endnu.
-now = nu
-numberRequired = Der skal v\u00e6re et nummer, fjolle.
-onlyDayNight = /time underst\u00f8tter kun day/night.
-onlyPlayers = Kun in-game spillere kan bruge {0}.
-onlySunStorm = /weather only supports sun/storm.
-pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
-pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
-pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
-pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
-pTimePlayers = These players have their own time:
-pTimeReset = Player time has been reset for: \u00a7e{0}
-pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
-pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
-parseError = Fejl ved parsing {0} p\u00e5 linje {1}
-pendingTeleportCancelled = \u00a7cVentende teleportations anmodning aflyst.
-permissionsError = Mangler Permissions/GroupManager; chat pr\u00e6fikser/suffikser vil v\u00e6re sl\u00e5et fra.
-playerBanned = \u00a7cPlayer {0} banned {1} for {2}
-playerInJail = \u00a7cSpiller er allerede i f\u00e6ngsel {0}.
-playerJailed = \u00a77Spiller {0} f\u00e6ngslet.
-playerJailedFor = \u00a77Spiller {0} f\u00e6ngslet for {1}.
-playerKicked = \u00a7cPlayer {0} kicked {1} for {2}
-playerMuted = \u00a77You have been muted
-playerMutedFor = \u00a77You have been muted for {0}
-playerNeverOnServer = \u00a7cSpiller {0} var aldrig p\u00e5 denne server.
-playerNotFound = \u00a7cSpiller ikke fundet.
-playerUnmuted = \u00a77You have been unmuted
-pong = Pong!
-possibleWorlds = \u00a77Mulige verdener er numrene 0 igennem {0}.
-powerToolAir = Kommando kan ikke blive tildelt luft.
-powerToolAlreadySet = Command \u00a7c{0}\u00a7f is already assigned to {1}.
-powerToolAttach = \u00a7c{0}\u00a7f command assigned to {1}.
-powerToolClearAll = All powertool commands have been cleared.
-powerToolList = {1} has the following commands: \u00a7c{0}\u00a7f.
-powerToolListEmpty = {0} has no commands assigned.
-powerToolNoSuchCommandAssigned = Command \u00a7c{0}\u00a7f has not been assigned to {1}.
-powerToolRemove = Command \u00a7c{0}\u00a7f removed from {1}.
-powerToolRemoveAll = All commands removed from {0}.
-powerToolsEnabled= All of your power tools have been enabled.
+noRules=\u00a7cDer er ingen regler fastsat endnu.
+noWarpsDefined=Ingen warps defineret
+none=ingen
+notAllowedToQuestion=\u00a7cDu er ikke autoriseret til at bruge et sp\u00f8rgsm\u00e5l.
+notAllowedToShout=\u00a7cDu er ikke autoriseret til at r\u00e5be.
+notEnoughMoney=Du har ikke tilstr\u00e6kkelig penge.
+notRecommendedBukkit=Bukkit version er ikke den anbefalede byg for Essentials.
+notSupportedYet=Ikke underst\u00f8ttet endnu.
+now=nu
+numberRequired=Der skal v\u00e6re et nummer, fjolle.
+onlyDayNight=/time underst\u00f8tter kun day/night.
+onlyPlayers=Kun in-game spillere kan bruge {0}.
+onlySunStorm=/weather only supports sun/storm.
+pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
+pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
+pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
+pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time.
+pTimePlayers=These players have their own time:
+pTimeReset=Player time has been reset for: \u00a7e{0}
+pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
+pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
+parseError=Fejl ved parsing {0} p\u00e5 linje {1}
+pendingTeleportCancelled=\u00a7cVentende teleportations anmodning aflyst.
+permissionsError=Mangler Permissions/GroupManager; chat pr\u00e6fikser/suffikser vil v\u00e6re sl\u00e5et fra.
+playerBanned=\u00a7cPlayer {0} banned {1} for {2}
+playerInJail=\u00a7cSpiller er allerede i f\u00e6ngsel {0}.
+playerJailed=\u00a77Spiller {0} f\u00e6ngslet.
+playerJailedFor= \u00a77Spiller {0} f\u00e6ngslet for {1}.
+playerKicked=\u00a7cPlayer {0} kicked {1} for {2}
+playerMuted=\u00a77You have been muted
+playerMutedFor=\u00a77You have been muted for {0}
+playerNeverOnServer=\u00a7cSpiller {0} var aldrig p\u00e5 denne server.
+playerNotFound=\u00a7cSpiller ikke fundet.
+playerUnmuted=\u00a77You have been unmuted
+pong=Pong!
+possibleWorlds=\u00a77Mulige verdener er numrene 0 igennem {0}.
+powerToolAir=Kommando kan ikke blive tildelt luft.
+powerToolAlreadySet=Command \u00a7c{0}\u00a7f is already assigned to {1}.
+powerToolAttach=\u00a7c{0}\u00a7f command assigned to {1}.
+powerToolClearAll=All powertool commands have been cleared.
+powerToolList={1} has the following commands: \u00a7c{0}\u00a7f.
+powerToolListEmpty={0} has no commands assigned.
+powerToolNoSuchCommandAssigned=Command \u00a7c{0}\u00a7f has not been assigned to {1}.
+powerToolRemove=Command \u00a7c{0}\u00a7f removed from {1}.
+powerToolRemoveAll=All commands removed from {0}.
powerToolsDisabled= All of your power tools have been disabled.
-protectionOwner = \u00a76[EssentialsProtect] Beskyttelses ejer: {0}
-questionFormat = \u00a77[Sp\u00f8rgsm\u00e5l]\u00a7f {0}
-reloadAllPlugins = \u00a77Genindl\u00e6ste alle tilf\u00f8jelser.
-repair = You have successfully repaired your: \u00a7e{0}.
-repairAlreadyFixed = \u00a77This item does not need repairing.
-repairInvalidType = \u00a7cThis item cannot be repaired.
-repairNone = There were no items that needing repairing.
-requestAccepted = \u00a77Teleporterings anmodning n\u00e6gtet.
-requestAcceptedFrom = \u00a77{0} accepted your teleport request.
-requestDenied = \u00a77Teleporterings anmodning n\u00e6gtet.
-requestDeniedFrom = \u00a77{0} denied your teleport request.
-requestSent = \u00a77Anmodning sendt til {0}\u00a77.
-returnPlayerToJailError = En fejl opstod ved fors\u00f8g p\u00e5 at returnere spiller til f\u00e6ngsel.
-second = sekunde
-seconds = sekunder
-seenOffline = Spiller {0} er offline siden {1}
-seenOnline = Spiller {0} er online siden {1}
-serverFull = Server er fuld
-setSpawner = Changed spawner type to {0}
-sheepMalformedColor = Misdannet farve.
-shoutFormat = \u00a77[R\u00e5b]\u00a7f {0}
-signFormatFail = \u00a74[{0}]
-signFormatSuccess = \u00a71[{0}]
-signFormatTemplate = [{0}]
-signProtectInvalidLocation = \u00a74You are not allowed to create sign here.
-similarWarpExist = En warp med lignende tekst eksisterer allerede.
-slimeMalformedSize = Misdannet st\u00f8rrelse.
-soloMob = Den mob kan godt lide at v\u00e6re alene
-spawnSet = \u00a77Spawn placering sat for gruppe {0}.
-spawned = spawnet
-suicideMessage = \u00a77Farvel grusomme verden...
-suicideSuccess = \u00a77{0} tog sit eget liv
-takenFromAccount = \u00a7c{0} er taget fra din konto.
-takenFromOthersAccount = \u00a7c{0} er blevet taget fra {1} konto.
-teleportAAll = \u00a77Teleporting request sent to all players...
-teleportAll = \u00a77Teleportere alle spillere...
-teleportAtoB = \u00a77{0}\u00a77 teleporterede dig til {1}\u00a77.
-teleportDisabled = {0} har teleportation deaktiveret.
-teleportHereRequest = \u00a7c{0}\u00a7c har anmodet at du teleportere dig til ham/hende.
-teleportNewPlayerError = Failed ved teleportering af ny spiller
-teleportRequest = \u00a7c{0}\u00a7c har anmodet om at teleportere til dig.
-teleportTop = \u00a77Teleportere til toppen.
-teleportationCommencing = \u00a77Teleportering begynder...
-teleportationDisabled = \u00a77Teleportering deaktiveret.
-teleportationEnabled = \u00a77Teleportering aktiveret.
-teleporting = \u00a77Teleportere...
-teleportingPortal = \u00a77Teleporterede via portal.
-tempBanned = Midlertidigt bannet fra serveren for {0}
-tempbanExempt = \u00a77You may not tempban that player
-thunder = Du {0} torden i din verden
-thunderDuration = Du {0} torden i din verden i {1} sekunder.
-timeBeforeHeal = Tid inden n\u00e6ste helbredelse: {0}
-timeBeforeTeleport = Tid f\u00f8r n\u00e6ste teleportering: {0}
-timeFormat = \u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
-timePattern = (?:([0-9]+)\\s*[a\u00e5y][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[wu][a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[ht][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-timeSet = Tid er sat i alle verdener.
-timeSetPermission = \u00a7cYou are not authorized to set the time.
-timeWorldCurrent = The current time in {0} is \u00a73{1}
-timeWorldSet = The time was set to {0} in: \u00a7c{1}
-tradeCompleted = \u00a77Forhandling fuldf\u00f8rt.
-tradeSignEmpty = Forhandlings skiltet har ikke nok forsyning tilbage.
-tradeSignEmptyOwner = There is nothing to collect from this trade sign.
-treeFailure = \u00a7cTr\u00e6 genererings fejl. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord.
-treeSpawned = \u00a77Tr\u00e6 fremkaldt.
-typeTpaccept = \u00a77For at teleportere, skriv \u00a7c/tpaccept\u00a77.
-typeTpdeny = \u00a77For at n\u00e6gte denne anmodning, skriv \u00a7c/tpdeny\u00a77.
-typeWorldName = \u00a77Du kan ogs\u00e5 skrive nanvet p\u00e5 en specifik verden.
-unableToSpawnMob = Kunne ikke fremkalde mob.
-unbannedIP = Tilgav IP addresse, ikke l\u00e6ngere bannet.
-unbannedPlayer = Tilgav spiller, ikke l\u00e6ngere bannet.
-unignorePlayer = Du ignorere ikke spiller {0} mere.
-unknownItemId = Ukendt element id: {0}
-unknownItemInList = Ukendt element {0} i {1} liste.
-unknownItemName = Ukendt element navn: {0}
-unlimitedItemPermission = \u00a7cIngen tilladelse til ubegr\u00e6nset element {0}.
-unlimitedItems = Uendelige elementer:
-unmutedPlayer = Spiller {0} ikke-d\u00e6mpet.
-upgradingFilesError = Fejl under opgradering af filer
-userDoesNotExist = Brugeren {0} eksisterer ikke.
-userIsAway = {0} er nu AFK
-userIsNotAway = {0} er ikke l\u00e6ngere AFK
-userJailed = \u00a77Du er blevet f\u00e6ngslet
-userUsedPortal = {0} brugte en eksisterende udgangs portal.
-userdataMoveBackError = Kunne ikke flytte userdata/{0}.tmp til userdata/{1}
-userdataMoveError = Kunne ikke flytte userdata/{0} til userdata/{1}.tmp
-usingTempFolderForTesting = Bruger temp mappe for testing:
-versionMismatch = Version matcher ikke! Venligst opdater {0} til den nyeste version.
-versionMismatchAll = Version matcher ikke! Venligst opdater alle Essentials jar''er til samme version.
-voiceSilenced = \u00a77Din stemme er blevet d\u00e6mpet
-warpDeleteError = Problem ved sletning af warp filen.
-warpListPermission = \u00a7cDu har ikke tilladelse til at liste de warps.
-warpNotExist = Den warp eksisterer ikke.
-warpSet = \u00a77Warp {0} sat.
-warpUsePermission = \u00a7cDu har ikke tilladelse til at benytte den warp.
-warpingTo = \u00a77Warper til {0}.
-warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
-weatherStorm = \u00a77Du har sat vejret til storm i {0}
-weatherStormFor = \u00a77Du har sat vejret til storm i {0} i {1} sekunder
-weatherSun = \u00a77Du har sat vejret til sol i {0}
-weatherSunFor = \u00a77Du har sat vejret til sol i {0} i {1} sekunder
-whoisGeoLocation = \u00a79 - Placering: {0}
-whoisHealth = \u00a79 - Helbred: {0}/20
-whoisIPAddress = \u00a79 - IP Addresse: {0}
-whoisIs = {0} er {1}
-whoisLocation = \u00a79 - Placering: ({0}, {1}, {2}, {3})
-whoisMoney = \u00a79 - Penge: {0}
-whoisStatusAvailable = \u00a79 - Status: Tilg\u00e6ngelig
-whoisStatusAway = \u00a79 - Status: \u00a7cV\u00e6k\u00a7f
-worth = \u00a77Stak af {0} v\u00e6rd \u00a7c{1}\u00a77 ({2} element(er) for {3} hver)
-worthMeta = \u00a77Stak af {0} med metadata af {1} v\u00e6rd \u00a7c{2}\u00a77 ({3} element(er) for {4} hver)
-worthSet = V\u00e6rd v\u00e6rdi sat
-year = \u00e5r
-years = \u00e5r
-youAreHealed = \u00a77Du er blevet helbredt.
-youHaveNewMail = \u00a7cDu har {0} beskeder!\u00a7f Type \u00a77/post l\u00e6s\u00a7f for at se din post.
-
-
+powerToolsEnabled= All of your power tools have been enabled.
+protectionOwner=\u00a76[EssentialsProtect] Beskyttelses ejer: {0}
+questionFormat=\u00a77[Sp\u00f8rgsm\u00e5l]\u00a7f {0}
+reloadAllPlugins=\u00a77Genindl\u00e6ste alle tilf\u00f8jelser.
+repair=You have successfully repaired your: \u00a7e{0}.
+repairAlreadyFixed=\u00a77This item does not need repairing.
+repairInvalidType=\u00a7cThis item cannot be repaired.
+repairNone=There were no items that needing repairing.
+requestAccepted=\u00a77Teleporterings anmodning n\u00e6gtet.
+requestAcceptedFrom=\u00a77{0} accepted your teleport request.
+requestDenied=\u00a77Teleporterings anmodning n\u00e6gtet.
+requestDeniedFrom=\u00a77{0} denied your teleport request.
+requestSent=\u00a77Anmodning sendt til {0}\u00a77.
+returnPlayerToJailError=En fejl opstod ved fors\u00f8g p\u00e5 at returnere spiller til f\u00e6ngsel.
+second=sekunde
+seconds=sekunder
+seenOffline=Spiller {0} er offline siden {1}
+seenOnline=Spiller {0} er online siden {1}
+serverFull=Server er fuld
+setSpawner=Changed spawner type to {0}
+sheepMalformedColor=Misdannet farve.
+shoutFormat=\u00a77[R\u00e5b]\u00a7f {0}
+signFormatFail=\u00a74[{0}]
+signFormatSuccess=\u00a71[{0}]
+signFormatTemplate=[{0}]
+signProtectInvalidLocation=\u00a74You are not allowed to create sign here.
+similarWarpExist=En warp med lignende tekst eksisterer allerede.
+slimeMalformedSize=Misdannet st\u00f8rrelse.
+soloMob=Den mob kan godt lide at v\u00e6re alene
+spawnSet=\u00a77Spawn placering sat for gruppe {0}.
+spawned=spawnet
+suicideMessage=\u00a77Farvel grusomme verden...
+suicideSuccess= \u00a77{0} tog sit eget liv
+survival=survival
+takenFromAccount=\u00a7c{0} er taget fra din konto.
+takenFromOthersAccount=\u00a7c{0} er blevet taget fra {1} konto.
+teleportAAll=\u00a77Teleporting request sent to all players...
+teleportAll=\u00a77Teleportere alle spillere...
+teleportAtoB=\u00a77{0}\u00a77 teleporterede dig til {1}\u00a77.
+teleportDisabled={0} har teleportation deaktiveret.
+teleportHereRequest=\u00a7c{0}\u00a7c har anmodet at du teleportere dig til ham/hende.
+teleportNewPlayerError=Failed ved teleportering af ny spiller
+teleportRequest=\u00a7c{0}\u00a7c har anmodet om at teleportere til dig.
+teleportTop=\u00a77Teleportere til toppen.
+teleportationCommencing=\u00a77Teleportering begynder...
+teleportationDisabled=\u00a77Teleportering deaktiveret.
+teleportationEnabled=\u00a77Teleportering aktiveret.
+teleporting=\u00a77Teleportere...
+teleportingPortal=\u00a77Teleporterede via portal.
+tempBanned=Midlertidigt bannet fra serveren for {0}
+tempbanExempt=\u00a77You may not tempban that player
+thunder= Du {0} torden i din verden
+thunderDuration=Du {0} torden i din verden i {1} sekunder.
+timeBeforeHeal=Tid inden n\u00e6ste helbredelse: {0}
+timeBeforeTeleport=Tid f\u00f8r n\u00e6ste teleportering: {0}
+timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
+timePattern=(?:([0-9]+)\\s*[a\u00e5y][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[wu][a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[ht][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
+timeSet=Tid er sat i alle verdener.
+timeSetPermission=\u00a7cYou are not authorized to set the time.
+timeWorldCurrent=The current time in {0} is \u00a73{1}
+timeWorldSet=The time was set to {0} in: \u00a7c{1}
+tradeCompleted=\u00a77Forhandling fuldf\u00f8rt.
+tradeSignEmpty=Forhandlings skiltet har ikke nok forsyning tilbage.
+tradeSignEmptyOwner=There is nothing to collect from this trade sign.
+treeFailure=\u00a7cTr\u00e6 genererings fejl. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord.
+treeSpawned=\u00a77Tr\u00e6 fremkaldt.
+true=true
+typeTpaccept=\u00a77For at teleportere, skriv \u00a7c/tpaccept\u00a77.
+typeTpdeny=\u00a77For at n\u00e6gte denne anmodning, skriv \u00a7c/tpdeny\u00a77.
+typeWorldName=\u00a77Du kan ogs\u00e5 skrive nanvet p\u00e5 en specifik verden.
+unableToSpawnMob=Kunne ikke fremkalde mob.
+unbannedIP=Tilgav IP addresse, ikke l\u00e6ngere bannet.
+unbannedPlayer=Tilgav spiller, ikke l\u00e6ngere bannet.
+unignorePlayer=Du ignorere ikke spiller {0} mere.
+unknownItemId=Ukendt element id: {0}
+unknownItemInList=Ukendt element {0} i {1} liste.
+unknownItemName=Ukendt element navn: {0}
+unlimitedItemPermission=\u00a7cIngen tilladelse til ubegr\u00e6nset element {0}.
+unlimitedItems=Uendelige elementer:
+unmutedPlayer=Spiller {0} ikke-d\u00e6mpet.
+upgradingFilesError=Fejl under opgradering af filer
+userDoesNotExist=Brugeren {0} eksisterer ikke.
+userIsAway={0} er nu AFK
+userIsNotAway={0} er ikke l\u00e6ngere AFK
+userJailed=\u00a77Du er blevet f\u00e6ngslet
+userUsedPortal={0} brugte en eksisterende udgangs portal.
+userdataMoveBackError=Kunne ikke flytte userdata/{0}.tmp til userdata/{1}
+userdataMoveError=Kunne ikke flytte userdata/{0} til userdata/{1}.tmp
+usingTempFolderForTesting=Bruger temp mappe for testing:
+versionMismatch=Version matcher ikke! Venligst opdater {0} til den nyeste version.
+versionMismatchAll=Version matcher ikke! Venligst opdater alle Essentials jar''er til samme version.
+voiceSilenced=\u00a77Din stemme er blevet d\u00e6mpet
+warpDeleteError=Problem ved sletning af warp filen.
+warpListPermission=\u00a7cDu har ikke tilladelse til at liste de warps.
+warpNotExist=Den warp eksisterer ikke.
+warpSet=\u00a77Warp {0} sat.
+warpUsePermission=\u00a7cDu har ikke tilladelse til at benytte den warp.
+warpingTo=\u00a77Warper til {0}.
+warps=Warps: {0}
+warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}.
+weatherStorm=\u00a77Du har sat vejret til storm i {0}
+weatherStormFor=\u00a77Du har sat vejret til storm i {0} i {1} sekunder
+weatherSun=\u00a77Du har sat vejret til sol i {0}
+weatherSunFor=\u00a77Du har sat vejret til sol i {0} i {1} sekunder
+whoisGamemode=\u00a79 - Gamemode: {0}
+whoisGeoLocation=\u00a79 - Placering: {0}
+whoisGod=\u00a79 - God mode: {0}
+whoisHealth=\u00a79 - Helbred: {0}/20
+whoisIPAddress=\u00a79 - IP Addresse: {0}
+whoisIs={0} er {1}
+whoisLocation=\u00a79 - Placering: ({0}, {1}, {2}, {3})
+whoisMoney=\u00a79 - Penge: {0}
+whoisOP=\u00a79 - OP: {0}
+whoisStatusAvailable=\u00a79 - Status: Tilg\u00e6ngelig
+whoisStatusAway=\u00a79 - Status: \u00a7cV\u00e6k\u00a7f
+worth=\u00a77Stak af {0} v\u00e6rd \u00a7c{1}\u00a77 ({2} element(er) for {3} hver)
+worthMeta=\u00a77Stak af {0} med metadata af {1} v\u00e6rd \u00a7c{2}\u00a77 ({3} element(er) for {4} hver)
+worthSet=V\u00e6rd v\u00e6rdi sat
+year=\u00e5r
+years=\u00e5r
+youAreHealed=\u00a77Du er blevet helbredt.
+youHaveNewMail=\u00a7cDu har {0} beskeder!\u00a7f Type \u00a77/post l\u00e6s\u00a7f for at se din post.
diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties
index f0ec0f493..d14141507 100644
--- a/Essentials/src/messages_de.properties
+++ b/Essentials/src/messages_de.properties
@@ -2,368 +2,378 @@
# Single quotes have to be doubled: ''
# Translations start here
# by:
-action = * {0} {1}
-addedToAccount = \u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt.
-addedToOthersAccount = \u00a7a{0} wurden zu {1}s Konto hinzugef\u00fcgt.
-alertBroke = zerst\u00f6rt:
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3}
-alertPlaced = platziert:
-alertUsed = benutzt:
-autoAfkKickReason = Du wurdest gekickt, weil du f\u00fcr {0} Minuten inaktiv warst.
-backAfterDeath = \u00a77Benutze den Befehl /back um zu deinem Todespunkt zur\u00fcck zu kehren.
-backUsageMsg = \u00a77Kehre zur letzten Position zur\u00fcck.
-backupFinished = Backup beendet
-backupStarted = Backup gestartet
-balance = \u00a77Geldb\u00f6rse: {0}
-balanceTop = \u00a77 Top {0} Guthaben
-banExempt = \u00a7cDu kannst diesen Spieler nicht sperren.
-banIpAddress = \u00a77IP-Adresse gesperrt.
-bannedIpsFileError = Fehler beim Lesen von banned-ips.txt
-bannedIpsFileNotFound = banned-ips.txt nicht gefunden
-bannedPlayersFileError = Fehler beim Lesen von banned-players.txt
-bannedPlayersFileNotFound = banned-players.txt nicht gefunden
-bigTreeFailure = \u00a7cFehler beim Pflanzen eines grossen Baums. Versuch es auf Gras oder Dreck.
-bigTreeSuccess = \u00a77Grosser Baum gepflanzt.
-broadcast = [\u00a7cRundruf\u00a7f]\u00a7a {0}
-buildAlert = \u00a7cDu hast keine Rechte zum Bauen.
-bukkitFormatChanged = Bukkit-Versionsformat hat sich ge\u00e4ndert. Version nicht kontrolliert.
-burnMsg = \u00a77Du hast {0} f\u00fcr {1} Sekunden in Flammen gesetzt.
-canTalkAgain = \u00a77Du kannst wieder sprechen.
-cantFindGeoIpDB = Kann GeoIP-Datenbank nicht finden!
-cantReadGeoIpDB = Fehler beim Einlesen der GeoIP-Datenbank!
-cantSpawnItem = \u00a7cDu darfst {0} nicht erzeugen.
-commandFailed = Befehl {0} scheiterte:
-commandHelpFailedForPlugin=Fehler beim Abrufen der Hilfe f\u00fcr: {0}
-commandNotLoaded = \u00a7cBefehl {0} ist nicht richtig geladen.
-compassBearing = \u00a77Peilung: {0} ({1} Grad).
-configFileMoveError = Verschieben von config.yml in den Sicherheitskopien-Ordner gescheitert.
-configFileRenameError = Verschieben einer tempor\u00e4ren Datei nach config.yml gescheitert.
-connectedPlayers = Verbundene Spieler:
-connectionFailed = Fehler beim Verbindungsaufbau.
-cooldownWithMessage = \u00a7cBeschr\u00e4nkung: {0}
-corruptNodeInConfig = \u00a74Hinweis: Deine Konfigurationsdatei hat einen ung\u00fcltigen Knoten {0}.
-couldNotFindTemplate = Vorlage {0} konnte nicht gefunden werden.
-creatingConfigFromTemplate = Erstelle Konfiguration aus Vorlage: {0}
-creatingEmptyConfig = Erstelle leere Konfiguration: {0}
-day = Tag
-days = Tage
-defaultBanReason = Der Bann-Hammer hat gesprochen!
-deleteFileError = Konnte Datei nicht l\u00f6schen: {0}
-deleteHome = \u00a77Zuhause {0} wurde gel\u00f6scht.
-deleteJail = \u00a77Gef\u00e4ngnis {0} wurde gel\u00f6scht.
-deleteWarp = \u00a77Warp-Punkt {0} wurde gel\u00f6scht.
-deniedAccessCommand = {0} hat keinen Zugriff auf diesen Befehl.
-dependancyDownloaded = [Essentials] Abh\u00e4ngigkeit {0} erfolgreich runtergeladen.
-dependancyException = [Essentials] W\u00e4hrend dem Download von einer Abh\u00e4ngigkeit ist ein Fehler aufgetreten.
-dependancyNotFound = [Essentials] Eine erforderliche Abh\u00e4ngigkeit wurde nicht gefunde, Download startet jetzt..
-depth = \u00a77Du bist auf Meeresh\u00f6he.
-depthAboveSea = \u00a77Du bist {0} Bl\u00f6cke \u00fcber Meeresh\u00f6he.
-depthBelowSea = \u00a77Du bist {0} Bl\u00f6cke unter Meeresh\u00f6he.
-destinationNotSet = Ziel nicht gesetzt
-disableUnlimited = \u00a77Deaktiviere unendliches Platzieren von {0} f\u00fcr {1}.
-disabled = deaktiviert
-dontMoveMessage = \u00a77Teleportvorgang startet in {0}. Beweg dich nicht.
-downloadingGeoIp = Lade GeoIP-Datenbank ... dies kann etwas dauern (country: 0.6 MB, city: 20MB)
-duplicatedUserdata = Doppelte Datei in userdata: {0} und {1}
-enableUnlimited = \u00a77Gebe {1} unendliche Mengen von {0}.
-enabled = aktiviert
-errorCallingCommand = Fehler beim Aufrufen des Befehls /{0}
-errorWithMessage = \u00a7cFehler: {0}
-essentialsReload = \u00a77Essentials neu geladen {0}
-extinguish = \u00a77Du hast dich selbst gel\u00f6scht.
-extinguishOthers = \u00a77Du hast {0} gel\u00f6scht.
-failedToCloseConfig = Fehler beim Schliessen der Konfiguration {0}
-failedToCreateConfig = Fehler beim Erstellen der Konfiguration {0}
-failedToWriteConfig = Fehler beim Schreiben der Konfiguration {0}
-fileRenameError = Umbenennen von {0} gescheitert.
-foreverAlone = \u00a7cDu hast niemanden, dem du antworten kannst.
-freedMemory = {0} MB frei gemacht.
-gcchunks = Chunks,
-gcentities = Einheiten
-gcfree = Freier Speicher: {0} MB
-gcmax = Maximaler Speicher: {0} MB
-gctotal = Reservierter Speicher: {0} MB
-geoIpUrlEmpty = GeoIP Download-URL ist leer.
-geoIpUrlInvalid = GeoIP Download-URL ist ung\u00fcltig.
-geoipJoinFormat = Spieler {0} kommt aus {1}
-godDisabledFor = deaktiviert f\u00fcr {0}
-godEnabledFor = aktiviert f\u00fcr {0}
-godMode = \u00a77Unsterblichkeit {0}.
-haveBeenReleased = \u00a77Du wurdest frei gelassen.
-heal = \u00a77Du wurdest geheilt.
-healOther = \u00a77{0} geheilt.
-helpConsole = Um die Hilfe der Konsole zu sehen, schreibe ?.
-helpOp = \u00a7c[Hilfe]\u00a7f \u00a77{0}:\u00a7f {1}
-helpPages = Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f:
-holeInFloor = Loch im Boden
-homeSet = \u00a77Zuhause gesetzt.
-homeSetToBed = \u00a77Dein Zuhause ist nun an diesem Bett.
-homes = Heime: {0}
-hour = Stunde
-hours = Stunden
-ignorePlayer = Du ignorierst ab jetzt Spieler {0}.
-illegalDate = Ung\u00fcltiges Datumsformat.
-infoChapter = W\u00e4hle Kapitel:
-infoChapterPages = Kapitel {0}, Seite \u00a7c{1}\u00a7f von \u00a7c{2}\u00a7f:
-infoFileDoesNotExist = Datei info.txt existiert nicht. Erzeuge eine neue Datei.
-infoPages = Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f:
-infoUnknownChapter = Unbekanntes Kapitel:
-invBigger = Das andere Inventar ist gr\u00f6sser als deins.
-invRestored = Dein Inventar wurde wieder hergestellt.
-invSee = Du siehst das Inventar von {0}.
-invSeeHelp = Benutze /invsee um dein Inventar wiederherzustellen.
-invalidCharge = \u00a7cUng\u00fcltige Verf\u00fcgung.
-invalidMob = Ung\u00fcltiger Monstername.
-invalidServer = Ung\u00fcltiger Server!
-invalidSignLine = Die Zeile {0} auf dem Schild ist falsch.
-invalidWorld = \u00a7cUng\u00fcltige Welt.
-inventoryCleared = \u00a77Inventar geleert.
-inventoryClearedOthers = \u00a77Inventar von \u00a7c{0}\u00a77 geleert.
-is = ist
-itemCannotBeSold = Dieser Gegenstand kann nicht verkauft werden.
-itemMustBeStacked = Gegenstand muss als Stapel verkauft werden. Eine Anzahl von 2s verkauft 2 Stapel usw.
-itemNotEnough1 = \u00a7cDu hast nicht genug Gegenst\u00e4nde zum Verkaufen.
-itemNotEnough2 = \u00a77Wenn du alles verkaufen willst, nutze /sell itemname
-itemNotEnough3 = \u00a77/sell itemname -1 verkauft alles bis auf eins usw.
-itemSellAir = Du versuchst Luft zu verkaufen? Nimm einen Gegenstand in die Hand.
-itemSold = \u00a77Verkauft f\u00fcr \u00a7c{0}\u00a77 ({1} {2} Einheiten je {3})
-itemSoldConsole = {0} verkauft {1} f\u00fcr \u00a77{2}\u00a77 ({3} Einheiten je {4})
-itemSpawn = \u00a77Gebe {0}x {1}
-itemsCsvNotLoaded = Konnte items.csv nicht laden.
-jailAlreadyIncarcerated = \u00a7cPerson is already in jail: {0}
-jailMessage = \u00a7cDu hast ein Verbrechen begangen, also hast du Zeit.
-jailNotExist = Dieses Gef\u00e4ngnis existiert nicht.
-jailReleased = \u00a77Spieler \u00a7e{0}\u00a77 wurde freigelassen.
-jailReleasedPlayerNotify = \u00a77Du wurdest freigelassen!
-jailSentenceExtended = Gef\u00e4ngnisszeit erweitert auf: {0)
-jailSet = \u00a77Gef\u00e4ngnis {0} wurde erstellt.
-jumpError = Das w\u00fcrde deinen Computer \u00fcberlasten.
-kickDefault = Vom Server geworfen
-kickExempt = \u00a7cDu kannst diesen Spieler nicht rauswerfen.
-kill = \u00a77{0} get\u00f6tet.
-kitError = \u00a7cEs gibt keine g\u00fcltigen Ausr\u00fcstungen.
-kitError2 = \u00a7cDiese Ausr\u00fcstung existiert nicht oder ist ung\u00fcltig.
-kitErrorHelp = \u00a7cEventuell fehlt bei einem Gegenstand die Menge?
-kitGive = \u00a77Gebe Ausr\u00fcstung {0}.
-kitInvFull = \u00a7cDein Inventar ist voll, lege Ausr\u00fcstung auf den Boden
-kitTimed = \u00a7cDu kannst diese Ausr\u00fcstung nicht innerhalb von {0} anfordern.
-kits = \u00a77Ausr\u00fcstungen: {0}
-lightningSmited = \u00a77Du wurdest gepeinigt.
-lightningUse = \u00a77Peinige {0}
-loadWarpError = Fehler beim Laden von Warp-Punkt {0}
-loadinfo = Plugin {0} Version {1} geladen, erstellt von {2}, \u00fcbersetzt von snowleo
-localFormat = Lokal: <{0}> {1}
-mailClear = \u00a7cUm deine Nachrichten zu l\u00f6schen, schreibe /mail clear
-mailCleared = \u00a77Nachrichten gel\u00f6scht!
-mailSent = \u00a77Nachricht gesendet!
-markMailAsRead = \u00a7cUm deine Nachrichten zu l\u00f6schen, schreibe /mail clear
-markedAsAway = \u00a77Du wirst als abwesend angezeigt.
-markedAsNotAway = \u00a77Du wirst nicht mehr als abwesend angezeigt.
-maxHomes = Du kannst nicht mehr als {0} Zuhause setzen.
-mayNotJail = \u00a7cDu kannst diese Person nicht einsperren.
-me = mir
-minute = Minute
-minutes = Minuten
-missingItems = Du ben\u00f6tigst {0}x {1}.
-missingPrefixSuffix = Prefix/Suffix fehlt f\u00fcr {0}
-mobSpawnError = Fehler beim \u00e4ndern des Monster-Spawner.
-mobSpawnLimit = Anzahl an Monster auf Serverlimit beschr\u00e4nkt
-mobSpawnTarget = Zielblock, muss ein Monster-Spawner sein.
-moneyRecievedFrom = \u00a7a{1} hat dir {0} gegeben.
-moneySentTo = \u00a7aDu hast {1} {0} gegeben.
-moneyTaken = {0} wurde aus deiner Geldb\u00f6rse genommen.
-month = Monat
-months = Monate
-moreThanZero = Anzahl muss gr\u00f6sser als 0 sein.
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-muteExempt = \u00a7cDu darfst diesen Spieler nicht stumm machen.
-mutedPlayer = Player {0} ist nun stumm.
-mutedPlayerFor = Player {0} ist nun stumm f\u00fcr {1}.
-mutedUserSpeaks = {0} versuchte zu sprechen, aber ist stumm geschaltet.
-needTpohere = Du brauchst Zugriff auf /tpohere um andere Spieler teleportieren zu k\u00f6nnen.
-negativeBalanceError = Spieler darf keine Schulden machen.
-nickChanged = Nickname ge\u00e4ndert.
+action=* {0} {1}
+addedToAccount=\u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt.
+addedToOthersAccount=\u00a7a{0} wurden zu {1}s Konto hinzugef\u00fcgt.
+alertBroke=zerst\u00f6rt:
+alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3}
+alertPlaced=platziert:
+alertUsed=benutzt:
+autoAfkKickReason=Du wurdest gekickt, weil du f\u00fcr {0} Minuten inaktiv warst.
+backAfterDeath=\u00a77Benutze den Befehl /back um zu deinem Todespunkt zur\u00fcck zu kehren.
+backUsageMsg=\u00a77Kehre zur letzten Position zur\u00fcck.
+backupFinished=Backup beendet
+backupStarted=Backup gestartet
+balance=\u00a77Geldb\u00f6rse: {0}
+balanceTop=\u00a77 Top {0} Guthaben
+banExempt=\u00a7cDu kannst diesen Spieler nicht sperren.
+banIpAddress=\u00a77IP-Adresse gesperrt.
+bannedIpsFileError=Fehler beim Lesen von banned-ips.txt
+bannedIpsFileNotFound=banned-ips.txt nicht gefunden
+bannedPlayersFileError=Fehler beim Lesen von banned-players.txt
+bannedPlayersFileNotFound=banned-players.txt nicht gefunden
+bigTreeFailure=\u00a7cFehler beim Pflanzen eines grossen Baums. Versuch es auf Gras oder Dreck.
+bigTreeSuccess= \u00a77Grosser Baum gepflanzt.
+broadcast=[\u00a7cRundruf\u00a7f]\u00a7a {0}
+buildAlert=\u00a7cDu hast keine Rechte zum Bauen.
+bukkitFormatChanged=Bukkit-Versionsformat hat sich ge\u00e4ndert. Version nicht kontrolliert.
+burnMsg=\u00a77Du hast {0} f\u00fcr {1} Sekunden in Flammen gesetzt.
+canTalkAgain=\u00a77Du kannst wieder sprechen.
+cantFindGeoIpDB=Kann GeoIP-Datenbank nicht finden!
+cantReadGeoIpDB=Fehler beim Einlesen der GeoIP-Datenbank!
+cantSpawnItem=\u00a7cDu darfst {0} nicht erzeugen.
+commandFailed=Befehl {0} scheiterte:
+commandHelpFailedForPlugin=Fehler beim Abrufen der Hilfe f\u00fcr: {0}
+commandNotLoaded=\u00a7cBefehl {0} ist nicht richtig geladen.
+compassBearing=\u00a77Peilung: {0} ({1} Grad).
+configFileMoveError=Verschieben von config.yml in den Sicherheitskopien-Ordner gescheitert.
+configFileRenameError=Verschieben einer tempor\u00e4ren Datei nach config.yml gescheitert.
+connectedPlayers=Verbundene Spieler:
+connectionFailed=Fehler beim Verbindungsaufbau.
+cooldownWithMessage=\u00a7cBeschr\u00e4nkung: {0}
+corruptNodeInConfig=\u00a74Hinweis: Deine Konfigurationsdatei hat einen ung\u00fcltigen Knoten {0}.
+couldNotFindTemplate=Vorlage {0} konnte nicht gefunden werden.
+creatingConfigFromTemplate=Erstelle Konfiguration aus Vorlage: {0}
+creatingEmptyConfig=Erstelle leere Konfiguration: {0}
+creative=creative
+day=Tag
+days=Tage
+defaultBanReason=Der Bann-Hammer hat gesprochen!
+deleteFileError=Konnte Datei nicht l\u00f6schen: {0}
+deleteHome=\u00a77Zuhause {0} wurde gel\u00f6scht.
+deleteJail=\u00a77Gef\u00e4ngnis {0} wurde gel\u00f6scht.
+deleteWarp=\u00a77Warp-Punkt {0} wurde gel\u00f6scht.
+deniedAccessCommand={0} hat keinen Zugriff auf diesen Befehl.
+dependancyDownloaded=[Essentials] Abh\u00e4ngigkeit {0} erfolgreich runtergeladen.
+dependancyException=[Essentials] W\u00e4hrend dem Download von einer Abh\u00e4ngigkeit ist ein Fehler aufgetreten.
+dependancyNotFound=[Essentials] Eine erforderliche Abh\u00e4ngigkeit wurde nicht gefunde, Download startet jetzt..
+depth=\u00a77Du bist auf Meeresh\u00f6he.
+depthAboveSea=\u00a77Du bist {0} Bl\u00f6cke \u00fcber Meeresh\u00f6he.
+depthBelowSea=\u00a77Du bist {0} Bl\u00f6cke unter Meeresh\u00f6he.
+destinationNotSet=Ziel nicht gesetzt
+disableUnlimited=\u00a77Deaktiviere unendliches Platzieren von {0} f\u00fcr {1}.
+disabled=deaktiviert
+dontMoveMessage=\u00a77Teleportvorgang startet in {0}. Beweg dich nicht.
+downloadingGeoIp=Lade GeoIP-Datenbank ... dies kann etwas dauern (country: 0.6 MB, city: 20MB)
+duplicatedUserdata=Doppelte Datei in userdata: {0} und {1}
+enableUnlimited=\u00a77Gebe {1} unendliche Mengen von {0}.
+enabled=aktiviert
+errorCallingCommand=Fehler beim Aufrufen des Befehls /{0}
+errorWithMessage=\u00a7cFehler: {0}
+essentialsReload=\u00a77Essentials neu geladen {0}
+extinguish=\u00a77Du hast dich selbst gel\u00f6scht.
+extinguishOthers=\u00a77Du hast {0} gel\u00f6scht.
+failedToCloseConfig=Fehler beim Schliessen der Konfiguration {0}
+failedToCreateConfig=Fehler beim Erstellen der Konfiguration {0}
+failedToWriteConfig=Fehler beim Schreiben der Konfiguration {0}
+false=false
+fileRenameError=Umbenennen von {0} gescheitert.
+foreverAlone=\u00a7cDu hast niemanden, dem du antworten kannst.
+freedMemory={0} MB frei gemacht.
+gameMode=\u00a77Set game mode {0} for {1}.
+gcchunks= Chunks,
+gcentities= Einheiten
+gcfree=Freier Speicher: {0} MB
+gcmax=Maximaler Speicher: {0} MB
+gctotal=Reservierter Speicher: {0} MB
+geoIpUrlEmpty=GeoIP Download-URL ist leer.
+geoIpUrlInvalid=GeoIP Download-URL ist ung\u00fcltig.
+geoipJoinFormat=Spieler {0} kommt aus {1}
+godDisabledFor=deaktiviert f\u00fcr {0}
+godEnabledFor=aktiviert f\u00fcr {0}
+godMode=\u00a77Unsterblichkeit {0}.
+haveBeenReleased=\u00a77Du wurdest frei gelassen.
+heal=\u00a77Du wurdest geheilt.
+healOther=\u00a77{0} geheilt.
+helpConsole=Um die Hilfe der Konsole zu sehen, schreibe ?.
+helpOp=\u00a7c[Hilfe]\u00a7f \u00a77{0}:\u00a7f {1}
+helpPages=Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f:
+holeInFloor=Loch im Boden
+homeSet=\u00a77Zuhause gesetzt.
+homeSetToBed=\u00a77Dein Zuhause ist nun an diesem Bett.
+homes=Heime: {0}
+hour=Stunde
+hours=Stunden
+ignorePlayer=Du ignorierst ab jetzt Spieler {0}.
+illegalDate=Ung\u00fcltiges Datumsformat.
+infoChapter=W\u00e4hle Kapitel:
+infoChapterPages=Kapitel {0}, Seite \u00a7c{1}\u00a7f von \u00a7c{2}\u00a7f:
+infoFileDoesNotExist=Datei info.txt existiert nicht. Erzeuge eine neue Datei.
+infoPages=Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f:
+infoUnknownChapter=Unbekanntes Kapitel:
+invBigger=Das andere Inventar ist gr\u00f6sser als deins.
+invRestored=Dein Inventar wurde wieder hergestellt.
+invSee=Du siehst das Inventar von {0}.
+invSeeHelp=Benutze /invsee um dein Inventar wiederherzustellen.
+invalidCharge=\u00a7cUng\u00fcltige Verf\u00fcgung.
+invalidMob=Ung\u00fcltiger Monstername.
+invalidServer=Ung\u00fcltiger Server!
+invalidSignLine=Die Zeile {0} auf dem Schild ist falsch.
+invalidWorld=\u00a7cUng\u00fcltige Welt.
+inventoryCleared=\u00a77Inventar geleert.
+inventoryClearedOthers=\u00a77Inventar von \u00a7c{0}\u00a77 geleert.
+is=ist
+itemCannotBeSold=Dieser Gegenstand kann nicht verkauft werden.
+itemMustBeStacked=Gegenstand muss als Stapel verkauft werden. Eine Anzahl von 2s verkauft 2 Stapel usw.
+itemNotEnough1=\u00a7cDu hast nicht genug Gegenst\u00e4nde zum Verkaufen.
+itemNotEnough2=\u00a77Wenn du alles verkaufen willst, nutze /sell itemname
+itemNotEnough3=\u00a77/sell itemname -1 verkauft alles bis auf eins usw.
+itemSellAir=Du versuchst Luft zu verkaufen? Nimm einen Gegenstand in die Hand.
+itemSold=\u00a77Verkauft f\u00fcr \u00a7c{0}\u00a77 ({1} {2} Einheiten je {3})
+itemSoldConsole={0} verkauft {1} f\u00fcr \u00a77{2}\u00a77 ({3} Einheiten je {4})
+itemSpawn=\u00a77Gebe {0}x {1}
+itemsCsvNotLoaded=Konnte items.csv nicht laden.
+jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0}
+jailMessage=\u00a7cDu hast ein Verbrechen begangen, also hast du Zeit.
+jailNotExist=Dieses Gef\u00e4ngnis existiert nicht.
+jailReleased=\u00a77Spieler \u00a7e{0}\u00a77 wurde freigelassen.
+jailReleasedPlayerNotify=\u00a77Du wurdest freigelassen!
+jailSentenceExtended=Gef\u00e4ngnisszeit erweitert auf: {0)
+jailSet=\u00a77Gef\u00e4ngnis {0} wurde erstellt.
+jumpError=Das w\u00fcrde deinen Computer \u00fcberlasten.
+kickDefault=Vom Server geworfen
+kickExempt=\u00a7cDu kannst diesen Spieler nicht rauswerfen.
+kill=\u00a77{0} get\u00f6tet.
+kitError=\u00a7cEs gibt keine g\u00fcltigen Ausr\u00fcstungen.
+kitError2=\u00a7cDiese Ausr\u00fcstung existiert nicht oder ist ung\u00fcltig.
+kitErrorHelp=\u00a7cEventuell fehlt bei einem Gegenstand die Menge?
+kitGive=\u00a77Gebe Ausr\u00fcstung {0}.
+kitInvFull=\u00a7cDein Inventar ist voll, lege Ausr\u00fcstung auf den Boden
+kitTimed=\u00a7cDu kannst diese Ausr\u00fcstung nicht innerhalb von {0} anfordern.
+kits=\u00a77Ausr\u00fcstungen: {0}
+lightningSmited=\u00a77Du wurdest gepeinigt.
+lightningUse=\u00a77Peinige {0}
+loadWarpError=Fehler beim Laden von Warp-Punkt {0}
+loadinfo=Plugin {0} Version {1} geladen, erstellt von {2}, \u00fcbersetzt von snowleo
+localFormat=Lokal: <{0}> {1}
+mailClear=\u00a7cUm deine Nachrichten zu l\u00f6schen, schreibe /mail clear
+mailCleared=\u00a77Nachrichten gel\u00f6scht!
+mailSent=\u00a77Nachricht gesendet!
+markMailAsRead=\u00a7cUm deine Nachrichten zu l\u00f6schen, schreibe /mail clear
+markedAsAway=\u00a77Du wirst als abwesend angezeigt.
+markedAsNotAway=\u00a77Du wirst nicht mehr als abwesend angezeigt.
+maxHomes=Du kannst nicht mehr als {0} Zuhause setzen.
+mayNotJail=\u00a7cDu kannst diese Person nicht einsperren.
+me=mir
+minute=Minute
+minutes=Minuten
+missingItems=Du ben\u00f6tigst {0}x {1}.
+missingPrefixSuffix=Prefix/Suffix fehlt f\u00fcr {0}
+mobSpawnError=Fehler beim \u00e4ndern des Monster-Spawner.
+mobSpawnLimit=Anzahl an Monster auf Serverlimit beschr\u00e4nkt
+mobSpawnTarget=Zielblock, muss ein Monster-Spawner sein.
+mobsAvailable=\u00a77Mobs: {0}
+moneyRecievedFrom=\u00a7a{1} hat dir {0} gegeben.
+moneySentTo=\u00a7aDu hast {1} {0} gegeben.
+moneyTaken={0} wurde aus deiner Geldb\u00f6rse genommen.
+month=Monat
+months=Monate
+moreThanZero=Anzahl muss gr\u00f6sser als 0 sein.
+msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
+muteExempt=\u00a7cDu darfst diesen Spieler nicht stumm machen.
+mutedPlayer=Player {0} ist nun stumm.
+mutedPlayerFor=Player {0} ist nun stumm f\u00fcr {1}.
+mutedUserSpeaks={0} versuchte zu sprechen, aber ist stumm geschaltet.
+needTpohere=Du brauchst Zugriff auf /tpohere um andere Spieler teleportieren zu k\u00f6nnen.
+negativeBalanceError=Spieler darf keine Schulden machen.
+nickChanged=Nickname ge\u00e4ndert.
nickDisplayName=\u00a77Du musst \u00a7fchange-displayname\u00a7c in der Essentials-Config aktivieren.
-nickInUse = \u00a7cDieser Name wird bereits verwendet.
-nickNamesAlpha = \u00a7cNicknamen d\u00fcrfen nur alphanumerische Zeichen enthalten.
-nickNoMore = \u00a7Du hast keinen Nicknamen mehr.
-nickOthersPermission = \u00a7cDu hast keine Rechte um den Nicknamen von anderen zu \u00e4ndern.
-nickSet = \u00a77Dein Nickname ist nun \u00a7c{0}
-noAccessCommand = \u00a7cDu hast keinen Zugriff auf diesen Befehl.
-noAccessPermission = \u00a7cDu hast keine Rechte, den Block {0} zu \u00f6ffnen.
-noDestroyPermission = \u00a7cDu hast keine Rechte, den Block {0} zu zerst\u00f6ren.
-noHelpFound = \u00a7cKeine \u00fcbereinstimmenden Kommandos.
-noHomeSet = Du hast kein Zuhause gesetzt.
-noHomeSetPlayer = Spieler hat kein Zuhause gesetzt.
-noKitPermission = \u00a7cDu brauchst die Berechtigung \u00a7c{0}\u00a7c um diese Ausr\u00fcstung anzufordern.
-noKits = \u00a77Es sind keine Ausr\u00fcstungen verf\u00fcgbar.
-noMail = Du hast keine Nachrichten
-noMailSendPerm = \u00a7cDu hast die Rechte \u00a7fessentials.mail.send\u00a7c nicht.
-noMotd = \u00a7cEs existiert keine Willkommensnachricht.
-noNewMail = \u00a77Du hast keine Nachrichten.
-noPendingRequest = Du hast keine Teleportierungsanfragen.
-noPlacePermission = \u00a7cDu hast keine Rechte, einen Block in der N\u00e4he des Schildes zu platzieren.
-noPowerTools = Du hast keine Powertools zugewiesen.
-noRules = \u00a7cEs wurden keine Regeln definiert.
-noWarpsDefined = Keine Warp-Punkte erstellt.
-none = keine
-notAllowedToQuestion = \u00a7cDu bist nicht berechtigt zu fragen.
-notAllowedToShout = \u00a7cDu bist nicht berechtigt zu schreien.
-notEnoughMoney = Du hast nicht genug Geld.
-notRecommendedBukkit = Die verwendete Bukkit-Version ist nicht f\u00fcr Essentials empfohlen.
-notSupportedYet = Noch nicht verf\u00fcgbar.
-now = jetzt
-numberRequired = Ein Zahl wird ben\u00f6tigt.
-onlyDayNight = /time unterst\u00fctzt nur day und night.
-onlyPlayers = Nur Spieler k\u00f6nnen {0} benutzen.
-onlySunStorm = /weather unterst\u00fctzt nur sun und storm.
-pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
-pTimeCurrentFixed = \u00a7e{0}''s\u00a7f Zeit wurde zu {1} gesetzt.
-pTimeNormal = \u00a7e{0}''s\u00a7f Zeit ist normal und entspricht der Serverzeit.
-pTimeOthersPermission = \u00a7cDu hast keine Berechtigung die Zeit von anderen Spielern zu \u00e4ndern.
-pTimePlayers = Diese Spieler haben ihre eigene Zeit:
-pTimeReset = Zeit wurde zur\u00fcgesetzt f\u00fcr: \u00a7e{0}
-pTimeSet = Zeit wurde f\u00fcr \u00a7e{1}\u00a7f zu \u00a73{0}\u00a7f gesetzt.
-pTimeSetFixed = Spielerzeit ist festgesetzt zu \u00a73{0}\u00a7f f\u00fcr: \u00a7e{1}
-parseError = Fehler beim Parsen von {0} in Zeile {1}
-pendingTeleportCancelled = \u00a7cLaufende Teleportierung abgebrochen.
-permissionsError = Permissions/GroupManager fehlt; Chat-Prefixe/-Suffixe sind ausgeschaltet.
-playerBanned = \u00a7cSpieler {0} gesperrt: {1}
-playerInJail = \u00a7cSpieler ist bereits in Gef\u00e4ngnis {0}.
-playerJailed = \u00a77Spieler {0} eingesperrt.
-playerJailedFor = \u00a77Spieler {0} eingesperrt f\u00fcr {1}.
-playerKicked = \u00a7cSpieler {0} rausgeworfen: {1}
-playerMuted = \u00a77Du bist jetzt stumm.
-playerMutedFor = \u00a77Du bist jetzt stumm f\u00fcr {0}.
-playerNeverOnServer = \u00a7cSpieler {0} war niemals auf diesem Server.
-playerNotFound = \u00a7cSpieler nicht gefunden.
-playerUnmuted = \u00a77Du bist nicht mehr stumm.
-pong = Pong!
-possibleWorlds = \u00a77M\u00f6gliche Welten sind nummeriet von 0 bis {0}.
-powerToolAir = Befehl kann nicht mit Luft verbunden werden.
-powerToolAlreadySet = Befehl \u00a7c{0}\u00a7f ist bereits zu {1} hinzugef\u00fcgt.
-powerToolAttach = Befehl \u00a7c{0}\u00a7f erfolgreich zu {1} hinzugef\u00fcgt.
+nickInUse=\u00a7cDieser Name wird bereits verwendet.
+nickNamesAlpha=\u00a7cNicknamen d\u00fcrfen nur alphanumerische Zeichen enthalten.
+nickNoMore=\u00a7Du hast keinen Nicknamen mehr.
+nickOthersPermission=\u00a7cDu hast keine Rechte um den Nicknamen von anderen zu \u00e4ndern.
+nickSet=\u00a77Dein Nickname ist nun \u00a7c{0}
+noAccessCommand=\u00a7cDu hast keinen Zugriff auf diesen Befehl.
+noAccessPermission=\u00a7cDu hast keine Rechte, den Block {0} zu \u00f6ffnen.
+noDestroyPermission=\u00a7cDu hast keine Rechte, den Block {0} zu zerst\u00f6ren.
+noGodWorldWarning=\u00a7cWarning! God mode in this world disabled.
+noHelpFound=\u00a7cKeine \u00fcbereinstimmenden Kommandos.
+noHomeSet=Du hast kein Zuhause gesetzt.
+noHomeSetPlayer=Spieler hat kein Zuhause gesetzt.
+noKitPermission=\u00a7cDu brauchst die Berechtigung \u00a7c{0}\u00a7c um diese Ausr\u00fcstung anzufordern.
+noKits=\u00a77Es sind keine Ausr\u00fcstungen verf\u00fcgbar.
+noMail=Du hast keine Nachrichten
+noMailSendPerm=\u00a7cDu hast die Rechte \u00a7fessentials.mail.send\u00a7c nicht.
+noMotd=\u00a7cEs existiert keine Willkommensnachricht.
+noNewMail=\u00a77Du hast keine Nachrichten.
+noPendingRequest=Du hast keine Teleportierungsanfragen.
+noPlacePermission=\u00a7cDu hast keine Rechte, einen Block in der N\u00e4he des Schildes zu platzieren.
+noPowerTools=Du hast keine Powertools zugewiesen.
+noRules=\u00a7cEs wurden keine Regeln definiert.
+noWarpsDefined=Keine Warp-Punkte erstellt.
+none=keine
+notAllowedToQuestion=\u00a7cDu bist nicht berechtigt zu fragen.
+notAllowedToShout=\u00a7cDu bist nicht berechtigt zu schreien.
+notEnoughMoney=Du hast nicht genug Geld.
+notRecommendedBukkit=Die verwendete Bukkit-Version ist nicht f\u00fcr Essentials empfohlen.
+notSupportedYet=Noch nicht verf\u00fcgbar.
+now=jetzt
+numberRequired=Ein Zahl wird ben\u00f6tigt.
+onlyDayNight=/time unterst\u00fctzt nur day und night.
+onlyPlayers=Nur Spieler k\u00f6nnen {0} benutzen.
+onlySunStorm=/weather unterst\u00fctzt nur sun und storm.
+pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
+pTimeCurrentFixed=\u00a7e{0}''s\u00a7f Zeit wurde zu {1} gesetzt.
+pTimeNormal=\u00a7e{0}''s\u00a7f Zeit ist normal und entspricht der Serverzeit.
+pTimeOthersPermission=\u00a7cDu hast keine Berechtigung die Zeit von anderen Spielern zu \u00e4ndern.
+pTimePlayers=Diese Spieler haben ihre eigene Zeit:
+pTimeReset=Zeit wurde zur\u00fcgesetzt f\u00fcr: \u00a7e{0}
+pTimeSet=Zeit wurde f\u00fcr \u00a7e{1}\u00a7f zu \u00a73{0}\u00a7f gesetzt.
+pTimeSetFixed=Spielerzeit ist festgesetzt zu \u00a73{0}\u00a7f f\u00fcr: \u00a7e{1}
+parseError=Fehler beim Parsen von {0} in Zeile {1}
+pendingTeleportCancelled=\u00a7cLaufende Teleportierung abgebrochen.
+permissionsError=Permissions/GroupManager fehlt; Chat-Prefixe/-Suffixe sind ausgeschaltet.
+playerBanned=\u00a7cSpieler {0} gesperrt: {1}
+playerInJail=\u00a7cSpieler ist bereits in Gef\u00e4ngnis {0}.
+playerJailed=\u00a77Spieler {0} eingesperrt.
+playerJailedFor= \u00a77Spieler {0} eingesperrt f\u00fcr {1}.
+playerKicked=\u00a7cSpieler {0} rausgeworfen: {1}
+playerMuted=\u00a77Du bist jetzt stumm.
+playerMutedFor=\u00a77Du bist jetzt stumm f\u00fcr {0}.
+playerNeverOnServer=\u00a7cSpieler {0} war niemals auf diesem Server.
+playerNotFound=\u00a7cSpieler nicht gefunden.
+playerUnmuted=\u00a77Du bist nicht mehr stumm.
+pong=Pong!
+possibleWorlds=\u00a77M\u00f6gliche Welten sind nummeriet von 0 bis {0}.
+powerToolAir=Befehl kann nicht mit Luft verbunden werden.
+powerToolAlreadySet=Befehl \u00a7c{0}\u00a7f ist bereits zu {1} hinzugef\u00fcgt.
+powerToolAttach=Befehl \u00a7c{0}\u00a7f erfolgreich zu {1} hinzugef\u00fcgt.
powerToolClearAll= Alle Powertoolkommandos wurden entfernt.
-powerToolList = {1} hat die folgenden Befehle: \u00a7c{0}\u00a7f.
-powerToolListEmpty = {0} hat keinen Befehl.
-powerToolNoSuchCommandAssigned = Befehl \u00a7c{0}\u00a7f wurde nicht zu {1} hinzugef\u00fcgt.
-powerToolRemove = Befehl \u00a7c{0}\u00a7f erfolgreich von {1} entfernt.
-powerToolRemoveAll = Alle Befehle von {0} entfernt.
-powerToolsEnabled = Alle deine Powertools wurden aktiviert.
-powerToolsDisabled = Alle deine Powertools wurden deaktiviert.
-protectionOwner = \u00a76[EssentialsProtect] Besitzer dieses Blocks: {0}
-questionFormat = \u00a77[Frage]\u00a7f {0}
-reloadAllPlugins = \u00a77Alle plugins neu geladen.
-repair = Du hast erfolgreich deine {0} repariert.
-repairAlreadyFixed = \u00a77Dieser Gegenstand ben\u00f6tigt keine Reparatur.
-repairInvalidType = \u00a7cDieser Gegenstand kann nicht repariert werden.
-repairNone = Es sind keine Gegenst\u00e4nde vorhanden, die repariert werden k\u00f6nnen.
-requestAccepted = \u00a77Teleportierungsanfrage akzeptiert.
-requestAcceptedFrom = \u00a77{0} hat deine Teleportierungsanfrage angenommen.
-requestDenied = \u00a77Teleportierungsanfrage verweigert.
-requestDeniedFrom = \u00a77{0} hat deine Teleportierungsanfrage abgelehnt.
-requestSent = \u00a77Anfrage gesendet an {0}\u00a77.
-returnPlayerToJailError = Fehler beim Versuch, den Spieler ins Gef\u00e4ngnis zu teleportieren.
-second = Sekunde
-seconds = Sekunden
-seenOffline = Spieler {0} ist offline seit {1}
-seenOnline = Spieler {0} ist online seit {1}
-serverFull = Server ist voll
-setSpawner = \u00c4ndere Mob-Spawner zu {0}
-sheepMalformedColor = Ung\u00fcltige Farbe.
-shoutFormat = \u00a77[Schrei]\u00a7f {0}
-signFormatFail = \u00a74[{0}]
-signFormatSuccess = \u00a71[{0}]
-signFormatTemplate = [{0}]
-signProtectInvalidLocation = \u00a74Du bist nicht befugt ein Schild hierhin zu setzen.
-similarWarpExist = Ein Warp-Punkt mit einem \u00e4hnlichen Namen existiert bereits.
-slimeMalformedSize = Ung\u00fcltige Gr\u00f6sse.
-soloMob = Das Monster m\u00f6chte allein sein.
-spawnSet = \u00a77Spawn-Punkt gesetzt f\u00fcr Gruppe {0}.
-spawned = erzeugt
-suicideMessage = \u00a77Lebewohl grausame Welt...
-suicideSuccess = \u00a77{0} hat sich das Leben genommen.
-takenFromAccount = \u00a7c{0} wurden aus deiner Geldb\u00f6rse genommen.
-takenFromOthersAccount = \u00a7c{0} wurde von {1} wurde Rechnung getragen.
-teleportAAll = \u00a77Teleportierungsanfrage zu allen Spielern gesendet...
-teleportAll = \u00a77Teleportiere alle Spieler...
-teleportAtoB = \u00a77{0}\u00a77 teleportiert dich zu {1}\u00a77.
-teleportDisabled = {0} verweigert die Teleportierung.
-teleportHereRequest = \u00a7c{0}\u00a7c fragt, ob du dich zu ihm teleportierst.
-teleportNewPlayerError = Fehler beim Teleportieren eines neuen Spielers
-teleportRequest = \u00a7c{0}\u00a7c fragt, ob er sich zu dir teleportieren darf.
-teleportTop = \u00a77Teleportiere nach oben.
-teleportationCommencing = \u00a77Teleportierung gestartet...
-teleportationDisabled = \u00a77Teleportierung deaktiviert.
-teleportationEnabled = \u00a77Teleportierung aktiviert.
-teleporting = \u00a77Teleportiere...
-teleportingPortal = \u00a77Teleportiere durch Portal.
-tempBanned = Zeitlich gesperrt vom Server f\u00fcr {0}
-tempbanExempt = \u00a77Du kannst diesen Spieler nicht zeitlich sperren.
-thunder = Es donnert nun in deiner Welt {0}.
-thunderDuration = Es donnert nun f\u00fcr {1} Sekunden in deiner Welt {0}.
-timeBeforeHeal = Zeit bis zur n\u00e4chsten Heilung: {0}
-timeBeforeTeleport = Zeit bis zum n\u00e4chsten Teleport: {0}
-timeFormat = \u00a73{0}\u00a7f oder \u00a73{1}\u00a7f oder \u00a73{2}\u00a7f
-timePattern = (?:([0-9]+)\\s*[yj][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[dt][a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:h|st)[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-timeSet = Zeit in allen Welten gesetzt.
-timeSetPermission = \u00a7cDu hast keine Berechtigung die Zeit zu \u00e4ndern.
-timeWorldCurrent = Die momentane Zeit in {0} ist \u00a73{1}
-timeWorldSet = Die Zeit in \u00a7c{1}\u00a7f wurde zu {0} gesetzt.
-tradeCompleted = \u00a77Handel abgeschlossen.
-tradeSignEmpty = Der Bestand des Trade-Schild ist aufgebraucht.
-tradeSignEmptyOwner = Es gibt nichts mehr zu Sammeln von diesem Trade-Schild.
-treeFailure = \u00a7cBaumpflanzung gescheitert. Versuche es auf Gras oder Dreck.
-treeSpawned = \u00a77Baum gepflanzt.
-typeTpaccept = \u00a77Um zu teleportieren, schreibe \u00a7c/tpaccept\u00a77.
-typeTpdeny = \u00a77Um diese Anfrage abzulehnen, schreibe \u00a7c/tpdeny\u00a77.
-typeWorldName = \u00a77Du kannst auch den Namen der Welt eingeben.
-unableToSpawnMob = Fehler beim Erzeugen eines Monster.
-unbannedIP = Verbannung von IP-Adresse r\u00fcckg\u00e4ngig gemacht.
-unbannedPlayer = Verbannung von Spieler r\u00fcckg\u00e4ngig gemacht.
-unignorePlayer = Du ignorierst Spieler {0} nicht mehr.
-unknownItemId = Unbekannte Item-Id: {0}
-unknownItemInList = Unbekannter Gegenstand {0} in Liste {1}.
-unknownItemName = Unbekannter Gegenstand: {0}
-unlimitedItemPermission = \u00a7cDu hast keine Rechte f\u00fcr {0}.
-unlimitedItems = Unendliche Objekte:
-unmutedPlayer = Spieler {0} ist nicht mehr stumm.
-upgradingFilesError = Fehler beim Aktualisieren der Dateien
-userDoesNotExist = Spieler {0} existiert nicht.
-userIsAway = {0} ist abwesend.
-userIsNotAway = {0} ist wieder da.
-userJailed = \u00a77Du wurdest eingesperrt.
-userUsedPortal = {0} benutzt ein vorhandenes Ausgangsportal.
-userdataMoveBackError = Verschieben von userdata/{0}.tmp nach userdata/{1} gescheitert.
-userdataMoveError = Verschieben von userdata/{0} nach userdata/{1}.tmp gescheitert.
-usingTempFolderForTesting = Benutze tempor\u00e4ren Ordner zum Testen:
-versionMismatch = Versionen nicht identisch! Bitte aktualisiere {0}.
-versionMismatchAll = Versionen ungleich! Bitte aktualisiere alle Essentials jars auf die gleiche Version.
-voiceSilenced = \u00a77Du bist stumm
-warpDeleteError = Fehler beim L\u00f6schen der Warp-Datei.
-warpListPermission = \u00a7cDu hast keine Berechtigung, die Warp-Punkte anzuzeigen.
-warpNotExist = Warp-Punkt existiert nicht.
-warpSet = \u00a77Warp-Punkt {0} wurde erstellt.
-warpUsePermission = \u00a7cDu hast keinen Zugriff f\u00fcr diesen Warp-Punkt.
-warpingTo = \u00a77Teleportiere zu Warp-Punkt {0}.
-warpsCount = \u00a77Es gibt {0} Warp-Punkte. Zeige Seite {1} von {2}.
-weatherStorm = \u00a77In {0} st\u00fcrmt es nun.
-weatherStormFor = \u00a77In {0} st\u00fcrmt es nun f\u00fcr {1} Sekunden.
-weatherSun = \u00a77In {0} scheint nun die Sonne.
-weatherSunFor = \u00a77In {0} scheint nun f\u00fcr {1} Sekunden die Sonne.
-whoisGeoLocation = \u00a79 - Herkunft: {0}
-whoisHealth = \u00a79 - Gesundheit: {0}/20
-whoisIPAddress = \u00a79 - IP-Adresse: {0}
-whoisIs = {0} ist {1}
-whoisLocation = \u00a79 - Position: ({0}, {1}, {2}, {3})
-whoisMoney = \u00a79 - Geldb\u00f6rse: {0}
-whoisStatusAvailable = \u00a79 - Status: Anwesend
-whoisStatusAway = \u00a79 - Status: \u00a7cAbwesend\u00a7f
-worth = \u00a77Ein Stapel von {0} ist \u00a7c{1}\u00a77 wert ({2} Einheiten je {3})
-worthMeta = \u00a77Ein Stapel von {0} mit Metadaten {1} ist \u00a7c{2}\u00a77 wert. ({3} Einheiten je {4})
-worthSet = Wert des Gegenstands gesetzt.
-year = Jahr
-years = Jahre
-youAreHealed = \u00a77Du wurdest geheilt.
-youHaveNewMail = \u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen.
-
+powerToolList={1} hat die folgenden Befehle: \u00a7c{0}\u00a7f.
+powerToolListEmpty={0} hat keinen Befehl.
+powerToolNoSuchCommandAssigned=Befehl \u00a7c{0}\u00a7f wurde nicht zu {1} hinzugef\u00fcgt.
+powerToolRemove=Befehl \u00a7c{0}\u00a7f erfolgreich von {1} entfernt.
+powerToolRemoveAll=Alle Befehle von {0} entfernt.
+powerToolsDisabled=Alle deine Powertools wurden deaktiviert.
+powerToolsEnabled=Alle deine Powertools wurden aktiviert.
+protectionOwner=\u00a76[EssentialsProtect] Besitzer dieses Blocks: {0}
+questionFormat=\u00a77[Frage]\u00a7f {0}
+reloadAllPlugins=\u00a77Alle plugins neu geladen.
+repair=Du hast erfolgreich deine {0} repariert.
+repairAlreadyFixed=\u00a77Dieser Gegenstand ben\u00f6tigt keine Reparatur.
+repairInvalidType=\u00a7cDieser Gegenstand kann nicht repariert werden.
+repairNone=Es sind keine Gegenst\u00e4nde vorhanden, die repariert werden k\u00f6nnen.
+requestAccepted=\u00a77Teleportierungsanfrage akzeptiert.
+requestAcceptedFrom=\u00a77{0} hat deine Teleportierungsanfrage angenommen.
+requestDenied=\u00a77Teleportierungsanfrage verweigert.
+requestDeniedFrom=\u00a77{0} hat deine Teleportierungsanfrage abgelehnt.
+requestSent=\u00a77Anfrage gesendet an {0}\u00a77.
+returnPlayerToJailError=Fehler beim Versuch, den Spieler ins Gef\u00e4ngnis zu teleportieren.
+second=Sekunde
+seconds=Sekunden
+seenOffline=Spieler {0} ist offline seit {1}
+seenOnline=Spieler {0} ist online seit {1}
+serverFull=Server ist voll
+setSpawner=\u00c4ndere Mob-Spawner zu {0}
+sheepMalformedColor=Ung\u00fcltige Farbe.
+shoutFormat=\u00a77[Schrei]\u00a7f {0}
+signFormatFail=\u00a74[{0}]
+signFormatSuccess=\u00a71[{0}]
+signFormatTemplate=[{0}]
+signProtectInvalidLocation=\u00a74Du bist nicht befugt ein Schild hierhin zu setzen.
+similarWarpExist=Ein Warp-Punkt mit einem \u00e4hnlichen Namen existiert bereits.
+slimeMalformedSize=Ung\u00fcltige Gr\u00f6sse.
+soloMob=Das Monster m\u00f6chte allein sein.
+spawnSet=\u00a77Spawn-Punkt gesetzt f\u00fcr Gruppe {0}.
+spawned=erzeugt
+suicideMessage=\u00a77Lebewohl grausame Welt...
+suicideSuccess= \u00a77{0} hat sich das Leben genommen.
+survival=survival
+takenFromAccount=\u00a7c{0} wurden aus deiner Geldb\u00f6rse genommen.
+takenFromOthersAccount=\u00a7c{0} wurde von {1} wurde Rechnung getragen.
+teleportAAll=\u00a77Teleportierungsanfrage zu allen Spielern gesendet...
+teleportAll=\u00a77Teleportiere alle Spieler...
+teleportAtoB=\u00a77{0}\u00a77 teleportiert dich zu {1}\u00a77.
+teleportDisabled={0} verweigert die Teleportierung.
+teleportHereRequest=\u00a7c{0}\u00a7c fragt, ob du dich zu ihm teleportierst.
+teleportNewPlayerError=Fehler beim Teleportieren eines neuen Spielers
+teleportRequest=\u00a7c{0}\u00a7c fragt, ob er sich zu dir teleportieren darf.
+teleportTop=\u00a77Teleportiere nach oben.
+teleportationCommencing=\u00a77Teleportierung gestartet...
+teleportationDisabled=\u00a77Teleportierung deaktiviert.
+teleportationEnabled=\u00a77Teleportierung aktiviert.
+teleporting=\u00a77Teleportiere...
+teleportingPortal=\u00a77Teleportiere durch Portal.
+tempBanned=Zeitlich gesperrt vom Server f\u00fcr {0}
+tempbanExempt=\u00a77Du kannst diesen Spieler nicht zeitlich sperren.
+thunder= Es donnert nun in deiner Welt {0}.
+thunderDuration=Es donnert nun f\u00fcr {1} Sekunden in deiner Welt {0}.
+timeBeforeHeal=Zeit bis zur n\u00e4chsten Heilung: {0}
+timeBeforeTeleport=Zeit bis zum n\u00e4chsten Teleport: {0}
+timeFormat=\u00a73{0}\u00a7f oder \u00a73{1}\u00a7f oder \u00a73{2}\u00a7f
+timePattern=(?:([0-9]+)\\s*[yj][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[dt][a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:h|st)[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
+timeSet=Zeit in allen Welten gesetzt.
+timeSetPermission=\u00a7cDu hast keine Berechtigung die Zeit zu \u00e4ndern.
+timeWorldCurrent=Die momentane Zeit in {0} ist \u00a73{1}
+timeWorldSet=Die Zeit in \u00a7c{1}\u00a7f wurde zu {0} gesetzt.
+tradeCompleted=\u00a77Handel abgeschlossen.
+tradeSignEmpty=Der Bestand des Trade-Schild ist aufgebraucht.
+tradeSignEmptyOwner=Es gibt nichts mehr zu Sammeln von diesem Trade-Schild.
+treeFailure=\u00a7cBaumpflanzung gescheitert. Versuche es auf Gras oder Dreck.
+treeSpawned=\u00a77Baum gepflanzt.
+true=true
+typeTpaccept=\u00a77Um zu teleportieren, schreibe \u00a7c/tpaccept\u00a77.
+typeTpdeny=\u00a77Um diese Anfrage abzulehnen, schreibe \u00a7c/tpdeny\u00a77.
+typeWorldName=\u00a77Du kannst auch den Namen der Welt eingeben.
+unableToSpawnMob=Fehler beim Erzeugen eines Monster.
+unbannedIP=Verbannung von IP-Adresse r\u00fcckg\u00e4ngig gemacht.
+unbannedPlayer=Verbannung von Spieler r\u00fcckg\u00e4ngig gemacht.
+unignorePlayer=Du ignorierst Spieler {0} nicht mehr.
+unknownItemId=Unbekannte Item-Id: {0}
+unknownItemInList=Unbekannter Gegenstand {0} in Liste {1}.
+unknownItemName=Unbekannter Gegenstand: {0}
+unlimitedItemPermission=\u00a7cDu hast keine Rechte f\u00fcr {0}.
+unlimitedItems=Unendliche Objekte:
+unmutedPlayer=Spieler {0} ist nicht mehr stumm.
+upgradingFilesError=Fehler beim Aktualisieren der Dateien
+userDoesNotExist=Spieler {0} existiert nicht.
+userIsAway={0} ist abwesend.
+userIsNotAway={0} ist wieder da.
+userJailed=\u00a77Du wurdest eingesperrt.
+userUsedPortal={0} benutzt ein vorhandenes Ausgangsportal.
+userdataMoveBackError=Verschieben von userdata/{0}.tmp nach userdata/{1} gescheitert.
+userdataMoveError=Verschieben von userdata/{0} nach userdata/{1}.tmp gescheitert.
+usingTempFolderForTesting=Benutze tempor\u00e4ren Ordner zum Testen:
+versionMismatch=Versionen nicht identisch! Bitte aktualisiere {0}.
+versionMismatchAll=Versionen ungleich! Bitte aktualisiere alle Essentials jars auf die gleiche Version.
+voiceSilenced=\u00a77Du bist stumm
+warpDeleteError=Fehler beim L\u00f6schen der Warp-Datei.
+warpListPermission=\u00a7cDu hast keine Berechtigung, die Warp-Punkte anzuzeigen.
+warpNotExist=Warp-Punkt existiert nicht.
+warpSet=\u00a77Warp-Punkt {0} wurde erstellt.
+warpUsePermission=\u00a7cDu hast keinen Zugriff f\u00fcr diesen Warp-Punkt.
+warpingTo=\u00a77Teleportiere zu Warp-Punkt {0}.
+warps=Warps: {0}
+warpsCount=\u00a77Es gibt {0} Warp-Punkte. Zeige Seite {1} von {2}.
+weatherStorm=\u00a77In {0} st\u00fcrmt es nun.
+weatherStormFor=\u00a77In {0} st\u00fcrmt es nun f\u00fcr {1} Sekunden.
+weatherSun=\u00a77In {0} scheint nun die Sonne.
+weatherSunFor=\u00a77In {0} scheint nun f\u00fcr {1} Sekunden die Sonne.
+whoisGamemode=\u00a79 - Gamemode: {0}
+whoisGeoLocation=\u00a79 - Herkunft: {0}
+whoisGod=\u00a79 - God mode: {0}
+whoisHealth=\u00a79 - Gesundheit: {0}/20
+whoisIPAddress=\u00a79 - IP-Adresse: {0}
+whoisIs={0} ist {1}
+whoisLocation=\u00a79 - Position: ({0}, {1}, {2}, {3})
+whoisMoney=\u00a79 - Geldb\u00f6rse: {0}
+whoisOP=\u00a79 - OP: {0}
+whoisStatusAvailable=\u00a79 - Status: Anwesend
+whoisStatusAway=\u00a79 - Status: \u00a7cAbwesend\u00a7f
+worth=\u00a77Ein Stapel von {0} ist \u00a7c{1}\u00a77 wert ({2} Einheiten je {3})
+worthMeta=\u00a77Ein Stapel von {0} mit Metadaten {1} ist \u00a7c{2}\u00a77 wert. ({3} Einheiten je {4})
+worthSet=Wert des Gegenstands gesetzt.
+year=Jahr
+years=Jahre
+youAreHealed=\u00a77Du wurdest geheilt.
+youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen.
diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties
index e4d40adf2..8843cf194 100644
--- a/Essentials/src/messages_en.properties
+++ b/Essentials/src/messages_en.properties
@@ -2,369 +2,378 @@
# Single quotes have to be doubled: ''
# Translations start here
# by:
-action = * {0} {1}
-addedToAccount = \u00a7a{0} has been added to your account.
-addedToOthersAccount = \u00a7a{0} has been added to {1} account.
-alertBroke = broke:
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
-alertPlaced = placed:
-alertUsed = used:
+action=* {0} {1}
+addedToAccount=\u00a7a{0} has been added to your account.
+addedToOthersAccount=\u00a7a{0} has been added to {1} account.
+alertBroke=broke:
+alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
+alertPlaced=placed:
+alertUsed=used:
autoAfkKickReason=You have been kicked for idling more than {0} minutes.
-backAfterDeath = \u00a77Use the /back command to return to your death point.
-backUsageMsg = \u00a77Returning to previous location.
-backupFinished = Backup finished
-backupStarted = Backup started
-balance = \u00a77Balance: {0}
-balanceTop = \u00a77 Top {0} balances
-banExempt = \u00a7cYou can not ban that player.
-banIpAddress = \u00a77Banned IP address
-bannedIpsFileError = Error reading banned-ips.txt
-bannedIpsFileNotFound = banned-ips.txt not found
-bannedPlayersFileError = Error reading banned-players.txt
-bannedPlayersFileNotFound = banned-players.txt not found
-bigTreeFailure = \u00a7cBig tree generation failure. Try again on grass or dirt.
-bigTreeSuccess = \u00a77Big tree spawned.
-broadcast = [\u00a7cBroadcast\u00a7f]\u00a7a {0}
-buildAlert = \u00a7cYou are not permitted to build
-bukkitFormatChanged = Bukkit version format changed. Version not checked.
-burnMsg = \u00a77You set {0} on fire for {1} seconds.
-canTalkAgain = \u00a77You can talk again
-cantFindGeoIpDB = Can''t find GeoIP database!
-cantReadGeoIpDB = Failed to read GeoIP database!
-cantSpawnItem = \u00a7cYou are not allowed to spawn the item {0}
-commandFailed = Command {0} failed:
-commandHelpFailedForPlugin=Error getting help for: {0}
-commandNotLoaded = \u00a7cCommand {0} is improperly loaded.
-compassBearing = \u00a77Bearing: {0} ({1} degrees).
-configFileMoveError = Failed to move config.yml to backup location.
-configFileRenameError = Failed to rename temp file to config.yml
-connectedPlayers = Connected players:
-connectionFailed = Failed to open connection.
-cooldownWithMessage = \u00a7cCooldown: {0}
-corruptNodeInConfig = \u00a74Notice: Your configuration file has a corrupt {0} node.
-couldNotFindTemplate = Could not find template {0}
-creatingConfigFromTemplate = Creating config from template: {0}
-creatingEmptyConfig = Creating empty config: {0}
-day = day
-days = days
-defaultBanReason = The Ban Hammer has spoken!
-deleteFileError = Could not delete file: {0}
-deleteHome = \u00a77Home {0} has been removed.
-deleteJail = \u00a77Jail {0} has been removed.
-deleteWarp = \u00a77Warp {0} has been removed.
-deniedAccessCommand = {0} was denied access to command.
-dependancyDownloaded = [Essentials] Dependancy {0} downloaded successfully.
-dependancyException = [Essentials] An error occurred when trying to download a dependacy
-dependancyNotFound = [Essentials] A required dependancy was not found, downloading now.
-depth = \u00a77You are at sea level.
-depthAboveSea = \u00a77You are {0} block(s) above sea level.
-depthBelowSea = \u00a77You are {0} block(s) below sea level.
-destinationNotSet = Destination not set
-disableUnlimited = \u00a77Disabled unlimited placing of {0} for {1}.
-disabled = disabled
-dontMoveMessage = \u00a77Teleportation will commence in {0}. Don''t move.
-downloadingGeoIp = Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB)
-duplicatedUserdata = Duplicated userdata: {0} and {1}
-enableUnlimited = \u00a77Giving unlimited amount of {0} to {1}.
-enabled = enabled
-errorCallingCommand = Error calling command /{0}
-errorWithMessage = \u00a7cError: {0}
-essentialsReload = \u00a77Essentials Reloaded {0}
-extinguish = \u00a77You extinguished yourself.
-extinguishOthers = \u00a77You extinguished {0}.
-failedToCloseConfig = Failed to close config {0}
-failedToCreateConfig = Failed to create config {0}
-failedToWriteConfig = Failed to write config {0}
-fileRenameError = Renaming file {0} failed
-foreverAlone = \u00a7cYou have nobody to whom you can reply.
-freedMemory = Freed {0} MB.
-gcchunks = chunks,
-gcentities = entities
-gcfree = Free memory: {0} MB
-gcmax = Maximum memory: {0} MB
-gctotal = Allocated memory: {0} MB
-geoIpUrlEmpty = GeoIP download url is empty.
-geoIpUrlInvalid = GeoIP download url is invalid.
-geoipJoinFormat = Player {0} comes from {1}
-godDisabledFor = disabled for {0}
-godEnabledFor = enabled for {0}
-godMode = \u00a77God mode {0}.
-haveBeenReleased = \u00a77You have been released
-heal = \u00a77You have been healed.
-healOther = \u00a77Healed {0}.
-helpConsole = To view help from the console, type ?.
-helpOp = \u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
-helpPages = Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
-holeInFloor = Hole in floor
-homeSet = \u00a77Home set.
-homeSetToBed = \u00a77Your home is now set to this bed.
-homes = Homes: {0}
-hour = hour
-hours = hours
-ignorePlayer = You ignore player {0} from now on.
-illegalDate = Illegal date format.
-infoChapter = Select chapter:
-infoChapterPages = Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f:
-infoFileDoesNotExist = File info.txt does not exist. Creating one for you.
-infoPages = Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
-infoUnknownChapter = Unknown chapter.
-invBigger = The other users inventory is bigger than yours.
-invRestored = Your inventory has been restored.
-invSee = You see the inventory of {0}.
-invSeeHelp = Use /invsee to restore your inventory.
-invalidCharge = \u00a7cInvalid charge.
-invalidMob = Invalid mob type.
-invalidServer = Invalid server!
-invalidSignLine = Line {0} on sign is invalid.
-invalidWorld = \u00a7cInvalid world.
-inventoryCleared = \u00a77Inventory Cleared.
-inventoryClearedOthers = \u00a77Inventory of \u00a7c{0}\u00a77 cleared.
-is = is
-itemCannotBeSold = That item cannot be sold to the server.
-itemMustBeStacked = Item must be traded in stacks. A quantity of 2s would be two stacks, etc.
-itemNotEnough1 = \u00a7cYou do not have enough of that item to sell.
-itemNotEnough2 = \u00a77If you meant to sell all of your items of that type, use /sell itemname
-itemNotEnough3 = \u00a77/sell itemname -1 will sell all but one item, etc.
-itemSellAir = You really tried to sell Air? Put an item in your hand.
-itemSold = \u00a77Sold for \u00a7c{0} \u00a77({1} {2} at {3} each)
-itemSoldConsole = {0} sold {1} for \u00a77{2} \u00a77({3} items at {4} each)
-itemSpawn = \u00a77Giving {0} of {1}
-itemsCsvNotLoaded = Could not load items.csv.
-jailAlreadyIncarcerated = \u00a7cPerson is already in jail: {0}
-jailMessage = \u00a7cYou do the crime, you do the time.
-jailNotExist = That jail does not exist.
-jailReleased = \u00a77Player \u00a7e{0}\u00a77 unjailed.
-jailReleasedPlayerNotify = \u00a77You have been released!
-jailSentenceExtended = Jail time extend to: {0)
-jailSet = \u00a77Jail {0} has been set
-jumpError = That would hurt your computer''s brain.
-kickDefault = Kicked from server
-kickExempt = \u00a7cYou can not kick that person.
-kill = \u00a77Killed {0}.
-kitError = \u00a7cThere are no valid kits.
-kitError2 = \u00a7cThat kit does not exist or is improperly defined.
-kitErrorHelp = \u00a7cPerhaps an item is missing a quantity in the configuration?
-kitGive = \u00a77Giving kit {0}.
-kitInvFull = \u00a7cYour inventory was full, placing kit on the floor
-kitTimed = \u00a7cYou can''t use that kit again for another {0}.
-kits = \u00a77Kits: {0}
-lightningSmited = \u00a77You have just been smited
-lightningUse = \u00a77Smiting {0}
-loadWarpError = Failed to load warp {0}
-loadinfo = Loaded {0} build {1} by: {2}
-localFormat = Local: <{0}> {1}
-mailClear = \u00a7cTo mark your mail as read, type /mail clear
-mailCleared = \u00a77Mail Cleared!
-mailSent = \u00a77Mail sent!
-markMailAsRead = \u00a7cTo mark your mail as read, type /mail clear
-markedAsAway = \u00a77You are now marked as away.
-markedAsNotAway = \u00a77You are no longer marked as away.
+backAfterDeath=\u00a77Use the /back command to return to your death point.
+backUsageMsg=\u00a77Returning to previous location.
+backupFinished=Backup finished
+backupStarted=Backup started
+balance=\u00a77Balance: {0}
+balanceTop=\u00a77 Top {0} balances
+banExempt=\u00a7cYou can not ban that player.
+banIpAddress=\u00a77Banned IP address
+bannedIpsFileError=Error reading banned-ips.txt
+bannedIpsFileNotFound=banned-ips.txt not found
+bannedPlayersFileError=Error reading banned-players.txt
+bannedPlayersFileNotFound=banned-players.txt not found
+bigTreeFailure=\u00a7cBig tree generation failure. Try again on grass or dirt.
+bigTreeSuccess= \u00a77Big tree spawned.
+broadcast=[\u00a7cBroadcast\u00a7f]\u00a7a {0}
+buildAlert=\u00a7cYou are not permitted to build
+bukkitFormatChanged=Bukkit version format changed. Version not checked.
+burnMsg=\u00a77You set {0} on fire for {1} seconds.
+canTalkAgain=\u00a77You can talk again
+cantFindGeoIpDB=Can''t find GeoIP database!
+cantReadGeoIpDB=Failed to read GeoIP database!
+cantSpawnItem=\u00a7cYou are not allowed to spawn the item {0}
+commandFailed=Command {0} failed:
+commandHelpFailedForPlugin=Error getting help for: {0}
+commandNotLoaded=\u00a7cCommand {0} is improperly loaded.
+compassBearing=\u00a77Bearing: {0} ({1} degrees).
+configFileMoveError=Failed to move config.yml to backup location.
+configFileRenameError=Failed to rename temp file to config.yml
+connectedPlayers=Connected players:
+connectionFailed=Failed to open connection.
+cooldownWithMessage=\u00a7cCooldown: {0}
+corruptNodeInConfig=\u00a74Notice: Your configuration file has a corrupt {0} node.
+couldNotFindTemplate=Could not find template {0}
+creatingConfigFromTemplate=Creating config from template: {0}
+creatingEmptyConfig=Creating empty config: {0}
+creative=creative
+day=day
+days=days
+defaultBanReason=The Ban Hammer has spoken!
+deleteFileError=Could not delete file: {0}
+deleteHome=\u00a77Home {0} has been removed.
+deleteJail=\u00a77Jail {0} has been removed.
+deleteWarp=\u00a77Warp {0} has been removed.
+deniedAccessCommand={0} was denied access to command.
+dependancyDownloaded=[Essentials] Dependancy {0} downloaded successfully.
+dependancyException=[Essentials] An error occurred when trying to download a dependacy
+dependancyNotFound=[Essentials] A required dependancy was not found, downloading now.
+depth=\u00a77You are at sea level.
+depthAboveSea=\u00a77You are {0} block(s) above sea level.
+depthBelowSea=\u00a77You are {0} block(s) below sea level.
+destinationNotSet=Destination not set
+disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}.
+disabled=disabled
+dontMoveMessage=\u00a77Teleportation will commence in {0}. Don''t move.
+downloadingGeoIp=Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB)
+duplicatedUserdata=Duplicated userdata: {0} and {1}
+enableUnlimited=\u00a77Giving unlimited amount of {0} to {1}.
+enabled=enabled
+errorCallingCommand=Error calling command /{0}
+errorWithMessage=\u00a7cError: {0}
+essentialsReload=\u00a77Essentials Reloaded {0}
+extinguish=\u00a77You extinguished yourself.
+extinguishOthers=\u00a77You extinguished {0}.
+failedToCloseConfig=Failed to close config {0}
+failedToCreateConfig=Failed to create config {0}
+failedToWriteConfig=Failed to write config {0}
+false=false
+fileRenameError=Renaming file {0} failed
+foreverAlone=\u00a7cYou have nobody to whom you can reply.
+freedMemory=Freed {0} MB.
+gameMode=\u00a77Set game mode {0} for {1}.
+gcchunks= chunks,
+gcentities= entities
+gcfree=Free memory: {0} MB
+gcmax=Maximum memory: {0} MB
+gctotal=Allocated memory: {0} MB
+geoIpUrlEmpty=GeoIP download url is empty.
+geoIpUrlInvalid=GeoIP download url is invalid.
+geoipJoinFormat=Player {0} comes from {1}
+godDisabledFor=disabled for {0}
+godEnabledFor=enabled for {0}
+godMode=\u00a77God mode {0}.
+haveBeenReleased=\u00a77You have been released
+heal=\u00a77You have been healed.
+healOther=\u00a77Healed {0}.
+helpConsole=To view help from the console, type ?.
+helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
+helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
+holeInFloor=Hole in floor
+homeSet=\u00a77Home set.
+homeSetToBed=\u00a77Your home is now set to this bed.
+homes=Homes: {0}
+hour=hour
+hours=hours
+ignorePlayer=You ignore player {0} from now on.
+illegalDate=Illegal date format.
+infoChapter=Select chapter:
+infoChapterPages=Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f:
+infoFileDoesNotExist=File info.txt does not exist. Creating one for you.
+infoPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
+infoUnknownChapter=Unknown chapter.
+invBigger=The other users inventory is bigger than yours.
+invRestored=Your inventory has been restored.
+invSee=You see the inventory of {0}.
+invSeeHelp=Use /invsee to restore your inventory.
+invalidCharge=\u00a7cInvalid charge.
+invalidMob=Invalid mob type.
+invalidServer=Invalid server!
+invalidSignLine=Line {0} on sign is invalid.
+invalidWorld=\u00a7cInvalid world.
+inventoryCleared=\u00a77Inventory Cleared.
+inventoryClearedOthers=\u00a77Inventory of \u00a7c{0}\u00a77 cleared.
+is=is
+itemCannotBeSold=That item cannot be sold to the server.
+itemMustBeStacked=Item must be traded in stacks. A quantity of 2s would be two stacks, etc.
+itemNotEnough1=\u00a7cYou do not have enough of that item to sell.
+itemNotEnough2=\u00a77If you meant to sell all of your items of that type, use /sell itemname
+itemNotEnough3=\u00a77/sell itemname -1 will sell all but one item, etc.
+itemSellAir=You really tried to sell Air? Put an item in your hand.
+itemSold=\u00a77Sold for \u00a7c{0} \u00a77({1} {2} at {3} each)
+itemSoldConsole={0} sold {1} for \u00a77{2} \u00a77({3} items at {4} each)
+itemSpawn=\u00a77Giving {0} of {1}
+itemsCsvNotLoaded=Could not load items.csv.
+jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0}
+jailMessage=\u00a7cYou do the crime, you do the time.
+jailNotExist=That jail does not exist.
+jailReleased=\u00a77Player \u00a7e{0}\u00a77 unjailed.
+jailReleasedPlayerNotify=\u00a77You have been released!
+jailSentenceExtended=Jail time extend to: {0)
+jailSet=\u00a77Jail {0} has been set
+jumpError=That would hurt your computer''s brain.
+kickDefault=Kicked from server
+kickExempt=\u00a7cYou can not kick that person.
+kill=\u00a77Killed {0}.
+kitError=\u00a7cThere are no valid kits.
+kitError2=\u00a7cThat kit does not exist or is improperly defined.
+kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration?
+kitGive=\u00a77Giving kit {0}.
+kitInvFull=\u00a7cYour inventory was full, placing kit on the floor
+kitTimed=\u00a7cYou can''t use that kit again for another {0}.
+kits=\u00a77Kits: {0}
+lightningSmited=\u00a77You have just been smited
+lightningUse=\u00a77Smiting {0}
+loadWarpError=Failed to load warp {0}
+loadinfo=Loaded {0} build {1} by: {2}
+localFormat=Local: <{0}> {1}
+mailClear=\u00a7cTo mark your mail as read, type /mail clear
+mailCleared=\u00a77Mail Cleared!
+mailSent=\u00a77Mail sent!
+markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear
+markedAsAway=\u00a77You are now marked as away.
+markedAsNotAway=\u00a77You are no longer marked as away.
maxHomes=You cannot set more than {0} homes.
-mayNotJail = \u00a7cYou may not jail that person
-me = me
-minute = minute
-minutes = minutes
-missingItems = You do not have {0}x {1}.
-missingPrefixSuffix = Missing a prefix or suffix for {0}
-mobSpawnError = Error while changing mob spawner.
-mobSpawnLimit = Mob quantity limited to server limit
-mobSpawnTarget = Target block must be a mob spawner.
-moneyRecievedFrom = \u00a7a{0} has been received from {1}
-moneySentTo = \u00a7a{0} has been sent to {1}
-moneyTaken = {0} taken from your bank account.
-month = month
-months = months
-moreThanZero = Quantities must be greater than 0.
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-muteExempt = \u00a7cYou may not mute that player.
-mutedPlayer = Player {0} muted.
-mutedPlayerFor = Player {0} muted for {1}.
-mutedUserSpeaks = {0} tried to speak, but is muted.
-needTpohere = You need access to /tpohere to teleport other players.
-negativeBalanceError = User is not allowed to have a negative balance.
-nickChanged = Nickname changed.
+mayNotJail=\u00a7cYou may not jail that person
+me=me
+minute=minute
+minutes=minutes
+missingItems=You do not have {0}x {1}.
+missingPrefixSuffix=Missing a prefix or suffix for {0}
+mobSpawnError=Error while changing mob spawner.
+mobSpawnLimit=Mob quantity limited to server limit
+mobSpawnTarget=Target block must be a mob spawner.
+mobsAvailable=\u00a77Mobs: {0}
+moneyRecievedFrom=\u00a7a{0} has been received from {1}
+moneySentTo=\u00a7a{0} has been sent to {1}
+moneyTaken={0} taken from your bank account.
+month=month
+months=months
+moreThanZero=Quantities must be greater than 0.
+msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
+muteExempt=\u00a7cYou may not mute that player.
+mutedPlayer=Player {0} muted.
+mutedPlayerFor=Player {0} muted for {1}.
+mutedUserSpeaks={0} tried to speak, but is muted.
+needTpohere=You need access to /tpohere to teleport other players.
+negativeBalanceError=User is not allowed to have a negative balance.
+nickChanged=Nickname changed.
nickDisplayName=\u00a77You have to enable change-displayname in Essentials config.
-nickInUse = \u00a7cThat name is already in use.
-nickNamesAlpha = \u00a7cNicknames must be alphanumeric.
-nickNoMore = \u00a77You no longer have a nickname.
-nickOthersPermission = \u00a7cYou do not have permission to change the nickname of others
-nickSet = \u00a77Your nickname is now \u00a7c{0}
-noAccessCommand = \u00a7cYou do not have access to that command.
-noAccessPermission = \u00a7cYou do not have permission to access that {0}.
-noDestroyPermission = \u00a7cYou do not have permission to destroy that {0}.
-noHelpFound = \u00a7cNo matching commands.
-noHomeSet = You have not set a home.
-noHomeSetPlayer = Player has not set a home.
-noKitPermission = \u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit.
-noKits = \u00a77There are no kits available yet
-noMail = You do not have any mail
-noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
-noMotd = \u00a7cThere is no message of the day.
-noNewMail = \u00a77You have no new mail.
-noPendingRequest = You do not have a pending request.
-noPlacePermission = \u00a7cYou do not have permission to place a block near that sign.
+nickInUse=\u00a7cThat name is already in use.
+nickNamesAlpha=\u00a7cNicknames must be alphanumeric.
+nickNoMore=\u00a77You no longer have a nickname.
+nickOthersPermission=\u00a7cYou do not have permission to change the nickname of others
+nickSet=\u00a77Your nickname is now \u00a7c{0}
+noAccessCommand=\u00a7cYou do not have access to that command.
+noAccessPermission=\u00a7cYou do not have permission to access that {0}.
+noDestroyPermission=\u00a7cYou do not have permission to destroy that {0}.
+noGodWorldWarning=\u00a7cWarning! God mode in this world disabled.
+noHelpFound=\u00a7cNo matching commands.
+noHomeSet=You have not set a home.
+noHomeSetPlayer=Player has not set a home.
+noKitPermission=\u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit.
+noKits=\u00a77There are no kits available yet
+noMail=You do not have any mail
+noMailSendPerm=\u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
+noMotd=\u00a7cThere is no message of the day.
+noNewMail=\u00a77You have no new mail.
+noPendingRequest=You do not have a pending request.
+noPlacePermission=\u00a7cYou do not have permission to place a block near that sign.
noPowerTools=You have no power tools assigned.
-noRules = \u00a7cThere are no rules specified yet.
-noWarpsDefined = No warps defined
-none = none
-notAllowedToQuestion = \u00a7cYou are not authorized to use question.
-notAllowedToShout = \u00a7cYou are not authorized to shout.
-notEnoughMoney = You do not have sufficient funds.
-notRecommendedBukkit = Bukkit version is not the recommended build for Essentials.
-notSupportedYet = Not supported yet.
-now = now
-numberRequired = A number goes there, silly.
-onlyDayNight = /time only supports day/night.
-onlyPlayers = Only in-game players can use {0}.
-onlySunStorm = /weather only supports sun/storm.
-pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
-pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
-pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
-pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
-pTimePlayers = These players have their own time:
-pTimeReset = Player time has been reset for: \u00a7e{0}
-pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
-pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
-parseError = Error parsing {0} on line {1}
-pendingTeleportCancelled = \u00a7cPending teleportation request cancelled.
-permissionsError = Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
-playerBanned = \u00a7cPlayer {0} banned {1} for {2}
-playerInJail = \u00a7cPlayer is already in jail {0}.
-playerJailed = \u00a77Player {0} jailed.
-playerJailedFor = \u00a77Player {0} jailed for {1}.
-playerKicked = \u00a7cPlayer {0} kicked {1} for {2}
-playerMuted = \u00a77You have been muted
-playerMutedFor = \u00a77You have been muted for {0}
-playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
-playerNotFound = \u00a7cPlayer not found.
-playerUnmuted = \u00a77You have been unmuted
-pong = Pong!
-possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
-powerToolAir = Command can''t be attached to air.
-powerToolAlreadySet = Command \u00a7c{0}\u00a7f is already assigned to {1}.
-powerToolAttach = \u00a7c{0}\u00a7f command assigned to {1}.
-powerToolClearAll = All powertool commands have been cleared.
-powerToolList = {1} has the following commands: \u00a7c{0}\u00a7f.
-powerToolListEmpty = {0} has no commands assigned.
-powerToolNoSuchCommandAssigned = Command \u00a7c{0}\u00a7f has not been assigned to {1}.
-powerToolRemove = Command \u00a7c{0}\u00a7f removed from {1}.
-powerToolRemoveAll = All commands removed from {0}.
-powerToolsEnabled=All of your power tools have been enabled.
+noRules=\u00a7cThere are no rules specified yet.
+noWarpsDefined=No warps defined
+none=none
+notAllowedToQuestion=\u00a7cYou are not authorized to use question.
+notAllowedToShout=\u00a7cYou are not authorized to shout.
+notEnoughMoney=You do not have sufficient funds.
+notRecommendedBukkit=Bukkit version is not the recommended build for Essentials.
+notSupportedYet=Not supported yet.
+now=now
+numberRequired=A number goes there, silly.
+onlyDayNight=/time only supports day/night.
+onlyPlayers=Only in-game players can use {0}.
+onlySunStorm=/weather only supports sun/storm.
+pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
+pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
+pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
+pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time.
+pTimePlayers=These players have their own time:
+pTimeReset=Player time has been reset for: \u00a7e{0}
+pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
+pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
+parseError=Error parsing {0} on line {1}
+pendingTeleportCancelled=\u00a7cPending teleportation request cancelled.
+permissionsError=Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
+playerBanned=\u00a7cPlayer {0} banned {1} for {2}
+playerInJail=\u00a7cPlayer is already in jail {0}.
+playerJailed=\u00a77Player {0} jailed.
+playerJailedFor= \u00a77Player {0} jailed for {1}.
+playerKicked=\u00a7cPlayer {0} kicked {1} for {2}
+playerMuted=\u00a77You have been muted
+playerMutedFor=\u00a77You have been muted for {0}
+playerNeverOnServer=\u00a7cPlayer {0} was never on this server.
+playerNotFound=\u00a7cPlayer not found.
+playerUnmuted=\u00a77You have been unmuted
+pong=Pong!
+possibleWorlds=\u00a77Possible worlds are the numbers 0 through {0}.
+powerToolAir=Command can''t be attached to air.
+powerToolAlreadySet=Command \u00a7c{0}\u00a7f is already assigned to {1}.
+powerToolAttach=\u00a7c{0}\u00a7f command assigned to {1}.
+powerToolClearAll=All powertool commands have been cleared.
+powerToolList={1} has the following commands: \u00a7c{0}\u00a7f.
+powerToolListEmpty={0} has no commands assigned.
+powerToolNoSuchCommandAssigned=Command \u00a7c{0}\u00a7f has not been assigned to {1}.
+powerToolRemove=Command \u00a7c{0}\u00a7f removed from {1}.
+powerToolRemoveAll=All commands removed from {0}.
powerToolsDisabled=All of your power tools have been enabled.
-protectionOwner = \u00a76[EssentialsProtect] Protection owner: {0}
-questionFormat = \u00a77[Question]\u00a7f {0}
-reloadAllPlugins = \u00a77Reloaded all plugins.
-repair = You have successfully repaired your: \u00a7e{0}.
-repairAlreadyFixed = \u00a77This item does not need repairing.
-repairInvalidType = \u00a7cThis item cannot be repaired.
-repairNone = There were no items that needing repairing.
-requestAccepted = \u00a77Teleport request accepted.
-requestAcceptedFrom = \u00a77{0} accepted your teleport request.
-requestDenied = \u00a77Teleport request denied.
-requestDeniedFrom = \u00a77{0} denied your teleport request
-requestSent = \u00a77Request sent to {0}\u00a77.
-returnPlayerToJailError = Error occurred when trying to return player to jail.
-second = second
-seconds = seconds
-seenOffline = Player {0} is offline since {1}
-seenOnline = Player {0} is online since {1}
-serverFull = Server is full
-setSpawner = Changed spawner type to {0}
-sheepMalformedColor = Malformed color.
-shoutFormat = \u00a77[Shout]\u00a7f {0}
-signFormatFail = \u00a74[{0}]
-signFormatSuccess = \u00a71[{0}]
-signFormatTemplate = [{0}]
-signProtectInvalidLocation = \u00a74You are not allowed to create sign here.
-similarWarpExist = A warp with a similar name already exists.
-slimeMalformedSize = Malformed size.
-soloMob = That mob likes to be alone
-spawnSet = \u00a77Spawn location set for group {0}.
-spawned = spawned
-suicideMessage = \u00a77Goodbye Cruel World...
-suicideSuccess = \u00a77{0} took their own life
-takenFromAccount = \u00a7c{0} has been taken from your account.
-takenFromOthersAccount = \u00a7c{0} has been taken from {1} account.
-teleportAAll = \u00a77Teleporting request sent to all players...
-teleportAll = \u00a77Teleporting all players...
-teleportAtoB = \u00a77{0}\u00a77 teleported you to {1}\u00a77.
-teleportDisabled = {0} has teleportation disabled.
-teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to them.
-teleportNewPlayerError = Failed to teleport new player
-teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
-teleportTop = \u00a77Teleporting to top.
-teleportationCommencing = \u00a77Teleportation commencing...
-teleportationDisabled = \u00a77Teleportation disabled.
-teleportationEnabled = \u00a77Teleportation enabled.
-teleporting = \u00a77Teleporting...
-teleportingPortal = \u00a77Teleporting via portal.
-tempBanned = Temporarily banned from server for {0}
-tempbanExempt = \u00a77You may not tempban that player
-thunder = You {0} thunder in your world
-thunderDuration = You {0} thunder in your world for {1} seconds.
-timeBeforeHeal = Time before next heal: {0}
-timeBeforeTeleport = Time before next teleport: {0}
-timeFormat = \u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
-timePattern = (?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-timeSet = Time set in all worlds.
-timeSetPermission = \u00a7cYou are not authorized to set the time.
-timeWorldCurrent = The current time in {0} is \u00a73{1}
-timeWorldSet = The time was set to {0} in: \u00a7c{1}
-tradeCompleted = \u00a77Trade completed.
-tradeSignEmpty = The trade sign does not have enough supply left.
-tradeSignEmptyOwner = There is nothing to collect from this trade sign.
-treeFailure = \u00a7cTree generation failure. Try again on grass or dirt.
-treeSpawned = \u00a77Tree spawned.
-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.
-unableToSpawnMob = Unable to spawn mob.
-unbannedIP = Unbanned IP address.
-unbannedPlayer = Unbanned player.
-unignorePlayer = You are not ignoring player {0} anymore.
-unknownItemId = Unknown item id: {0}
-unknownItemInList = Unknown item {0} in {1} list.
-unknownItemName = Unknown item name: {0}
-unlimitedItemPermission = \u00a7cNo permission for unlimited item {0}.
-unlimitedItems = Unlimited items:
-unmutedPlayer = Player {0} unmuted.
-upgradingFilesError = Error while upgrading the files
-userDoesNotExist = The user {0} does not exist.
-userIsAway = {0} is now AFK
-userIsNotAway = {0} is no longer AFK
-userJailed = \u00a77You have been jailed
-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:
-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
-warpDeleteError = Problem deleting the warp file.
-warpListPermission = \u00a7cYou do not have Permission to list that warps.
-warpNotExist = That warp does not exist.
-warpSet = \u00a77Warp {0} set.
-warpUsePermission = \u00a7cYou do not have Permission to use that warp.
-warpingTo = \u00a77Warping to {0}.
-warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
-weatherStorm = \u00a77You set the weather to storm in {0}
-weatherStormFor = \u00a77You set the weather to storm in {0} for {1} seconds
-weatherSun = \u00a77You set the weather to sun in {0}
-weatherSunFor = \u00a77You set the weather to sun in {0} for {1} seconds
-whoisGeoLocation = \u00a79 - Location: {0}
-whoisHealth = \u00a79 - Health: {0}/20
-whoisIPAddress = \u00a79 - IP Address: {0}
-whoisIs = {0} is {1}
-whoisLocation = \u00a79 - Location: ({0}, {1}, {2}, {3})
-whoisMoney = \u00a79 - Money: {0}
-whoisStatusAvailable = \u00a79 - Status: Available
-whoisStatusAway = \u00a79 - Status: \u00a7cAway\u00a7f
-worth = \u00a77Stack of {0} worth \u00a7c{1}\u00a77 ({2} item(s) at {3} each)
-worthMeta = \u00a77Stack of {0} with metadata of {1} worth \u00a7c{2}\u00a77 ({3} item(s) at {4} each)
-worthSet = Worth value set
-year = year
-years = years
-youAreHealed = \u00a77You have been healed.
-youHaveNewMail = \u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
-
-
+powerToolsEnabled=All of your power tools have been enabled.
+protectionOwner=\u00a76[EssentialsProtect] Protection owner: {0}
+questionFormat=\u00a77[Question]\u00a7f {0}
+reloadAllPlugins=\u00a77Reloaded all plugins.
+repair=You have successfully repaired your: \u00a7e{0}.
+repairAlreadyFixed=\u00a77This item does not need repairing.
+repairInvalidType=\u00a7cThis item cannot be repaired.
+repairNone=There were no items that needing repairing.
+requestAccepted=\u00a77Teleport request accepted.
+requestAcceptedFrom=\u00a77{0} accepted your teleport request.
+requestDenied=\u00a77Teleport request denied.
+requestDeniedFrom=\u00a77{0} denied your teleport request
+requestSent=\u00a77Request sent to {0}\u00a77.
+returnPlayerToJailError=Error occurred when trying to return player to jail.
+second=second
+seconds=seconds
+seenOffline=Player {0} is offline since {1}
+seenOnline=Player {0} is online since {1}
+serverFull=Server is full
+setSpawner=Changed spawner type to {0}
+sheepMalformedColor=Malformed color.
+shoutFormat=\u00a77[Shout]\u00a7f {0}
+signFormatFail=\u00a74[{0}]
+signFormatSuccess=\u00a71[{0}]
+signFormatTemplate=[{0}]
+signProtectInvalidLocation=\u00a74You are not allowed to create sign here.
+similarWarpExist=A warp with a similar name already exists.
+slimeMalformedSize=Malformed size.
+soloMob=That mob likes to be alone
+spawnSet=\u00a77Spawn location set for group {0}.
+spawned=spawned
+suicideMessage=\u00a77Goodbye Cruel World...
+suicideSuccess= \u00a77{0} took their own life
+survival=survival
+takenFromAccount=\u00a7c{0} has been taken from your account.
+takenFromOthersAccount=\u00a7c{0} has been taken from {1} account.
+teleportAAll=\u00a77Teleporting request sent to all players...
+teleportAll=\u00a77Teleporting all players...
+teleportAtoB=\u00a77{0}\u00a77 teleported you to {1}\u00a77.
+teleportDisabled={0} has teleportation disabled.
+teleportHereRequest=\u00a7c{0}\u00a7c has requested that you teleport to them.
+teleportNewPlayerError=Failed to teleport new player
+teleportRequest=\u00a7c{0}\u00a7c has requested to teleport to you.
+teleportTop=\u00a77Teleporting to top.
+teleportationCommencing=\u00a77Teleportation commencing...
+teleportationDisabled=\u00a77Teleportation disabled.
+teleportationEnabled=\u00a77Teleportation enabled.
+teleporting=\u00a77Teleporting...
+teleportingPortal=\u00a77Teleporting via portal.
+tempBanned=Temporarily banned from server for {0}
+tempbanExempt=\u00a77You may not tempban that player
+thunder= You {0} thunder in your world
+thunderDuration=You {0} thunder in your world for {1} seconds.
+timeBeforeHeal=Time before next heal: {0}
+timeBeforeTeleport=Time before next teleport: {0}
+timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
+timePattern=(?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
+timeSet=Time set in all worlds.
+timeSetPermission=\u00a7cYou are not authorized to set the time.
+timeWorldCurrent=The current time in {0} is \u00a73{1}
+timeWorldSet=The time was set to {0} in: \u00a7c{1}
+tradeCompleted=\u00a77Trade completed.
+tradeSignEmpty=The trade sign does not have enough supply left.
+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
+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.
+unableToSpawnMob=Unable to spawn mob.
+unbannedIP=Unbanned IP address.
+unbannedPlayer=Unbanned player.
+unignorePlayer=You are not ignoring player {0} anymore.
+unknownItemId=Unknown item id: {0}
+unknownItemInList=Unknown item {0} in {1} list.
+unknownItemName=Unknown item name: {0}
+unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}.
+unlimitedItems=Unlimited items:
+unmutedPlayer=Player {0} unmuted.
+upgradingFilesError=Error while upgrading the files
+userDoesNotExist=The user {0} does not exist.
+userIsAway={0} is now AFK
+userIsNotAway={0} is no longer AFK
+userJailed=\u00a77You have been jailed
+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:
+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
+warpDeleteError=Problem deleting the warp file.
+warpListPermission=\u00a7cYou do not have Permission to list that warps.
+warpNotExist=That warp does not exist.
+warpSet=\u00a77Warp {0} set.
+warpUsePermission=\u00a7cYou do not have Permission to use that warp.
+warpingTo=\u00a77Warping to {0}.
+warps=Warps: {0}
+warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}.
+weatherStorm=\u00a77You set the weather to storm in {0}
+weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds
+weatherSun=\u00a77You set the weather to sun in {0}
+weatherSunFor=\u00a77You set the weather to sun in {0} for {1} seconds
+whoisGamemode=\u00a79 - Gamemode: {0}
+whoisGeoLocation=\u00a79 - Location: {0}
+whoisGod=\u00a79 - God mode: {0}
+whoisHealth=\u00a79 - Health: {0}/20
+whoisIPAddress=\u00a79 - IP Address: {0}
+whoisIs={0} is {1}
+whoisLocation=\u00a79 - Location: ({0}, {1}, {2}, {3})
+whoisMoney=\u00a79 - Money: {0}
+whoisOP=\u00a79 - OP: {0}
+whoisStatusAvailable=\u00a79 - Status: Available
+whoisStatusAway=\u00a79 - Status: \u00a7cAway\u00a7f
+worth=\u00a77Stack of {0} worth \u00a7c{1}\u00a77 ({2} item(s) at {3} each)
+worthMeta=\u00a77Stack of {0} with metadata of {1} worth \u00a7c{2}\u00a77 ({3} item(s) at {4} each)
+worthSet=Worth value set
+year=year
+years=years
+youAreHealed=\u00a77You have been healed.
+youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties
new file mode 100644
index 000000000..95fda63ac
--- /dev/null
+++ b/Essentials/src/messages_es.properties
@@ -0,0 +1,379 @@
+#version: TeamCity
+# Single quotes have to be doubled: ''
+# Translations start here
+# by:
+action=* {0} {1}
+addedToAccount=\u00a7a{0} ha sido agregado a tu cuenta.
+addedToOthersAccount=\u00a7a{0} ha sido agregado a la cuenta de {1}.
+alertBroke=roto:
+alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} en: {3}
+alertPlaced=situado:
+alertUsed=usado:
+autoAfkKickReason=Has sido echado por ausentarte mas de {0} minutos.
+backAfterDeath=\u00a77Usa el comando /back para volver al punto en el que moriste.
+backUsageMsg=\u00a77Volviendo a la localizacion anterior.
+backupFinished=Copia de seguridad completada
+backupStarted=Comenzando copia de seguridad
+balance=\u00a77Cantidad: {0}
+balanceTop=\u00a77Top {0} cantidades
+banExempt=\u00a7cNo puedes banear a ese jugador
+banIpAddress=\u00a77Direccion IP baneada
+bannedIpsFileError=Error leyendo banned-ips.txt
+bannedIpsFileNotFound=banned-ips.txt no encontrado
+bannedPlayersFileError=Error leyendo banned-players.txt
+bannedPlayersFileNotFound=banned-players.txt no encontrado
+bigTreeFailure=\u00a7cBig Generacion de arbol fallida. Prueba de nuevo en hierba o arena.
+bigTreeSuccess= \u00a77Big Arbol generado.
+broadcast=[\u00a7cBroadcast\u00a7f]\u00a7a {0}
+buildAlert=\u00a7cNo tienes permisos para construir
+bukkitFormatChanged=Version de formato de Bukkit cambiado. Version no comprobada.
+burnMsg=\u00a77Has puesto {0} en fuego durante {1} segundos.
+canTalkAgain=\u00a77Ya puedes hablar de nuevo
+cantFindGeoIpDB=No se puede encontrar la bases de datos del Geo IP
+cantReadGeoIpDB=Error al intentar leer la base de datos del Geo IP
+cantSpawnItem=\u00a7cNo tienes acceso para producir este objeto {0}
+commandFailed=Command {0} fallado:
+commandHelpFailedForPlugin=Error obteniendo ayuda para: {0}
+commandNotLoaded=\u00a7cCommand {0} esta cargado incorrectamente.
+compassBearing=\u00a77Bearing: {0} ({1} grados).
+configFileMoveError=Error al mover config.yml para hacer una copia de seguridad de la localizacion.
+configFileRenameError=Error al renombrar archivo temp a config.yml
+connectedPlayers=Jugadores conectados:
+connectionFailed=Error al abrir conexion.
+cooldownWithMessage=\u00a7cCooldown: {0}
+corruptNodeInConfig=\u00a74Notice: Tu archivo de configuracion tiene un nodo {0} incorrecto.
+couldNotFindTemplate=No se puede encontrar el template {0}
+creatingConfigFromTemplate=Creando configuracion desde el template: {0}
+creatingEmptyConfig=Creando configuracion vacia: {0}
+creative=creative
+day=dia
+days=dias
+defaultBanReason=Baneado por incumplir las normas!
+deleteFileError=No se puede borrar el archivo: {0}
+deleteHome=\u00a77Home {0} ha sido borrado.
+deleteJail=\u00a77Jail {0} ha sido borrado.
+deleteWarp=\u00a77Warp {0} ha sido borrado.
+deniedAccessCommand={0} ha denegado el acceso al comando.
+dependancyDownloaded=[Essentials] Dependencia {0} descargada correctamente.
+dependancyException=[Essentials] Error al intentar descargar la dependencia.
+dependancyNotFound=[Essentials] La dependencia necesitada no se encontro, descargandola...
+depth=\u00a77Estas al nivel del mar.
+depthAboveSea=\u00a77Estas {0} bloque(s) por encima del mar.
+depthBelowSea=\u00a77Estas {0} bloque(s) por debajo del mar.
+destinationNotSet=Destino no establecido.
+disableUnlimited=\u00a77Desactivando colocacion ilimitada de {0} para {1}.
+disabled=desactivado
+dontMoveMessage=\u00a77Teletransporte comenzara en {0}. No te muevas.
+downloadingGeoIp=Descargando base de datos de GeoIP ... puede llevar un tiempo (pais: 0.6 MB, ciudad: 20MB)
+duplicatedUserdata=Datos de usuario duplicados: {0} y {1}
+enableUnlimited=\u00a77Dando cantidad ilimitada de {0} a {1}.
+enabled=activado
+errorCallingCommand=Error al ejecutar el comando /{0}
+errorWithMessage=\u00a7cError: {0}
+essentialsReload=\u00a77Essentials Recargado {0}
+extinguish=\u00a77Te has suicidado.
+extinguishOthers=\u00a77Has matado a {0}.
+failedToCloseConfig=Error al cerrar configuracion {0}
+failedToCreateConfig=Error al crear configuracion {0}
+failedToWriteConfig=Error al escribir configuracion {0}
+false=false
+fileRenameError=Error al renombrar el archivo {0}
+foreverAlone=\u00a7cNo tienes nadie a quien puedas responder.
+freedMemory= {0} MB libres.
+gameMode=\u00a77Set game mode {0} for {1}.
+gcchunks= pixeles,
+gcentities= entidades
+gcfree=Memoria libre: {0} MB
+gcmax=Memoria maxima: {0} MB
+gctotal=Memoria localizada: {0} MB
+geoIpUrlEmpty=Link para descargar GeoIP esta vacio.
+geoIpUrlInvalid=Link para descargar GeoIP es invalido.
+geoipJoinFormat=El jugador {0} viene de {1}
+godDisabledFor=Desactivado para {0}
+godEnabledFor=Activado para {0}
+godMode=\u00a77Modo Dios {0}.
+haveBeenReleased=\u00a77Has sido liberado
+heal=\u00a77Has sido curado.
+healOther=\u00a77Has curado a {0}.
+helpConsole=Para obtener ayuda de la consola, escribe ?.
+helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
+helpPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f:
+holeInFloor=Agujero en el suelo
+homeSet=\u00a77Hogar establecido.
+homeSetToBed=\u00a77Tu hogar esta ahora establecido a esta cama.
+homes=Hogares: {0}
+hour=hora
+hours=horas
+ignorePlayer=A partir de ahora ignoras al jugador {0}.
+illegalDate=Forma de fecha ilegal.
+infoChapter=Selecciona una seccion:
+infoChapterPages=Seccion {0}, pagina \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f:
+infoFileDoesNotExist=El archivo info.txt no existe. Creando uno para ti.
+infoPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f:
+infoUnknownChapter=Seccion desconocida.
+invBigger=El inventario del otro usuario es mas grande que el tuyo
+invRestored=Tu inventario ha sido recuperado.
+invSee=Estas viendo el inventario de {0}.
+invSeeHelp=Usa /invsee para recuperar tu inventario.
+invalidCharge=\u00a7cCargo invalido.
+invalidMob=Mob invalido.
+invalidServer=Servidor invalido!
+invalidSignLine=Linea {0} en el signo es invalida.
+invalidWorld=\u00a7cMundo invalido.
+inventoryCleared=\u00a77Inventario limpiado.
+inventoryClearedOthers=\u00a77Inventario de \u00a7c{0}\u00a77 limpiado.
+is=es
+itemCannotBeSold=Ese objeto no puede ser vendido al servidor.
+itemMustBeStacked=El objeto tiene que ser intercambiado en pilas. Una cantidad de 2s seria de dos pilas, etc.
+itemNotEnough1=\u00a7cNo tienes suficientes ejemplares de ese objeto para venderlo.
+itemNotEnough2=\u00a77Si pensabas en vender todos tus objetos de ese tipo, usa /sell nombredeobjeto
+itemNotEnough3=\u00a77/sell nombredeobjeto -1 vendera todos excepto un objeto, etc.
+itemSellAir=Realmente has intentado vender Aire? Pon un objeto en tu mano!
+itemSold=\u00a77Vendido para \u00a7c {0} \u00a77 ({1} {2} a {3} cada uno)
+itemSoldConsole={0} Vendido {1} para\u00a77 {2} \u00a77({3} objetos a {4} cada uno)
+itemSpawn=\u00a77Dando {0} de {1}
+itemsCsvNotLoaded=Error al leer items.csv.
+jailAlreadyIncarcerated=\u00a7cLa persona ya esta en la carcel: {0}
+jailMessage=\u00a7cPor hacer el mal, tiempo en la carcel estaras.
+jailNotExist=Esa carcel no existe.
+jailReleased=\u00a77Player \u00a7e{0}\u00a77 liberado.
+jailReleasedPlayerNotify=\u00a77 Has sido liberado!!
+jailSentenceExtended=El tiempo en la carcel se alarga hasta: {0)
+jailSet=\u00a77Carcel {0} ha sido puesta
+jumpError=Eso es demasiado para tu ordenador!
+kickDefault=Echado del servidor.
+kickExempt=\u00a7cNo puedes echar a esa persona.
+kill=\u00a77ha matado a {0}.
+kitError=\u00a7cNo hay ningun kit valido.
+kitError2=\u00a7cEse kit no existe o esta mal escrito.
+kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration?
+kitGive=\u00a77Dando kit a {0}.
+kitInvFull=\u00a7cTu inventario esta lleno, su kit se pondra en el suelo
+kitTimed=\u00a7c No puedes usar ese kit de nuevo para otro{0}.
+kits=\u00a77Kits: {0}
+lightningSmited=\u00a77Acabas de ser golpeado
+lightningUse=\u00a77Golpeando a {0}
+loadWarpError=Error al cargar el tenetransporte {0}
+loadinfo=Cargado {0}, construido {1} por: {2}
+localFormat=Local: <{0}> {1}
+mailClear=\u00a7cPara marcar tu email como leido, escribe /mail clear
+mailCleared=\u00a77Email limpiado!
+mailSent=\u00a77Email enviado!!
+markMailAsRead=\u00a7cPara marcar tu email como leido, escribe /mail clear
+markedAsAway=\u00a77Has sido puesto como AFK.
+markedAsNotAway=\u00a77Ya no estas AFK.
+maxHomes=No puedes establecer mas de {0} hogares.
+mayNotJail=\u00a7cNo puedes encarcelar a esa persona
+me=yo
+minute=minuto
+minutes=minutos
+missingItems=No tienes {0}x de {1}.
+missingPrefixSuffix=Falta un prefijo o un sufijo para {0}
+mobSpawnError=Error al cambiar la localizacion para el nacimiento de los mobs.
+mobSpawnLimit=Cantidad de Mobs limitados al limite del server
+mobSpawnTarget=El block seleccionado sera el lugar donde van a nacer los mobs.
+mobsAvailable=\u00a77Mobs: {0}
+moneyRecievedFrom=\u00a7a{0} ha sido recivido de {1}
+moneySentTo=\u00a7a{0} ha sido enviado a {1}
+moneyTaken={0} han sido sacados de tu cuenta bancaria.
+month=mes
+months=meses
+moreThanZero=Las cantidades han de ser mayores que 0.
+msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
+muteExempt=\u00a7cNo puedes silenciar a ese jugador.
+mutedPlayer=Player {0} silenciado.
+mutedPlayerFor=Player {0} silenciado durante {1}.
+mutedUserSpeaks={0} intento hablar, pero esta silenciado.
+needTpohere=Necesitas acceso a /tpohere para teletransportar a otros jugadores.
+negativeBalanceError=El usuario no tiene permitido tener un saldo negativo.
+nickChanged=Nombre de jugador cambiado.
+nickDisplayName=\u00a77Tienes que habilitar cambio de nombre de usuario en la configuracion de Essentials.
+nickInUse=\u00a7cEse nombre ya esta en uso.
+nickNamesAlpha=\u00a7cLos nombres tienen que ser alfanumericos.
+nickNoMore=\u00a77Ya no tienes un nombre de usuario
+nickOthersPermission=\u00a7cNo tienes permiso para cambiar el nombre de usuario de otros.
+nickSet=\u00a77Tu nombre es ahora \u00a7c{0}
+noAccessCommand=\u00a7cNo tienes acceso a ese comando.
+noAccessPermission=\u00a7cNo tienes permisos para hacer eso {0}.
+noDestroyPermission=\u00a7cNo tienes permisos para destrozar eso {0}.
+noGodWorldWarning=\u00a7cWarning! God mode in this world disabled.
+noHelpFound=\u00a7cNo hay comandos relacionados.
+noHomeSet=No has establecido un hogar.
+noHomeSetPlayer=El jugador no ha establecido un hogar.
+noKitPermission=\u00a7cNecesitas los \u00a7c{0}\u00a7c permisos para usar ese kit.
+noKits=\u00a77No hay kits disponibles todavia
+noMail=No tienes ningun email recivido
+noMailSendPerm=\u00a7cNo tienes el permiso de \u00a7fessentials.mail.send\u00a7c.
+noMotd=\u00a7cNo hay ningun mensaje del dia.
+noNewMail=\u00a77No tienes ningun correo nuevo.
+noPendingRequest=No tienes ninguna peticion pendiente.
+noPlacePermission=\u00a7cNo tienes permiso para situar ese bloque en ese lugar.
+noPowerTools=You have no power tools assigned.
+noRules=\u00a7cNo hay reglas especificadas todavia.
+noWarpsDefined=No hay teletransportes definidos aun
+none=ninguno
+notAllowedToQuestion=\u00a7cYou estas autorizado para usar las preguntas.
+notAllowedToShout=\u00a7cNo estas autorizado para gritar.
+notEnoughMoney=No tienes el dinero suficiente.
+notRecommendedBukkit=La version de bukkit no es la recomendada para esta version de Essentials.
+notSupportedYet=No esta soportado aun.
+now=ahora
+numberRequired=Un numero es necesario, amigo.
+onlyDayNight=/time solo soporta day/night. (dia/noche)
+onlyPlayers=Solo los jugadores conectados pueden usar {0}.
+onlySunStorm=/weather solo soporta sun/storm. (sol/tormenta)
+pTimeCurrent=\u00a7e{0}''s\u00a7f la hora es {1}.
+pTimeCurrentFixed=\u00a7e{0}''s\u00a7f la hora ha sido cambiada a {1}.
+pTimeNormal=\u00a7e{0}''s\u00a7f el tiempo es normal y coincide con el servidor.
+pTimeOthersPermission=\u00a7cNo estas autorizado para especificar'' la hora de otros usuarios.
+pTimePlayers=Estos usuarios tienen su propia hora:
+pTimeReset=La hora del usuario ha sido reiniciada a las: \u00a7e{0}
+pTimeSet=La hora del jugador ha sido cambiada para las: \u00a73{0}\u00a7f for: \u00a7e{1}
+pTimeSetFixed=La hora del jugador ha sido arreglada para las: \u00a73{0}\u00a7f for: \u00a7e{1}
+parseError=error analizando {0} en la linea {1}
+pendingTeleportCancelled=\u00a7cPeticion de teletransporte pendiente cancelado.
+permissionsError=Falta el plugin Permissions/GroupManager; Los prefijos/sufijos de chat seran desactivados.
+playerBanned=\u00a7cEl jugador {0} ha baneado a {1} durante {2}
+playerInJail=\u00a7cEl jugador {0} ya esta en la carcel.
+playerJailed=\u00a77Jugador {0} encarcelado.
+playerJailedFor= \u00a77El jugador {0} ha sido encarcelado durante {1}.
+playerKicked=\u00a7cEl jugador {0} echo a {1} durante {2}
+playerMuted=\u00a77Has sido silenciado
+playerMutedFor=\u00a77Has sido silenciado durante {0}
+playerNeverOnServer=\u00a7cEl jugador {0} nunca estuvo en este servidor.
+playerNotFound=\u00a7cJugador no encontrado.
+playerUnmuted=\u00a77Has sido desmuteado.
+pong=Tkm mi ninio!
+possibleWorlds=\u00a77Los mundos posibles son desde el numero 0 hasta el {0}.
+powerToolAir=El comando no se puede ejecutar en el aire.
+powerToolAlreadySet=El comando \u00a7c{0}\u00a7f ya esta asignado a {1}.
+powerToolAttach=\u00a7c{0}\u00a7f comando asignado a {1}.
+powerToolClearAll=Todos los comandos de powertool han sido borrados.
+powerToolList={1} tiene los siguientes comandos: \u00a7c{0}\u00a7f.
+powerToolListEmpty={0} no tiene comandos asignados.
+powerToolNoSuchCommandAssigned=El comando \u00a7c{0}\u00a7f no ha sido asignado a {1}.
+powerToolRemove=Comando \u00a7c{0}\u00a7f borrado desde {1}.
+powerToolRemoveAll=Todos los comandos borrados desde {0}.
+powerToolsDisabled=All of your power tools have been disabled.
+powerToolsEnabled=All of your power tools have been enabled.
+protectionOwner=\u00a76[EssentialsProtect] Due&ntilde;o de la proteccion: {0}
+questionFormat=\u00a77[Pregunta]\u00a7f {0}
+reloadAllPlugins=\u00a77Todos los plugins recargados.
+repair=Has reparado satisfactoriamente tu: \u00a7e{0}.
+repairAlreadyFixed=\u00a77Este objeto no necesita de reparado.
+repairInvalidType=\u00a7cEste objeto no puede ser reparado.
+repairNone=No habia objetos que necesitasen ser reparados.
+requestAccepted=\u00a77Peticion de teletransporte aceptada.
+requestAcceptedFrom=\u00a77{0} acepto tu peticion de teletransporte.
+requestDenied=\u00a77Peticion de teletransporte denegada.
+requestDeniedFrom=\u00a77{0} ha denegado tu peticion de teletransporte.
+requestSent=\u00a77Peticion enviada a {0}\u00a77.
+returnPlayerToJailError=Error al intentar quitar al jugador de la carcel.
+second=segundo
+seconds=segundos
+seenOffline=El jugador {0} esta desconectado desde {1}
+seenOnline=El jugador {0} lleva conectado desde {1}
+serverFull=Servidor lleno
+setSpawner=Cambiado tipo de lugar de nacimiento a {0}
+sheepMalformedColor=Color malformado.
+shoutFormat=\u00a77[Shout]\u00a7f {0}
+signFormatFail=\u00a74[{0}]
+signFormatSuccess=\u00a71[{0}]
+signFormatTemplate=[{0}]
+signProtectInvalidLocation=\u00a74No puedes poner carteles en ese sitio.
+similarWarpExist=Ya existe un teletransporte con ese nombre.
+slimeMalformedSize=Medidas malformadas.
+soloMob=A este mob le gusta estar solo
+spawnSet=\u00a77El lugar de nacimiento ha sido puesto para el grupo {0}.
+spawned=nacido
+suicideMessage=\u00a77Adios mundo cruel...
+suicideSuccess= \u00a77{0} se quito su propia vida
+survival=survival
+takenFromAccount=\u00a7c{0} ha sido sacado de tu cuenta.
+takenFromOthersAccount=\u00a7c{0} ha sido sacado de la cuenta de {1}.
+teleportAAll=\u00a77Peticion de teletransporte enviada a todos los jugadores...
+teleportAll=\u00a77Teletransportando a todos los jugadores...
+teleportAtoB=\u00a77{0}\u00a77 te teletransporto a {1}\u00a77.
+teleportDisabled={0} tiene desactivado los teletransportes.
+teleportHereRequest=\u00a7c{0}\u00a7c ha pedido que te teletransportes con el.
+teleportNewPlayerError=Error al teletransportar al nuevo jugador
+teleportRequest=\u00a7c{0}\u00a7c te ha pedido teletransportarse contigo.
+teleportTop=\u00a77Teletransportandote a la cima.
+teleportationCommencing=\u00a77Comenzando teletransporte...
+teleportationDisabled=\u00a77Teletransporte desactivado.
+teleportationEnabled=\u00a77Teletransporte activado.
+teleporting=\u00a77Teletransportando...
+teleportingPortal=\u00a77Teletransportando via portal.
+tempBanned=Baneado temporalmente del servidor por {0}
+tempbanExempt=\u00a77No puedes banear temporalmente a ese jugador
+thunder= Tu has {0} los truenos en tu mundo.
+thunderDuration=Tu has {0} los truenos en tu mundo durante {1} seconds.
+timeBeforeHeal=Tiempo antes de la siguiente curacion: {0}
+timeBeforeTeleport=Tiempo antes del proximo teletransporte: {0}
+timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
+timePattern=(?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
+timeSet=Time establecido en todos los mundos.
+timeSetPermission=\u00a7cNo estas autorizado para establecer la hora.
+timeWorldCurrent=La hora actual en {0} es \u00a73{1}
+timeWorldSet=La hora ha sido establecido a {0} en: \u00a7c{1}
+tradeCompleted=\u00a77Intercambio completado.
+tradeSignEmpty=Esta tienda no tiene nada disponible para ti.
+tradeSignEmptyOwner=No hay nada que recojer de esta tienda.
+treeFailure=\u00a7cError al generar arbol. Prueba de nuevo en tierra o hierba.
+treeSpawned=\u00a77Arbol puesto.
+true=true
+typeTpaccept=\u00a77Para teletransportarte, escribe \u00a7c/tpaccept\u00a77.
+typeTpdeny=\u00a77Para denegar esta peticion, escribe \u00a7c/tpdeny\u00a77.
+typeWorldName=\u00a77Tu tambien puedes escribir el nombre de un mundo especifico.
+unableToSpawnMob=No se puede generar Mobs.
+unbannedIP=IP Adress desbaneada.
+unbannedPlayer=Jugador desbaneado.
+unignorePlayer=Ya no estas ignorando al jugador {0}.
+unknownItemId=ID de objeto desconocido: {0}
+unknownItemInList=Objeto desconocido {0} en {1} lista.
+unknownItemName=Nombre de objeto desconocido: {0}
+unlimitedItemPermission=\u00a7cNo tienes permiso para objetos ilimitados {0}.
+unlimitedItems=Objetos ilimitados.
+unmutedPlayer=Jugador {0} desmuteado.
+upgradingFilesError=Error mientras se actualizaban los archivos
+userDoesNotExist=El usuario {0} no existe
+userIsAway={0} esta ahora ausente!
+userIsNotAway={0} ya no esta ausente!
+userJailed=\u00a77Has sido encarcelado!
+userUsedPortal={0} uso un portal de salida existente.
+userdataMoveBackError=Error al mover userdata/{0}.tmp a userdata/{1}
+userdataMoveError=Error al mover userdata/{0} a userdata/{1}.tmp
+usingTempFolderForTesting=Usando carpeta temporal para pruebas:
+versionMismatch=La version no coincide! Por favor actualiza {0} a la misma version.
+versionMismatchAll=La version no coincide! Por favor actualiza todos los jars de Essentials a la misma version.
+voiceSilenced=\u00a77Tu voz ha sido silenciada
+warpDeleteError=Problema al borrar el archivo de teletransporte.
+warpListPermission=\u00a7cNo tienes permiso para listar esos teletransportes.
+warpNotExist=Ese teletransporte no existe.
+warpSet=\u00a77Teletransporte {0} establecido.
+warpUsePermission=\u00a7cNo tienes permisos para usar ese teletransporte.
+warpingTo=\u00a77Teletransportandote a {0}.
+warps=Warps: {0}
+warpsCount=\u00a77Hay {0} teletransportes. Mostrando pagina {1} de {2}.
+weatherStorm=\u00a77Has establecido el tiempo a tormenta en este mundo.
+weatherStormFor=\u00a77Has establecido el tiempo a tormenta en este {1} durante {0} segundos.
+weatherSun=\u00a77Has establecido el tiempo a sol en este mundo.
+weatherSunFor=\u00a77Has establecido el tiempo a sol en este {1} durante {0} segundos.
+whoisGamemode=\u00a79 - Gamemode: {0}
+whoisGeoLocation=\u00a79 - Localizacion: {0}
+whoisGod=\u00a79 - God mode: {0}
+whoisHealth=\u00a79 - Salud: {0}/20
+whoisIPAddress=\u00a79 - Direccion IP: {0}
+whoisIs={0} es {1}
+whoisLocation=\u00a79 - Localizacion: ({0}, {1}, {2}, {3})
+whoisMoney=\u00a79 - Dinero: {0}
+whoisOP=\u00a79 - OP: {0}
+whoisStatusAvailable=\u00a79 - Estado: Disponible
+whoisStatusAway=\u00a79 - Status: \u00a7cAusente\u00a7f
+worth=\u00a77Pila de {0} con valor de \u00a7c{1}\u00a77 ({2} objeto(s) a {3} cada uno)
+worthMeta=\u00a77Pila de {0} con metadata de {1} , con valor de \u00a7c{2}\u00a77 ({3} objeto(s) a {4} cada uno)
+worthSet=Establecer el valor de un valor
+year=a&ntilde;o
+years=a&ntilde;os
+youAreHealed=\u00a77Has sido curado.
+youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f para ver tus emails no leidos!.
diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties
index b96f48339..f64968250 100644
--- a/Essentials/src/messages_fr.properties
+++ b/Essentials/src/messages_fr.properties
@@ -2,369 +2,378 @@
# Single quotes have to be doubled: ''
# Translations start here
# by:
-action = * {0} {1}
-addedToAccount = \u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 a votre compte.
-addedToOthersAccount = \u00a7a{0} a \u00e9t\u00e9 ajout\u00e9 \u00e0 {1} compte.
-alertBroke = a cass\u00e9:
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3}
-alertPlaced = a plac\u00e9:
-alertUsed = a utilis\u00e9:
+action=* {0} {1}
+addedToAccount=\u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 a votre compte.
+addedToOthersAccount=\u00a7a{0} a \u00e9t\u00e9 ajout\u00e9 \u00e0 {1} compte.
+alertBroke=a cass\u00e9:
+alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3}
+alertPlaced=a plac\u00e9:
+alertUsed=a utilis\u00e9:
autoAfkKickReason=You have been kicked for idling more than {0} minutes.
-backAfterDeath = \u00a77Utilisez la commande /back pour retourner \u00e0 l''endroit ou vous \u00eates mort.
-backUsageMsg = \u00a77Retour a votre emplacement pr\u00e9c\u00e8dent.
-backupFinished = Backup termin\u00e9
-backupStarted = D\u00e9but du backup
-balance = \u00a77Solde: {0}
-balanceTop = \u00a77 Top {0} soldes
-banExempt = \u00a77Vous ne pouvez pas interdire ce joueur.
-banIpAddress = \u00a77Adresse IP banni
-bannedIpsFileError = Erreur de lecture de banned-ips.txt
-bannedIpsFileNotFound = Fichier banned-ips.txt introuvable
-bannedPlayersFileError = Erreur lors de la lecture de banned-players.txt
-bannedPlayersFileNotFound = banned-players.txt introuvable.
-bigTreeFailure = \u00a7c\u00c9chec de la g\u00e9n\u00e9ration du gros arbre. Essayez de nouveau sur de la terre ou de l''herbe.
-bigTreeSuccess = \u00a77Gros arbre cr\u00e9e.
-broadcast = [\u00a7cMessage\u00a7f]\u00a7a {0}
-buildAlert = \u00a7cVous n''avez pas la permission de construire.
-bukkitFormatChanged = Le format de la version de Bukkit a \u00e9t\u00e9 chang\u00e9. La version n''a pas \u00e9t\u00e9 v\u00e9rifi\u00e9e.
-burnMsg = \u00a77Vous avez enflamm\u00e9 {0} pour {1} seconde(s).
-canTalkAgain = \u00a77Vous pouvez de nouveau parler.
-cantFindGeoIpDB = N''arrive pas \u00e0 trouver la base de donn\u00e9es GeoIP!
-cantReadGeoIpDB = Echec de la lecture de la base de donn\u00e9s GeoIP!
-cantSpawnItem = \u00a7cVous n''avez pas le droit de faire apparaitre {0}
-commandFailed = \u00c9chec de la commande {0}:
-commandHelpFailedForPlugin=Erreur d'obtention d'aider \u00e0: {0}
-commandNotLoaded = \u00a7cLa commande {0} a \u00e9t\u00e9 mal charg\u00e9e.
-compassBearing = \u00a77Orientation: {0} ({1} degr\u00e9s).
-configFileMoveError = \u00c9chec du d\u00e9placement de config.yml vers l''emplacement de backup.
-configFileRenameError = \u00c9chec du changement de nom du fichier temp de config.yml
-connectedPlayers = Joueurs connect\u00e9s:
-connectionFailed = \u00c9chec de l''ouverture de la connexion.
-cooldownWithMessage = \u00a7cRefroidissement: {0}
-corruptNodeInConfig = \u00a74Annonce: Votre fichier de configuration a un {0} n\u0153ud corrompu.
-couldNotFindTemplate = Le mod\u00e8le {0} est introuvable
-creatingConfigFromTemplate = Cr\u00e9ation de la configuration \u00e0 partir du mod\u00e8le : {0}
-creatingEmptyConfig = Cr\u00e9ation d''une configuration vierge : {0}
-day = jour
-days = jours
-defaultBanReason = Le marteau du ban a frapp\u00e9!
-deleteFileError = Le fichier n''a pas pu \u00eatre supprim\u00e9: {0}
-deleteHome = \u00a77Home {0} has been removed.
-deleteJail = \u00a77La prison {0} a \u00e9t\u00e9 supprim\u00e9e.
-deleteWarp = \u00a77Warp {0} supprim\u00e9.
-deniedAccessCommand = L''acc\u00e8s \u00e0 la commande a \u00e9t\u00e9 refus\u00e9 pour {0}.
-dependancyDownloaded = [Essentials] Fichier {0} correctement t\u00e9l\u00e9charg\u00e9.
-dependancyException = [Essentials] Une erreur est survenue lors de la tentative de t\u00e9l\u00e9chargement
-dependancyNotFound = [Essentials] Une d\u00e9pendance requise n''a pas \u00e9t\u00e9 trouv\u00e9e, t\u00e9l\u00e9chargement en cours.
-depth = \u00a77Vous \u00eates au niveau de la mer.
-depthAboveSea = \u00a77Vous \u00eates \u00e0 {0} bloc(s) au-dessus du niveau de la mer.
-depthBelowSea = \u00a77Vous \u00eates \u00e0 {0} bloc(s) en-dessous du niveau de la mer.
-destinationNotSet = Destination non d\u00e9finie
-disableUnlimited = \u00a77D\u00e9sactivation du placement illimit\u00e9 de {0} pour {1}.
-disabled = d\u00e9sactiv\u00e9
-dontMoveMessage = \u00a77La t\u00e9l\u00e9portation commence dans {0}. Ne bougez pas.
-downloadingGeoIp = T\u00e9l\u00e9chargement de la base de donn\u00e9es GeoIP ... cela peut prendre un moment (campagne : 0.6 Mo, ville : 20Mo)
-duplicatedUserdata = Donn\u00e9e utilisateur dupliqu\u00e9e: {0} et {1}
-enableUnlimited = \u00a77Donner un nombre illimit\u00e9 de {0} \u00e0 {1}.
-enabled = activ\u00e9
-errorCallingCommand = Erreur en appelant la commande /{0}
-errorWithMessage = \u00a7cErreur: {0}
-essentialsReload = \u00a77Essentials Recharg\u00e9 {0}
-extinguish = \u00a77Vous vous \u00eates \u00e9teint.
-extinguishOthers = \u00a77Vous avez \u00e9teint {0}.
-failedToCloseConfig = Echec de la fermeture de la configuration {0}
-failedToCreateConfig = Echec de la cr\u00e9ation de la configuration {0}
-failedToWriteConfig = \u00c9chec de l''\u00e9criture de la configuration {0}
-fileRenameError = Echec du changement de nom de {0}.
-foreverAlone = \u00a7cVous n''avez personne \u00e0 qui r\u00e9pondre.
-freedMemory = A lib\u00e9r\u00e9 {0} Mo.
-gcchunks = chunks,
-gcentities = entit\u00e9s
-gcfree = Free memory: {0} Mo
-gcmax = M\u00e9moire maximale: {0} Mo
-gctotal = Allocated memory: {0} Mo
-geoIpUrlEmpty = L''url de t\u00e9l\u00e9chargement de GeoIP est vide.
-geoIpUrlInvalid = L''url de t\u00e9l\u00e9chargement de GeoIP est invalide.
-geoipJoinFormat = Joueur {0} vient de {1}
-godDisabledFor = d\u00e9sactive pour {0}
-godEnabledFor = activ\u00e9 pour {0}
-godMode = \u00a77Mode Dieu {0}.
-haveBeenReleased = \u00a77Vous avez \u00e9t\u00e9 lib\u00e9r\u00e9
-heal = \u00a77Vous avez \u00e9t\u00e9 soign\u00e9.
-healOther = \u00a77{0} a \u00e9t\u00e9 soign\u00e9.
-helpConsole = Pour voir l''aide tapez ?
-helpOp = \u00a7c[Aide Admin]\u00a7f \u00a77{0}:\u00a7f {1}
-helpPages = Page \u00a7c{0}\u00a7f sur \u00a7c{1}\u00a7f.
-holeInFloor = Trou dans le Sol.
-homeSet = \u00a77Home d\u00e9fini.
-homeSetToBed = \u00a77Votre home est d\u00e9sormais d\u00e9fini sur ce lit.
-homes = Homes: {0}
-hour = heure
-hours = heures
-ignorePlayer = Vous ignorez d\u00e9sormais {0}.
-illegalDate = Format de date ill\u00e9gal.
-infoChapter = S\u00e9lectionner le chapitre :
-infoChapterPages = Chapitre {0}, page \u00a7c{1}\u00a7f sur \u00a7c{2}\u00a7f:
-infoFileDoesNotExist = Le fichier info.txt n''existe pas. Le fichier est en cours de cr\u00e9ation pour vous.
-infoPages = Page \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f.
-infoUnknownChapter = Chapitre inconnu.
-invBigger = Les inventaires des autres joueurs sont plus gros que le v\u00f4tre.
-invRestored = Votre inventaire vous a \u00e9t\u00e9 rendu.
-invSee = Vous voyez l''inventaire de {0}.
-invSeeHelp = Utilisez /invsee pour voir l''inventaire de quelqu''un.
-invalidCharge = \u00a7cInvalide charge.
-invalidMob = Mauvias type de monstre.
-invalidServer = Serveur non valide.
-invalidSignLine = La ligne {0} du panneau est invalide.
-invalidWorld = \u00a7cMonde invalide.
-inventoryCleared = \u00a77Inventaire nettoy\u00e9.
-inventoryClearedOthers = \u00a77L''inventaire de \u00a7c{0}\u00a77 a \u00e9t\u00e9 nettoy\u00e9.
-is = est
-itemCannotBeSold = Cet objet ne peut \u00eatre vendu au serveur.
-itemMustBeStacked = Cet objet doit \u00eatre vendu par 64. Une quantit\u00e9 de 2 serait deux fois 64.
-itemNotEnough1 = \u00a7cVous n''avez pas assez de cet objet pour le vendre.
-itemNotEnough2 = \u00a77Si vous voulez vendre l''int\u00e9gralit\u00e9 de vos objets de ce type l\u00e0, utilisez /sell nomObjet
-itemNotEnough3 = \u00a77/sell nomObjet -1 vendra tout sauf un objet, etc.
-itemSellAir = Vous vouliez vraiment vendre de l''air? Mettez un objet dans votre main.
-itemSold = \u00a77Vendu pour \u00a7c{0} \u00a77({1} {2} \u00e0 {3} chacun)
-itemSoldConsole = {0} vendu {1} pour \u00a77{2} \u00a77({3} objet(s) \u00e0 {4} chacun)
-itemSpawn = \u00a77Donne {0} de {1}
-itemsCsvNotLoaded = N''a pas pu charger items.csv.
-jailAlreadyIncarcerated = \u00a7cPerson is already in jail: {0}
-jailMessage = \u00a7cVous avez commis un crime, vous en payez le prix.
-jailNotExist = Cette prison n''existe pas.
-jailReleased = \u00a77Player \u00a7e{0}\u00a77 unjailed.
-jailReleasedPlayerNotify = \u00a77You have been released!
-jailSentenceExtended = Jail time extend to: {0)
-jailSet = \u00a77La prison {0} a \u00e9t\u00e9 cr\u00e9\u00e9.
-jumpError = \u00c7a aurait pu faire mal au cerveau de votre ordinateur.
-kickDefault = Kick\u00e9 du serveur
-kickExempt = \u00a77Vous ne pouvez pas lancer ce joueur.
-kill = \u00a77Tu\u00e9 {0}.
-kitError = \u00a7cIl n''y a pas de kits valides.
-kitError2 = \u00a7cCe kit n''existe pas ou a \u00e9t\u00e9 mal d\u00e9fini.
-kitErrorHelp = \u00a7cPeut-\u00eatre qu''un objet manque d''une quantit\u00e9 dans la configuration?
-kitGive = \u00a77Donner le kit {0}.
-kitInvFull = \u00a7cVotre inventaire \u00e9tait plein, le kit est Parre-terre.
-kitTimed = \u00a7cVous ne pouvez pas utiliser ce kit pendant encore {0}.
-kits = \u00a77Kits:{0}
-lightningSmited = \u00a77Vous venez d''\u00eatre foudroy\u00e9
-lightningUse = \u00a77{0} a \u00e9t\u00e9 foudroy\u00e9
-loadWarpError = \u00c9chec du chargement du warp {0}
-loadinfo = {0} version {1} par {2} a \u00e9t\u00e9 charg\u00e9
-localFormat = Local:<{0}> {1}
-mailClear = \u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear
-mailCleared = \u00a77Mail supprim\u00e9 !
-mailSent = \u00a77Courrier envoy\u00e9 !
-markMailAsRead = \u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear
-markedAsAway = \u00a77Vous \u00eates d\u00e9sormais AFK.
-markedAsNotAway = \u00a77Vous n''\u00eates d\u00e9sormais plus AFK.
+backAfterDeath=\u00a77Utilisez la commande /back pour retourner \u00e0 l''endroit ou vous \u00eates mort.
+backUsageMsg=\u00a77Retour a votre emplacement pr\u00e9c\u00e8dent.
+backupFinished=Backup termin\u00e9
+backupStarted=D\u00e9but du backup
+balance=\u00a77Solde: {0}
+balanceTop=\u00a77 Top {0} soldes
+banExempt=\u00a77Vous ne pouvez pas interdire ce joueur.
+banIpAddress=\u00a77Adresse IP banni
+bannedIpsFileError=Erreur de lecture de banned-ips.txt
+bannedIpsFileNotFound=Fichier banned-ips.txt introuvable
+bannedPlayersFileError=Erreur lors de la lecture de banned-players.txt
+bannedPlayersFileNotFound=banned-players.txt introuvable.
+bigTreeFailure=\u00a7c\u00c9chec de la g\u00e9n\u00e9ration du gros arbre. Essayez de nouveau sur de la terre ou de l''herbe.
+bigTreeSuccess=\u00a77Gros arbre cr\u00e9e.
+broadcast=[\u00a7cMessage\u00a7f]\u00a7a {0}
+buildAlert=\u00a7cVous n''avez pas la permission de construire.
+bukkitFormatChanged=Le format de la version de Bukkit a \u00e9t\u00e9 chang\u00e9. La version n''a pas \u00e9t\u00e9 v\u00e9rifi\u00e9e.
+burnMsg=\u00a77Vous avez enflamm\u00e9 {0} pour {1} seconde(s).
+canTalkAgain=\u00a77Vous pouvez de nouveau parler.
+cantFindGeoIpDB=N''arrive pas \u00e0 trouver la base de donn\u00e9es GeoIP!
+cantReadGeoIpDB=Echec de la lecture de la base de donn\u00e9s GeoIP!
+cantSpawnItem=\u00a7cVous n''avez pas le droit de faire apparaitre {0}
+commandFailed=\u00c9chec de la commande {0}:
+commandHelpFailedForPlugin=Erreur d'obtention d'aider \u00e0: {0}
+commandNotLoaded=\u00a7cLa commande {0} a \u00e9t\u00e9 mal charg\u00e9e.
+compassBearing=\u00a77Orientation: {0} ({1} degr\u00e9s).
+configFileMoveError=\u00c9chec du d\u00e9placement de config.yml vers l''emplacement de backup.
+configFileRenameError=\u00c9chec du changement de nom du fichier temp de config.yml
+connectedPlayers=Joueurs connect\u00e9s:
+connectionFailed=\u00c9chec de l''ouverture de la connexion.
+cooldownWithMessage=\u00a7cRefroidissement: {0}
+corruptNodeInConfig=\u00a74Annonce: Votre fichier de configuration a un {0} n\u0153ud corrompu.
+couldNotFindTemplate=Le mod\u00e8le {0} est introuvable
+creatingConfigFromTemplate=Cr\u00e9ation de la configuration \u00e0 partir du mod\u00e8le : {0}
+creatingEmptyConfig=Cr\u00e9ation d''une configuration vierge : {0}
+creative=creative
+day=jour
+days=jours
+defaultBanReason=Le marteau du ban a frapp\u00e9!
+deleteFileError=Le fichier n''a pas pu \u00eatre supprim\u00e9: {0}
+deleteHome=\u00a77Home {0} has been removed.
+deleteJail=\u00a77La prison {0} a \u00e9t\u00e9 supprim\u00e9e.
+deleteWarp=\u00a77Warp {0} supprim\u00e9.
+deniedAccessCommand=L''acc\u00e8s \u00e0 la commande a \u00e9t\u00e9 refus\u00e9 pour {0}.
+dependancyDownloaded=[Essentials] Fichier {0} correctement t\u00e9l\u00e9charg\u00e9.
+dependancyException=[Essentials] Une erreur est survenue lors de la tentative de t\u00e9l\u00e9chargement
+dependancyNotFound=[Essentials] Une d\u00e9pendance requise n''a pas \u00e9t\u00e9 trouv\u00e9e, t\u00e9l\u00e9chargement en cours.
+depth=\u00a77Vous \u00eates au niveau de la mer.
+depthAboveSea=\u00a77Vous \u00eates \u00e0 {0} bloc(s) au-dessus du niveau de la mer.
+depthBelowSea=\u00a77Vous \u00eates \u00e0 {0} bloc(s) en-dessous du niveau de la mer.
+destinationNotSet=Destination non d\u00e9finie
+disableUnlimited=\u00a77D\u00e9sactivation du placement illimit\u00e9 de {0} pour {1}.
+disabled=d\u00e9sactiv\u00e9
+dontMoveMessage=\u00a77La t\u00e9l\u00e9portation commence dans {0}. Ne bougez pas.
+downloadingGeoIp=T\u00e9l\u00e9chargement de la base de donn\u00e9es GeoIP ... cela peut prendre un moment (campagne : 0.6 Mo, ville : 20Mo)
+duplicatedUserdata=Donn\u00e9e utilisateur dupliqu\u00e9e: {0} et {1}
+enableUnlimited=\u00a77Donner un nombre illimit\u00e9 de {0} \u00e0 {1}.
+enabled=activ\u00e9
+errorCallingCommand=Erreur en appelant la commande /{0}
+errorWithMessage=\u00a7cErreur: {0}
+essentialsReload=\u00a77Essentials Recharg\u00e9 {0}
+extinguish=\u00a77Vous vous \u00eates \u00e9teint.
+extinguishOthers=\u00a77Vous avez \u00e9teint {0}.
+failedToCloseConfig=Echec de la fermeture de la configuration {0}
+failedToCreateConfig=Echec de la cr\u00e9ation de la configuration {0}
+failedToWriteConfig=\u00c9chec de l''\u00e9criture de la configuration {0}
+false=false
+fileRenameError=Echec du changement de nom de {0}.
+foreverAlone=\u00a7cVous n''avez personne \u00e0 qui r\u00e9pondre.
+freedMemory=A lib\u00e9r\u00e9 {0} Mo.
+gameMode=\u00a77Set game mode {0} for {1}.
+gcchunks=chunks,
+gcentities=entit\u00e9s
+gcfree=Free memory: {0} Mo
+gcmax=M\u00e9moire maximale: {0} Mo
+gctotal=Allocated memory: {0} Mo
+geoIpUrlEmpty=L''url de t\u00e9l\u00e9chargement de GeoIP est vide.
+geoIpUrlInvalid=L''url de t\u00e9l\u00e9chargement de GeoIP est invalide.
+geoipJoinFormat=Joueur {0} vient de {1}
+godDisabledFor=d\u00e9sactive pour {0}
+godEnabledFor=activ\u00e9 pour {0}
+godMode=\u00a77Mode Dieu {0}.
+haveBeenReleased=\u00a77Vous avez \u00e9t\u00e9 lib\u00e9r\u00e9
+heal=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9.
+healOther=\u00a77{0} a \u00e9t\u00e9 soign\u00e9.
+helpConsole=Pour voir l''aide tapez ?
+helpOp=\u00a7c[Aide Admin]\u00a7f \u00a77{0}:\u00a7f {1}
+helpPages=Page \u00a7c{0}\u00a7f sur \u00a7c{1}\u00a7f.
+holeInFloor=Trou dans le Sol.
+homeSet=\u00a77Home d\u00e9fini.
+homeSetToBed=\u00a77Votre home est d\u00e9sormais d\u00e9fini sur ce lit.
+homes=Homes: {0}
+hour=heure
+hours=heures
+ignorePlayer=Vous ignorez d\u00e9sormais {0}.
+illegalDate=Format de date ill\u00e9gal.
+infoChapter=S\u00e9lectionner le chapitre :
+infoChapterPages=Chapitre {0}, page \u00a7c{1}\u00a7f sur \u00a7c{2}\u00a7f:
+infoFileDoesNotExist=Le fichier info.txt n''existe pas. Le fichier est en cours de cr\u00e9ation pour vous.
+infoPages=Page \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f.
+infoUnknownChapter=Chapitre inconnu.
+invBigger=Les inventaires des autres joueurs sont plus gros que le v\u00f4tre.
+invRestored=Votre inventaire vous a \u00e9t\u00e9 rendu.
+invSee=Vous voyez l''inventaire de {0}.
+invSeeHelp=Utilisez /invsee pour voir l''inventaire de quelqu''un.
+invalidCharge=\u00a7cInvalide charge.
+invalidMob=Mauvias type de monstre.
+invalidServer=Serveur non valide.
+invalidSignLine=La ligne {0} du panneau est invalide.
+invalidWorld=\u00a7cMonde invalide.
+inventoryCleared=\u00a77Inventaire nettoy\u00e9.
+inventoryClearedOthers=\u00a77L''inventaire de \u00a7c{0}\u00a77 a \u00e9t\u00e9 nettoy\u00e9.
+is=est
+itemCannotBeSold=Cet objet ne peut \u00eatre vendu au serveur.
+itemMustBeStacked=Cet objet doit \u00eatre vendu par 64. Une quantit\u00e9 de 2 serait deux fois 64.
+itemNotEnough1=\u00a7cVous n''avez pas assez de cet objet pour le vendre.
+itemNotEnough2=\u00a77Si vous voulez vendre l''int\u00e9gralit\u00e9 de vos objets de ce type l\u00e0, utilisez /sell nomObjet
+itemNotEnough3=\u00a77/sell nomObjet -1 vendra tout sauf un objet, etc.
+itemSellAir=Vous vouliez vraiment vendre de l''air? Mettez un objet dans votre main.
+itemSold=\u00a77Vendu pour \u00a7c{0} \u00a77({1} {2} \u00e0 {3} chacun)
+itemSoldConsole={0} vendu {1} pour \u00a77{2} \u00a77({3} objet(s) \u00e0 {4} chacun)
+itemSpawn=\u00a77Donne {0} de {1}
+itemsCsvNotLoaded=N''a pas pu charger items.csv.
+jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0}
+jailMessage=\u00a7cVous avez commis un crime, vous en payez le prix.
+jailNotExist=Cette prison n''existe pas.
+jailReleased=\u00a77Player \u00a7e{0}\u00a77 unjailed.
+jailReleasedPlayerNotify=\u00a77You have been released!
+jailSentenceExtended=Jail time extend to: {0)
+jailSet=\u00a77La prison {0} a \u00e9t\u00e9 cr\u00e9\u00e9.
+jumpError=\u00c7a aurait pu faire mal au cerveau de votre ordinateur.
+kickDefault=Kick\u00e9 du serveur
+kickExempt=\u00a77Vous ne pouvez pas lancer ce joueur.
+kill=\u00a77Tu\u00e9 {0}.
+kitError=\u00a7cIl n''y a pas de kits valides.
+kitError2=\u00a7cCe kit n''existe pas ou a \u00e9t\u00e9 mal d\u00e9fini.
+kitErrorHelp=\u00a7cPeut-\u00eatre qu''un objet manque d''une quantit\u00e9 dans la configuration?
+kitGive=\u00a77Donner le kit {0}.
+kitInvFull=\u00a7cVotre inventaire \u00e9tait plein, le kit est Parre-terre.
+kitTimed=\u00a7cVous ne pouvez pas utiliser ce kit pendant encore {0}.
+kits=\u00a77Kits:{0}
+lightningSmited=\u00a77Vous venez d''\u00eatre foudroy\u00e9
+lightningUse=\u00a77{0} a \u00e9t\u00e9 foudroy\u00e9
+loadWarpError=\u00c9chec du chargement du warp {0}
+loadinfo={0} version {1} par {2} a \u00e9t\u00e9 charg\u00e9
+localFormat=Local:<{0}> {1}
+mailClear=\u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear
+mailCleared=\u00a77Mail supprim\u00e9 !
+mailSent=\u00a77Courrier envoy\u00e9 !
+markMailAsRead=\u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear
+markedAsAway=\u00a77Vous \u00eates d\u00e9sormais AFK.
+markedAsNotAway=\u00a77Vous n''\u00eates d\u00e9sormais plus AFK.
maxHomes=You cannot set more than {0} homes.
-mayNotJail = \u00a7cVous ne pouvez pas emprisonner cette personne.
-me = moi
-minute = minute
-minutes = minutes
-missingItems = Vous n''avez pas {0} x {1}.
-missingPrefixSuffix = Pr\u00e9fixe ou Suffixe manquant pour {0}
-mobSpawnError = Erreur lors du changement du spawner de monstres.
-mobSpawnLimit = Quantit\u00e9 de monstres limit\u00e9 \u00e0 la limite du serveur.
-mobSpawnTarget = Le bloc cible doit \u00eatre un spawner de monstres.
-moneyRecievedFrom = \u00a7a{0} a \u00e9t\u00e9 re\u00e7u de {1}
-moneySentTo = \u00a7a{0} a \u00e9t\u00e9 envoy\u00e9 \u00e0 {1}
-moneyTaken = {0} pr\u00e9lev\u00e9(s) de votre compte bancaire.
-month = mois
-months = mois
-moreThanZero = Les Quantit\u00e9s doivent \u00eatre sup\u00e9rieures \u00e0 z\u00e9ro.
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-muteExempt = \u00a7cYou may not mute that player.
-mutedPlayer = Le joueur {0} est d\u00e9sormais muet.
-mutedPlayerFor = {0} a \u00e9t\u00e9 mute pour {1}.
-mutedUserSpeaks = {0} a essay\u00e9 de parler mais est muet.
-needTpohere = Vous avez besoin de l''acc\u00e8s \u00e0 /tpohere pour t\u00e9l\u00e9porter d''autres joueurs.
-negativeBalanceError = L''utilisateur n''est pas autoris\u00e9 \u00e0 avoir un solde n\u00e9gatif.
-nickChanged = Pseudo modifi\u00e9.
+mayNotJail=\u00a7cVous ne pouvez pas emprisonner cette personne.
+me=moi
+minute=minute
+minutes=minutes
+missingItems=Vous n''avez pas {0} x {1}.
+missingPrefixSuffix=Pr\u00e9fixe ou Suffixe manquant pour {0}
+mobSpawnError=Erreur lors du changement du spawner de monstres.
+mobSpawnLimit=Quantit\u00e9 de monstres limit\u00e9 \u00e0 la limite du serveur.
+mobSpawnTarget=Le bloc cible doit \u00eatre un spawner de monstres.
+mobsAvailable=\u00a77Mobs: {0}
+moneyRecievedFrom=\u00a7a{0} a \u00e9t\u00e9 re\u00e7u de {1}
+moneySentTo=\u00a7a{0} a \u00e9t\u00e9 envoy\u00e9 \u00e0 {1}
+moneyTaken={0} pr\u00e9lev\u00e9(s) de votre compte bancaire.
+month=mois
+months=mois
+moreThanZero=Les Quantit\u00e9s doivent \u00eatre sup\u00e9rieures \u00e0 z\u00e9ro.
+msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
+muteExempt=\u00a7cYou may not mute that player.
+mutedPlayer=Le joueur {0} est d\u00e9sormais muet.
+mutedPlayerFor={0} a \u00e9t\u00e9 mute pour {1}.
+mutedUserSpeaks={0} a essay\u00e9 de parler mais est muet.
+needTpohere=Vous avez besoin de l''acc\u00e8s \u00e0 /tpohere pour t\u00e9l\u00e9porter d''autres joueurs.
+negativeBalanceError=L''utilisateur n''est pas autoris\u00e9 \u00e0 avoir un solde n\u00e9gatif.
+nickChanged=Pseudo modifi\u00e9.
nickDisplayName=\u00a77You have to enable change-displayname in Essentials config.
-nickInUse = \u00a7cCe nom est d\u00e9j\u00e0 utilis\u00e9.
-nickNamesAlpha = \u00a7cLes pseudos doivent \u00eatre alphanum\u00e9riques.
-nickNoMore = \u00a7Vous n''avez plus de surnom.
-nickOthersPermission = \u00a7cVous n''avez pas la permission de changer le pseudo des autres.
-nickSet = \u00a77Votre pseudo est maintenant \u00a7c{0}
-noAccessCommand = \u00a7cVous n''avez pas acc\u00e8s \u00e0 cette commande.
-noAccessPermission = \u00a7cVous n''avez pas la permissions d''acc\u00e9der \u00e0 cette {0}
-noDestroyPermission = \u00a7cVous n''avez pas la permission de d\u00e9truire ce {0}.
-noHelpFound = \u00a7cNo matching commands.
-noHomeSet = Vous n''avez pas d\u00e9fini de home.
-noHomeSetPlayer = Le joueur n''a pas d\u00e9fini son home.
-noKitPermission = \u00a7cVous avez besoin de la permission \u00a7c{0}\u00a7c pour utiliser ce kit.
-noKits = \u00a77Il n''y a pas encore de kits disponibles.
-noMail = Vous n''avez pas de courrier
-noMailSendPerm = \u00a7cVous n''avez pas la permission \u00a7fessentials.mail.send\u00a7c.
-noMotd = \u00a7cIl n''y a pas de message su jour.
-noNewMail = \u00a77Vous n''avez pas de courrier.
-noPendingRequest = Vous n''avez pas de requ\u00eate non lue.
-noPlacePermission = \u00a7cYou do not have permission to place a block near that sign.
+nickInUse=\u00a7cCe nom est d\u00e9j\u00e0 utilis\u00e9.
+nickNamesAlpha=\u00a7cLes pseudos doivent \u00eatre alphanum\u00e9riques.
+nickNoMore=\u00a7Vous n''avez plus de surnom.
+nickOthersPermission=\u00a7cVous n''avez pas la permission de changer le pseudo des autres.
+nickSet=\u00a77Votre pseudo est maintenant \u00a7c{0}
+noAccessCommand=\u00a7cVous n''avez pas acc\u00e8s \u00e0 cette commande.
+noAccessPermission=\u00a7cVous n''avez pas la permissions d''acc\u00e9der \u00e0 cette {0}
+noDestroyPermission=\u00a7cVous n''avez pas la permission de d\u00e9truire ce {0}.
+noGodWorldWarning=\u00a7cWarning! God mode in this world disabled.
+noHelpFound=\u00a7cNo matching commands.
+noHomeSet=Vous n''avez pas d\u00e9fini de home.
+noHomeSetPlayer=Le joueur n''a pas d\u00e9fini son home.
+noKitPermission=\u00a7cVous avez besoin de la permission \u00a7c{0}\u00a7c pour utiliser ce kit.
+noKits=\u00a77Il n''y a pas encore de kits disponibles.
+noMail=Vous n''avez pas de courrier
+noMailSendPerm=\u00a7cVous n''avez pas la permission \u00a7fessentials.mail.send\u00a7c.
+noMotd=\u00a7cIl n''y a pas de message su jour.
+noNewMail=\u00a77Vous n''avez pas de courrier.
+noPendingRequest=Vous n''avez pas de requ\u00eate non lue.
+noPlacePermission=\u00a7cYou do not have permission to place a block near that sign.
noPowerTools=You have no power tools assigned.
-noRules = \u00a7cIl n''y a pas encore de r\u00e8gles d\u00e9finies.
-noWarpsDefined = Aucun warps d\u00e9finis.
-none = aucun
-notAllowedToQuestion = \u00a7cVous n''\u00eates pas autoris\u00e9 \u00e0 poser des questions.
-notAllowedToShout = \u00a7cVous n''\u00eates pas autoris\u00e9 \u00e0 crier.
-notEnoughMoney = Vous n''avez pas les fonds n\u00e9cessaires.
-notRecommendedBukkit = La version de Bukkit n''est pas celle qui est recommand\u00e9 pour cette version de Essentials.
-notSupportedYet = Pas encore pris en charge.
-now = maintenant
-numberRequired = On a besoin d''un nombre ici, idiot.
-onlyDayNight = /time ne supporte que (jour) day/night (nuit).
-onlyPlayers = Seulement les joueurs en jeu peuvent utiliser {0}.
-onlySunStorm = /weather only supports sun/storm.
-pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
-pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
-pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
-pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
-pTimePlayers = These players have their own time:
-pTimeReset = Player time has been reset for: \u00a7e{0}
-pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
-pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
-parseError = Erreur de conversion {0} \u00e0 la ligne {1}
-pendingTeleportCancelled = \u00a7cRequete de t\u00e9l\u00e9portation annul\u00e9e.
-permissionsError = Permissions/GroupManager manquant, les pr\u00e9fixes et suffixes ne seront pas affich\u00e9s.
-playerBanned = \u00a7cPlayer {0} banned {1} for {2}
-playerInJail = \u00a7cLe joueur est d\u00e9j\u00e0 dans la prison {0}.
-playerJailed = \u00a77Le joueur {0} a \u00e9t\u00e9 emprisonn\u00e9.
-playerJailedFor = \u00a77{0} a \u00e9t\u00e9 emprisonn\u00e9 pour {1}.
-playerKicked = \u00a7cPlayer {0} kicked {1} for {2}
-playerMuted = \u00a77You have been muted
-playerMutedFor = \u00a77You have been muted for {0}
-playerNeverOnServer = \u00a7cLe joueur {0} n''a jamais \u00e9t\u00e9 sur le serveur.
-playerNotFound = \u00a7cLe joueur est introuvable.
-playerUnmuted = \u00a77You have been unmuted
-pong = Pong!
-possibleWorlds = \u00a77Les mondes possibles sont les nombres 0 par {0}.
-powerToolAir = La commande ne peut pas \u00eatre attach\u00e9e \u00e0 l''air.
-powerToolAlreadySet = Command \u00a7c{0}\u00a7f is already assigned to {1}.
-powerToolAttach = \u00a7c{0}\u00a7f command assigned to {1}.
-powerToolClearAll = All powertool commands have been cleared.
-powerToolList = {1} has the following commands: \u00a7c{0}\u00a7f.
-powerToolListEmpty = {0} has no commands assigned.
-powerToolNoSuchCommandAssigned = Command \u00a7c{0}\u00a7f has not been assigned to {1}.
-powerToolRemove = Command \u00a7c{0}\u00a7f removed from {1}.
-powerToolRemoveAll = All commands removed from {0}.
-powerToolsEnabled=All of your power tools have been enabled.
+noRules=\u00a7cIl n''y a pas encore de r\u00e8gles d\u00e9finies.
+noWarpsDefined=Aucun warps d\u00e9finis.
+none=aucun
+notAllowedToQuestion=\u00a7cVous n''\u00eates pas autoris\u00e9 \u00e0 poser des questions.
+notAllowedToShout=\u00a7cVous n''\u00eates pas autoris\u00e9 \u00e0 crier.
+notEnoughMoney=Vous n''avez pas les fonds n\u00e9cessaires.
+notRecommendedBukkit=La version de Bukkit n''est pas celle qui est recommand\u00e9 pour cette version de Essentials.
+notSupportedYet=Pas encore pris en charge.
+now=maintenant
+numberRequired=On a besoin d''un nombre ici, idiot.
+onlyDayNight=/time ne supporte que (jour) day/night (nuit).
+onlyPlayers=Seulement les joueurs en jeu peuvent utiliser {0}.
+onlySunStorm=/weather only supports sun/storm.
+pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
+pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
+pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
+pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time.
+pTimePlayers=These players have their own time:
+pTimeReset=Player time has been reset for: \u00a7e{0}
+pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
+pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
+parseError=Erreur de conversion {0} \u00e0 la ligne {1}
+pendingTeleportCancelled=\u00a7cRequete de t\u00e9l\u00e9portation annul\u00e9e.
+permissionsError=Permissions/GroupManager manquant, les pr\u00e9fixes et suffixes ne seront pas affich\u00e9s.
+playerBanned=\u00a7cPlayer {0} banned {1} for {2}
+playerInJail=\u00a7cLe joueur est d\u00e9j\u00e0 dans la prison {0}.
+playerJailed=\u00a77Le joueur {0} a \u00e9t\u00e9 emprisonn\u00e9.
+playerJailedFor=\u00a77{0} a \u00e9t\u00e9 emprisonn\u00e9 pour {1}.
+playerKicked=\u00a7cPlayer {0} kicked {1} for {2}
+playerMuted=\u00a77You have been muted
+playerMutedFor=\u00a77You have been muted for {0}
+playerNeverOnServer=\u00a7cLe joueur {0} n''a jamais \u00e9t\u00e9 sur le serveur.
+playerNotFound=\u00a7cLe joueur est introuvable.
+playerUnmuted=\u00a77You have been unmuted
+pong=Pong!
+possibleWorlds=\u00a77Les mondes possibles sont les nombres 0 par {0}.
+powerToolAir=La commande ne peut pas \u00eatre attach\u00e9e \u00e0 l''air.
+powerToolAlreadySet=Command \u00a7c{0}\u00a7f is already assigned to {1}.
+powerToolAttach=\u00a7c{0}\u00a7f command assigned to {1}.
+powerToolClearAll=All powertool commands have been cleared.
+powerToolList={1} has the following commands: \u00a7c{0}\u00a7f.
+powerToolListEmpty={0} has no commands assigned.
+powerToolNoSuchCommandAssigned=Command \u00a7c{0}\u00a7f has not been assigned to {1}.
+powerToolRemove=Command \u00a7c{0}\u00a7f removed from {1}.
+powerToolRemoveAll=All commands removed from {0}.
powerToolsDisabled=All of your power tools have been disabled.
-protectionOwner = \u00a76[EssentialsProtect] Propri\u00e9taire de la protection : {0}
-questionFormat = \u00a77[Question]\u00a7f {0}
-reloadAllPlugins = \u00a77Tous les plugins ont \u00e9t\u00e9 recharg\u00e9s.
-repair = You have successfully repaired your: \u00a7e{0}.
-repairAlreadyFixed = \u00a77This item does not need repairing.
-repairInvalidType = \u00a7cThis item cannot be repaired.
-repairNone = There were no items that needing repairing.
-requestAccepted = \u00a77Demande de t\u00e9l\u00e9portation accept\u00e9e.
-requestAcceptedFrom = \u00a77{0} accepted your teleport request.
-requestDenied = \u00a77Demande de t\u00e9l\u00e9portation refus\u00e9e.
-requestDeniedFrom = \u00a77{0} denied your teleport request.
-requestSent = \u00a77Requ\u00eate envoy\u00e9e \u00e0 {0}\u00a77.
-returnPlayerToJailError = Erreur survenue lors de la tentative d''emprisonner de nouveau un joueur.
-second = seconde
-seconds = secondes
-seenOffline = Le joueur {0} est hors ligne depuis {1}
-seenOnline = Le joueur {0} est en ligne depuis {1}
-serverFull = Le serveur est plein.
-setSpawner = Changed spawner type to {0}
-sheepMalformedColor = Couleur mal form\u00e9e.
-shoutFormat = \u00a77[Crie]\u00a7f {0}
-signFormatFail = \u00a74[{0}]
-signFormatSuccess = \u00a71[{0}]
-signFormatTemplate = [{0}]
-signProtectInvalidLocation = \u00a74You are not allowed to create sign here.
-similarWarpExist = Un warp avec un nom similaire existe d\u00e9j\u00e0.
-slimeMalformedSize = Taille mal form\u00e9e.
-soloMob = Ce monstre aime \u00eatre seul.
-spawnSet = \u00a77Le point de spawn a \u00e9t\u00e9 d\u00e9fini pour le groupe {0}.
-spawned = spawn\u00e9
-suicideMessage = \u00a77Au revoir monde cruel...
-suicideSuccess = \u00a77{0} a pris sa propre vie.
-takenFromAccount = \u00a7c{0} ont \u00e9t\u00e9 pris de votre compte.
-takenFromOthersAccount = \u00a7c{0} a \u00e9t\u00e9 prise de {1} compte.
-teleportAAll = \u00a77Teleporting request sent to all players...
-teleportAll = \u00a77T\u00e9l\u00e9poration de tous les joueurs.
-teleportAtoB = \u00a77{0}\u00a77 vous a t\u00e9l\u00e9port\u00e9 \u00e0 {1}\u00a77.
-teleportDisabled = {0} a la t\u00e9l\u00e9portation d\u00e9sactiv\u00e9.
-teleportHereRequest = \u00a7c{0}\u00a7c Vous a demand\u00e9 de vous t\u00e9l\u00e9porter \u00e0 lui/elle.
-teleportNewPlayerError = \u00c9chec de la t\u00e9l\u00e9portation du nouveau joueur.
-teleportRequest = \u00a7c{0}\u00a7c vous demande s''il peut se t\u00e9l\u00e9porter sur vous.
-teleportTop = \u00a77T\u00e9l\u00e9portation vers le haut.
-teleportationCommencing = \u00a77D\u00e9but de la t\u00e9l\u00e9portation....
-teleportationDisabled = \u00a77T\u00e9l\u00e9poration d\u00e9sactiv\u00e9.
-teleportationEnabled = \u00a77T\u00e9l\u00e9portation activ\u00e9e.
-teleporting = \u00a77T\u00e9l\u00e9poration en cours...
-teleportingPortal = \u00a77T\u00e9l\u00e9portation via portail.
-tempBanned = Banni temporairement du serveur pour {0}
-tempbanExempt = \u00a77You may not tempban that player
-thunder = Vous avez {0} la foudre dans votre monde.
-thunderDuration = Vous avez {0} la foudre dans le serveur {1} secondes.
-timeBeforeHeal = Temps avant le prochain soin : {0}
-timeBeforeTeleport = Temps avant prochaine t\u00e9l\u00e9portation {0}
-timeFormat = \u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
-timePattern = (?:([0-9]+)\\\\s*[ya][a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*mo[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*(?:sem|w)[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*[dj][a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*h[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*m[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*(?:s[a-z]*)?)?
-timeSet = Heure modifi\u00e9e dans tous les mondes.
-timeSetPermission = \u00a7cYou are not authorized to set the time.
-timeWorldCurrent = The current time in {0} is \u00a73{1}
-timeWorldSet = The time was set to {0} in: \u00a7c{1}
-tradeCompleted = \u00a77\u00c9change termin\u00e9.
-tradeSignEmpty = Le panneau de vente n''as pas encore assez de stock.
-tradeSignEmptyOwner = There is nothing to collect from this trade sign.
-treeFailure = \u00a7cEchec de la g\u00e9n\u00e9ration de l''arbre. Essayez de nouveau sur de l''herbe ou de la terre.
-treeSpawned = \u00a77Arbre cr\u00e9\u00e9.
-typeTpaccept = \u00a77Pour le t\u00e9l\u00e9porter, tapez \u00a7c/tpaccept\u00a77.
-typeTpdeny = \u00a77Pour d\u00e9cliner cette demande, entrez \u00a7c/tpdeny\u00a77.
-typeWorldName = \u00a77Vous pouvez aussi taper le nom d''un monde sp\u00e9cifique.
-unableToSpawnMob = Incapable de spawner un monstre.
-unbannedIP = Adresse IP d\u00e9banni.
-unbannedPlayer = Joueur d\u00e9banni.
-unignorePlayer = Vous n''ignorez plus {0}.
-unknownItemId = Num\u00e9ro d''objet inconnu : {0}
-unknownItemInList = L''objet {0} est inconnu dans la liste {1}.
-unknownItemName = Nom d''objet inconnu : {0}
-unlimitedItemPermission = \u00a7cPas de permission pour l''objet illimit\u00e9 {0}.
-unlimitedItems = Objets illimit\u00e9s:
-unmutedPlayer = Le joueur {0} n''est plus muet.
-upgradingFilesError = Erreur durant la mise \u00e0 jour des fichiers.
-userDoesNotExist = L''utilisateur {0} n''existe pas.
-userIsAway = {0} s''est mis en AFK
-userIsNotAway = {0} n''est plus inactif
-userJailed = \u00a77Vous avez \u00e9t\u00e9 emprisonn\u00e9
-userUsedPortal = {0} a utilis\u00e9 un portail existant.
-userdataMoveBackError = Echec du d\u00e9placement de userdata/{0}.tmp \u00e0 userdata/{1}
-userdataMoveError = Echec du d\u00e9placement de userdata/{0} \u00e0 userdata/{1}.tmp
-usingTempFolderForTesting = Utilise un fichier temporaire pour un test.
-versionMismatch = Versions diff\u00e9rentes! Mettez s''il vous pla\u00eet {0} \u00e0 la m\u00eame version.
-versionMismatchAll = Mauvaise version! S''il vous plait mettez des jars Essentiels de version identique.
-voiceSilenced = \u00a77Votre voix a \u00e9t\u00e9 r\u00e9duite au silence
-warpDeleteError = Probl\u00e8me concernant la suppression du fichier warp.
-warpListPermission = \u00a7cVous n''avez pas la permission d''afficher la liste des warps.
-warpNotExist = Ce warp n''existe pas.
-warpSet = \u00a77Le warp {0} a \u00e9t\u00e9 cr\u00e9\u00e9.
-warpUsePermission = \u00a7cVous n''avez pas la permission d''utiliser ce warp.
-warpingTo = \u00a77T\u00e9l\u00e9portation au warp {0}.
-warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
-weatherStorm = \u00a77Vous avez d\u00e9fini l''orage dans {0}
-weatherStormFor = \u00a77Vous avez d\u00e9fini l''orage dans {0} pour {1} secondes.
-weatherSun = \u00a77Vous avez mis le beau temps dans {0}
-weatherSunFor = \u00a77Vous avez mis le beau temps dans {0} pour {1} secondes.
-whoisGeoLocation = \u00a79 - Emplacement: {0}
-whoisHealth = \u00a79 - Vie: {0} / 20
-whoisIPAddress = \u00a79 - Adresse IP: {0}
-whoisIs = {0} est {1}
-whoisLocation = \u00a79 - Emplacement: ({0}, {1}, {2}, {3})
-whoisMoney = \u00a79 - Argent: {0}
-whoisStatusAvailable = \u00a79 - Statut: Disponible
-whoisStatusAway = \u00a79 - Statut: \u00a7cAilleurs\u00a7f
-worth = \u00a77Un stack de {0} vaut \u00a7c{1}\u00a77 ({2} objet(s) \u00e0 {3} chacun)
-worthMeta = \u00a77Un stack de {0} avec la m\u00e9tadonn\u00e9e de {1} vaut \u00a7c{2}\u00a77 ({3} objet(s) \u00e0 {4} chacun)
-worthSet = Valeur cr\u00e9e
-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.
-
-
+powerToolsEnabled=All of your power tools have been enabled.
+protectionOwner=\u00a76[EssentialsProtect] Propri\u00e9taire de la protection : {0}
+questionFormat=\u00a77[Question]\u00a7f {0}
+reloadAllPlugins=\u00a77Tous les plugins ont \u00e9t\u00e9 recharg\u00e9s.
+repair=You have successfully repaired your: \u00a7e{0}.
+repairAlreadyFixed=\u00a77This item does not need repairing.
+repairInvalidType=\u00a7cThis item cannot be repaired.
+repairNone=There were no items that needing repairing.
+requestAccepted=\u00a77Demande de t\u00e9l\u00e9portation accept\u00e9e.
+requestAcceptedFrom=\u00a77{0} accepted your teleport request.
+requestDenied=\u00a77Demande de t\u00e9l\u00e9portation refus\u00e9e.
+requestDeniedFrom=\u00a77{0} denied your teleport request.
+requestSent=\u00a77Requ\u00eate envoy\u00e9e \u00e0 {0}\u00a77.
+returnPlayerToJailError=Erreur survenue lors de la tentative d''emprisonner de nouveau un joueur.
+second=seconde
+seconds=secondes
+seenOffline=Le joueur {0} est hors ligne depuis {1}
+seenOnline=Le joueur {0} est en ligne depuis {1}
+serverFull=Le serveur est plein.
+setSpawner=Changed spawner type to {0}
+sheepMalformedColor=Couleur mal form\u00e9e.
+shoutFormat=\u00a77[Crie]\u00a7f {0}
+signFormatFail=\u00a74[{0}]
+signFormatSuccess=\u00a71[{0}]
+signFormatTemplate=[{0}]
+signProtectInvalidLocation=\u00a74You are not allowed to create sign here.
+similarWarpExist=Un warp avec un nom similaire existe d\u00e9j\u00e0.
+slimeMalformedSize=Taille mal form\u00e9e.
+soloMob=Ce monstre aime \u00eatre seul.
+spawnSet=\u00a77Le point de spawn a \u00e9t\u00e9 d\u00e9fini pour le groupe {0}.
+spawned=spawn\u00e9
+suicideMessage=\u00a77Au revoir monde cruel...
+suicideSuccess=\u00a77{0} a pris sa propre vie.
+survival=survival
+takenFromAccount=\u00a7c{0} ont \u00e9t\u00e9 pris de votre compte.
+takenFromOthersAccount=\u00a7c{0} a \u00e9t\u00e9 prise de {1} compte.
+teleportAAll=\u00a77Teleporting request sent to all players...
+teleportAll=\u00a77T\u00e9l\u00e9poration de tous les joueurs.
+teleportAtoB=\u00a77{0}\u00a77 vous a t\u00e9l\u00e9port\u00e9 \u00e0 {1}\u00a77.
+teleportDisabled={0} a la t\u00e9l\u00e9portation d\u00e9sactiv\u00e9.
+teleportHereRequest=\u00a7c{0}\u00a7c Vous a demand\u00e9 de vous t\u00e9l\u00e9porter \u00e0 lui/elle.
+teleportNewPlayerError=\u00c9chec de la t\u00e9l\u00e9portation du nouveau joueur.
+teleportRequest=\u00a7c{0}\u00a7c vous demande s''il peut se t\u00e9l\u00e9porter sur vous.
+teleportTop=\u00a77T\u00e9l\u00e9portation vers le haut.
+teleportationCommencing=\u00a77D\u00e9but de la t\u00e9l\u00e9portation....
+teleportationDisabled=\u00a77T\u00e9l\u00e9poration d\u00e9sactiv\u00e9.
+teleportationEnabled=\u00a77T\u00e9l\u00e9portation activ\u00e9e.
+teleporting=\u00a77T\u00e9l\u00e9poration en cours...
+teleportingPortal=\u00a77T\u00e9l\u00e9portation via portail.
+tempBanned=Banni temporairement du serveur pour {0}
+tempbanExempt=\u00a77You may not tempban that player
+thunder=Vous avez {0} la foudre dans votre monde.
+thunderDuration=Vous avez {0} la foudre dans le serveur {1} secondes.
+timeBeforeHeal=Temps avant le prochain soin : {0}
+timeBeforeTeleport=Temps avant prochaine t\u00e9l\u00e9portation {0}
+timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
+timePattern=(?:([0-9]+)\\\\s*[ya][a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*mo[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*(?:sem|w)[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*[dj][a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*h[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*m[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*(?:s[a-z]*)?)?
+timeSet=Heure modifi\u00e9e dans tous les mondes.
+timeSetPermission=\u00a7cYou are not authorized to set the time.
+timeWorldCurrent=The current time in {0} is \u00a73{1}
+timeWorldSet=The time was set to {0} in: \u00a7c{1}
+tradeCompleted=\u00a77\u00c9change termin\u00e9.
+tradeSignEmpty=Le panneau de vente n''as pas encore assez de stock.
+tradeSignEmptyOwner=There is nothing to collect from this trade sign.
+treeFailure=\u00a7cEchec de la g\u00e9n\u00e9ration de l''arbre. Essayez de nouveau sur de l''herbe ou de la terre.
+treeSpawned=\u00a77Arbre cr\u00e9\u00e9.
+true=true
+typeTpaccept=\u00a77Pour le t\u00e9l\u00e9porter, tapez \u00a7c/tpaccept\u00a77.
+typeTpdeny=\u00a77Pour d\u00e9cliner cette demande, entrez \u00a7c/tpdeny\u00a77.
+typeWorldName=\u00a77Vous pouvez aussi taper le nom d''un monde sp\u00e9cifique.
+unableToSpawnMob=Incapable de spawner un monstre.
+unbannedIP=Adresse IP d\u00e9banni.
+unbannedPlayer=Joueur d\u00e9banni.
+unignorePlayer=Vous n''ignorez plus {0}.
+unknownItemId=Num\u00e9ro d''objet inconnu : {0}
+unknownItemInList=L''objet {0} est inconnu dans la liste {1}.
+unknownItemName=Nom d''objet inconnu : {0}
+unlimitedItemPermission=\u00a7cPas de permission pour l''objet illimit\u00e9 {0}.
+unlimitedItems=Objets illimit\u00e9s:
+unmutedPlayer=Le joueur {0} n''est plus muet.
+upgradingFilesError=Erreur durant la mise \u00e0 jour des fichiers.
+userDoesNotExist=L''utilisateur {0} n''existe pas.
+userIsAway={0} s''est mis en AFK
+userIsNotAway={0} n''est plus inactif
+userJailed=\u00a77Vous avez \u00e9t\u00e9 emprisonn\u00e9
+userUsedPortal={0} a utilis\u00e9 un portail existant.
+userdataMoveBackError=Echec du d\u00e9placement de userdata/{0}.tmp \u00e0 userdata/{1}
+userdataMoveError=Echec du d\u00e9placement de userdata/{0} \u00e0 userdata/{1}.tmp
+usingTempFolderForTesting=Utilise un fichier temporaire pour un test.
+versionMismatch=Versions diff\u00e9rentes! Mettez s''il vous pla\u00eet {0} \u00e0 la m\u00eame version.
+versionMismatchAll=Mauvaise version! S''il vous plait mettez des jars Essentiels de version identique.
+voiceSilenced=\u00a77Votre voix a \u00e9t\u00e9 r\u00e9duite au silence
+warpDeleteError=Probl\u00e8me concernant la suppression du fichier warp.
+warpListPermission=\u00a7cVous n''avez pas la permission d''afficher la liste des warps.
+warpNotExist=Ce warp n''existe pas.
+warpSet=\u00a77Le warp {0} a \u00e9t\u00e9 cr\u00e9\u00e9.
+warpUsePermission=\u00a7cVous n''avez pas la permission d''utiliser ce warp.
+warpingTo=\u00a77T\u00e9l\u00e9portation au warp {0}.
+warps=Warps: {0}
+warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}.
+weatherStorm=\u00a77Vous avez d\u00e9fini l''orage dans {0}
+weatherStormFor=\u00a77Vous avez d\u00e9fini l''orage dans {0} pour {1} secondes.
+weatherSun=\u00a77Vous avez mis le beau temps dans {0}
+weatherSunFor=\u00a77Vous avez mis le beau temps dans {0} pour {1} secondes.
+whoisGamemode=\u00a79 - Gamemode: {0}
+whoisGeoLocation=\u00a79 - Emplacement: {0}
+whoisGod=\u00a79 - God mode: {0}
+whoisHealth=\u00a79 - Vie: {0} / 20
+whoisIPAddress=\u00a79 - Adresse IP: {0}
+whoisIs={0} est {1}
+whoisLocation=\u00a79 - Emplacement: ({0}, {1}, {2}, {3})
+whoisMoney=\u00a79 - Argent: {0}
+whoisOP=\u00a79 - OP: {0}
+whoisStatusAvailable=\u00a79 - Statut: Disponible
+whoisStatusAway=\u00a79 - Statut: \u00a7cAilleurs\u00a7f
+worth=\u00a77Un stack de {0} vaut \u00a7c{1}\u00a77 ({2} objet(s) \u00e0 {3} chacun)
+worthMeta=\u00a77Un stack de {0} avec la m\u00e9tadonn\u00e9e de {1} vaut \u00a7c{2}\u00a77 ({3} objet(s) \u00e0 {4} chacun)
+worthSet=Valeur cr\u00e9e
+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.
diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties
index f5d9fdc70..5907a1047 100644
--- a/Essentials/src/messages_nl.properties
+++ b/Essentials/src/messages_nl.properties
@@ -2,369 +2,378 @@
# Single quotes have to be doubled: ''
# Translations start here
# by: Geertje123
-action = * {0} {1}
-addedToAccount = \u00a7a{0} is gestort op je account.
-addedToOthersAccount = \u00a7a{0} is overgemaakt naar {1}''s rekening
-alertBroke = gebroken:
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3}
-alertPlaced = geplaatst:
-alertUsed = gebruikt:
+action=* {0} {1}
+addedToAccount=\u00a7a{0} is gestort op je account.
+addedToOthersAccount=\u00a7a{0} is overgemaakt naar {1}''s rekening
+alertBroke=gebroken:
+alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3}
+alertPlaced=geplaatst:
+alertUsed=gebruikt:
autoAfkKickReason=You have been kicked for idling more than {0} minutes.
-backAfterDeath = \u00a77Gebruik het /back command om terug te keren naar je sterfplaats.
-backUsageMsg = \u00a77Naar de vorige locatie aan het gaan.
-backupFinished = Backup voltooid
-backupStarted = Backup gestart
-balance = \u00a77Saldo: {0}
-balanceTop = \u00a77 Top {0} saldi
-banExempt = \u00a77Je kunt deze speler niet verbannen.
-banIpAddress = \u00a77Verbannen IP-adres
-bannedIpsFileError = Fout bij het lezen van banned-ips.txt
-bannedIpsFileNotFound = banned-ips.txt werd niet gevonden
-bannedPlayersFileError = Fout bij het lezen van banned-players.txt
-bannedPlayersFileNotFound = banned-players.txt werd niet gevonden
-bigTreeFailure = \u00a7cMaken van een grote boom is mislukt. Probeer het opnieuw op gras of dirt.
-bigTreeSuccess = \u00a77Grote boom gemaakt.
-broadcast = [\u00a7cBroadcast\u00a7f]\u00a7a {0}
-buildAlert = \u00a7cJe bent niet bevoegd om te bouwen
-bukkitFormatChanged = Bukkit versie formaat veranderd. Versie niet nagekeken.
-burnMsg = \u00a77Je hebt {0} voor {1} seconde(n) in de fik gezet.
-canTalkAgain = \u00a77Je kan weer praten.
-cantFindGeoIpDB = De GeoIP database kon niet gevonden worden!
-cantReadGeoIpDB = Fout bij het lezen van de GeoIP database!
-cantSpawnItem = \u00a7cJe bent niet bevoegd om {0} te spawnen.
-commandFailed = Opdracht {0} mislukt:
-commandHelpFailedForPlugin=Fout bij het \u200b\u200bkrijgen van hulp voor: {0}
-commandNotLoaded = \u00a7cOpdracht {0} is fout geladen.
-compassBearing = \u00a77Ligging: {0} ({1} graden).
-configFileMoveError = Het verplaatsen van config.yml naar de backup locatie is mislukt.
-configFileRenameError = Fout bij het hernoemen van de tijdelijke map naar config.yml
-connectedPlayers = Spelers online:
-connectionFailed = Fout bij het verbinden.
-cooldownWithMessage = \u00a7cAfkoeltijd: {0}
-corruptNodeInConfig = \u00a74Waarschuwing: Het configuratiebestand bevat een fout {0}.
-couldNotFindTemplate = Het sjabloon kon niet worden gevonden {0}
-creatingConfigFromTemplate = Bezig met aanmaken van een config vanaf sjabloon: {0}
-creatingEmptyConfig = Bezig met een lege config aanmaken: {0}
-day = dag
-days = dagen
-defaultBanReason = De Ban Hamer heeft gesproken!
-deleteFileError = Het bestand kon niet verwijderd worden: {0}
-deleteHome = \u00a77Home {0} has been removed.
-deleteJail = \u00a77Gevangenis {0} is verwijderd.
-deleteWarp = \u00a77Warp {0} is verwijderd.
-deniedAccessCommand = {0} was de toegang verboden tot het commando.
-dependancyDownloaded = [Essentials] Afhankelijkheid {0} succesvol gedownload.
-dependancyException = [Essentials] Er is een fout opgetreden bij het downloaden van de afhankelijkheid
-dependancyNotFound = [Essentials] Een afhankelijkheid is niet gevonden. Start downloaden.
-depth = \u00a77Je zit op zeeniveau.
-depthAboveSea = \u00a77Je zit {0} blok(ken) boven zeeniveau.
-depthBelowSea = \u00a77Je zit {0} blok(ken) onder zeeniveau.
-destinationNotSet = Bestemming niet ingesteld
-disableUnlimited = \u00a77Oneindig plaatsen van {0} uitgeschakeld voor {1}.
-disabled = uitgeschakeld
-dontMoveMessage = \u00a77Beginnen met teleporteren in {0}. Niet bewegen.
-downloadingGeoIp = Bezig met downloaden van GeoIP database ... Dit kan een tijdje duren (country: 0.6 MB, city: 20MB)
-duplicatedUserdata = Dubbele userdata: {0} en {1}.
-enableUnlimited = \u00a77Oneindig aantal {0} aan {1} gegeven.
-enabled = ingeschakeld
-errorCallingCommand = Fout bij het aanroepen van de opdracht /{0}
-errorWithMessage = \u00a7cFout: {0}
-essentialsReload = \u00a77Essentials is herladen {0}
-extinguish = \u00a77Je hebt jezelf geblust.
-extinguishOthers = \u00a77Je hebt {0} geblust.
-failedToCloseConfig = Fout bij het sluiten van config {0}
-failedToCreateConfig = Fout tijdens het aanmaken van config {0}
-failedToWriteConfig = Fout bij het cre\u00ebren van config {0}
-fileRenameError = Hernoemen van {0} mislukt
-foreverAlone = \u00a7cJe hebt niemand waarnaar je kan reageren.
-freedMemory = {0} MB gelost.
-gcchunks = chunks,
-gcentities = entities
-gcfree = Vrij geheugen: {0} MB
-gcmax = Maximaal geheugen: {0} MB
-gctotal = Gealloceerd geheugen: {0} MB
-geoIpUrlEmpty = GeoIP download url is leeg.
-geoIpUrlInvalid = GeoIP download url is ongeldig.
-geoipJoinFormat = Speler {0} komt uit {1}
-godDisabledFor = uitgeschakeld voor {0}
-godEnabledFor = ingeschakeld voor {0}
-godMode = \u00a77God mode {0}.
-haveBeenReleased = \u00a77Je bent bevrijdt
-heal = \u00a77Je bent genezen.
-healOther = \u00a77Je geneezde {0}.
-helpConsole = type ? om de consolehelp weer te geven.
-helpOp = \u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
-helpPages = Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f:
-holeInFloor = Gat in de vloer
-homeSet = \u00a77Home ingesteld.
-homeSetToBed = \u00a77Je home is is nu verplaatst naar dit bed.
-homes = Homes: {0}
-hour = uur
-hours = uren
-ignorePlayer = Je negeert {0} vanaf nu.
-illegalDate = Illegaal data formaat.
-infoChapter = Selecteer hoofdstuk:
-infoChapterPages = Hoofdstuk {0}, Pagina \u00a7c{1}\u00a7f van de \u00a7c{2}\u00a7f:
-infoFileDoesNotExist = Bestand info.txt bestaat niet. Bezig met aanmaken.
-infoPages = Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f:
-infoUnknownChapter = Onbekend hoofdstuk.
-invBigger = De inventory van de andere speler is groter dan die van jou.
-invRestored = Je inventory is hersteld.
-invSee = Je kijkt naar de inventory van {0}.
-invSeeHelp = Type /invsee om je inventory te herstellen.
-invalidCharge = \u00a7cOngeldig te laden.
-invalidMob = Ongeldig mob type.
-invalidServer = Ongeldige server!
-invalidSignLine = Regel {0} op het bordje is ongeldig.
-invalidWorld = \u00a7cOngeldige wereld.
-inventoryCleared = \u00a77inventory leeggemaakt.
-inventoryClearedOthers = \u00a77inventory van \u00a7c{0}\u00a77 leeggemaakt.
-is = is
-itemCannotBeSold = Dat voorwerp kan niet aan de server worden verkocht.
-itemMustBeStacked = Voorwerp moet geruild worden als stapel. Een hoeveelheid van 2 moet dus geruild worden als twee stapels, etc.
-itemNotEnough1 = \u00a7cJe hebt niet genoeg van dat voorwerp om te verkopen.
-itemNotEnough2 = \u00a77Type /sell itemname Als je alles daarvan wilt verkopen
-itemNotEnough3 = \u00a77/sell itemname -1 zorgt ervoor dat ze allemaal behalve 1 worden verkocht, etc.
-itemSellAir = Je wilde serieus lucht verkopen? Plaats een voorwerp in je hand.
-itemSold = \u00a77Verkocht voor \u00a7c{0} \u00a77({1} {2} voorwerpen voor {3} per stuk)
-itemSoldConsole = {0} verkocht {1} voor \u00a77{2} \u00a77({3} voorwerpen voor {4} per stuk)
-itemSpawn = \u00a77Geeft {0} {1}
-itemsCsvNotLoaded = De item kunnen niet geladen worden.csv.
-jailAlreadyIncarcerated = \u00a7cPerson is already in jail: {0}
-jailMessage = \u00a7cYou do the crime, you do the time.
-jailNotExist = Die gevangenis bestaat niet.
-jailReleased = \u00a77Player \u00a7e{0}\u00a77 unjailed.
-jailReleasedPlayerNotify = \u00a77You have been released!
-jailSentenceExtended = Jail time extend to: {0)
-jailSet = \u00a77Gevangenis {0} is ingesteld
-jumpError = Dat zou je computers hersenen beschadigen.
-kickDefault = Gekicked van de server
-kickExempt = \u00a77Je kunt die speler niet schoppen.
-kill = \u00a77Jij doodde {0}.
-kitError = \u00a7cEr zijn geen geldige kits.
-kitError2 = \u00a7cDie kit bestaat niet of is verkeerde beschreven.
-kitErrorHelp = \u00a7cMisschien mist er een hoeveelheid van het item in de configuratie?
-kitGive = \u00a77Kit {0} wordt gegeven.
-kitInvFull = \u00a7cJe inventory was vol, de kit wordt op de grond geplaatst
-kitTimed = \u00a7cJe kan die kit pas weer gebruiken over {0}.
-kits = \u00a77Kits: {0}
-lightningSmited = \u00a77Je bent zojuist verbrand
-lightningUse = \u00a77Brand {0}
-loadWarpError = Fout bij het laden van warp {0}
-loadinfo = Build {1} geladen {0} van {2}
-localFormat = Local: <{0}> {1}
-mailClear = \u00a7cType /mail clear, om ej berichten als gelezen te markeren.
-mailCleared = \u00a77Bericht geklaard!
-mailSent = \u00a77Bericht verzonden!
-markMailAsRead = \u00a7cType /mail clear, om je berichten als gelezen te markeren
-markedAsAway = \u00a77Je staat nu als afwezig gemeld.
-markedAsNotAway = \u00a77Je staat niet meer als afwezig gemeld.
+backAfterDeath=\u00a77Gebruik het /back command om terug te keren naar je sterfplaats.
+backUsageMsg=\u00a77Naar de vorige locatie aan het gaan.
+backupFinished=Backup voltooid
+backupStarted=Backup gestart
+balance=\u00a77Saldo: {0}
+balanceTop=\u00a77 Top {0} saldi
+banExempt=\u00a77Je kunt deze speler niet verbannen.
+banIpAddress=\u00a77Verbannen IP-adres
+bannedIpsFileError=Fout bij het lezen van banned-ips.txt
+bannedIpsFileNotFound=banned-ips.txt werd niet gevonden
+bannedPlayersFileError=Fout bij het lezen van banned-players.txt
+bannedPlayersFileNotFound=banned-players.txt werd niet gevonden
+bigTreeFailure=\u00a7cMaken van een grote boom is mislukt. Probeer het opnieuw op gras of dirt.
+bigTreeSuccess= \u00a77Grote boom gemaakt.
+broadcast=[\u00a7cBroadcast\u00a7f]\u00a7a {0}
+buildAlert=\u00a7cJe bent niet bevoegd om te bouwen
+bukkitFormatChanged=Bukkit versie formaat veranderd. Versie niet nagekeken.
+burnMsg=\u00a77Je hebt {0} voor {1} seconde(n) in de fik gezet.
+canTalkAgain=\u00a77Je kan weer praten.
+cantFindGeoIpDB=De GeoIP database kon niet gevonden worden!
+cantReadGeoIpDB=Fout bij het lezen van de GeoIP database!
+cantSpawnItem=\u00a7cJe bent niet bevoegd om {0} te spawnen.
+commandFailed=Opdracht {0} mislukt:
+commandHelpFailedForPlugin=Fout bij het \u200b\u200bkrijgen van hulp voor: {0}
+commandNotLoaded=\u00a7cOpdracht {0} is fout geladen.
+compassBearing=\u00a77Ligging: {0} ({1} graden).
+configFileMoveError=Het verplaatsen van config.yml naar de backup locatie is mislukt.
+configFileRenameError=Fout bij het hernoemen van de tijdelijke map naar config.yml
+connectedPlayers=Spelers online:
+connectionFailed=Fout bij het verbinden.
+cooldownWithMessage=\u00a7cAfkoeltijd: {0}
+corruptNodeInConfig=\u00a74Waarschuwing: Het configuratiebestand bevat een fout {0}.
+couldNotFindTemplate=Het sjabloon kon niet worden gevonden {0}
+creatingConfigFromTemplate=Bezig met aanmaken van een config vanaf sjabloon: {0}
+creatingEmptyConfig=Bezig met een lege config aanmaken: {0}
+creative=creative
+day=dag
+days=dagen
+defaultBanReason=De Ban Hamer heeft gesproken!
+deleteFileError=Het bestand kon niet verwijderd worden: {0}
+deleteHome=\u00a77Home {0} has been removed.
+deleteJail=\u00a77Gevangenis {0} is verwijderd.
+deleteWarp=\u00a77Warp {0} is verwijderd.
+deniedAccessCommand={0} was de toegang verboden tot het commando.
+dependancyDownloaded=[Essentials] Afhankelijkheid {0} succesvol gedownload.
+dependancyException=[Essentials] Er is een fout opgetreden bij het downloaden van de afhankelijkheid
+dependancyNotFound=[Essentials] Een afhankelijkheid is niet gevonden. Start downloaden.
+depth=\u00a77Je zit op zeeniveau.
+depthAboveSea=\u00a77Je zit {0} blok(ken) boven zeeniveau.
+depthBelowSea=\u00a77Je zit {0} blok(ken) onder zeeniveau.
+destinationNotSet=Bestemming niet ingesteld
+disableUnlimited=\u00a77Oneindig plaatsen van {0} uitgeschakeld voor {1}.
+disabled=uitgeschakeld
+dontMoveMessage=\u00a77Beginnen met teleporteren in {0}. Niet bewegen.
+downloadingGeoIp=Bezig met downloaden van GeoIP database ... Dit kan een tijdje duren (country: 0.6 MB, city: 20MB)
+duplicatedUserdata=Dubbele userdata: {0} en {1}.
+enableUnlimited=\u00a77Oneindig aantal {0} aan {1} gegeven.
+enabled=ingeschakeld
+errorCallingCommand=Fout bij het aanroepen van de opdracht /{0}
+errorWithMessage=\u00a7cFout: {0}
+essentialsReload=\u00a77Essentials is herladen {0}
+extinguish=\u00a77Je hebt jezelf geblust.
+extinguishOthers=\u00a77Je hebt {0} geblust.
+failedToCloseConfig=Fout bij het sluiten van config {0}
+failedToCreateConfig=Fout tijdens het aanmaken van config {0}
+failedToWriteConfig=Fout bij het cre\u00ebren van config {0}
+false=false
+fileRenameError=Hernoemen van {0} mislukt
+foreverAlone=\u00a7cJe hebt niemand waarnaar je kan reageren.
+freedMemory={0} MB gelost.
+gameMode=\u00a77Set game mode {0} for {1}.
+gcchunks= chunks,
+gcentities= entities
+gcfree=Vrij geheugen: {0} MB
+gcmax=Maximaal geheugen: {0} MB
+gctotal=Gealloceerd geheugen: {0} MB
+geoIpUrlEmpty=GeoIP download url is leeg.
+geoIpUrlInvalid=GeoIP download url is ongeldig.
+geoipJoinFormat=Speler {0} komt uit {1}
+godDisabledFor=uitgeschakeld voor {0}
+godEnabledFor=ingeschakeld voor {0}
+godMode=\u00a77God mode {0}.
+haveBeenReleased=\u00a77Je bent bevrijdt
+heal=\u00a77Je bent genezen.
+healOther=\u00a77Je geneezde {0}.
+helpConsole=type ? om de consolehelp weer te geven.
+helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
+helpPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f:
+holeInFloor=Gat in de vloer
+homeSet=\u00a77Home ingesteld.
+homeSetToBed=\u00a77Je home is is nu verplaatst naar dit bed.
+homes=Homes: {0}
+hour=uur
+hours=uren
+ignorePlayer=Je negeert {0} vanaf nu.
+illegalDate=Illegaal data formaat.
+infoChapter=Selecteer hoofdstuk:
+infoChapterPages=Hoofdstuk {0}, Pagina \u00a7c{1}\u00a7f van de \u00a7c{2}\u00a7f:
+infoFileDoesNotExist=Bestand info.txt bestaat niet. Bezig met aanmaken.
+infoPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f:
+infoUnknownChapter=Onbekend hoofdstuk.
+invBigger=De inventory van de andere speler is groter dan die van jou.
+invRestored=Je inventory is hersteld.
+invSee=Je kijkt naar de inventory van {0}.
+invSeeHelp=Type /invsee om je inventory te herstellen.
+invalidCharge=\u00a7cOngeldig te laden.
+invalidMob=Ongeldig mob type.
+invalidServer=Ongeldige server!
+invalidSignLine=Regel {0} op het bordje is ongeldig.
+invalidWorld=\u00a7cOngeldige wereld.
+inventoryCleared=\u00a77inventory leeggemaakt.
+inventoryClearedOthers=\u00a77inventory van \u00a7c{0}\u00a77 leeggemaakt.
+is=is
+itemCannotBeSold=Dat voorwerp kan niet aan de server worden verkocht.
+itemMustBeStacked=Voorwerp moet geruild worden als stapel. Een hoeveelheid van 2 moet dus geruild worden als twee stapels, etc.
+itemNotEnough1=\u00a7cJe hebt niet genoeg van dat voorwerp om te verkopen.
+itemNotEnough2=\u00a77Type /sell itemname Als je alles daarvan wilt verkopen
+itemNotEnough3=\u00a77/sell itemname -1 zorgt ervoor dat ze allemaal behalve 1 worden verkocht, etc.
+itemSellAir=Je wilde serieus lucht verkopen? Plaats een voorwerp in je hand.
+itemSold=\u00a77Verkocht voor \u00a7c{0} \u00a77({1} {2} voorwerpen voor {3} per stuk)
+itemSoldConsole={0} verkocht {1} voor \u00a77{2} \u00a77({3} voorwerpen voor {4} per stuk)
+itemSpawn=\u00a77Geeft {0} {1}
+itemsCsvNotLoaded=De item kunnen niet geladen worden.csv.
+jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0}
+jailMessage=\u00a7cYou do the crime, you do the time.
+jailNotExist=Die gevangenis bestaat niet.
+jailReleased=\u00a77Player \u00a7e{0}\u00a77 unjailed.
+jailReleasedPlayerNotify=\u00a77You have been released!
+jailSentenceExtended=Jail time extend to: {0)
+jailSet=\u00a77Gevangenis {0} is ingesteld
+jumpError=Dat zou je computers hersenen beschadigen.
+kickDefault=Gekicked van de server
+kickExempt=\u00a77Je kunt die speler niet schoppen.
+kill=\u00a77Jij doodde {0}.
+kitError=\u00a7cEr zijn geen geldige kits.
+kitError2=\u00a7cDie kit bestaat niet of is verkeerde beschreven.
+kitErrorHelp=\u00a7cMisschien mist er een hoeveelheid van het item in de configuratie?
+kitGive=\u00a77Kit {0} wordt gegeven.
+kitInvFull=\u00a7cJe inventory was vol, de kit wordt op de grond geplaatst
+kitTimed=\u00a7cJe kan die kit pas weer gebruiken over {0}.
+kits=\u00a77Kits: {0}
+lightningSmited=\u00a77Je bent zojuist verbrand
+lightningUse=\u00a77Brand {0}
+loadWarpError=Fout bij het laden van warp {0}
+loadinfo=Build {1} geladen {0} van {2}
+localFormat=Local: <{0}> {1}
+mailClear=\u00a7cType /mail clear, om ej berichten als gelezen te markeren.
+mailCleared=\u00a77Bericht geklaard!
+mailSent=\u00a77Bericht verzonden!
+markMailAsRead=\u00a7cType /mail clear, om je berichten als gelezen te markeren
+markedAsAway=\u00a77Je staat nu als afwezig gemeld.
+markedAsNotAway=\u00a77Je staat niet meer als afwezig gemeld.
maxHomes=You cannot set more than {0} homes.
-mayNotJail = \u00a7cJe mag die speler niet in de gevangenis zetten.
-me = me
-minute = minuut
-minutes = minuten
-missingItems = Je hebt geen {0}x {1}.
-missingPrefixSuffix = Er mist een prefix of suffix voor {0}
-mobSpawnError = Fout bij het veranderen van de mob spawner.
-mobSpawnLimit = Grootte van de mob hang af van het server limiet
-mobSpawnTarget = Target blok moet een mob spawner zijn.
-moneyRecievedFrom = \u00a7a{0} is ontvangen van {1}
-moneySentTo = \u00a7a{0} is verzonden naar {1}
-moneyTaken = {0} van je bankrekening afgehaald.
-month = maand
-months = maanden
-moreThanZero = Het aantal moet groter zijn dan 0.
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-muteExempt = \u00a7cJe kan deze speler niet muten.
-mutedPlayer = Speler {0} gemute.
-mutedPlayerFor = Speler {0} is gemute voor {1}.
-mutedUserSpeaks = {0} probeerde te praten, maar is gemute.
-needTpohere = Je moet toegang krijgen tot /tpohere om naar andere spelers te teleporteren.
-negativeBalanceError = Speler is niet toegestaan om een negatief saldo te hebben.
-nickChanged = Nickname veranderd.
+mayNotJail=\u00a7cJe mag die speler niet in de gevangenis zetten.
+me=me
+minute=minuut
+minutes=minuten
+missingItems=Je hebt geen {0}x {1}.
+missingPrefixSuffix=Er mist een prefix of suffix voor {0}
+mobSpawnError=Fout bij het veranderen van de mob spawner.
+mobSpawnLimit=Grootte van de mob hang af van het server limiet
+mobSpawnTarget=Target blok moet een mob spawner zijn.
+mobsAvailable=\u00a77Mobs: {0}
+moneyRecievedFrom=\u00a7a{0} is ontvangen van {1}
+moneySentTo=\u00a7a{0} is verzonden naar {1}
+moneyTaken={0} van je bankrekening afgehaald.
+month=maand
+months=maanden
+moreThanZero=Het aantal moet groter zijn dan 0.
+msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
+muteExempt=\u00a7cJe kan deze speler niet muten.
+mutedPlayer=Speler {0} gemute.
+mutedPlayerFor=Speler {0} is gemute voor {1}.
+mutedUserSpeaks={0} probeerde te praten, maar is gemute.
+needTpohere=Je moet toegang krijgen tot /tpohere om naar andere spelers te teleporteren.
+negativeBalanceError=Speler is niet toegestaan om een negatief saldo te hebben.
+nickChanged=Nickname veranderd.
nickDisplayName=\u00a77You have to enable change-displayname in Essentials config.
-nickInUse = \u00a7cDie naam is al in gebruik.
-nickNamesAlpha = \u00a7cNicknames moeten alfanumeriek zijn.
-nickNoMore = \u00a7Je hebt geen nickname meer.
-nickOthersPermission = \u00a7cJe hebt geen toestemming om de nickname van anderen te veranderen
-nickSet = \u00a77Je nickname is nu \u00a7c{0}
-noAccessCommand = \u00a7cJe hebt geen toegang tot die opdracht.
-noAccessPermission = \u00a7cJe hebt hier geen toegang voor {0}.
-noDestroyPermission = \u00a7cJe hebt geen toegang om dat te vernietigen {0}.
-noHelpFound = \u00a7cNo matching commands.
-noHomeSet = Je hebt geen home gemaakt.
-noHomeSetPlayer = Speler heeft geen home.
-noKitPermission = \u00a7cJe hebt de \u00a7c{0}\u00a7c toestemming nodig om die kit te gebruiken.
-noKits = \u00a77Er zijn nog geen kits beschikbaar
-noMail = Je hebt geen berichten
-noMailSendPerm = \u00a7cJe hebt de \u00a7fessentials.mail.send\u00a7c toestemming niet.
-noMotd = \u00a7cEr is geen bericht van de dag.
-noNewMail = \u00a77Je hebt geen nieuwe berichten.
-noPendingRequest = Je hebt geen aanvragen.
-noPlacePermission = \u00a7cJe hebt geen toestemming om een blok naast die sign te plaatsen.
+nickInUse=\u00a7cDie naam is al in gebruik.
+nickNamesAlpha=\u00a7cNicknames moeten alfanumeriek zijn.
+nickNoMore=\u00a7Je hebt geen nickname meer.
+nickOthersPermission=\u00a7cJe hebt geen toestemming om de nickname van anderen te veranderen
+nickSet=\u00a77Je nickname is nu \u00a7c{0}
+noAccessCommand=\u00a7cJe hebt geen toegang tot die opdracht.
+noAccessPermission=\u00a7cJe hebt hier geen toegang voor {0}.
+noDestroyPermission=\u00a7cJe hebt geen toegang om dat te vernietigen {0}.
+noGodWorldWarning=\u00a7cWarning! God mode in this world disabled.
+noHelpFound=\u00a7cNo matching commands.
+noHomeSet=Je hebt geen home gemaakt.
+noHomeSetPlayer=Speler heeft geen home.
+noKitPermission=\u00a7cJe hebt de \u00a7c{0}\u00a7c toestemming nodig om die kit te gebruiken.
+noKits=\u00a77Er zijn nog geen kits beschikbaar
+noMail=Je hebt geen berichten
+noMailSendPerm=\u00a7cJe hebt de \u00a7fessentials.mail.send\u00a7c toestemming niet.
+noMotd=\u00a7cEr is geen bericht van de dag.
+noNewMail=\u00a77Je hebt geen nieuwe berichten.
+noPendingRequest=Je hebt geen aanvragen.
+noPlacePermission=\u00a7cJe hebt geen toestemming om een blok naast die sign te plaatsen.
noPowerTools=You have no power tools assigned.
-noRules = \u00a7cEr zijn nog geen regels gegeven.
-noWarpsDefined = Geen warps gedefinieerd
-none = geen
-notAllowedToQuestion = \u00a7cJe bent niet bevoegd om de vraag functie te gebruiken.
-notAllowedToShout = \u00a7cJe bent niet bevoegd om de roep functie te gebruiken.
-notEnoughMoney = Je hebt niet voldoende middelen.
-notRecommendedBukkit = De Bukkit versie is niet de aangeraden build voor Essentials.
-notSupportedYet = Nog niet ondersteund.
-now = nu
-numberRequired = Er moet daar een nummer, grapjas.
-onlyDayNight = /time ondersteund alleen day/night.
-onlyPlayers = Alleen in-game spelers kunnen {0} gebruiken.
-onlySunStorm = /weather only supports sun/storm.
-pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
-pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
-pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
-pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
-pTimePlayers = These players have their own time:
-pTimeReset = Player time has been reset for: \u00a7e{0}
-pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
-pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
-parseError = Fout bij ontleding {0} op regel {1}
-pendingTeleportCancelled = \u00a7cAangevraagde teleportatie afgelast.
-permissionsError = Permissions/GroupManager ontbreekt; chat prefixes/suffixes worden uitgeschakeld.
-playerBanned = \u00a7cPlayer {0} banned {1} for {2}
-playerInJail = \u00a7cSpeler zit al in de gevangenis {0}.
-playerJailed = \u00a77Speler {0} is in de gevangenis gezet.
-playerJailedFor = \u00a77Speler {0} is in de gevangenis gezet voor {1}.
-playerKicked = \u00a7cPlayer {0} kicked {1} for {2}
-playerMuted = \u00a77Je kreeg het zwijgen opgelegd.
-playerMutedFor = \u00a77Je kreeg het zwijgen opgelegd voor {0}
-playerNeverOnServer = \u00a7cSpeler {0} is nooit op deze server geweest.
-playerNotFound = \u00a7cSpeler niet gevonden.
-playerUnmuted = \u00a77Speler mag weer praten
-pong = Pong!
-possibleWorlds = \u00a77Mogelijk zijn de werelden de nummer 0 tot en met {0}.
-powerToolAir = Command kan niet worden bevestigd aan lucht.
-powerToolAlreadySet = Command \u00a7c{0}\u00a7f is already assigned to {1}.
-powerToolAttach = \u00a7c{0}\u00a7f command assigned to {1}.
-powerToolClearAll = All powertool commands have been cleared.
-powerToolList = {1} has the following commands: \u00a7c{0}\u00a7f.
-powerToolListEmpty = {0} has no commands assigned.
-powerToolNoSuchCommandAssigned = Command \u00a7c{0}\u00a7f has not been assigned to {1}.
-powerToolRemove = Command \u00a7c{0}\u00a7f removed from {1}.
-powerToolRemoveAll = All commands removed from {0}.
-powerToolsEnabled=All of your power tools have been enabled.
+noRules=\u00a7cEr zijn nog geen regels gegeven.
+noWarpsDefined=Geen warps gedefinieerd
+none=geen
+notAllowedToQuestion=\u00a7cJe bent niet bevoegd om de vraag functie te gebruiken.
+notAllowedToShout=\u00a7cJe bent niet bevoegd om de roep functie te gebruiken.
+notEnoughMoney=Je hebt niet voldoende middelen.
+notRecommendedBukkit=De Bukkit versie is niet de aangeraden build voor Essentials.
+notSupportedYet=Nog niet ondersteund.
+now=nu
+numberRequired=Er moet daar een nummer, grapjas.
+onlyDayNight=/time ondersteund alleen day/night.
+onlyPlayers=Alleen in-game spelers kunnen {0} gebruiken.
+onlySunStorm=/weather only supports sun/storm.
+pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
+pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
+pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
+pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time.
+pTimePlayers=These players have their own time:
+pTimeReset=Player time has been reset for: \u00a7e{0}
+pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
+pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
+parseError=Fout bij ontleding {0} op regel {1}
+pendingTeleportCancelled=\u00a7cAangevraagde teleportatie afgelast.
+permissionsError=Permissions/GroupManager ontbreekt; chat prefixes/suffixes worden uitgeschakeld.
+playerBanned=\u00a7cPlayer {0} banned {1} for {2}
+playerInJail=\u00a7cSpeler zit al in de gevangenis {0}.
+playerJailed=\u00a77Speler {0} is in de gevangenis gezet.
+playerJailedFor= \u00a77Speler {0} is in de gevangenis gezet voor {1}.
+playerKicked=\u00a7cPlayer {0} kicked {1} for {2}
+playerMuted=\u00a77Je kreeg het zwijgen opgelegd.
+playerMutedFor=\u00a77Je kreeg het zwijgen opgelegd voor {0}
+playerNeverOnServer=\u00a7cSpeler {0} is nooit op deze server geweest.
+playerNotFound=\u00a7cSpeler niet gevonden.
+playerUnmuted=\u00a77Speler mag weer praten
+pong=Pong!
+possibleWorlds=\u00a77Mogelijk zijn de werelden de nummer 0 tot en met {0}.
+powerToolAir=Command kan niet worden bevestigd aan lucht.
+powerToolAlreadySet=Command \u00a7c{0}\u00a7f is already assigned to {1}.
+powerToolAttach=\u00a7c{0}\u00a7f command assigned to {1}.
+powerToolClearAll=All powertool commands have been cleared.
+powerToolList={1} has the following commands: \u00a7c{0}\u00a7f.
+powerToolListEmpty={0} has no commands assigned.
+powerToolNoSuchCommandAssigned=Command \u00a7c{0}\u00a7f has not been assigned to {1}.
+powerToolRemove=Command \u00a7c{0}\u00a7f removed from {1}.
+powerToolRemoveAll=All commands removed from {0}.
powerToolsDisabled=All of your power tools have been disabled.
-protectionOwner = \u00a76[EssentialsProtect] Beschermingeigenaar: {0}
-questionFormat = \u00a77[Vraag]\u00a7f {0}
-reloadAllPlugins = \u00a77Alle plugins zijn herladen.
-repair = You have successfully repaired your: \u00a7e{0}.
-repairAlreadyFixed = \u00a77This item does not need repairing.
-repairInvalidType = \u00a7cThis item cannot be repaired.
-repairNone = There were no items that needing repairing.
-requestAccepted = \u00a77Teleporteer aanvraag geaccepteerd.
-requestAcceptedFrom = \u00a77{0} accepted your teleport request.
-requestDenied = \u00a77Teleporteer aanvraag geweigerd.
-requestDeniedFrom = \u00a77{0} denied your teleport request.
-requestSent = \u00a77Aanvraag verstuurd naar {0}\u00a77.
-returnPlayerToJailError = Fout opgetreden bij terugzetten van speler in gevangenis.
-second = seconde
-seconds = seconde
-seenOffline = Speler {0} is offline vanaf {1}
-seenOnline = Speler {0} is online vanaf {1}
-serverFull = Server is vol
-setSpawner = Changed spawner type to {0}
-sheepMalformedColor = Misvoormde kleur.
-shoutFormat = \u00a77[Shout]\u00a7f {0}
-signFormatFail = \u00a74[{0}]
-signFormatSuccess = \u00a71[{0}]
-signFormatTemplate = [{0}]
-signProtectInvalidLocation = \u00a74You are not allowed to create sign here.
-similarWarpExist = Er bestaat al een warp met dezelfde naam.
-slimeMalformedSize = Misvoormde grootte.
-soloMob = Die mob is liever in zijn eentje
-spawnSet = \u00a77Spawn locatie voor de groep {0} ingesteld.
-spawned = gespawned
-suicideMessage = \u00a77Vaarwel vreedzame wereld...
-suicideSuccess = \u00a77{0} pleegde zelfmoord
-takenFromAccount = \u00a7c{0} is van je bank rekening afgehaald.
-takenFromOthersAccount = \u00a7c{0} is overgenomen uit {1} account.
-teleportAAll = \u00a77Teleporting request sent to all players...
-teleportAll = \u00a77Bezig met teleporteren van alle spelers...
-teleportAtoB = \u00a77{0}\u00a77 is naar {1}\u00a77 geteleporteerd.
-teleportDisabled = {0} heeft teleporteren uit gezet.
-teleportHereRequest = \u00a7c{0}\u00a7c Heeft gevraagd of hij/zij naar jou mag teleporteren.
-teleportNewPlayerError = Fout bij het teleporteren van nieuwe speler.
-teleportRequest = \u00a7c{0}\u00a7c vraagt of hij jou kan teleporteren.
-teleportTop = \u00a77Bezig met teleporteren naar de top.
-teleportationCommencing = \u00a77Aan het beginnen met teleporteren...
-teleportationDisabled = \u00a77Teleportatie uitgeschakeld.
-teleportationEnabled = \u00a77Teleportatie ingeschakeld.
-teleporting = \u00a77Bezig met teleporteren...
-teleportingPortal = \u00a77Bezig met teleporteren via de portal.
-tempBanned = Tijdelijk geband voor {0}
-tempbanExempt = \u00a77Je mag deze speler niet een tempban geven
-thunder = Je {0} onweert de wereld
-thunderDuration = Je {0} onweert de wereld voor {1} seconde.
-timeBeforeHeal = Afkoeltijd tot de volgende heal: {0}
-timeBeforeTeleport = Afkoeltijd tot de volgende teleport: {0}
-timeFormat = \u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
-timePattern = (?:([0-9]+)\\s*[yj][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[oa][a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[hu][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-timeSet = Tijd ingesteld in alle werelden.
-timeSetPermission = \u00a7cYou are not authorized to set the time.
-timeWorldCurrent = The current time in {0} is \u00a73{1}
-timeWorldSet = The time was set to {0} in: \u00a7c{1}
-tradeCompleted = \u00a77Ruil verricht.
-tradeSignEmpty = Het handelsbordje heeft een te kleine voorraad.
-tradeSignEmptyOwner = There is nothing to collect from this trade sign.
-treeFailure = \u00a7cFout bij het genereren van boom. Pobeer het opnieuw op gras of dirt.
-treeSpawned = \u00a77Boom gespawned.
-typeTpaccept = \u00a77Om te teleporten, type \u00a7c/tpaccept\u00a77.
-typeTpdeny = \u00a77Om te weigeren, type \u00a7c/tpdeny\u00a77.
-typeWorldName = \u00a77Je kan ook de exacte naam van de wereld typen.
-unableToSpawnMob = De mob kan niet gespawned worden.
-unbannedIP = IP adres ontbannen.
-unbannedPlayer = Speler ontbannen.
-unignorePlayer = Je negeert {0} niet meer.
-unknownItemId = Onbekend voorwerp id: {0}
-unknownItemInList = Onbekend voorwerp {0} in {1} lijst.
-unknownItemName = Onbekende voorwerp naam: {0}
-unlimitedItemPermission = \u00a7cOnbevoegd om oneindig {0} te hebben.
-unlimitedItems = Oneindige voorwerpen:
-unmutedPlayer = Speler {0} mag weer spreken.
-upgradingFilesError = Fout tijdens het upgraden van de bestanden
-userDoesNotExist = Speler {0} bestaat niet.
-userIsAway = {0} is nu AFK
-userIsNotAway = {0} is niet meer AFK
-userJailed = \u00a77Je bent in de gevangenis gezet.
-userUsedPortal = {0} gebruikte een bestaande uitgangs portal.
-userdataMoveBackError = Fout bij het verplaasten van userdata/{0}.tmp naar userdata/{1}
-userdataMoveError = Fout bij het verplaasten van userdata/{0} naar userdata/{1}.tmp
-usingTempFolderForTesting = Tijdelijke map om te testen:
-versionMismatch = Verkeerde versie! Update {0} naar dezelfde versie.
-versionMismatchAll = Verkeerde versie! Update alle Essentials jars naar dezelfde versie.
-voiceSilenced = \u00a77Je kan niet meer praten
-warpDeleteError = Fout bij het verwijderen van het warp bestand.
-warpListPermission = \u00a7cJe hebt geen toegang om die warp te maken.
-warpNotExist = Die warp bestaat niet.
-warpSet = \u00a77Warp {0} ingesteld.
-warpUsePermission = \u00a7cOnbevoegd om die warp te gebruiken.
-warpingTo = \u00a77Aan het warpen naar {0}.
-warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
-weatherStorm = \u00a77Je hebt het weer naar storm gezet in de {0}
-weatherStormFor = \u00a77Je hebt het weer in de {0} naar storm gezet voor {1} seconde
-weatherSun = \u00a77Je hebt het weer naar zon gezet in de {0}
-weatherSunFor = \u00a77Je hebt het weer in de {0} naar zon gezet voor {1} seconde
-whoisGeoLocation = \u00a79 - Locatie: {0}
-whoisHealth = \u00a79 - Levens: {0}/20
-whoisIPAddress = \u00a79 - IP Adres: {0}
-whoisIs = {0} is {1}
-whoisLocation = \u00a79 - Locatie: ({0}, {1}, {2}, {3})
-whoisMoney = \u00a79 - Geld: {0}
-whoisStatusAvailable = \u00a79 - Status: Beschikbaar
-whoisStatusAway = \u00a79 - Status: \u00a7cWeg\u00a7f
-worth = \u00a77Stapel {0} met waarde \u00a7c{1}\u00a77 ({2} voorwerp(en) voor {3} per stuk)
-worthMeta = \u00a77Stapel {0} met een metadata van {1} met waarde \u00a7c{2}\u00a77 ({3} voorwerp(en) voor {4} per stuk)
-worthSet = Waarde ingesteld
-year = jaar
-years = jaren
-youAreHealed = \u00a77Je bent genezen.
-youHaveNewMail = \u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken.
-
-
+powerToolsEnabled=All of your power tools have been enabled.
+protectionOwner=\u00a76[EssentialsProtect] Beschermingeigenaar: {0}
+questionFormat=\u00a77[Vraag]\u00a7f {0}
+reloadAllPlugins=\u00a77Alle plugins zijn herladen.
+repair=You have successfully repaired your: \u00a7e{0}.
+repairAlreadyFixed=\u00a77This item does not need repairing.
+repairInvalidType=\u00a7cThis item cannot be repaired.
+repairNone=There were no items that needing repairing.
+requestAccepted=\u00a77Teleporteer aanvraag geaccepteerd.
+requestAcceptedFrom=\u00a77{0} accepted your teleport request.
+requestDenied=\u00a77Teleporteer aanvraag geweigerd.
+requestDeniedFrom=\u00a77{0} denied your teleport request.
+requestSent=\u00a77Aanvraag verstuurd naar {0}\u00a77.
+returnPlayerToJailError=Fout opgetreden bij terugzetten van speler in gevangenis.
+second=seconde
+seconds=seconde
+seenOffline=Speler {0} is offline vanaf {1}
+seenOnline=Speler {0} is online vanaf {1}
+serverFull=Server is vol
+setSpawner=Changed spawner type to {0}
+sheepMalformedColor=Misvoormde kleur.
+shoutFormat=\u00a77[Shout]\u00a7f {0}
+signFormatFail=\u00a74[{0}]
+signFormatSuccess=\u00a71[{0}]
+signFormatTemplate=[{0}]
+signProtectInvalidLocation=\u00a74You are not allowed to create sign here.
+similarWarpExist=Er bestaat al een warp met dezelfde naam.
+slimeMalformedSize=Misvoormde grootte.
+soloMob=Die mob is liever in zijn eentje
+spawnSet=\u00a77Spawn locatie voor de groep {0} ingesteld.
+spawned=gespawned
+suicideMessage=\u00a77Vaarwel vreedzame wereld...
+suicideSuccess= \u00a77{0} pleegde zelfmoord
+survival=survival
+takenFromAccount=\u00a7c{0} is van je bank rekening afgehaald.
+takenFromOthersAccount=\u00a7c{0} is overgenomen uit {1} account.
+teleportAAll=\u00a77Teleporting request sent to all players...
+teleportAll=\u00a77Bezig met teleporteren van alle spelers...
+teleportAtoB=\u00a77{0}\u00a77 is naar {1}\u00a77 geteleporteerd.
+teleportDisabled={0} heeft teleporteren uit gezet.
+teleportHereRequest=\u00a7c{0}\u00a7c Heeft gevraagd of hij/zij naar jou mag teleporteren.
+teleportNewPlayerError=Fout bij het teleporteren van nieuwe speler.
+teleportRequest=\u00a7c{0}\u00a7c vraagt of hij jou kan teleporteren.
+teleportTop=\u00a77Bezig met teleporteren naar de top.
+teleportationCommencing=\u00a77Aan het beginnen met teleporteren...
+teleportationDisabled=\u00a77Teleportatie uitgeschakeld.
+teleportationEnabled=\u00a77Teleportatie ingeschakeld.
+teleporting=\u00a77Bezig met teleporteren...
+teleportingPortal=\u00a77Bezig met teleporteren via de portal.
+tempBanned=Tijdelijk geband voor {0}
+tempbanExempt=\u00a77Je mag deze speler niet een tempban geven
+thunder= Je {0} onweert de wereld
+thunderDuration=Je {0} onweert de wereld voor {1} seconde.
+timeBeforeHeal=Afkoeltijd tot de volgende heal: {0}
+timeBeforeTeleport=Afkoeltijd tot de volgende teleport: {0}
+timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
+timePattern=(?:([0-9]+)\\s*[yj][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[oa][a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[hu][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
+timeSet=Tijd ingesteld in alle werelden.
+timeSetPermission=\u00a7cYou are not authorized to set the time.
+timeWorldCurrent=The current time in {0} is \u00a73{1}
+timeWorldSet=The time was set to {0} in: \u00a7c{1}
+tradeCompleted=\u00a77Ruil verricht.
+tradeSignEmpty=Het handelsbordje heeft een te kleine voorraad.
+tradeSignEmptyOwner=There is nothing to collect from this trade sign.
+treeFailure=\u00a7cFout bij het genereren van boom. Pobeer het opnieuw op gras of dirt.
+treeSpawned=\u00a77Boom gespawned.
+true=true
+typeTpaccept=\u00a77Om te teleporten, type \u00a7c/tpaccept\u00a77.
+typeTpdeny=\u00a77Om te weigeren, type \u00a7c/tpdeny\u00a77.
+typeWorldName=\u00a77Je kan ook de exacte naam van de wereld typen.
+unableToSpawnMob=De mob kan niet gespawned worden.
+unbannedIP=IP adres ontbannen.
+unbannedPlayer=Speler ontbannen.
+unignorePlayer=Je negeert {0} niet meer.
+unknownItemId=Onbekend voorwerp id: {0}
+unknownItemInList=Onbekend voorwerp {0} in {1} lijst.
+unknownItemName=Onbekende voorwerp naam: {0}
+unlimitedItemPermission=\u00a7cOnbevoegd om oneindig {0} te hebben.
+unlimitedItems=Oneindige voorwerpen:
+unmutedPlayer=Speler {0} mag weer spreken.
+upgradingFilesError=Fout tijdens het upgraden van de bestanden
+userDoesNotExist=Speler {0} bestaat niet.
+userIsAway={0} is nu AFK
+userIsNotAway={0} is niet meer AFK
+userJailed=\u00a77Je bent in de gevangenis gezet.
+userUsedPortal={0} gebruikte een bestaande uitgangs portal.
+userdataMoveBackError=Fout bij het verplaasten van userdata/{0}.tmp naar userdata/{1}
+userdataMoveError=Fout bij het verplaasten van userdata/{0} naar userdata/{1}.tmp
+usingTempFolderForTesting=Tijdelijke map om te testen:
+versionMismatch=Verkeerde versie! Update {0} naar dezelfde versie.
+versionMismatchAll=Verkeerde versie! Update alle Essentials jars naar dezelfde versie.
+voiceSilenced=\u00a77Je kan niet meer praten
+warpDeleteError=Fout bij het verwijderen van het warp bestand.
+warpListPermission=\u00a7cJe hebt geen toegang om die warp te maken.
+warpNotExist=Die warp bestaat niet.
+warpSet=\u00a77Warp {0} ingesteld.
+warpUsePermission=\u00a7cOnbevoegd om die warp te gebruiken.
+warpingTo=\u00a77Aan het warpen naar {0}.
+warps=Warps: {0}
+warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}.
+weatherStorm=\u00a77Je hebt het weer naar storm gezet in de {0}
+weatherStormFor=\u00a77Je hebt het weer in de {0} naar storm gezet voor {1} seconde
+weatherSun=\u00a77Je hebt het weer naar zon gezet in de {0}
+weatherSunFor=\u00a77Je hebt het weer in de {0} naar zon gezet voor {1} seconde
+whoisGamemode=\u00a79 - Gamemode: {0}
+whoisGeoLocation=\u00a79 - Locatie: {0}
+whoisGod=\u00a79 - God mode: {0}
+whoisHealth=\u00a79 - Levens: {0}/20
+whoisIPAddress=\u00a79 - IP Adres: {0}
+whoisIs={0} is {1}
+whoisLocation=\u00a79 - Locatie: ({0}, {1}, {2}, {3})
+whoisMoney=\u00a79 - Geld: {0}
+whoisOP=\u00a79 - OP: {0}
+whoisStatusAvailable=\u00a79 - Status: Beschikbaar
+whoisStatusAway=\u00a79 - Status: \u00a7cWeg\u00a7f
+worth=\u00a77Stapel {0} met waarde \u00a7c{1}\u00a77 ({2} voorwerp(en) voor {3} per stuk)
+worthMeta=\u00a77Stapel {0} met een metadata van {1} met waarde \u00a7c{2}\u00a77 ({3} voorwerp(en) voor {4} per stuk)
+worthSet=Waarde ingesteld
+year=jaar
+years=jaren
+youAreHealed=\u00a77Je bent genezen.
+youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken.
diff --git a/Essentials/src/motd.txt b/Essentials/src/motd.txt
new file mode 100644
index 000000000..224e452ef
--- /dev/null
+++ b/Essentials/src/motd.txt
@@ -0,0 +1,3 @@
+&cWelcome, {PLAYER}&c!
+&fType &c/help&f for a list of commands.
+Currently online: {PLAYERLIST} \ No newline at end of file
diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml
index 1240910ce..e3f500b9e 100644
--- a/Essentials/src/plugin.yml
+++ b/Essentials/src/plugin.yml
@@ -18,14 +18,14 @@ commands:
back:
description: Teleports you to your location prior to tp/spawn/warp.
usage: /<command>
- aliases: [eback]
+ aliases: [eback,return,ereturn]
backup:
description: Runs the backup if configured.
usage: /<command>
aliases: [ebackup]
balance:
description: States the current balance of a player.
- usage: /<command> <player>
+ usage: /<command> [player]
aliases: [bal,emoney,ebalance,ebal]
balancetop:
description: Gets the top x balance values. (max 10)
@@ -33,23 +33,23 @@ commands:
aliases: [baltop,ebaltop,ebalancetop]
ban:
description: Bans a player.
- usage: /<command> [player] <reason>
+ usage: /<command> <player> [reason]
aliases: [eban]
banip:
description: Bans an IP address.
- usage: /<command> [address]
+ usage: /<command> <address>
aliases: [ebanip]
broadcast:
description: Broadcasts a message to the entire server.
- usage: /<command> [msg]
+ usage: /<command> <msg>
aliases: [ebroadcast,bcast,ebcast]
bigtree:
description: Spawn a big tree where you are looking.
- usage: /<command> [tree|redwood]
+ usage: /<command> <tree|redwood>
aliases: [ebigtree]
burn:
description: Set a player on fire.
- usage: /<command> [player] [seconds]
+ usage: /<command> <player> <seconds>
aliases: [eburn]
clearinventory:
description: Clear all items in your inventory.
@@ -65,11 +65,11 @@ commands:
aliases: [edelhome,remhome,rmhome,eremhome,ermhome]
deljail:
description: Removes a jail
- usage: /<command> [jailname]
+ usage: /<command> <jailname>
aliases: [edeljail]
delwarp:
description: Deletes the specified warp.
- usage: /<command> [warp]
+ usage: /<command> <warp>
aliases: [edelwarp,remwarp,rmwarp,eremwarp,ermwarp]
depth:
description: States current depth, relative to sea level.
@@ -77,38 +77,42 @@ commands:
aliases: [edepth]
eco:
description: Manages the server economy.
- usage: /<command> [give|take|reset] [player] [amount]
- aliases: [economy,emoney]
+ usage: /<command> <give|take|reset> <player> <amount>
+ aliases: [economy,eeco,eeconomy]
essentials:
description: Reloads essentials.
usage: /<command>
ext:
description: Extinguish players.
- usage: /<command> <player>
+ usage: /<command> [player]
aliases: [extinguish,eext,eextinguish]
fireball:
description: Throw a fireball.
- usage: /<command>
+ usage: /<command> [small]
aliases: [efireball]
+ gamemode:
+ description: Change player gamemode.
+ usage: /<command> [player]
+ aliases: [gm,creative,creativemode,egamemode,ecreative,ecreativemode,egm]
getpos:
description: Get your current coordinates.
usage: /<command>
- aliases: [coords,egetpos]
+ aliases: [coords,egetpos,whereami,ewhereami]
gc:
description: Reports garbage collection info; useful to developers.
usage: /<command>
aliases: [mem,memory,egc,emem,ememory]
give:
description: Give a player an item.
- usage: /<command> [player] [item|numeric] <amount>
+ usage: /<command> <player> <item|numeric> [amount]
aliases: [egive]
god:
description: Enables your godly powers.
- usage: /<command>
- aliases: [tgm,godmode,egod,egodmode,etgm]
+ usage: /<command> [player]
+ aliases: [tgm,godmode,egod,etgm,egodmode]
heal:
description: Heals you or the given player.
- usage: /<command> <player>
+ usage: /<command> [player]
aliases: [eheal]
help:
description: Views a list of available commands.
@@ -116,7 +120,7 @@ commands:
aliases: [ehelp]
helpop:
description: Request help from online operators.
- usage: /<command> [message]
+ usage: /<command> <message>
aliases: [ehelpop]
home:
description: Teleport to your home.
@@ -136,7 +140,7 @@ commands:
aliases: [einvsee]
item:
description: Spawn an item.
- usage: /<command> [item|numeric] <amount>
+ usage: /<command> <item|numeric> [amount]
aliases: [i,eitem]
jails:
description: List all jails.
@@ -148,15 +152,15 @@ commands:
aliases: [j,ejump]
kick:
description: Kicks a specified player with a reason.
- usage: /<command> <player> <reason>
+ usage: /<command> <player> [reason]
aliases: [ekick]
kickall:
description: Kicks all players off the server except the issuer.
- usage: /<command> <reason>
+ usage: /<command> [reason]
aliases: [ekickall]
kit:
description: Obtains the specified kit or views all available kits.
- usage: /<command> <kit>
+ usage: /<command> [kit]
aliases: [ekit,kits]
kill:
description: Kills specified player.
@@ -169,15 +173,15 @@ commands:
lightning:
description: The power of Thor. Strike at cursor or player.
usage: /<command> [player]
- aliases: [strike,smite,elightning,estrike,esmite]
+ aliases: [strike,smite,thor,shock,elightning,estrike,esmite,ethor,eshock]
mail:
description: Manages inter-player, intra-server mail.
usage: /<command> [read|clear|send [to] [message]]
aliases: [email]
me:
description: Describes an action in the context of the player.
- usage: /<command> [description]
- aliases: [eme]
+ usage: /<command> <description>
+ aliases: [action,describe,eme,eaction,edescribe]
motd:
description: Views the Message Of The Day.
usage: /<command>
@@ -188,19 +192,19 @@ commands:
aliases: [m,t,emsg,tell,etell,whisper,ewhisper]
mute:
description: Mutes or unmutes a player.
- usage: /<command> [player] <datediff>
+ usage: /<command> <player> [datediff]
aliases: [emute]
nick:
description: Change your nickname or that of another player.
- usage: /<command> <player> [nickname|off]
+ usage: /<command> [player] <nickname|off>
aliases: [enick]
nuke:
description: May death rain upon them.
- usage: /<command> <player>
+ usage: /<command> [player]
aliases: [enuke]
pay:
description: Pays another player from your balance
- usage: /<command> [player] [amount]
+ usage: /<command> <player> <amount>
aliases: [epay]
ping:
description: Pong!
@@ -208,31 +212,27 @@ commands:
aliases: [pong,eping,epong]
powertool:
description: Assigns a command to the item in hand, {player} will be replaced by the name of the player that you click.
- usage: /<command> [l:|a:|r:][command] <arguments>
+ usage: /<command> [l:|a:|r:|c:][command] [arguments]
aliases: [pt,epowertool,ept]
powertooltoggle:
description: Enables or disables all current powertools
- usage: /<command>
+ usage: /<command>
aliases: [ptt,epowertooltoggle,eptt]
ptime:
description: Adjust player's client time. Add @ prefix to fix.
- usage: /<command> [list|reset|day|night|dawn|17:30|4pm|4000ticks] <player|*>
+ usage: /<command> [list|reset|day|night|dawn|17:30|4pm|4000ticks] [player|*]
aliases: [playertime, eptime, eplayertime]
r:
description: Quickly reply to the last player to message you.
- usage: /<command> [message]
+ usage: /<command> <message>
aliases: [er,reply,ereply]
realname:
description: Displays the username of a user based on nickname.
- usage: /<command> [nickname]
+ usage: /<command> <nickname>
aliases: [erealname]
- reloadall:
- description: Reloads all plugins.
- usage: /<command>
- aliases: [rel,ereloadall,ereload,erel]
repair:
description: Repairs the durability of all or one item.
- usage: /<command> [hand|all]
+ usage: /<command> <hand|all>
aliases: [fix,erepair,efix]
rules:
description: Views the server rules.
@@ -240,11 +240,11 @@ commands:
aliases: [erules]
seen:
description: Shows the last logout time of a player
- usage: /<command> [playername]
+ usage: /<command> <playername>
aliases: [eseen]
sell:
description: Sells the item currently in your hand.
- usage: /<command> [itemname|id|hand|inventory|blocks] [-][amount]
+ usage: /<command> <itemname|id|hand|inventory|blocks> [-][amount]
aliases: [esell]
sethome:
description: Set your home to your current location.
@@ -252,15 +252,15 @@ commands:
aliases: [esethome]
setjail:
description: Creates a jail where you specified named [jailname]
- usage: /<command> [jailname]
+ usage: /<command> <jailname>
aliases: [esetjail]
setwarp:
description: Creates a new warp.
- usage: /<command> [warp]
+ usage: /<command> <warp>
aliases: [createwarp,esetwarp]
setworth:
description: Set the sell value of an item.
- usage: /<command> [itemname|id] [price]
+ usage: /<command> <itemname|id> <price>
aliases: [esetworth]
socialspy:
description: Toggles if you can see msg/mail commands in chat.
@@ -268,31 +268,35 @@ commands:
aliases: [esocialspy]
spawner:
description: Change the mob type of a spawner
- usage: /<command> [mob]
+ usage: /<command> <mob>
aliases: [espawner]
spawnmob:
description: Spawns a mob.
- usage: /<command> [mob]<:data><,mount<:data>> <amount>
+ usage: /<command> <mob>[:data][,<mount>[:data]] [amount]
aliases: [espawnmob]
+ sudo:
+ description: Make another user perform a command.
+ usage: /<command> <player> <command [args]>
+ aliases: [esudo]
suicide:
description: Causes you to perish.
usage: /<command>
aliases: [esuicide]
tempban:
description: Temporary ban a user.
- usage: /<command> [playername] [datediff]
+ usage: /<command> <playername> <datediff>
aliases: [etempban]
thunder:
description: Enable/disable thunder.
usage: /<command> <true/false> [duration]
aliases: [ethunder]
time:
- description: Change the world time. Defaults to current world.
+ description: Display/Change the world time. Defaults to current world.
usage: /<command> [day|night|dawn|17:30|4pm|4000ticks] [worldname|all]
aliases: [etime, day, night]
togglejail:
description: Prevents a player from interacting with the world and teleports him/her to the the jail specified
- usage: /<command> [player] [jailname] <datediff>
+ usage: /<command> <player> <jailname> [datediff]
aliases: [tjail,unjail,eunjail,etogglejail]
top:
description: Teleport to the highest block at your current position.
@@ -300,63 +304,71 @@ commands:
aliases: [etop]
tp:
description: Teleport to a player.
- usage: /<command> [player]
+ usage: /<command> <player> [otherplayer]
aliases: [etp]
tpa:
description: Request to teleport to the specified player.
usage: /<command> <player>
+ aliases: [call,etpa,ecall]
tpaall:
description: Requests all players online to teleport to you.
usage: /<command> <player>
+ aliases: [etpaall]
tpaccept:
description: Accepts a teleport request.
usage: /<command>
- aliases: [tpyes]
+ aliases: [tpyes,etpaccept,etpyes]
tpahere:
description: Request that the specified player teleport to you.
usage: /<command> <player>
+ aliases: [etpahere]
tpall:
description: Teleport all online players to another player.
usage: /<command> <player>
+ aliases: [etpall]
tpdeny:
description: Reject a teleport request.
usage: /<command>
- aliases: [tpno]
+ aliases: [tpno,etpdeny,etpno]
tphere:
description: Teleport a player to you.
- usage: /<command> [player]
- aliases: [s]
+ usage: /<command> <player>
+ aliases: [s,etphere]
tpo:
description: Teleport override for tptoggle.
usage: /<command> <player>
+ aliases: [etpo]
tpohere:
description: Teleport here override for tptoggle.
usage: /<command> <player>
+ aliases: [etpohere]
tppos:
description: Teleport to coordinates.
usage: /<command> <x> <y> <z> [yaw] [pitch]
+ aliases: [etppos]
tptoggle:
description: Blocks all forms of teleportation.
usage: /<command>
+ aliases: [etptoggle]
tree:
description: Spawn a tree where you are looking.
- usage: /<command> [tree|birch|redwood]
+ usage: /<command> <tree|birch|redwood>
aliases: [etree]
unban:
description: Unbans the specified player.
- usage: /<command> [player]
+ usage: /<command> <player>
aliases: [pardon,eunban]
unbanip:
description: Unbans the specified IP address.
- usage: /<command> [address]
+ usage: /<command> <address>
aliases: [eunbanip,pardonip]
unlimited:
description: Allows the unlimited placing of items.
- usage: /<command> [list|item] <player>
+ usage: /<command> <list|item|clear> [player]
aliases: [eunlimited,ul,unl,eul,eunl]
warp:
description: List all warps or warp to the specified location.
- usage: /<command> [pagenumber|warp] <player>
+ usage: /<command> <pagenumber|warp> [player]
aliases: [ewarp,warps]
weather:
description: Setting the weather.
@@ -364,7 +376,7 @@ commands:
aliases: [sky,sun,storm,eweather,esky,esun,estorm]
whois:
description: Determine the username behind a nickname.
- usage: /<command> [nickname]
+ usage: /<command> <nickname>
aliases: [ewhois]
world:
description: Switch between worlds.
@@ -372,5 +384,5 @@ commands:
aliases: [eworld]
worth:
description: Calculates the worth of items in hand or as specified.
- usage: /<command> <item> <amount>
+ usage: /<command> [item] [amount]
aliases: [eworth] \ No newline at end of file
diff --git a/Essentials/src/rules.txt b/Essentials/src/rules.txt
new file mode 100644
index 000000000..486bfdf29
--- /dev/null
+++ b/Essentials/src/rules.txt
@@ -0,0 +1,3 @@
+[1] Be respectful
+[2] Be ethical
+[3] Use common sense \ No newline at end of file
diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java
index 7f3fb9bf2..22a8f0224 100644
--- a/Essentials/test/com/earth2me/essentials/FakeServer.java
+++ b/Essentials/test/com/earth2me/essentials/FakeServer.java
@@ -2,20 +2,12 @@ package com.earth2me.essentials;
import com.avaje.ebean.config.ServerConfig;
import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
+import java.util.*;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.logging.Logger;
-import org.bukkit.GameMode;
-import org.bukkit.Location;
-import org.bukkit.Server;
-import org.bukkit.World;
import org.bukkit.World.Environment;
-import org.bukkit.WorldCreator;
+import org.bukkit.*;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand;
@@ -36,9 +28,17 @@ public class FakeServer implements Server
private List<Player> players = new ArrayList<Player>();
private final List<World> worlds = new ArrayList<World>();
+ public FakeServer()
+ {
+ if (Bukkit.getServer() == null)
+ {
+ Bukkit.setServer(this);
+ }
+ }
+
public String getName()
{
- return "Test Server";
+ return "Essentials Fake Server";
}
public String getVersion()
@@ -469,8 +469,8 @@ public class FakeServer implements Server
@Override
public org.bukkit.OfflinePlayer getOfflinePlayer(final String string)
{
- return new org.bukkit.OfflinePlayer() {
-
+ return new org.bukkit.OfflinePlayer()
+ {
@Override
public boolean isOnline()
{
@@ -580,4 +580,16 @@ public class FakeServer implements Server
{
throw new UnsupportedOperationException("Not supported yet.");
}
+
+ @Override
+ public String getBukkitVersion()
+ {
+ return "Essentials Fake-Server";
+ }
+
+ @Override
+ public File getWorldContainer()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}
diff --git a/Essentials/test/com/earth2me/essentials/StorageTest.java b/Essentials/test/com/earth2me/essentials/StorageTest.java
index 9ee5883e9..e6850ce91 100644
--- a/Essentials/test/com/earth2me/essentials/StorageTest.java
+++ b/Essentials/test/com/earth2me/essentials/StorageTest.java
@@ -1,37 +1,149 @@
package com.earth2me.essentials;
-import junit.framework.TestCase;
import com.earth2me.essentials.settings.Settings;
import com.earth2me.essentials.storage.StorageObject;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.io.Reader;
+import com.earth2me.essentials.storage.YamlStorageReader;
+import com.earth2me.essentials.storage.YamlStorageWriter;
+import java.io.*;
+import junit.framework.TestCase;
+import org.bukkit.Location;
+import org.bukkit.World;
+import org.bukkit.World.Environment;
+import org.bukkit.plugin.InvalidDescriptionException;
import org.junit.Test;
+import org.yaml.snakeyaml.Yaml;
public class StorageTest extends TestCase
{
+ Essentials ess;
+ FakeServer server;
+ World world;
+
+ public StorageTest()
+ {
+ ess = new Essentials();
+ server = new FakeServer();
+ world = server.createWorld("testWorld", Environment.NORMAL);
+ try
+ {
+ ess.setupForTesting(server);
+ }
+ catch (InvalidDescriptionException ex)
+ {
+ fail("InvalidDescriptionException");
+ }
+ catch (IOException ex)
+ {
+ fail("IOException");
+ }
+ }
+
@Test
public void testSettings()
{
assertTrue(StorageObject.class.isAssignableFrom(Settings.class));
+ ExecuteTimer ext = new ExecuteTimer();
+ ext.start();
final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
final Reader reader = new InputStreamReader(bais);
- final Settings settings = StorageObject.load(Settings.class, reader);
+ final Settings settings = new YamlStorageReader(reader).load(Settings.class);
+ ext.mark("load empty settings");
+ final ByteArrayInputStream bais3 = new ByteArrayInputStream(new byte[0]);
+ final Reader reader3 = new InputStreamReader(bais3);
+ final Settings settings3 = new YamlStorageReader(reader3).load(Settings.class);
+ ext.mark("load empty settings (class cached)");
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final PrintWriter writer = new PrintWriter(baos);
- settings.save(writer);
+ new YamlStorageWriter(writer).save(settings);
writer.close();
+ ext.mark("write settings");
byte[] written = baos.toByteArray();
System.out.println(new String(written));
final ByteArrayInputStream bais2 = new ByteArrayInputStream(written);
final Reader reader2 = new InputStreamReader(bais2);
- final Settings settings2 = StorageObject.load(Settings.class, reader2);
+ final Settings settings2 = new YamlStorageReader(reader2).load(Settings.class);
System.out.println(settings.toString());
System.out.println(settings2.toString());
+ ext.mark("reload settings");
+ System.out.println(ext.end());
//assertEquals("Default and rewritten config should be equal", settings, settings2);
//that assertion fails, because empty list and maps return as null
}
+
+ @Test
+ public void testUserdata()
+ {
+ FakeServer server = new FakeServer();
+ World world = server.createWorld("testWorld", Environment.NORMAL);
+ ExecuteTimer ext = new ExecuteTimer();
+ ext.start();
+ final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
+ final Reader reader = new InputStreamReader(bais);
+ final com.earth2me.essentials.userdata.UserData userdata = new YamlStorageReader(reader).load(com.earth2me.essentials.userdata.UserData.class);
+ ext.mark("load empty user");
+ final ByteArrayInputStream bais3 = new ByteArrayInputStream(new byte[0]);
+ final Reader reader3 = new InputStreamReader(bais3);
+ final com.earth2me.essentials.userdata.UserData userdata3 = new YamlStorageReader(reader3).load(com.earth2me.essentials.userdata.UserData.class);
+ ext.mark("load empty user (class cached)");
+
+ for (int j = 0; j < 10000; j++)
+ {
+ userdata.getHomes().put("home", new Location(world, j, j, j));
+ }
+ ext.mark("change home 10000 times");
+ final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ final PrintWriter writer = new PrintWriter(baos);
+ new YamlStorageWriter(writer).save(userdata);
+ writer.close();
+ ext.mark("write user");
+ final ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
+ final PrintWriter writer2 = new PrintWriter(baos2);
+ new YamlStorageWriter(writer2).save(userdata);
+ writer2.close();
+ ext.mark("write user (cached)");
+ byte[] written = baos.toByteArray();
+ System.out.println(new String(written));
+ ext.mark("debug output");
+ final ByteArrayInputStream bais2 = new ByteArrayInputStream(written);
+ final Reader reader2 = new InputStreamReader(bais2);
+ final com.earth2me.essentials.userdata.UserData userdata2 = new YamlStorageReader(reader2).load(com.earth2me.essentials.userdata.UserData.class);
+ ext.mark("reload file");
+ final ByteArrayInputStream bais4 = new ByteArrayInputStream(written);
+ final Reader reader4 = new InputStreamReader(bais4);
+ final com.earth2me.essentials.userdata.UserData userdata4 = new YamlStorageReader(reader4).load(com.earth2me.essentials.userdata.UserData.class);
+ ext.mark("reload file (cached)");
+ System.out.println(userdata.toString());
+ System.out.println(userdata2.toString());
+ System.out.println(ext.end());
+ com.earth2me.essentials.userdata.User test = new com.earth2me.essentials.userdata.User();
+ test.example();
+
+ }
+
+ @Test
+ public void testOldUserdata()
+ {
+ ExecuteTimer ext = new ExecuteTimer();
+ ext.start();
+ OfflinePlayer base1 = server.createPlayer("testPlayer1", ess);
+ server.addPlayer(base1);
+ ext.mark("fake user created");
+ UserData user = (UserData)ess.getUser(base1);
+ ext.mark("load empty user");
+ for (int j = 0; j < 1; j++)
+ {
+ user.setHome("home", new Location(world, j, j, j));
+ }
+ ext.mark("change home 1 times");
+ user.save();
+ ext.mark("write user");
+ user.save();
+ ext.mark("write user (cached)");
+ user.reloadConfig();
+ ext.mark("reloaded file");
+ user.reloadConfig();
+ ext.mark("reloaded file (cached)");
+ System.out.println(ext.end());
+ }
}
diff --git a/Essentials/test/com/earth2me/essentials/UtilTest.java b/Essentials/test/com/earth2me/essentials/UtilTest.java
index 4772b4923..71282a18f 100644
--- a/Essentials/test/com/earth2me/essentials/UtilTest.java
+++ b/Essentials/test/com/earth2me/essentials/UtilTest.java
@@ -30,16 +30,17 @@ public class UtilTest extends TestCase
{
fail("IOException");
}
- Util.updateLocale("en_US", ess);
- }
-
- public void testFDDnow() {
+ }
+
+ public void testFDDnow()
+ {
Calendar c = new GregorianCalendar();
String resp = Util.formatDateDiff(c, c);
assertEquals(resp, "now");
}
-
- public void testFDDfuture() {
+
+ public void testFDDfuture()
+ {
Calendar a, b;
a = new GregorianCalendar(2010, 1, 1, 10, 0, 0);
b = new GregorianCalendar(2010, 1, 1, 10, 0, 1);
@@ -105,8 +106,9 @@ public class UtilTest extends TestCase
b = new GregorianCalendar(2011, 4, 31, 10, 5, 0);
assertEquals(" 5 minutes", Util.formatDateDiff(a, b));
}
-
- public void testFDDpast() {
+
+ public void testFDDpast()
+ {
Calendar a, b;
a = new GregorianCalendar(2010, 1, 1, 10, 0, 0);
b = new GregorianCalendar(2010, 1, 1, 9, 59, 59);
diff --git a/EssentialsChat/nbproject/project.properties b/EssentialsChat/nbproject/project.properties
index 867228a92..0ce40b48b 100644
--- a/EssentialsChat/nbproject/project.properties
+++ b/EssentialsChat/nbproject/project.properties
@@ -28,6 +28,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blank
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
@@ -36,6 +37,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.place
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateImportGroups=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
@@ -61,12 +63,12 @@ dist.jar=${dist.dir}/EssentialsChat.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
includes=**
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
+ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
index 7a10d9a92..f547f0da0 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.chat;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.Util;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
@@ -24,25 +24,29 @@ public class EssentialsChat extends JavaPlugin
chatListener = new HashMap<String, IEssentialsChatListener>();
- final EssentialsChatPlayerListener playerListener = new EssentialsChatPlayerListener(getServer(), ess, chatListener);
- pluginManager.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.High, this);
+ final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, chatListener);
+ final EssentialsChatPlayerListenerNormal playerListenerNormal = new EssentialsChatPlayerListenerNormal(getServer(), ess, chatListener);
+ final EssentialsChatPlayerListenerHighest playerListenerHighest = new EssentialsChatPlayerListenerHighest(getServer(), ess, chatListener);
+ pluginManager.registerEvent(Type.PLAYER_CHAT, playerListenerLowest, Priority.Lowest, this);
+ pluginManager.registerEvent(Type.PLAYER_CHAT, playerListenerNormal, Priority.Normal, this);
+ pluginManager.registerEvent(Type.PLAYER_CHAT, playerListenerHighest, Priority.Highest, this);
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
{
- LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ LOGGER.log(Level.WARNING, _("versionMismatchAll"));
}
- LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
+ LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
}
public void onDisable()
{
chatListener.clear();
}
-
+
public void addEssentialsChatListener(final String plugin, final IEssentialsChatListener listener)
{
chatListener.put(plugin, listener);
}
-
+
public IEssentialsChatListener removeEssentialsChatListener(final String plugin)
{
return chatListener.remove(plugin);
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
new file mode 100644
index 000000000..305e13e8a
--- /dev/null
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
@@ -0,0 +1,155 @@
+package com.earth2me.essentials.chat;
+
+import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.User;
+import java.util.Map;
+import java.util.logging.Logger;
+import org.bukkit.Location;
+import org.bukkit.Server;
+import org.bukkit.World;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+import org.bukkit.event.player.PlayerChatEvent;
+import org.bukkit.event.player.PlayerListener;
+
+
+public abstract class EssentialsChatPlayer extends PlayerListener
+{
+ protected transient IEssentials ess;
+ protected final static Logger logger = Logger.getLogger("Minecraft");
+ protected final transient Map<String, IEssentialsChatListener> listeners;
+ protected final transient Server server;
+
+ public EssentialsChatPlayer(Server server, IEssentials ess, Map<String, IEssentialsChatListener> listeners)
+ {
+ this.ess = ess;
+ this.listeners = listeners;
+ this.server = server;
+ }
+
+ public void onPlayerChat(final PlayerChatEvent event)
+ {
+ }
+
+ public boolean isAborted(final PlayerChatEvent event)
+ {
+ return isAborted(event, "chat");
+ }
+
+ public boolean isAborted(final PlayerChatEvent event, final String command)
+ {
+ if (event.isCancelled())
+ {
+ return true;
+ }
+ for (IEssentialsChatListener listener : listeners.values())
+ {
+ if (listener.shouldHandleThisChat(event))
+ {
+ return true;
+ }
+ }
+
+ final User user = ess.getUser(event.getPlayer());
+ if (!isAffordableFor(user, command))
+ {
+ event.setCancelled(true);
+ return true;
+ }
+ return false;
+ }
+
+ public String getChatType(final String message)
+ {
+ switch (message.charAt(0))
+ {
+ case '!':
+ return "shout";
+ case '?':
+ return "question";
+ default:
+ return "";
+ }
+ }
+
+ protected void charge(final CommandSender sender, final String command) throws ChargeException
+ {
+ if (sender instanceof Player)
+ {
+ final Trade charge = new Trade(command, ess);
+ charge.charge(ess.getUser((Player)sender));
+ }
+ }
+
+ protected boolean isAffordableFor(final CommandSender sender, final String command)
+ {
+ if (sender instanceof Player)
+ {
+ try
+ {
+ final Trade charge = new Trade(command, ess);
+ charge.isAffordableFor(ess.getUser((Player)sender));
+ }
+ catch (ChargeException e)
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ protected void sendLocalChat(final User sender, final long radius, final PlayerChatEvent event)
+ {
+ event.setCancelled(true);
+ logger.info(_("localFormat", sender.getName(), event.getMessage()));
+ final Location loc = sender.getLocation();
+ final World world = loc.getWorld();
+ final int x = loc.getBlockX();
+ final int y = loc.getBlockY();
+ final int z = loc.getBlockZ();
+ for (Player p : server.getOnlinePlayers())
+ {
+ String type = "[L]";
+ final User u = ess.getUser(p);
+ //TODO: remove reference to op
+ if (u.isIgnoredPlayer(sender.getName()) && !sender.isOp())
+ {
+ continue;
+ }
+ if (!u.equals(sender))
+ {
+ final Location l = u.getLocation();
+ final int dx = x - l.getBlockX();
+ final int dy = y - l.getBlockY();
+ final int dz = z - l.getBlockZ();
+ final long delta = dx * dx + dy * dy + dz * dz;
+ if (delta > radius || world != l.getWorld())
+ {
+ if (!u.isAuthorized("essentials.chat.spy"))
+ {
+ continue;
+ }
+ else
+ {
+ type = type.concat("[Spy]");
+ }
+ }
+ }
+
+ String message = String.format(event.getFormat(), type.concat(sender.getDisplayName()), event.getMessage());
+ for (IEssentialsChatListener listener : listeners.values())
+ {
+ message = listener.modifyMessage(event, p, message);
+ }
+ u.sendMessage(message);
+ }
+ }
+}
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java
deleted file mode 100644
index 85e821e7f..000000000
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package com.earth2me.essentials.chat;
-
-import com.earth2me.essentials.ChargeException;
-import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.Trade;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.util.Map;
-import java.util.logging.Logger;
-import org.bukkit.Location;
-import org.bukkit.Server;
-import org.bukkit.World;
-import org.bukkit.command.CommandSender;
-import org.bukkit.entity.Player;
-import org.bukkit.event.player.PlayerChatEvent;
-import org.bukkit.event.player.PlayerListener;
-
-
-public class EssentialsChatPlayerListener extends PlayerListener
-{
- private static final Logger LOGGER = Logger.getLogger("Minecraft");
- private final transient IEssentials ess;
- private final transient Server server;
- private final transient Map<String, IEssentialsChatListener> listeners;
-
- public EssentialsChatPlayerListener(final Server server, final IEssentials ess, final Map<String, IEssentialsChatListener> listeners)
- {
- this.server = server;
- this.ess = ess;
- this.listeners = listeners;
- }
-
- @Override
- public void onPlayerChat(final PlayerChatEvent event)
- {
- if (event.isCancelled())
- {
- return;
- }
-
- for (IEssentialsChatListener listener : listeners.values())
- {
- if (listener.shouldHandleThisChat(event))
- {
- return;
- }
- }
-
- final User user = ess.getUser(event.getPlayer());
-
- if (user.isAuthorized("essentials.chat.color"))
- {
- event.setMessage(event.getMessage().replaceAll("&([0-9a-f])", "§$1"));
- }
-
- event.setFormat(ess.getSettings().getChatFormat(user.getGroup()).replace('&', '§').replace("§§", "&").replace("{DISPLAYNAME}", "%1$s").replace("{GROUP}", user.getGroup()).replace("{MESSAGE}", "%2$s").replace("{WORLDNAME}", user.getWorld().getName()).replace("{SHORTWORLDNAME}", user.getWorld().getName().substring(0, 1).toUpperCase()));
-
- long radius = ess.getSettings().getChatRadius();
- if (radius < 1)
- {
- return;
- }
- radius *= radius;
-
- try {
- if (event.getMessage().startsWith("!") && event.getMessage().length() > 1)
- {
- if (user.isAuthorized("essentials.chat.shout"))
- {
- charge(user,"chat-shout");
- event.setMessage(event.getMessage().substring(1));
- event.setFormat(Util.format("shoutFormat", event.getFormat()));
- return;
- }
- user.sendMessage(Util.i18n("notAllowedToShout"));
- event.setCancelled(true);
- return;
- }
-
- if (event.getMessage().startsWith("?") && event.getMessage().length() > 1)
- {
- if (user.isAuthorized("essentials.chat.question"))
- {
- charge(user,"chat-question");
- event.setMessage(event.getMessage().substring(1));
- event.setFormat(Util.format("questionFormat", event.getFormat()));
- return;
- }
- user.sendMessage(Util.i18n("notAllowedToQuestion"));
- event.setCancelled(true);
- return;
- }
- }
- catch (ChargeException ex)
- {
- ess.showError(user, ex, "Shout");
- return;
- }
-
- event.setCancelled(true);
- LOGGER.info(Util.format("localFormat", user.getName(), event.getMessage()));
-
- final Location loc = user.getLocation();
- final World world = loc.getWorld();
- final int x = loc.getBlockX();
- final int y = loc.getBlockY();
- final int z = loc.getBlockZ();
-
- for (Player p : server.getOnlinePlayers())
- {
- final User u = ess.getUser(p);
- if (u.isIgnoredPlayer(user.getName()) && !user.isOp())
- {
- continue;
- }
- if (!u.equals(user) && !u.isAuthorized("essentials.chat.spy"))
- {
- final Location l = u.getLocation();
- final int dx = x - l.getBlockX();
- final int dy = y - l.getBlockY();
- final int dz = z - l.getBlockZ();
- final long delta = dx*dx + dy*dy + dz*dz;
- if (delta > radius || world != l.getWorld())
- {
- continue;
- }
- }
- String message = String.format(event.getFormat(), user.getDisplayName(), event.getMessage());
-
- for (IEssentialsChatListener listener : listeners.values())
- {
- message = listener.modifyMessage(event, p, message);
- }
-
- u.sendMessage(message);
- }
- }
- protected void charge(final CommandSender sender, final String command) throws ChargeException
- {
- if (sender instanceof Player)
- {
- final Trade charge = new Trade(command, ess);
- charge.charge(ess.getUser((Player)sender));
- }
- }
-}
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java
new file mode 100644
index 000000000..17a219acd
--- /dev/null
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java
@@ -0,0 +1,50 @@
+package com.earth2me.essentials.chat;
+
+import com.earth2me.essentials.ChargeException;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import java.util.Map;
+import org.bukkit.Server;
+import org.bukkit.event.player.PlayerChatEvent;
+
+
+public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer
+{
+ public EssentialsChatPlayerListenerHighest(Server server, IEssentials ess, Map<String, IEssentialsChatListener> listeners)
+ {
+ super(server, ess, listeners);
+ }
+
+ @Override
+ public void onPlayerChat(final PlayerChatEvent event)
+ {
+ if (isAborted(event))
+ {
+ return;
+ }
+
+ /**
+ * This file should handle charging the user for the action before returning control back
+ */
+ final User user = ess.getUser(event.getPlayer());
+ final String chatType = getChatType(event.getMessage());
+ final StringBuilder command = new StringBuilder();
+ command.append("chat");
+
+ if (chatType.length() > 0)
+ {
+ command.append("-").append(chatType);
+ }
+
+ try
+ {
+ charge(user, command.toString());
+ }
+ catch (ChargeException e)
+ {
+ ess.showError(user, e, command.toString());
+ event.setCancelled(true);
+ return;
+ }
+ }
+}
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
new file mode 100644
index 000000000..0945fcd93
--- /dev/null
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
@@ -0,0 +1,35 @@
+package com.earth2me.essentials.chat;
+
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import java.util.Map;
+import org.bukkit.Server;
+import org.bukkit.event.player.PlayerChatEvent;
+
+
+public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
+{
+ public EssentialsChatPlayerListenerLowest(Server server, IEssentials ess, Map<String, IEssentialsChatListener> listeners)
+ {
+ super(server, ess, listeners);
+ }
+
+ @Override
+ public void onPlayerChat(final PlayerChatEvent event)
+ {
+ if (isAborted(event))
+ {
+ return;
+ }
+
+ /**
+ * This listener should apply the general chat formatting only...then return control back the event handler
+ */
+ final User user = ess.getUser(event.getPlayer());
+ if (user.isAuthorized("essentials.chat.color"))
+ {
+ event.setMessage(event.getMessage().replaceAll("&([0-9a-f])", "\u00a7$1"));
+ }
+ event.setFormat(ess.getSettings().getChatFormat(user.getGroup()).replace('&', '\u00a7').replace("\u00a7\u00a7", "&").replace("{DISPLAYNAME}", "%1$s").replace("{GROUP}", user.getGroup()).replace("{MESSAGE}", "%2$s").replace("{WORLDNAME}", user.getWorld().getName()).replace("{SHORTWORLDNAME}", user.getWorld().getName().substring(0, 1).toUpperCase()));
+ }
+}
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java
new file mode 100644
index 000000000..363e4ca6e
--- /dev/null
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java
@@ -0,0 +1,76 @@
+package com.earth2me.essentials.chat;
+
+import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import java.util.Map;
+import org.bukkit.Server;
+import org.bukkit.event.player.PlayerChatEvent;
+
+
+public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer
+{
+ public EssentialsChatPlayerListenerNormal(Server server, IEssentials ess, Map<String, IEssentialsChatListener> listeners)
+ {
+ super(server, ess, listeners);
+ }
+
+ @Override
+ public void onPlayerChat(final PlayerChatEvent event)
+ {
+ if (isAborted(event))
+ {
+ return;
+ }
+
+ /**
+ * This file should handle detection of the local chat features... if local chat is enabled, we need to handle
+ * it here
+ */
+ final User user = ess.getUser(event.getPlayer());
+ final String chatType = getChatType(event.getMessage());
+ long radius = ess.getSettings().getChatRadius();
+ if (radius < 1)
+ {
+ return;
+ }
+ radius *= radius;
+ try
+ {
+ if (event.getMessage().length() > 0 && chatType.length() > 0)
+ {
+ StringBuilder permission = new StringBuilder();
+ permission.append("essentials.chat.").append(chatType);
+
+ StringBuilder command = new StringBuilder();
+ command.append("chat-").append(chatType);
+
+ StringBuilder format = new StringBuilder();
+ format.append(chatType).append("Format");
+
+ StringBuilder errorMsg = new StringBuilder();
+ errorMsg.append("notAllowedTo").append(chatType.substring(0, 1).toUpperCase()).append(chatType.substring(1));
+
+ if (user.isAuthorized(permission.toString()))
+ {
+ charge(user, command.toString());
+ event.setMessage(event.getMessage().substring(1));
+ event.setFormat(_(format.toString(), event.getFormat()));
+ return;
+ }
+
+ user.sendMessage(_(errorMsg.toString()));
+ event.setCancelled(true);
+ return;
+ }
+ }
+ catch (ChargeException ex)
+ {
+ ess.showError(user, ex, "Shout");
+ event.setCancelled(true);
+ return;
+ }
+ sendLocalChat(user, radius, event);
+ }
+}
diff --git a/EssentialsGeoIP/nbproject/project.properties b/EssentialsGeoIP/nbproject/project.properties
index 80cd8778f..1b6ef450d 100644
--- a/EssentialsGeoIP/nbproject/project.properties
+++ b/EssentialsGeoIP/nbproject/project.properties
@@ -28,6 +28,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blank
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
@@ -36,6 +37,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.place
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateImportGroups=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
@@ -61,12 +63,12 @@ dist.jar=${dist.dir}/EssentialsGeoIP.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
includes=**
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
+ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
index aa919f44b..6bc0c2022 100644
--- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
+++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
@@ -1,8 +1,7 @@
package com.earth2me.essentials.geoip;
-import com.earth2me.essentials.Essentials;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.Util;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.event.Event.Priority;
@@ -32,11 +31,12 @@ public class EssentialsGeoIP extends JavaPlugin
final EssentialsGeoIPPlayerListener playerListener = new EssentialsGeoIPPlayerListener(getDataFolder(), ess);
pm.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this);
- if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) {
- logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
+ {
+ logger.log(Level.WARNING, _("versionMismatchAll"));
}
- logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
-
+ logger.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
+
logger.log(Level.INFO, "This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/.");
}
}
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
index 5a6553f0e..ee187c2aa 100644
--- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
+++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
@@ -1,18 +1,14 @@
package com.earth2me.essentials.geoip;
import com.earth2me.essentials.EssentialsConf;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IConf;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import com.maxmind.geoip.Location;
import com.maxmind.geoip.LookupService;
import com.maxmind.geoip.regionName;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+import java.io.*;
import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.URL;
@@ -79,13 +75,14 @@ public class EssentialsGeoIPPlayerListener extends PlayerListener implements ICo
{
u.setGeoLocation(sb.toString());
}
- if (config.getBoolean("show-on-login", true))
+ if (config.getBoolean("show-on-login", true) && !u.isHidden())
{
for (Player player : event.getPlayer().getServer().getOnlinePlayers())
{
User user = ess.getUser(player);
- if (user.isAuthorized("essentials.geoip.show")) {
- user.sendMessage(Util.format("geoipJoinFormat", u.getDisplayName(), sb.toString()));
+ if (user.isAuthorized("essentials.geoip.show"))
+ {
+ user.sendMessage(_("geoipJoinFormat", u.getDisplayName(), sb.toString()));
}
}
}
@@ -112,7 +109,7 @@ public class EssentialsGeoIPPlayerListener extends PlayerListener implements ICo
}
else
{
- logger.log(Level.SEVERE, Util.i18n("cantFindGeoIpDB"));
+ logger.log(Level.SEVERE, _("cantFindGeoIpDB"));
return;
}
}
@@ -122,7 +119,7 @@ public class EssentialsGeoIPPlayerListener extends PlayerListener implements ICo
}
catch (IOException ex)
{
- logger.log(Level.SEVERE, Util.i18n("cantReadGeoIpDB"), ex);
+ logger.log(Level.SEVERE, _("cantReadGeoIpDB"), ex);
}
}
@@ -141,10 +138,10 @@ public class EssentialsGeoIPPlayerListener extends PlayerListener implements ICo
}
if (url == null || url.isEmpty())
{
- logger.log(Level.SEVERE, Util.i18n("geoIpUrlEmpty"));
+ logger.log(Level.SEVERE, _("geoIpUrlEmpty"));
return;
}
- logger.log(Level.INFO, Util.i18n("downloadingGeoIp"));
+ logger.log(Level.INFO, _("downloadingGeoIp"));
URL downloadUrl = new URL(url);
URLConnection conn = downloadUrl.openConnection();
conn.setConnectTimeout(10000);
@@ -167,12 +164,12 @@ public class EssentialsGeoIPPlayerListener extends PlayerListener implements ICo
}
catch (MalformedURLException ex)
{
- logger.log(Level.SEVERE, Util.i18n("geoIpUrlInvalid"), ex);
+ logger.log(Level.SEVERE, _("geoIpUrlInvalid"), ex);
return;
}
catch (IOException ex)
{
- logger.log(Level.SEVERE, Util.i18n("connectionFailed"), ex);
+ logger.log(Level.SEVERE, _("connectionFailed"), ex);
}
}
}
diff --git a/EssentialsGeoIP/src/com/maxmind/geoip/DatabaseInfo.java b/EssentialsGeoIP/src/com/maxmind/geoip/DatabaseInfo.java
index dfed516a5..939259ebb 100644
--- a/EssentialsGeoIP/src/com/maxmind/geoip/DatabaseInfo.java
+++ b/EssentialsGeoIP/src/com/maxmind/geoip/DatabaseInfo.java
@@ -20,9 +20,9 @@
package com.maxmind.geoip;
-import java.util.Date;
-import java.text.SimpleDateFormat;
import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
/**
* Encapsulates metadata about the GeoIP database. The database has a date, is a premium or
diff --git a/EssentialsGeoIP/src/com/maxmind/geoip/LookupService.java b/EssentialsGeoIP/src/com/maxmind/geoip/LookupService.java
index 406cda004..19da6c8f5 100644
--- a/EssentialsGeoIP/src/com/maxmind/geoip/LookupService.java
+++ b/EssentialsGeoIP/src/com/maxmind/geoip/LookupService.java
@@ -20,16 +20,16 @@
package com.maxmind.geoip;
+
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
-import java.net.InetAddress;
import java.net.Inet6Address;
+import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.StringTokenizer;
-
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
diff --git a/EssentialsGroupBridge/nbproject/project.properties b/EssentialsGroupBridge/nbproject/project.properties
index 3a2d806fb..d23aed45b 100644
--- a/EssentialsGroupBridge/nbproject/project.properties
+++ b/EssentialsGroupBridge/nbproject/project.properties
@@ -39,14 +39,14 @@ dist.jar=${dist.dir}/EssentialsGroupBridge.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${reference.EssentialsGroupManager.jar}:\
- ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
+ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsGroupManager/nbproject/project.properties b/EssentialsGroupManager/nbproject/project.properties
index 245766661..6fe938f17 100644
--- a/EssentialsGroupManager/nbproject/project.properties
+++ b/EssentialsGroupManager/nbproject/project.properties
@@ -39,11 +39,11 @@ dist.jar=${dist.dir}/EssentialsGroupManager.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
includes=**
jar.compress=true
javac.classpath=\
- ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}
+ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsPermissionsCommands/nbproject/project.properties b/EssentialsPermissionsCommands/nbproject/project.properties
index 0a74a6dea..9ce9cd6ae 100644
--- a/EssentialsPermissionsCommands/nbproject/project.properties
+++ b/EssentialsPermissionsCommands/nbproject/project.properties
@@ -61,7 +61,7 @@ dist.jar=${dist.dir}/EssentialsPermissionsCommands.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
file.reference.Permissions3.jar=../lib/Permissions3.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
@@ -70,7 +70,7 @@ jar.index=${jnlp.enabled}
javac.classpath=\
${reference.Essentials.jar}:\
${file.reference.Permissions3.jar}:\
- ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
+ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsProtect/nbproject/project.properties b/EssentialsProtect/nbproject/project.properties
index dd5d0fd22..5e8639402 100644
--- a/EssentialsProtect/nbproject/project.properties
+++ b/EssentialsProtect/nbproject/project.properties
@@ -28,6 +28,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blank
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
@@ -36,6 +37,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.place
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateImportGroups=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
@@ -61,16 +63,16 @@ dist.jar=${dist.dir}/original-EssentialsProtect.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
+file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
file.reference.c3p0-0.9.1.2.jar=..\\lib\\c3p0-0.9.1.2.jar
-file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\
- ${file.reference.c3p0-0.9.1.2.jar}
+ ${file.reference.c3p0-0.9.1.2.jar}:\
+ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
index 98daf26cb..897112cb6 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.protect;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IConf;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import com.earth2me.essentials.protect.data.IProtectedBlock;
import com.earth2me.essentials.protect.data.ProtectedBlockMemory;
import com.earth2me.essentials.protect.data.ProtectedBlockMySQL;
@@ -81,9 +81,9 @@ public class EssentialsProtect extends JavaPlugin implements IConf, IProtect
ess.addReloadListener(this);
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
{
- LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ LOGGER.log(Level.WARNING, _("versionMismatchAll"));
}
- LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
+ LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
}
@Override
@@ -97,9 +97,9 @@ public class EssentialsProtect extends JavaPlugin implements IConf, IProtect
public void alert(final User user, final String item, final String type)
{
final Location loc = user.getLocation();
- final String warnMessage = Util.format("alertFormat", user.getName(), type, item,
- loc.getWorld().getName() + "," + loc.getBlockX() + ","
- + loc.getBlockY() + "," + loc.getBlockZ());
+ final String warnMessage = _("alertFormat", user.getName(), type, item,
+ loc.getWorld().getName() + "," + loc.getBlockX() + ","
+ + loc.getBlockY() + "," + loc.getBlockZ());
LOGGER.log(Level.WARNING, warnMessage);
for (Player p : this.getServer().getOnlinePlayers())
{
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
index 8717825b3..a14925ccd 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
@@ -1,22 +1,15 @@
package com.earth2me.essentials.protect;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import com.earth2me.essentials.protect.data.IProtectedBlock;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
-import org.bukkit.event.block.BlockBreakEvent;
-import org.bukkit.event.block.BlockBurnEvent;
-import org.bukkit.event.block.BlockFromToEvent;
-import org.bukkit.event.block.BlockIgniteEvent;
-import org.bukkit.event.block.BlockListener;
-import org.bukkit.event.block.BlockPistonExtendEvent;
-import org.bukkit.event.block.BlockPistonRetractEvent;
-import org.bukkit.event.block.BlockPlaceEvent;
+import org.bukkit.event.block.*;
public class EssentialsProtectBlockListener extends BlockListener
@@ -57,7 +50,7 @@ public class EssentialsProtectBlockListener extends BlockListener
if (prot.checkProtectionItems(ProtectConfig.alert_on_placement, id))
{
- prot.alert(user, blockPlaced.getType().toString(), Util.i18n("alertPlaced"));
+ prot.alert(user, blockPlaced.getType().toString(), _("alertPlaced"));
}
final Block below = blockPlaced.getRelative(BlockFace.DOWN);
@@ -75,7 +68,8 @@ public class EssentialsProtectBlockListener extends BlockListener
&& user.isAuthorized("essentials.protect"))
{
protect.add(blockPlaced);
- if (prot.getSettingBool(ProtectConfig.protect_below_rails))
+ if (prot.getSettingBool(ProtectConfig.protect_below_rails)
+ && !prot.getStorage().isProtected(blockPlaced.getRelative(BlockFace.DOWN), user.getName()))
{
protect.add(blockPlaced.getRelative(BlockFace.DOWN));
}
@@ -85,7 +79,10 @@ public class EssentialsProtectBlockListener extends BlockListener
&& user.isAuthorized("essentials.protect"))
{
protect.add(blockPlaced);
- if (prot.getSettingBool(ProtectConfig.protect_against_signs))
+ if (prot.getSettingBool(ProtectConfig.protect_against_signs)
+ && event.getBlockAgainst().getType() != Material.SIGN_POST
+ && event.getBlockAgainst().getType() != Material.WALL_SIGN
+ && !prot.getStorage().isProtected(event.getBlockAgainst(), user.getName()))
{
protect.add(event.getBlockAgainst());
}
@@ -251,7 +248,7 @@ public class EssentialsProtectBlockListener extends BlockListener
if (prot.checkProtectionItems(ProtectConfig.alert_on_break, typeId))
{
- prot.alert(user, type.toString(), Util.i18n("alertBroke"));
+ prot.alert(user, type.toString(), _("alertBroke"));
}
final IProtectedBlock storage = prot.getStorage();
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
index c0e568578..2c4d1dbab 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
@@ -2,49 +2,28 @@ package com.earth2me.essentials.protect;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.minecraft.server.ChunkPosition;
-import net.minecraft.server.Packet60Explosion;
-import org.bukkit.Location;
+import com.earth2me.essentials.craftbukkit.FakeExplosion;
+import java.util.Locale;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
-import org.bukkit.entity.Creeper;
-import org.bukkit.entity.Entity;
-import org.bukkit.entity.Fireball;
-import org.bukkit.entity.LivingEntity;
-import org.bukkit.entity.Player;
-import org.bukkit.entity.Projectile;
-import org.bukkit.entity.TNTPrimed;
-import org.bukkit.event.entity.CreatureSpawnEvent;
-import org.bukkit.event.entity.EndermanPickupEvent;
-import org.bukkit.event.entity.EntityDamageByBlockEvent;
-import org.bukkit.event.entity.EntityDamageByEntityEvent;
-import org.bukkit.event.entity.EntityDamageEvent;
+import org.bukkit.entity.*;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
-import org.bukkit.event.entity.EntityExplodeEvent;
-import org.bukkit.event.entity.EntityListener;
-import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.entity.EntityTargetEvent.TargetReason;
-import org.bukkit.event.entity.ExplosionPrimeEvent;
+import org.bukkit.event.entity.*;
public class EssentialsProtectEntityListener extends EntityListener
{
private final transient IProtect prot;
private final transient IEssentials ess;
-
+
public EssentialsProtectEntityListener(final IProtect prot)
{
this.prot = prot;
this.ess = prot.getEssentials();
}
-
+
@Override
public void onEntityDamage(final EntityDamageEvent event)
{
@@ -57,7 +36,7 @@ public class EssentialsProtectEntityListener extends EntityListener
if (event instanceof EntityDamageByBlockEvent)
{
final DamageCause cause = event.getCause();
-
+
if (prot.getSettingBool(ProtectConfig.disable_contactdmg)
&& cause == DamageCause.CONTACT
&& !(target instanceof Player
@@ -86,7 +65,7 @@ public class EssentialsProtectEntityListener extends EntityListener
return;
}
}
-
+
if (event instanceof EntityDamageByEntityEvent)
{
final EntityDamageByEntityEvent edEvent = (EntityDamageByEntityEvent)event;
@@ -111,7 +90,7 @@ public class EssentialsProtectEntityListener extends EntityListener
event.setCancelled(true);
return;
}
-
+
if (eAttack instanceof Creeper && prot.getSettingBool(ProtectConfig.prevent_creeper_playerdmg)
&& !(target instanceof Player
&& user.isAuthorized("essentials.protect.damage.creeper")
@@ -120,8 +99,9 @@ public class EssentialsProtectEntityListener extends EntityListener
event.setCancelled(true);
return;
}
-
- if (eAttack instanceof Fireball && prot.getSettingBool(ProtectConfig.prevent_fireball_playerdmg)
+
+ if ((event.getEntity() instanceof Fireball || event.getEntity() instanceof SmallFireball)
+ && prot.getSettingBool(ProtectConfig.prevent_fireball_playerdmg)
&& !(target instanceof Player
&& user.isAuthorized("essentials.protect.damage.fireball")
&& !user.isAuthorized("essentials.protect.damage.disable")))
@@ -129,7 +109,7 @@ public class EssentialsProtectEntityListener extends EntityListener
event.setCancelled(true);
return;
}
-
+
if (eAttack instanceof TNTPrimed && prot.getSettingBool(ProtectConfig.prevent_tnt_playerdmg)
&& !(target instanceof Player
&& user.isAuthorized("essentials.protect.damage.tnt")
@@ -138,7 +118,7 @@ public class EssentialsProtectEntityListener extends EntityListener
event.setCancelled(true);
return;
}
-
+
if (edEvent.getDamager() instanceof Projectile
&& target instanceof Player
&& ((prot.getSettingBool(ProtectConfig.disable_projectiles)
@@ -153,7 +133,7 @@ public class EssentialsProtectEntityListener extends EntityListener
return;
}
}
-
+
final DamageCause cause = event.getCause();
if (target instanceof Player)
{
@@ -165,7 +145,7 @@ public class EssentialsProtectEntityListener extends EntityListener
event.setCancelled(true);
return;
}
-
+
if (cause == DamageCause.SUFFOCATION
&& prot.getSettingBool(ProtectConfig.disable_suffocate)
&& !(user.isAuthorized("essentials.protect.damage.suffocation")
@@ -201,7 +181,7 @@ public class EssentialsProtectEntityListener extends EntityListener
}
}
}
-
+
@Override
public void onEntityExplode(final EntityExplodeEvent event)
{
@@ -216,40 +196,7 @@ public class EssentialsProtectEntityListener extends EntityListener
|| prot.getSettingBool(ProtectConfig.prevent_creeper_blockdmg)
|| (maxHeight >= 0 && event.getLocation().getBlockY() > maxHeight)))
{
- try
- {
- final Set<ChunkPosition> set = new HashSet<ChunkPosition>(event.blockList().size());
- final Player[] players = ess.getServer().getOnlinePlayers();
- final Set<ChunkPosition> blocksUnderPlayers = new HashSet<ChunkPosition>(players.length);
- final Location loc = event.getLocation();
- for (Player player : players)
- {
- if (player.getWorld().equals(loc.getWorld()))
- {
- blocksUnderPlayers.add(
- new ChunkPosition(
- player.getLocation().getBlockX(),
- player.getLocation().getBlockY() - 1,
- player.getLocation().getBlockZ()));
- }
- }
- ChunkPosition cp;
- for (Block block : event.blockList())
- {
- cp = new ChunkPosition(block.getX(), block.getY(), block.getZ());
- if (!blocksUnderPlayers.contains(cp))
- {
- set.add(cp);
- }
- }
-
- ((CraftServer)ess.getServer()).getHandle().sendPacketNearby(loc.getX(), loc.getY(), loc.getZ(), 64.0D, ((CraftWorld)loc.getWorld()).getHandle().worldProvider.dimension,
- new Packet60Explosion(loc.getX(), loc.getY(), loc.getZ(), 3.0f, set));
- }
- catch (Throwable ex)
- {
- Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex);
- }
+ FakeExplosion.createExplosion(event, ess.getServer(), ess.getServer().getOnlinePlayers());
event.setCancelled(true);
return;
}
@@ -259,7 +206,7 @@ public class EssentialsProtectEntityListener extends EntityListener
event.setCancelled(true);
return;
}
- else if (event.getEntity() instanceof Fireball
+ else if ((event.getEntity() instanceof Fireball || event.getEntity() instanceof SmallFireball)
&& prot.getSettingBool(ProtectConfig.prevent_fireball_explosion))
{
event.setCancelled(true);
@@ -295,7 +242,7 @@ public class EssentialsProtectEntityListener extends EntityListener
}
}
}
-
+
@Override
public void onCreatureSpawn(final CreatureSpawnEvent event)
{
@@ -307,7 +254,12 @@ public class EssentialsProtectEntityListener extends EntityListener
{
return;
}
- final String creatureName = event.getCreatureType().toString().toLowerCase();
+ final CreatureType creature = event.getCreatureType();
+ if (creature == null)
+ {
+ return;
+ }
+ final String creatureName = creature.toString().toLowerCase(Locale.ENGLISH);
if (creatureName == null || creatureName.isEmpty())
{
return;
@@ -317,7 +269,7 @@ public class EssentialsProtectEntityListener extends EntityListener
event.setCancelled(true);
}
}
-
+
@Override
public void onEntityTarget(final EntityTargetEvent event)
{
@@ -343,11 +295,11 @@ public class EssentialsProtectEntityListener extends EntityListener
return;
}
}
-
+
@Override
public void onExplosionPrime(ExplosionPrimeEvent event)
{
- if (event.getEntity() instanceof Fireball
+ if ((event.getEntity() instanceof Fireball || event.getEntity() instanceof SmallFireball)
&& prot.getSettingBool(ProtectConfig.prevent_fireball_fire))
{
event.setFire(false);
@@ -357,10 +309,12 @@ public class EssentialsProtectEntityListener extends EntityListener
@Override
public void onEndermanPickup(EndermanPickupEvent event)
{
- if (event.isCancelled()) {
+ if (event.isCancelled())
+ {
return;
}
- if (prot.getSettingBool(ProtectConfig.prevent_enderman_pickup)) {
+ if (prot.getSettingBool(ProtectConfig.prevent_enderman_pickup))
+ {
event.setCancelled(true);
return;
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
index 7543a5244..98daecb97 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
@@ -1,14 +1,14 @@
package com.earth2me.essentials.protect;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import org.bukkit.Material;
import org.bukkit.block.Block;
+import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.inventory.ItemStack;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import org.bukkit.Material;
-import org.bukkit.event.block.Action;
public class EssentialsProtectPlayerListener extends PlayerListener
@@ -25,10 +25,7 @@ public class EssentialsProtectPlayerListener extends PlayerListener
@Override
public void onPlayerInteract(final PlayerInteractEvent event)
{
- if (event.isCancelled())
- {
- return;
- }
+ // Do not return if cancelled, because the interact event has 2 cancelled states.
final User user = ess.getUser(event.getPlayer());
if (event.hasItem()
@@ -38,7 +35,7 @@ public class EssentialsProtectPlayerListener extends PlayerListener
{
if (ess.getSettings().warnOnBuildDisallow())
{
- user.sendMessage(Util.i18n("buildAlert"));
+ user.sendMessage(_("buildAlert"));
}
event.setCancelled(true);
return;
@@ -48,7 +45,7 @@ public class EssentialsProtectPlayerListener extends PlayerListener
{
if (ess.getSettings().warnOnBuildDisallow())
{
- user.sendMessage(Util.i18n("buildAlert"));
+ user.sendMessage(_("buildAlert"));
}
event.setCancelled(true);
return;
@@ -80,13 +77,13 @@ public class EssentialsProtectPlayerListener extends PlayerListener
final String ownerNames = stringBuilder.toString();
if (ownerNames != null && !ownerNames.isEmpty())
{
- user.sendMessage(Util.format("protectionOwner", ownerNames));
+ user.sendMessage(_("protectionOwner", ownerNames));
}
}
if (item != null
&& prot.checkProtectionItems(ProtectConfig.alert_on_use, item.getTypeId()))
{
- prot.alert(user, item.getType().toString(), Util.i18n("alertUsed"));
+ prot.alert(user, item.getType().toString(), _("alertUsed"));
}
}
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java
index 5d93fe0ea..369e988ae 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java
@@ -62,7 +62,7 @@ public enum ProtectConfig
{
this(configName, null, false, true, false);
}
-
+
private ProtectConfig(final String configName, final String defValueString)
{
this(configName, defValueString, false, false, true);
@@ -110,7 +110,7 @@ public enum ProtectConfig
{
return isString;
}
-
+
public boolean isList()
{
return isList;
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/IProtectedBlock.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/IProtectedBlock.java
index 271f1c464..755baface 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/data/IProtectedBlock.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/IProtectedBlock.java
@@ -3,13 +3,22 @@ package com.earth2me.essentials.protect.data;
import java.util.List;
import org.bukkit.block.Block;
-public interface IProtectedBlock {
+
+public interface IProtectedBlock
+{
public void clearProtections();
+
public void importProtections(List<OwnedBlock> blocks);
+
public List<OwnedBlock> exportProtections();
+
public void protectBlock(Block block, String playerName);
+
public boolean isProtected(Block block, String playerName);
+
public List<String> getOwners(Block block);
+
public int unprotectBlock(Block block);
+
public void onPluginDeactivation();
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/OwnedBlock.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/OwnedBlock.java
index dea124b58..dc28feae8 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/data/OwnedBlock.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/OwnedBlock.java
@@ -1,6 +1,8 @@
package com.earth2me.essentials.protect.data;
-public class OwnedBlock {
+
+public class OwnedBlock
+{
final int x;
final int y;
final int z;
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java
index 1348b6bc8..876c8a575 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java
@@ -1,12 +1,7 @@
package com.earth2me.essentials.protect.data;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
import java.util.Map.Entry;
-import java.util.Set;
+import java.util.*;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.plugin.Plugin;
@@ -249,5 +244,5 @@ public class ProtectedBlockMemory implements IProtectedBlock
public void onPluginDeactivation()
{
storage.onPluginDeactivation();
- }
+ }
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMySQL.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMySQL.java
index 8e50ce248..2a0077698 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMySQL.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMySQL.java
@@ -8,50 +8,59 @@ import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
-public class ProtectedBlockMySQL extends ProtectedBlockJDBC {
- public ProtectedBlockMySQL(String url, String username, String password) throws PropertyVetoException {
+public class ProtectedBlockMySQL extends ProtectedBlockJDBC
+{
+ public ProtectedBlockMySQL(String url, String username, String password) throws PropertyVetoException
+ {
super("com.mysql.jdbc.Driver", url, username, password);
}
-
private static final String QueryCreateTable =
- "CREATE TABLE IF NOT EXISTS `EssentialsProtect` ("
- + "`worldName` varchar(60) NOT NULL,"
- + "`x` int(11) NOT NULL, `y` int(11) NOT NULL, `z` int(11) NOT NULL,"
- + "`playerName` varchar(150) DEFAULT NULL,"
- + "KEY `pos` (`worldName`,`x`,`z`,`y`)"
- + ") ENGINE=MyISAM DEFAULT CHARSET=utf8";
+ "CREATE TABLE IF NOT EXISTS `EssentialsProtect` ("
+ + "`worldName` varchar(60) NOT NULL,"
+ + "`x` int(11) NOT NULL, `y` int(11) NOT NULL, `z` int(11) NOT NULL,"
+ + "`playerName` varchar(150) DEFAULT NULL,"
+ + "KEY `pos` (`worldName`,`x`,`z`,`y`)"
+ + ") ENGINE=MyISAM DEFAULT CHARSET=utf8";
@Override
- protected PreparedStatement getStatementCreateTable(Connection conn) throws SQLException {
+ protected PreparedStatement getStatementCreateTable(Connection conn) throws SQLException
+ {
return conn.prepareStatement(QueryCreateTable);
}
-
private static final String QueryUpdateFrom2_0TableCheck =
- "SHOW COLUMNS FROM `EssentialsProtect` LIKE 'id';";
+ "SHOW COLUMNS FROM `EssentialsProtect` LIKE 'id';";
private static final String QueryUpdateFrom2_0Table =
- "ALTER TABLE `EssentialsProtect` "
- + "CHARACTER SET = utf8, ENGINE = MyISAM,"
- + "DROP COLUMN `id`,"
- + "CHANGE COLUMN `playerName` `playerName` VARCHAR(150) NULL AFTER `z`,"
- + "CHANGE COLUMN `worldName` `worldName` VARCHAR(60) NOT NULL,"
- + "ADD INDEX `position` (`worldName` ASC, `x` ASC, `z` ASC, `y` ASC),"
- + "DROP PRIMARY KEY ;";
+ "ALTER TABLE `EssentialsProtect` "
+ + "CHARACTER SET = utf8, ENGINE = MyISAM,"
+ + "DROP COLUMN `id`,"
+ + "CHANGE COLUMN `playerName` `playerName` VARCHAR(150) NULL AFTER `z`,"
+ + "CHANGE COLUMN `worldName` `worldName` VARCHAR(60) NOT NULL,"
+ + "ADD INDEX `position` (`worldName` ASC, `x` ASC, `z` ASC, `y` ASC),"
+ + "DROP PRIMARY KEY ;";
@Override
- protected PreparedStatement getStatementUpdateFrom2_0Table(Connection conn) throws SQLException {
+ protected PreparedStatement getStatementUpdateFrom2_0Table(Connection conn) throws SQLException
+ {
PreparedStatement testPS = null;
ResultSet testRS = null;
- try {
+ try
+ {
testPS = conn.prepareStatement(QueryUpdateFrom2_0TableCheck);
testRS = testPS.executeQuery();
- if (testRS.first()) {
+ if (testRS.first())
+ {
return conn.prepareStatement(QueryUpdateFrom2_0Table);
- } else {
+ }
+ else
+ {
return conn.prepareStatement("SELECT 1;");
}
- } finally {
- if (testRS != null) {
+ }
+ finally
+ {
+ if (testRS != null)
+ {
try
{
testRS.close();
@@ -61,7 +70,8 @@ public class ProtectedBlockMySQL extends ProtectedBlockJDBC {
Logger.getLogger(ProtectedBlockMySQL.class.getName()).log(Level.SEVERE, null, ex);
}
}
- if (testPS != null) {
+ if (testPS != null)
+ {
try
{
testPS.close();
@@ -74,16 +84,18 @@ public class ProtectedBlockMySQL extends ProtectedBlockJDBC {
}
}
private static final String QueryDeleteAll = "DELETE FROM EssentialsProtect;";
-
+
@Override
- protected PreparedStatement getStatementDeleteAll(Connection conn) throws SQLException {
+ protected PreparedStatement getStatementDeleteAll(Connection conn) throws SQLException
+ {
return conn.prepareStatement(QueryDeleteAll);
}
private static final String QueryInsert =
- "INSERT INTO EssentialsProtect (worldName, x, y, z, playerName) VALUES (?, ?, ?, ?, ?);";
+ "INSERT INTO EssentialsProtect (worldName, x, y, z, playerName) VALUES (?, ?, ?, ?, ?);";
@Override
- protected PreparedStatement getStatementInsert(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException {
+ protected PreparedStatement getStatementInsert(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException
+ {
PreparedStatement ps = conn.prepareStatement(QueryInsert);
ps.setString(1, world);
ps.setInt(2, x);
@@ -93,11 +105,12 @@ public class ProtectedBlockMySQL extends ProtectedBlockJDBC {
return ps;
}
private static final String QueryCountByPlayer =
- "SELECT COUNT(playerName), SUM(playerName = ?) FROM EssentialsProtect "
- + "WHERE worldName = ? AND x = ? AND y = ? AND z = ? GROUP BY x;";
+ "SELECT COUNT(playerName), SUM(playerName = ?) FROM EssentialsProtect "
+ + "WHERE worldName = ? AND x = ? AND y = ? AND z = ? GROUP BY x;";
@Override
- protected PreparedStatement getStatementPlayerCountByLocation(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException {
+ protected PreparedStatement getStatementPlayerCountByLocation(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException
+ {
PreparedStatement ps = conn.prepareStatement(QueryCountByPlayer);
ps.setString(1, playerName);
ps.setString(2, world);
@@ -107,10 +120,11 @@ public class ProtectedBlockMySQL extends ProtectedBlockJDBC {
return ps;
}
private static final String QueryPlayersByLocation =
- "SELECT playerName FROM EssentialsProtect WHERE worldname = ? AND x = ? AND y = ? AND z = ?;";
+ "SELECT playerName FROM EssentialsProtect WHERE worldname = ? AND x = ? AND y = ? AND z = ?;";
@Override
- protected PreparedStatement getStatementPlayersByLocation(Connection conn, String world, int x, int y, int z) throws SQLException {
+ protected PreparedStatement getStatementPlayersByLocation(Connection conn, String world, int x, int y, int z) throws SQLException
+ {
PreparedStatement ps = conn.prepareStatement(QueryPlayersByLocation);
ps.setString(1, world);
ps.setInt(2, x);
@@ -119,10 +133,11 @@ public class ProtectedBlockMySQL extends ProtectedBlockJDBC {
return ps;
}
private static final String QueryDeleteByLocation =
- "DELETE FROM EssentialsProtect WHERE worldName = ? AND x = ? AND y = ? AND z = ?;";
+ "DELETE FROM EssentialsProtect WHERE worldName = ? AND x = ? AND y = ? AND z = ?;";
@Override
- protected PreparedStatement getStatementDeleteByLocation(Connection conn, String world, int x, int y, int z) throws SQLException {
+ protected PreparedStatement getStatementDeleteByLocation(Connection conn, String world, int x, int y, int z) throws SQLException
+ {
PreparedStatement ps = conn.prepareStatement(QueryDeleteByLocation);
ps.setString(1, world);
ps.setInt(2, x);
@@ -131,10 +146,11 @@ public class ProtectedBlockMySQL extends ProtectedBlockJDBC {
return ps;
}
private static final String QueryAllBlocks =
- "SELECT worldName, x, y, z, playerName FROM EssentialsProtect;";
+ "SELECT worldName, x, y, z, playerName FROM EssentialsProtect;";
@Override
- protected PreparedStatement getStatementAllBlocks(Connection conn) throws SQLException {
+ protected PreparedStatement getStatementAllBlocks(Connection conn) throws SQLException
+ {
return conn.prepareStatement(QueryAllBlocks);
}
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockSQLite.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockSQLite.java
index 444c657eb..cf256f1ec 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockSQLite.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockSQLite.java
@@ -5,41 +5,45 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
-public class ProtectedBlockSQLite extends ProtectedBlockJDBC {
- public ProtectedBlockSQLite(String url) throws PropertyVetoException {
+public class ProtectedBlockSQLite extends ProtectedBlockJDBC
+{
+ public ProtectedBlockSQLite(String url) throws PropertyVetoException
+ {
super("org.sqlite.JDBC", url);
}
-
private static final String QueryCreateTable =
- "CREATE TABLE IF NOT EXISTS EssentialsProtect ("
- + "worldName TEXT ,playerName TEXT, "
- + "x NUMERIC, y NUMERIC, z NUMERIC)";
+ "CREATE TABLE IF NOT EXISTS EssentialsProtect ("
+ + "worldName TEXT ,playerName TEXT, "
+ + "x NUMERIC, y NUMERIC, z NUMERIC)";
@Override
- protected PreparedStatement getStatementCreateTable(Connection conn) throws SQLException {
+ protected PreparedStatement getStatementCreateTable(Connection conn) throws SQLException
+ {
return conn.prepareStatement(QueryCreateTable);
}
-
private static final String QueryUpdateFrom2_0Table =
- "CREATE INDEX IF NOT EXISTS position ON EssentialsProtect ("
- + "worldName, x, z, y)";
+ "CREATE INDEX IF NOT EXISTS position ON EssentialsProtect ("
+ + "worldName, x, z, y)";
@Override
- protected PreparedStatement getStatementUpdateFrom2_0Table(Connection conn) throws SQLException {
+ protected PreparedStatement getStatementUpdateFrom2_0Table(Connection conn) throws SQLException
+ {
return conn.prepareStatement(QueryUpdateFrom2_0Table);
}
private static final String QueryDeleteAll = "DELETE FROM EssentialsProtect;";
@Override
- protected PreparedStatement getStatementDeleteAll(Connection conn) throws SQLException {
+ protected PreparedStatement getStatementDeleteAll(Connection conn) throws SQLException
+ {
return conn.prepareStatement(QueryDeleteAll);
}
private static final String QueryInsert =
- "INSERT INTO EssentialsProtect (worldName, x, y, z, playerName) VALUES (?, ?, ?, ?, ?);";
+ "INSERT INTO EssentialsProtect (worldName, x, y, z, playerName) VALUES (?, ?, ?, ?, ?);";
@Override
- protected PreparedStatement getStatementInsert(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException {
+ protected PreparedStatement getStatementInsert(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException
+ {
PreparedStatement ps = conn.prepareStatement(QueryInsert);
ps.setString(1, world);
ps.setInt(2, x);
@@ -49,11 +53,12 @@ public class ProtectedBlockSQLite extends ProtectedBlockJDBC {
return ps;
}
private static final String QueryPlayerCountByLocation =
- "SELECT COUNT(playerName), SUM(playerName = ?) FROM EssentialsProtect "
- + "WHERE worldName = ? AND x = ? AND y = ? AND z = ? GROUP BY x;";
+ "SELECT COUNT(playerName), SUM(playerName = ?) FROM EssentialsProtect "
+ + "WHERE worldName = ? AND x = ? AND y = ? AND z = ? GROUP BY x;";
@Override
- protected PreparedStatement getStatementPlayerCountByLocation(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException {
+ protected PreparedStatement getStatementPlayerCountByLocation(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException
+ {
PreparedStatement ps = conn.prepareStatement(QueryPlayerCountByLocation);
ps.setString(1, playerName);
ps.setString(2, world);
@@ -63,10 +68,11 @@ public class ProtectedBlockSQLite extends ProtectedBlockJDBC {
return ps;
}
private static final String QueryPlayersByLocation =
- "SELECT playerName FROM EssentialsProtect WHERE worldname = ? AND x = ? AND y = ? AND z = ?;";
+ "SELECT playerName FROM EssentialsProtect WHERE worldname = ? AND x = ? AND y = ? AND z = ?;";
@Override
- protected PreparedStatement getStatementPlayersByLocation(Connection conn, String world, int x, int y, int z) throws SQLException {
+ protected PreparedStatement getStatementPlayersByLocation(Connection conn, String world, int x, int y, int z) throws SQLException
+ {
PreparedStatement ps = conn.prepareStatement(QueryPlayersByLocation);
ps.setString(1, world);
ps.setInt(2, x);
@@ -75,10 +81,11 @@ public class ProtectedBlockSQLite extends ProtectedBlockJDBC {
return ps;
}
private static final String QueryDeleteByLocation =
- "DELETE FROM EssentialsProtect WHERE worldName = ? AND x = ? AND y = ? AND z = ?;";
+ "DELETE FROM EssentialsProtect WHERE worldName = ? AND x = ? AND y = ? AND z = ?;";
@Override
- protected PreparedStatement getStatementDeleteByLocation(Connection conn, String world, int x, int y, int z) throws SQLException {
+ protected PreparedStatement getStatementDeleteByLocation(Connection conn, String world, int x, int y, int z) throws SQLException
+ {
PreparedStatement ps = conn.prepareStatement(QueryDeleteByLocation);
ps.setString(1, world);
ps.setInt(2, x);
@@ -87,10 +94,11 @@ public class ProtectedBlockSQLite extends ProtectedBlockJDBC {
return ps;
}
private static final String QueryAllBlocks =
- "SELECT worldName, x, y, z, playerName FROM EssentialsProtect;";
+ "SELECT worldName, x, y, z, playerName FROM EssentialsProtect;";
@Override
- protected PreparedStatement getStatementAllBlocks(Connection conn) throws SQLException {
+ protected PreparedStatement getStatementAllBlocks(Connection conn) throws SQLException
+ {
return conn.prepareStatement(QueryAllBlocks);
}
}
diff --git a/EssentialsSpawn/nbproject/project.properties b/EssentialsSpawn/nbproject/project.properties
index 27fa91493..16c272f09 100644
--- a/EssentialsSpawn/nbproject/project.properties
+++ b/EssentialsSpawn/nbproject/project.properties
@@ -28,6 +28,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blank
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
@@ -36,6 +37,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.place
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateImportGroups=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
@@ -61,12 +63,12 @@ dist.jar=${dist.dir}/EssentialsSpawn.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
includes=**
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
+ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandsetspawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandsetspawn.java
index 9ffc1c3f0..33dff8241 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandsetspawn.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandsetspawn.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.spawn;
-import org.bukkit.Server;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import com.earth2me.essentials.commands.EssentialsCommand;
+import org.bukkit.Server;
public class Commandsetspawn extends EssentialsCommand
@@ -18,6 +18,6 @@ public class Commandsetspawn extends EssentialsCommand
{
final String group = args.length > 0 ? getFinalArg(args, 0) : "default";
ess.getSpawn().setSpawn(user.getLocation(), group);
- user.sendMessage(Util.format("spawnSet", group));
+ user.sendMessage(_("spawnSet", group));
}
}
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
index b3ade7634..f9ea9fa36 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.spawn;
import com.earth2me.essentials.Trade;
-import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.commands.EssentialsCommand;
+import org.bukkit.Server;
public class Commandspawn extends EssentialsCommand
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java
index 1bae3fed3..8ffdb5c97 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java
@@ -1,8 +1,7 @@
package com.earth2me.essentials.spawn;
-
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.Util;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.command.Command;
@@ -29,9 +28,9 @@ public class EssentialsSpawn extends JavaPlugin
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
{
- LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ LOGGER.log(Level.WARNING, _("versionMismatchAll"));
}
- LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
+ LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
}
public void onDisable()
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
index 459eee60a..a5d1efba9 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.spawn;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
@@ -71,7 +71,7 @@ public class EssentialsSpawnPlayerListener extends PlayerListener
}
catch (Exception ex)
{
- Logger.getLogger("Minecraft").log(Level.WARNING, Util.i18n("teleportNewPlayerError"), ex);
+ Logger.getLogger("Minecraft").log(Level.WARNING, _("teleportNewPlayerError"), ex);
}
}
});
diff --git a/EssentialsUpdate/nbproject/project.properties b/EssentialsUpdate/nbproject/project.properties
index fadaa4839..14a032421 100644
--- a/EssentialsUpdate/nbproject/project.properties
+++ b/EssentialsUpdate/nbproject/project.properties
@@ -4,6 +4,43 @@ annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=EssentialsUpdate
application.vendor=essentialsteam
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=2
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=2
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=2
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=120
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAnnotationArgs=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineArrayInit=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAssignment=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineBinaryOp=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineCallArgs=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineDisjunctiveCatchTypes=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineImplements=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineParenthesized=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTernaryOp=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineThrows=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader=0
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateImportGroups=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
@@ -26,11 +63,11 @@ dist.jar=${dist.dir}/EssentialsUpdate.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
includes=**
jar.compress=true
javac.classpath=\
- ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}:\
+ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}:\
${libs.junit_4.classpath}
# Space-separated list of extra javac options
javac.compilerargs=
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/AbstractWorkListener.java b/EssentialsUpdate/src/com/earth2me/essentials/update/AbstractWorkListener.java
index 487e372c8..d2cbb8a64 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/AbstractWorkListener.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/AbstractWorkListener.java
@@ -13,13 +13,15 @@ public abstract class AbstractWorkListener
private final transient Plugin plugin;
private final transient VersionInfo newVersionInfo;
- public final void onWorkAbort() {
+ public final void onWorkAbort()
+ {
onWorkAbort(null);
}
-
+
public abstract void onWorkAbort(String message);
-
- public final void onWorkDone() {
+
+ public final void onWorkDone()
+ {
onWorkDone(null);
}
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsHelp.java b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsHelp.java
index ec62566ca..4ed1df602 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsHelp.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsHelp.java
@@ -1,13 +1,6 @@
package com.earth2me.essentials.update;
-import com.earth2me.essentials.update.chat.Command;
-import com.earth2me.essentials.update.chat.ConfigCommand;
-import com.earth2me.essentials.update.chat.ErrorsCommand;
-import com.earth2me.essentials.update.chat.HelpCommand;
-import com.earth2me.essentials.update.chat.IrcBot;
-import com.earth2me.essentials.update.chat.ListCommand;
-import com.earth2me.essentials.update.chat.StartupCommand;
-import com.earth2me.essentials.update.chat.UsernameUtil;
+import com.earth2me.essentials.update.chat.*;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
index 98dbeb2ef..be6e42ce9 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
@@ -1,6 +1,5 @@
package com.earth2me.essentials.update;
-import com.earth2me.essentials.update.UpdateCheck.CheckResult;
import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
@@ -16,7 +15,8 @@ public class EssentialsUpdate extends JavaPlugin
@Override
public void onEnable()
{
- if (!getDataFolder().exists() && !getDataFolder().mkdirs() ) {
+ if (!getDataFolder().exists() && !getDataFolder().mkdirs())
+ {
Bukkit.getLogger().log(Level.SEVERE, "Could not create data folder: {0}", getDataFolder().getPath());
}
essentialsHelp = new EssentialsHelp(this);
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/GetFile.java b/EssentialsUpdate/src/com/earth2me/essentials/update/GetFile.java
index b48d95dd2..06b414e93 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/GetFile.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/GetFile.java
@@ -1,10 +1,6 @@
package com.earth2me.essentials.update;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
+import java.io.*;
import java.math.BigInteger;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java
index 95ef5e64e..3d465e2e8 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java
@@ -15,8 +15,8 @@ import java.util.TreeMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
-import org.bukkit.plugin.Plugin;
import org.bukkit.configuration.file.YamlConfiguration;
+import org.bukkit.plugin.Plugin;
public class UpdateFile
@@ -66,7 +66,7 @@ public class UpdateFile
getFile = new GetFile(UPDATE_URL);
getFile.saveTo(file);
plugin.getConfig().set("lastupdate", System.currentTimeMillis());
- plugin.getConfig().save(new File(plugin.getDataFolder(),"config.yml"));
+ plugin.getConfig().save(new File(plugin.getDataFolder(), "config.yml"));
return true;
}
catch (IOException ex)
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java b/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java
index c34e40ae5..b9cddc38c 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java
@@ -1,10 +1,10 @@
package com.earth2me.essentials.update;
-import org.bukkit.configuration.Configuration;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.bukkit.configuration.Configuration;
public class VersionInfo
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/AbstractFileCommand.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/AbstractFileCommand.java
index 824383285..7c99d28f6 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/AbstractFileCommand.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/AbstractFileCommand.java
@@ -1,11 +1,7 @@
package com.earth2me.essentials.update.chat;
import com.earth2me.essentials.update.PastieUpload;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
+import java.io.*;
import java.nio.charset.Charset;
import org.bukkit.plugin.Plugin;
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ConfigCommand.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ConfigCommand.java
index 5fda07106..de2c6a830 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ConfigCommand.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ConfigCommand.java
@@ -26,12 +26,16 @@ public class ConfigCommand extends AbstractFileCommand implements Command
do
{
final String line = page.readLine();
- if (line == null) {
+ if (line == null)
+ {
break;
- } else {
+ }
+ else
+ {
input.append(line).append("\n");
}
- } while (true);
+ }
+ while (true);
page.close();
final String message = "Essentials config.yml: " + uploadToPastie(input);
player.sendMessage("§6" + ircBot.getNick() + ": §7" + message);
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractState.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractState.java
index 7478d81b7..2c85c39fd 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractState.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractState.java
@@ -26,9 +26,8 @@ public abstract class AbstractState
catch (Exception ex)
{
/*
- * This should never happen.
- * All states that are added to the map automatically,
- * have to have a Constructor that accepts the StateMap.
+ * This should never happen. All states, that are added to the map automatically, have to have a
+ * Constructor that accepts the StateMap.
*/
throw new RuntimeException(ex);
}
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java
index cb88cc642..930a31bda 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java
@@ -8,5 +8,5 @@ public class InstallationFinishedEvent extends Event
public InstallationFinishedEvent()
{
super(Type.CUSTOM_EVENT);
- }
+ }
}
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java
index 6db8734e7..6ce926f92 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.update.states;
-import com.earth2me.essentials.update.UpdateCheck;
import com.earth2me.essentials.update.AbstractWorkListener;
+import com.earth2me.essentials.update.UpdateCheck;
import java.util.Iterator;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/UpdateOrInstallation.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/UpdateOrInstallation.java
index 5671275f0..6b48f90be 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/UpdateOrInstallation.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/states/UpdateOrInstallation.java
@@ -8,17 +8,18 @@ public class UpdateOrInstallation extends AbstractState
{
private final transient UpdateCheck updateCheck;
private transient boolean update = false;
-
+
public UpdateOrInstallation(final StateMap stateMap, final UpdateCheck updateCheck)
{
super(stateMap);
this.updateCheck = updateCheck;
}
-
+
@Override
public boolean guessAnswer()
{
- if (getUpdateCheck().isEssentialsInstalled()) {
+ if (getUpdateCheck().isEssentialsInstalled())
+ {
update = true;
}
return update;
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/InstallModule.java b/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/InstallModule.java
index 66eeb380d..778f5172f 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/InstallModule.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/InstallModule.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.update.tasks;
+import com.earth2me.essentials.update.AbstractWorkListener;
import com.earth2me.essentials.update.GetFile;
import com.earth2me.essentials.update.ModuleInfo;
import com.earth2me.essentials.update.VersionInfo;
-import com.earth2me.essentials.update.AbstractWorkListener;
import java.io.File;
import java.net.URL;
import java.util.logging.Level;
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/SelfUpdate.java b/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/SelfUpdate.java
index 777e42517..3baf86be7 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/SelfUpdate.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/SelfUpdate.java
@@ -43,8 +43,8 @@ public class SelfUpdate extends AbstractWorkListener implements Task, Runnable
@Override
public void run()
{
- Bukkit.getScheduler().scheduleAsyncDelayedTask(getPlugin(), new Runnable() {
-
+ Bukkit.getScheduler().scheduleAsyncDelayedTask(getPlugin(), new Runnable()
+ {
@Override
public void run()
{
@@ -52,6 +52,4 @@ public class SelfUpdate extends AbstractWorkListener implements Task, Runnable
}
});
}
-
-
}
diff --git a/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java b/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java
index 1c30ad815..a24815210 100755
--- a/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java
+++ b/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java
@@ -15,8 +15,8 @@ found at http://www.jibble.org/licenses/
package org.jibble.pircbot;
import java.io.*;
-import java.net.*;
-import java.util.*;
+import java.net.Socket;
+import java.util.StringTokenizer;
/**
* A Thread which reads lines from the IRC server. It then
diff --git a/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java b/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java
index 86ac404d2..7eddee873 100755
--- a/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java
+++ b/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java
@@ -14,8 +14,7 @@ found at http://www.jibble.org/licenses/
package org.jibble.pircbot;
-import java.io.*;
-import java.net.*;
+import java.io.BufferedWriter;
/**
* A Thread which is responsible for sending messages to the IRC server.
diff --git a/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java b/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java
index a5f049cde..acdf01b46 100755
--- a/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java
+++ b/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java
@@ -15,7 +15,8 @@ found at http://www.jibble.org/licenses/
package org.jibble.pircbot;
import java.io.*;
-import java.net.*;
+import java.net.InetAddress;
+import java.net.Socket;
import java.util.*;
/**
@@ -2558,7 +2559,7 @@ public abstract class PircBot implements ReplyConstants {
* @see #onUserList(String,User[]) onUserList
*/
public final User[] getUsers(String channel) {
- channel = channel.toLowerCase();
+ channel = channel.toLowerCase(Locale.ENGLISH);
User[] userArray = new User[0];
synchronized (_channels) {
Hashtable users = (Hashtable) _channels.get(channel);
@@ -2631,7 +2632,7 @@ public abstract class PircBot implements ReplyConstants {
* Overwrite the existing entry if it exists.
*/
private final void addUser(String channel, User user) {
- channel = channel.toLowerCase();
+ channel = channel.toLowerCase(Locale.ENGLISH);
synchronized (_channels) {
Hashtable users = (Hashtable) _channels.get(channel);
if (users == null) {
@@ -2647,7 +2648,7 @@ public abstract class PircBot implements ReplyConstants {
* Remove a user from the specified channel in our memory.
*/
private final User removeUser(String channel, String nick) {
- channel = channel.toLowerCase();
+ channel = channel.toLowerCase(Locale.ENGLISH);
User user = new User("", nick);
synchronized (_channels) {
Hashtable users = (Hashtable) _channels.get(channel);
@@ -2695,7 +2696,7 @@ public abstract class PircBot implements ReplyConstants {
* Removes an entire channel from our memory of users.
*/
private final void removeChannel(String channel) {
- channel = channel.toLowerCase();
+ channel = channel.toLowerCase(Locale.ENGLISH);
synchronized (_channels) {
_channels.remove(channel);
}
@@ -2713,7 +2714,7 @@ public abstract class PircBot implements ReplyConstants {
private final void updateUser(String channel, int userMode, String nick) {
- channel = channel.toLowerCase();
+ channel = channel.toLowerCase(Locale.ENGLISH);
synchronized (_channels) {
Hashtable users = (Hashtable) _channels.get(channel);
User newUser = null;
diff --git a/EssentialsUpdate/src/org/jibble/pircbot/User.java b/EssentialsUpdate/src/org/jibble/pircbot/User.java
index cb2bfa051..37f981b19 100755
--- a/EssentialsUpdate/src/org/jibble/pircbot/User.java
+++ b/EssentialsUpdate/src/org/jibble/pircbot/User.java
@@ -13,6 +13,8 @@ found at http://www.jibble.org/licenses/
package org.jibble.pircbot;
+import java.util.Locale;
+
/**
* This class is used to represent a user on an IRC server.
* Instances of this class are returned by the getUsers method
@@ -38,7 +40,7 @@ public class User {
User(String prefix, String nick) {
_prefix = prefix;
_nick = nick;
- _lowerNick = nick.toLowerCase();
+ _lowerNick = nick.toLowerCase(Locale.ENGLISH);
}
@@ -109,7 +111,7 @@ public class User {
* @return true if the nicks are identical (case insensitive).
*/
public boolean equals(String nick) {
- return nick.toLowerCase().equals(_lowerNick);
+ return nick.toLowerCase(Locale.ENGLISH).equals(_lowerNick);
}
diff --git a/EssentialsUpdate/test/com/earth2me/essentials/update/VersionTest.java b/EssentialsUpdate/test/com/earth2me/essentials/update/VersionTest.java
index 92faade26..024f2248b 100644
--- a/EssentialsUpdate/test/com/earth2me/essentials/update/VersionTest.java
+++ b/EssentialsUpdate/test/com/earth2me/essentials/update/VersionTest.java
@@ -4,7 +4,6 @@ import com.earth2me.essentials.update.Version.Type;
import java.util.TreeSet;
import junit.framework.TestCase;
import org.junit.Test;
-import static org.junit.Assert.*;
public class VersionTest extends TestCase
diff --git a/EssentialsXMPP/nbproject/project.properties b/EssentialsXMPP/nbproject/project.properties
index d2ed6daf3..802c76227 100644
--- a/EssentialsXMPP/nbproject/project.properties
+++ b/EssentialsXMPP/nbproject/project.properties
@@ -28,6 +28,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blank
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
@@ -36,6 +37,7 @@ auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.place
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateImportGroups=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
@@ -61,7 +63,7 @@ dist.jar=${dist.dir}/original-EssentialsXMPP.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
file.reference.smack-3.2.0.jar=../lib/smack-3.2.0.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
@@ -69,7 +71,7 @@ jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}:\
+ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}:\
${file.reference.smack-3.2.0.jar}
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java
index 4a14ef730..e0bf9827c 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java
@@ -22,6 +22,6 @@ public class Commandsetxmpp extends EssentialsCommand
}
EssentialsXMPP.getInstance().setAddress(user, args[0]);
- user.sendMessage("XMPP address set to "+args[0]);
+ user.sendMessage("XMPP address set to " + args[0]);
}
}
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmpp.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmpp.java
index 632505670..e7dd01670 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmpp.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmpp.java
@@ -33,7 +33,8 @@ public class Commandxmpp extends EssentialsCommand
final String message = getFinalArg(args, 1);
final String senderName = sender instanceof Player ? ess.getUser(sender).getDisplayName() : Console.NAME;
sender.sendMessage("[" + senderName + ">" + address + "] " + message);
- if (!EssentialsXMPP.getInstance().sendMessage(address, "[" + senderName + "] " + message)) {
+ if (!EssentialsXMPP.getInstance().sendMessage(address, "[" + senderName + "] " + message))
+ {
sender.sendMessage("§cError sending message.");
}
}
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
index 631d1b21b..06575851d 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
@@ -1,9 +1,10 @@
package com.earth2me.essentials.xmpp;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.IUser;
-import com.earth2me.essentials.Util;
import java.util.List;
+import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.command.Command;
@@ -22,7 +23,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
private transient UserManager users;
private transient XMPPManager xmpp;
private transient IEssentials ess;
-
+
public static IEssentialsXMPP getInstance()
{
return instance;
@@ -39,7 +40,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
{
LOGGER.log(Level.SEVERE, "Failed to load Essentials before EssentialsXMPP");
}
-
+
final EssentialsXMPPPlayerListener playerListener = new EssentialsXMPPPlayerListener(ess);
pluginManager.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this);
pluginManager.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.Monitor, this);
@@ -53,9 +54,9 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
{
- LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ LOGGER.log(Level.WARNING, _("versionMismatchAll"));
}
- LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
+ LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
}
@Override
@@ -73,7 +74,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
@Override
public void setAddress(final Player user, final String address)
{
- final String username = user.getName().toLowerCase();
+ final String username = user.getName().toLowerCase(Locale.ENGLISH);
instance.users.setAddress(username, address);
}
@@ -93,7 +94,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
@Override
public boolean toggleSpy(final Player user)
{
- final String username = user.getName().toLowerCase();
+ final String username = user.getName().toLowerCase(Locale.ENGLISH);
final boolean spy = !instance.users.isSpy(username);
instance.users.setSpy(username, spy);
return spy;
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java
index 9734444ad..85ef50949 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java
@@ -3,10 +3,7 @@ package com.earth2me.essentials.xmpp;
import com.earth2me.essentials.EssentialsConf;
import com.earth2me.essentials.IConf;
import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
public class UserManager implements IConf
@@ -24,26 +21,27 @@ public class UserManager implements IConf
public final boolean isSpy(final String username)
{
- return users.getBoolean(username.toLowerCase() + "." + SPY, false);
+ return users.getBoolean(username.toLowerCase(Locale.ENGLISH) + "." + SPY, false);
}
public void setSpy(final String username, final boolean spy)
{
- setUser(username.toLowerCase(), getAddress(username), spy);
+ setUser(username.toLowerCase(Locale.ENGLISH), getAddress(username), spy);
}
public final String getAddress(final String username)
{
- return users.getString(username.toLowerCase() + "." + ADDRESS, null);
+ return users.getString(username.toLowerCase(Locale.ENGLISH) + "." + ADDRESS, null);
}
-
+
public final String getUserByAddress(final String search)
{
final List<String> usernames = users.getKeys(null);
for (String username : usernames)
{
final String address = users.getString(username + "." + ADDRESS, null);
- if (address != null && search.equalsIgnoreCase(address)) {
+ if (address != null && search.equalsIgnoreCase(address))
+ {
return username;
}
}
@@ -52,7 +50,7 @@ public class UserManager implements IConf
public void setAddress(final String username, final String address)
{
- setUser(username.toLowerCase(), address, isSpy(username));
+ setUser(username.toLowerCase(Locale.ENGLISH), address, isSpy(username));
}
public List<String> getSpyUsers()
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
index cbe89f9d6..695969378 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
@@ -5,27 +5,14 @@ import com.earth2me.essentials.EssentialsConf;
import com.earth2me.essentials.IConf;
import com.earth2me.essentials.IUser;
import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import org.bukkit.entity.Player;
-import org.bukkit.plugin.java.JavaPlugin;
-import org.jivesoftware.smack.Chat;
-import org.jivesoftware.smack.ChatManager;
-import org.jivesoftware.smack.ChatManagerListener;
-import org.jivesoftware.smack.ConnectionConfiguration;
-import org.jivesoftware.smack.MessageListener;
import org.jivesoftware.smack.Roster.SubscriptionMode;
-import org.jivesoftware.smack.XMPPConnection;
-import org.jivesoftware.smack.XMPPException;
+import org.jivesoftware.smack.*;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.util.StringUtils;
@@ -69,7 +56,8 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
}
if (chat != null)
{
- if (!connection.isConnected()) {
+ if (!connection.isConnected())
+ {
disconnect();
connect();
}
@@ -103,7 +91,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
break;
default:
final IUser sender = parent.getUserByAddress(StringUtils.parseBareAddress(chat.getParticipant()));
- parent.broadcastMessage(sender, "="+sender.getDisplayName()+": "+ message, StringUtils.parseBareAddress(chat.getParticipant()));
+ parent.broadcastMessage(sender, "=" + sender.getDisplayName() + ": " + message, StringUtils.parseBareAddress(chat.getParticipant()));
}
}
}
diff --git a/WebPush/index.php b/WebPush/index.php
index ab018bf27..56193ebf7 100644
--- a/WebPush/index.php
+++ b/WebPush/index.php
@@ -22,14 +22,15 @@ $build = $_GET['buildid'];
$branch = $_GET['branch'];
$version = $_GET['version'];
-if ($build == "" || $branch == "" || $version == "")
-{
- die();
+include('../build/function.php');
+updateval($branch);
+
+if ($build == "" || $branch == "" || $version == "") {
+ die('Invalid');
}
//Don't upload dev builds atm.
-if ($branch == "bt2")
-{
+if ($branch == "bt2") {
die();
}
@@ -37,16 +38,22 @@ sleep(60);
$changes = getChanges($build, $branch);
-uploadit($build, $branch, 'Essentials.jar', $version, $changes);
-sleep(1);
-uploadit($build, $branch, 'EssentialsChat.jar', $version, $changes);
-sleep(1);
-uploadit($build, $branch, 'EssentialsSpawn.jar', $version, $changes);
+//uploadit($build, $branch, 'Essentials.jar', $version, $changes);
+//sleep(1);
+//uploadit($build, $branch, 'EssentialsChat.jar', $version, $changes);
+//sleep(1);
+//uploadit($build, $branch, 'EssentialsSpawn.jar', $version, $changes);
+//sleep(1);
+//uploadit($build, $branch, 'EssentialsProtect.jar', $version, $changes);
+//sleep(1);
+//uploadit($build, $branch, 'EssentialsXMPP.jar', $version, $changes);
+//sleep(1);
+//uploadit($build, $branch, 'EssentialsGeoIP.jar', $version, $changes);
+
+uploadit($build, $branch, 'Essentials.zip', $version, $changes);
sleep(1);
-uploadit($build, $branch, 'EssentialsProtect.jar', $version, $changes);
-sleep(1);
-uploadit($build, $branch, 'EssentialsXMPP.jar', $version, $changes);
-sleep(1);
-uploadit($build, $branch, 'EssentialsGeoIP.jar', $version, $changes);
+uploadit($build, $branch, 'Essentials-extra.zip', $version, $changes);
+
+
?>
diff --git a/WebPush/upload.php b/WebPush/upload.php
index cf5c2112e..f971062ed 100644
--- a/WebPush/upload.php
+++ b/WebPush/upload.php
@@ -1,35 +1,32 @@
<?php
+
include_once('simple_html_dom.php');
-function uploadit($build, $branch, $file, $version, $changes)
-{
+function uploadit($build, $branch, $file, $version, $changes) {
file_put_contents('status.log', "\nUploading file $file to devbukkit! ", FILE_APPEND);
$slug = "essentials";
$plugin = "Essentials";
$url = "http://ci.earth2me.net/guestAuth/repository/download/$branch/$build:id/$file";
$filename = explode('.', $file);
$request_url = "http://dev.bukkit.org/server-mods/$slug/upload-file.json";
-
+
include ('apikey.php');
-
+
$params['name'] = $filename[0] . '-' . $version;
$params['game_versions'] = 176;
$params['change_log'] = $changes;
$params['change_markup_type'] = "html";
$params['fileurl'] = $url;
-
- if (stripos($version, 'Dev') !== false)
- {
+
+ if (stripos($version, 'Dev') !== false) {
$params['file_type'] = "a";
}
- elseif (stripos($version, 'Pre') !== false)
- {
+ elseif (stripos($version, 'Pre') !== false) {
$params['file_type'] = "b";
}
- else
- {
+ else {
$params['file_type'] = "r";
- }
+ }
$content = file_get_contents($url);
file_put_contents($file, $content);
@@ -42,13 +39,11 @@ function uploadit($build, $branch, $file, $version, $changes)
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$result = curl_exec($ch);
-
- if ($result === false)
- {
+
+ if ($result === false) {
$result = curl_error($ch);
}
- elseif ($result == "")
- {
+ elseif ($result == "") {
$result = "Success uploading $file - $version";
}
curl_close($ch);
@@ -57,8 +52,7 @@ function uploadit($build, $branch, $file, $version, $changes)
return true;
}
-function getChanges($job, $project)
-{
+function getChanges($job, $project) {
$commitblacklist = array(
'Merge branch',
'Merge pull',
@@ -72,20 +66,15 @@ function getChanges($job, $project)
$html->load_file($url);
$output = "Change Log:<ul>";
- foreach ($html->find('.changelist') as $list)
- {
- foreach ($list->find('.comment') as $comment)
- {
+ foreach ($html->find('.changelist') as $list) {
+ foreach ($list->find('.comment') as $comment) {
$text = $comment->innertext;
- foreach ($commitblacklist as $matchtext)
- {
- if (stripos($text, $matchtext) !== FALSE)
- {
+ foreach ($commitblacklist as $matchtext) {
+ if (stripos($text, $matchtext) !== FALSE) {
$text = "";
}
}
- if ($text != "")
- {
+ if ($text != "") {
$output .= "<li>$text</li>\n";
}
}
diff --git a/lib/bukkit-0.0.1-SNAPSHOT.jar b/lib/bukkit-1.0.0-R1-SNAPSHOT.jar
index 1551ebdd5..3056d9e59 100644
--- a/lib/bukkit-0.0.1-SNAPSHOT.jar
+++ b/lib/bukkit-1.0.0-R1-SNAPSHOT.jar
Binary files differ
diff --git a/lib/craftbukkit-0.0.1-SNAPSHOT.jar b/lib/craftbukkit-1.0.0-SNAPSHOT.jar
index d6d49561d..5e1e9c101 100644
--- a/lib/craftbukkit-0.0.1-SNAPSHOT.jar
+++ b/lib/craftbukkit-1.0.0-SNAPSHOT.jar
Binary files differ