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

Fix Gamedig command for Minecraft servers #4725

Closed

Conversation

codingWithJimmy
Copy link
Contributor

@codingWithJimmy codingWithJimmy commented Dec 31, 2024

Description

The current iteration of this command always produces a value of 0 when running it on Minecraft servers. Not sure if there was an issue with Gamedig on a previous version but that matter seems to be resolved with the version I am using which is 5.1.4. This request simply removes the 'if' statement related to Minecraft servers so it can use the same command as all the other servers.

Fixes #4724

Type of change

  • Bug fix (a change which fixes an issue).
  • New feature (a change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Comment update (typo, spelling, explanation, examples, etc).

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue.
  • This pull request uses the develop branch as its base.
  • This pull request subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have checked that this code is commented where required.
  • I have provided a detailed enough description of this PR.
  • I have checked if documentation needs updating.

Documentation

If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.

Thank you for your Pull Request!

codingWithJimmy and others added 13 commits April 12, 2020 23:23
Command to output the results for player count was looking at the wrong object in the tree. This change corrects it to the right objects.
Update to include bot count in monitor output from Gamedig.
Fixed issue where messages from different actions weren't logging correctly due to using the wrong variable in when crafting the log message
Commit changes made after pull change submiited.
The current implementation doesn't use the full file path to determine the existence of the backup directory in relation to the server which means the current stats just looks for the "lgsm/backup" directory. That may work if you're already in the root directory for the server but if you're scripting the backups via cron, you're not likely going to be invoking the backup from the root directory.
Reworked the jq flags to produce a count of players based on the length of the original JSON key used. However, I've found that while things like TF2 will produce the proper value, the Minecraft plugin will have an extra user online that is empty. See example below:

"players": [
    {
      "id": "81eeda65-9002-4f0d-9d3f-b4872e2a2042",
      "name": "iamjack1221"
    },
    {}
  ]
- Re-worked if statement for Minecraft servers to not subtract 1 from the length of the player count.
@dgibbs64 dgibbs64 added this to the v24.4.0 milestone Jan 4, 2025
@dgibbs64
Copy link
Member

dgibbs64 commented Jan 4, 2025

The brach you are raiseing with is very different from the current version of LinuxGSM

@dgibbs64
Copy link
Member

dgibbs64 commented Jan 4, 2025

the functions directory was moved to modules a very long time ago. You will need to pull the latest develop branch and re raise this PR

@codingWithJimmy codingWithJimmy closed this by deleting the head repository Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants