Skip to content

Commit db9a550

Browse files
committed
feat(forge): 支持通配符功能
1.support #12 2.修复不能构建
1 parent d2d2134 commit db9a550

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/nova/committee/atom/sweep/Static.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public static Boolean cmdPermission(CommandSourceStack source, String permission
113113
return source.hasPermission(2);
114114
else
115115
return true;
116-
else if (!source.isPlayer())
116+
else if (!(source.getEntity() instanceof ServerPlayer))
117117
return source.hasPermission(2);
118118
else
119119
try {

src/main/java/nova/committee/atom/sweep/core/model/ASMob.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ static boolean mobMatch(String s, ResourceLocation registryName) {
4949
return true;
5050
} else if ((index = s.indexOf('*')) != -1) {
5151
s = s.substring(0, index - 1);
52-
if (registryName.getNamespace().equals(s)) {
53-
return false;
54-
}
52+
return registryName.getNamespace().equals(s);
5553
}
5654
return false;
5755
}

0 commit comments

Comments
 (0)