Lottery continually drawing winners ruined economy #51


  • New
  • Defect
Open
Assigned to _ForgeUser7443017
  • _ForgeUser12282895 created this issue Dec 27, 2013

    What steps will reproduce the problem?
    1. After clean install on 1.7 start server
    2. Lotto works great until first draw
    3. After first draw it will create a winner each time a player issues the /lottery command. It will pay out the balance of the first draw. In this case it drew 130 times with a pot of $44,000. Lotterywinners also weren't all recorded.

    What is the expected output? What do you see instead?

    What version of bukkit and lottery plugin are you using?
    Spigot 1215
    lottery v0.9.4

    Are you using any economy plugins? If so, which?
    hyperconomy/vault

    Do you have an error log of what happened?

    [12:13:18] [Server thread/INFO]: that1bigkid issued server command: /lottery
    [12:13:18] [Server thread/WARN]: [Lottery] Task #76619 for Lottery v0.9.4 generated an exception
    java.lang.NullPointerException
        at net.erbros.lottery.LotteryGame.getWinner(LotteryGame.java:411) ~[?:?]
        at net.erbros.lottery.Lottery.lotteryDraw(Lottery.java:164) ~[?:?]
        at net.erbros.lottery.LotteryDraw$1.run(LotteryDraw.java:29) ~[?:?]
        at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:58) ~[spigot.jar:git-Spigot-1190]
        at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) [spigot.jar:git-Spigot-1190]
        at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:577) [spigot.jar:git-Spigot-1190]
        at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:259) [spigot.jar:git-Spigot-1190]
        at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:534) [spigot.jar:git-Spigot-1190]
        at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:446) [spigot.jar:git-Spigot-1190]
        at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [spigot.jar:git-Spigot-1190]

    Please provide any additional information below.

  • _ForgeUser12282895 added the tags New Defect Dec 27, 2013
  • _ForgeUser7443017 posted a comment Jan 3, 2014

    Can you paste your Lottery config file here, thank you :)

  • _ForgeUser7443017 posted a comment Jan 3, 2014

    This is likely due to HyperConomy, a economy plugin not directly supported by Vault. Do you have any other economy plugin installed?

  • _ForgeUser12282895 posted a comment Jan 3, 2014

    @Erbros: Go Right now just hyperconomy

    config:
      useiConomy: true
      cost: 250
      material: 266
      hours: 2
      broadcastBuying: true
      broadcastBuyingTime: 120
      welcomeMessage: true
      clearExtraInPot: true
      netPayout: 85
      taxTarget: '1'
      maxTicketsEachUser: 10
      numberOfTicketsAvailable: 0
      buyingExtend:
        enabled: true
        secondsRemaining: 30
        extendBase: 15
        extendMultiplier: 1.5
      nextexec: 1388164417977
      extraInPot: 0
      jackpot: 0
      debug: false
    
  • _ForgeUser7442447 posted a comment Jan 4, 2014

    This is because you supplied an invalid tax target, the hypereconomy is bombing because it can't find an account called "1".

    Added a check to prevent this in the future.

    ~ KHobbits.


    Edited Jan 9, 2014
  • _ForgeUser7443017 posted a comment Jan 5, 2014

    @essentialsteam: Go

    I was thinking about that, but I was of the impression that the hasAccount call would create the account if it didn't find one. Clearly I'm not into the code anymore ;)


To post a comment, please login or register a new account.