-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
33 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package me.dkim19375.dkim19375core; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.UUID; | ||
|
||
public class UUIDUtils { | ||
@Nullable | ||
public static UUID getFromString(String name) { | ||
try { | ||
return UUID.fromString(name); | ||
} catch (IllegalArgumentException ignored) {} | ||
try { | ||
String uuid1 = name.substring(0, 8); | ||
String uuid2 = name.substring(8, 12); | ||
String uuid3 = name.substring(12, 16); | ||
String uuid4 = name.substring(16, 20); | ||
String uuid5 = name.substring(20); | ||
return UUID.fromString(uuid1 + "-" + uuid2 + "-" + uuid3 + "-" + uuid4 + "-" + uuid5); | ||
} catch (IndexOutOfBoundsException ignored) {} | ||
return null; | ||
} | ||
} |
53 changes: 0 additions & 53 deletions
53
src/main/java/me/dkim19375/dkim19375core/function/HexaConsumer.java
This file was deleted.
Oops, something went wrong.