[INFO/ADMN] FoundBoxx v1.8.4.3 - Ore finds announcer (anti-cheat, xray, fullbright) [CB 1.7.9-R0.1]

Discussion in 'Archived: Plugin Releases' started by mrciku, Oct 29, 2011.

  1. Offline

    mrciku

    FoundBoxx (29/5/14 1119HRS [+8GMT])

    [​IMG]
    Multi-threaded optimizations! Flat file (H2) support!
    Custom messages and blocks support!
    (Video version: v1.8.4.3)
    Show Spoiler
    (Video version: v1.4.1)
    If you would like to contribute without paying any money, try checking out the ads in my demonstration video and/or the description. Every click is gladly appreciated! Thanks!
    Description: Continuation of FoundDiamonds from scratch (Yes, even the MySQL, but 10% of it is from a tutorial). Announces ore finds. Easy to configure. Extra features​

    Features:
    • Announcing findings of the different ore by players
    • Able to set to use permissions (Look below)
    • Able to configure which ore to announce
    • Announces number of the same ore nearby
    • Announces light level (in percentage, for fullbright hackers)
    • Able to set only survival players to then announce
    • Saves all nearby ores into a list to prevent players from getting it announced again after 30 seconds unlike FoundDiamonds
    • List will be cleared on server restarts or entries removed on removing the blocks
    • Random item on mining diamonds
    • Able to set to disallow mining at light 0, to help in fullbright hackers
    • SQL and flat file (H2) support!
    • Using database you can also get a player's farmrate!
    • Customizable messages!
    • Auto-updater
    Configuration Defaults (plus comments):
    Code:
    Auto_Update_On_Plugin_Enable: true  #toggle the auto updater running on start because you don't trust me/are lazy. You can still use "/fb update".
    Notify_On_Updates: true #notify people with the foundboxx.cmd.update permission on updates available (not linked with auto update)
    Allow_Usage_Stats_Collection: true #allow MCStats data collection
    Survival_Only: true #only listens to players in survival mode (recommended: true)
    Use_Nickname: false #when announcing, use the players nick (display name). SQL logging is still original real name
    Use_Permissions: false #permissions enabled? If no permissions, op will do (PermissionBukkit, PEX, bPerms)
    Messages:
      Found_Notification: '%ply found %amt %blk(s) (Visibility: %vis%)' #block found notification (%ply = Player name; %amt = Amount of the block found; %blk = Block name; %vis = Visibility value)
      Must_Have_Light_To_Mine: Interacting in the dark is dangerous! Put some torches! #warning to display when mining in dark is disallowed and the person mines in the dark
    Count_Diagonal_Ores: false #should the plugin count diagonal ores
    EMERALDS: true #announce emeralds.
    DIAMONDS: true #announce diamonds
    GOLD: true #announce gold
    IRON: true #announce iron
    COAL: false #announce coal
    LAPIS: true #announce lapis
    REDSTONE: true #announce redstone
    Extra_Blocks_IDs: [] #also announce all ids inside the box separated with a comma (Format: [1, 2, 3])
    Percentage_Chance_To_Give_Randoms_Item: 0 #out of 100, chance to give a random item to everyone, leave 0 to disable.
    Max_Random_Items_To_Give: 3 #max number of the random item to give, 1 to this value
    Random_Item_To_Give: 365 #item id of the random item
    Must_Have_Light_To_Mine: false #disallow fullbrighters to mine in the dark at light 0 (still announces ore finds but without visibility)
    SQL_Enabled: false #false = Disable SQL and H2; true = Enable SQL; SQL = Enable SQL; H2 = Enable H2
    SQL: #ONLY REQUIRED TO CHANGE USING SQL (H2 ONLY USES PREFIX) IS ON
      URL: localhost #URL of SQL
      Port: 3306 #port of SQL
      Database: minecraft  #Database to use
      Prefix: fb  #prefix of all FB database (eg. "fb-log")
      User: root@localhost #username to log in SQL
      Pass: '' #password to log in SQL
      Days_To_Remove: 1 #how long can a log survive before it is able to get deleted on startup.
      Maximum_Queries: 5000 #how many queries that can be used (To MySQL literate people, it's the maximum LIMIT value)
      Maximum_Data_Queries_Per_Second: 10 #how many queries to be sent per second (to prevent overload)
    Commands:
    • /foundboxx OR /fb - Prints all commands
    Permission Nodes (case sensitive) [PermissionBukkit, PEX, bPerms]:
    • foundboxx.* - Everything below (Try to give this to only MAIN server admins)
    • foundboxx.admin - Use ALL /fb commands (Try to give this to only MAIN server admins)
    • foundboxx.notify - Get the notification
    • foundboxx.dark - Allows mining in dark all the time
    • foundboxx.cmd.reload - Allow /fb reload and /fb config (WARNING: GIVE TO ONLY TRUSTED PEOPLE [THEY CAN SEE MYSQL PASSWORD])
    • foundboxx.cmd.queue - Allow /fb queue
    • foundboxx.cmd.farmrate - Allow /fb farmrate
    • foundboxx.cmd.update - Allow /fb update
    • foundboxx.ignore.* - Ignore for all ore finds
    • foundboxx.ignore.emerald - Ignore emerald finds
    • foundboxx.ignore.diamond - Ignore diamond finds
    • foundboxx.ignore.gold - I don't need to say what this does
    • foundboxx.ignore.iron - I don't need to say what this does
    • foundboxx.ignore.lapis - I don't need to say what this does
    • foundboxx.ignore.redstone - I don't need to say what this does
    • foundboxx.ignore.coal - I don't need to say what this does
    • foundboxx.ignore.allextras - I don't need to say what this does
    Changelog:
    v1.8.4.3
    Added 2 new configuration settings:
    • Notify_On_Updates: true #notify people with the foundboxx.cmd.update permission on updates available (not linked with auto update)
    • Allow_Usage_Stats_Collection: false #allow MCStats data collection
    v1.8.4.2 (another small update, optional)
    - Included MCStats statistics support (hopefully it is working)
    v1.8.4.1 (small update, optional)
    - Just added a small update reminder to a player with the update permission when he/she joins (only will prompt if auto update setting is true)
    v1.8.4
    - Fixed a derp in checking if a block is untouched before when SQL is not enabled.
    - Changed configurations API to the simpler Bukkit getConfig() API.
    - Added a new option to toggle counting diagonal ores (normally hidden while mining underground) [Set to false as default to stop "cheating" using my plugin].
    v1.8.3
    - Changed auto updater to the CurseAPI system
    v1.8.2
    - Derp on the H2 database
    v1.8.1
    - Attempt to fix auto updater
    - Wrong version number
    v1.8.0
    - Project has been revived! Probably for a short term though.
    - Fixed all the errors for now and made compatible with the latest bukkit developer build.
    I will need some help on some things such as:
    - Any incompatible permissions plugin
    - Bugs
    Todo:
    - Improve threading.
    Show Spoiler
    v1.7.7
    - Added block places to SQL/H2 support. On server restarts if a player (in survival mode) had placed an ore on the ground, it will not announce anymore.
    v1.7.6
    - Added config to disable auto-update on startup
    - Optimized a little bit of the variables (Some were looping)
    - "Portabalized" the auto-updater
    - More restructuring of folders
    v1.7.5
    - Added threading for SQL/H2 startup
    - Added a double checker to check if the H2 library file is corrupted and re-downloads if it is
    - More rearrangement of code to folders
    v1.7.4
    - Extremely critical bug that causes huge stack overflow fixed.
    v1.7.3
    - Threading complete! Code more optimized yay!
    v1.7.2
    - Made auto-updater run on separate threads! Yippie! Doesn't slow down start up time and my first successful thread attempt!
    v1.7.1
    - Re-organized folders
    - Enhanced auto-updater (Even more efficient)
    - Added custom message to print configurations
    - Nicer print configurations
    - Starting on threads (Not in use yet)
    v1.7
    - Added custom messages support
    - Added custom blocks support (farmrates supported also)
    v1.6.2
    - Added 1.2 support by fixing events.
    v1.6.1.4
    - Fixed permissions for ops when permissions is disabled.
    v1.6.1.3
    - Removed WorldGuard support for the time being, until I get the API sorted.
    v1.6.1.2
    - Fixed NPE, silly me.
    v1.6.1.1
    - Finished auto-updating alittle bit more.
    - WorldGuard support!
    v1.6.1
    - Auto download updates on "/fb update"!
    v1.6.0.3
    - Hopefully fixed PEX related issues
    - Added ignore permissions
    - Tweaked disable mining in dark
    - Rearranged some if statements
    v1.6.0.2
    - Probably fixed SQL
    v1.6.0.1
    - Fixed H2 error.
    v1.6
    - Finally! FLAT FILE SUPPORT! FOR THOSE WHO WANT IT! SEE THE CONFIGURATION COMMENT ON SQL ON HOW TO USE IT! CREDITS THANKS TO xAuth FOR THE OPEN-SOURCE CODE. H2 library downloads on it's own with FB, no worries!
    v1.5.2.8
    - Tweaked SQL connections alittle bit, hoping to fix the error some people are facing.
    - Also tweaked abit of the plugin.yml permissions.
    v1.5.2.7
    - Probably fixed PEX support, check again please.
    v1.5.2.6
    - Removed the checks for "Disallow mining in dark" in Nether.
    - Removed the checks "Disallow mining in dark" when Y < 60, only check when block is at least 5 blocks below sea level (Sea level is 64 therefore, when Y is 59 and below).
    v1.5.2.5
    - Fixed reader error on start-up
    v1.5.2.4
    - Added more minor permissions for each command, foundboxx.admin still allows all other commands.
    v1.5.2.3
    - Fixed bPermissions support
    v1.5.2.2
    - Fixed NPE in the latest development builds of craftbukkit
    v1.5.2.1
    - Possibly fixed the error for ArrayList in SQL queue
    v1.5.2
    - Added "Use_Nick" configuration to announce using the players display name instead of MC name
    - Fixed added a configuration to change maximum data queries per second defaulted to 10 (was 3 and kinda not synchronized)
    v1.5.1.3
    - Added /foundboxx for those with plugins that override /fb
    - Modified help printing
    - Rearranged code for the sake of my eyes and brain
    v1.5.1.2
    - Code rearrangement
    - Disabled printing farmrates of disabled ores in configuration to remove ugly "0"s
    - Added the colouring of farmrate prints through my statistics (I still need to get statistics from red stone and coal, can you guys help me?)
    - Some minor bugfixes
    v1.5.1.1
    - Fixed the minimum farmrate checking days from 2 to 1.
    v1.5.1
    - Added "/fb farmrate (name) (days)" command to check farmrates and players!
    - Made SQL reload on "/fb reload".
    v1.5
    - Added MySQL support!
    v1.4.4.1
    - Fixed the stupid visibility notification not showing again.
    v1.4.4
    - Added PEX and bPerms support (UNTESTED ON 8/11/11!)
    v1.4.3
    - Fixed the need to turn on permissions for everyone to see [notify perm was defaulted to false when permissions is disabled] (SILLY ME!)
    v1.4.2.2
    - Code rearrangement
    - Changed the warning of the "Disallow mining in dark"
    - Added a few more things to plugin.yml
    v1.4.2.1
    - Fixed mining in the dark when disallowing it also does not announces the ore finding.
    - Optimized a very tiny bit of performance by moving some if functions around.
    v1.4.2
    - Fixed configuration printing for "Disallow mining in dark" value
    - Tweaked a little bit of the permissions
    v1.4.1
    - Workaround for the counter displaying too much (Hope it works)
    v1.4
    - Added redstone ore configuration
    - Added reload command (With permissions)
    - Fixed up the visibility notification
    - Some other bugfixes
    v.1.3.1
    - Fixed the counter from showing 1 less block
    v1.3
    - Shortened notification message
    - Added permissions
    - Added a must have light to mine function
    - Changed color of lapis notification to look more better to the eye with Doku font
    v1.2.1
    - Fixed to only give random items once per bunch
    v1.2
    - Fixed NPE on PlayerInteract
    v1.1
    - Fixed coal and lapis announcing
    - Added giving random items on a player mining diamonds
    - Changed "Light:" to "Visibility:" and shows a percentage instead
    - Added a feature to not announce if the ore is player placed until restart
    - Now uses the new YAMLConfiguration instead of the deprecated one
    v1.0
    - Initial release

    To be made:
    • Multi-world support (Soon hopefully)
    • Traps (Also will be integrated to SQL to get farmrates for traps!)
    • Ability to set delays between messages
    • Ability for users to choose to get their own announcement even if it is disabled by the server
    Credits:
    • mrciku - Main base code
    [​IMG]
    Stats collection: MCStats Lite is included in the latest versions and will just be collecting really basic information (your server's IP address, and other private information will not be collected) about your server. The collection will be used for the public's (mainly mine) knowledge on the popularity of the plugin, you may choose to opt-out in the configurations by changing the "Allow_Usage_Stats_Collection" option to false. For more information please head tohttp://mcstats.org/learn-more/
    BUKKITDEV:

    Source:
     
  2. Offline

    nemmie

    Code:
    Survival_Only: true
    Use_Nickname: false
    Use_Permissions: true
    DIAMONDS: true
    GOLD: true
    IRON: false
    COAL: false
    LAPIS: true
    REDSTONE: false
    Percentage_Chance_To_Give_Randoms_Item: 0
    Max_Random_Items_To_Give: 3
    Random_Item_To_Give: 365
    Must_Have_Light_To_Mine: false
    SQL_Enabled: true
    SQL:
      URL: mudfancies.com
      Port: 3306
      Database: mudfanci_mine
      Days_To_Remove: 1
      Maximum_Queries: 5000
      Maximum_Data_Queries_Per_Second: 10
      Prefix: fb
      User: mudfanci_mine
     
  3. Offline

    DaNksta

    Is there a way to make it so I can allow people to dig/mine with shovels in the dark, or can you please add an option so the light requirement only affects picks?(or even just not affect clay)
    I just started using the 'require light to mine' feature, and players have been complaining about not being able to gather clay very easily. (they have to use their hands in the dark.)
    This is an AWESOME plugin! Seriously, Thank you so much for this.
    I just used the reward and set it to snowballs for Christmas, people freaking love it!
     
  4. Offline

    Ronny Lawson

    How exactly is the likelihood of xray calculated? What is the calculation? Perhaps can you show a little pseudocode or quick math formula representing how it determines who is "Yellow - Possible xRay" and who is "Red - Probably xRay"?

    Thanks! Great plugin.
     
  5. Offline

    mrciku

    I meant the other user with the error, but anyway for your case, maybe you are using an older version of PEX. I'm not too sure, any PEX devs can tell me if your plugin also supports the player.hasPermission function?

    Maybe I can do only affect picks and hands, I'll try.

    My calculation is done by spectating an xrayer in my server, here's my code if you can read, quite easy really:
    Code:
                if (Diamonds)
                    asker.sendMessage("    Diamonds: " + (dias > (70 * Integer.parseInt(days)) ? ChatColor.RED : (dias > (50 * Integer.parseInt(days)) ? ChatColor.YELLOW : "")) + dias);
                if (Gold)
                    asker.sendMessage("    Gold: " + (gold > (170 * Integer.parseInt(days)) ? ChatColor.RED : (gold > (100 * Integer.parseInt(days)) ? ChatColor.YELLOW : "")) + gold);
                if (Iron)
                    asker.sendMessage("    Iron: " + (iron > (300 * Integer.parseInt(days)) ? ChatColor.RED : (iron > (250 * Integer.parseInt(days)) ? ChatColor.YELLOW : "")) + iron);
                if (Lapis)
                    asker.sendMessage("    Lapis Lazuli: " + (lapis > (90 * Integer.parseInt(days)) ? ChatColor.RED : (lapis > (60 * Integer.parseInt(days)) ? ChatColor.YELLOW : "")) + lapis);
                if (Red)
                    asker.sendMessage("    Red Stone: " + red);
                if (Coal)
                    asker.sendMessage("    Coal: " + coal);
    EDIT: Actually it's quite hard to read :X
     
  6. Offline

    Ronny Lawson

    Thanks mrciku. I understand. Anything more than 70 diamonds or 300 iron daily is going to be marked as red. The only thing I'd really like to see happen is notifications for anyone who has been flagged, either in the form of a new table in the DB, or an email notification even. Nice work.
     
    obscurehero likes this.
  7. Offline

    Semirotta

    thank you, ill try this.

    Question: if i leave permissions FALSE , it only shows the messages, if someone find ores -> to admins right?
     
  8. Offline

    mrciku

    No, if you leave it to false, it'll show to everyone.
     
  9. Offline

    Semirotta

    oh right , ok i set it true :D
     
  10. Offline

    nemmie

    I use GroupManager and it show when someone finds a diamond but if you do a farm report on them it says 0 for gold, diamonds, and so on. I have a few plugins on my system and they all work with the database. I am at a lost I really am.

    2011-12-26 07:10:02 [INFO] GroupManager version 1.7 (Phoenix) is enabled!
    2011-12-26 07:10:02 [INFO] [FoundBoxx] Attempting to load SQL.
    2011-12-26 07:10:03 [INFO] [FoundBoxx] SQL loaded.
    2011-12-26 07:10:03 [INFO] [FoundBoxx] No custom permission plugins found, using original permissions.
    2011-12-26 07:10:29 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-12-26 07:10:29 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    2011-12-26 07:10:29 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    2011-12-26 07:10:29 [SEVERE] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3082)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2968)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3516)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
    2011-12-26 07:10:29 [SEVERE] at me.Jaryl.FoundBoxx.SQL.dataQuery(SQL.java:95)
    2011-12-26 07:10:29 [SEVERE] at me.Jaryl.FoundBoxx.SQL.access$2(SQL.java:91)
    2011-12-26 07:10:29 [SEVERE] at me.Jaryl.FoundBoxx.SQL$1.run(SQL.java:61)
    2011-12-26 07:10:29 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2011-12-26 07:10:29 [SEVERE] at java.lang.Thread.run(Thread.java:662)
    2011-12-26 07:10:29 [SEVERE] Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2529)
    2011-12-26 07:10:29 [SEVERE] at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979)
    2011-12-26 07:10:29 [SEVERE] ... 14 more
     
  11. Offline

    mrciku

    You can try to turn off SQL and use H2 instead. But if you really want SQL, could I have your configurations?
     
  12. Offline

    nemmie

    I switched to H2 and when I farmreport on someone it still says zeros.
     
  13. Offline

    mrciku

    any errors?
     
  14. Offline

    obscurehero

    i agree.

    A way to see who flagged the system so we can look them up further would be nice. Otherwise we rely on other methods to catch the xray'ers
     
  15. Offline

    nemmie

    fb farmrate savanni 2
    03:30:56 [INFO] [FoundBoxx] Farming rates for savanni for the past 2 day(s):
    03:30:56 [INFO] Diamonds: 0
    03:30:56 [INFO] Gold: 0
    03:30:56 [INFO] Lapis Lazuli: 0
    03:30:56 [INFO] Yellow - Possible xRay, Red - Probably xRay
    Hade mined over 20 diamond ore
     
  16. Offline

    mrciku

    If I am not wrong, make sure "savanni" is in proper case, like "Savanni" if the S is capital.
     
  17. Offline

    juicychris47

    404 not found :(
     
  18. Offline

    Karimi7

    No download..? :(
     
  19. Offline

    nemmie

    Ok so with the H2 and the upper case S it works, Thanks
     
  20. Offline

    Ym3r

    Please make it ONLY OP seeing the messages !
     
  21. Offline

    Epics

    Link is dead.
     
  22. Offline

    Karimi7

    Fix it then! :(
     
  23. Offline

    supayoshi1

    Hi a few ideas, how about making it so, that admins get a message when they login, or an email, with something alike
    [Playername] Possible uses Xray! Farmrates are:
    And so alike, we Love FoundBoxx, however checking + 3000 users is a hard job!
    However it is quite good to catch ;)

    Second, maybe you can add a calculator, that counts in hours, instead of just days, if someone xrays, and catches more diamonds then the major populution, in a hour we get an alert, so this would include some maths, but it would make the plugin highly effective! as long with the right settings ofcourse! :D
     
  24. Offline

    shauwk

    yes i want to download

    if anyone has the plugin please post link for it! thanks
     
  25. Offline

    mrciku

  26. Offline

    Grasfer

    Hello, i can't seem to figure out how to make it announce. I got it installed and all the /fb commands is working but it wont announce on anything. Is there a required plugin i missed to install?
     
  27. Offline

    shauwk

    by default, it only works in survival so if you are in creative then it wont announce
     
  28. Offline

    Grasfer

    Yes, i have set the config for survival_Only to false in the config.

    And my /gamemode is always set to 0 :)
     
  29. Offline

    mrciku

    can I have your configurations and permissions if set?
     
  30. Offline

    Grasfer

    My permissions.yml is empty, i never use that.

    FoundBoxx - config.yml
    Code:
    Survival_Only: false
    Use_Nickname: true
    Use_Permissions: false
    DIAMONDS: true
    GOLD: true
    IRON: true
    COAL: false
    LAPIS: true
    REDSTONE: false
    Percentage_Chance_To_Give_Randoms_Item: 0
    Max_Random_Items_To_Give: 3
    Random_Item_To_Give: 365
    Must_Have_Light_To_Mine: false
    SQL_Enabled: false
    SQL:
      URL: localhost
      Port: 3306
      Database: minecraft
      Days_To_Remove: 1
      Maximum_Queries: 5000
      Maximum_Data_Queries_Per_Second: 10
      Prefix: fb
      User: root@localhost
      Pass: ''
    
     
  31. Offline

    mrciku

    Ah. Yes. I almost forgot, OPs are ignored on ore finds by default, I already fixed it in my build but I have not released it yet. I'm waiting for one more function to implement before releasing.
     

Share This Page