Skip to content

Commit

Permalink
v2.1.6
Browse files Browse the repository at this point in the history
-Update repo
-Removed a LOT of reflection (having access to most jars and this modular gradle setup)
  • Loading branch information
Jake-Moore committed Jul 24, 2024
1 parent 654784e commit 646680c
Show file tree
Hide file tree
Showing 12 changed files with 553 additions and 2,068 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ allprojects {
maven("https://repo.luxiouslabs.net/repository/maven-public/")
maven {
name = "luxiousFactionsLibs"
url = uri("https://nexus.luxiouslabs.net/factions-libs")
url = uri("https://repo.luxiouslabs.net/repository/luxious-private/")
credentials {
username = System.getenv("LUXIOUS_NEXUS_USER")
password = System.getenv("LUXIOUS_NEXUS_PASS")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.kamikazejam.factionintegrations.object;

import lombok.Getter;

@Getter
@SuppressWarnings("unused")
public enum TranslatedRole {

ADMIN(5),
Expand All @@ -16,30 +20,20 @@ public enum TranslatedRole {

private final int value;

private TranslatedRole(int value) {
TranslatedRole(int value) {
this.value = value;
}

public static TranslatedRole getByValue(int value) {
switch (value) {
case 0:
return ALT;
case 1:
return RECRUIT;
case 2:
return MEMBER;
case 3:
return OFFICER;
case 4:
return CO_LEADER;
case 5:
return ADMIN;
}
return null;
}

public int getValue() {
return this.value;
return switch (value) {
case 0 -> ALT;
case 1 -> RECRUIT;
case 2 -> MEMBER;
case 3 -> OFFICER;
case 4 -> CO_LEADER;
case 5 -> ADMIN;
default -> null;
};
}

public boolean isGreaterThan(TranslatedRole translatedRole) {
Expand Down
Loading

0 comments on commit 646680c

Please sign in to comment.