HyperSMP / EggHuntPlugin

Minecraft plugin adding the ability to track and steal the Dragon Egg from other players
6 stars 3 forks source link

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

Open EastRane opened 8 months ago

EastRane commented 8 months ago

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: