perm fix
This commit is contained in:
parent
99b867a578
commit
31e16e7531
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>AutoResponse</artifactId>
|
||||
<version>0.0.1-DEV</version>
|
||||
<version>0.0.1-DEV-2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>T2C-AutoResponse</name>
|
||||
|
@ -25,13 +25,12 @@ public class ResponseListener implements Listener {
|
||||
public static void ChatListener(AsyncPlayerChatEvent e) {
|
||||
Player player = e.getPlayer();
|
||||
boolean bool = false;
|
||||
for (String s : Main.allResponse){
|
||||
for (String s : Main.allResponse) {
|
||||
if (e.getMessage().contains(s)) bool = true;
|
||||
}
|
||||
if (!bool) return;
|
||||
for (ResponsesObject response : Main.allResponses) {
|
||||
if (response.permNecessary) {
|
||||
if (player.hasPermission(response.permission)) {
|
||||
if (!response.permNecessary || player.hasPermission(response.permission)) {
|
||||
send.debugmsg(Main.plugin, "key: " + response.responseKey);
|
||||
if (response.contains) {
|
||||
send.debugmsg(Main.plugin, "1");
|
||||
@ -51,7 +50,6 @@ public class ResponseListener implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void execute(AsyncPlayerChatEvent e, Player player, ResponsesObject response) {
|
||||
if (response.commandEnable) {
|
||||
|
Loading…
Reference in New Issue
Block a user