Parkour implementation safety save 2

This is just a safety save in case the code gets too broken to fix.
This commit is contained in:
2023-04-13 20:13:29 +02:00
parent 9a3f9841ab
commit 1acaebb3bc
77 changed files with 1168 additions and 847 deletions

View File

@ -0,0 +1,23 @@
package net.knarcraft.minigames.property;
/**
* A representation of all possible record results
*/
public enum RecordResult {
/**
* No record was achieved
*/
NONE,
/**
* A personal bes was achieved
*/
PERSONAL_BEST,
/**
* A world record was achieved
*/
WORLD_RECORD
}

View File

@ -0,0 +1,37 @@
package net.knarcraft.minigames.property;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* A type of record a player can achieve
*/
public enum RecordType {
/**
* A least-deaths record
*/
DEATHS,
/**
*
*/
TIME,
;
/**
* Gets the record type specified in the given string
*
* @param type <p>The string specifying the record type</p>
* @return <p>The record type, or null if not found</p>
*/
public static @Nullable RecordType getFromString(@NotNull String type) {
for (RecordType recordType : RecordType.values()) {
if (recordType.name().equalsIgnoreCase(type)) {
return recordType;
}
}
return null;
}
}