-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213 from sakurawald/dev
bump: v5.0.0
- Loading branch information
Showing
59 changed files
with
470 additions
and
174 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
> The version number of fuji follows `semver` now: https://semver.org/ | ||
> The version number of fuji follows `semver` now: https://semver.org/ | ||
- feature: add `on_warped` event for warps. (command_toolbox.warp module) | ||
- fix: possible to trigger `Not a JSON Object: null` when a new fake-player is spawned via `carpet` mod. (placeholder module) | ||
- fix: can't display a specific type of block entity properly, e.g. beds, banners etc. (chunks module) | ||
- refactor: cleanup unused functions in core, rename and simplify symbols in core. | ||
> This version includes the following **breaking changes** if you are using them: | ||
> - feature: add `others` literal arguments to most commands that only targeted at command source player in the past, | ||
now allows to use `others` argument to apply the command to a collection of players. This influence the following | ||
commands (**If you are using `command_permission module` with `apply-sponge-implicit-wildcard=false` | ||
in `luckperms.conf`, then everything is fine. If the option is true, then be careful that the `wildcard permission` | ||
may allow players to use the following commands with `others` option.**): | ||
> - all functional commands. | ||
> - most of the commands in `command_toolbox` | ||
> - /afk, /back, /chat style, /pvp, /rtp | ||
> - The command option `/tppos --targetPlayer ...` is replaced by `/tppos others ...`. (command_toolbox.tppos module) | ||
> - make the default required level permission to 4: /heal, /ping, /extinguish, /near (command_toolbox.* module) | ||
> - make the default required level permission to 4: all functional commands. (functional module) |
This file contains 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 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 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 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 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
Binary file not shown.
This file contains 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
8 changes: 8 additions & 0 deletions
8
src/main/java/io/github/sakurawald/core/command/annotation/CommandTarget.java
This file contains 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,8 @@ | ||
package io.github.sakurawald.core.command.annotation; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface CommandTarget { | ||
} |
35 changes: 35 additions & 0 deletions
35
...ub/sakurawald/core/command/argument/adapter/impl/PlayerCollectionArgumentTypeAdapter.java
This file contains 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,35 @@ | ||
package io.github.sakurawald.core.command.argument.adapter.impl; | ||
|
||
import com.mojang.brigadier.arguments.ArgumentType; | ||
import com.mojang.brigadier.context.CommandContext; | ||
import io.github.sakurawald.core.command.argument.adapter.abst.BaseArgumentTypeAdapter; | ||
import io.github.sakurawald.core.command.argument.structure.Argument; | ||
import io.github.sakurawald.core.command.argument.wrapper.impl.PlayerCollection; | ||
import lombok.SneakyThrows; | ||
import net.minecraft.command.argument.EntityArgumentType; | ||
import net.minecraft.server.command.ServerCommandSource; | ||
|
||
import java.util.List; | ||
|
||
public class PlayerCollectionArgumentTypeAdapter extends BaseArgumentTypeAdapter { | ||
@Override | ||
protected ArgumentType<?> makeArgumentType() { | ||
return EntityArgumentType.players(); | ||
} | ||
|
||
@SneakyThrows | ||
@Override | ||
protected Object makeArgumentObject(CommandContext<ServerCommandSource> context, Argument argument) { | ||
return new PlayerCollection(EntityArgumentType.getPlayers(context, argument.getArgumentName())); | ||
} | ||
|
||
@Override | ||
public List<Class<?>> getTypeClasses() { | ||
return List.of(PlayerCollection.class); | ||
} | ||
|
||
@Override | ||
public List<String> getTypeStrings() { | ||
return List.of("players", "player-list"); | ||
} | ||
} |
This file contains 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
12 changes: 12 additions & 0 deletions
12
src/main/java/io/github/sakurawald/core/command/argument/wrapper/impl/PlayerCollection.java
This file contains 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,12 @@ | ||
package io.github.sakurawald.core.command.argument.wrapper.impl; | ||
|
||
import io.github.sakurawald.core.command.argument.wrapper.abst.SingularValue; | ||
import net.minecraft.server.network.ServerPlayerEntity; | ||
|
||
import java.util.Collection; | ||
|
||
public class PlayerCollection extends SingularValue<Collection<ServerPlayerEntity>> { | ||
public PlayerCollection(Collection<ServerPlayerEntity> value) { | ||
super(value); | ||
} | ||
} |
Oops, something went wrong.