[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

    OstlerDev

    mrciku

    Is there a way to remove the plugin from broadcasting to all players? I tryed giving them the permission of '-foundboxx.notify' But it still does not work...​

    Thanks!​
    -OstlerDev​
     
  3. Offline

    mrciku

    Don't forget to turn on Use_Permissions in the settings, and don't give them that permission.
     
  4. Offline

    worstboy32

    mrciku

    Having huge performance drop with the last updates.
    I recently updated Foundboxx and my server is getting really laggy after a day running.
    When i start it it have 20tps and 93% ram free.
    And 1 day later it's 5tps and 10% ram free.

    I have checked the timings and i'm 99% sure it's your plugin that is causing the trouble.
    As you can see here first one is after startup and second after a day:

    FoundBoxx v1.7.7
    PlayerInteractEvent Time: 18170 Count: 6 Avg: 3028
    Total time 18170 (0s)

    FoundBoxx v1.7.7
    PlayerInteractEvent Time: 25594425555 Count: 168614 Avg: 151793
    BlockPlaceEvent Time: 527196758460 Count: 18495 Avg: 28504826
    BlockBreakEvent (and others) Time: 7169991759 Count: 44557 Avg: 160917
    Total time 559961175774 (559s)

    559 seconds is really extreme and not even a big plugin have such a high timing.
    some other plugin examples so you can compare:
    Essentials: Total time 19087938492 (19s)
    LogBlock: Total time 7936057550 (7s)
    Citizens: Total time 30899490532 (30s)
    McMMO: Total time 45274867977 (45s)
    Mobarena: Total time 8455849196 (8s)
    WorldGuard: Total time 78029075554 (78s)

    Well as u can see they are all below 100 and they are much much bigger and more intensive as your plugin.
    They all have playerinteract events and they are all really low compared to yours.

    So i hope you can look in your code and see what things you changed in the last 2/3 versions and try fix it.
    If you can't fix it then i have to take the plugin out :/
     
  5. Offline

    mrciku

    Well, I have stopped developing this code already, maybe it is the SQL, try changing the number of maximum SQL queries per tick in the config to a higher number. Or either I'm just forgetting to stop threads.
     
  6. Offline

    worstboy32

    To bad you quit it's better then founddiamonds though :S
    And already tried to change queries
     
  7. Offline

    mrciku

    Haha, I didn't really like the cold war between FD 2 and FB (Although FD 2 started a few weeks after mine was up). So I guess since I'm not really as active as Minecraft as before, I'll hand over all the ore notifications to SeeD. Although I'm the admin for the Minecraft server hosted by one of the service providers in my country.

    EDIT 1: The delay is there probably because I forgot the stop the threads (But I doubt I need to... Any coders out there able to say a word or two about this?)
     
  8. Offline

    worstboy32

    Yeah i remember that :p
    It was like every day updates to get on top.
    But i have always loved this one much more.
    So if you or someone could just fix the delay i would be really happy guess it's not a huge thing to fix <3
     
  9. Offline

    mrciku

    Fixed :) http://dev.bukkit.org/server-mods/foundboxx/files/53

    It's a silent update, so my plugin won't go back to the top of the plugins list. Faithful users will get the update to this version soon... But you can just click the link.
     
  10. Offline

    worstboy32

    Thanks a lot!
    Very much appreciated.

    It's still the same though :/
    FoundBoxx v1.7.8
    PlayerInteractEvent Time: 1229934192 Count: 4937 Avg: 249125
    BlockBreakEvent (and others) Time: 29193500 Count: 1146 Avg: 25474
    BlockPlaceEvent Time: 55411853974 Count: 1430 Avg: 38749548
    Total time 56670981666 (56s)
    That's 10 minutes after starting the server all other plugins are still around 0s
    If your not wanna fix more then just leave it and we will use your source to create a plugin compared like this.

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

    mrciku

    worstboy32 Hmm.... are you using SQL or h2?

    I've tried stress testing my plugin finding 1000 diamonds in a single vein in 5 places. Didn't seem to lag... H2 queue worked fine too... try an /fb update now, maybe it wasn't updated yet.
     
  12. Sorry i know your not supporting this anymore but why do i get this error in my console when starting foundboxx?
    Code:
    06:45:24 [INFO] [FoundBoxx] Enabling FoundBoxx v1.7.7
    06:45:24 [SEVERE] Error occurred while enabling FoundBoxx v1.7.7 (Is it up to da
    te?)
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boole
    an
            at me.Jaryl.FoundBoxx.FoundBoxx.loadConfigurations(FoundBoxx.java:130)
            at me.Jaryl.FoundBoxx.FoundBoxx.onEnable(FoundBoxx.java:314)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:336)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:381)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:250)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:232
    )
            at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:371)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:358)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:187)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:422)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
     
  13. Offline

    mrciku

    Hmmm, it's probably a configurations issue, try deleting it and reopening FB.
     
  14. I did but now I get this error... And I did NOT update to the new RB.
    Code:
    12:34:04 [SEVERE] java.io.FileNotFoundException: .\plugins\update\FoundBoxx.jar
    (The system cannot find the path specified)
    12:34:04 [SEVERE]      at java.io.FileOutputStream.open(Native Method)
    12:34:04 [SEVERE]      at java.io.FileOutputStream.<init>(Unknown Source)
    12:34:04 [SEVERE]      at java.io.FileOutputStream.<init>(Unknown Source)
    12:34:04 [SEVERE]      at me.Jaryl.PLUpdater.Updater.run(Updater.java:68)
     
  15. Offline

    DinoScope

    Is it possible to not let EVERYONE see the announcement? Like, what if I wanted to ONLY let my staff members see it?

    If so, what's the permission node?
     
  16. Offline

    etrubi1

    Try this permission. Work on my server.
    - foundboxx.notify
     
  17. Offline

    Hi15

    If this goes down can i take it over?
     
  18. Offline

    javoris767

    I'm gonna update this for my server and add traps and emerald ore if anyone wants a copy message me I'll get it to ya by the time the 1.3 RB is out :D
     
  19. Offline

    Socoolluke

    Can you send me the updated version I love this plugin but it needs to update :/
     
  20. Offline

    Accelerator74

  21. Offline

    Gammafication

    Is there a way to make it so upon breaking diamond it broadcasts your coords?
     
  22. Offline

    mrciku

    Reviving this project for awhile (hopefully not so short)

    Edit: +0.4 versions because of various fixes and change update module to the CurseAPI instead of RSS (which was rejected).
     

Share This Page