-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
YufiriaMazenta
committed
Jun 15, 2024
1 parent
9da83ea
commit 3492ec7
Showing
5 changed files
with
30 additions
and
9 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,5 +1,5 @@ | ||
import java.text.SimpleDateFormat | ||
version = "1.10.0-dev1" | ||
version = "1.10.0" | ||
|
||
plugins { | ||
`java-library` | ||
|
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
20 changes: 20 additions & 0 deletions
20
src/main/java/com/github/yufiriamazenta/craftorithm/util/RecipeUtil.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,20 @@ | ||
package com.github.yufiriamazenta.craftorithm.util; | ||
|
||
import crypticlib.CrypticLib; | ||
import crypticlib.platform.IPlatform; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.inventory.Recipe; | ||
|
||
public class RecipeUtil { | ||
|
||
public static void regRecipe(Recipe recipe) { | ||
if (CrypticLib.platform().platform().equals(IPlatform.Platform.BUKKIT)) { | ||
//当不是Paper端时,使用Bukkit的注册方法 | ||
Bukkit.addRecipe(recipe); | ||
} else { | ||
//当是Paper及其衍生端时,使用会刷新配方的方法注册 | ||
Bukkit.addRecipe(recipe, true); | ||
} | ||
} | ||
|
||
} |