Skip to content

Commit

Permalink
Fix a bug immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
WinfXK committed Aug 7, 2019
1 parent 4db3ec8 commit 1b4c6d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
5 changes: 4 additions & 1 deletion Knickers/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Knickers
main: xiaokai.knickers.Knickers
api:
- 1.0.0
version: 2.0
version: 2.0.1
load: POSTWORLD
website: http://EpicFX.cn
description: 多功能菜单,如传送、命令、提示等功能,并且支持多功能个人商店!并且支持自定义商品搜索等!后期还会加入更多功能哦!
Expand All @@ -28,4 +28,7 @@ commands:
permissions:
Knickers.Command.main:
description: 菜单工具主命令
default: true
Knickers.Command.Tool:
description: 菜单快捷工具主命令
default: true
8 changes: 4 additions & 4 deletions Knickers/src/xiaokai/knickers/appliance/Appliance.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static Item setData(Item item, Map<String, Object> map) {
CompoundTag Nbt = item.getNamedTag();
Nbt = Nbt == null ? new CompoundTag() : Nbt;
Nbt.putString("Their", kick.mis.getName());
Nbt.putBoolean("isDrop", Tool.ObjToBool(map.get("允许丢弃")));
Nbt.putBoolean("isDrop", Tool.ObjToBool(map.get("isDrop"), true));
DumperOptions dumperOptions = new DumperOptions();
dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
Yaml yaml = new Yaml(dumperOptions);
Expand All @@ -167,7 +167,7 @@ public static Item setData(Item item, Map<String, Object> map) {
if (map.get("Enchant") instanceof List) {
List<Object> list = (List<Object>) map.get("Enchant");
for (Object obj : list)
if (!enchants.contains(EnchantName.UnknownToEnchant(obj)))
if (obj != null && !enchants.contains(EnchantName.UnknownToEnchant(obj)))
item.addEnchantment(EnchantName.UnknownToEnchant(obj));
} else if (!enchants.contains(EnchantName.UnknownToEnchant(map.get("Enchant"))))
item.addEnchantment(EnchantName.UnknownToEnchant(map.get("Enchant")));
Expand Down Expand Up @@ -229,12 +229,12 @@ public static Map<String, Object> getData(Item item) {
*/
public static boolean isDrop(Item item) {
if (!isGirl(item))
return false;
return true;
CompoundTag Nbt = item.getNamedTag();
if (Nbt != null && Nbt.getString("Their").equals(kick.mis.getName()))
return Nbt.getBoolean("isDrop");
Map<String, Object> map = getData(item);
return Tool.ObjToBool(map.get("isDrop"));
return Tool.ObjToBool(map.get("isDrop"), true);
}

/**
Expand Down
4 changes: 0 additions & 4 deletions Knickers/src/xiaokai/knickers/mtp/MyPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ public class MyPlayer {
* 删除的时候的文件列表
*/
public List<File> DelFileList;
/**
* 是否处于异步处理状态
*/
public boolean isThread = false;

public MyPlayer(Player player) {
this.player = player;
Expand Down
Binary file added Knickers_v2.0.1.jar
Binary file not shown.

0 comments on commit 1b4c6d4

Please sign in to comment.