CraftiGames.py 2.2.4__tar.gz → 2.2.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. craftigames_py-2.2.5/CraftiGames/Games/Bedwars.py +472 -0
  2. craftigames_py-2.2.5/CraftiGames/Games/Practice.py +591 -0
  3. craftigames_py-2.2.5/CraftiGames/Games/Skywars.py +382 -0
  4. craftigames_py-2.2.5/CraftiGames/Games/__init__.py +835 -0
  5. craftigames_py-2.2.5/CraftiGames/JartexnetworkWrapper.py +785 -0
  6. craftigames_py-2.2.5/CraftiGames/PikanetworkWrapper.py +891 -0
  7. craftigames_py-2.2.5/CraftiGames/Punishments/__init__.py +122 -0
  8. craftigames_py-2.2.5/CraftiGames/Ratelimits/JartexNetworkRateLimitHandler.py +81 -0
  9. craftigames_py-2.2.5/CraftiGames/Ratelimits/PikaNetworkRateLimitHandler.py +81 -0
  10. craftigames_py-2.2.5/CraftiGames/Ratelimits/__init__.py +26 -0
  11. craftigames_py-2.2.5/CraftiGames/RefactorAPI/Guilds.py +268 -0
  12. craftigames_py-2.2.5/CraftiGames/RefactorAPI/Leaderboard.py +73 -0
  13. craftigames_py-2.2.5/CraftiGames/RefactorAPI/NetworkStatus.py +89 -0
  14. craftigames_py-2.2.5/CraftiGames/RefactorAPI/Profiles.py +488 -0
  15. craftigames_py-2.2.5/CraftiGames/RefactorAPI/Recaps.py +686 -0
  16. craftigames_py-2.2.5/CraftiGames/RefactorAPI/__init__.py +23 -0
  17. craftigames_py-2.2.5/CraftiGames/ResponseError/__init__.py +34 -0
  18. craftigames_py-2.2.5/CraftiGames/Skins/StarlightWrapper.py +371 -0
  19. craftigames_py-2.2.5/CraftiGames/Skins/SurgeplayWrapper.py +246 -0
  20. craftigames_py-2.2.5/CraftiGames/Skins/__init__.py +26 -0
  21. craftigames_py-2.2.5/CraftiGames/_Logger/__init__.py +32 -0
  22. craftigames_py-2.2.5/CraftiGames/__init__.py +73 -0
  23. craftigames_py-2.2.5/CraftiGames/utils.py +612 -0
  24. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/CraftiGames.py.egg-info/PKG-INFO +1 -1
  25. craftigames_py-2.2.5/CraftiGames.py.egg-info/SOURCES.txt +33 -0
  26. craftigames_py-2.2.5/CraftiGames.py.egg-info/top_level.txt +1 -0
  27. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/PKG-INFO +1 -1
  28. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/setup.py +1 -2
  29. craftigames_py-2.2.4/CraftiGames.py.egg-info/SOURCES.txt +0 -10
  30. craftigames_py-2.2.4/CraftiGames.py.egg-info/top_level.txt +0 -3
  31. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/CraftiGames.py.egg-info/dependency_links.txt +0 -0
  32. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/CraftiGames.py.egg-info/requires.txt +0 -0
  33. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/LICENSE +0 -0
  34. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/MANIFEST.in +0 -0
  35. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/README.md +0 -0
  36. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/requirements.txt +0 -0
  37. {craftigames_py-2.2.4 → craftigames_py-2.2.5}/setup.cfg +0 -0
@@ -0,0 +1,472 @@
1
+ """
2
+ MIT License
3
+
4
+ Copyright (c) 2024 sti1ltyping
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+ """
24
+
25
+ from CraftiGames.Games import Stats # type: ignore
26
+
27
+ class Bedwars:
28
+ """
29
+ Wraps Bedwars
30
+ ~~~~~
31
+
32
+ ==================================================================================================
33
+
34
+ MIT License
35
+
36
+ Copyright (c) 2024 sti1ltyping
37
+
38
+ Permission is hereby granted, free of charge, to any person obtaining a copy
39
+ of this software and associated documentation files (the "Software"), to deal
40
+ in the Software without restriction, including without limitation the rights
41
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42
+ copies of the Software, and to permit persons to whom the Software is
43
+ furnished to do so, subject to the following conditions:
44
+
45
+ The above copyright notice and this permission notice shall be included in all
46
+ copies or substantial portions of the Software.
47
+
48
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54
+ SOFTWARE."""
55
+
56
+ def __init__(self, data: dict):
57
+ self.raw: dict = data
58
+ self.__stats__: Stats = Stats(self.raw)
59
+
60
+ @property
61
+ def wins(self) -> int:
62
+ """
63
+ Returns
64
+ - Number of wins. (int)
65
+ """
66
+ return self.__stats__._wins(
67
+ value=True,
68
+ leaderboard=False
69
+ )
70
+
71
+ @property
72
+ def wins_lb(self) -> int:
73
+ """
74
+ Returns
75
+ - Leaderboard position based on number of wins. (int)
76
+ """
77
+ return self.__stats__._wins(
78
+ value=False,
79
+ leaderboard=True
80
+ )
81
+
82
+ @property
83
+ def losses(self) -> int:
84
+ """
85
+ Returns
86
+ - Number of losses. (int)
87
+ """
88
+ return self.__stats__._losses(
89
+ value=True,
90
+ leaderboard=False
91
+ )
92
+
93
+ @property
94
+ def losses_lb(self) -> int:
95
+ """
96
+ Returns
97
+ - Leaderboard position based on number of losses. (int)
98
+ """
99
+ return self.__stats__._losses(
100
+ value=False,
101
+ leaderboard=True
102
+ )
103
+
104
+ @property
105
+ def wlr(self) -> float:
106
+ """
107
+ Returns
108
+ - Wins is to losses ratio. (float)
109
+ """
110
+ return self.__stats__._wlr()
111
+
112
+ @property
113
+ def win_rate(self) -> float:
114
+ """
115
+ Returns
116
+ - Win rate, calculated using previous wins & losses. (float)
117
+ """
118
+ return self.__stats__._win_rate()
119
+
120
+ @property
121
+ def lose_rate(self) -> float:
122
+ """
123
+ Returns
124
+ - Lose rate, calculated using previous wins & losses. (float)
125
+ """
126
+ return self.__stats__._lose_rate()
127
+
128
+ @property
129
+ def kills(self) -> int:
130
+ """
131
+ Returns
132
+ - Number of kills. (int)
133
+ """
134
+ return self.__stats__._kills(
135
+ value=True,
136
+ leaderboard=False
137
+ )
138
+
139
+ @property
140
+ def kills_lb(self) -> int:
141
+ """
142
+ Returns
143
+ - Leaderboard position based on number of kills. (int)
144
+ """
145
+ return self.__stats__._kills(
146
+ value=False,
147
+ leaderboard=True
148
+ )
149
+
150
+ @property
151
+ def deaths(self) -> int:
152
+ """
153
+ Returns
154
+ - Number of deaths. (int)
155
+ """
156
+ return self.__stats__._deaths(
157
+ value=True,
158
+ leaderboard=False
159
+ )
160
+
161
+ @property
162
+ def deaths_lb(self) -> int:
163
+ """
164
+ Returns
165
+ - Leaderboard position based on number of deaths. (int)
166
+ """
167
+ return self.__stats__._deaths(
168
+ value=False,
169
+ leaderboard=True
170
+ )
171
+
172
+ @property
173
+ def kdr(self) -> int:
174
+ """
175
+ Returns
176
+ - Kill is to death ratio. (float)
177
+ """
178
+ return self.__stats__._kdr()
179
+
180
+ @property
181
+ def kill_rate(self) -> float:
182
+ """
183
+ Returns
184
+ - kill rate, calculated using previous kills & deaths. (float)
185
+ """
186
+ return self.__stats__._kill_rate()
187
+
188
+ @property
189
+ def death_rate(self) -> float:
190
+ """
191
+ Returns
192
+ - death rate, calculated using previous kills & deaths. (float)
193
+ """
194
+ return self.__stats__._death_rate()
195
+
196
+ @property
197
+ def final_kills(self) -> int:
198
+ """
199
+ Returns
200
+ - Number of final kills. (int)
201
+ """
202
+ return self.__stats__._final_kills(
203
+ value=True,
204
+ leaderboard=False
205
+ )
206
+
207
+ @property
208
+ def final_kills_lb(self) -> int:
209
+ """
210
+ Returns
211
+ - Leaderboard position based on number of final kills. (int)
212
+ """
213
+ return self.__stats__._final_kills(
214
+ value=False,
215
+ leaderboard=True
216
+ )
217
+
218
+ @property
219
+ def final_deaths(self) -> int:
220
+ """
221
+ Returns
222
+ - Number of final deaths. (int)
223
+ """
224
+ return self.__stats__._final_deaths(
225
+ value=True,
226
+ leaderboard=False
227
+ )
228
+
229
+ @property
230
+ def final_deaths_lb(self) -> int:
231
+ """
232
+ Returns
233
+ - Leaderboard position based on number of final deaths. (int)
234
+ """
235
+ return self.__stats__._final_deaths(
236
+ value=False,
237
+ leaderboard=True
238
+ )
239
+
240
+ @property
241
+ def fkdr(self) -> float:
242
+ """
243
+ Returns
244
+ - Final kills is to final deaths ratio. (float)
245
+ """
246
+ return self.__stats__._fkdr()
247
+
248
+ @property
249
+ def final_kill_rate(self) -> float:
250
+ """
251
+ Returns
252
+ - final kill rate, calculated using previous final kills & final deaths. (float)
253
+ """
254
+ return self.__stats__._final_kill_rate()
255
+
256
+ @property
257
+ def final_death_rate(self) -> float:
258
+ """
259
+ Returns
260
+ - final death rate, calculated using previous final kills & final deaths. (float)
261
+ """
262
+ return self.__stats__._final_death_rate()
263
+
264
+ @property
265
+ def beds_destroyed(self) -> int:
266
+ """
267
+ Returns
268
+ - Number of beds destroyed. (int)
269
+ """
270
+ return self.__stats__._beds_destroyed(
271
+ value=True,
272
+ leaderboard=False
273
+ )
274
+
275
+ @property
276
+ def beds_destroyed_lb(self) -> int:
277
+ """
278
+ Returns
279
+ - Leaderboard position based on number of beds destroyed. (int)
280
+ """
281
+ return self.__stats__._beds_destroyed(
282
+ value=False,
283
+ leaderboard=True
284
+ )
285
+
286
+ @property
287
+ def highest_winstreak_reached(self) -> int:
288
+ """
289
+ Returns
290
+ - highest winsteak reached. (int)
291
+ """
292
+ return self.__stats__._highest_winstreak_reached(
293
+ value=True,
294
+ leaderboard=False
295
+ )
296
+
297
+ @property
298
+ def highest_winstreak_reached_lb(self) -> int:
299
+ """
300
+ Returns
301
+ - Leaderboard position based on highest winstreak. (int)
302
+ """
303
+ return self.__stats__._highest_winstreak_reached(
304
+ value=False,
305
+ leaderboard=True
306
+ )
307
+
308
+ @property
309
+ def bow_kills(self) -> int:
310
+ """
311
+ Returns
312
+ - Number of bow kills. (int)
313
+ """
314
+ return self.__stats__._bow_kills(
315
+ value=True,
316
+ leaderboard=False
317
+ )
318
+
319
+ @property
320
+ def bow_kills_lb(self) -> int:
321
+ """
322
+ Returns
323
+ - Leaderboard position based on number of bow kills. (int)
324
+ """
325
+ return self.__stats__._bow_kills(
326
+ value=False,
327
+ leaderboard=True
328
+ )
329
+
330
+ @property
331
+ def arrows_shot(self) -> int:
332
+ """
333
+ Returns
334
+ - Number of arrows shot. (int)
335
+ """
336
+ return self.__stats__._arrows_shot(
337
+ value=True,
338
+ leaderboard=False
339
+ )
340
+
341
+ @property
342
+ def arrows_shot_lb(self) -> int:
343
+ """
344
+ Returns
345
+ - Leaderboard position based on number of arrows shot. (int)
346
+ """
347
+ return self.__stats__._arrows_shot(
348
+ value=False,
349
+ leaderboard=True
350
+ )
351
+
352
+ @property
353
+ def arrows_hit(self) -> int:
354
+ """
355
+ Returns
356
+ - Number of arrows hit. (int)
357
+ """
358
+ return self.__stats__._arrows_hit(
359
+ value=True,
360
+ leaderboard=False
361
+ )
362
+
363
+ @property
364
+ def arrows_hit_lb(self) -> int:
365
+ """
366
+ Returns
367
+ - Leaderboard position based on number of arrows hit. (int)
368
+ """
369
+ return self.__stats__._arrows_hit(
370
+ value=False,
371
+ leaderboard=True
372
+ )
373
+
374
+ @property
375
+ def ahr(self) -> float:
376
+ """
377
+ Returns
378
+ - Arrow hit ratio. (float)
379
+ """
380
+ return self.__stats__._ahr()
381
+
382
+ @property
383
+ def arrow_hit_rate(self) -> float:
384
+ """
385
+ Returns
386
+ - Arrow hit rate, calculated using previous arrows shot & arrows hit. (float)
387
+ """
388
+ return self.__stats__._arrow_hit_rate()
389
+
390
+ @property
391
+ def arrow_miss_rate(self) -> float:
392
+ """
393
+ Returns
394
+ - Arrow miss rate, calculated using previous arrows shot & arrows hit. (float)
395
+ """
396
+ return self.__stats__._arrow_miss_rate()
397
+
398
+ @property
399
+ def melee_kills(self) -> int:
400
+ """
401
+ Returns
402
+ - Number of melee kills. (int)
403
+ """
404
+ return self.__stats__._melee_kills(
405
+ value=True,
406
+ leaderboard=False
407
+ )
408
+
409
+ @property
410
+ def melee_kills_lb(self) -> int:
411
+ """
412
+ Returns
413
+ - Leaderboard position based on number of melee kills. (int)
414
+ """
415
+ return self.__stats__._melee_kills(
416
+ value=False,
417
+ leaderboard=True
418
+ )
419
+
420
+ @property
421
+ def games_played(self) -> int:
422
+ """
423
+ Returns
424
+ - Number of games played. (int)
425
+ """
426
+ return self.__stats__._games_played(
427
+ value=True,
428
+ leaderboard=False
429
+ )
430
+
431
+ @property
432
+ def games_played_lb(self) -> int:
433
+ """
434
+ Returns
435
+ - Leaderboard position based on number of games played. (int)
436
+ """
437
+ return self.__stats__._games_played(
438
+ value=False,
439
+ leaderboard=True
440
+ )
441
+
442
+ @property
443
+ def void_kills(self) -> int:
444
+ """
445
+ Returns
446
+ - Number of void kills. (int)
447
+ """
448
+ return self.__stats__._void_kills(
449
+ value=True,
450
+ leaderboard=False
451
+ )
452
+
453
+ @property
454
+ def void_kills_lb(self) -> int:
455
+ """
456
+ Returns
457
+ - Leaderboard position based on number of void kills. (int)
458
+ """
459
+ return self.__stats__._void_kills(
460
+ value=False,
461
+ leaderboard=True
462
+ )
463
+
464
+ @property
465
+ def exploited(self) -> int:
466
+ """
467
+ Number of number of games left `/hub`.
468
+
469
+ Returns:
470
+ - Number of games left unplayed.
471
+ """
472
+ return self.__stats__._exploited()