Inactive [SEC] NoCheat v3.5.0 [CB 1.2.4 R1.0][ABANDONED]

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

  1. Offline

    Evenprime

    Xp10d3, Dereku, MyPictures and 35 others like this.
  2. I've seen lately griefing teams walking at normal speed while crouched. Is there any way of detecting this.
    The issue with this is it becomes very difficult to actually see the griefers.
     
  3. Offline

    The PC Tech Guy

    I don't know if the plugin can attempt to stop this. I guess a crouching-speed check. But then, it would conflict with HeroSneak, but if someone has that plugin then they could care less then. (ie. disable the option). Sounds like something he could do, but I don't know how hard it would be.
     
  4. Offline

    Evenprime

    I'll keep that offer in mind. :)

    I never tested it, but the rollback of Big Brother and other plugins afaik don't create events when placing or removing blocks and therefore aren't logged/stopped by my plugin.

    It's interesting, but I'd probably have to change some parts of bukkit itself to make that work (well). Not impossible, but will definitely take some time and work to do.

    Now that I actually have a (somewhat) precise measurement of walking speed in my plugin, it shouldn't be impossible to (optionally) check if someone who claims to be sneaking is moving too fast.
     
  5. Offline

    MatCat

    I think I have come to the conclusion that your plugin may be crashing my server. I have gone through disabling and enabling about 4 plugins sofar to try to isolate which one is causing it, and yours happens to be the only one I updated yesterday shortly before the crashing started to happen.

    What happens is I get an error that does not stack trace back to a particular plugin, but is a runnaway loop of opening a file, eventually the server spits out thousands of Too many open files errors, then dies. The last time it happened one of my admins was flying too. On the reset from the crash I re-enabled the plugin I was thinking might be doing it and disabled yours. It usually takes about 2 hours or so before the crash so I will let you know either way if I crash again the same way or not. Also I do know that of all the plugins I have, only 3 access files on a regular basis, yours is one of them.
     
  6. Offline

    Evenprime

    My plugin does not access files on a regular basis.

    It just reads the config file on startup once and writes logs via the included logging interface (if you've enabled logging to file) to a log file. While it is running no other files are opened.

    Could you send me the stack trace of that error (via PM) such that I can have a look and maybe help with searching the source of the problem?

    @MatCat: Which version of my plugin were you using? Could you take a look at the /plugins/NoCheat/ folder and see how many log files (and how big) there are? I once had a bug in my plugin (fixed in v0.8.1) that would cause a ton of logging in case that the permissions config file had invalid entries. That would still not explain the too many open files error (it would rather cause you to run out of space), but its the only thing I can think of for now.

    @MatCat Just tested it and the only error I can produce in combination with my plugin is a "java.io.Exception Couldn't get lock for plugins/NoCheat/nocheat.log" which happens if you reload the plugin over 100 times (without stopping/restarting the server in between). But that doesn't fit to your description, because it is easily backtrackable to my plugin (and quite the opposite problem, because no file was opened instead of too many).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 9, 2016
  7. Offline

    MatCat

    Yeah I appreciate the investigation, I just crashed shortly ago with your plugin disabled, so now I am thinking it's LogBlock... as that is the only other plugin that would make sense...
     
  8. Offline

    Evenprime

    Anyway, thanks for telling me. Even if the bug I mentioned before isn't the culprit, I fixed it now, just to be sure. :)

    Version 0.8.4
    • Removed option "precisevelocity" because I found a better alternative to it
      Hope you didn't get too attached to that one. I finally found a better way to grab the velocity info before the minecraft server modifies it and therefore can make much better estimates about when, where and how far a player is going to dash, powerjump, ... For example the plugin Vampires would set the x-velocity to 5.0, but when I read it in the following PLAYER_MOVE event it would only be about 0.32, because the server modified it in some calculations in between. Now I actually can read the 5.0 and therefore know that the player will soon be dashing along the x-Axis.
    • Added option "moving: allowflying"
      This complements the Permission "nocheat.flying". If you want to generally allow flying on your server (or you don't have the Permissions plugin) you can now use that option instead to do that.
    • Fixed logger starting a new file every time the plugin is reloaded. It instead now reuses the same file
      If you read the few posts above, while searching for another potential bug I stumbled upon this one, which would cause the logging to the logfile to not work if you reload the plugin 100 times without actually restarting the craftbukkit server inbetween.
    • Added link to the forum in the Readme file
      Such that people who got the plugin from somewhere else may find its source

    Here is something people might be interested in:

    http://forums.bukkit.org/threads/se...y-mod-and-transparent-texturepacks-670.12527/

    I didn't test it myself, but it looks like what people keep requesting from me. I'm curious about how it will play out.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 9, 2016
  9. Offline

    The PC Tech Guy

    The Precious Stones plugin has something similar for chests against x-rayers. If no players are near the chest, the chest is turned into a grass block, but as you move closer, it reverts back to a chest.
     
  10. Offline

    Evenprime

    "Just to clarify: We haven't added flying, we have only added protection vs flying, and this protection can be turned off if you like" twittered by jeb_

    Sounds interesting. Can't wait to see Mojang's approach to solve that problem. Maybe I'm out of work already? *g*
     
  11. Offline

    EdGruberman

    With so many checks happing associated to onPlayerMove are there any performance concerns with this plugin? Do any large servers (25+ concurrent players) run this plugin without any noticeable increase in resource usage?
     
  12. Offline

    Racha

    Code:
    23:53:49 [INFO] [NoCheat] version [0.8.4] is enabled with the following checks:
    moving flying speedhack bedteleport
    23:53:49 [SEVERE] org/bukkit/Bukkit loading NoCheat v0.8.4 (Is it up to date?)
    java.lang.NoClassDefFoundError: org/bukkit/Bukkit
            at cc.co.evenprime.bukkit.nocheat.NoCheat.setupCleanupTask(NoCheat.java:
    214)
            at cc.co.evenprime.bukkit.nocheat.NoCheat.onEnable(NoCheat.java:205)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:514)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:216)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.ClassNotFoundException: org.bukkit.Bukkit
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:36)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 12 more
    What am i doing wrong, and what will - cancel do, i had reset before, no i redownloaded it and there is cancel, can someone give me a perfect config ;P ?
     
  13. Offline

    Evenprime

    If you ever find out, I'd like to know too. Compared to what Minecraft does anyway for every move event, the checks are relatively simple and shouldn't have a big impact.

    Reset and Cancel are the same (you can even use "reset" instead of "cancel" if you really want). I just renamed "reset" and "deny" to "cancel" to be more consistent with how bukkit calls stuff (where events are usually cancelled). For the actual error you get, I have no idea why java would claim that the class org.bukkit.Bukkit doesn't exist. What version of CraftBukkit are you using?
     
  14. Offline

    Racha

    CB 670
    Really need this plugin ;/
     
  15. Offline

    Evenprime

    Strange. Just downloaded CB 760 from here http://ci.bukkit.org/job/dev-CraftBukkit/670/ into a new folder, put my plugin in the plugins folder and started it. Worked like it should.

    Maybe your CraftBukkit jar is somehow damaged? Can you just redownload the jar and check if it is different from the one you use currently? (Some time ago on the download site a second link existed for a "craftbukkit-0.0.1-snapshot-original.jar" which was missing important content).
     
  16. Offline

    Racha

    Omg, i failed so hard, i was on 617 [ i think ] i downloaded 670 today, but did not replace the old one.. :D thanks :D:D
     
  17. Offline

    Evenprime

    np :)

    @ all: There were (concerning my plugin) no relevant changes from #670 to #674, therefore the 0.8.4 plugin will work with both RBs. But I anticipate some major changes for the upcoming Minecraft 1.5 (it is said to be able to somehow prevent flying in SMP, and imho that's only possible by heavily changing the game mechanics) which will likely break my plugin. So in case the new Minecraft version arrives, you may not want to trust my plugin to still work as expected.

    btw. upgrading to #674 makes sense, as it fixes another critical bug that allows players to easily crash your server.

    The 1.5 Minecraft version has been delayed to next week, so I started to implement a new feature for my plugin today that will handle the "fake" sneaking that allows people to appear sneaking but still moving at normal speed. While detecting that is dead simple (exactly 3 additional lines of code were necessary), I'm undecided as to what I should do in case I detect the fake sneaking.

    I thought instead of just doing the "reset/cancel" thing I do for the other stuff, "unsneaking" would be a simple, unintrusive and somewhat entertaining alternative. Everytime a player is detected as moving faster than allowed by while sneaking, just remove his "sneaking" status on the server and make him visible as any other player. What do you people think about that?

    There seems to be a competitor in town: http://forums.bukkit.org/threads/misc-antihack-v1-5-blocks-bugs-cheats-and-hacks-670.9238/ :cool:

    Anybody tried that one already? What do you think about it?

    EDIT: I've decided to implement a performance measurement in the next release (measuring elapsed time from getting a MOVE event to handing it back over to bukkit) to help me and others get a feeling about how much or few cycles of your precious CPU time my plugin wastes, and therefore help you decide on if it is worth it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 9, 2016
  18. Offline

    Kartus

    has bukkit #677 implement something "AntiCheat"?
     
  19. Offline

    Evenprime

    No, its just another bunch of fixes for players crashing the server by sending invalid PLAYER_MOVE events, that would place them e.g. in Locations > 32.000.000 blocks away from spawn (which isn't supported by minecraft, hence the crash)
     
  20. Offline

    EZSPECIAL

    I have set nocheat.flying permission on all users for a specific world but they can't fly because it blocks them, wasn't it supposed to stop checking them? They're all using zombe's modpack
     
  21. Offline

    Evenprime

    That depends. Are they using the newest version of zombe's modpack? Older version (a week ago) would require you to modify the servers MOTD to make them work (that has nothing to do with my plugin, but with how zombe's modpack was written). So they should try the newest zombes modpack, which won't disable itself.

    If they use the newest zombes modpack, then they probably have increased their movement speed in the config of the modpack ("nocheat.flying" allows flying, but only at "normal" speed, like walking. If you want to allow also the highspeed flying, then you should probably just give them nocheat.moving permission, because in that case there isn't much left that the plugin would do anyway).
     
  22. Offline

    EZSPECIAL

    yes they have changed, in fact it was I who changed and then supplied them. I was trying to have a Creative world and another one for Survival, I will disable moving checks then, I know they don't cheat since it's a restricted friend server, thanks :)
     
  23. Offline

    Evenprime

    On a completely unrelated note:

    I finished implementing the performance measurement for the most performance hungry part of my plugin and here are my results (for my 3.2 GHz QuadCore AMD Desktop PC with 4 GB Ram running both server and client at the same time):

    Average time to process a event in the "moving" check: 60 µs (that's micro seconds). I also found that most of the performance gets lost when asking the Permissions plugin about a players permissions. If I skip the permission check, the time gets reduced to 37 µs per move event. I'll probably implement a permissions cache for the next version that gets updated every ~10 seconds instead of asking for every event if a permission exists. That should give a nice performance boost. Plus now that I actually see what impact various changes to my code have, you can expect further improvements.

    To put the 60 µs in perspective:

    A player can cause at most 20 move events per second, that means 60 * 20 = 1800 µs = 1.8 ms per player per second used on my (compared to most server setups) rather weak machine that did run server and client at the same time. These times should scale linearly with the number of players as there are no interdependencies between calculations for different players.
     
  24. Offline

    godgodgodgo

    So how do I make an exception so that I can fly?
     
  25. Offline

    Evenprime

    Give yourself the permission "nocheat.flying" within the Permissions plugin that you use. If you also want to use the "turbo" button (or whatever it is called in fly mods), you'll have to give yourself the permission "nocheat.moving" (which completely deactivates the check for you, therefore allowing not only flying but also very fast movement and other things).

    unrelated:

    I've been able to reduce the execution time mentioned above from 60 µs to 31 µs with some simple code changes. If you had performance problems before with NoCheat, expect them to be reduced or gone with the next version.
     
  26. Offline

    godgodgodgo

    But I have the admin status so I have the '*' permission. I thought that gives me all permissions

    Oh sorry, I think it must be the AntiHack plugin stopping me. Thanks
    I have both

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 9, 2016
  27. Offline

    TuRmoiLxx

    mainly by being "checked" it means that that group with the permission can use the cheat and what not?
     
  28. Offline

    LardLad

    Hello!

    Thanks for the great plugin - it's great being able to see what's going on when people are trying to fly/speed. Here's a question that I have though:

    I'm trying to implement a jail system where I can send griefers to a prison and other players can torment them with bow/arrow. However, when they die, they respawn at the spawn point and the jail system tries to move them back to jail. This detects the move back to jail as a hack, however, and from the player's perspective they're stuck glitching at spawn.

    Of course I don't want to give the griefers any allowance or they'll be able to fly out of my prison . . . Have any ideas for me?
     
  29. Offline

    Evenprime

    You probably use
    Code:
    player.teleport(targetLocation);
    somewhere while handling PLAYER_MOVE events. If you also do
    Code:
    event.setTo(targetLocation);
    event.setFrom(targetLocation);
    event.setCancelled(true);
    
    right before or after that, then it should work fine in combination with my plugin. If not, then you can always send me the code and I'll see where the problem is, as it should definitely be possible to make them work together nicely.
     
  30. Offline

    LardLad

    Yeah . . . I have no idea what any of that is -- I'm not writing anything, just using the jail system from the essentials pack.

    http://ess.earth2me.com/index.php/Downloads#Essentials.jar

    If there's an easy way for me to reconcile the two, I'll be delighted. Thanks a ton for your help.
     
  31. Offline

    Evenprime

    Ok, just looked what the problem is. I may be able to "fix" it (the problem is that for jailed players ALL kinds of teleports simply get cancelled, even those initiated by other plugins like mine) by telling my plugin to simply give up on teleporting the player if it doesn't work the first time.

    If that works I'll have it implemented in the next version.
     

Share This Page