Skip to content

Commit

Permalink
更新一下CrypticLib版本好了
Browse files Browse the repository at this point in the history
  • Loading branch information
YufiriaMazenta committed Jan 21, 2025
1 parent 7bd705a commit f2e0934
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
crypticlibVer=1.10.5
crypticlibVer=1.10.7
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import crypticlib.command.BukkitSubcommand;
import crypticlib.command.CommandInfo;
import crypticlib.perm.PermInfo;
import crypticlib.platform.Platform;
import crypticlib.platform.IPlatform;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -64,7 +64,7 @@ public void execute(CommandSender sender, List<String> args) {

HashMap<Integer, ItemStack> failedItems = player.getInventory().addItem(itemStack);
if (!failedItems.isEmpty()) {
if (!CrypticLibBukkit.platform().type().equals(Platform.PlatformType.FOLIA)) {
if (!CrypticLibBukkit.isFolia()) {
for (ItemStack stack : failedItems.values()) {
player.getWorld().dropItem(player.getLocation(), stack);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.github.yufiriamazenta.craftorithm.listener;

import com.github.yufiriamazenta.craftorithm.Craftorithm;
import com.github.yufiriamazenta.craftorithm.item.ItemManager;
import com.github.yufiriamazenta.craftorithm.recipe.RecipeManager;
import crypticlib.CrypticLibBukkit;
import crypticlib.listener.EventListener;
import crypticlib.platform.Platform;
import org.bukkit.NamespacedKey;
import org.bukkit.block.Block;
import org.bukkit.event.EventHandler;
Expand All @@ -31,7 +29,7 @@ public enum SmeltResultRefreshHandler implements Listener {

@EventHandler
public void putFurnaceSmeltRecipeCache(FurnaceStartSmeltEvent event) {
if (!CrypticLibBukkit.platform().type().equals(Platform.PlatformType.BUKKIT)) {
if (CrypticLibBukkit.isPaper()) {
//因为Bukkit没有FurnaceSmeltEvent.getRecipe方法,如果是Paper及其下游就可以不用处理
return;
}
Expand All @@ -46,7 +44,7 @@ public void putFurnaceSmeltRecipeCache(FurnaceStartSmeltEvent event) {
@EventHandler
public void refreshSmeltResult(FurnaceSmeltEvent event) {
Recipe recipe;
if (CrypticLibBukkit.platform().type().equals(Platform.PlatformType.BUKKIT)) {
if (!CrypticLibBukkit.isPaper()) {
recipe = blockSmeltRecipeMap.get(event.getBlock());
blockSmeltRecipeMap.remove(event.getBlock());
} else {
Expand All @@ -68,7 +66,7 @@ public void refreshSmeltResult(FurnaceSmeltEvent event) {

@EventHandler
public void putBlockCookRecipeCache(CampfireStartEvent event) {
if (!CrypticLibBukkit.platform().type().equals(Platform.PlatformType.BUKKIT)) {
if (CrypticLibBukkit.isPaper()) {
//因为Bukkit没有CampfireStartEvent.getRecipe方法,如果是Paper及其下游就可以不用处理
return;
}
Expand All @@ -83,7 +81,7 @@ public void putBlockCookRecipeCache(CampfireStartEvent event) {
@EventHandler
public void refreshBlockCookResult(BlockCookEvent event) {
Recipe recipe;
if (CrypticLibBukkit.platform().type().equals(Platform.PlatformType.BUKKIT)) {
if (!CrypticLibBukkit.isPaper()) {
recipe = blockSmeltRecipeMap.get(event.getBlock());
blockSmeltRecipeMap.remove(event.getBlock());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import crypticlib.lifecycle.LifeCycle;
import crypticlib.lifecycle.TaskRule;
import crypticlib.listener.EventListener;
import crypticlib.platform.Platform;
import crypticlib.util.ReflectionHelper;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
Expand Down

0 comments on commit f2e0934

Please sign in to comment.