Skip to content

Commit

Permalink
Merge pull request #16 from freeserverproject/dev
Browse files Browse the repository at this point in the history
1.20への対応
  • Loading branch information
Alpha9n authored Oct 14, 2024
2 parents 7b60bf6 + bb6c5c3 commit 20d3f53
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 15 deletions.
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

0 comments on commit 20d3f53

Please sign in to comment.