mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2025-07-22 16:04:45 +02:00
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:
@ -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
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user