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

ACF Command rework - Done! #2514

Closed
wants to merge 184 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
f41337f
Bumped version to 5.0.0-SNAPSHOT for development of next major version.
dumptruckman Oct 8, 2020
d8ff083
First test implementation of ACF
benwoo1110 Dec 13, 2020
15810c9
More ACF testing, add queue manager.
benwoo1110 Dec 15, 2020
1cda2a1
Add queue object to main class.
benwoo1110 Dec 15, 2020
9cda655
Queue command works!
benwoo1110 Dec 15, 2020
df3c957
Amazing progress!!
benwoo1110 Dec 15, 2020
6f12290
Cleannnn command classes.
benwoo1110 Dec 15, 2020
5483988
Implement optional argument properly
benwoo1110 Dec 16, 2020
d494017
Add remove command.
benwoo1110 Dec 16, 2020
c8d1aa4
Add gamerules, list and script.
benwoo1110 Dec 17, 2020
07bfa44
Add some static command completetion for enums.
benwoo1110 Dec 17, 2020
7493ce5
Add world folder suggestion and validation.
benwoo1110 Dec 17, 2020
a77ad6d
Clean up.
benwoo1110 Dec 17, 2020
5413b92
Add gamerule command and mics cleanup.
benwoo1110 Dec 17, 2020
391ba7b
Add generator command.
benwoo1110 Dec 17, 2020
23ed7cb
Update todo.
benwoo1110 Dec 17, 2020
519e449
Add clone command and some more cleanup.
benwoo1110 Dec 18, 2020
e518ea4
Add import command and improve world folder checking.
benwoo1110 Dec 18, 2020
ad40cae
Purpose build class for command manager that extends ACF.
benwoo1110 Dec 18, 2020
1b65a91
Make MultiverseCommandAbstract
benwoo1110 Dec 18, 2020
0641099
Add check command and improve world related validation.
benwoo1110 Dec 18, 2020
3809f47
Merge the 2 gamerule command class.
benwoo1110 Dec 18, 2020
e4f0432
Add environment and regen commands.
benwoo1110 Dec 18, 2020
5709278
Add teleport command.
benwoo1110 Dec 18, 2020
bb92aa5
Add silent command and some clean up.
benwoo1110 Dec 18, 2020
da6d6d6
Add purge command.
benwoo1110 Dec 18, 2020
7b2a14c
Add set spawn command.
benwoo1110 Dec 19, 2020
28304ba
Fix teleport and set spawn command.
benwoo1110 Dec 19, 2020
4b4474b
Add modify command.
benwoo1110 Dec 19, 2020
fbe0138
Some cleanup.
benwoo1110 Dec 19, 2020
2324157
Add modify list command.
benwoo1110 Dec 19, 2020
52c210f
Add NONE PasteServiceType
benwoo1110 Dec 19, 2020
dce2cf5
Add version command.
benwoo1110 Dec 19, 2020
c6baeea
Minor cleanup to version command.
benwoo1110 Dec 20, 2020
c0b36fe
Add bed command
benwoo1110 Dec 20, 2020
5324691
Add .dat worldname validation.
benwoo1110 Dec 20, 2020
42f0965
Cleanup to various commands.
benwoo1110 Dec 20, 2020
14fc5c8
Add special case for mv modify set spawn.
benwoo1110 Dec 20, 2020
45e7db7
Remove unneeded code from old queue command handling.
benwoo1110 Dec 20, 2020
4720bfe
Cleanup plugins.yml
benwoo1110 Dec 20, 2020
013c39f
Update config.yml comments with new command syntax.
benwoo1110 Dec 20, 2020
1302a1e
Fix debug lavel parsing.
benwoo1110 Dec 20, 2020
3ca9de6
Add teleport permission checking support.
benwoo1110 Dec 20, 2020
8e00ba1
Change MVConfig suggection to static
benwoo1110 Dec 20, 2020
a66e804
re-enable tests (still failing)
nicegamer7 Dec 20, 2020
94c8189
Merge branch 'acf-test' of https://github.com/Multiverse/Multiverse-C…
benwoo1110 Dec 20, 2020
65c332f
Add desination identifier tab completion.
benwoo1110 Dec 20, 2020
ff5f9e0
Improve world validation and command completion.
benwoo1110 Dec 20, 2020
b6fbcf9
Fix .dat world folder checking.
benwoo1110 Dec 20, 2020
096bcde
Fix NPE with string arguments, and some cleanup.
benwoo1110 Dec 20, 2020
f99d083
Add mvspawn alias comand.
benwoo1110 Dec 20, 2020
a7921a9
Add anchor commands.
benwoo1110 Dec 20, 2020
5f37bb6
Some cleanup and add Optional String.
benwoo1110 Dec 21, 2020
408a66c
Add who command.
benwoo1110 Dec 21, 2020
56b881d
Add showing of available types on invalid input, and some cleanup.
benwoo1110 Dec 21, 2020
620203f
Add custom prompt for confirm commands.
benwoo1110 Dec 21, 2020
a783f77
Implement basic PageDisplay class.
benwoo1110 Dec 21, 2020
a05d458
Optimise some streams.
benwoo1110 Dec 21, 2020
a76c613
Implement paged list command.
benwoo1110 Dec 21, 2020
904e29e
Implement paged info command with fancy colour.
benwoo1110 Dec 21, 2020
8292af8
Adds world UID and generator details to /mvinfo command.
benwoo1110 Dec 21, 2020
305cf50
Add page filters and improve anchor list command.
benwoo1110 Dec 21, 2020
026dd2f
Ensure that version config option cannot be modifed.
benwoo1110 Dec 21, 2020
0c61dff
Implement changing of gamerules.
benwoo1110 Dec 21, 2020
dcadf23
Clean up and remove all old command files.
benwoo1110 Dec 21, 2020
052194c
Add proper license message to files.
benwoo1110 Dec 21, 2020
5fad1e0
fix unit tests
nicegamer7 Dec 21, 2020
b6a784d
fix some typos/consistency errors
nicegamer7 Dec 21, 2020
10c1040
bump version to 5.0.0
benwoo1110 Dec 22, 2020
b0c4d72
Improve gamemode command, and some cleanup.
benwoo1110 Dec 22, 2020
29dcef5
Allow for option to have AND permission checking.
benwoo1110 Dec 22, 2020
b953f1a
Add mvp base command to plugin.yml
benwoo1110 Dec 22, 2020
cee6f68
Add toggles completion and remove need for onlyself flag.
benwoo1110 Dec 22, 2020
4b45779
Add mv modules base commands to plugins.yml.
benwoo1110 Dec 22, 2020
b0cbd5b
Add ability to have optional MultiverseWorld.
benwoo1110 Dec 22, 2020
e4a6e8a
All command block should share the same queue.
benwoo1110 Dec 23, 2020
20b492f
Add root command to show plugin info.
benwoo1110 Dec 23, 2020
b5b9e19
Add suggestDownload method.
benwoo1110 Dec 23, 2020
611af12
Add tab complete for location.
benwoo1110 Dec 26, 2020
538cdb1
Fix gamerule tabe complete.
benwoo1110 Dec 26, 2020
3e1d3e7
Parse world flags in command execution itself.
benwoo1110 Dec 26, 2020
2dedffa
Improve potential world tab complete.
benwoo1110 Dec 26, 2020
8304e7a
Improvae coord command with Context.
benwoo1110 Dec 26, 2020
31494e2
Update todos.
benwoo1110 Dec 26, 2020
17d5313
Config command show properties and values that were updated.
benwoo1110 Dec 26, 2020
5efcda3
Update todos. (again)
benwoo1110 Dec 26, 2020
ee2e7d3
Show player name when viewing others coord.
benwoo1110 Dec 26, 2020
39e4b5c
Command player now stores mvworld as well.
benwoo1110 Dec 26, 2020
8c18caf
Rename CommandPlayer to PlayerWorld.
benwoo1110 Dec 26, 2020
90937d6
Whoops ;D
benwoo1110 Dec 26, 2020
793bbe3
Add api to getAllPropertyTypes.
benwoo1110 Dec 26, 2020
7198a5a
Update modify command with SET tab complete.
benwoo1110 Dec 26, 2020
ff54983
show the property values for mvm list command.
benwoo1110 Dec 26, 2020
114400e
Remove unnecessary logging.
benwoo1110 Dec 27, 2020
44cbdc3
Improve help command with better formatting.
benwoo1110 Dec 27, 2020
cf05044
Remove mvm alias.
benwoo1110 Dec 27, 2020
455b04c
Add param syntax and description to all command.
benwoo1110 Dec 27, 2020
6b47164
Add missing description for who command.
benwoo1110 Dec 27, 2020
8f99d2c
Fix modify command.
benwoo1110 Dec 27, 2020
22afd09
Add tab complete for scripts.
benwoo1110 Dec 27, 2020
e88828f
Add playerOnly flag to tab-complete suggestions.
benwoo1110 Dec 27, 2020
fc6415a
Cleanup some tab-completes.
benwoo1110 Dec 28, 2020
e9ec127
Split location into individual params for better tab complete.
benwoo1110 Dec 28, 2020
161478f
Update AND permission checking key.
benwoo1110 Dec 28, 2020
fee822a
Add download suggestion for submodules.
benwoo1110 Dec 28, 2020
81f6014
Add DestinationFactory#getPlayerAwareDestination to parse cannon dest.
benwoo1110 Dec 28, 2020
942f8a9
Refactored PageFisplay to make it more expandable.
benwoo1110 Dec 30, 2020
3f8e514
Futher absract content display to add KeyValueDisplay.
benwoo1110 Dec 30, 2020
c8432b9
Use KeyValueDisplay to show gamerules.
benwoo1110 Dec 30, 2020
ef073b0
Add ContentFilter to commands, and some cleanup.
benwoo1110 Dec 30, 2020
3962f23
Fix wrong selfOtherPerm checking.
benwoo1110 Dec 30, 2020
6771bb6
Improve download suggestion.
benwoo1110 Dec 30, 2020
36e0d34
Add player name as destination.
benwoo1110 Dec 30, 2020
d0f6434
Merge branch 'main' into acf-test
benwoo1110 Dec 31, 2020
b3517ad
getCommandCompletions returns MVCommandCompletions directly.
benwoo1110 Dec 31, 2020
3b9f184
Cleanup display package and add docs.
benwoo1110 Dec 31, 2020
d0c2805
Cleanup command queue classes and add docs.
benwoo1110 Dec 31, 2020
95cce25
Add package info and more cleanup.
benwoo1110 Dec 31, 2020
1ffa1ec
Add docs to contexts and display. More cleanup.
benwoo1110 Dec 31, 2020
04802f2
Remove useless logging.
benwoo1110 Dec 31, 2020
808c4ce
Add docs and minor cleanup.
benwoo1110 Dec 31, 2020
7b3e6ee
Cleanup across the board.
benwoo1110 Dec 31, 2020
ebe420b
Better error handling for getting generator.
benwoo1110 Jan 1, 2021
fd5e948
Move to use string formatting and some cleanup.
benwoo1110 Jan 1, 2021
21d775d
Fix tests and typos from previous messaging change.
benwoo1110 Jan 1, 2021
942555f
Fix a message typo.
benwoo1110 Jan 1, 2021
9dd9444
Refactor inline display classes,
benwoo1110 Jan 2, 2021
cd5a4c6
Cleanup modify command, and use KeyValueDisplay for properties.
benwoo1110 Jan 2, 2021
b73a4e5
Who command use ListDisplay.
benwoo1110 Jan 2, 2021
c874a98
Minor cleanup to modify command.
benwoo1110 Jan 2, 2021
73d1035
Fix hasContentToShow checking.
benwoo1110 Jan 2, 2021
54a2e27
Add package info.
benwoo1110 Jan 2, 2021
fd10eec
Minor no player message colour change.
benwoo1110 Jan 2, 2021
e1dc90b
Improve Condition and context check and messaging.
benwoo1110 Jan 2, 2021
6987208
Revamp ContentDisplay with builder.
benwoo1110 Jan 2, 2021
cdfe317
Add ability to have custom empty message, and mroe cleanup.
benwoo1110 Jan 2, 2021
e7bcdbe
Fix null filter string context parsing.
benwoo1110 Jan 2, 2021
617b0b5
Add displaying of filter for ShowInline.
benwoo1110 Jan 2, 2021
6e7328a
Allow null player for getPlayerAwareDestination.
benwoo1110 Jan 2, 2021
bfffc8c
Fix pageOutOfRange checking.
benwoo1110 Jan 2, 2021
c9cf25c
Generator command use ListDisplay.
benwoo1110 Jan 2, 2021
8ec08fd
Fix ShowKeyValue not displaying anything.
benwoo1110 Jan 3, 2021
16878f0
Update messaging and docs.
benwoo1110 Jan 3, 2021
e90f1bb
Update who command to use content filter.
benwoo1110 Jan 3, 2021
6b7089e
Custom prefix and suffix for InlineDisplay.
benwoo1110 Jan 3, 2021
0f23dee
whoall command use ListDisplay.
benwoo1110 Jan 3, 2021
cde7ab9
empty message shouldnt show prefix by default.
benwoo1110 Jan 3, 2021
1977646
Testing getContextValue for CommandCompletions.
benwoo1110 Jan 7, 2021
2eb4ce6
Revamp world flags with tab complete.
benwoo1110 Jan 7, 2021
835ca69
Improve worldflags parsing and squashed some bugs.
benwoo1110 Jan 7, 2021
e2bf1a2
Add getAvailableWorldGenerators method to WorldManager,
benwoo1110 Jan 8, 2021
4a4a250
Make use of getAvailableWorldGenerators to reduce duplicate code.
benwoo1110 Jan 8, 2021
4a90a6a
Add configurable option for inline separator.
benwoo1110 Jan 8, 2021
e1bcff7
Split into subclass for flag for better input type checking.
benwoo1110 Jan 8, 2021
035f364
Merge branch 'main' into 5.0.0
benwoo1110 Jan 8, 2021
2c98fc7
Merge branch 'main' into 5.0.0
benwoo1110 Feb 8, 2021
2c9d2d0
Merge branch '5.0.0' into acf-test
benwoo1110 Feb 14, 2021
03d1b36
Fix merge conflicts
benwoo1110 Mar 4, 2021
b3b8a5e
Test implement new flag system.
benwoo1110 Mar 4, 2021
40b260f
Fix wrong exception thrown in DummyCommandBlockSender
benwoo1110 Mar 4, 2021
b8a0729
Apply new flag system to create, import and regen commands.
benwoo1110 Mar 4, 2021
8f25001
Implement new flag suggestion system.
benwoo1110 Mar 4, 2021
2fc6f3d
Rename commandtools package,
benwoo1110 Mar 4, 2021
55cf19b
Generate improvements througout.
benwoo1110 Mar 5, 2021
a6d4e21
Remove PlayerWorld.
benwoo1110 Mar 5, 2021
7a86227
Implement flags for version command.
benwoo1110 Mar 5, 2021
826fe08
Add documentation to flag classes,
benwoo1110 Mar 5, 2021
77faf2b
Fix gen flag not working.
benwoo1110 Mar 5, 2021
51c642b
Remove getAvailableWorldGenerators from wm.
benwoo1110 Mar 5, 2021
650f202
Rename to CoreFlags
benwoo1110 Mar 5, 2021
1f87175
Use new content display system.
benwoo1110 Mar 7, 2021
a478fac
Use my own distribution manager.
benwoo1110 Mar 7, 2021
8f4f89b
Use my own ci server.
benwoo1110 Mar 7, 2021
b7baeb4
try bump maven plugin versions.
benwoo1110 Mar 7, 2021
85aa931
why not working lol
benwoo1110 Mar 7, 2021
e80d390
Dont use https?
benwoo1110 Mar 7, 2021
e25e127
Revert back pom, networking is dumb.
benwoo1110 Mar 7, 2021
7d80b89
Improve display pagging.
benwoo1110 Mar 7, 2021
c10cd5c
Implement page break and other cleanups.
benwoo1110 Mar 7, 2021
139ddd1
Remove old display implemetations.
benwoo1110 Mar 7, 2021
198abf5
Rename some packages.
benwoo1110 Mar 7, 2021
ddcd325
Add documentation to displaytools classes.
benwoo1110 Mar 7, 2021
1c1245a
Add docs for ContentFilter class.
benwoo1110 Mar 7, 2021
74b0407
Rename to lowercase commandtools.
benwoo1110 Mar 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove PlayerWorld.
benwoo1110 committed Mar 5, 2021
commit a6d4e21b85b13299f8169de3142b84ab71d7413d
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.MultiverseCore.api.MVWorldManager;
import com.onarandombox.MultiverseCore.api.MultiverseWorld;
import com.onarandombox.MultiverseCore.commandtools.contexts.PlayerWorld;
import com.onarandombox.MultiverseCore.enums.AddProperties;
import com.onarandombox.MultiverseCore.enums.WorldValidationResult;
import org.bukkit.ChatColor;
@@ -46,7 +45,6 @@ public MVCommandConditions(@NotNull MultiverseCore plugin,
conditions.addCondition(String.class, "validWorldFolder", this::checkValidWorldFolder);
conditions.addCondition(String.class, "validAddProperty", this::checkValidAddProperty);
conditions.addCondition(MultiverseWorld.class, "hasWorldAccess", this::checkHasWorldAccess);
conditions.addCondition(PlayerWorld.class, "selfOtherPerm", this::checkSelfOtherPerm);
}

private void checkIsMVWorld(@NotNull ConditionContext<BukkitCommandIssuer> context,
@@ -195,14 +193,4 @@ private void checkHasWorldAccess(@NotNull ConditionContext<BukkitCommandIssuer>
world.getColoredWorldString(), ChatColor.RED));
}
}

private void checkSelfOtherPerm(@NotNull ConditionContext<BukkitCommandIssuer> context,
@NotNull BukkitCommandExecutionContext executionContext,
@NotNull PlayerWorld player) {

String permNode = context.getConfig() + (player.isSender(executionContext.getSender()) ? ".self" : ".other");
if (!executionContext.getSender().hasPermission(permNode)) {
throw new ConditionFailedException("You do not have permission to run this command.");
}
}
}
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@
import com.onarandombox.MultiverseCore.commandtools.contexts.RequiredPlayer;
import com.onarandombox.MultiverseCore.commandtools.contexts.GameRuleProperty;
import com.onarandombox.MultiverseCore.commandtools.contexts.PageFilter;
import com.onarandombox.MultiverseCore.commandtools.contexts.PlayerWorld;
import com.onarandombox.MultiverseCore.commandtools.display.ContentFilter;
import com.onarandombox.MultiverseCore.commandtools.display.page.PageDisplay;
import com.onarandombox.MultiverseCore.commands.EnvironmentCommand;
@@ -60,7 +59,6 @@ public MVCommandContexts(@NotNull MVCommandManager manager,
registerContext(RequiredPlayer.class, this::deriveRequiredPlayer);
registerIssuerOnlyContext(Player.class, this::derivePlayer);

registerIssuerAwareContext(PlayerWorld.class, this::derivePlayerWorld);
registerIssuerAwareContext(MultiverseWorld.class, this::deriveMultiverseWorld);
registerContext(World.Environment.class, this::deriveEnvironment);
registerIssuerAwareContext(GameRuleProperty.class, this::deriveGameRuleProperty);
@@ -90,26 +88,6 @@ private RequiredPlayer deriveRequiredPlayer(BukkitCommandExecutionContext contex
return new RequiredPlayer(player);
}

@NotNull
private PlayerWorld derivePlayerWorld(@NotNull BukkitCommandExecutionContext context) {
Player player = derivePlayer(context);
if (player == null) {
if (context.isOptional()) {
return null;
}
// Tho this should not happen as player parsing is handled by derivePlayer.
throw new InvalidCommandArgument("Invalid player name!");
}

MultiverseWorld world = getPlayerWorld(
player,
false,
String.format("Something went wrong parsing player '%s'...", player.getName())
);

return new PlayerWorld(player, world);
}

@Nullable
private MultiverseWorld deriveMultiverseWorld(@NotNull BukkitCommandExecutionContext context) {
if (!context.hasFlag("other")) {

This file was deleted.

Original file line number Diff line number Diff line change
@@ -127,7 +127,5 @@ public Boolean getDefaultValue() {
}
};

static void register(CommandFlag<?> flag) {

}
}