Today, someone was going on my world and blowing up my buildings. Nobody likes people doing that! So, I thought to myself, "Why don't I make a mod to prevent this?" And that's just what I did!
This small but simple mod enables you to protect yourself from pesky little varmints and hooligans by enabling locking your character with a password. Once you are locked, every time you join the world, you will need to type in the password that you locked yourself with. Once you enter that password, you can play. There is also a way to remove the password. That's it. That's all the mod. Simple to use, but very very useful. Also, the passwords are player-specific, so it (probably) works in multiplayer as well as singleplayer. However, I'm pretty sure that the commands are op-only.
Usage and Documentation
You will not have password by default. To turn it on, type in:
/addpassword YOUR PASSWORD HERE
This will enable your password. Replace YOUR PASSWORD HERE with your new password. Be sure to keep note of that password in your head, as that will need to be remembered every time you join the world again!
Once you go back into your world after leaving, you will be trapped in midair until you type in:
/unlock YOUR PASSWORD HERE
Of course, replace YOUR PASSWORD HERE with the password you typed in for addpassword.
To remove the password, type in:
/removepassword YOUR PASSWORD HERE
YOUR PASSWORD HERE is the password that you used when you added the password. You have to enter it for security reasons: we wouldn't want a little hooligan removing your password when they don't even know it!
If you would like to change your password, as of v1.1, you can use the command:
/changepassword [YOUR OLD PASSWORD] [YOUR NEW PASSWORD]
YOUR OLD PASSWORD is the old password and YOUR NEW PASSWORD is the password that you would like to change it to.
If you forget your password, you can ask your admins (or yourself) to use NBTExplorer and set your player NBT value "hasPassword" to 0.
Download
By downloading and using the mod, you are agreeing to these following terms:
You may no distribute this mod without express written permission from the author
You may not plagiarize this mod in any way, including (but not limited to): Claiming that you made this mod or copying code from this mod
You must put a link to this thread on a video description so that people may access this thread.
You may look at the source code of this mod using a java decompiler or a .jar opener, but you may not modify or redistribute that code.
If anything is unclear, tell me so that I can add it to these terms of use.
To everybody: The best way to prevent someone removing the password lock mod is to make a server on your computer (as long as you have your Firewall on no one else can come on), then have that instead of your world. Add this mod onto the server too in case you leave it open or something. That should be enough to stop attackers.
Video
Changelog
Version 1.2
Bug fix where player dies of fall damage on survival mode.
Version 1.1
Bug fix where the player can come back in and be in midair, and added the changepassword command.
Version 1.0
Initial release.
Bugs
It would be helpful to report bugs in comments. But make sure that your bug is not here already!
Bug #1: Player's password is removed when they die.
Bug#2: Player is not teleported when they get locked while riding something.
Eh, it seems like a useful mod if your password is way too easy to figure out, but it won't really stop hackers from changing your skin, password, and whatnot on the real minecraft.net.. Also, you have less than 5 posts as you posted this, making this seem a bit fishy. Maybe post some screenshots of the passwords and/or a video of it, explaining what it does?
Rollback Post to RevisionRollBack
Teddwa (The Fakemon in my avatar) belongs to ReallyDarkAndWindie and that is used with permission from him.
Click on this spoiler to see mods and ideas that I support!
Click on this Spoiler to see misc. banners and whatnot!
Eh, it seems like a useful mod if your password is way too easy to figure out, but it won't really stop hackers from changing your skin, password, and whatnot on the real minecraft.net.. Also, you have less than 5 posts as you posted this, making this seem a bit fishy. Maybe post some screenshots of the passwords and/or a video of it, explaining what it does?
Too easy to figure out: I added this in order to make sure that if your friends came over and used your account, or your siblings, they could not mess anything up on your worlds. Too many times have I seen people say on server bans that their little brother came on their account and said things or broke rules. Now of course, that could have been completely fake, but it's best to have a way for people to protect their accounts from people who have daily access to the account but aren't to be trusted.
About the fishy thing: I know that I'm new, and I haven't posted images either. I'm still learning about Minecraft Forums. But if you really want to know if this is real or now, here is a detailed explanation of how I pulled this off:
When a player uses the command addpassword, the player's NBT value "hasPassword" is set to 1 and the NBT String "password" is set to the given password.
When a player joins the game, they get a message saying to use /unlock and their NBT value "isLocked" is set to 1. Also their y-position is stored in the NBT "startingPosY".
Whenever a player is in the world, if their NBT "isLocked" is set to 1, their y position is set to the NBT "startingPosY" plus one thousand every second or so (if it were every possible moment, lag will ensue).
When the player uses /unlock, if the given password is the same as the NBT String "password", then their NBT "isLocked" is set to 0 and their y position is set to the NBT "startingPosY".
Removing password sets NBT value "hasPassword" to 0.
Too easy to figure out: I added this in order to make sure that if your friends came over and used your account, or your siblings, they could not mess anything up on your worlds. Too many times have I seen people say on server bans that their little brother came on their account and said things or broke rules. Now of course, that could have been completely fake, but it's best to have a way for people to protect their accounts from people who have daily access to the account but aren't to be trusted.
About the fishy thing: I know that I'm new, and I haven't posted images either. I'm still learning about Minecraft Forums. But if you really want to know if this is real or now, here is a detailed explanation of how I pulled this off:
When a player uses the command addpassword, the player's NBT value "hasPassword" is set to 1 and the NBT String "password" is set to the given password.
When a player joins the game, they get a message saying to use /unlock and their NBT value "isLocked" is set to 1. Also their y-position is stored in the NBT "startingPosY".
Whenever a player is in the world, if their NBT "isLocked" is set to 1, their y position is set to the NBT "startingPosY" plus one thousand every second or so (if it were every possible moment, lag will ensue).
When the player uses /unlock, if the given password is the same as the NBT String "password", then their NBT "isLocked" is set to 0 and their y position is set to the NBT "startingPosY".
Removing password sets NBT value "hasPassword" to 0.
yeah, you do have a point, and I'm no Mike Dawson coding expert, but that's pretty talented.
Rollback Post to RevisionRollBack
Teddwa (The Fakemon in my avatar) belongs to ReallyDarkAndWindie and that is used with permission from him.
Click on this spoiler to see mods and ideas that I support!
Click on this Spoiler to see misc. banners and whatnot!
...Actually Theres Something More To Worry About It
I Usually Don't Do This But I Downloaded Your Mod And Tested It -This Mod Really Worth -
And...
/kill = Bypass /)^c^)
mods/YourMod.jar + Delete = Bypass (\ ^c^/)
I Could Recomend That You Add Something In The Save FileThat Make Your World Crash If The Mod Is Removed, Also You Really Should Change The Input Mode In Command With A Input GUI With An Integrated Keypad For Prevent Keyloggers.
Keep Working On This Mod, Maybe One Day It Will Be In Many Computers Like Optifine Or TooMany Items
...Actually Theres Something More To Worry About It
I Usually Don't Do This But I Downloaded Your Mod And Tested It -This Mod Really Worth -
And...
I Could Recomend That You Add Something In The Save FileThat Make Your World Crash If The Mod Is Removed, Also You Really Should Change The Input Mode In Command With A Input GUI With An Integrated Keypad For Prevent Keyloggers.
Keep Working On This Mod, Maybe One Day It Will Be In Many Computers Like Optifine Or TooMany Items
Thanks. You're right, I should add a GUI. I'm not really sure how I would make the mod required and otherwise Minecraft crashes. Forge didn't make itself so that mods would have to be installed for Minecraft to work.
The Meaning of Life, the Universe, and Everything.
Join Date:
9/26/2012
Posts:
50
Member Details
The vast majority of people wouldn't realize it's because of a mod, and they probably also wouldn't realize how to find it. That said, I'm not sure there's any way to bypass those who would. I'm pretty sure Forge has built-in safeties against crashes due to removing mods, and that trying to do this in ways that circumvent those safety precautions would be as likely corrupt your world as to crash the game. Also I'm 98% certain there's no way to do this with a clientside mod anyway. The closest workable ideas I can think of are:
1) locking you out of a world because you don't have the requisite mods. This would require making it a universal mod rather than a clientside mod.
2) making it an either clientside or serverside mod, wherein a server can require the player to input their password even if they remove the mod.
However, both of these ideas would probably require you to be playing on a server, not on an SSP world, since I'm not sure whether or not SSP worlds lock you out if you don't have a mod that was there when the world was genned. If it doesn't, I honestly can't think of a way to enforce this on an SSP world even when the mod is removed. I suppose, if you're really that paranoid, you'd just have to make do with vanilla and log out of Minecraft every time you stop playing.
On an unrelated note: I thought of a potential exploit, but I don't use NBTEDIT so I'm not sure if you can edit your own NBT data. If you can is it possible to bypass this using it or its counterparts?
About NBT: Clients don't get sent NBT information to themselves, so I'm pretty sure that they can't change it. Also, NBTEdit requires you to have the world file, and if you are playing on a server, you (the client) will not be able to use NBTEdit.
To everybody: The best way to prevent someone removing the password lock mod is to make a server on your computer (as long as you have your Firewall on no one else can come on), then have that instead of your world. Add this mod onto the server too in case you leave it open or something. That should be enough to stop attackers.
Edit: Also, this works for clients and servers. So it has singleplayer and multiplayer support.
SecurityLock
Protect yourself from anyone who tries to access your account!Table of Contents
Description
Today, someone was going on my world and blowing up my buildings. Nobody likes people doing that! So, I thought to myself, "Why don't I make a mod to prevent this?" And that's just what I did!This small but simple mod enables you to protect yourself from pesky little varmints and hooligans by enabling locking your character with a password. Once you are locked, every time you join the world, you will need to type in the password that you locked yourself with. Once you enter that password, you can play. There is also a way to remove the password. That's it. That's all the mod. Simple to use, but very very useful. Also, the passwords are player-specific, so it (probably) works in multiplayer as well as singleplayer. However, I'm pretty sure that the commands are op-only.
Usage and Documentation
You will not have password by default. To turn it on, type in:/addpassword YOUR PASSWORD HERE
This will enable your password. Replace YOUR PASSWORD HERE with your new password. Be sure to keep note of that password in your head, as that will need to be remembered every time you join the world again!
Once you go back into your world after leaving, you will be trapped in midair until you type in:
/unlock YOUR PASSWORD HERE
Of course, replace YOUR PASSWORD HERE with the password you typed in for addpassword.
To remove the password, type in:
/removepassword YOUR PASSWORD HERE
YOUR PASSWORD HERE is the password that you used when you added the password. You have to enter it for security reasons: we wouldn't want a little hooligan removing your password when they don't even know it!
If you would like to change your password, as of v1.1, you can use the command:
/changepassword [YOUR OLD PASSWORD] [YOUR NEW PASSWORD]
YOUR OLD PASSWORD is the old password and YOUR NEW PASSWORD is the password that you would like to change it to.
If you forget your password, you can ask your admins (or yourself) to use NBTExplorer and set your player NBT value "hasPassword" to 0.
Download
By downloading and using the mod, you are agreeing to these following terms:Download v1.1 for Forge version 1.7.10-10.13.0.1180+
Download v1.0 for Forge version 1.7.10-10.13.0.1180+
Video
Changelog
Version 1.2Bug fix where player dies of fall damage on survival mode.
Version 1.1
Bug fix where the player can come back in and be in midair, and added the changepassword command.
Version 1.0
Initial release.
Bugs
It would be helpful to report bugs in comments. But make sure that your bug is not here already!Bug #1: Player's password is removed when they die.
Bug #2: Player is not teleported when they get locked while riding something.
ClothingCraft - Highly customizable and realistic clothing! No more silly leather armor!
Click on this spoiler to see mods and ideas that I support!
Too easy to figure out: I added this in order to make sure that if your friends came over and used your account, or your siblings, they could not mess anything up on your worlds. Too many times have I seen people say on server bans that their little brother came on their account and said things or broke rules. Now of course, that could have been completely fake, but it's best to have a way for people to protect their accounts from people who have daily access to the account but aren't to be trusted.
About the fishy thing: I know that I'm new, and I haven't posted images either. I'm still learning about Minecraft Forums. But if you really want to know if this is real or now, here is a detailed explanation of how I pulled this off:
ClothingCraft - Highly customizable and realistic clothing! No more silly leather armor!
yeah, you do have a point, and I'm no
Mike Dawsoncoding expert, but that's pretty talented.Click on this spoiler to see mods and ideas that I support!
Thanks. Well, now I've added a video, so you don't need to worry anymore.
ClothingCraft - Highly customizable and realistic clothing! No more silly leather armor!
I Usually Don't Do This But I Downloaded Your Mod And Tested It -This Mod Really Worth -
And...
I Could Recomend That You Add Something In The Save FileThat Make Your World Crash If The Mod Is Removed, Also You Really Should Change The Input Mode In Command With A Input GUI With An Integrated Keypad For Prevent Keyloggers.
Keep Working On This Mod, Maybe One Day It Will Be In Many Computers Like Optifine Or TooMany Items
Thanks. You're right, I should add a GUI. I'm not really sure how I would make the mod required and otherwise Minecraft crashes. Forge didn't make itself so that mods would have to be installed for Minecraft to work.
ClothingCraft - Highly customizable and realistic clothing! No more silly leather armor!
1) locking you out of a world because you don't have the requisite mods. This would require making it a universal mod rather than a clientside mod.
2) making it an either clientside or serverside mod, wherein a server can require the player to input their password even if they remove the mod.
However, both of these ideas would probably require you to be playing on a server, not on an SSP world, since I'm not sure whether or not SSP worlds lock you out if you don't have a mod that was there when the world was genned. If it doesn't, I honestly can't think of a way to enforce this on an SSP world even when the mod is removed. I suppose, if you're really that paranoid, you'd just have to make do with vanilla and log out of Minecraft every time you stop playing.
On an unrelated note: I thought of a potential exploit, but I don't use NBTEDIT so I'm not sure if you can edit your own NBT data. If you can is it possible to bypass this using it or its counterparts?
To everybody: The best way to prevent someone removing the password lock mod is to make a server on your computer (as long as you have your Firewall on no one else can come on), then have that instead of your world. Add this mod onto the server too in case you leave it open or something. That should be enough to stop attackers.
Edit: Also, this works for clients and servers. So it has singleplayer and multiplayer support.
ClothingCraft - Highly customizable and realistic clothing! No more silly leather armor!