{"id":13458612,"url":"https://github.com/anlingyi/xechat-idea","last_synced_at":"2025-05-16T13:04:23.341Z","repository":{"id":37753025,"uuid":"358178748","full_name":"anlingyi/xechat-idea","owner":"anlingyi","description":"让你能够在IDEA里实现聊天、下棋、斗地主！","archived":false,"fork":false,"pushed_at":"2024-04-22T09:19:19.000Z","size":20915,"stargazers_count":805,"open_issues_count":23,"forks_count":154,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-02T06:13:22.174Z","etag":null,"topics":["chat","game","gobang","idea-plugin","intellij-plugin","java","landlord","netty"],"latest_commit_sha":null,"homepage":"https://xeblog.cn/?tag=xechat-idea","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anlingyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-15T08:09:25.000Z","updated_at":"2025-04-02T03:27:28.000Z","dependencies_parsed_at":"2024-01-13T17:49:09.281Z","dependency_job_id":"37b4645a-827b-4634-97af-94c2af18ba3f","html_url":"https://github.com/anlingyi/xechat-idea","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anlingyi%2Fxechat-idea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anlingyi%2Fxechat-idea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anlingyi%2Fxechat-idea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anlingyi%2Fxechat-idea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anlingyi","download_url":"https://codeload.github.com/anlingyi/xechat-idea/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999859,"owners_count":21031046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","game","gobang","idea-plugin","intellij-plugin","java","landlord","netty"],"created_at":"2024-07-31T09:00:54.459Z","updated_at":"2025-04-09T08:05:02.958Z","avatar_url":"https://github.com/anlingyi.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# XEChat-Idea\n\n\u003e Version 1.6.7-beta0\n\n\u003e 基于Netty的IDEA即时聊天插件：让你能够在IDEA里实现聊天、下棋、斗地主！(理论上支持JetBrains全系列开发工具🙂)\n\n\u003e 浏览器端：[XEChat-Web](https://github.com/anlingyi/xechat-web)\n\n- [目录](#xechat-idea)\n    - [项目介绍](#项目介绍)\n        - [项目结构](#项目结构)\n        - [项目环境](#项目环境)\n        - [项目开发](#项目开发)\n    - [运行 \u0026 部署](#运行-部署)\n        - [服务端](#服务端)\n            - [运行](#运行)\n            - [部署](#部署)\n        - [IDEA插件端](#idea插件端)\n            - [修改IDEA版本](#修改idea版本)\n            - [本地运行](#本地运行)\n            - [插件部署](#插件部署)\n    - [安装体验](#安装体验)\n    - [Docker运行](#docker运行)\n    - [公开你的鱼塘](#公开你的鱼塘)\n    - [学习交流](#学习交流)\n\n## 项目介绍\n\n主要功能：\n\n* 即时聊天\n* 游戏对战\n* 待探索...\n\n目前已实现：\n\n**游戏类**\n\n* 五子棋（支持2人联机、人机对战，内置\"人工制杖\"）\n* 斗地主（支持2~3人联机、人机对战）\n* 不贪吃蛇\n* 2048（作者 @[浓睡不消残酒](https://github.com/CodeNoobLH) ，感谢PR😊）\n* 数独（作者 @[Speciallei](https://github.com/Specialleiliei) ，感谢PR😊）\n* 推箱子（作者 @[Speciallei](https://github.com/Specialleiliei) ，感谢PR😊）\n* 中国象棋（支持2人联机、人机对战，作者 @[15738383930](https://github.com/15738383930) ，感谢PR😊）\n* 俄罗斯方块（作者 @[SherlockerSun](https://github.com/SherlockerSun) ，感谢PR😊）\n* 扫雷（作者 @[SherlockerSun](https://github.com/SherlockerSun) ，感谢PR😊）\n\n**工具类**\n\n* 阅读（作者 @[MINIPuffer](https://github.com/MINIPuffer) ，感谢PR😊）\n* 天气查询（作者 @[猎隼丶止戈](https://github.com/nn200433) ，感谢PR😊）\n* 浏览器\n\n[了解更多...](https://xeblog.cn/?tag=xechat-idea)\n\n![](https://oss.xeblog.cn/prod/6382599251dc467380c3b1c1eff6bfa5.png)\n\n![](https://oss.xeblog.cn/prod/87397d4da728467e912450f94e41b2ef.jpg)\n\n![](https://oss.xeblog.cn/prod/40ddad661991451889acea177c7f5293.png)\n\n![](https://oss.xeblog.cn/prod/3af16813518b4e4592ece13b0330be9b.png)\n\n![](https://oss.xeblog.cn/prod/154404fccbdd466591df2fbeabdfeb74.png)\n\n![](https://oss.xeblog.cn/prod/8e5bc4004afd48cf9fed4df18a66d070.png)\n\n![](https://oss.xeblog.cn/prod/76dee7f5bb924dd59a5ffaaf333fc45c.png)\n\n![](https://oss.xeblog.cn/prod/ad9a78cf91b94ec0b0a622a8de8f38d9.png)\n\n![](https://oss.xeblog.cn/prod/8adc57b65371469ab6dec2d9e34cb38b.png)\n\n![](https://oss.xeblog.cn/prod/d5706e73906f4377921231898c3ddceb.png)\n\n### 项目结构\n\n```\n.\n├── LICENSE\n├── README.md\n├── xechat-commons //公共模块\n│   ├── pom.xml\n│   └── src\n├── xechat-plugin //IDEA插件端\n│   ├── build.gradle\n│   ├── gradle\n│   ├── gradle.properties\n│   ├── gradlew\n│   ├── gradlew.bat\n│   ├── settings.gradle\n│   └── src\n└── xechat-server //服务端\n    ├── pom.xml\n    └── src\n```\n\n### 项目环境\n\n**服务端 \u0026 公共模块**\n\n* JDK8\n* Maven 3.6.x\n\n**IDEA 插件端**\n\n* JDK11\n* Gradle 6.x\n\n### 项目开发\n\n* [实现一个自定义命令](https://xeblog.cn/articles/79)\n* [实现一个自定义消息](https://xeblog.cn/articles/100)\n* [实现一个联机对战游戏](https://xeblog.cn/articles/95)\n* [WebSocket协议接入文档](https://xeblog.cn/articles/112)\n\n## 运行 \u0026 部署\n\n\u003e 提醒：公共模块需优先打包\n\n```shell\n# 进入公共模块根目录\ncd xechat-commons\n# 打包到本地仓库\nmvn install\n```\n\n### 服务端\n\n创建或调整日志目录 `src/main/resources/logback.xml`\n\n```xml\n\u003cproperty name=\"ROOT_LOG_PATH\" value=\"/var/log/xechat-server\"/\u003e\n```\n\n#### 运行\n\n直接运行主方法 `XEChatServer.java`\n\n#### 部署\n\n```shell\n# 进入服务端根目录\ncd xechat-server\n# 打包\nmvn package\n# 启动服务端\njava -jar target/xechat-server-xxx.jar\n```\n\n启动参数：\n\n* **设置端口**：`-p {端口号}`\n* **设置敏感词文件**：`-swfile {文件路径}`\n* **设置和风天气**：`-weather {和风api key}`\n* **设置百度翻译**：`-fyAppId {appId} -fyAppKey {appKey}`\n* **设置ip2region文件**：`-ipfile {文件路径}`\n* **设置管理员令牌**：`-token {令牌}`\n* **指定外部配置文件**：`-path {文件路径}`\n* **开放WS协议**：`-enableWS {true|false}`\n\n具体的外部配置文件信息请看：`xechat-server/src/main/resources/config.setting`\n\n参考示例：\n\n```\njava -jar target/xechat-server-xxx.jar -p 1024 -swfile /Users/anlingyi/local/test/words.txt -weather {和风天气api key}\n```\n\n[敏感词相关配置参考](https://xeblog.cn/articles/99)\n\n[和风天气相关配置参考](https://xeblog.cn/articles/101)\n\n[开放WS协议相关配置参考](https://xeblog.cn/articles/113)\n\n### IDEA插件端\n\n#### 修改IDEA版本\n\n修改 `build.gradle` 配置文件，将 `IDEA` 版本号改为你想使用的版本（仅限开发调试阶段）\n\n```\nintellij {\n    version '2021.3'\n}\n```\n\n#### 本地运行\n\n\u003e Tasks \u003e intellij \u003e runIde\n\n![image.png](https://oss.xeblog.cn/prod/cb07b490036d4755b06c4aa1bc1f8411.png)\n\n#### 插件部署\n\n\u003e 提醒：修改服务端地址\n\n进入到 `cn.xeblog.plugin.client.XEChatClient` ，修改以下变量值\n\n```Java\n    private static final String HOST = \"localhost\"; // 服务端IP\n    private static final int PORT = 1024; // 服务端端口\n```\n\n**打包**\n\n\u003e Tasks \u003e build \u003e assemble\n\n![image.png](https://oss.xeblog.cn/prod/ca9baea17f3748e59c0cef1f01bd0aa0.png)\n\n打包完成后的文件\n`build/distributions/xechat-plugin-xxx.zip`\n\n**安装**\n\n\u003e IDEA \u003e Preferences \u003e Plugins\n\n![image.png](https://oss.xeblog.cn/prod/9e07f0a7b3fb4c7bae0da2d8d1548388.png)\n\n选择打包后的文件安装 `build/distributions/xechat-plugin-xxx.zip`\n\n## 安装体验\n\n添加插件库 `Plugins \u003e 设置按钮 \u003e Manage Plugin Repositories...`\n\n```\nhttp://plugins.xeblog.cn\n```\n\n![image.png](https://oss.xeblog.cn/prod/7381109b1fe04a3d9732238f267e53ed.png)\n\n搜索 “xechat” 安装\n\n![image.png](https://oss.xeblog.cn/prod/bb9ee5821ca84cca935f9ccab0040643.png)\n\n如有条件，还请自行部署服务端。\n\n## Docker运行\n\n\u003e 感谢 [@猎隼丶止戈](https://github.com/nn200433) 对此部分做的贡献 😊\n\n镜像地址：[https://hub.docker.com/r/anlingyi/xechat-server/tags](https://hub.docker.com/r/anlingyi/xechat-server/tags)\n\n**docker-compose.yml**\n\n```yml\nversion: '3'\nservices:\n  xechat:\n    image: anlingyi/xechat-server:1.6.7-beta\n    container_name: xechat-server\n    restart: always\n    ports:\n      - 1024:1024\n      - 1025:1025\n    volumes:\n      - /home/xechat/logs:/var/log/xechat-server\n      - /home/xechat/config/config.setting:/home/xechat/config/config.setting\n      - /home/xechat/db:/home/xechat/db\n```\n\n## 公开你的鱼塘\n\n如果你想公开你的鱼塘，请编辑项目中的 `server_list.json` 文件，添加上你的鱼塘信息，然后提交PR到这里，待我们审核通过后即可。\n\n```json\n    {\n        \"name\": \"xxx\", //鱼塘名\n        \"ip\": \"127.0.0.1\", //你的服务器IP或域名\n        \"port\": 1024 //端口号\n    }\n```\n\n## 学习交流\n\n\u003e 感谢 @鹿儿岛 提供的QQ交流群 😊\n\n如果大家对这个项目感兴趣，欢迎加入我们的交流群🎉\n\n* QQ群：754126966","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanlingyi%2Fxechat-idea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanlingyi%2Fxechat-idea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanlingyi%2Fxechat-idea/lists"}