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

Claims lose owner data on server restart #217

Closed
codeHusky opened this issue Oct 2, 2021 · 12 comments
Closed

Claims lose owner data on server restart #217

codeHusky opened this issue Oct 2, 2021 · 12 comments

Comments

@codeHusky
Copy link

codeHusky commented Oct 2, 2021

Versions
Spigot Version: Airplane version git-Airplane-87 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: 002f470 on HEAD)
ClaimChunk Version: 0.0.23-prev13

Describe the bug
After restarting the server with useDatabase: true and properly configured with no errors, player claims will fail to load properly until the relevant player logs in again. This prevents people the owner has trusted to access the claim being unable to access the claim.

To Reproduce
Steps to reproduce the behavior:

  1. Create a claim in a server with useDatabase enabled
  2. Restart server
  3. Check if claim has owner data by right clicking a block

Expected behavior
Data about the claim is held and players are notified of the owner's name. Players who have been granted access to the claim remain having access to the claim.

Additional context
Full config:

# Config generated for ClaimChunk version 0.0.23-prev13
# For more information about all these options, please visit the wiki page:
# https://github.com/cjburkey01/ClaimChunk/wiki/Configuration-File

basic:
  disablePermissions: false
  checkForUpdates: true
log:
  debugSpam: false
  anonymousMetrics: true
  debug: false
titles:
  useTitlesInsteadOfChat: true
  useActionBar: true
  titleFadeInTime: 20
  titleStayTime: 140
  titleFadeOutTime: 20
colors:
  infoColor: GREEN
  errorColor: RED
chunks:
  maxChunksClaimed: 25
  particlesWhenClaiming: true
  hideAlertsForVanishedPlayers: true
  automaticUnclaimSeconds: -1
  unclaimCheckIntervalTicks: 1200
  displayNameOfOwner: true
  defaultSendAlertsToOwner: true
  maxPerListPage: 5
  disabledWorlds: []
protection:
  blockedCmds: []
  disableOfflineProtect: false
worldguard:
  allowClaimsInRegionsByDefault: false
  allowClaimingInNonGuardedWorlds: true
  allowAdminOverride: true
economy:
  useEconomy: false
  claimPrice: 100.0
  unclaimReward: 10.0
  firstFreeChunks: 0
data:
  keepJsonBackups: true
  saveDataIntervalInMinutes: 10
  minBackupIntervalInMinutes: 120
  deleteOldBackupsAfterMinutes: 10080
database:
  useDatabase: true
  groupRequests: true
  convertOldData: true
  hostname: localhost
  port: 3306
  database: minecraft
  username: <removed>
  password: <removed>
  printDebug: false
  useSsl: false
  allowPublicKeyRetrieval: false
chunkOutline:
  name: SMOKE_LARGE
  durationSeconds: 5
  spawnsPerSecond: 2
  particlesPerSpawn: 2
  heightRadius: 3
floodclaim:
  enabled: true
  maximumIterations: 6
  maximumArea: 41
@codeHusky
Copy link
Author

Should note that it seems that access data is getting completely wiped on reboots

@cjburkey01
Copy link
Owner

well that's not good lol, i do plan on removing mysql support in the near future because claimchunk makes no more efficient use of it and it ends up being slower >50% of the time probably, would you be able to switch back to the default data handler?

@codeHusky
Copy link
Author

@cjburkey01 is there a clean way to transition all the data? this is on a live server with 500+ players

@cjburkey01
Copy link
Owner

Dang it i wish there was, i didn't realize the conversion code only goes one way by default, I need to make a new build that pulls down from SQL automatically. Once i get home tonight i can make a custom build that does it automatically for you

@cjburkey01
Copy link
Owner

cjburkey01 commented Oct 3, 2021

Ok, temporary solution is to download this version, run it once, and see if it created and filled your claimedChunks.json and joinedPlayers.json file?

If that works, go ahead and reinstall the version you have now and set useDatabase to false

claimchunk-0.0.23-prev13-CONV_DB_TO_JSON-plugin.jar.zip

@codeHusky
Copy link
Author

codeHusky commented Oct 3, 2021

edit: had to manually fix version (you broke semver with that long string) and then did /chunk admin reload and it saved the file. looks like claims are fixed when using flat file. would strongly suggest just nuking that option for now entirely from the dev releases. great plugin otherwise, plan on extending on it for the server soon.

@cjburkey01
Copy link
Owner

ah cool, yeah need to remove that. once you fixed the version string did the conversion work as intended?

@codeHusky
Copy link
Author

@cjburkey01 yes but i had to do /chunk admin reload cause it didnt occur on reboot automatically for whatever reason

@cjburkey01
Copy link
Owner

that's another thing that needs to be disabled (or fixed), the reload command isn't very stable at the moment. as for why it needed a reload, I'm not entirely sure, but the instability is caused by reloading working exactly as unloading and loading the plugin again, did you fully stop your server before modifying everything? that's the only thing i can even think of as to why but idk

@codeHusky
Copy link
Author

@cjburkey01 yes it was fully stopped

@cjburkey01
Copy link
Owner

definitely odd, hopefully before 0.0.23 i have most of these quirks worked out

@cjburkey01
Copy link
Owner

Closing for more specific issue: #230

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

No branches or pull requests

2 participants