Skip to content

Commit 0fc08ef

Browse files
committed
Update privacy policy, send /spawn on world change
1 parent 92be133 commit 0fc08ef

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ A React Native app for Android/iOS to chat on Minecraft servers from your phone.
1919

2020
APKs are available to download for each EnderChat release [here.](https://github.com/retrixe/EnderChat/releases)
2121

22-
Publishing to the Google Play Store is eventually planned for the betas and final release. ***While the license allows redistribution, I request people not to abuse this privilege and publish EnderChat to the Play Store without my permission (for now).***
22+
Publishing to the Google Play Store is eventually planned for the betas and final release. ***While the license allows redistribution, I request people not to abuse this privilege and publish EnderChat to the Play Store without my permission.***
2323

2424
### iOS
2525

2626
**Note:** iOS support is currently untested and may have bugs and/or performance issues, since I don't have a Mac to properly support iOS as a target platform. Contributions to improve iOS support are welcome though!
2727

2828
IPAs are available to download for each EnderChat release [here.](https://github.com/retrixe/EnderChat/releases) These can be sideloaded on your iPhone using techniques like AltStore.
2929

30-
There are no plans to publish EnderChat to the iOS App Store for now. ***While the license allows redistribution, I request people not to abuse this privilege and publish EnderChat to the App Store without my permission (for now).***
30+
There are no plans to publish EnderChat to the iOS App Store for now. ***While the license allows redistribution, I request people not to abuse this privilege and publish EnderChat to the App Store without my permission.***
3131

3232
## Development
3333

@@ -51,5 +51,7 @@ The `src/minecraft` folder is independent of the rest of the project, and is lic
5151

5252
EnderChat does not collect any data from its users. The data that is collected and sent to third-parties is required for the app to function, and is as follows:
5353

54-
1. Data sent to the Minecraft server you are connecting to, which is the same data that is sent to the server when using a Minecraft client. This data includes, but is not limited to, chat messages, commands, tab completion events, detection and usage of EnderChat-specific features, server-side settings and account details necessary for connecting to the server. This data is not collected by EnderChat, and is only sent to the server you are connecting to. EnderChat does not collect any data from the server you are connecting to (such as chat messages, player locations, etc.)
55-
2. Data sent to Microsoft for authenticating your purchased copy of Minecraft, which enables you to connect to online mode Minecraft servers. As aforementioned, this data is not collected by EnderChat, and is only sent to Microsoft. EnderChat does not collect any data from Microsoft (such as your Minecraft account details, etc.)
54+
1. Data sent to the Minecraft server you are connecting to. This data includes, but is not limited to, pings to receive server info, chat messages, commands, tab completion events, detection and usage of EnderChat-specific features, server-side settings and account details necessary for connecting to the server.
55+
2. Data sent to Microsoft for authenticating your purchased copy of Minecraft, which enables you to connect to online mode Minecraft servers.
56+
57+
Analytics may be added in the future, but are currently not present.

src/screens/chat/packetHandler.ts

+21-9
Original file line numberDiff line numberDiff line change
@@ -90,28 +90,40 @@ export const packetHandler =
9090
charLimit: number
9191
) =>
9292
(packet: Packet) => {
93+
const { protocolVersion } = connection.options
9394
if (statusRef.current === 'CONNECTING' && connection.loggedIn) {
9495
setLoading('')
9596
statusRef.current = 'CONNECTED'
96-
const joinMessageToSend = joinMessage.substring(0, charLimit).trim()
97-
if (sendJoinMessage && joinMessageToSend) {
98-
const protocolVer = connection.options.protocolVersion
97+
const messageToSend = joinMessage.substring(0, charLimit).trim()
98+
if (sendJoinMessage && messageToSend) {
9999
connection
100-
.writePacket(...makeChatMessagePacket(joinMessageToSend, protocolVer))
100+
.writePacket(...makeChatMessagePacket(messageToSend, protocolVersion))
101101
.catch(handleError(addMessage, sendMessageError))
102102
}
103103
if (sendSpawnCommand) {
104-
const protocolVer = connection.options.protocolVersion
105104
connection
106-
.writePacket(...makeChatMessagePacket('/spawn', protocolVer))
105+
.writePacket(...makeChatMessagePacket('/spawn', protocolVersion))
107106
.catch(handleError(addMessage, sendMessageError))
108107
}
109108
}
110109

111-
const is117 = connection.options.protocolVersion >= protocolMap[1.17]
112-
const is119 = connection.options.protocolVersion >= protocolMap[1.19]
113-
const is1191 = connection.options.protocolVersion >= protocolMap['1.19.1']
110+
const is117 = protocolVersion >= protocolMap[1.17]
111+
const is119 = protocolVersion >= protocolMap[1.19]
112+
const is1191 = protocolVersion >= protocolMap['1.19.1']
114113
if (
114+
/* Respawn */
115+
(packet.id === 0x39 && !is117) ||
116+
(packet.id === 0x3d && is117 && !is119) ||
117+
(packet.id === 0x3b && is119 && !is1191) ||
118+
(packet.id === 0x3e && is1191)
119+
) {
120+
// Send spawn command when switching worlds.
121+
if (sendSpawnCommand) {
122+
connection
123+
.writePacket(...makeChatMessagePacket('/spawn', protocolVersion))
124+
.catch(handleError(addMessage, sendMessageError))
125+
}
126+
} else if (
115127
/* Chat Message (clientbound) */
116128
(packet.id === 0x0e && !is117) ||
117129
(packet.id === 0x0f && is117 && !is119)

0 commit comments

Comments
 (0)