Skip to content

Commit

Permalink
Merge pull request #3 from hestia-rsps/release/package
Browse files Browse the repository at this point in the history
Package change
  • Loading branch information
GregHib authored Nov 10, 2018
2 parents 3e0168e + 0162bf7 commit 684e1e4
Show file tree
Hide file tree
Showing 35 changed files with 87 additions and 83 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}
apply plugin: 'maven'

group 'world.gregs'
group 'world.gregs.hestia'
version '0.1.0'

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia
package world.gregs.hestia.core

import org.yaml.snakeyaml.Yaml
import java.io.File
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia
package world.gregs.hestia.core

class WorldDetails(val activity: String, val ip: String, val region: String, val country: Int, val location: Int = 0, val flag: Int) {
var size = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.network
package world.gregs.hestia.core.network

import io.netty.util.AttributeKey
import java.math.BigInteger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package world.gregs.hestia.network
package world.gregs.hestia.core.network

import world.gregs.hestia.network.packets.Packet
import world.gregs.hestia.network.packets.out.ClientResponse
import world.gregs.hestia.network.packets.out.Response
import world.gregs.hestia.core.network.packets.Packet
import world.gregs.hestia.core.network.packets.out.ClientResponse
import world.gregs.hestia.core.network.packets.out.Response
import io.netty.channel.Channel
import io.netty.channel.ChannelFutureListener
import java.net.InetSocketAddress
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package world.gregs.hestia.network.client
package world.gregs.hestia.core.network.client

import world.gregs.hestia.network.codec.Pipeline
import world.gregs.hestia.core.network.codec.Pipeline
import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.network.client
package world.gregs.hestia.core.network.client

import io.netty.bootstrap.Bootstrap
import io.netty.channel.ChannelFuture
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.network.client
package world.gregs.hestia.core.network.client

interface ConnectionChange {
fun connect()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package world.gregs.hestia.network.codec
package world.gregs.hestia.core.network.codec

import world.gregs.hestia.network.packets.Packet
import world.gregs.hestia.core.network.packets.Packet
import io.netty.buffer.Unpooled
import io.netty.channel.ChannelHandler
import io.netty.channel.ChannelHandlerContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package world.gregs.hestia.network.codec
package world.gregs.hestia.core.network.codec

import world.gregs.hestia.network.NetworkConstants.SESSION_KEY
import world.gregs.hestia.network.Session
import world.gregs.hestia.core.network.NetworkConstants.SESSION_KEY
import world.gregs.hestia.core.network.Session
import io.netty.channel.ChannelHandler
import io.netty.channel.ChannelInitializer
import io.netty.channel.socket.SocketChannel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package world.gregs.hestia.network.codec.inbound
package world.gregs.hestia.core.network.codec.inbound

import world.gregs.hestia.network.Session
import world.gregs.hestia.core.network.Session
import io.netty.buffer.ByteBuf

abstract class HandshakeHandler : SessionInboundHandler() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package world.gregs.hestia.network.codec.inbound
package world.gregs.hestia.core.network.codec.inbound

import world.gregs.hestia.network.NetworkConstants
import world.gregs.hestia.network.Session
import world.gregs.hestia.core.network.NetworkConstants
import world.gregs.hestia.core.network.Session
import io.netty.buffer.ByteBuf
import io.netty.buffer.Unpooled
import io.netty.channel.ChannelHandler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package world.gregs.hestia.network.codec.inbound
package world.gregs.hestia.core.network.codec.inbound

import world.gregs.hestia.network.Session
import world.gregs.hestia.network.packets.InboundPacket
import world.gregs.hestia.network.packets.Packet
import world.gregs.hestia.network.packets.PacketMap
import world.gregs.hestia.core.network.Session
import world.gregs.hestia.core.network.packets.InboundPacket
import world.gregs.hestia.core.network.packets.Packet
import world.gregs.hestia.core.services.load.PacketMap
import io.netty.buffer.ByteBuf
import io.netty.channel.ChannelHandler
import io.netty.channel.group.ChannelGroup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package world.gregs.hestia.network.codec.inbound
package world.gregs.hestia.core.network.codec.inbound

import world.gregs.hestia.network.NetworkConstants
import world.gregs.hestia.network.Session
import world.gregs.hestia.core.network.NetworkConstants
import world.gregs.hestia.core.network.Session
import io.netty.buffer.ByteBuf
import io.netty.channel.ChannelHandlerContext

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package world.gregs.hestia.network.login
package world.gregs.hestia.core.network.login

import io.netty.buffer.ByteBuf
import org.slf4j.LoggerFactory
import world.gregs.hestia.network.NetworkConstants
import world.gregs.hestia.network.Session
import world.gregs.hestia.network.packets.InboundPacket
import world.gregs.hestia.network.packets.Packet
import world.gregs.hestia.network.packets.PacketMap
import world.gregs.hestia.network.packets.out.Response
import world.gregs.hestia.services.Decryption
import world.gregs.hestia.core.network.NetworkConstants
import world.gregs.hestia.core.network.Session
import world.gregs.hestia.core.network.packets.InboundPacket
import world.gregs.hestia.core.network.packets.Packet
import world.gregs.hestia.core.services.load.PacketMap
import world.gregs.hestia.core.network.packets.out.Response
import world.gregs.hestia.core.services.Decryption

interface LoginDecoder {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package world.gregs.hestia.network.login
package world.gregs.hestia.core.network.login

import io.netty.buffer.ByteBuf
import world.gregs.hestia.network.Session
import world.gregs.hestia.network.codec.inbound.HandshakeHandler
import world.gregs.hestia.network.packets.InboundPacket
import world.gregs.hestia.network.packets.Packet
import world.gregs.hestia.network.packets.PacketMap
import world.gregs.hestia.network.packets.out.Response
import world.gregs.hestia.services.Decryption
import world.gregs.hestia.core.network.Session
import world.gregs.hestia.core.network.codec.inbound.HandshakeHandler
import world.gregs.hestia.core.network.packets.InboundPacket
import world.gregs.hestia.core.network.packets.Packet
import world.gregs.hestia.core.services.load.PacketMap
import world.gregs.hestia.core.network.packets.out.Response
import world.gregs.hestia.core.services.Decryption

class LoginHandshake(private val packets: PacketMap, private val listener: LoginRequestListener) : HandshakeHandler(), LoginDecoder {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package world.gregs.hestia.core.network.login

import world.gregs.hestia.core.network.Session
import world.gregs.hestia.core.network.packets.InboundPacket
import world.gregs.hestia.core.network.packets.Packet

interface LoginRequestListener {
fun login(session: Session, handler: InboundPacket, packet: Packet, password: String, serverSeed: Long, clientSeed: Long)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package world.gregs.hestia.network.packets
package world.gregs.hestia.core.network.packets

import world.gregs.hestia.network.Session
import world.gregs.hestia.core.network.Session

/**
* Annotation for packet opcode(s)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package world.gregs.hestia.network.packets
package world.gregs.hestia.core.network.packets


import io.netty.buffer.ByteBuf
import io.netty.buffer.Unpooled
import world.gregs.hestia.network.packets.Packet.Type
import world.gregs.hestia.core.network.packets.Packet.Type

/**
* A unit of byte data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package world.gregs.hestia.network.packets.out
package world.gregs.hestia.core.network.packets.out

import world.gregs.hestia.network.packets.Packet
import world.gregs.hestia.core.network.packets.Packet

class ClientResponse(response: Response): Packet.Builder() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.network.packets.out
package world.gregs.hestia.core.network.packets.out

enum class Response(val opcode: Int) {
DATA_CHANGE(0),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package world.gregs.hestia.network.server
package world.gregs.hestia.core.network.server

import world.gregs.hestia.network.server.threads.DecoderThreadFactory
import world.gregs.hestia.core.network.server.threads.DecoderThreadFactory
import io.netty.bootstrap.ServerBootstrap
import io.netty.channel.ChannelFuture
import io.netty.channel.ChannelInitializer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.network.server.threads
package world.gregs.hestia.core.network.server.threads

import java.util.concurrent.ThreadFactory
import java.util.concurrent.atomic.AtomicInteger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.network.server.threads
package world.gregs.hestia.core.network.server.threads

import java.util.concurrent.atomic.AtomicInteger

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.network.server.threads
package world.gregs.hestia.core.network.server.threads

import java.util.concurrent.atomic.AtomicInteger

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package world.gregs.hestia.services
package world.gregs.hestia.core.services

import com.alex.store.Index
import com.alex.store.Store
import com.alex.util.whirlpool.Whirlpool
import io.netty.buffer.Unpooled
import world.gregs.hestia.Settings
import world.gregs.hestia.core.Settings
import java.io.IOException

object Cache {
Expand All @@ -14,7 +14,8 @@ object Cache {

@Throws(IOException::class)
fun init(path: String? = null) {
STORE = Store(path ?: Settings.get("cachePath", null) ?: throw NullPointerException())
STORE = Store(path ?: Settings.get("cachePath", null)
?: throw NullPointerException())
versionTable = createVersionTable()
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package world.gregs.hestia.services
package world.gregs.hestia.core.services

import world.gregs.hestia.network.packets.Packet
import world.gregs.hestia.core.network.packets.Packet
import java.math.BigInteger

object Decryption {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.services
package world.gregs.hestia.core.services

import org.slf4j.LoggerFactory
import java.security.MessageDigest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.services
package world.gregs.hestia.core.services


/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.gregs.hestia.services
package world.gregs.hestia.core.services.load

import org.slf4j.LoggerFactory
import java.io.File
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package world.gregs.hestia.network.packets
package world.gregs.hestia.core.services.load

import world.gregs.hestia.services.Loader
import world.gregs.hestia.services.plural
import org.slf4j.LoggerFactory
import world.gregs.hestia.core.network.packets.InboundPacket
import world.gregs.hestia.core.network.packets.PacketOpcode
import world.gregs.hestia.core.network.packets.PacketSize
import world.gregs.hestia.core.services.plural
import kotlin.system.measureNanoTime

class PacketLoader(path: String) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package world.gregs.hestia.network.packets
package world.gregs.hestia.core.services.load

import world.gregs.hestia.core.network.packets.InboundPacket
import java.util.*

class PacketMap : HashMap<Int, Pair<InboundPacket, Int>>() {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package world.gregs.hestia.network
package world.gregs.hestia.core.network

import io.netty.buffer.Unpooled
import org.assertj.core.api.Assertions
import org.junit.jupiter.api.Test
import world.gregs.hestia.network.packets.Packet
import world.gregs.hestia.core.network.packets.Packet

internal class PacketBuilderTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package world.gregs.hestia.network
package world.gregs.hestia.core.network

import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import world.gregs.hestia.network.packets.Packet
import world.gregs.hestia.core.network.packets.Packet

internal class PacketTest {

Expand Down

0 comments on commit 684e1e4

Please sign in to comment.