Skip to content

Commit

Permalink
docs: Add RCON
Browse files Browse the repository at this point in the history
also more grammer fixes
  • Loading branch information
Snowiiii committed Oct 16, 2024
1 parent 85fc81a commit 05bcde4
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 72 deletions.
14 changes: 0 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,6 @@ There are several ways you can contribute to Pumpkin:
Ensure your code adheres to our project structure and style guidelines.
Write clear and concise commit messages that describe your changes.

### Faster Compiles

We use extism for our plugins, unfortunately extism has quite a hefty impact on compile times, which can increase it by several minutes on release mode. To run Pumpkin without plugins, run the following:

```shell
cargo run --no-default-features
```

And in release:

```shell
cargo run --no-default-features --release
```

### Docs
The Documentation of Pumpkin can be found at https://snowiiii.github.io/Pumpkin/

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ and customizable experience. It prioritizes performance and player enjoyment whi
- **Performance**: Leveraging multi-threading for maximum speed and efficiency.
- **Compatibility**: Supports the latest Minecraft server version and adheres to vanilla game mechanics.
- **Security**: Prioritizes security by preventing known exploits.
- **Flexibility**: Highly configurable with the ability to disable unnecessary features.
- **Flexibility**: Highly configurable, with the ability to disable unnecessary features.
- **Extensibility**: Provides a foundation for plugin development.

## What Pumpkin will not

- Be a drop-in replacement for vanilla or other servers
- Be a drop-in replacement for Vanilla or other servers
- Be compatible with plugins or mods for other servers
- Function as a framework for building a server from scratch.

Expand Down
2 changes: 2 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export default defineConfig({
{ text: "Introduction", link: "/developer/introduction" },
{ text: "Networking", link: "/developer/networking" },
{ text: "Authentication", link: "/developer/authentication" },
{ text: "RCON", link: "/developer/rcon" },

],
},

Expand Down
11 changes: 11 additions & 0 deletions docs/about/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ Run args:

<sub><sup>pumpkin does cache already loaded chunks, resulting in no extra RAM besides player data and minimal CPU usage</sup></sub>

#### Compile time
Compiling from Nothing

**Debug:** 10.35sec
**Release:** 38.40sec

Recompilation (pumpkin crate)

**Debug:** 1.82sec
**Release:** 28.68sec

## Vanilla

Release: [1.21.1](https://piston-data.mojang.com/v1/objects/59353fb40c36d304f2035d51e7d6e6baa98dc05c/server.jar)
Expand Down
2 changes: 1 addition & 1 deletion docs/about/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and customizable experience. It prioritizes performance and player enjoyment whi
- **Performance**: Leveraging multi-threading for maximum speed and efficiency.
- **Compatibility**: Supports the latest Minecraft server version and adheres to vanilla game mechanics.
- **Security**: Prioritizes security by preventing known exploits.
- **Flexibility**: Highly configurable with the ability to disable unnecessary features.
- **Flexibility**: Highly configurable, with the ability to disable unnecessary features.
- **Extensibility**: Provides a foundation for plugin development.

## What Pumpkin will not
Expand Down
6 changes: 3 additions & 3 deletions docs/about/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

There are currently no release builds, because there was no release :D.

To get Pumpkin running you first have to clone it:
To get Pumpkin running, you first have to clone it:

```shell
git clone https://github.com/Snowiiii/Pumpkin.git
cd Pumpkin
```

You also may have to [install rust](https://www.rust-lang.org/tools/install) when you don't already have.
You may also have to [install rust](https://www.rust-lang.org/tools/install) when you don't already have it.

You can place a vanilla world into the Pumpkin/ directory when you want. Just name the World to `world`

Expand All @@ -34,7 +34,7 @@ The image is currently not published anywhere, but you can use the following com
docker build . -t pumpkin
```

To run it use the following command:
To run, it use the following command:

```shell
docker run --rm -p 25565:25565 -v "./world:/pumpkin/world" pumpkin
Expand Down
22 changes: 11 additions & 11 deletions docs/config/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

`proxy`

Wether Proxy Configuration is enabled
Whether Proxy Configuration is Enabled

```toml
enabled=false
Expand All @@ -14,7 +14,7 @@ enabled=false

`proxy.velocity`

Wether [Velocity](https://papermc.io/software/velocity) Proxy is enabled
Whether [Velocity](https://papermc.io/software/velocity) Proxy is enabled

> [!IMPORTANT]
> Velocity support is currently WIP
Expand All @@ -35,7 +35,7 @@ secret=

`authentication`

Wether Authentication is enabled
Whether Authentication is enabled

```toml
enabled=false
Expand Down Expand Up @@ -151,7 +151,7 @@ cape=true
#### Elytra

Use player elytras
(i didn't know myself that there are custom elytras)
(I didn't know myself that there are custom elytras)

```toml
elytra=true
Expand All @@ -161,7 +161,7 @@ elytra=true

`packet_compression`

Wether Packet Compression is enabled
Whether Packet Compression is enabled

```toml
enable=true
Expand All @@ -171,7 +171,7 @@ enable=true

#### Threshold

The compression threshold used when compression is enabled
The compression threshold is used when compression is enabled

```toml
threshold=256
Expand All @@ -196,7 +196,7 @@ level=4

`resource_pack`

Wether a Resource Pack is enabled
Whether a Resource Pack is enabled

```toml
enable=false
Expand Down Expand Up @@ -248,7 +248,7 @@ use_console=true

### Log Console

Should be commands from players be logged in console
Should commands from players be logged into the console?

```toml
log_console=true
Expand All @@ -258,7 +258,7 @@ log_console=true

`rcon`

Wether RCON is enabled
Whether RCON is enabled

```toml
enable=false
Expand Down Expand Up @@ -362,7 +362,7 @@ knockback=true

### Swing

Should player swing when attacking
Should players swing when attacking?

```toml
swing=true
Expand Down Expand Up @@ -396,7 +396,7 @@ Trace

### Env

Enables the user to choose log level by setting `RUST_LOG=<level>` environment variable
Enables the user to choose log level by setting the `RUST_LOG=<level>` environment variable

```toml
env=false
Expand Down
16 changes: 8 additions & 8 deletions docs/developer/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

### Why Authentication

Minecraft is the most Popular game out there, And is is very easy to play it without paying for it. In Fact you don't pay for the Game, You pay for an Minecraft Account.
People who don't bough the Game but play online are using [Cracked Accounts](#cracked-accounts)
Minecraft is the most Popular game out there, And is very easy to play it without paying for it. In Fact, you don't pay for the Game, You pay for a Minecraft Account.
People who don't buy the Game, but play it online are using [Cracked Accounts](#cracked-accounts)

#### Cracked Accounts

Expand All @@ -13,22 +13,22 @@ People who don't bough the Game but play online are using [Cracked Accounts](#cr
- Have no Skin/Cape
- Not Secure

The Problem is that everyone can name themself how they want, Allowing to Join the Server as a Staff Member for example and having extended permissions,
Cracked accounts are also often used for Botting and [Denial of Service](https://de.wikipedia.org/wiki/Denial_of_Service) Attacks.
The Problem is that everyone can name themselves however they want, by, for example, allowing them to Join the Server as a Staff Member for example and having extended permissions.
Cracked accounts are also often used for Botting and [Denial of Service](https://de.wikipedia.org/wiki/Denial_of_Service) attacks.

### Cracked Server

By default the `online_mode` is enabled in the configuration, This enables Authentication disallowing [Cracked Accounts](#cracked-accounts). When you are willing to allow Cracked Accounts, you can dissable `online_mode`
By default, the `online_mode` is enabled in the configuration, This enables Authentication disabling [Cracked Accounts](#cracked-accounts). When you are willing to allow Cracked Accounts, you can disable `online_mode`
in the `configuration.toml`

### How Mojang Authentication works

To ensure a player has a premium accounts:

1. A client with a premium account sends a login request to the Mojang session server.
2. **Mojang's servers** verify the client's credentials and add the player to the their Servers
3. Now our server will send a Request to the Session servers and check if the Player has joined the Session Server.
4. If the request was successfull, It will give use more information about the Player (e.g. UUID, Name, Skin/Cape...)
2. **Mojang's servers** verify the client's credentials and add the player to their servers.
3. Now, our server will send a Request to the Session servers and check if the Player has joined the Session Server.
4. If the request is successful, It will give use more information about the Player (e.g. UUID, Name, Skin/Cape...)

### Custom Authentication Server

Expand Down
34 changes: 17 additions & 17 deletions docs/developer/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Most of the Networking code in Pumpkin, can be found at [Pumpkin-Protocol](https://github.com/Snowiiii/Pumpkin/tree/master/pumpkin-protocol)

Serverbound: Client->Server
Serverbound: ClientServer

Clientbound: Server->Client
Clientbound: ServerClient

### Structure

Expand All @@ -16,30 +16,30 @@ Packets in the Pumpkin protocol are organized by functionality and state.

### States

**Handshake**: Always the first packet being send from the Client. This begins also determins the next state, usally to indicate if the player thans perform a Status Request, Join the Server or wants to be transfered.
**Handshake**: Always the first packet being sent from the Client. This begins also determines the next state, usually to indicate if the player wants to perform a Status Request, Join the Server or want to be transferred.

**Status**: Indicates the Client wants to see a Status response (MOTD).

**Login**: The Login sequence. Indicates the Client wants to join to the Server

**Config**: A sequence of Configuration packets beining mostly send from the Server to the Client. (Features, Resource Pack, Server Links...)
**Config**: A sequence of Configuration packets is mostly sent from the Server to the Client. (Features, Resource Pack, Server Links, etc.)

**Play**: The final state which indicate the Player is now ready to Join in also used to handle all other Gameplay packets.
**Play**: The final state, which indicates the Player is now ready to join, is also used to handle all other Gameplay packets.

### Minecraft Protocol

You can find all Minecraft Java packets at https://wiki.vg/Protocol. There you also can see in which [State](#States) they are.
You also can see all the information the Packets has which we can either Write or Read depending if its Serverbound or Clientbound
You can also can see all the information the Packets have, which we can either Write or Read depending on whether they Serverbound or Clientbound

### Adding a Clientbound Packet

1. Adding a Packet is easy. First you have to derive serde Serialize for packets.
1. Adding a Packet is easy. First, you have to derive serde Serialize for packets.

```rust
#[derive(Serialize)]
```

2. Next you have set the packet id using the packet macro
2. Next, you have set the packet ID using the packet macro

```rust
#[packet(0x1D)]
Expand Down Expand Up @@ -69,7 +69,7 @@ pub struct CPlayDisconnect {
}
```

4. Also don't forgot to impl a new function for Clientbound Packets so we can actaully send then by putting in the values
4. Also don't forgot to impl a new function for Clientbound Packets so we can actually send them by putting in the values

Example:

Expand All @@ -81,7 +81,7 @@ impl CPlayDisconnect {
}
```

5. At the End everything should come together,
5. At the End, everything should come together.

```rust
#[derive(Serialize)]
Expand All @@ -97,7 +97,7 @@ impl CPlayDisconnect {
}
```

6. You can also Serialize the Packet manually, Which can be usefull if the Packet is more complex
6. You can also Serialize the Packet manually, Which can be useful if the Packet is more complex

```diff
-#[derive(Serialize)]
Expand All @@ -112,13 +112,13 @@ impl CPlayDisconnect {

### Adding a Serverbound Packet

1. Adding a Packet is easy. First you have to dereive serde Deserialize for packets.
1. Adding a Packet is easy. First, you have to derive serde Deserialize for packets.

```rust
#[derive(Deserialize)]
```

2. Next you have set the packet id using the packet macro
2. Next, you have set the packet ID using the packet macro

```rust
#[packet(0x1A)]
Expand Down Expand Up @@ -146,7 +146,7 @@ pub struct SPlayerPosition {
}
```

4. At the End everything should come together,
4. At the End, everything should come together.

```rust
#[derive(Deserialize)]
Expand All @@ -159,7 +159,7 @@ pub struct SPlayerPosition {
}
```

5. You can also Deserialize the Packet manually, Which can be usefull if the Packet is more complex
5. You can also Deserialize the Packet manually, Which can be useful if the Packet is more complex

```diff
-#[derive(Deserialize)]
Expand All @@ -179,7 +179,7 @@ pub struct SPlayerPosition {

### Client

Pumpkin has stores Client and Players seperatly, Everything what is not reached the Play State is a Simple Client. Here are the Differences
Pumpkin has stores Client and Players separately. Everything that is not in the Play State is a Simple Client. Here are the Differences

**Client**

Expand Down Expand Up @@ -267,7 +267,7 @@ For Players:
```

### Compression
Minecraft Packets **can** use the ZLib compression for decoding/encoding there is usally a threshold set when compression is applied, This most often affects Chunk Packets.
Minecraft Packets **can** use the ZLib compression for decoding/ encoding. There is usually a threshold set when compression is applied, This most often affects Chunk Packets.

### Porting

Expand Down
Loading

0 comments on commit 05bcde4

Please sign in to comment.