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