diff --git a/docs/commands.md b/docs/commands.md index 4dd070fd..b9f68054 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -1,5 +1,5 @@ - + ## AuthMe Commands You can use the following commands to use the features of AuthMe. Mandatory arguments are marked with `< >` @@ -63,7 +63,8 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`). - **/changepassword** <oldPassword> <newPassword>: Command to change your password using AuthMeReloaded.
Requires `authme.player.changepassword` - **/changepassword help** [query]: View detailed help for /changepassword commands. -- **/email**: The AuthMeReloaded Email command base. +- **/email**: The AuthMeReloaded email command base. +- **/email show**: Show your current email address. - **/email add** <email> <verifyEmail>: Add a new email address to your account.
Requires `authme.player.email.add` - **/email change** <oldEmail> <newEmail>: Change an email address of your account. @@ -75,7 +76,6 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`).
Requires `authme.player.captcha` - **/captcha help** [query]: View detailed help for /captcha commands. - --- -This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sun Oct 16 21:39:08 CEST 2016 +This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sun Oct 23 18:25:12 CEST 2016 diff --git a/docs/config.md b/docs/config.md new file mode 100644 index 00000000..95e1de39 --- /dev/null +++ b/docs/config.md @@ -0,0 +1,451 @@ + + + +## AuthMe Configuration +The first time you run AuthMe it will create a config.yml file in the plugins/AuthMe folder, +with which you can configure various settings. This following is the initial contents of +the generated config.yml file. + +```yml + +DataSource: + # What type of database do you want to use? + # Valid values: sqlite, mysql + backend: 'SQLITE' + # Enable database caching, should improve database performance + caching: true + # Database host address + mySQLHost: '127.0.0.1' + # Database port + mySQLPort: '3306' + # Username about Database Connection Infos + mySQLUsername: 'authme' + # Password about Database Connection Infos + mySQLPassword: '12345' + # Database Name, use with converters or as SQLITE database name + mySQLDatabase: 'authme' + # Table of the database + mySQLTablename: 'authme' + # Column of IDs to sort data + mySQLColumnId: 'id' + # Column for storing or checking players nickname + mySQLColumnName: 'username' + # Column for storing or checking players RealName + mySQLRealName: 'realname' + # Column for storing players passwords + mySQLColumnPassword: 'password' + # Column for storing players emails + mySQLColumnEmail: 'email' + # Column for storing if a player is logged in or not + mySQLColumnLogged: 'isLogged' + # Column for storing players ips + mySQLColumnIp: 'ip' + # Column for storing players lastlogins + mySQLColumnLastLogin: 'lastlogin' + # Column for storing player LastLocation - X + mySQLlastlocX: 'x' + # Column for storing player LastLocation - Y + mySQLlastlocY: 'y' + # Column for storing player LastLocation - Z + mySQLlastlocZ: 'z' + # Column for storing player LastLocation - World Name + mySQLlastlocWorld: 'world' + # Overrides the size of the DB Connection Pool, -1 = Auto + poolSize: -1 +ExternalBoardOptions: + # Column for storing players passwords salts + mySQLColumnSalt: '' + # Column for storing players groups + mySQLColumnGroup: '' + # -1 means disabled. If you want that only activated players + # can log into your server, you can set here the group number + # of unactivated users, needed for some forum/CMS support + nonActivedUserGroup: -1 + # Other MySQL columns where we need to put the username (case-sensitive) + mySQLOtherUsernameColumns: [] + # How much log2 rounds needed in BCrypt (do not change if you do not know what it does) + bCryptLog2Round: 10 + # phpBB table prefix defined during the phpBB installation process + phpbbTablePrefix: 'phpbb_' + # phpBB activated group ID; 2 is the default registered group defined by phpBB + phpbbActivatedGroupId: 2 + # Wordpress prefix defined during WordPress installation + wordpressTablePrefix: 'wp_' +Converter: + Rakamak: + # Rakamak file name + fileName: 'users.rak' + # Rakamak use IP? + useIP: false + # Rakamak IP file name + ipFileName: 'UsersIp.rak' + CrazyLogin: + # CrazyLogin database file name + fileName: 'accounts.db' +settings: + sessions: + # Do you want to enable the session feature? + # If enabled, when a player authenticates successfully, + # his IP and his nickname is saved. + # The next time the player joins the server, if his IP + # is the same as last time and the timeout hasn't + # expired, he will not need to authenticate. + enabled: false + # After how many minutes should a session expire? + # Remember that sessions will end only after the timeout, and + # if the player's IP has changed but the timeout hasn't expired, + # the player will be kicked from the server due to invalid session + timeout: 10 + # Should the session expire if the player tries to log in with + # another IP address? + sessionExpireOnIpChange: true + # Message language, available: en, de, br, cz, pl, fr, ru, hu, sk, es, zhtw, fi, zhcn, lt, it, ko, pt + messagesLanguage: 'en' + restrictions: + # Keeps collisions disabled for logged players + # Works only with MC 1.9 + keepCollisionsDisabled: false + # Can not authenticated players chat? + # Keep in mind that this feature also blocks all commands not + # listed in the list below. + allowChat: false + # Hide the chat log from players who are not authenticated? + hideChat: false + # Allowed commands for unauthenticated players + allowCommands: + - '/login' + - '/register' + - '/l' + - '/reg' + - '/email' + - '/captcha' + # Max number of allowed registrations per IP + # The value 0 means an unlimited number of registrations! + maxRegPerIp: 1 + # Minimum allowed username length + minNicknameLength: 4 + # Maximum allowed username length + maxNicknameLength: 16 + # When this setting is enabled, online players can't be kicked out + # due to "Logged in from another Location" + # This setting will prevent potential security exploits. + ForceSingleSession: true + ForceSpawnLocOnJoin: + # If enabled, every player that spawn in one of the world listed in "ForceSpawnLocOnJoin.worlds" + # will be teleported to the spawnpoint after successful authentication. + # The quit location of the player will be overwritten. + # This is different from "teleportUnAuthedToSpawn" that teleport player + # to the spawnpoint on join. + enabled: false + # WorldNames where we need to force the spawn location + # Case-sensitive! + worlds: + - 'world' + - 'world_nether' + - 'world_the_end' + # This option will save the quit location of the players. + SaveQuitLocation: false + # To activate the restricted user feature you need + # to enable this option and configure the AllowedRestrictedUser field. + AllowRestrictedUser: false + # The restricted user feature will kick players listed below + # if they don't match the defined IP address. + # Example: + # AllowedRestrictedUser: + # - playername;127.0.0.1 + AllowedRestrictedUser: [] + # Should unregistered players be kicked immediately? + kickNonRegistered: false + # Should players be kicked on wrong password? + kickOnWrongPassword: false + # Should not logged in players be teleported to the spawn? + # After the authentication they will be teleported back to + # their normal position. + teleportUnAuthedToSpawn: false + # Can unregistered players walk around? + allowMovement: false + # Should not authenticated players have speed = 0? + # This will reset the fly/walk speed to default value after the login. + removeSpeed: true + # After how many seconds should players who fail to login or register + # be kicked? Set to 0 to disable. + timeout: 30 + # Regex syntax of allowed characters in the player name. + allowedNicknameCharacters: '[a-zA-Z0-9_]*' + # How far can unregistered players walk? + # Set to 0 for unlimited radius + allowedMovementRadius: 100 + # Enable double check of password when you register + # when it's true, registration requires that kind of command: + # /register + enablePasswordConfirmation: true + # Should we protect the player inventory before logging in? Requires ProtocolLib. + ProtectInventoryBeforeLogIn: true + # Should we deny the tabcomplete feature before logging in? Requires ProtocolLib. + DenyTabCompleteBeforeLogin: true + # Should we display all other accounts from a player when he joins? + # permission: /authme.admin.accounts + displayOtherAccounts: true + # Ban ip when the ip is not the ip registered in database + banUnsafedIP: false + # Spawn priority; values: authme, essentials, multiverse, default + spawnPriority: 'authme,essentials,multiverse,default' + # Maximum Login authorized by IP + maxLoginPerIp: 0 + # Maximum Join authorized by IP + maxJoinPerIp: 0 + # AuthMe will NEVER teleport players if set to true! + noTeleport: false + # Regex syntax for allowed chars in passwords + allowedPasswordCharacters: '[\x21-\x7E]*' + # Log level: INFO, FINE, DEBUG. Use INFO for general messages, + # FINE for some additional detailed ones (like password failed), + # and DEBUG for debugging + logLevel: 'FINE' + # By default we schedule async tasks when talking to the database + # If you want typical communication with the database to happen synchronously, set this to false + useAsyncTasks: true + GameMode: + # Force survival gamemode when player joins? + ForceSurvivalMode: false + unrestrictions: + # Below you can list all account names that + # AuthMe will ignore for registration or login, configure it + # at your own risk!! Remember that if you are going to add + # nickname with [], you have to delimit name with ' '. + # this option add compatibility with BuildCraft and some + # other mods. + # It is case-sensitive! + UnrestrictedName: [] + security: + # Minimum length of password + minPasswordLength: 5 + # Maximum length of password + passwordMaxLength: 30 + # This is a very important option: every time a player joins the server, + # if they are registered, AuthMe will switch him to unLoggedInGroup. + # This should prevent all major exploits. + # You can set up your permission plugin with this special group to have no permissions, + # or only permission to chat (or permission to send private messages etc.). + # The better way is to set up this group with few permissions, so if a player + # tries to exploit an account they can do only what you've defined for the group. + # After, a logged in player will be moved to his correct permissions group! + # Please note that the group name is case-sensitive, so 'admin' is different from 'Admin' + # Otherwise your group will be wiped and the player will join in the default group []! + # Example unLoggedinGroup: NotLogged + unLoggedinGroup: 'unLoggedinGroup' + # Possible values: MD5, SHA1, SHA256, WHIRLPOOL, XAUTH, MD5VB, PHPBB, + # MYBB, IPB3, PHPFUSION, SMF, XENFORO, SALTED2MD5, JOOMLA, BCRYPT, WBB3, SHA512, + # DOUBLEMD5, PBKDF2, PBKDF2DJANGO, WORDPRESS, ROYALAUTH, CUSTOM (for developers only) + passwordHash: 'SHA256' + # Salt length for the SALTED2MD5 MD5(MD5(password)+salt) + doubleMD5SaltLength: 8 + # If password checking return false, do we need to check with all + # other password algorithm to check an old password? + # AuthMe will update the password to the new password hash + supportOldPasswordHash: false + # Prevent unsafe passwords from being used; put them in lowercase! + # unsafePasswords: + # - '123456' + # - 'password' + unsafePasswords: + - '123456' + - 'password' + - 'qwerty' + - '12345' + - '54321' + - '123456789' + registration: + # Enable registration on the server? + enabled: true + # Send every X seconds a message to a player to + # remind him that he has to login/register + messageInterval: 5 + # Only registered and logged in players can play. + # See restrictions for exceptions + force: true + # Do we replace password registration by an email registration method? + enableEmailRegistrationSystem: false + # Enable double check of email when you register + # when it's true, registration requires that kind of command: + # /register + doubleEmailCheck: false + # Do we force kick a player after a successful registration? + # Do not use with login feature below + forceKickAfterRegister: false + # Does AuthMe need to enforce a /login after a successful registration? + forceLoginAfterRegister: false + # Force these commands after /login, without any '/', use %p to replace with player name + forceCommands: [] + # Force these commands after /login as service console, without any '/'. Use %p to replace with player name + forceCommandsAsConsole: [] + # Force these commands after /register, without any '/', use %p to replace with player name + forceRegisterCommands: [] + # Force these commands after /register as a server console, without any '/'. Use %p to replace with player name + forceRegisterCommandsAsConsole: [] + # Enable to display the welcome message (welcome.txt) after a login + # You can use colors in this welcome.txt + some replaced strings: + # {PLAYER}: player name, {ONLINE}: display number of online players, {MAXPLAYERS}: display server slots, + # {IP}: player ip, {LOGINS}: number of players logged, {WORLD}: player current world, {SERVER}: server name + # {VERSION}: get current bukkit version, {COUNTRY}: player country + useWelcomeMessage: true + # Do we need to broadcast the welcome message to all server or only to the player? set true for server or false for player + broadcastWelcomeMessage: false + # Should we delay the join message and display it once the player has logged in? + delayJoinMessage: false + # Should we remove the leave messages of unlogged users? + removeUnloggedLeaveMessage: false + # Should we remove join messages altogether? + removeJoinMessage: false + # Should we remove leave messages altogether? + removeLeaveMessage: false + # Do we need to add potion effect Blinding before login/reigster? + applyBlindEffect: false + # Do we need to prevent people to login with another case? + # If Xephi is registered, then Xephi can login, but not XEPHI/xephi/XePhI + preventOtherCase: false +permission: + # Take care with this option; if you want + # to use group switching of AuthMe + # for unloggedIn players, set this setting to true. + # Default is false. + EnablePermissionCheck: false +Email: + # Email SMTP server host + mailSMTP: 'smtp.gmail.com' + # Email SMTP server port + mailPort: 465 + # Email account which sends the mails + mailAccount: '' + # Email account password + mailPassword: '' + # Custom sender name, replacing the mailAccount name in the email + mailSenderName: '' + # Recovery password length + RecoveryPasswordLength: 8 + # Mail Subject + mailSubject: 'Your new AuthMe password' + # Like maxRegPerIP but with email + maxRegPerEmail: 1 + # Recall players to add an email? + recallPlayers: false + # Delay in minute for the recall scheduler + delayRecall: 5 + # Blacklist these domains for emails + emailBlacklisted: + - '10minutemail.com' + # Whitelist ONLY these domains for emails + emailWhitelisted: [] + # Send the new password drawn in an image? + generateImage: false + # The OAuth2 token + emailOauth2Token: '' +Hooks: + # Do we need to hook with multiverse for spawn checking? + multiverse: true + # Do we need to hook with BungeeCord? + bungeecord: false + # Send player to this BungeeCord server after register/login + sendPlayerTo: '' + # Do we need to disable Essentials SocialSpy on join? + disableSocialSpy: true + # Do we need to force /motd Essentials command on join? + useEssentialsMotd: false +GroupOptions: + # Unregistered permission group + UnregisteredPlayerGroup: '' + # Registered permission group + RegisteredPlayerGroup: '' +Protection: + # Enable some servers protection (country based login, antibot) + enableProtection: false + # Apply the protection also to registered usernames + enableProtectionRegistered: true + # Countries allowed to join the server and register, see http://dev.bukkit.org/bukkit-plugins/authme-reloaded/pages/countries-codes/ for countries' codes + # PLEASE USE QUOTES! + countries: + - 'US' + - 'GB' + # Countries not allowed to join the server and register + # PLEASE USE QUOTES! + countriesBlacklist: + - 'A1' + # Do we need to enable automatic antibot system? + enableAntiBot: true + # Max number of players allowed to login in 5 secs before the AntiBot system is enabled automatically + antiBotSensibility: 10 + # Duration in minutes of the antibot automatic system + antiBotDuration: 10 + # Delay in seconds before the antibot activation + antiBotDelay: 60 +Purge: + # If enabled, AuthMe automatically purges old, unused accounts + useAutoPurge: false + # Number of Days an account become Unused + daysBeforeRemovePlayer: 60 + # Do we need to remove the player.dat file during purge process? + removePlayerDat: false + # Do we need to remove the Essentials/userdata/player.yml file during purge process? + removeEssentialsFile: false + # World where are players.dat stores + defaultWorld: 'world' + # Do we need to remove LimitedCreative/inventories/player.yml, player_creative.yml files during purge process ? + removeLimitedCreativesInventories: false + # Do we need to remove the AntiXRayData/PlayerData/player file during purge process? + removeAntiXRayFile: false + # Do we need to remove permissions? + removePermissions: false +Security: + SQLProblem: + # Stop the server if we can't contact the sql database + # Take care with this, if you set this to false, + # AuthMe will automatically disable and the server won't be protected! + stopServer: true + ReloadCommand: + # /reload support + useReloadCommandSupport: true + console: + # Remove passwords from console? + removePassword: true + # Copy AuthMe log output in a separate file as well? + logConsole: true + captcha: + # Enable captcha when a player uses wrong password too many times + useCaptcha: false + # Max allowed tries before a captcha is required + maxLoginTry: 5 + # Captcha length + captchaLength: 5 + tempban: + # Tempban a user's IP address if they enter the wrong password too many times + enableTempban: false + # How many times a user can attempt to login before their IP being tempbanned + maxLoginTries: 10 + # The length of time a IP address will be tempbanned in minutes + # Default: 480 minutes, or 8 hours + tempbanLength: 480 + # How many minutes before resetting the count for failed logins by IP and username + # Default: 480 minutes (8 hours) + minutesBeforeCounterReset: 480 + recoveryCode: + # Number of characters a recovery code should have (0 to disable) + length: 8 + # How many hours is a recovery code valid for? + validForHours: 4 +BackupSystem: + # Enable or disable automatic backup + ActivateBackup: false + # Set backup at every start of server + OnServerStart: false + # Set backup at every stop of server + OnServerStop: true + # Windows only mysql installation Path + MysqlWindowsPath: 'C:\Program Files\MySQL\MySQL Server 5.1\' +``` + +To change settings on a running server, save your changes to config.yml and use +`/authme reload`. + +--- + +This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sun Oct 23 18:25:12 CEST 2016 diff --git a/docs/translations.md b/docs/translations.md index c261bb8f..c4288f15 100644 --- a/docs/translations.md +++ b/docs/translations.md @@ -1,5 +1,5 @@ - + # AuthMe Translations The following translations are available in AuthMe. Set `messagesLanguage` to the language code @@ -8,32 +8,32 @@ in your config.yml to use the language, or use another language code to start a Code | Language | Translated |   ---- | -------- | ---------: | ------ [en](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_en.yml) | English | 100% | bar -[bg](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_bg.yml) | Bulgarian | 73% | bar -[br](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_br.yml) | Brazilian | 100% | bar -[cz](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_cz.yml) | Czech | 91% | bar -[de](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_de.yml) | German | 97% | bar -[es](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_es.yml) | Spanish | 100% | bar -[eu](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_eu.yml) | Basque | 66% | bar -[fi](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_fi.yml) | Finnish | 70% | bar -[fr](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_fr.yml) | French | 97% | bar -[gl](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_gl.yml) | Galician | 74% | bar -[hu](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_hu.yml) | Hungarian | 100% | bar -[id](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_id.yml) | Indonesian | 74% | bar +[bg](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_bg.yml) | Bulgarian | 71% | bar +[br](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_br.yml) | Brazilian | 97% | bar +[cz](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_cz.yml) | Czech | 88% | bar +[de](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_de.yml) | German | 95% | bar +[es](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_es.yml) | Spanish | 97% | bar +[eu](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_eu.yml) | Basque | 64% | bar +[fi](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_fi.yml) | Finnish | 68% | bar +[fr](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_fr.yml) | French | 95% | bar +[gl](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_gl.yml) | Galician | 72% | bar +[hu](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_hu.yml) | Hungarian | 97% | bar +[id](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_id.yml) | Indonesian | 72% | bar [it](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_it.yml) | Italian | 100% | bar -[ko](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_ko.yml) | Korean | 76% | bar -[lt](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_lt.yml) | Latvian | 57% | bar -[nl](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_nl.yml) | Dutch | 80% | bar -[pl](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_pl.yml) | Polish | 95% | bar -[pt](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_pt.yml) | Portuguese | 91% | bar -[ru](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_ru.yml) | Russian | 97% | bar -[sk](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_sk.yml) | Slovakian | 50% | bar -[tr](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_tr.yml) | Turkish | 85% | bar -[uk](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_uk.yml) | Ukrainian | 97% | bar -[vn](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_vn.yml) | Vietnamese | 85% | bar -[zhcn](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_zhcn.yml) | Chinese (China) | 85% | bar -[zhhk](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_zhhk.yml) | Chinese (Hong Kong) | 85% | bar -[zhtw](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_zhtw.yml) | Chinese (Taiwan) | 85% | bar +[ko](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_ko.yml) | Korean | 74% | bar +[lt](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_lt.yml) | Latvian | 55% | bar +[nl](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_nl.yml) | Dutch | 78% | bar +[pl](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_pl.yml) | Polish | 92% | bar +[pt](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_pt.yml) | Portuguese | 88% | bar +[ru](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_ru.yml) | Russian | 95% | bar +[sk](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_sk.yml) | Slovakian | 49% | bar +[tr](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_tr.yml) | Turkish | 83% | bar +[uk](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_uk.yml) | Ukrainian | 95% | bar +[vn](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_vn.yml) | Vietnamese | 83% | bar +[zhcn](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_zhcn.yml) | Chinese (China) | 83% | bar +[zhhk](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_zhhk.yml) | Chinese (Hong Kong) | 83% | bar +[zhtw](https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/resources/messages/messages_zhtw.yml) | Chinese (Taiwan) | 83% | bar --- -This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sun Oct 09 09:42:48 CEST 2016 +This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sun Oct 23 18:25:14 CEST 2016 diff --git a/src/test/java/tools/docs/commands/CommandPageCreater.java b/src/test/java/tools/docs/commands/CommandPageCreater.java index ecf98466..ff1500a7 100644 --- a/src/test/java/tools/docs/commands/CommandPageCreater.java +++ b/src/test/java/tools/docs/commands/CommandPageCreater.java @@ -6,7 +6,7 @@ import fr.xephi.authme.command.CommandInitializer; import fr.xephi.authme.command.CommandUtils; import fr.xephi.authme.permission.PermissionNode; import tools.utils.AutoToolTask; -import tools.utils.FileUtils; +import tools.utils.FileIoUtils; import tools.utils.TagValue.NestedTagValue; import tools.utils.TagValueHolder; import tools.utils.ToolsConstants; @@ -29,7 +29,7 @@ public class CommandPageCreater implements AutoToolTask { NestedTagValue commandTags = new NestedTagValue(); addCommandsInfo(commandTags, baseCommands); - FileUtils.generateFileFromTemplate( + FileIoUtils.generateFileFromTemplate( ToolsConstants.TOOLS_SOURCE_ROOT + "docs/commands/commands.tpl.md", OUTPUT_FILE, TagValueHolder.create().put("commands", commandTags)); diff --git a/src/test/java/tools/docs/config/UpdateConfigPageTask.java b/src/test/java/tools/docs/config/UpdateConfigPageTask.java new file mode 100644 index 00000000..f9a249a7 --- /dev/null +++ b/src/test/java/tools/docs/config/UpdateConfigPageTask.java @@ -0,0 +1,49 @@ +package tools.docs.config; + +import com.github.authme.configme.SettingsManager; +import com.github.authme.configme.resource.YamlFileResource; +import fr.xephi.authme.settings.properties.AuthMeSettingsRetriever; +import fr.xephi.authme.util.FileUtils; +import tools.utils.AutoToolTask; +import tools.utils.FileIoUtils; +import tools.utils.TagValueHolder; +import tools.utils.ToolsConstants; + +import java.io.File; +import java.io.IOException; + +/** + * Task for updating the config docs page. + */ +public class UpdateConfigPageTask implements AutoToolTask { + + private static final String TEMPLATE_FILE = ToolsConstants.TOOLS_SOURCE_ROOT + "docs/config/config.tpl.md"; + private static final String OUTPUT_FILE = ToolsConstants.DOCS_FOLDER + "config.md"; + + @Override + public String getTaskName() { + return "updateConfigPage"; + } + + @Override + public void executeDefault() { + File config = null; + try { + // Create empty temporary .yml file and save the config to it + config = File.createTempFile("authme-config-", ".yml"); + SettingsManager settingsManager = new SettingsManager( + new YamlFileResource(config), null, AuthMeSettingsRetriever.buildConfigurationData()); + settingsManager.save(); + + // Get the contents and generate template file + TagValueHolder tagValueHolder = TagValueHolder.create() + .put("config", FileIoUtils.readFromFile(config.toPath())); + FileIoUtils.generateFileFromTemplate(TEMPLATE_FILE, OUTPUT_FILE, tagValueHolder); + System.out.println("Wrote to '" + OUTPUT_FILE + "'"); + } catch (IOException e) { + throw new IllegalStateException(e); + } finally { + FileUtils.delete(config); + } + } +} diff --git a/src/test/java/tools/docs/config/config.tpl.md b/src/test/java/tools/docs/config/config.tpl.md new file mode 100644 index 00000000..25cf8c2c --- /dev/null +++ b/src/test/java/tools/docs/config/config.tpl.md @@ -0,0 +1,16 @@ + + + +## AuthMe Configuration +The first time you run AuthMe it will create a config.yml file in the plugins/AuthMe folder, +with which you can configure various settings. This following is the initial contents of +the generated config.yml file. + +```yml +{config} +``` + +To change settings on a running server, save your changes to config.yml and use +`/authme reload`. + +{gen_footer} diff --git a/src/test/java/tools/docs/hashmethods/HashAlgorithmsDescriptionTask.java b/src/test/java/tools/docs/hashmethods/HashAlgorithmsDescriptionTask.java index 998214cf..b21d7fda 100644 --- a/src/test/java/tools/docs/hashmethods/HashAlgorithmsDescriptionTask.java +++ b/src/test/java/tools/docs/hashmethods/HashAlgorithmsDescriptionTask.java @@ -2,7 +2,7 @@ package tools.docs.hashmethods; import fr.xephi.authme.security.HashAlgorithm; import tools.utils.AutoToolTask; -import tools.utils.FileUtils; +import tools.utils.FileIoUtils; import tools.utils.TagValue.NestedTagValue; import tools.utils.TagValueHolder; import tools.utils.ToolsConstants; @@ -28,7 +28,8 @@ public class HashAlgorithmsDescriptionTask implements AutoToolTask { // Write to the docs file TagValueHolder tags = TagValueHolder.create().put("algorithms", methodRows); - FileUtils.generateFileFromTemplate(CUR_FOLDER + "hash_algorithms.tpl.md", OUTPUT_FILE, tags); + FileIoUtils.generateFileFromTemplate(CUR_FOLDER + "hash_algorithms.tpl.md", OUTPUT_FILE, tags); + System.out.println("Wrote to '" + OUTPUT_FILE + "'"); } private static NestedTagValue constructMethodRows(Map descriptions) { diff --git a/src/test/java/tools/docs/permissions/PermissionNodesGatherer.java b/src/test/java/tools/docs/permissions/PermissionNodesGatherer.java index 034677cb..e3635512 100644 --- a/src/test/java/tools/docs/permissions/PermissionNodesGatherer.java +++ b/src/test/java/tools/docs/permissions/PermissionNodesGatherer.java @@ -2,7 +2,7 @@ package tools.docs.permissions; import fr.xephi.authme.ClassCollector; import fr.xephi.authme.permission.PermissionNode; -import tools.utils.FileUtils; +import tools.utils.FileIoUtils; import tools.utils.ToolsConstants; import java.util.EnumSet; @@ -103,7 +103,7 @@ public class PermissionNodesGatherer { */ private static & PermissionNode> String getSourceForClass(Class clazz) { String classFile = ToolsConstants.MAIN_SOURCE_ROOT + clazz.getName().replace(".", "/") + ".java"; - return FileUtils.readFromFile(classFile); + return FileIoUtils.readFromFile(classFile); } } diff --git a/src/test/java/tools/docs/permissions/PermissionsListWriter.java b/src/test/java/tools/docs/permissions/PermissionsListWriter.java index 4e2197ee..797e26e7 100644 --- a/src/test/java/tools/docs/permissions/PermissionsListWriter.java +++ b/src/test/java/tools/docs/permissions/PermissionsListWriter.java @@ -1,7 +1,7 @@ package tools.docs.permissions; import tools.utils.AutoToolTask; -import tools.utils.FileUtils; +import tools.utils.FileIoUtils; import tools.utils.TagValue.NestedTagValue; import tools.utils.TagValueHolder; import tools.utils.ToolsConstants; @@ -27,9 +27,8 @@ public class PermissionsListWriter implements AutoToolTask { final NestedTagValue permissionsTagValue = generatePermissionsList(); TagValueHolder tags = TagValueHolder.create().put("nodes", permissionsTagValue); - FileUtils.generateFileFromTemplate(TEMPLATE_FILE, PERMISSIONS_OUTPUT_FILE, tags); + FileIoUtils.generateFileFromTemplate(TEMPLATE_FILE, PERMISSIONS_OUTPUT_FILE, tags); System.out.println("Wrote to '" + PERMISSIONS_OUTPUT_FILE + "'"); - System.out.println("Before committing, please verify the output!"); } private static NestedTagValue generatePermissionsList() { diff --git a/src/test/java/tools/docs/translations/TranslationPageGenerator.java b/src/test/java/tools/docs/translations/TranslationPageGenerator.java index 75232d28..240e7a64 100644 --- a/src/test/java/tools/docs/translations/TranslationPageGenerator.java +++ b/src/test/java/tools/docs/translations/TranslationPageGenerator.java @@ -3,7 +3,7 @@ package tools.docs.translations; import com.google.common.collect.ImmutableMap; import tools.docs.translations.TranslationsGatherer.TranslationInfo; import tools.utils.AutoToolTask; -import tools.utils.FileUtils; +import tools.utils.FileIoUtils; import tools.utils.TagValue.NestedTagValue; import tools.utils.TagValueHolder; import tools.utils.ToolsConstants; @@ -57,7 +57,8 @@ public class TranslationPageGenerator implements AutoToolTask { } TagValueHolder tags = TagValueHolder.create().put("languages", translationValuesHolder); - FileUtils.generateFileFromTemplate(TEMPLATE_FILE, DOCS_PAGE, tags); + FileIoUtils.generateFileFromTemplate(TEMPLATE_FILE, DOCS_PAGE, tags); + System.out.println("Wrote to '" + DOCS_PAGE + "'"); } /** diff --git a/src/test/java/tools/filegeneration/GeneratePluginYml.java b/src/test/java/tools/filegeneration/GeneratePluginYml.java index 3b5737be..b4a017c6 100644 --- a/src/test/java/tools/filegeneration/GeneratePluginYml.java +++ b/src/test/java/tools/filegeneration/GeneratePluginYml.java @@ -10,7 +10,7 @@ import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import tools.docs.permissions.PermissionNodesGatherer; import tools.utils.AutoToolTask; -import tools.utils.FileUtils; +import tools.utils.FileIoUtils; import tools.utils.ToolsConstants; import java.io.StringReader; @@ -46,7 +46,7 @@ public class GeneratePluginYml implements AutoToolTask { configuration.set("commands", generateCommands()); configuration.set("permissions", generatePermissions()); - FileUtils.writeToFile(PLUGIN_YML_FILE, + FileIoUtils.writeToFile(PLUGIN_YML_FILE, pluginYmlStart + "\n" + configuration.saveToString()); } @@ -63,7 +63,7 @@ public class GeneratePluginYml implements AutoToolTask { * @return file configuration with the lower part of the plugin.yml file */ private FileConfiguration loadPartialPluginYmlFile() { - List pluginYmlLines = FileUtils.readLinesFromFile(Paths.get(PLUGIN_YML_FILE)); + List pluginYmlLines = FileIoUtils.readLinesFromFile(Paths.get(PLUGIN_YML_FILE)); int lineNr = 0; for (String line : pluginYmlLines) { if (line.equals("commands:")) { diff --git a/src/test/java/tools/messages/MessageFileVerifier.java b/src/test/java/tools/messages/MessageFileVerifier.java index f0be6bb4..b151228c 100644 --- a/src/test/java/tools/messages/MessageFileVerifier.java +++ b/src/test/java/tools/messages/MessageFileVerifier.java @@ -8,7 +8,7 @@ import com.google.common.collect.Multimap; import fr.xephi.authme.message.MessageKey; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; -import tools.utils.FileUtils; +import tools.utils.FileIoUtils; import java.io.File; import java.util.ArrayList; @@ -104,7 +104,7 @@ public class MessageFileVerifier { * @param defaultMessages The collection of default messages */ public void addMissingKeys(FileConfiguration defaultMessages) { - final List fileLines = FileUtils.readLinesFromFile(messagesFile.toPath()); + final List fileLines = FileIoUtils.readLinesFromFile(messagesFile.toPath()); List keysToAdd = new ArrayList<>(); for (MissingKey entry : missingKeys) { @@ -135,7 +135,7 @@ public class MessageFileVerifier { addCommentForMissingTags(fileLines, key, entry.getValue()); } - FileUtils.writeToFile(messagesFile.toPath(), String.join("\n", fileLines)); + FileIoUtils.writeToFile(messagesFile.toPath(), String.join("\n", fileLines)); } /** diff --git a/src/test/java/tools/messages/translation/ImportMessagesTask.java b/src/test/java/tools/messages/translation/ImportMessagesTask.java index c70caaa3..765c49f1 100644 --- a/src/test/java/tools/messages/translation/ImportMessagesTask.java +++ b/src/test/java/tools/messages/translation/ImportMessagesTask.java @@ -7,7 +7,7 @@ import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import tools.messages.MessageFileVerifier; import tools.messages.VerifyMessagesTask; -import tools.utils.FileUtils; +import tools.utils.FileIoUtils; import tools.utils.ToolTask; import tools.utils.ToolsConstants; @@ -108,9 +108,9 @@ public class ImportMessagesTask implements ToolTask { * @param file The file whose to-do comments should be removed */ private static void removeAllTodoComments(String file) { - String contents = FileUtils.readFromFile(file); + String contents = FileIoUtils.readFromFile(file); String regex = "^# TODO .*$"; contents = Pattern.compile(regex, Pattern.MULTILINE).matcher(contents).replaceAll(""); - FileUtils.writeToFile(file, contents); + FileIoUtils.writeToFile(file, contents); } } diff --git a/src/test/java/tools/messages/translation/WriteAllExportsTask.java b/src/test/java/tools/messages/translation/WriteAllExportsTask.java index f5f3825b..f0faf3b0 100644 --- a/src/test/java/tools/messages/translation/WriteAllExportsTask.java +++ b/src/test/java/tools/messages/translation/WriteAllExportsTask.java @@ -2,7 +2,7 @@ package tools.messages.translation; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; -import tools.utils.FileUtils; +import tools.utils.FileIoUtils; import tools.utils.ToolsConstants; import java.io.File; @@ -31,7 +31,7 @@ public class WriteAllExportsTask extends ExportMessagesTask { for (File file : messageFiles) { String code = file.getName().substring("messages_".length(), file.getName().length() - ".yml".length()); String json = convertToJson(code, defaultMessages, YamlConfiguration.loadConfiguration(file)); - FileUtils.writeToFile(OUTPUT_FOLDER + "messages_" + code + ".json", json); + FileIoUtils.writeToFile(OUTPUT_FOLDER + "messages_" + code + ".json", json); } } } diff --git a/src/test/java/tools/utils/FileUtils.java b/src/test/java/tools/utils/FileIoUtils.java similarity index 86% rename from src/test/java/tools/utils/FileUtils.java rename to src/test/java/tools/utils/FileIoUtils.java index 44bf5a29..4683633f 100644 --- a/src/test/java/tools/utils/FileUtils.java +++ b/src/test/java/tools/utils/FileIoUtils.java @@ -9,11 +9,11 @@ import java.nio.file.StandardOpenOption; import java.util.List; /** - * Utility class for reading from and writing to files. + * Utility class for I/O operations on files. */ -public final class FileUtils { +public final class FileIoUtils { - private FileUtils() { + private FileIoUtils() { } public static void generateFileFromTemplate(String templateFile, String destinationFile, TagValueHolder tags) { @@ -43,8 +43,12 @@ public final class FileUtils { } public static String readFromFile(String file) { + return readFromFile(Paths.get(file)); + } + + public static String readFromFile(Path file) { try { - return new String(Files.readAllBytes(Paths.get(file)), StandardCharsets.UTF_8); + return new String(Files.readAllBytes(file), StandardCharsets.UTF_8); } catch (IOException e) { throw new UnsupportedOperationException("Could not read from file '" + file + "'", e); }