Skip to content

Commit

Permalink
Complete overhaul of API, configuration, and various internals
Browse files Browse the repository at this point in the history
* Re-organise and substantially expand API; rework punishment objects and builders
by centralising them, allowing for simpler programming
* Completely overhaul core implementation
* Redo configuration using DazzleConfig
* Implement temporary punishments
* Expand integration testing to cover enforcement, unenforcement, and dependencies
* Guarantee dependencies use same versions as in pom.xml
* Fix connection URL properties not being set
* Fix bugs with expired punishments, including in database queries and mute caching
* Cleanup project model, remove bans-env-sponge and bans-database modules
* Add WikiExamples
* Update ArimAPI and Omnibus dependencies
* Increment version to 0.2.0-SNAPSHOT
* Use reproducible builds
  • Loading branch information
A248 committed Oct 17, 2020
1 parent ea90292 commit f2d832f
Show file tree
Hide file tree
Showing 183 changed files with 6,298 additions and 3,544 deletions.
19 changes: 14 additions & 5 deletions bans-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@
<parent>
<groupId>space.arim.libertybans</groupId>
<artifactId>bans-parent</artifactId>
<version>0.1.4-SNAPSHOT</version>
<version>0.2.0-SNAPSHOT</version>
</parent>

<artifactId>bans-api</artifactId>
<description>API for LibertyBans</description>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<finalName>${project.name}_v${project.version}</finalName>

<!-- This is the same name format used by the dependency downloader -->
<!-- For quick testing, drag and drop the output jar to LibertyBans/libs/api/ -->
<finalName>${project.groupId}.${project.name}_${project.version}</finalName>

<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -62,17 +66,22 @@
<dependencies>
<dependency>
<groupId>space.arim.omnibus</groupId>
<artifactId>omnibus-core</artifactId>
<artifactId>omnibus</artifactId>
</dependency>
<dependency>
<groupId>space.arim.uuidvault</groupId>
<artifactId>api</artifactId>
</dependency>

<!-- Used for WikiExamples -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
</dependencies>
</project>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import java.net.InetAddress;
import java.util.Objects;

import space.arim.libertybans.api.Victim.VictimType;

/**
* An IP address as the victim of a punishment
*
Expand All @@ -32,7 +34,6 @@ public final class AddressVictim extends Victim {
private final NetworkAddress address;

private AddressVictim(NetworkAddress address) {
super(VictimType.ADDRESS);
this.address = address;
}

Expand Down Expand Up @@ -69,6 +70,15 @@ public static AddressVictim of(byte[] address) {
return new AddressVictim(NetworkAddress.of(address));
}

/**
* Gets this victim's type: {@link VictimType#ADDRESS}
*
*/
@Override
public VictimType getType() {
return VictimType.ADDRESS;
}

/**
* Gets the network address represented by this victim
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,27 @@ public final class ConsoleOperator extends Operator {
*/
public static final ConsoleOperator INSTANCE = new ConsoleOperator();

private ConsoleOperator() {
super(OperatorType.CONSOLE);
private ConsoleOperator() {}

/**
* Gets this operator's type: {@link OperatorType#CONSOLE}
*
*/
@Override
public OperatorType getType() {
return OperatorType.CONSOLE;
}

@Override
public int hashCode() {
return System.identityHashCode(this);
}

@Override
public boolean equals(Object object) {
return this == object;
}

@Override
public String toString() {
return "ConsoleOperator.INSTANCE";
Expand Down
Loading

0 comments on commit f2d832f

Please sign in to comment.