Merge branch 'development'
This commit is contained in:
commit
3985df94c8
2
pom.xml
2
pom.xml
|
@ -2,7 +2,7 @@
|
||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>UltimateModeration</artifactId>
|
<artifactId>UltimateModeration</artifactId>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<version>2.0.2b</version>
|
<version>2.0.3</version>
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean install</defaultGoal>
|
<defaultGoal>clean install</defaultGoal>
|
||||||
<finalName>UltimateModeration-${project.version}</finalName>
|
<finalName>UltimateModeration-${project.version}</finalName>
|
||||||
|
|
|
@ -49,11 +49,6 @@ public class CommandBan extends AbstractCommand {
|
||||||
|
|
||||||
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
||||||
|
|
||||||
if (!player.hasPlayedBefore()) {
|
|
||||||
plugin.getLocale().newMessage("That player does not exist.").sendMessage(sender);
|
|
||||||
return ReturnType.FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin.getPunishmentManager().getPlayer(player).getActivePunishments()
|
if (plugin.getPunishmentManager().getPlayer(player).getActivePunishments()
|
||||||
.stream().anyMatch(appliedPunishment -> appliedPunishment.getPunishmentType() == PunishmentType.BAN)) {
|
.stream().anyMatch(appliedPunishment -> appliedPunishment.getPunishmentType() == PunishmentType.BAN)) {
|
||||||
plugin.getLocale().newMessage("That player is already banned.").sendPrefixedMessage(sender);
|
plugin.getLocale().newMessage("That player is already banned.").sendPrefixedMessage(sender);
|
||||||
|
|
|
@ -39,11 +39,6 @@ public class CommandKick extends AbstractCommand {
|
||||||
|
|
||||||
OfflinePlayer player = Bukkit.getPlayer(args[0]);
|
OfflinePlayer player = Bukkit.getPlayer(args[0]);
|
||||||
|
|
||||||
if (player == null) {
|
|
||||||
plugin.getLocale().newMessage("That player does not exist or is not online.").sendPrefixedMessage(sender);
|
|
||||||
return ReturnType.FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sender instanceof Player && player.getPlayer().hasPermission("um.kick.exempt")) {
|
if (sender instanceof Player && player.getPlayer().hasPermission("um.kick.exempt")) {
|
||||||
plugin.getLocale().newMessage("You cannot kick this player.").sendPrefixedMessage(sender);
|
plugin.getLocale().newMessage("You cannot kick this player.").sendPrefixedMessage(sender);
|
||||||
return ReturnType.FAILURE;
|
return ReturnType.FAILURE;
|
||||||
|
|
|
@ -49,11 +49,6 @@ public class CommandMute extends AbstractCommand {
|
||||||
|
|
||||||
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
||||||
|
|
||||||
if (!player.hasPlayedBefore()) {
|
|
||||||
plugin.getLocale().newMessage("That player does not exist.").sendPrefixedMessage(sender);
|
|
||||||
return ReturnType.FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sender instanceof Player && VaultPermissions.hasPermission(player, "um.mute.exempt")) {
|
if (sender instanceof Player && VaultPermissions.hasPermission(player, "um.mute.exempt")) {
|
||||||
plugin.getLocale().newMessage("You cannot mute that player.").sendPrefixedMessage(sender);
|
plugin.getLocale().newMessage("You cannot mute that player.").sendPrefixedMessage(sender);
|
||||||
return ReturnType.FAILURE;
|
return ReturnType.FAILURE;
|
||||||
|
|
|
@ -27,11 +27,6 @@ public class CommandRunTemplate extends AbstractCommand {
|
||||||
|
|
||||||
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
||||||
|
|
||||||
if (!player.hasPlayedBefore()) {
|
|
||||||
plugin.getLocale().newMessage("That player does not exist.").sendPrefixedMessage(sender);
|
|
||||||
return ReturnType.FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
StringBuilder templateBuilder = new StringBuilder();
|
StringBuilder templateBuilder = new StringBuilder();
|
||||||
for (int i = 1; i < args.length; i++) {
|
for (int i = 1; i < args.length; i++) {
|
||||||
String line = args[i];
|
String line = args[i];
|
||||||
|
|
|
@ -28,11 +28,6 @@ public class CommandUnBan extends AbstractCommand {
|
||||||
|
|
||||||
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
||||||
|
|
||||||
if (!player.hasPlayedBefore()) {
|
|
||||||
plugin.getLocale().newMessage("That player does not exist.").sendPrefixedMessage(sender);
|
|
||||||
return ReturnType.FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!plugin.getPunishmentManager().getPlayer(player).getActivePunishments()
|
if (!plugin.getPunishmentManager().getPlayer(player).getActivePunishments()
|
||||||
.stream().anyMatch(appliedPunishment -> appliedPunishment.getPunishmentType() == PunishmentType.BAN)) {
|
.stream().anyMatch(appliedPunishment -> appliedPunishment.getPunishmentType() == PunishmentType.BAN)) {
|
||||||
plugin.getLocale().newMessage("That player isn't banned.").sendPrefixedMessage(sender);
|
plugin.getLocale().newMessage("That player isn't banned.").sendPrefixedMessage(sender);
|
||||||
|
|
|
@ -28,11 +28,6 @@ public class CommandUnMute extends AbstractCommand {
|
||||||
|
|
||||||
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
||||||
|
|
||||||
if (!player.hasPlayedBefore()) {
|
|
||||||
plugin.getLocale().newMessage("That player does not exist.").sendPrefixedMessage(sender);
|
|
||||||
return ReturnType.FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!plugin.getPunishmentManager().getPlayer(player).getActivePunishments()
|
if (!plugin.getPunishmentManager().getPlayer(player).getActivePunishments()
|
||||||
.stream().anyMatch(appliedPunishment -> appliedPunishment.getPunishmentType() == PunishmentType.MUTE)) {
|
.stream().anyMatch(appliedPunishment -> appliedPunishment.getPunishmentType() == PunishmentType.MUTE)) {
|
||||||
plugin.getLocale().newMessage("That player isn't muted.").sendPrefixedMessage(sender);
|
plugin.getLocale().newMessage("That player isn't muted.").sendPrefixedMessage(sender);
|
||||||
|
|
|
@ -49,11 +49,6 @@ public class CommandWarn extends AbstractCommand {
|
||||||
|
|
||||||
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
OfflinePlayer player = Bukkit.getOfflinePlayer(args[0]);
|
||||||
|
|
||||||
if (!player.hasPlayedBefore()) {
|
|
||||||
plugin.getLocale().newMessage("That player does not exist.").sendPrefixedMessage(sender);
|
|
||||||
return ReturnType.FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sender instanceof Player && VaultPermissions.hasPermission(player, "um.warning.exempt")) {
|
if (sender instanceof Player && VaultPermissions.hasPermission(player, "um.warning.exempt")) {
|
||||||
plugin.getLocale().newMessage("You cannot warn that player.").sendPrefixedMessage(sender);
|
plugin.getLocale().newMessage("You cannot warn that player.").sendPrefixedMessage(sender);
|
||||||
return ReturnType.FAILURE;
|
return ReturnType.FAILURE;
|
||||||
|
|
|
@ -86,13 +86,11 @@ public class SpyModeration extends AbstractModeration {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oPlayer == null) return;
|
if (oPlayer == null || !oPlayer.isOnline()) {
|
||||||
Player player = oPlayer.getPlayer();
|
|
||||||
|
|
||||||
if (player == null) {
|
|
||||||
instance.getLocale().newMessage("That player does not exist or is not online.").sendPrefixedMessage(senderP);
|
instance.getLocale().newMessage("That player does not exist or is not online.").sendPrefixedMessage(senderP);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Player player = oPlayer.getPlayer();
|
||||||
|
|
||||||
if (player == senderP) {
|
if (player == senderP) {
|
||||||
instance.getLocale().getMessage("command.spy.cant").sendPrefixedMessage(senderP);
|
instance.getLocale().getMessage("command.spy.cant").sendPrefixedMessage(senderP);
|
||||||
|
|
Loading…
Reference in New Issue