Skip to content
Contractsv1.18.2

Edit contracts mid-rotation

This isn’t as much of a guide as it is information about what to expect when you edit a contract while it is already in an active category rotation. The short answer is: in most cases, this is not a problem and the plugin will handle this gracefully. That being said, there are a couple of things to keep in mind depending on the state of a player’s contract progress when the edit takes effect.

Edits do not reach live players the instant you save. They apply on the next data reload (a plugin reload or server restart). At that point every player’s saved progress on the contract is re-evaluated against the new version and quietly (sometimes loudly) repaired so it stays consistent. Two rules govern that repair:

  1. Completed contracts are frozen. Once a player completes a contract, its rewards are already in their Contracts inventory, so nothing you change can take it back or ask more of them. If your edit adds requirements, their progress is auto-satisfied to match, so a completed contract stays completed. The same goes for a completed objective that put its own rewards in.
  2. Everything else is re-evaluated. Progress on an in-progress contract, and on completed objectives without rewards, can go up, down, complete, or un-complete to line up with the new objectives and amounts.
  3. Not-yet-accepted contracts are unaffected. If a player has not accepted the contract yet, there is no saved progress to reconcile, so your edit simply applies.

The columns are the player’s state on that contract when the reload happens. An objective or contract that completes because of the edit puts its rewards in the Contracts inventory like any other completion.

Edit In progress Completed or claimed
Add objective New objective starts at 0 (if amount-based), the player must complete it too, and the contract stays in progress New objective is auto-filled to its required amount and completed, so the contract stays as it was
Remove objective Its progress is dropped. If it was the last incomplete objective, the contract auto-completes and the player is notified Its progress is dropped and the contract stays as it was
Increase amount More to do, still in progress. An objective already completed stays completed if it put rewards in, and goes back to in progress if it had none Progress is bumped up to the new amount and the contract stays as it was
Decrease amount If the player is already at or above the new amount, the objective auto-completes and may complete the contract Stays as it was

Rewards already in a Contracts inventory keep the values they had when they went in, so editing a contract’s rewards only changes what future completions get.