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

1.20への対応 #16

Merged
merged 15 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ name: Java CI with Maven

on:
push:
branches: [ "main" ]
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "dev" ]

jobs:
build:
Expand Down
13 changes: 13 additions & 0 deletions CraftSupporter.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="minecraft" name="Minecraft">
<configuration>
<autoDetectTypes>
<platformType>PAPER</platformType>
</autoDetectTypes>
<projectReimportVersion>1</projectReimportVersion>
</configuration>
</facet>
</component>
</module>
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

<groupId>pro.freeserver.plugin.alphakun</groupId>
<artifactId>CraftSupporter</artifactId>
<version>2.0.4-dev</version>
<version>2.0.5-release</version>
<packaging>jar</packaging>

<name>CraftSupporter</name>

<description>craftsupporter</description>
<description>craft supporter</description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.7.21</kotlin.version>
<kotlin.version>1.9.0</kotlin.version>
</properties>
<url>https://freeserver.pro</url>

Expand Down Expand Up @@ -110,7 +110,7 @@
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.18.2-R0.1-SNAPSHOT</version>
<version>1.21.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
package pro.freeserver.plugin.alphakun.craftsupporter

import org.bukkit.Bukkit.recipeIterator
import org.bukkit.Material
import org.bukkit.NamespacedKey
import org.bukkit.inventory.ItemStack
import org.bukkit.inventory.Recipe
import org.bukkit.inventory.ShapedRecipe
import org.bukkit.plugin.java.JavaPlugin
import pro.freeserver.plugin.alphakun.craftsupporter.init.LoadRecipe

Expand All @@ -30,7 +25,7 @@ class CraftSupporter : JavaPlugin() {
private fun removeRecipe() {
for (r in recipes) {
if (server.removeRecipe(r)) {
println("Recipe: " + r.key + "is now removed!!")
println("Recipe: ${r.key} is now removed!!")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class Racipe(recipeName: String, itemName: String?, material: String?, amount: I
// エンチャントを整形
if (enchant != null) {
for (e in enchant) {
var enchantRawList = e.split(":")
var enchantName = enchantRawList[0]
val enchantRawList = e.split(":")
val enchantName = enchantRawList[0]
var enchantLevel = 0
try {
enchantLevel = enchantRawList[1].toInt()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package pro.freeserver.plugin.alphakun.craftsupporter.utils

import net.kyori.adventure.text.Component

object ComponentUtil {
fun toComponent(value: String): Component {
return Component.text(value)
}
}
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CraftSupporter
version: '${project.version}'
main: pro.freeserver.plugin.alphakun.craftsupporter.CraftSupporter
api-version: 1.18
api-version: 1.20
authors: [ alpha9n ]
description: craftsupporter
website: https://freeserver.pro
Loading