build: 更改至 Java8 版本

This commit is contained in:
2022-12-02 23:01:22 +08:00
parent 5bc8e3fb4c
commit c66752bf11
4 changed files with 8 additions and 4 deletions

View File

@@ -30,8 +30,8 @@ subprojects {
} }
java { java {
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_1_8
// withJavadocJar() // withJavadocJar()
withSourcesJar() withSourcesJar()
} }

View File

@@ -42,10 +42,11 @@ public class LoreCustomModelDataCommand extends ChildCommand {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Override @Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) { public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
if (!(sender instanceof Player player)) { if (!(sender instanceof Player)) {
CoreMessage.COMMAND_MUST_USED_BY_PLAYER.show(sender); CoreMessage.COMMAND_MUST_USED_BY_PLAYER.show(sender);
return true; return true;
} }
Player player = (Player) sender;
ItemStack stack = player.getItemInHand(); ItemStack stack = player.getItemInHand();
if (BukkitUtils.isEmptyItemStack(stack)) { if (BukkitUtils.isEmptyItemStack(stack)) {
CoreMessage.COMMAND_LORE_HAND_EMPTY.show(player); CoreMessage.COMMAND_LORE_HAND_EMPTY.show(player);

View File

@@ -169,7 +169,8 @@ public class ButtonGroup {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (!(o instanceof ButtonGroup that)) return false; if (o == null || getClass() != o.getClass()) return false;
ButtonGroup that = (ButtonGroup) o;
return name.equals(that.name); return name.equals(that.name);
} }

View File

@@ -11,6 +11,8 @@ graphic:
groups: groups:
default: default:
'#': "barrier" '#': "barrier"
'<': "preview"
'>': "next"
'1': "element" '1': "element"
sounds: sounds: