Skip to content

Commit 2c5b7ec

Browse files
committed
also flag Player#performCommand
1 parent e331314 commit 2c5b7ec

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ target/
1111
*.iws
1212
*.iml
1313
*.ipr
14+
.idea
1415

1516
### Eclipse ###
1617
.apt_generated

src/main/java/io/papermc/hangar/scanner/check/method/DispatchCommandCheck.java

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public MethodCheckResult check(MethodInsnNode insnNode, MethodNode methodNode, C
1515
if (insnNode.name.equals("dispatchCommand") && insnNode.owner.equals("org/bukkit/Server")) {
1616
return new MethodCheckResult(Severity.HIGH, methodNode, classNode, "calls Server.dispatchCommand");
1717
}
18+
if (insnNode.name.equals("performCommand") && insnNode.owner.equals("org/bukkit/entity/Player")) {
19+
return new MethodCheckResult(Severity.HIGH, methodNode, classNode, "calls Player.performCommand");
20+
}
1821
return null;
1922
}
2023
}

0 commit comments

Comments
 (0)