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 {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
// withJavadocJar()
withSourcesJar()
}

View File

@@ -42,10 +42,11 @@ public class LoreCustomModelDataCommand extends ChildCommand {
@SuppressWarnings("deprecation")
@Override
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);
return true;
}
Player player = (Player) sender;
ItemStack stack = player.getItemInHand();
if (BukkitUtils.isEmptyItemStack(stack)) {
CoreMessage.COMMAND_LORE_HAND_EMPTY.show(player);

View File

@@ -169,7 +169,8 @@ public class ButtonGroup {
@Override
public boolean equals(Object o) {
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);
}

View File

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