[INACTIVE][SEC] AnjoSecurity v1.6c - Offline-Mode User Registration [440-531+]

Discussion in 'Inactive/Unsupported Plugins' started by AnjoCaido, Feb 15, 2011.

  1. Offline


    AnjoSecurity - Offline-Mode User Registration System
    Version: v1.6c

    This version it's just a minor update to make it work with newer CB and GM. When GM gets it's final version I'll start working on future plans for this.


    This plugin uses GroupManager plugin(optional, but recommended if you want to block commands):
    With this you can block all commands of plugins that uses Permissions plugin.

    This plugin is to help people prevent griefing and abusing while your server is in offline-mode. When mineceraft server is down you have no choice than setting up offline-mode. When this option is enabled anyone can connect within your server with their desired username, it brings up the problem that someone can connect with administrator name and abuse with all his loot and commands. This plugin will set up user registration with a custom password for your server, and only the person with that password will be able to use that username.

    Did I say it is open-source? You can get it on GitHub and modify as you want.

    • Prevents registered users to do anything while not logged in.
    • (toggle-able)Prevents non-registered users to do actions(move,destroy,etc).
    • (toggle-able)Prevents non-registered users to do summon commands.
    • (toggle-able)Remove all loot of non-registered users when joining the server(and tp to spawn).
    • (toggle-able)Registration system. You can deactivate registrations anytime.
    • Every user can remove their registration, so they can register with other password.
    • Users listed on settings.properties, while logged in, can remove any user registration.
    • (configurable) Session time. You can set the session duration, so if a user drops connection a lot, he would not need to /login again.(default 30 minutes)
    • Interacts with GroupManager permission plugin(the one replacing Nijikokun's Permissions plugin, yet fully compatible) to prevent running registered commands.
    • ALLOW List. You can allow certain users to register, even if registration is deactivated.
    Commands (all of them speech for themselves):
    • /register <password> - it registers with the given password
    • /login <password> - it tries to login with the given password
    • /reset <password> - if the password is correct, remove registration
    • /adminreset <username> - remove the registration of the given username
    • /toggleregistration - (yes it is long, in purpose) - toggle registration mode ON/OFF.
    • /adminallow <username> - allow user to register even if registration is deactivated.
    Version 1.6c
    • Made it work with newer CB builds.
    • Made it work with GroupManager 1.0 alpha
    Version 1.6b
    • Made it work with newer GM builds.
    Version 1.6
    • Fixed a nasty bug.
    Version 1.5
    • Fixed die-menu-respawn item duping(I think).
    Version 1.4
    • Compatible with the latest bukkit builds(#353)
    Version 1.3b
    • Removed some debugging messages.
    Version 1.3
    • Fixed small bugs. (I think all exceptions reported by now are fixed)
    • Added allow list.
    Version 1.2
    • Fixed small bugs
    • Improved how God Mode works(now it's verly like the God Mode plugin)
    • Added a God Mode timout after login of 5 seconds, to prevent die of falling on the ground.
    • Added a command to toggle registrations on/off.
    Version 1.1
    • Prevent non-logged-in users to lose health(and die).
    Version 1.0
    • First fully working release.
    Future plans:
    • (done!) Create a toggle command that opens and closes registration
    • Store users activities, such as typing wrong passwords and such(to catch hackers)
    Version 1.6c (to use with GroupManager 1.0 or higher):

    Version 1.6b (to use with GroupManager 0.99b or lower):


    Flat-file Authentication importer(import auth db from older plugins):
    It is destinated for the following format(plugins that used MineSecurity format, from hMod):

    Just double click on the jar(or run via terminal with java -jar), select the old flat-file... it will generate a AnjoSecurityDB.db file, which you put on your server folder. If you want to merge the old file with the new database, just put the jar on the same folder of the AnjoSecurityDB.db...

    Everyone with an Off-Line server might like the NameChecker plugin I made, it super simple. It only filters huge names (> 20 chars), short names(<3 chars), and invalid characters in names(only letters, numbers, and underscores allowed).
    It kicks the player and shows him the reason of why his name is invalid. It even has a configurable file for you to put forbidden names to join the server(like Player, or Scruffy_Puppy)
    xcession, FlingeR and methos like this.
  2. Offline


    It works with latest builds now. Tested with #353 (1.4)
    --- merged: Feb 20, 2011 1:41 AM ---
    Please, tell me how to die while not logged in. I really need to reproduce the problem.
    I couldn't figure out a way to die.
    --- merged: Feb 20, 2011 1:53 AM ---
    I can't use blabla to depurate the problem.

    Please post more about the error.
  3. Offline


    Nah, I'll just stick to minecraft.net :-/
  4. Offline


    I found the item duping solution.

    But in the new Bukkit build, the Entity Damage events are not working. Which could make no one completely invulnerable while not logged in. Which could cause people to get their item stealed if killed even not logged in.

    Thinking of that, I found another solution for the item dupe:
    If logged in: Which is to make sure to clear Player inventory at death(it solves the dupe bug at login).
    If not logged in: Not clear Player inventory(bug will occur on login). But clear his Drops(so no one could steal his items).

    So I intentionally exploit the bug at login if the guy was dead while not logged in.
    But solve the bug if the guy was playing normally.
  5. Offline


    thank You so much !
    dupe bug fixed ! :)
  6. Offline


    The problem is that when I install GroupManager, when I use a command like /heal, my server crash...
  7. Offline


    Doesn't happen here. Paste me the error, please. So I can depurate.

    There was a build of Essentials on the repository these days which was not compatible with GroupManager. But as I saw there they already fixed it.
  8. Offline


    can You make that - before login clean inventory ?
  9. Offline


    Thje Link is broke.
    Reup would be nice :)

    [Edit]: Works now :D
  10. Offline


    Works fine here :)

    Also, since newer Bukkit builds :
    2011-02-20 11:33:48 [WARNING] Using the stupidly long constructor org.anjocaido.anjosecurity.AnjoSecurity(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of AnjoSecurity to remove it! (Nothing is broken, we just like to keep code clean.)
    2011-02-20 11:33:48 [WARNING] Using the stupidly long constructor com.nijikokun.bukkit.Permissions.Permissions(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of Permissions to remove it! (Nothing is broken, we just like to keep code clean.)
    2011-02-20 11:33:48 [WARNING] Using the stupidly long constructor org.anjocaido.groupmanager.GroupManager(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of GroupManager to remove it! (Nothing is broken, we just like to keep code clean.)
    2011-02-20 11:33:48 [INFO] Hint! It's probably someone called 'AnjoCaido'
  11. Offline


    How do you use the importer? Thanks
  12. Offline


    If you have a text file with users and encrypted md5 passwords... (it looks something like this):

    All you do is open the importer... double click if you have java installed on windows... or go to command line and type:
    java -jar <jarfile>

    And then select that file with users and passwords.
    It will generate a file called AnjoSecurityDB.db
    Put it on your main server folder (where is craftbukkit)
    --- merged: Feb 21, 2011 2:21 PM ---
    You mean "hide" inventory?

    I'm trying to find a good way to do this, without much risk of losing player items forever.
    --- merged: Feb 21, 2011 2:23 PM ---
    I can fix AnjoSecurity, but GroupManager and FakePermissions will use constructors until they can, because of bad programmed plugins that depend on Permissions.
  13. Offline


    People can Still use Essentials commands ... But they can't use other admins commands . Can you fix that?
  14. Offline


    There is no fix for commands of other plugins that doesn't use Permissions.

    The only way I found to stop commands was putting a not logged in user in the group NotLoggedIn....

    If some plugin doesn't verify it. I can't do anything. Sorry.
  15. Offline


    I'm checking this plugin out on my test server and running into a problem with registered users. Test server is running CB #406, AnjoSecurity 1.6 and GroupManager 0.9b.

    When a registered player logs into the game (but before using /login), the console throws the following error
    2011-02-21 17:16:45 [INFO] RoloTest001 [/] logged in with entity
    id 9
    2011-02-21 17:16:45 [INFO] Player count: 1
    2011-02-21 17:16:45 [SEVERE] Could not pass event PLAYER_JOIN to AnjoSecurity
            at org.anjocaido.groupmanager.DataHolder.addGroup(DataHolder.java:163)
            at org.anjocaido.groupmanager.User.setGroup(User.java:121)
            at org.anjocaido.anjosecurity.PermissionsDealer.markAsNotLoggedIn(Permis
            at org.anjocaido.anjosecurity.AnjoSecurity.handlePlayerJoin(AnjoSecurity
            at org.anjocaido.anjosecurity.AnjoSecurityPlayerListener.onPlayerJoin(An
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
            at net.minecraft.server.ServerConfigurationManager.a(ServerConfiguration
            at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:86)
            at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:68)
            at net.minecraft.server.Packet1Login.a(SourceFile:46)
            at net.minecraft.server.NetworkManager.a(SourceFile:232)
            at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:34)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:325)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:240)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    Unregistered users have no access to any commands, but players that are registered and not logged in have access to all the normal commands. I noticed NotRegistered was automatically created in GM, is there supposed to be a rank for a user not logged in? In one of your posts you mentioned a rank "NotLoggedIn", was it supposed to be automatically created or do I need to create it manually?
    --- merged: Feb 22, 2011 2:00 AM ---
    OK, nvm. I added "NotLoggedIn" as a rank and now it runs without errors. I also made a mistake on unregistered users not being able to use commands, it turns out they still can.
  16. Offline


    Yeah, I found out that is a copy&paste bug. Fixing on next version. It should create the NotLoggedIn automatically if not exists... but was trying to creating NotRegistered, which would return null because already exists.
  17. Offline


  18. Offline


    Is there a way to disable resetting player on register? I have just installed that plugin and lost all my stuff on registering.

    EDIT: found it. "resetatlogin: false", right?
  19. Offline


    could you please add mysql support for users database?
  20. Offline


    i found dupe bug.
    1. die
    2. no touch
    3. turn on another computer -> join to server
    4. click title menu
    5. rejoin
    6. revive & item dupe
    i don't know how to send pm
  21. Offline


    So dupe bug is working ?
  22. Offline


    i become many errors :(

    [SEVERECould not pass event PLAYER_JOIN to AnjoSecurity
        at org
    at org.anjocaido.groupmanager.User.setGroup(User.java:121)
    at org.anjocaido.anjosecurity.PermissionsDealer.markAsNotLoggedIn(PermissionsDealer.java:39)
    at org.anjocaido.anjosecurity.AnjoSecurity.handlePlayerJoin(AnjoSecurity.java:219)
    at org.anjocaido.anjosecurity.AnjoSecurityPlayerListener.onPlayerJoin(AnjoSecurityPlayerListener.java:31)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:130)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
    at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:97)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:87)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:68)
    at net.minecraft.server.Packet1Login.a(SourceFile:46)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:34)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:87)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
  23. Offline


    I love your plugin, it would be great if it wasn't so ''complicated'' for noob players. Some of them take 1 hour to find the appfolder, so writing up a command is too smart for them.
  24. Offline


    session holder looks nice, but i need mysql support
  25. Offline


    Just wondering... If minecraft.net is down and I put my server into offline mode. How can people log in if everyone is named player? How do you get a login name if you cannot log in to minecraft.net?
  26. Offline


    This apparently just deleted all the items on my server in players inventory - is there a revert? I removed it but there still all gone.
  27. Offline


    http://tinyurl.com/5ru5kdw :p
  28. Offline


    [SEVERE] Could not pass event PLAYER_JOIN to AnjoSecurity
    at org
    at org.anjocaido.groupmanager.User.setGroup(User.java:121)
    at org.anjocaido.anjosecurity.PermissionsDealer.markAsNotLoggedIn(PermissionsDealer.java:39)
    at org.anjocaido.anjosecurity.AnjoSecurity.handlePlayerJoin(AnjoSecurity.java:219)
    at org.anjocaido.anjosecurity.AnjoSecurityPlayerListener.onPlayerJoin(AnjoSecurityPlayerListener.java:31)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:130)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
    at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:97)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:87)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:68)
    at net.minecraft.server.Packet1Login.a(SourceFile:46)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:34)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:87)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)

    I'm getting this all the time.
  29. Long constructor plz remove im not telling you what to do just letting you know just incase thx nice plugin
  30. Offline


    Trying to use the importer... I get this:

    # java -jar uber-AnjoSecurityImporter-1.0-SNAPSHOT.jar
    Exception in thread "main" java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
            at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
            at java.awt.Window.<init>(Window.java:437)
            at java.awt.Frame.<init>(Frame.java:419)
            at java.awt.Frame.<init>(Frame.java:384)
            at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1756)
            at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1833)
            at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1692)
            at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:864)
            at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:668)
            at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:639)
            at org.anjocaido.anjosecurityimporter.App.main(App.java:27)
  31. Offline


    Yeah this happened to me also, this is why you should always do backups of your server, especially player data files :/
    Which reminds me, I need to look for a backup plugin.

Share This Page