Inactive [ADMN/SEC] FoundDiamonds 3.6 - Broadcasts broken blocks & Cheat detection [1.3.2]

Discussion in 'Inactive/Unsupported Plugins' started by SeeD419, Nov 1, 2011.

  1. Offline

    SeeD419

    [​IMG]
    Diamond rewards/Anti-Cheat
    Original concept by itsatacoshop247
    FoundDiamonds aims to improve the fun of mining by broadcasting when players find certain blocks (configurable) and give out rewards when players find diamonds! It comes bundled with anti-cheat features such as light-level monitoring to deter fullbright hackers and x-ray users from running amok. FoundDiamonds supports admin message functions, logging to file, and even trap blocks that can kick or ban a user if broken. Check out the video below if this sounds like something you'd be interested in.

    Download at:
    Bukkitdev
    Source

    Demonstration Video
    (An older version, but the concept is the same)


    Old Outdated Changelog:
    Show Spoiler

    Version 3.3.1-Beta

    * Fixed an old total block counting bug that I accidentally re-introduced.
    * Fixed a bug with admin messages firing on blocks players placed.
    * Fixed admin messages sending message to the person who broke the block.

    Version 3.3-Beta

    * Implemented versatile lists that can be edited to whatever blocks and colors you want!
    * Made fd log all player commands to the console, including failed command attempts (for this plugin only)
    * Fixed a terrible admin message bug that I never saw before. Revamped the way these works to prevent bugs.
    * Moved prefix to broadcast message as prefix@ instead of having a separate option for it in the config.
    * Fixed color bug when using nicknames in broadcast (now looks way better)
    * Fixed a bug with random items not even working
    * Added 3 new spells! :O
    * Made potion messages more descriptive, and even configurable.
    * Fixed bugs with menus and made other improvements to them.
    * Traps can now be set without using '_' characters, and just spaces (/fd trap gold ore)
    * Refactored tons of code. The source code is actually not so much of a mess anymore. Performance improvements as well.
    * Improved block counting! Diagonal blocks no longer fool the plugin!
    * Merged a pull request by snoepje0 who implemented a depth option for trap blocks. (Thanks again)
    Version 3.2.7

    * Removed an old pointless option from config.
    * Cancelled block break event on trap breaks.
    * Fixed exploit using traps to get diamonds by stopping trap blocks from dropping anything.
    * Fixed a few minor bugs with light level admin messages
    * Added light level logging to file.
    * Added permission 'fd.ignorelightlevel' to completely ignore a player's light level when mining. Not included in fd.*!
    * Improved logging a lot.
    * Renamed logs.txt to log.txt. Why was it plural?
    * Added a few more debug messages
    * Made CleanLog.txt lowercase for lazy linux users like myself :p

    Version 3.2.6

    * Added some debugging info for admin messages.
    * Added lightlevel as a configurable percentage
    * Removed coal ore from light level monitoring (Reason: It denies noobs trying to mine coal with no torches yet. Irony fail. Also the chance of someone cheating for only coal ore is unlikely.)
    * Added lightlevel admin messages and debug
    * Fixed potential bug with trap blocks being set in the void or above max world height.
    * Improved trap block logging quite a bit. Added world, improved readability.
    * Did some testing for weird trap block situations to ensure they would function.

    Version 3.2.5

    * Fixed multi-world spell issue.

    Version 3.2.4
    • Added debug mode. To enable do /fd toggle debug. Outputs information to the console about why broadcasts are canceled.
    Version 3.2.3

    * Made **adding** worlds case sensitive! This will prevent confusion in the future and allow 'World' and 'world' to coexist in the config.
    * Fixed ANOTHER multi-world issue DX I tested it this time!
    * Added a new config option under Logging: Trap Breaks. Defaults to true. Not sure why I had diamonds and trap breaks under the same configuration option. Chances are that even if you don't log ALL diamond ore breaks - you definitely want to know if someone breaks a trap!

    Version 3.2.2

    * Fixed bug where we weren't respecting the world list for spells and announcements from other worlds.
    * Attempted fix for world issue for some.
    * Cleaned up certain areas of code that were sorta messy.

    Version 3.2.1

    * Removed a debug message

    Version 3.2
    • Added option to 'Use Classic Ore Colors' in broadcasts because custom color formatting overrides them. Defaults to true. If you don't like the ore names being colored to their type, set this to false.
    • Cleaned up some sketchy file handling methods
    • Impelemented 'ignore.broadcasts' permission for players who don't like broadcasts :(
    • Made admin messages conform to the custom color codes in the config.
    • Made admin messages send a message to the console!
    • Fixed a terrible bug that could have prevented broadcasts when using admin messages :/
    Version 3.1.9
    • mcMMO spam fixed!
    • Now supports custom color formatting!
    • Improved clean log.
    • Added redstone admin messages.
    • Set plugin to add ALL worlds on first run and enable most everything (should help new users with issues)
    • Improved world menu a bit
    • Added more functionality to the config, toggle, and set menus + fixed a few bugs.
    Version 3.1.8.2
    • Implemented a "Clean Log" option to log ALL announcements cleanly to a text log file.
    Version 3.1.8.1

    • Added an option to disable the [FD] prefix on broadcasts.
    Version 3.1.8
    • Fixed issue of jump potion basically killing players
    • Tried to add support for custom color formatting although it only works in spoutcraft...
    • Fixed bug with fd reload not reloading worlds
    • Implemented the rest of the /fd world menu to add/remove worlds from in game.
    • All console-relevant commands now work at the console.
    • Organized code
    Version 3.1.7
    • Added ability to fd reload from the console
    Version 3.1.6
    • Added an award where spells are casted on players for finding diamonds.
    • Drastically improved admin messages
    • Added admin messages for gold, iron, and lapis.
    • Fixed a rare block detection bug.
    • Re-arranged a lot of code.
    • Added /fd world which as of now only lists enabled worlds (permission is fd.world for future features)
    • Figured out that copydefaults only copies new items so no need to delete old config anymore
    Version 3.1.5
    • Fixed a bug with toggling coal
    • Improved /fd config menu's readability
    • Improved /fd toggle menu's readability
    • Added usenicks to the toggle menu
    • Added obsidian as a broadcast-able block
    • Fixed bug where placed blocks from players would be announced
    Version 3.1.4
    • Permissions overhaul! Be sure to update your permissions!!!
    • Tested plugin with PEX. Works great.
    • Fixed a rare NPE.
    • Fixed OPs in the config not completely working like it should have.
    Version 3.1.3
    • Removed a debug message :/
    Version 3.1.2
    • May have fixed issue with config not saving for some.
    • Improved /fd config menu
    • Fixed issue where on diamond break other blocks were counted in the total
    • Added a config option to change the percentage of time awards are given
    • Added coal ore as a broadcastable ore
    Version 3.1.1
    • Fixed a NPE
    Version 3.1
    • Implemented new YAML Configuration file. (Much easier to read IMO)
    • Added a main menu accessible with /fd or /founddiamonds that prints all commands.
    • Added submenus to toggle admin messages, update the config, reload the config, view the config, or set traps.
    • Re-implemented admin messages in a way that makes sense.
    • Admin messages toggle on/off with /fd admin
    • Further reduced I/O
    • Consolidated configurations into a single file.
    Version 3.0
    • Completely rewrote entire plugin.
    • Fixed numerous performance issues.
    • Tweaked plugin to get best possible performance.
    • Added disable on creative mode to config
    • Added disable total darkness mining to config
    • Added total ores found to broadcast message
    • Removed admin messages.
    • Further improved configuration readability
    Version 2.2
    • Updated to the new method for registering events.
    Version 2.1
    • Added support for multiple worlds! Simply remove any world in worlds.txt you don't want FoundDiamonds enabled in.
    Version 2.0
    • Fixed a terrible permissions issue.
    • Made admin messages a bit more pretty and intuitive.
    • Added Mossy Cobblestone as a broadcast-able block
    Version 1.8.1.6
    • Changed /settrap id# to /settrap itemname (IE, /settrap dirt, /settrap gold_ore)
    • Fixed client side NPE crash
    Version 1.8.1.5
    • Added /settrap # which creates a trap based on the item id a user enters.
    • Added configuration option for admin messages for trap blocks. IE, if another admin breaks a trap block - all admins will get a message.
    Version 1.8.1.4
    • Added a configurable option to the config, WaitTimeBetweenBroadcasts, to configure your own wait time between server broadcasts. As always, you can still disable this entirely, but now you can make them more or less frequent. Time is entered in SECONDS :)
    Version 1.8.1.3
    • Added a configurable option to the config, TreatOPSAsFD.Admin which treats any player in Ops.txt as a player with FD.Admin (if you don't have permissions). This is configurable, so you can choose to ignore Ops.txt and rely only on permissions. This defaults to TRUE.
    Version 1.8.1.2
    • Added *.* to recognized permissions.
    • Actually fixed redstone this time :)
    Version 1.8.1.1
    • Fixed redstone broadcast & admin messages
    • Fixed issues creating files (how on earth did that even happen?)
    Version 1.8.1
    • Made configuration file easier to understand
    • Improved /settrap diamond vein generation
    • Plugin now prints current version on start-up
    Version 1.8
    • Re-implemented /settrap
    • Fixed /settrap to log all diamond blocks it generates, not just one
    • If player has FD.admin permission, they are now immune to trap blocks
    • Added ability to ban on trap break
    Version 1.7.5
    • Switched colors for lapis and diamond (looks more accurate)
    • Added a 3rd random item for awards (defaults to slimeballs)
    • Changed random items to show item names, not ID numbers
    • Rewrote the code for getting random items + amounts
    • Improved error messages, and fixed more spelling errors
    • Changed 30 second wait to 20 seconds
    Version 1.7
    • Continuation of itsatacoshop247's plugin
    • Fixed a few spelling errors and recompiled for latest RB
    Original Changelog from itsatacoshop247
    Version 1.6
    • Traps!
    • Chance to get random items!
    Version 1.5
    • Logging added finally!
    • Option to turn logging on/off
    Version 1.3
    • Works better with Permissions, defaults to OP list if no Permissions
    • Configurable message
    • Beta 1.4 Compatible
    Version 1.2
    • Permissions!
    • 'FD.admin' to see all block breaks
    Version 1.1
    • Added more to config
    • Added ores, options for each to be on/off
    • Turn server message on/off
    • random item give on/off
    Version 1
    • Release
     
  2. Offline

    PReP

    That's very good to know :)

    Then it might evolve to max-stats and such "PReP Has Found: xxx diamonds thus far", either in the plugin or scripted outside for our server later, by counting lines with outside tools. :)

    Keep up the nice work!
     
  3. Offline

    SeeD419

    Is PEX completely up to date?

    Or are you seeing any errors while running only FD?
     
  4. Offline

    skiba

    its working now after i done server restart reload is insufficient
     
  5. Offline

    SeeD419

    Ah, so that was the culprit. Strange...I wouldn't have guessed.

    Thanks for reporting that back. I'll keep that in mind if anyone else has similar issues.
     
    skiba likes this.
  6. Offline

    skiba

    coincidence :) thx for help
     
  7. Offline

    Ebins

    I noticed in the changelog that is says its compatible with bPermissions, but is this confirmed? I attempted to use it on my server, and although I can use the /fb config commands, nothing happens when a block is broken. Below is my config:

    Found Diamonds Configuration:
    Main:
    Disable in creative mode: true
    Disable ore mining in total darkness: true
    Give OPs all permissions: false
    Traps:
    Kick players on trap break: true
    Ban players on trap break: false
    Admin alerts on all trap breaks: true
    Kick message: You broke a FoundDiamonds trap block.
    Awards:
    Items:
    Random items for finding diamonds: false
    Percent of time awards are given: 25
    Random Item 1: 265
    Random Item 2: 263
    Random Item 3: 341
    Spells:
    Random spells for finding diamonds: true
    Spell strength (1-5): 5
    Percent of time spells are casted: 25
    Broadcasts:
    Diamond Ore: true
    Gold Ore: true
    Lapis Ore: true
    Redstone Ore: true
    Iron Ore: true
    Coal Ore: true
    Mossy Cobblestone: true
    Obsidian: true
    Message: '@Player@ found @Number@ @BlockName@'
    Use player nicknames: false
    Logging:
    Log all diamond ore breaks: true
    Enabled Worlds:
    - world
    Admin Messages:
    Diamond Ore: true
    Gold Ore: true
    Lapis Ore: true
    Iron Ore: true

    In my bPermissions file, I have - fd.* for admin (myself) and fd.messages for everyone else. There are no messages when an ore is found, nor are there any random items given out. I've tested it with admins and regular users. Any help would be greatly appreciated! :)

    PS - when I do a world list, it comes up with this:

    - world
    - world
    - world

    Three are listed, although I only have one running. Its not the same name as my world, but I'm assuming that this is just the default?

    Please ignore that posting... I didn't see the previous posting about having to reload the whole server instead of the config.

    Also, the - world setting had to be changed to my world name.

    I can confirm that FD works on bPermissions :)

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

    SeeD419

    Great.

    Yeah the multi-world setup is a bit half-assed right now...The next version will have full support and fixes for some of these common bugs.
     
  9. Offline

    SeeD419

    v3.1.8
    Everyone who's had issues with multi-world - Please update and try the new /fd world menu!

    Managing enabled worlds should no longer be an issue!

    PReP
    Version 3.1.8.2
    • Implemented a "Clean Log" option to log ALL announcements cleanly to a text log file.
    Edit: Errm...do you want time stamps?

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

    _qwerty_

    Does it work with pex, so I can choose which ranks see the messages?
     
  11. Offline

    SeeD419

    It works with pex, but there's currently no permission to choose who sees the broadcasts.

    Right now everyone sees them. (unless they're admin messages...)
     
  12. Offline

    _qwerty_

    Only the highest rank can see them then?
     
  13. Offline

    SeeD419

    Well anyone with the permission fd.messages
     
  14. Offline

    PReP

    Well, any more options to what to have in the output off the console/server-log would be nice,
    but mostly it is the color-codes that makes it off.
    Though this is because i take all the found ores-messages directly from the server.log, so
    of course they have the colour-codes.

    You can see what i mean here: http://prep.mine.nu/, <---
    on the website i run for our server.
    Check the "Found Ores" link on the menu to the left :)

    Maybe if the separate clean log, could be made that logged all the ore-breaks in a way that can be configured, like "Log-Colour codes: true/false, Log-Time Stamps: true/false" and so on : )

    Another neat thing would be that totals summary, like "Number of coal mined by PlayerX: 222" and so, which makes it possible to have some sort of fun ranking on a webpage :)

    ! --> Oh, a new version, will check out the new clean log setting :)

    The cleanlog looks nice thus far, good work :)

    And yeah, atleast a date-setting would be nice for the cleanlog, to create history :)

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

    SeeD419

    I was actually talking about implementing something like that, until someone mentioned to me that the minecraft client actually logs all of those statistics anyway...which kinda put the idea to a halt. Maybe if there were a way I could pull those stats....and put them into a list?? Hmm..

    Right, that shouldn't be a problem. Expect that in the next release :)
     
  16. Offline

    PReP

    Yeah, the Achivement/stats thing has stuff like that, like the X number of blocks mined or whatever.
    I don't know wheter it is still just stored locally, or that stats get uploaded to the profile.

    But that one is probably not "clean text" to access at the moment.

    If you could pull stats from there - or just do another "stats.txt" file,
    in which you count from the stats that FD already logs itself when broadcasting (or from the cleanlog)
    that would be neat.

    Though, if i were less of a slacker i could do that counting myself from your cleanlog,
    in one of the bash-scripts i use to pull info to the homepage :)
     
  17. Offline

    Nickshelton80

    It seems like alot of people (Including me) had trouble because placed ores arent broadcasted xD
    I should have read before hand and my problem would have been solved sooner.
    Amazing plugin, keep up the good work :D
     
  18. Offline

    SeeD419

    Yeah, it's a big problem. I need to make it more clear somehow...

    When I make the next release maybe I'll put some bold text stuff to save people the hassle.
     
    Nickshelton80 likes this.
  19. Offline

    YoungCrafter

    NiceJob man you did a good job and thx for the releases
     
  20. Offline

    ganonfire

    i changed everything to "true" but still when i type in commands it says 'unknown command'
     
  21. Offline

    SeeD419

    Even if you have no permission at all, it still wouldn't say unknown command if you typed /fd or any other fd command.

    AFAIK, if this plugin is running - it would simply return nothing...not 'unknown command'.
     
  22. Offline

    painisgod

    pleasssse make it craftbukkit (or tell me how to use dev and craftbukkit on one server)
     
  23. Offline

    grant1222

    I have found you!
     
  24. Offline

    SeeD419

    It is for craftbukkit! Just follow the link to bukkitdev, download it, and put it in your plugins folder :p
     
    painisgod likes this.
  25. Hi, when i use this plugin stuff keeps appearing in my server log, like DIRT STONE REDSTONE DIAMOND_ORE. I'm using the default settings. What do I need to change to true or false to get this nonsense to stop?
     
  26. Offline

    SeeD419

    Update to the 3.2.1 (whenever bukkitdev approves it...it's been 3 hours for crying out loud)

    That has been fixed.
     
    James Livingston likes this.
  27. Offline

    painisgod

    wow! thanks man!:D :D
     
  28. Offline

    NeNiuM

    Hi,

    Here is the post i wrote on bukkitdev :

     
  29. Offline

    SeeD419

    Ah, isValidWorld is null. I'm not even sure how you did that! You have certainly found a bug of some sort...

    Mind posting your config.yml? It appears as if my plugin wasn't able to find any worlds that it recognized for some odd reason. Assuming the name of your world is 'world', you could try doing '/fd world add world'. That should take care of the problem...although I'm still curious how that happened...
     
  30. Offline

    NeNiuM

    Ok, let me go home and i'll post you my config.yml (seem correct and inspired from your file, no error while parsing it).

    I'll try your solution asap, do you think Multiverse could cause issue ? (multi world plugin managment)

    Thanks for your answer !

    My config file :

    Code:
    Found Diamonds Configuration:
      Main:
        Disable in creative mode: true
        Disable ore mining in total darkness: true
        Give OPs all permissions: true
      Traps:
        Kick players on trap break: true
        Ban players on trap break: false
        Admin alerts on all trap breaks: false
        Kick message: You broke a FoundDiamonds trap block.
      Awards:
        Items:
          Random items for finding diamonds: false
          Percent of time awards are given: 25
          Random Item 1: 265
          Random Item 2: 263
          Random Item 3: 341
        Spells:
          Random spells for finding diamonds: true
          Spell strength (1-5): 3
          Percent of time spells are casted: 100
      Broadcasts:
        Diamond Ore: true
        Gold Ore: true
        Lapis Ore: true
        Redstone Ore: false
        Iron Ore: false
        Coal Ore: false
        Mossy Cobblestone: false
        Obsidian: false
        Message: '@Player@ found @Number@ @BlockName@'
        Use player nicknames: false
        Include [FD] Prefix: true
        Use classic ore colors for ores: true
      Logging:
        Log all diamond ore breaks: false
        Clean log (all ores): false
      Admin Messages:
        Diamond Ore: false
        Gold Ore: false
        Redstone Ore: false
        Lapis Ore: false
        Iron Ore: false
    
    I tried the following command : "/fd world add MyWorld" but i get that :

    Code:
    2012-03-30 18:00:40 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'fd' in plugin FoundDiamonds v3.2
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:473)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:821)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.NullPointerException
    at org.seed419.FoundDiamonds.FoundDiamonds.validateWorld(FoundDiamonds.java:303)
    at org.seed419.FoundDiamonds.FoundDiamonds.handleWorldMenu(FoundDiamonds.java:263)
    at org.seed419.FoundDiamonds.FoundDiamonds.onCommand(FoundDiamonds.java:234)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    ... 12 more
    The plugin seems to be well loaded, there isn't any more information displayed during the start process.

    I'm running Craftbukkit 1.2.4-R1.0.

    Thanks.

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

    SeeD419

    Oh dear. What are the names of your worlds??
     

Share This Page