mirror of
https://github.com/songoda/UltimateModeration.git
synced 2025-02-07 07:01:24 +01:00
Merge branch 'development'
This commit is contained in:
commit
3985df94c8
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateModeration</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>2.0.2b</version>
|
||||
<version>2.0.3</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>UltimateModeration-${project.version}</finalName>
|
||||
|
@ -49,11 +49,6 @@ public class CommandBan extends AbstractCommand {
|
||||
|
||||
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()
|
||||
.stream().anyMatch(appliedPunishment -> appliedPunishment.getPunishmentType() == PunishmentType.BAN)) {
|
||||
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]);
|
||||
|
||||
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")) {
|
||||
plugin.getLocale().newMessage("You cannot kick this player.").sendPrefixedMessage(sender);
|
||||
return ReturnType.FAILURE;
|
||||
|
@ -49,11 +49,6 @@ public class CommandMute extends AbstractCommand {
|
||||
|
||||
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")) {
|
||||
plugin.getLocale().newMessage("You cannot mute that player.").sendPrefixedMessage(sender);
|
||||
return ReturnType.FAILURE;
|
||||
|
@ -27,11 +27,6 @@ public class CommandRunTemplate extends AbstractCommand {
|
||||
|
||||
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();
|
||||
for (int i = 1; i < args.length; i++) {
|
||||
String line = args[i];
|
||||
|
@ -28,11 +28,6 @@ public class CommandUnBan extends AbstractCommand {
|
||||
|
||||
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()
|
||||
.stream().anyMatch(appliedPunishment -> appliedPunishment.getPunishmentType() == PunishmentType.BAN)) {
|
||||
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]);
|
||||
|
||||
if (!player.hasPlayedBefore()) {
|
||||
plugin.getLocale().newMessage("That player does not exist.").sendPrefixedMessage(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
if (!plugin.getPunishmentManager().getPlayer(player).getActivePunishments()
|
||||
.stream().anyMatch(appliedPunishment -> appliedPunishment.getPunishmentType() == PunishmentType.MUTE)) {
|
||||
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]);
|
||||
|
||||
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")) {
|
||||
plugin.getLocale().newMessage("You cannot warn that player.").sendPrefixedMessage(sender);
|
||||
return ReturnType.FAILURE;
|
||||
|
@ -86,13 +86,11 @@ public class SpyModeration extends AbstractModeration {
|
||||
return;
|
||||
}
|
||||
|
||||
if (oPlayer == null) return;
|
||||
Player player = oPlayer.getPlayer();
|
||||
|
||||
if (player == null) {
|
||||
if (oPlayer == null || !oPlayer.isOnline()) {
|
||||
instance.getLocale().newMessage("That player does not exist or is not online.").sendPrefixedMessage(senderP);
|
||||
return;
|
||||
}
|
||||
Player player = oPlayer.getPlayer();
|
||||
|
||||
if (player == senderP) {
|
||||
instance.getLocale().getMessage("command.spy.cant").sendPrefixedMessage(senderP);
|
||||
|
Loading…
Reference in New Issue
Block a user