2.4.3-DEV-1
This commit is contained in:
parent
dd8b823547
commit
485b50de7a
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.2</version>
|
<version>2.4.3-DEV-1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>OPSecurity</name>
|
<name>OPSecurity</name>
|
||||||
|
@ -20,14 +20,14 @@ public class Check {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (join) {
|
if (join) {
|
||||||
send.console(Replace.replace(Util.getPrefix(),SelectMessages.OP_consoleOnJoin.replace("[player]", player.getName())));
|
send.console(Replace.replace(Util.getPrefix(), SelectMessages.OP_consoleOnJoin.replace("[player]", player.getName())));
|
||||||
}
|
}
|
||||||
if (SelectConfig.Notify_Warn) {
|
if (SelectConfig.Notify_Warn) {
|
||||||
for (Player notifyperm : Bukkit.getOnlinePlayers()) {
|
for (Player notifyperm : Bukkit.getOnlinePlayers()) {
|
||||||
if (notifyperm.hasPermission(Permissions.notify)) {
|
if (notifyperm.hasPermission(Permissions.notify)) {
|
||||||
if (join) {
|
if (join) {
|
||||||
notifyperm.sendMessage(Replace.replace(Util.getPrefix(),SelectMessages.OP_consoleOnJoin.replace("[player]", player.getName())));
|
notifyperm.sendMessage(Replace.replace(Util.getPrefix(), SelectMessages.OP_consoleOnJoin.replace("[player]", player.getName())));
|
||||||
} else notifyperm.sendMessage(Replace.replace(Util.getPrefix(),SelectMessages.OP_consoleKick.replace("[player]", player.getName())));
|
} else notifyperm.sendMessage(Replace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName())));
|
||||||
if (SelectConfig.Notify_Sound_Enable) {
|
if (SelectConfig.Notify_Sound_Enable) {
|
||||||
notifyperm.playSound(player.getLocation(), SelectConfig.Notify_Sound, 3, 1);
|
notifyperm.playSound(player.getLocation(), SelectConfig.Notify_Sound, 3, 1);
|
||||||
}
|
}
|
||||||
@ -37,20 +37,19 @@ public class Check {
|
|||||||
if (SelectConfig.no_OP_Player_kick && SelectConfig.no_OP_Player_deop) {
|
if (SelectConfig.no_OP_Player_kick && SelectConfig.no_OP_Player_deop) {
|
||||||
player.setOp(false);
|
player.setOp(false);
|
||||||
Cmd.console(SelectConfig.KickCommand.replace("[player]", player.getName())
|
Cmd.console(SelectConfig.KickCommand.replace("[player]", player.getName())
|
||||||
.replace("[reason]", Replace.replace(Util.getPrefix(),SelectMessages.OP_kick + "\n" + "\n" + SelectMessages.OP_deop)));
|
.replace("[reason]", Replace.replace(Util.getPrefix(), SelectMessages.OP_kick + "\n" + "\n" + SelectMessages.OP_deop)));
|
||||||
send.console(Replace.replace(Util.getPrefix(),SelectMessages.OP_consoleKick.replace("[player]", player.getName())));
|
send.console(Replace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName())));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (SelectConfig.no_OP_Player_kick) {
|
if (SelectConfig.no_OP_Player_kick) {
|
||||||
Cmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()).replace("[reason]", Replace.replace(Util.getPrefix(),SelectMessages.OP_kick)));
|
Cmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()).replace("[reason]", Replace.replace(Util.getPrefix(), SelectMessages.OP_kick)));
|
||||||
send.console(Replace.replace(Util.getPrefix(),SelectMessages.OP_consoleKick.replace("[player]", player.getName())));
|
send.console(Replace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName())));
|
||||||
for (Player notifyperm : Bukkit.getOnlinePlayers()) {
|
for (Player notifyperm : Bukkit.getOnlinePlayers()) {
|
||||||
if (notifyperm.hasPermission(Permissions.notify)) {
|
if (notifyperm.hasPermission(Permissions.notify)) {
|
||||||
notifyperm.sendMessage(Replace.replace(Util.getPrefix(),SelectMessages.OP_consoleKick.replace("[player]", player.getName())
|
notifyperm.sendMessage(Replace.replace(Util.getPrefix(), SelectMessages.OP_consoleKick.replace("[player]", player.getName())
|
||||||
+ "\n" + SelectMessages.OP_consoleDeop.replace("[player]", player.getName())));
|
+ "\n" + SelectMessages.OP_consoleDeop.replace("[player]", player.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
if (SelectConfig.no_OP_Player_deop) {
|
if (SelectConfig.no_OP_Player_deop) {
|
||||||
player.setOp(false);
|
player.setOp(false);
|
||||||
@ -58,18 +57,17 @@ public class Check {
|
|||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
player.sendMessage(Replace.replace(Util.getPrefix(),SelectMessages.OP_deop));
|
player.sendMessage(Replace.replace(Util.getPrefix(), SelectMessages.OP_deop));
|
||||||
}
|
}
|
||||||
}.runTaskLater(Main.plugin, 5L);
|
}.runTaskLater(Main.plugin, 5L);
|
||||||
|
|
||||||
}
|
}
|
||||||
send.console(Replace.replace(Util.getPrefix(),SelectMessages.OP_consoleDeop.replace("[player]", player.getName())));
|
send.console(Replace.replace(Util.getPrefix(), SelectMessages.OP_consoleDeop.replace("[player]", player.getName())));
|
||||||
for (Player notifyperm : Bukkit.getOnlinePlayers()) {
|
for (Player notifyperm : Bukkit.getOnlinePlayers()) {
|
||||||
if (notifyperm.hasPermission(Permissions.notify)) {
|
if (notifyperm.hasPermission(Permissions.notify)) {
|
||||||
notifyperm.sendMessage(Replace.replace(Util.getPrefix(),SelectMessages.OP_consoleDeop.replace("[player]", player.getName())));
|
notifyperm.sendMessage(Replace.replace(Util.getPrefix(), SelectMessages.OP_consoleDeop.replace("[player]", player.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (SelectConfig.customCommand_Enable) {
|
if (SelectConfig.customCommand_Enable) {
|
||||||
@ -77,12 +75,13 @@ public class Check {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for (String cmd : SelectConfig.customKickCommand) {
|
for (String cmd : SelectConfig.customKickCommand) {
|
||||||
Cmd.console(Replace.replace(Util.getPrefix(),cmd.replace("[player]", player.getName())));
|
Cmd.console(Replace.replace(Util.getPrefix(), cmd.replace("[player]", player.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.runTaskLater(Main.plugin, 5L);
|
}.runTaskLater(Main.plugin, 5L);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,15 +90,15 @@ public class Check {
|
|||||||
if (player.hasPermission(s)) {
|
if (player.hasPermission(s)) {
|
||||||
if (!permWhitelist(player)) {
|
if (!permWhitelist(player)) {
|
||||||
if (join) {
|
if (join) {
|
||||||
send.console(Replace.replace(Util.getPrefix(),SelectMessages.Perm_consoleOnJoin.replace("[player]", player.getName()).replace("[perm]", s)));
|
send.console(Replace.replace(Util.getPrefix(), SelectMessages.Perm_consoleOnJoin.replace("[player]", player.getName()).replace("[perm]", s)));
|
||||||
}
|
}
|
||||||
if (SelectConfig.Notify_Warn) {
|
if (SelectConfig.Notify_Warn) {
|
||||||
for (Player notifyperm : Bukkit.getOnlinePlayers()) {
|
for (Player notifyperm : Bukkit.getOnlinePlayers()) {
|
||||||
if (notifyperm.hasPermission(Permissions.notify)) {
|
if (notifyperm.hasPermission(Permissions.notify)) {
|
||||||
if (join) {
|
if (join) {
|
||||||
notifyperm.sendMessage(Replace.replace(Util.getPrefix(),SelectMessages.Perm_consoleOnJoin.replace("[player]",
|
notifyperm.sendMessage(Replace.replace(Util.getPrefix(), SelectMessages.Perm_consoleOnJoin.replace("[player]",
|
||||||
player.getName()).replace("[perm]", s)));
|
player.getName()).replace("[perm]", s)));
|
||||||
} else notifyperm.sendMessage(Replace.replace(Util.getPrefix(),SelectMessages.Perm_consoleKick.replace("[player]",
|
} else notifyperm.sendMessage(Replace.replace(Util.getPrefix(), SelectMessages.Perm_consoleKick.replace("[player]",
|
||||||
player.getName()).replace("[perm]", s)));
|
player.getName()).replace("[perm]", s)));
|
||||||
if (SelectConfig.Notify_Sound_Enable) {
|
if (SelectConfig.Notify_Sound_Enable) {
|
||||||
notifyperm.playSound(player.getLocation(), SelectConfig.Notify_Sound, 3, 1);
|
notifyperm.playSound(player.getLocation(), SelectConfig.Notify_Sound, 3, 1);
|
||||||
@ -108,8 +107,8 @@ public class Check {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (SelectConfig.PlayerWhithPermission_kick && SelectConfig.Perm_Command_enable) {
|
if (SelectConfig.PlayerWhithPermission_kick && SelectConfig.Perm_Command_enable) {
|
||||||
Cmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()).replace("[reason]", Replace.replace(Util.getPrefix(),SelectMessages.Perm_kick)));
|
Cmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()).replace("[reason]", Replace.replace(Util.getPrefix(), SelectMessages.Perm_kick)));
|
||||||
send.console(Replace.replace(Util.getPrefix(),SelectMessages.Perm_consoleKick.replace("[player]",
|
send.console(Replace.replace(Util.getPrefix(), SelectMessages.Perm_consoleKick.replace("[player]",
|
||||||
player.getName()).replace("[perm]", s)));
|
player.getName()).replace("[perm]", s)));
|
||||||
for (String cmd : SelectConfig.Perm_Command) {
|
for (String cmd : SelectConfig.Perm_Command) {
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), cmd.replace("[player]", player.getName()).replace("[perm]", s));
|
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), cmd.replace("[player]", player.getName()).replace("[perm]", s));
|
||||||
@ -118,8 +117,8 @@ public class Check {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if (SelectConfig.PlayerWhithPermission_kick) {
|
if (SelectConfig.PlayerWhithPermission_kick) {
|
||||||
Cmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()).replace("[reason]", Replace.replace(Util.getPrefix(),SelectMessages.Perm_kick)));
|
Cmd.console(SelectConfig.KickCommand.replace("[player]", player.getName()).replace("[reason]", Replace.replace(Util.getPrefix(), SelectMessages.Perm_kick)));
|
||||||
send.console(Replace.replace(Util.getPrefix(),SelectMessages.Perm_consoleKick.replace("[player]",
|
send.console(Replace.replace(Util.getPrefix(), SelectMessages.Perm_consoleKick.replace("[player]",
|
||||||
player.getName()).replace("[perm]", s)));
|
player.getName()).replace("[perm]", s)));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user