Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bid auction problem with offline player. #173

Closed
2 of 3 tasks
EncryptSL opened this issue Apr 5, 2024 · 1 comment
Closed
2 of 3 tasks

Bid auction problem with offline player. #173

EncryptSL opened this issue Apr 5, 2024 · 1 comment
Assignees
Labels
resolution: fixed Issue has been resolved. type: bug Something doesn't work as it was intended to.

Comments

@EncryptSL
Copy link

Spark link

No response

Server Version

1.20.4

Server Platform

Purpur

Describe the bug

CrazyAuctions try call winner of auction but when he is unlogged from server, items from seller is expired and not added to winner.

Crate Type

None

Steps to reproduce

  1. Added item to bid auction from first account.
  2. Bid to item from second account / winner leave server.
  3. Wait to time left.
  4. After when time is left is not added to winner.

Additional context

CrazyAuction have in if statement, getBalance but with static function getPlayer() excepted online player on server, Plugin with Economy return 0.0 balance because player is null, when player leave server.

if (data.getBoolean("Items." + i + ".Biddable") && !data.getString("Items." + i + ".TopBidder").equalsIgnoreCase("None") && plugin.getSupport().getMoney(getPlayer(data.getString("Items." + i + ".TopBidder"))) >= data.getInt("Items." + i + ".Price")) {
    public static Player getPlayer(String name) {
        try {
            return Bukkit.getServer().getPlayer(name);
        } catch (Exception e) {
            return null;
        }
    }

Related to this issue: EncryptSL/LiteEco#80

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
  • I ticked all the boxes without actually reading them
  • My version of Minecraft is supported by CrazyCrew.
@ryderbelserion
Copy link
Member

Fixed in newer versions since we no longer use player names for data

@ryderbelserion ryderbelserion added resolution: fixed Issue has been resolved. type: bug Something doesn't work as it was intended to. labels Nov 18, 2024
@ryderbelserion ryderbelserion changed the title [Bug Report]: Bid auction problem with offline player. Bid auction problem with offline player. Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Issue has been resolved. type: bug Something doesn't work as it was intended to.
Development

No branches or pull requests

2 participants