forked from Aelysium-Group/rusty-connector
-
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.
Fix some things, make MySQL bootable
- Loading branch information
1 parent
b687532
commit 26ad0eb
Showing
32 changed files
with
529 additions
and
503 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
522 changes: 276 additions & 246 deletions
522
...main/java/group/aelysium/rustyconnector/plugin/velocity/central/command/CommandRusty.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
27 changes: 27 additions & 0 deletions
27
.../main/java/group/aelysium/rustyconnector/plugin/velocity/lib/family/ResolvableFamily.java
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,27 @@ | ||
package group.aelysium.rustyconnector.plugin.velocity.lib.family; | ||
|
||
import group.aelysium.rustyconnector.plugin.velocity.central.Tinder; | ||
import group.aelysium.rustyconnector.plugin.velocity.lib.family.bases.BaseServerFamily; | ||
|
||
import java.util.Objects; | ||
import java.util.Optional; | ||
|
||
public record ResolvableFamily(String name) { | ||
public Optional<BaseServerFamily<?>> resolve() { | ||
BaseServerFamily<?> potentialFamily = Tinder.get().services().familyService().find(this.name); | ||
if(potentialFamily == null) return Optional.empty(); | ||
return Optional.of(potentialFamily); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object object) { | ||
if (this == object) return true; | ||
if (object == null || getClass() != object.getClass()) return false; | ||
|
||
ResolvableFamily that = (ResolvableFamily) object; | ||
return this.name.equals(that.name()); | ||
} | ||
public static ResolvableFamily from(BaseServerFamily<?> family) { | ||
return new ResolvableFamily(family.name()); | ||
} | ||
} |
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
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
Oops, something went wrong.