-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from doveeeee/master
重构代码 && 增加一些功能
- Loading branch information
Showing
100 changed files
with
2,891 additions
and
2,551 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
14 changes: 13 additions & 1 deletion
14
...n/java/org/nico/ratel/landlords/client/event/ClientEventListener_CODE_CLIENT_CONNECT.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 |
---|---|---|
@@ -1,16 +1,28 @@ | ||
package org.nico.ratel.landlords.client.event; | ||
|
||
import org.nico.noson.Noson; | ||
import org.nico.ratel.landlords.client.SimpleClient; | ||
import org.nico.ratel.landlords.enums.ServerEventCode; | ||
import org.nico.ratel.landlords.features.Features; | ||
import org.nico.ratel.landlords.helper.MapHelper; | ||
import org.nico.ratel.landlords.print.SimplePrinter; | ||
|
||
import io.netty.channel.Channel; | ||
import org.nico.ratel.landlords.utils.JsonUtils; | ||
|
||
public class ClientEventListener_CODE_CLIENT_CONNECT extends ClientEventListener{ | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class ClientEventListener_CODE_CLIENT_CONNECT extends ClientEventListener { | ||
|
||
@Override | ||
public void call(Channel channel, String data) { | ||
SimplePrinter.printNotice("Connected to server. Welcome to ratel!"); | ||
SimpleClient.id = Integer.parseInt(data); | ||
|
||
Map<String, Object> infos = new HashMap<>(); | ||
infos.put("version", SimpleClient.VERSION); | ||
pushToServer(channel, ServerEventCode.CODE_CLIENT_INFO_SET, Noson.reversal(infos)); | ||
} | ||
|
||
} |
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
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.