Compare commits
No commits in common. "2a098d69770ea3b9d2923ee99800ade0638aef31" and "e8a3c26650815fa3032c9ca82e521cb07b8dbe1a" have entirely different histories.
2a098d6977
...
e8a3c26650
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>de.jatitv</groupId>
|
<groupId>de.jatitv</groupId>
|
||||||
<artifactId>OPSecurity</artifactId>
|
<artifactId>OPSecurity</artifactId>
|
||||||
<version>2.4.1</version>
|
<version>2.4.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>OPSecurity</name>
|
<name>OPSecurity</name>
|
||||||
|
@ -17,10 +17,7 @@ public class Events implements org.bukkit.event.Listener {
|
|||||||
public void CommandSendEvent(PlayerCommandPreprocessEvent event) {
|
public void CommandSendEvent(PlayerCommandPreprocessEvent event) {
|
||||||
if (SelectConfig.CheckOnCommand) {
|
if (SelectConfig.CheckOnCommand) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
if (Check.onCheck(player, false)) {
|
event.setCancelled(Check.onCheck(player, false));
|
||||||
if (event.isCancelled()) return;
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +26,9 @@ public class Events implements org.bukkit.event.Listener {
|
|||||||
if (SelectConfig.CheckOnChat) {
|
if (SelectConfig.CheckOnChat) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
if (Check.onCheck(player, false)) {
|
if (Check.onCheck(player, false)) {
|
||||||
if (event.isCancelled()) return;
|
if (event.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,6 @@ public class OPCommand implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onOPServer(ServerCommandEvent event) {
|
public void onOPServer(ServerCommandEvent event) {
|
||||||
|
|
||||||
if ((event.getCommand().toLowerCase().startsWith("op ") || event.getCommand().toLowerCase().startsWith("minecraft:op ")) && SelectConfig.OP_Whitelist_Enable) {
|
if ((event.getCommand().toLowerCase().startsWith("op ") || event.getCommand().toLowerCase().startsWith("minecraft:op ")) && SelectConfig.OP_Whitelist_Enable) {
|
||||||
switch (this.isNotOPWTL(event.getCommand())) {
|
switch (this.isNotOPWTL(event.getCommand())) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -41,7 +40,6 @@ public class OPCommand implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onOpPlayer(PlayerCommandPreprocessEvent event) {
|
public void onOpPlayer(PlayerCommandPreprocessEvent event) {
|
||||||
|
|
||||||
if (SelectConfig.OP_Whitelist_Enable) {
|
if (SelectConfig.OP_Whitelist_Enable) {
|
||||||
if ((event.getMessage().toLowerCase().startsWith("/op ") || event.getMessage().toLowerCase().startsWith("/minecraft:op "))) {
|
if ((event.getMessage().toLowerCase().startsWith("/op ") || event.getMessage().toLowerCase().startsWith("/minecraft:op "))) {
|
||||||
switch (this.isNotOPWTL(event.getMessage())) {
|
switch (this.isNotOPWTL(event.getMessage())) {
|
||||||
@ -59,7 +57,6 @@ public class OPCommand implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int isNotOPWTL(String command) {
|
private int isNotOPWTL(String command) {
|
||||||
if (!command.contains("op")) return 0;
|
|
||||||
if (command.charAt(0) == '/') command = command.replaceFirst("/", "");
|
if (command.charAt(0) == '/') command = command.replaceFirst("/", "");
|
||||||
String arg = command.replace("op ", "");
|
String arg = command.replace("op ", "");
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ public class PlugManCommand implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onOPServer(ServerCommandEvent event) {
|
public void onOPServer(ServerCommandEvent event) {
|
||||||
|
|
||||||
if ((event.getCommand().toLowerCase().contains("plugman disable") && event.getCommand().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
if ((event.getCommand().toLowerCase().contains("plugman disable") && event.getCommand().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
||||||
|| (event.getCommand().toLowerCase().contains("plugman reload") && event.getCommand().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
|| (event.getCommand().toLowerCase().contains("plugman reload") && event.getCommand().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
||||||
|| (event.getCommand().toLowerCase().contains("plugman unload") && event.getCommand().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
|| (event.getCommand().toLowerCase().contains("plugman unload") && event.getCommand().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
||||||
@ -28,7 +27,6 @@ public class PlugManCommand implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onOpPlayer(PlayerCommandPreprocessEvent event) {
|
public void onOpPlayer(PlayerCommandPreprocessEvent event) {
|
||||||
|
|
||||||
if (event.getMessage().toLowerCase().startsWith("/plugman disable") && event.getMessage().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase())
|
if (event.getMessage().toLowerCase().startsWith("/plugman disable") && event.getMessage().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase())
|
||||||
|| (event.getMessage().toLowerCase().startsWith("/plugman reload") && event.getMessage().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
|| (event.getMessage().toLowerCase().startsWith("/plugman reload") && event.getMessage().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
||||||
|| (event.getMessage().toLowerCase().startsWith("/plugman unload") && event.getMessage().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
|| (event.getMessage().toLowerCase().startsWith("/plugman unload") && event.getMessage().toLowerCase().contains(Main.plugin.getDescription().getName().toLowerCase()))
|
||||||
|
Loading…
Reference in New Issue
Block a user