22 <img src =" .assets/illustration.png " width =" 500 " />
33 <br >
44 <img src =" https://img.shields.io/badge/language-java-gold?style=flat " />
5- <img src =" https://img.shields.io/badge/beta-v1.0-gold?style=flat " />
5+ <img src =" https://img.shields.io/badge/beta-v1.0.1 -gold?style=flat " />
66 <img src =" https://img.shields.io/github/stars/rmilansky/minecraft-protocol-java?style=flat " />
77</div >
88
@@ -25,8 +25,83 @@ This project is designed for the most convenient and integrable development of s
2525* Simplify packet handling and monitoring as much as possible.
2626* Ensure integration with all modern server cores and standalone applications.
2727
28+ #
29+
2830# Usage Guide
2931
32+ ## Maven / Gradle library adding
33+
34+ 1 . Add a repository:
35+
36+ Maven:
37+ ``` xml
38+ <repositories >
39+ <repository >
40+ <id >milansky-repo</id >
41+ <url >https://maven.milansky.ovh/releases</url >
42+ </repository >
43+ </repositories >
44+ ```
45+ Gradle:
46+ ``` groovy
47+ repositories {
48+ maven {
49+ url = "https://maven.milansky.ovh/releases"
50+ }
51+ }
52+ ```
53+
54+ 2 . Add dependencies
55+
56+ Maven:
57+ ``` xml
58+ <properties >
59+ <protocol .version>1.0.1</protocol .version>
60+ </properties >
61+
62+ <dependencies >
63+ <dependency >
64+ <groupId >by.milansky.protocol</groupId >
65+ <artifactId >api</artifactId >
66+ <version >${protocol.version}</version >
67+ </dependency >
68+ <dependency >
69+ <groupId >by.milansky.protocol</groupId >
70+ <artifactId >base</artifactId >
71+ <version >${protocol.version}</version >
72+ </dependency >
73+ <dependency >
74+ <groupId >by.milansky.protocol</groupId >
75+ <artifactId >vanilla-protocol</artifactId >
76+ <version >${protocol.version}</version >
77+ </dependency >
78+
79+ <!-- Add bukkit if you need it -->
80+ <dependency >
81+ <groupId >by.milansky.protocol</groupId >
82+ <artifactId >bukkit</artifactId >
83+ <version >${protocol.version}</version >
84+ </dependency >
85+ </dependencies >
86+ ```
87+
88+ Gradle:
89+ ``` groovy
90+ dependencies {
91+ // It's better to use gradle's dependencyResolutionManagement
92+ def protocolVersion = '1.0.1'
93+
94+ compileOnly "by.milansky.protocol:api:${protocolVersion}"
95+ compileOnly "by.milansky.protocol:base:${protocolVersion}"
96+ compileOnly "by.milansky.protocol:vanilla-protocol:${protocolVersion}"
97+
98+ // Add bukkit if you need it
99+ compileOnly "by.milansky.protocol:bukkit:${protocolVersion}"
100+ }
101+ ```
102+
103+ ## Java API usage
104+
30105More detailed usage examples can be found in the [ examples] ( examples ) directory. However, to briefly explain, here's how you can listen to all ` ClientboundTeam ` packets:
31106
321071 . Create a handler to process packets:
0 commit comments