Spigot BuyAccruedBlocks 1.1idc it should work now

GriefPrevention addon: Changes /buyclaimblocks to buy accrued blocks instead of bonus claim blocks.

  1. RoboMWM submitted a new resource:

    BuyAccruedBlocks - GriefPrevention addon: Changes /buyclaimblocks to buy accrued blocks instead of bonus claim blocks.

    Read more about this resource...
     
  2. I never understood why Bonus and accrued claimblocks had to be seperate anyways.
     
  3. I use bonus claim blocks as a reward, and it helps the player notice (and me, for accounting purposes) of their extra claim blocks.
     
  4. I'm pretty sure that the reason why they were separate was because of the cap. If the maximum claim blocks was 10000, and someone bought up to 10000, they wouldn't be able to get more claim blocks for playing while other players would get the blocks. They would eventually have the same amount as the people who donated. The bonus claim blocks was a way to give claim blocks without "punishing" the person who earned them.
     
    • Agree Agree x 1
  5. On 1.11 I get the "ERROR Could not load 'plugins/BuyAccruedBlocks.jar' in folder 'plugins' "

    I can post the whole error log for this if appropriate, but I figure it just needs to be compiled against the 1.11 api. Let me know if logging info would help, and I'll catch and throw it in here. :)
     
  6. I said I could do this for someone a while ago, and I think they had an issue with it, but they were never clear on how they resolved it. Idk if I changed anything in source, I'll just change it to the 1.11 API, compile, and upload I guess.
     
  7. I did the update, but I'm getting a java.lang.NullPointerException. It can wait as needed with other things on fire. :)

    I'm not clear on how to do spoilers here, but here goes:

    Code (Text):
    [21:31:46] [Server thread/ERROR]: Could not load 'plugins/BuyAccruedBlocks.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NullPointerException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot-1.11.jar:git-Spigot-16c940b-ac99d7d]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.11.jar:git-Spigot-16c940b-ac99d7d]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.11.jar:git-Spigot-16c940b-ac99d7d]
        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.loadPlugins(CraftServer.java:298) [spigot-1.11.jar:git-Spigot-16c940b-ac99d7d]
        at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:204) [spigot-1.11.jar:git-Spigot-16c940b-ac99d7d]
        at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:542) [spigot-1.11.jar:git-Spigot-16c940b-ac99d7d]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
    Caused by: java.lang.NullPointerException
        at me.robomwm.BuyAccruedBlocks.Main.<init>(Main.java:26) ~[?:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_91]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_91]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_91]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_91]
        at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_91]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot-1.11.jar:git-Spigot-16c940b-ac99d7d]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[spigot-1.11.jar:git-Spigot-16c940b-ac99d7d]
        ... 6 more
     
     
    #8 RomaqRosher, Nov 22, 2016
    Last edited: Nov 22, 2016
  8. Just spoiler, no s. Though I'd rather use code blocks instead.
     
  9. There... learning by doing. :) Thank you.
     
  10. What economy plugin do you use? See if BuyAccruedBlocks is loading before it.
     
  11. https://dev.bukkit.org/bukkit-plugins/gringotts/?page=64#c183 v 2.9 and vault.

    Code (Text):

    [21:31:44] [Server thread/INFO]: Set PluginClassLoader as parallel capable
    [21:31:44] [Server thread/INFO]: DataSourcePool [Gringotts] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    [21:31:44] [Server thread/INFO]: DatabasePlatform name:Gringotts platform:mysql
    [21:31:44] [Server thread/INFO]: SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    [21:31:45] [Server thread/INFO]: Entities enhanced[0] subclassed[2]
    [21:31:46] [Server thread/ERROR]: Could not load 'plugins/BuyAccruedBlocks.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NullPointerException
    ...
     
     
  12. Does it use vault? Also, I can't be entirely sure that Gringotts is loading before BuyAccruedBlocks there (find where it says "enabling")

    Going to guess the answer is yes to both. Not sure why that's returning null then. Do you have the VaultAPI plugin installed? (Going to guess that's yes as well, since the plugin is attempting to enable.) Not really sure what the issue is here - does Gringotts have an option for Vault integration?

    Please look for this message in the log. It should appear before BuyAccruedBlocks attempts to enable. https://github.com/MinecraftWars/Gr...ava/org/gestern/gringotts/Gringotts.java#L146
     
    #13 RoboMWM, Nov 23, 2016
    Last edited: Nov 23, 2016
  13. Code (Text):

    For Romaq's reference, 2016-11-21-3.log starting line 16

    [21:26:27] [Server thread/ERROR]: Could not load 'plugins/BuyAccruedBlocks.jar' ...
    ... CoreProtect, WorldEdit, BetterBeds, PlaceholderAPI, WorldBorder ...
    [21:26:27] [Server thread/INFO]: [Gringotts] Loading Gringotts v2.9
    ... WorldGuard, Multiverse-Core, ProtocolLib, glizer, HorseTpWithMe, CreeperHeal, mcMMO, Multiverse-Portals ...
    [21:26:27] [Server thread/INFO]: [Vault] Loading Vault v1.5.6-b49
    ... blah-blah-blah...
    [21:26:27] [Server thread/INFO]: [Gringotts] Enabling Gringotts v2.9
    [21:26:27] [Server thread/INFO]: [Gringotts] Found Bukkit version: 1.11-R0.1-SNAPSHOT. All features enabled.
    [21:26:27] [Server thread/INFO]: [Gringotts] Unable to hook plugin Factions
    [21:26:27] [Server thread/WARN]: [Gringotts] Unable to load Factions handler because your version of Factions is not compatible with Gringotts. Factions support will not work
    [21:26:27] [Server thread/INFO]: [Gringotts] Unable to hook plugin Towny
    [21:26:27] [Server thread/WARN]: [Gringotts] Unable to load Towny handler. Towny support will not work
    [21:26:27] [Server thread/INFO]: [Gringotts] Plugin Vault hooked.
    [21:26:27] [Server thread/INFO]: [Gringotts] Plugin WorldGuard hooked.
    [21:26:27] [Server thread/INFO]: [Gringotts] Registered Vault interface.
    ...
    [21:26:28] [Server thread/INFO]: [Vault] Enabling Vault v1.5.6-b49
    [21:26:28] [Server thread/INFO]: [Vault][Economy] Gringotts hooked.
    [21:26:28] [Server thread/INFO]: [Vault] [Economy] Gringotts found: Loaded
    [21:26:28] [Server thread/INFO]: [Vault] [Economy] Essentials Economy found: Waiting
    [21:26:28] [Server thread/INFO]: [Vault] [Permission] SuperPermissions loaded as backup permission system.
    [21:26:28] [Server thread/INFO]: [Vault] Enabled Version 1.5.6-b49
     
    Towny & Factions are not used. That is what GriefPrevention is for, and GP/GPFlags have loaded before this point.

    Would you want details between line 15 (just before BuyAccruedBlocks fails in line 16) to line 96 Vault Enabled? I don't mind cut & paste, I just don't want to spam unnecessary log.
     
  14. Oh ok so Gringotts indeed is loading after BuyAccruedBlocks. Will push out an update that will tell Bukkit to load after Gringotts.
     
  15. Oh wait a minute... it's doing stuff on load... that's probably why.
     
  16. I'm doing an audit of all the plugins with 1.11.2, documenting as I go.

    I believe you are correct that this plugin isn't really used, and that's ok. I plan to remove it until I get asked for a method to purchase new GP claim blocks. I do note the following misspelling of "and" as "anhd" in the following snip invoking the command:

    Code (Text):

    /BuyClaimBlocks <numberOfBlocks>
    Sorry, buying anhd selling claim blocks is disabled.
     
    I'll deactivate this for now until the plugin is requested by the players. I did try to find where the message is stored in the source package, but I am not that clever yet and I didn't see it in https://github.com/RoboMWM/BuyAccruedBlocks/archive/1.1+.tar.gz

    If you are busy and you'd prefer to use your time on other things, that's cool. If I'm going to wait until someone asks to use it "for real", it is reasonable you would do the same. :)
     
  17. Doesn't sound like the plugin is enabled. This is a GP message, and the default message has a misspelling that I haven't bothered to look for.