Aqua Punishments is a punishment plugin that includes all types of punishments such as Bans, Mutes, Kicks, and others.
Other required plugins: None
Other requirements: MongoDB & Redis
- /blacklist <user> [reason]
- /ban <user> [duration] [reason] [-s]
- /mute <user> [duration] [reason] [-s]
- /ipban <user> [duration] [reason] [-s]
- /warn <user> [duration] [reason] [-s]
- /unban <user> [reason] [-s]
- /unmute <user> [reason] [-s]
- /unblacklist <user> [reason]
- /kick <user> [message]
- /checkpunishments [name]
- /punishinfo
- Bans
You can ban players permanent or for an entered period of time. Players can be IP-banned or just banned. If a player is IP-banned no one from the banned IP can't join the server. - Mutes
You can mute players permanent or for an entered period of time. If a player has active mute the player can't be muted until mute expire. - Warns
You can warn players as much as you want. You can warn them permanent or for an entered period of time.
If a player reaches a configurable amount of the warns they will be banned for a configurable amount of time. Also, all warns can be set to inactive after they get banned. - Blacklists
Player and the IP of the player will be blacklisted and no one from the IP won't be able to join the server. - Alts
You can check all players potential alts and alts from the last IP of the user.
- Potential alts are alts that are scanned on all IPs that user was joning from.
- Regular alts are alts that are scanned on the last IP of the user. - History
All punishments are saved in Mongo Data Base, it will save or active and in-active punishments which means that you can check them by doing /checkpunishments <user>.
Also, things like IP, all IPs that user was joining from, first joined, last seen, UUID and such, can be viewed in history.
Source code: $50
Code:
package me.activated.punishments.api;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import me.activated.punishments.PunishmentPlugin;
import me.activated.punishments.player.PlayerData;
import me.activated.punishments.utilities.punishments.Alt;
import me.activated.punishments.utilities.punishments.Punishment;
import me.activated.punishments.utilities.punishments.PunishmentType;
import java.rmi.UnexpectedException;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;
@RequiredArgsConstructor
public class PunishmentsAPI {
private final PunishmentPlugin plugin;
public boolean isUserLoaded(UUID uuid) {
return getPlayerData(uuid) != null;
}
public PlayerData loadUser(UUID uuid, String name) throws UnexpectedException {
if (isUserLoaded(uuid)) {
throw new UnexpectedException("User is already loaded!");
}
plugin.getProfileManager().createPlayerDate(uuid, name);
plugin.getProfileManager().getPlayerDataFromUUID(uuid).load();
plugin.getProfileManager().getPlayerDataFromUUID(uuid).getPunishData().load();
return getPlayerData(uuid);
}
public PlayerData getPlayerData(UUID uuid) {
return plugin.getProfileManager().getPlayerDataFromUUID(uuid);
}
public boolean isBanned(UUID uuid) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getPunishData().isBanned();
}
public boolean isIPBanned(UUID uuid) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getPunishData().isIPBanned();
}
public boolean isMuted(UUID uuid) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getPunishData().isMuted();
}
public boolean isBlacklisted(UUID uuid) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getPunishData().isBlacklisted();
}
public Set<Punishment> getPunishments(UUID uuid) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getPunishData().getPunishments();
}
public Set<Punishment> getPunishments(UUID uuid, PunishmentType punishmentType) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getPunishData().getPunishments().stream().filter(punishment -> punishment.getPunishmentType() == punishmentType).collect(Collectors.toSet());
}
public List<Alt> getAlts(UUID uuid) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getAlts();
}
public List<Alt> getPotentialAlts(UUID uuid) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getPotentialAlts();
}
public String getAddress(UUID uuid) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getAddress();
}
public List<String> getAddresses(UUID uuid) {
PlayerData playerData = getPlayerData(uuid);
return playerData.getAddresses();
}
}
If you would like to purchase this go to resource page here: https://www.mc-market.org/resources/10897/
Last edited:
