-
-
Notifications
You must be signed in to change notification settings - Fork 20
GH-971 Migrate jail feature from Position to Location with LocationPersister. Rename config section. #1141
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
Open
igoyek
wants to merge
18
commits into
master
Choose a base branch
from
jail-system-refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+667
−443
Open
GH-971 Migrate jail feature from Position to Location with LocationPersister. Rename config section. #1141
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4a1734c
Add jail command restriction type and refactor config
igoyek ad0b8c2
The prison system has been improved
igoyek 656b7be
Refactor jail release logic and update config comments
igoyek 5bf5d52
Need tests
igoyek 526e344
detainPrivate -> detained
Jakubk15 67c0735
Refactor jail feature to use Bukkit Location
igoyek ef0a5cb
Location -> Position refactor
igoyek c3bb59a
Remove PositionArgument and related messages
igoyek d640f4c
Ensure home location uses sender's world and orientation
igoyek e09ca18
Refactor jail section migration and improve Position handling
igoyek 6c38f6f
Remove unused import
igoyek c2768cc
Follow instructions
igoyek 5a76360
Merge branch 'master' into jail-system-refactor
igoyek 9015129
Merge branch 'master' into jail-system-refactor
vLuckyyy b88917d
Merge.
vLuckyyy 5da106e
Remove useless migration.
vLuckyyy feb4c9e
Revert not-related to issue changes.
vLuckyyy e31948e
Review.
vLuckyyy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...e/configuration/migrations/Migration_0009_Rename_allowed_to_restricted_jail_commands.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package com.eternalcode.core.configuration.migrations; | ||
|
|
||
| import static eu.okaeri.configs.migrate.ConfigMigrationDsl.move; | ||
| import eu.okaeri.configs.migrate.builtin.NamedMigration; | ||
|
|
||
| class Migration_0009_Rename_allowed_to_restricted_jail_commands extends NamedMigration { | ||
|
|
||
| Migration_0009_Rename_allowed_to_restricted_jail_commands() { | ||
| super("Rename allowed to restricted jail commands", | ||
| move("jail.allowedCommands", "jail.restrictedCommands") | ||
igoyek marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ); | ||
| } | ||
| } | ||
37 changes: 37 additions & 0 deletions
37
...rnalcode/core/configuration/migrations/Migration_0010_Move_jail_to_dedicated_section.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| package com.eternalcode.core.configuration.migrations; | ||
|
|
||
| import static eu.okaeri.configs.migrate.ConfigMigrationDsl.move; | ||
|
|
||
| import eu.okaeri.configs.migrate.builtin.NamedMigration; | ||
|
|
||
| public class Migration_0010_Move_jail_to_dedicated_section extends NamedMigration { | ||
igoyek marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Migration_0010_Move_jail_to_dedicated_section() { | ||
| super( | ||
| "Move jail to dedicated section", | ||
|
|
||
| move("jailSection.jailLocationSet", "jail.locationSet"), | ||
| move("jailSection.jailLocationRemove", "jail.locationRemove"), | ||
| move("jailSection.jailLocationNotSet", "jail.locationNotSet"), | ||
| move("jailSection.jailLocationOverride", "jail.locationOverride"), | ||
|
|
||
| move("jailSection.jailDetainBroadcast", "jail.detainBroadcast"), | ||
| move("jailSection.jailDetainPrivate", "jail.detained"), | ||
| move("jailSection.jailDetainCountdown", "jail.detainCountdown"), | ||
| move("jailSection.jailDetainOverride", "jail.detainOverride"), | ||
| move("jailSection.jailDetainAdmin", "jail.detainAdmin"), | ||
|
|
||
| move("jailSection.jailReleaseBroadcast", "jail.releaseBroadcast"), | ||
| move("jailSection.jailReleasePrivate", "jail.released"), | ||
| move("jailSection.jailReleaseAll", "jail.releaseAll"), | ||
| move("jailSection.jailReleaseNoPlayers", "jail.releaseNoPlayers"), | ||
| move("jailSection.jailIsNotPrisoner", "jail.isNotPrisoner"), | ||
|
|
||
| move("jailSection.jailListHeader", "jail.listHeader"), | ||
| move("jailSection.jailListEmpty", "jail.listEmpty"), | ||
| move("jailSection.jailListPlayerEntry", "jail.listPlayerEntry"), | ||
|
|
||
| move("jailSection.jailCannotUseCommand", "jail.cannotUseCommand") | ||
| ); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...core-core/src/main/java/com/eternalcode/core/feature/jail/JailCommandRestrictionType.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| package com.eternalcode.core.feature.jail; | ||
|
|
||
| public enum JailCommandRestrictionType { | ||
| WHITELIST, | ||
| BLACKLIST | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Position usage in API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trochę słabo będzie wystawiać API które jest relokowane