Fornite
This commit is contained in:
parent
b9bf4c135a
commit
b06fd84985
|
@ -142,7 +142,7 @@
|
|||
<artifactId>mongo-jackson-codec</artifactId>
|
||||
<version>3.2.0__0.4</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>E:\SSD\GitHub\APIv3/lib/mongo-jackson-mapper-1.4.2.jar</systemPath>
|
||||
<systemPath>C:\Users\angel\Documents\Code\Java\PlatinumMC\APIv3/lib/mongo-jackson-mapper-1.4.2.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.undercouch</groupId>
|
||||
|
@ -159,7 +159,7 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.12</version>
|
||||
<version>1.18.24</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -1,7 +1,19 @@
|
|||
package net.frozenorb.apiv3.unsorted.actor;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum ActorType {
|
||||
|
||||
WEBSITE, ANSIBLE, STORE, BUNGEE_CORD, SERVER, UNKNOWN
|
||||
WEBSITE, ANSIBLE, STORE, BUNGEE_CORD(true), SERVER(true), UNKNOWN;
|
||||
|
||||
private boolean server;
|
||||
ActorType() {
|
||||
server = false;
|
||||
}
|
||||
ActorType(boolean server) {
|
||||
this.server = server;
|
||||
}
|
||||
}
|
|
@ -189,7 +189,7 @@ public final class GETDumpsType implements Handler<RoutingContext> {
|
|||
if (customScope.equalsIgnoreCase("me")) {
|
||||
Actor actor = ctx.get("actor");
|
||||
|
||||
if (actor.getType() != ActorType.SERVER) {
|
||||
if (!actor.getType().isServer()) {
|
||||
ErrorUtils.respondOther(ctx, 403, "This action can only be performed when requested by a server.", "serverOnly", ImmutableMap.of());
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class POSTServersHeartbeat implements Handler<RoutingContext> {
|
|||
public void handle(RoutingContext ctx) {
|
||||
Actor actor = ctx.get("actor");
|
||||
|
||||
if (actor.getType() != ActorType.SERVER) {
|
||||
if (actor.getType().isServer()) {
|
||||
ErrorUtils.respondOther(ctx, 403, "This action can only be performed when requested by a server.", "serverOnly", ImmutableMap.of());
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public final class POSTUsersIdLogin implements Handler<RoutingContext> {
|
|||
String userIp = requestBody.getString("userIp");
|
||||
Actor actor = ctx.get("actor");
|
||||
|
||||
if (actor.getType() != ActorType.SERVER) {
|
||||
if (!actor.getType().isServer()) {
|
||||
ErrorUtils.respondOther(ctx, 403, "This action can only be performed when requested by a server.", "serverOnly", ImmutableMap.of());
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue