-
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.
- Loading branch information
1 parent
b8a4724
commit f7d74b2
Showing
39 changed files
with
332 additions
and
138 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package com.fardragi.nyaruko.client | ||
|
||
import com.fardragi.nyaruko.shared.IProxy | ||
import com.fardragi.nyaruko.modules.base.IProxy | ||
|
||
class ClientProxy : IProxy { | ||
} |
This file was deleted.
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
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/com/fardragi/nyaruko/database/tables/Warps.kt
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,14 @@ | ||
package com.fardragi.nyaruko.database.tables | ||
|
||
import org.jetbrains.exposed.dao.id.IdTable | ||
|
||
object Warps : IdTable<UInt>("warps") { | ||
override val id = uinteger("id").autoIncrement().entityId() | ||
val name = varchar("name", 255).uniqueIndex() | ||
val dimension = integer("dimension") | ||
val positionX = integer("position_x") | ||
val positionY = integer("position_y") | ||
val positionZ = integer("position_z") | ||
|
||
override val primaryKey = PrimaryKey(id) | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/com/fardragi/nyaruko/exceptions/NotFoundException.kt
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package com.fardragi.nyaruko.exceptions | ||
|
||
class NotFoundException(className: String?, id: String?) : Exception("$className not found with id: $id") | ||
class NotFoundException(className: String?, id: String?) : Exception("$className não encontrado: $id") |
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,16 @@ | ||
package com.fardragi.nyaruko.models | ||
|
||
import com.fardragi.nyaruko.database.tables.Warps | ||
import org.jetbrains.exposed.dao.Entity | ||
import org.jetbrains.exposed.dao.EntityClass | ||
import org.jetbrains.exposed.dao.id.EntityID | ||
|
||
class Warp(id: EntityID<UInt>) : Entity<UInt>(id) { | ||
companion object : EntityClass<UInt, Warp>(Warps) | ||
|
||
var name by Warps.name | ||
var dimension by Warps.dimension | ||
var positionX by Warps.positionX | ||
var positionY by Warps.positionY | ||
var positionZ by Warps.positionZ | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/kotlin/com/fardragi/nyaruko/modules/auth/AuthModule.kt
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,17 @@ | ||
package com.fardragi.nyaruko.modules.auth | ||
|
||
import com.fardragi.nyaruko.modules.auth.commands.LoginCommand | ||
import com.fardragi.nyaruko.modules.auth.commands.RegisterCommand | ||
import com.fardragi.nyaruko.modules.auth.handlers.AuthHandler | ||
import com.fardragi.nyaruko.modules.auth.handlers.CheckHandler | ||
import com.fardragi.nyaruko.modules.base.IModule | ||
|
||
class AuthModule() : IModule { | ||
override suspend fun start() { | ||
AuthHandler().register() | ||
CheckHandler().register() | ||
|
||
RegisterCommand().register() | ||
LoginCommand().register() | ||
} | ||
} |
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
6 changes: 3 additions & 3 deletions
6
...ragi/nyaruko/auth/handlers/AuthHandler.kt → ...ruko/modules/auth/handlers/AuthHandler.kt
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
8 changes: 4 additions & 4 deletions
8
...agi/nyaruko/auth/handlers/CheckHandler.kt → ...uko/modules/auth/handlers/CheckHandler.kt
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
2 changes: 1 addition & 1 deletion
2
...agi/nyaruko/auth/messages/LoginMessage.kt → ...uko/modules/auth/messages/LoginMessage.kt
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
2 changes: 1 addition & 1 deletion
2
.../nyaruko/auth/messages/RegisterMessage.kt → .../modules/auth/messages/RegisterMessage.kt
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
2 changes: 1 addition & 1 deletion
2
...i/nyaruko/auth/messages/WelcomeMessage.kt → ...o/modules/auth/messages/WelcomeMessage.kt
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,7 @@ | ||
package com.fardragi.nyaruko.modules.base | ||
|
||
import org.koin.core.component.KoinComponent | ||
|
||
fun interface IModule : KoinComponent { | ||
suspend fun start() | ||
} |
2 changes: 1 addition & 1 deletion
2
...lin/com/fardragi/nyaruko/shared/IProxy.kt → ...m/fardragi/nyaruko/modules/base/IProxy.kt
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
2 changes: 1 addition & 1 deletion
2
...agi/nyaruko/shared/events/NyarukoEvent.kt → ...aruko/modules/base/events/NyarukoEvent.kt
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
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/com/fardragi/nyaruko/modules/base/events/ServerStartingEvent.kt
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,3 @@ | ||
package com.fardragi.nyaruko.modules.base.events | ||
|
||
class ServerStartingEvent() : NyarukoEvent() |
2 changes: 1 addition & 1 deletion
2
...uko/shared/handlers/NyarukoHandlerBase.kt → ...dules/base/handlers/NyarukoHandlerBase.kt
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
4 changes: 2 additions & 2 deletions
4
...nyaruko/shared/messages/DefaultMessage.kt → ...o/modules/base/messages/DefaultMessage.kt
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.