Skip to content

[BUG] Value of first owner's seconds #12

Open
@EastRane

Description

@EastRane

Describe the bug
When server starts, egg owner isn't defined (and it's ok). When some player obtains egg, his eggOwnedSeconds starts not from 0, but from the time server was started. So If player manages to obtain egg after 10 minutes of server's restart, then his eggOwnedSeconds will be 600 from the start, and it's obviously a bug. Maybe "lastUpdate" variable has initilization on plugin start and then this value compares to current time, when owner grabs egg, in result causing such a big time from the start?

To Reproduce
Start server. Wait for 5 minutes. Grab an egg. Your eggOwnedSeconds will be 300 from the start, but not 0.

Expected behavior
eggOwnedSeconds obviously should be 0 when first player becomes egg owner.

Version Information:

  • "EggHunt-1.1.1-shaded.jar"
  • 1.20.2
  • "paper-1.20.2-318.jar"

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageThis issue needs to be looked at

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions