mirror of
https://github.com/xoo0524tw/OpenArcadeGames.git
synced 2026-12-06 02:46:01 +02:00
Consolidate engine and games into common module and unify platform APIs
This commit is contained in:
1 parent
76ac0e3acd
commit
fbed884ad9
1353 files changed
+44571
-59600
No files matched your search
Generated
+7
@@ -0,0 +1,7 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Markdown personal settings
|
||||||
|
/markdown.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
Generated
+27
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel>
|
||||||
|
<module name="platform-api-latest" target="17" />
|
||||||
|
<module name="platform-api-legacy" target="17" />
|
||||||
|
</bytecodeTargetLevel>
|
||||||
|
</component>
|
||||||
|
<component name="JavacSettings">
|
||||||
|
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||||
|
<module name="common" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="jdk21" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="latest" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="legacy" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platform-api-latest" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platform-api-legacy" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platforms-latest-modern-a" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platforms-latest-modern-b" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platforms-latest-v1_18_R2" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platforms-latest-v1_19_R3" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platforms-latest-v1_20_R4" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platforms-latest-v1_21_R7" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platforms-legacy-v1_12_R1" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
<module name="platforms-legacy-v1_8_R3" options="-implicit:none -Xpkginfo:always" />
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+57
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/jdk21/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/jdk21/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platform-api-latest/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platform-api-latest/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platform-api-legacy/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platform-api-legacy/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-modern-a/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-modern-a/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-modern-b/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-modern-b/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-v1_18_R2/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-v1_18_R2/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-v1_19_R3/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-v1_19_R3/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-v1_20_R4/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-v1_20_R4/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-v1_21_R7/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/latest-v1_21_R7/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/legacy-v1_12_R1/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/legacy-v1_12_R1/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/legacy-v1_8_R3/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/build-support/modules/platforms/legacy-v1_8_R3/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/jdk21/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/jdk21/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/latest/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/latest/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/legacy/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/legacy/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platform-api-latest/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platform-api-latest/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platform-api-legacy/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platform-api-legacy/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-modern-a/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-modern-a/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-modern-b/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-modern-b/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-v1_18_R2/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-v1_18_R2/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-v1_19_R3/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-v1_19_R3/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-v1_20_R4/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-v1_20_R4/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-v1_21_R7/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/latest-v1_21_R7/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/legacy-v1_12_R1/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/legacy-v1_12_R1/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/legacy-v1_8_R3/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/platforms/legacy-v1_8_R3/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Central Repository" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+10
@@ -0,0 +1,10 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="ArcadeGames">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/ArcadeGames-2.19f-LEGACY-bm.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/ArcadeGames-2.19f-LATEST-bm.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# ArcadeGames 2.19f 原始碼重建與架構合併
|
||||||
|
|
||||||
|
## 目前目錄架構
|
||||||
|
|
||||||
|
```text
|
||||||
|
ArcadeGames/
|
||||||
|
├─ common/ 共用引擎、公開 API、十大遊戲主邏輯與版本抽象層(737 份 Java 來源)
|
||||||
|
├─ latest/ LATEST(1.18–26.2)版本適配、AdvancedSlimePaper 與打包組裝(6 份 Java 來源)
|
||||||
|
├─ legacy/ LEGACY(1.8.8–1.12.2)版本適配、Legacy 音效/FallingBlock 與打包組裝(5 份 Java 來源)
|
||||||
|
├─ build-support/ NMS 平台模組、jdk21、編譯依賴、驗證與建置工具(raw JAR 保留於 archive/)
|
||||||
|
├─ pom.xml
|
||||||
|
└─ build.ps1
|
||||||
|
```
|
||||||
|
|
||||||
|
已完成 **逆混淆** 與 **雙版本共用合併(方案 A:單一 `common` + 雙產物成品 JAR)**:
|
||||||
|
|
||||||
|
- `common/src/variants/` 與重複的 `platform-api-latest`/`platform-api-legacy` 模組已全面移除,所有上層遊戲與引擎邏輯統一在 `common/src/main/java`(737 份 `.java` 編譯為 740 個 `.class`),只在單一處維護並僅編譯一次。
|
||||||
|
- `common` 與具體 Spigot/NMS 版本的差異透過 `ro.fr33styler.arcade.platform.compat.VersionAdapter` / `VersionAdapters`、`ArcadeSound`、`ArcadeParticle`、`ArcadeMaterial`、`ArcadeColor`、`ColoredBlockType`、`GameBossBar`、`TeamRule` 等抽象邊界隔離,嚴格維持在 `spigot-api-1.8.8` 與 `spigot-api-1.20.1` 的 API 交集內。
|
||||||
|
- 公開 API `ro.fr33styler.arcade.api.engine.*`(56 份來源)、所有 YAML `@Setting` 鍵名、列舉常數與既有資源檔均完整保留;原 `build-support/archive/` 與原始 JAR 未作更動。
|
||||||
|
|
||||||
|
## 建置
|
||||||
|
|
||||||
|
使用 JDK 21 與 Maven 3,在專案根目錄執行:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
mvn clean verify
|
||||||
|
```
|
||||||
|
|
||||||
|
也可執行 `./build.ps1 clean verify`(或於離線環境使用 `mvn -o -T 1C clean verify`)。請執行到 `verify`,以確保 `FinalizeClasses` 完成 NMS `do_()` 至 `do()` 的位元組碼重連。
|
||||||
|
|
||||||
|
最終成品位於:
|
||||||
|
|
||||||
|
- `latest/target/ArcadeGames-2.19f-LATEST-reconstructed.jar`
|
||||||
|
- `legacy/target/ArcadeGames-2.19f-LEGACY-reconstructed.jar`
|
||||||
|
|
||||||
|
## 模組說明
|
||||||
|
|
||||||
|
| 模組 | 來源數 | 內容 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `common` | 737 `.java` | `api.engine.*`(56)、統一 `platform.api` 與 `compat`、核心引擎與全 10 款遊戲主邏輯 |
|
||||||
|
| `jdk21` | 1 `.java` | Java 21 virtual-thread 實作(由 `DefaultEngine` 於 JDK 21+ 動態載入) |
|
||||||
|
| `platforms/latest-*` | 6 組模組 | 1.18.2 / 1.19.4 / 1.20.6 / 1.21.11 / 26.1 / 26.2 的 NMS adapter |
|
||||||
|
| `platforms/legacy-*` | 2 組模組 | 1.8.8 / 1.12.2 的 NMS adapter 與 1.12.2 副手監聽 |
|
||||||
|
| `latest` | 6 `.java` | `Arcade`、`LatestVersionAdapter`、`SoundTypeToken`、`AdvancedSlimePaper*`(3)與 `plugin.yml`/資源 |
|
||||||
|
| `legacy` | 5 `.java` | `Arcade`、`LegacyVersionAdapter`、`LegacySounds`、`PartyGamesV1_8_8/1_12_2FallingBlockFactorySelector` 與 `plugin.yml`/資源 |
|
||||||
|
|
||||||
|
除 `jdk21` 以 Java 21 編譯外,其餘模組皆以 Java 17 為編譯目標。
|
||||||
|
|
||||||
|
## Java 套件
|
||||||
|
|
||||||
|
```text
|
||||||
|
ro.fr33styler.arcade
|
||||||
|
├─ api.engine.* 公開引擎 API(保留原名稱與介面)
|
||||||
|
├─ engine 設定、指令、玩家、session、文字、顯示、記分板、儲存與網路
|
||||||
|
├─ game 十大遊戲(BlockParty、BombLobbers、MiniWalls、PartyGames、PropHunt、Quake、Splegg、TempleRun、TNTRun、TNTTag)
|
||||||
|
├─ platform 統一平台契約、VersionAdapter / Bukkit / JDK 適配與 NMS 模組
|
||||||
|
├─ integration 第三方整合(PlaceholderAPI、NoteBlockAPI、Vault 等;AdvancedSlimePaper 僅於 latest)
|
||||||
|
├─ support IO、反射、文字、亂數與壓縮工具
|
||||||
|
├─ internal.compatibility
|
||||||
|
└─ vendor.bstats
|
||||||
|
```
|
||||||
|
|
||||||
|
## 來源與編譯相容處理
|
||||||
|
|
||||||
|
- `build-support/deps/provided-api-stubs.jar` 僅供編譯期提供 Spigot 與第三方外掛簽章,不封入最終成品 JAR。
|
||||||
|
- Java 無法直接命名的 NMS `do()` 方法仍透過 `do_()` 別名編譯,並由 `build-support/tools/build/FinalizeClasses.java` 依據 `build-support/tools/dependencies/external-reserved-names.tsv` 於 `verify` 階段精確重連為 `do()F`。
|
||||||
|
- 資源檔案均直接隨 `latest`/`legacy` 打包進成品 JAR,包含 `plugin.yml`、`template.dat`、`games/block-party/songs.zip` 等。
|
||||||
|
|
||||||
|
## 驗證結果
|
||||||
|
|
||||||
|
以下檢查均已於最後一次修改後執行並全數通過:
|
||||||
|
|
||||||
|
1. **完整建置與打包(`mvn -o -T 1C clean verify`)**:13 個 reactor 模組全部編譯與打包成功。
|
||||||
|
2. **`common` Spigot API 交集驗證(`build-support/tools/verification/CheckCommonApiIntersection.java`)**:使用 ASM 9.9.1 掃描 `build-support/target/common/classes` 共 740 個 `.class`,檢查所有 `org/bukkit/**` 與 `org/spigotmc/**` 型別、欄位與方法參照皆同時存在於 `spigot-api-1.8.8` 與 `spigot-api-1.20.1`,結果為 **0 項違規(PASS)**。
|
||||||
|
3. **NMS `do()` 位元組碼重連驗證(`javap -p -c`)**:檢查 `latest/target/ArcadeGames-2.19f-LATEST-reconstructed.jar` 內的 `MiniWallsV1_18_2Arrow` 與 `PropHuntV1_18_2PropEntity`,確認均已重連為 `Method do:()F`,無殘留 `do_()`。
|
||||||
|
4. **成品結構與資源檢查**:確認 `common/src/variants` 已不存在、`latest` 僅 6 檔、`legacy` 僅 5 檔,且兩份成品 JAR 均含 `plugin.yml`、`template.dat`、`games/block-party/songs.zip` 與 `ro/fr33styler/arcade/Arcade.class`。
|
||||||
|
5. **離線 Smoke 測試(`build-support/tools/verification/SmokeCheck.java`)**:分別搭配真實 `spigot-api-1.20.1`(`latest`)與 `spigot-api-1.8.8`(`legacy`)驗證字串 GZIP 壓縮往返、`Text`/`Contexts` 插值,以及全部 25 個 `ArcadeSound`、45 個 `ArcadeMaterial` 與 144 組 `ColoredBlockType × ArcadeColor` 解析均正常通過。
|
||||||
|
|
||||||
|
> 註:以上屬於編譯期、位元組碼與離線列舉/單元驗證;完整遊戲流程、NMS 封包與第三方外掛(如 AdvancedSlimePaper、PlaceholderAPI、NoteBlockAPI)互動仍建議搭配實際 Paper/Spigot 伺服器進行實機測試。
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# 編譯用 API
|
||||||
|
|
||||||
|
此目錄的 JAR 供 Maven 編譯器解析外部型別與成員簽章。它們使用 `system` scope,不得由 shade、assembly 或其他封裝步驟加入 ArcadeGames 成品。
|
||||||
|
|
||||||
|
`provided-api-stubs.jar` 提供共用的 Bukkit、外掛及第三方 API metadata,不含 `net.minecraft`、CraftBukkit 或 ArcadeGames 類別。平台模組另外選用對應的 `stubs-*.jar`,同次編譯只能使用一份平台 stub。伺服器執行時仍由實際 API/伺服器提供這些類別。
|
||||||
|
|
||||||
|
| 平台群組 | 編譯用 JAR |
|
||||||
|
| --- | --- |
|
||||||
|
| LATEST,CraftBukkit `v1_18_R2` | `stubs-latest-v1_18_R2.jar` |
|
||||||
|
| LATEST,CraftBukkit `v1_19_R3` | `stubs-latest-v1_19_R3.jar` |
|
||||||
|
| LATEST,CraftBukkit `v1_20_R4` | `stubs-latest-v1_20_R4.jar` |
|
||||||
|
| LATEST,CraftBukkit `v1_21_R7` | `stubs-latest-v1_21_R7.jar` |
|
||||||
|
| LATEST,未帶版本的 CraftBukkit 第一組 | `stubs-latest-modern-a.jar` |
|
||||||
|
| LATEST,未帶版本的 CraftBukkit 第二組 | `stubs-latest-modern-b.jar` |
|
||||||
|
| LEGACY,CraftBukkit `v1_8_R3` | `stubs-legacy-v1_8_R3.jar` |
|
||||||
|
| LEGACY,CraftBukkit `v1_12_R1` | `stubs-legacy-v1_12_R1.jar` |
|
||||||
|
|
||||||
|
`modern-a` 與 `modern-b` 只是區分兩套不同 NMS API 的建置群組名稱。這兩組都直接參照未帶版本的 CraftBukkit 套件;名稱不推定 Minecraft 版本。
|
||||||
|
|
||||||
|
## 來源與驗證
|
||||||
|
|
||||||
|
API metadata 以本機快取中的 Spigot API 1.8.8/1.20.1、Paper API 1.20.1、BungeeCord Chat、Guava、Netty、Gson、Authlib、Brigadier、Commons Lang 等真實依賴為底稿,另參考既有 MBedwars、HBedwars 重建專案的編譯用繼承定義。缺少的第三方類別及 NMS 成員,從兩版原始 ArcadeGames JAR 的 descriptor、`invokeinterface`、`new`、父類別與介面等 bytecode 證據補入。這些補入定義只滿足編譯,沒有實作外部服務行為。
|
||||||
|
|
||||||
|
產生器位於 `tools/dependencies/ArcadeStubGenerator.java`。`GenProvidedStubs.java` 改編自既有 MBedwars 工具,使用 ASM 9.9.1 以讀取 Java 21 classfile。ASM 的 `asm-util` 與 `asm-analysis` 取自 Maven Central;其餘 ASM 套件取自同版 Maven 快取。
|
||||||
|
|
||||||
|
已觀察到原始 LATEST 含有 11 組同 owner、方法名稱與參數,卻具有不同回傳型別的跨版本 NMS 方法。隔離平台 stub 可讓每組保留自己的精確 JVM descriptor,避免單份 union API 改變呼叫目標。
|
||||||
|
|
||||||
|
產出時已以 ASM 檢查全部類別結構;`CheckStubCoverage.java` 另確認兩版全部非 NMS 呼叫,以及八組平台中的外部方法/欄位,都能在所選 stub 及其父型別鏈找到精確 descriptor。這項檢查不代表外部 API 的執行行為已驗證,也不取代重建 JAR 的 ABI、語意及差異行為驗證。
|
||||||
|
|
||||||
|
原始名稱分組與依賴閉包見 `tools/dependencies/adapter-groups-with-suppliers.json`;類別與成員參照清單見同目錄的 `inventory.json`、`nms-usage.json`,產物雜湊見 `artifact-inventory.json`。
|
||||||
|
|
||||||
|
## 最終來源編譯檢查
|
||||||
|
|
||||||
|
`tools/dependencies/verify_platform_sources.py` 以 `javac --release 17 -encoding UTF-8 -proc:none -implicit:none -Xpkginfo:always` 分別編譯八組正式平台來源。每組 classpath 使用已從來源編出的 `common`、對應 `platform-api-*`,以及本目錄的共用 stub 與單一平台 stub。結果保存在 `tools/dependencies/final-source-compile.json` 和 `final-check/<group>/javac.log`。
|
||||||
|
|
||||||
|
2026-12-03 已觀察八組皆為 `exit=0`、`errors=0`。LATEST 各組 19 個來源檔,LEGACY 兩組各 23 個來源檔。這項檢查不使用原始外掛 JAR 作為編譯 classpath。
|
||||||
|
|
||||||
|
最後修復了三種編譯 metadata 問題。Guava `Predicate.test(T)` 依真實 Guava 21 API 保持 default 方法,避免合併 stub 產生第二個抽象 SAM;舊版 `PacketPlay*.a(PacketDataSerializer)` 保留 `IOException` 宣告,使原來源的 catch 可編譯;NMS 建構子與 Java 關鍵字編譯別名依各組原 bytecode 的精確 descriptor 剪裁,避免不同映射版本的多載歧義。
|
||||||
|
|
||||||
|
平台 stub 仍保留 seed 簽章解析需要的其他 namespaced 型別定義,供 javac 完成泛型與繼承 metadata 解析。這不代表重建外掛引用了那些伺服器版本;實際引用由成品 bytecode 驗證。同一編譯 classpath 仍只能選一份平台 stub。
|
||||||
+2
-2
@@ -5,8 +5,8 @@ import java.util.concurrent.Executors;
|
|||||||
import ro.fr33styler.arcade.api.engine.feature.JDK;
|
import ro.fr33styler.arcade.api.engine.feature.JDK;
|
||||||
|
|
||||||
public class Jdk21Features implements JDK {
|
public class Jdk21Features implements JDK {
|
||||||
public Thread newThread(Runnable var1) {
|
public Thread newThread(Runnable runnable) {
|
||||||
return Thread.ofVirtual().unstarted(var1);
|
return Thread.ofVirtual().unstarted(runnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExecutorService startSingleThreadExecutor() {
|
public ExecutorService startSingleThreadExecutor() {
|
||||||
|
|||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.game.prophunt.platform;
|
|
||||||
|
|
||||||
import ro.fr33styler.arcade.game.prophunt.prop.PropHuntPropType;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Particle;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
|
|
||||||
public interface PropHuntPropFactory {
|
|
||||||
Particle a();
|
|
||||||
|
|
||||||
PropHuntProp a(PropHuntPropType var1, ItemStack var2, Location var3);
|
|
||||||
}
|
|
||||||
-55
@@ -1,55 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.api;
|
|
||||||
|
|
||||||
import ro.fr33styler.arcade.platform.api.hologram.HologramEntity;
|
|
||||||
import ro.fr33styler.arcade.platform.api.network.PacketInterceptor;
|
|
||||||
import ro.fr33styler.arcade.platform.api.npc.NpcFactory;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.World;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.entity.Item;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.scoreboard.Score;
|
|
||||||
import org.bukkit.scoreboard.Team;
|
|
||||||
import org.bukkit.scoreboard.Team.OptionStatus;
|
|
||||||
import ro.fr33styler.arcade.api.engine.command.Command;
|
|
||||||
|
|
||||||
public interface ServerPlatform {
|
|
||||||
NpcFactory a();
|
|
||||||
|
|
||||||
PacketInterceptor b();
|
|
||||||
|
|
||||||
void a(Player var1);
|
|
||||||
|
|
||||||
void a(Player var1, Item var2);
|
|
||||||
|
|
||||||
void a(Command var1);
|
|
||||||
|
|
||||||
void b(Command var1);
|
|
||||||
|
|
||||||
default double b(Player var1) {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
default void a(Player var1, double var2) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void a(Block var1, Material var2);
|
|
||||||
|
|
||||||
default HologramEntity a(Location var1) {
|
|
||||||
return this.a(var1.getWorld(), var1.getX(), var1.getY(), var1.getZ());
|
|
||||||
}
|
|
||||||
|
|
||||||
HologramEntity a(World var1, double var2, double var4, double var6);
|
|
||||||
|
|
||||||
default boolean b(Location var1) {
|
|
||||||
return this.a(var1.getBlock(), var1.getX(), var1.getY(), var1.getZ());
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean a(Block var1, double var2, double var4, double var6);
|
|
||||||
|
|
||||||
void a(Player var1, boolean var2, Score var3, int var4);
|
|
||||||
|
|
||||||
void a(Player var1, Team var2, String var3, String var4, OptionStatus var5);
|
|
||||||
}
|
|
||||||
-70
@@ -1,70 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.api.npc;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
|
||||||
import ro.fr33styler.arcade.api.engine.config.annotation.Setting;
|
|
||||||
import ro.fr33styler.arcade.api.engine.config.serialize.Configuration;
|
|
||||||
|
|
||||||
public final class NpcEquipment implements Configuration {
|
|
||||||
@Setting("main-hand")
|
|
||||||
private Material a = Material.AIR;
|
|
||||||
@Setting("main-hand-model-data")
|
|
||||||
private int b = 0;
|
|
||||||
@Setting("off-hand")
|
|
||||||
private Material c = Material.AIR;
|
|
||||||
@Setting("off-hand-model-data")
|
|
||||||
private int d = 0;
|
|
||||||
@Setting("helmet")
|
|
||||||
private Material e = Material.AIR;
|
|
||||||
@Setting("helmet-model-data")
|
|
||||||
private int f = 0;
|
|
||||||
@Setting("chestplate")
|
|
||||||
private Material g = Material.AIR;
|
|
||||||
@Setting("chestplate-model-data")
|
|
||||||
private int h = 0;
|
|
||||||
@Setting("leggings")
|
|
||||||
private Material i = Material.AIR;
|
|
||||||
@Setting("leggings-model-data")
|
|
||||||
private int j = 0;
|
|
||||||
@Setting("boots")
|
|
||||||
private Material k = Material.AIR;
|
|
||||||
@Setting("boots-model-data")
|
|
||||||
private int l = 0;
|
|
||||||
|
|
||||||
public ItemStack a() {
|
|
||||||
return this.a(this.a, this.b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack b() {
|
|
||||||
return this.a(this.c, this.d);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack c() {
|
|
||||||
return this.a(this.e, this.f);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack d() {
|
|
||||||
return this.a(this.g, this.h);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack e() {
|
|
||||||
return this.a(this.i, this.j);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack f() {
|
|
||||||
return this.a(this.k, this.l);
|
|
||||||
}
|
|
||||||
|
|
||||||
private ItemStack a(Material var1, int var2) {
|
|
||||||
ItemMeta var3 = Bukkit.getItemFactory().getItemMeta(var1);
|
|
||||||
if (var3 != null) {
|
|
||||||
var3.setCustomModelData(var2 == 0 ? null : var2);
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemStack var4 = new ItemStack(var1);
|
|
||||||
var4.setItemMeta(var3);
|
|
||||||
return var4;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.api.npc;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
public interface NpcFactory {
|
|
||||||
Npc a(Location var1, Player var2);
|
|
||||||
|
|
||||||
Npc a(Location var1, String var2, SkinTexture var3, NpcEquipment var4);
|
|
||||||
}
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.api.npc;
|
|
||||||
|
|
||||||
import ro.fr33styler.arcade.api.engine.config.annotation.Setting;
|
|
||||||
import ro.fr33styler.arcade.api.engine.config.serialize.Configuration;
|
|
||||||
|
|
||||||
public final class SkinTexture implements Configuration {
|
|
||||||
@Setting("value")
|
|
||||||
private String a;
|
|
||||||
@Setting("signature")
|
|
||||||
private String b;
|
|
||||||
|
|
||||||
public SkinTexture() {
|
|
||||||
this("", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
public SkinTexture(String var1, String var2) {
|
|
||||||
this.a = var1;
|
|
||||||
this.b = var2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String a() {
|
|
||||||
return this.a;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String b() {
|
|
||||||
return this.b;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.bukkit.command;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
public class BukkitCommandBridge extends Command {
|
|
||||||
private final ro.fr33styler.arcade.api.engine.command.Command a;
|
|
||||||
|
|
||||||
BukkitCommandBridge(ro.fr33styler.arcade.api.engine.command.Command var1) {
|
|
||||||
super(var1.getCommand(), "", "/", var1.getAliases());
|
|
||||||
this.a = var1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(CommandSender var1, String var2, String[] var3) {
|
|
||||||
this.a.onExecute(var1, var2, var3);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> tabComplete(CommandSender var1, String var2, String[] var3) {
|
|
||||||
return this.a.onSuggestion(var1, var3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-62
@@ -1,62 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.bukkit.command;
|
|
||||||
|
|
||||||
import ro.fr33styler.arcade.support.reflect.Reflection;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Server;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandMap;
|
|
||||||
import org.bukkit.command.SimpleCommandMap;
|
|
||||||
|
|
||||||
public class BukkitCommands {
|
|
||||||
private static CommandMap a;
|
|
||||||
private static Map<String, Command> b;
|
|
||||||
|
|
||||||
public static void a(Command var0) {
|
|
||||||
if (b != null) {
|
|
||||||
var0.register(a);
|
|
||||||
b.put(var0.getName(), var0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void a(ro.fr33styler.arcade.api.engine.command.Command var0) {
|
|
||||||
if (b != null) {
|
|
||||||
BukkitCommandBridge var1 = new BukkitCommandBridge(var0);
|
|
||||||
var1.register(a);
|
|
||||||
b.put(var0.getCommand(), var1);
|
|
||||||
var0.getAliases().forEach(var1x -> b.put(var1x, var1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void b(ro.fr33styler.arcade.api.engine.command.Command var0) {
|
|
||||||
if (b != null) {
|
|
||||||
b.remove(var0.getCommand());
|
|
||||||
var0.getAliases().forEach(b::remove);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void a(String var0, List<String> var1) {
|
|
||||||
if (b != null) {
|
|
||||||
b.remove("minecraft:" + var0);
|
|
||||||
var1.forEach(var0x -> b.remove("minecraft:" + var0x));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void c(ro.fr33styler.arcade.api.engine.command.Command var0) {
|
|
||||||
a(var0.getCommand(), var0.getAliases());
|
|
||||||
}
|
|
||||||
|
|
||||||
static {
|
|
||||||
try {
|
|
||||||
Server var0 = Bukkit.getServer();
|
|
||||||
a = (CommandMap)var0.getClass().getMethod("getCommandMap").invoke(var0);
|
|
||||||
Field var1 = Reflection.a(SimpleCommandMap.class, "knownCommands");
|
|
||||||
b = (Map<String, Command>)Reflection.a(var1, a);
|
|
||||||
} catch (ReflectiveOperationException var2) {
|
|
||||||
var2.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-29
@@ -1,29 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.version;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
|
|
||||||
public class ServerVersion {
|
|
||||||
public static final String a = Bukkit.getServer().getBukkitVersion().substring(0, Bukkit.getServer().getBukkitVersion().length() - 14);
|
|
||||||
public static final int b = a(a);
|
|
||||||
public static final int c = b(a);
|
|
||||||
public static final boolean d = a();
|
|
||||||
|
|
||||||
public static int a(String var0) {
|
|
||||||
String[] var1 = var0.split("\\.");
|
|
||||||
return Integer.parseInt(var1[0].equals("1") ? var1[1] : var1[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int b(String var0) {
|
|
||||||
String[] var1 = var0.split("\\.");
|
|
||||||
return var1[0].equals("1") ? 0 : Integer.parseInt(var1[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean a() {
|
|
||||||
try {
|
|
||||||
Class.forName("com.destroystokyo.paper.ParticleBuilder");
|
|
||||||
return true;
|
|
||||||
} catch (ClassNotFoundException var1) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-37
@@ -1,37 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.support.reflect;
|
|
||||||
|
|
||||||
import ro.fr33styler.arcade.engine.config.validation.GenericTypeValidation;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
|
|
||||||
public class Reflection {
|
|
||||||
public static Field a(Class<?> var0, Class<?> var1) {
|
|
||||||
for (Field var5 : var0.getDeclaredFields()) {
|
|
||||||
if (var5.getType() == var1) {
|
|
||||||
var5.setAccessible(true);
|
|
||||||
return var5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new IllegalArgumentException("No such field type!");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Field a(Class<?> var0, String var1) {
|
|
||||||
for (Field var5 : var0.getDeclaredFields()) {
|
|
||||||
if (var5.getName().equals(var1)) {
|
|
||||||
var5.setAccessible(true);
|
|
||||||
return var5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new IllegalArgumentException("No such field type!");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T> T a(Field var0, Object var1) {
|
|
||||||
try {
|
|
||||||
return (T)var0.get(var1);
|
|
||||||
} catch (IllegalAccessException failure) {
|
|
||||||
throw GenericTypeValidation.re$propagate(failure);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../pom.xml</relativePath></parent>
|
|
||||||
<artifactId>platform-api-legacy</artifactId><properties><reconstruction.variant>legacy</reconstruction.variant><maven.compiler.release>17</maven.compiler.release></properties>
|
|
||||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency></dependencies>
|
|
||||||
</project>
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.game.prophunt.platform;
|
|
||||||
|
|
||||||
import ro.fr33styler.arcade.game.prophunt.prop.PropHuntPropType;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
|
|
||||||
public interface PropHuntProp {
|
|
||||||
UUID a();
|
|
||||||
|
|
||||||
PropHuntPropType b();
|
|
||||||
|
|
||||||
ItemStack c();
|
|
||||||
|
|
||||||
Player d();
|
|
||||||
|
|
||||||
void a(Player var1);
|
|
||||||
|
|
||||||
Location e();
|
|
||||||
|
|
||||||
void a(Location var1);
|
|
||||||
|
|
||||||
void f();
|
|
||||||
|
|
||||||
void g();
|
|
||||||
}
|
|
||||||
-94
@@ -1,94 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.api;
|
|
||||||
|
|
||||||
import ro.fr33styler.arcade.platform.api.bossbar.LegacyBossBar;
|
|
||||||
import ro.fr33styler.arcade.platform.api.hologram.HologramEntity;
|
|
||||||
import ro.fr33styler.arcade.platform.api.network.PacketInterceptor;
|
|
||||||
import ro.fr33styler.arcade.platform.api.npc.NpcFactory;
|
|
||||||
import ro.fr33styler.arcade.platform.api.npc.SkinTexture;
|
|
||||||
import ro.fr33styler.arcade.platform.legacy.input.SwapHandListener;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.World;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.entity.Firework;
|
|
||||||
import org.bukkit.entity.Item;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.inventory.meta.SkullMeta;
|
|
||||||
import org.bukkit.scoreboard.NameTagVisibility;
|
|
||||||
import org.bukkit.scoreboard.Score;
|
|
||||||
import org.bukkit.scoreboard.Team;
|
|
||||||
|
|
||||||
public interface ServerPlatform {
|
|
||||||
NpcFactory a();
|
|
||||||
|
|
||||||
PacketInterceptor b();
|
|
||||||
|
|
||||||
LegacyBossBar c();
|
|
||||||
|
|
||||||
void a(Firework var1);
|
|
||||||
|
|
||||||
void a(Entity var1, boolean var2);
|
|
||||||
|
|
||||||
void a(LivingEntity var1, double var2);
|
|
||||||
|
|
||||||
void a(Player var1);
|
|
||||||
|
|
||||||
void a(Player var1, Item var2);
|
|
||||||
|
|
||||||
default double b(Player var1) {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
default void a(Player var1, double var2) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void a(Block var1, Material var2, int var3);
|
|
||||||
|
|
||||||
default HologramEntity a(Location var1) {
|
|
||||||
return this.a(var1.getWorld(), var1.getX(), var1.getY(), var1.getZ());
|
|
||||||
}
|
|
||||||
|
|
||||||
HologramEntity a(World var1, double var2, double var4, double var6);
|
|
||||||
|
|
||||||
default boolean b(Location var1) {
|
|
||||||
return this.a(var1.getBlock(), var1.getX(), var1.getY(), var1.getZ());
|
|
||||||
}
|
|
||||||
|
|
||||||
void a(SkullMeta var1, SkinTexture var2);
|
|
||||||
|
|
||||||
boolean a(Block var1, double var2, double var4, double var6);
|
|
||||||
|
|
||||||
boolean a(PlayerInteractEvent var1);
|
|
||||||
|
|
||||||
boolean a(EntityDamageEvent var1);
|
|
||||||
|
|
||||||
SwapHandListener d();
|
|
||||||
|
|
||||||
SkinTexture c(Player var1);
|
|
||||||
|
|
||||||
ItemStack d(Player var1);
|
|
||||||
|
|
||||||
void a(Player var1, ItemStack var2);
|
|
||||||
|
|
||||||
ItemStack e(Player var1);
|
|
||||||
|
|
||||||
void b(Player var1, ItemStack var2);
|
|
||||||
|
|
||||||
void a(Player var1, boolean var2);
|
|
||||||
|
|
||||||
void a(Player var1, String var2);
|
|
||||||
|
|
||||||
void a(Player var1, String var2, String var3, int var4, int var5, int var6);
|
|
||||||
|
|
||||||
void a(Player var1, String var2, String var3);
|
|
||||||
|
|
||||||
void a(Player var1, boolean var2, Score var3, int var4);
|
|
||||||
|
|
||||||
void a(Player var1, Team var2, String var3, String var4, NameTagVisibility var5);
|
|
||||||
}
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.api.bossbar;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
public interface LegacyBossBar {
|
|
||||||
void a(Player var1);
|
|
||||||
|
|
||||||
void a(String var1);
|
|
||||||
|
|
||||||
void a(boolean var1);
|
|
||||||
|
|
||||||
void b(Player var1);
|
|
||||||
|
|
||||||
void a();
|
|
||||||
}
|
|
||||||
-66
@@ -1,66 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.api.npc;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
|
||||||
import ro.fr33styler.arcade.api.engine.config.annotation.Setting;
|
|
||||||
import ro.fr33styler.arcade.api.engine.config.serialize.Configuration;
|
|
||||||
|
|
||||||
public final class NpcEquipment implements Configuration {
|
|
||||||
@Setting("main-hand")
|
|
||||||
private Material a = Material.AIR;
|
|
||||||
@Setting("main-hand-model-data")
|
|
||||||
private int b = 0;
|
|
||||||
@Setting("off-hand")
|
|
||||||
private Material c = Material.AIR;
|
|
||||||
@Setting("off-hand-model-data")
|
|
||||||
private int d = 0;
|
|
||||||
@Setting("helmet")
|
|
||||||
private Material e = Material.AIR;
|
|
||||||
@Setting("helmet-model-data")
|
|
||||||
private int f = 0;
|
|
||||||
@Setting("chestplate")
|
|
||||||
private Material g = Material.AIR;
|
|
||||||
@Setting("chestplate-model-data")
|
|
||||||
private int h = 0;
|
|
||||||
@Setting("leggings")
|
|
||||||
private Material i = Material.AIR;
|
|
||||||
@Setting("leggings-model-data")
|
|
||||||
private int j = 0;
|
|
||||||
@Setting("boots")
|
|
||||||
private Material k = Material.AIR;
|
|
||||||
@Setting("boots-model-data")
|
|
||||||
private int l = 0;
|
|
||||||
|
|
||||||
public ItemStack a() {
|
|
||||||
return this.a(this.a, this.b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack b() {
|
|
||||||
return this.a(this.c, this.d);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack c() {
|
|
||||||
return this.a(this.e, this.f);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack d() {
|
|
||||||
return this.a(this.g, this.h);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack e() {
|
|
||||||
return this.a(this.i, this.j);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack f() {
|
|
||||||
return this.a(this.k, this.l);
|
|
||||||
}
|
|
||||||
|
|
||||||
private ItemStack a(Material var1, int var2) {
|
|
||||||
ItemMeta var3 = Bukkit.getItemFactory().getItemMeta(var1);
|
|
||||||
ItemStack var4 = new ItemStack(var1);
|
|
||||||
var4.setItemMeta(var3);
|
|
||||||
return var4;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.api.npc;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
public interface NpcFactory {
|
|
||||||
Npc a(Location var1, Player var2);
|
|
||||||
|
|
||||||
Npc a(Location var1, String var2, SkinTexture var3, NpcEquipment var4);
|
|
||||||
}
|
|
||||||
-22
@@ -1,22 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.platform.legacy.input;
|
|
||||||
|
|
||||||
import java.util.function.Function;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
|
|
||||||
|
|
||||||
public class V1_12_2SwapHandListener implements SwapHandListener {
|
|
||||||
private Function<Player, Boolean> a;
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void a(PlayerSwapHandItemsEvent var1) {
|
|
||||||
Boolean var2 = this.a.apply(var1.getPlayer());
|
|
||||||
if (var2 != null) {
|
|
||||||
var1.setCancelled(var2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void a(Function<Player, Boolean> var1) {
|
|
||||||
this.a = var1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
package ro.fr33styler.arcade.support.reflect;
|
|
||||||
|
|
||||||
import ro.fr33styler.arcade.engine.config.validation.GenericTypeValidation;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
|
|
||||||
public class Reflection {
|
|
||||||
public static Field a(Class<?> var0, String var1) {
|
|
||||||
for (Field var5 : var0.getDeclaredFields()) {
|
|
||||||
if (var5.getName().equals(var1)) {
|
|
||||||
var5.setAccessible(true);
|
|
||||||
return var5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new IllegalArgumentException("No such field type!");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T> T a(Field var0, Object var1) {
|
|
||||||
try {
|
|
||||||
return (T)var0.get(var1);
|
|
||||||
} catch (IllegalAccessException failure) {
|
|
||||||
throw GenericTypeValidation.re$propagate(failure);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
||||||
<artifactId>platforms-latest-modern-a</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
<artifactId>platforms-latest-modern-a</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
||||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>platform-api-latest</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-modern-a</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-modern-a.jar</systemPath></dependency></dependencies>
|
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-modern-a</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-modern-a.jar</systemPath></dependency></dependencies>
|
||||||
</project>
|
</project>
|
||||||
+19
-19
@@ -58,48 +58,48 @@ import org.bukkit.entity.Item;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scoreboard.Score;
|
import org.bukkit.scoreboard.Score;
|
||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
import org.bukkit.scoreboard.Team.OptionStatus;
|
import ro.fr33styler.arcade.platform.api.scoreboard.TeamVisibility;
|
||||||
import ro.fr33styler.arcade.api.engine.command.Command;
|
import ro.fr33styler.arcade.api.engine.command.Command;
|
||||||
|
|
||||||
public class V26_1Platform implements ServerPlatform {
|
public class V26_1Platform implements ServerPlatform {
|
||||||
private final V26_1NpcFactory a;
|
private final V26_1NpcFactory a;
|
||||||
private final V26_1PacketInterceptor b = new V26_1PacketInterceptor();
|
private final V26_1PacketInterceptor b = new V26_1PacketInterceptor();
|
||||||
private static final Field c = Reflection.a(Mob.class, "goalSelector");
|
private static final Field c = Reflection.findFieldByName(Mob.class, "goalSelector");
|
||||||
private static final Field d = Reflection.a(Mob.class, "targetSelector");
|
private static final Field d = Reflection.findFieldByName(Mob.class, "targetSelector");
|
||||||
|
|
||||||
V26_1Platform(Server var1) {
|
V26_1Platform(Server var1) {
|
||||||
this.a = new V26_1NpcFactory(var1);
|
this.a = new V26_1NpcFactory(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V26_1NpcFactory a() {
|
public V26_1NpcFactory getNpcFactory() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V26_1PacketInterceptor b() {
|
public V26_1PacketInterceptor getPacketInterceptor() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void sendHealthUpdate(Player var1) {
|
||||||
var1.sendHealthUpdate();
|
var1.sendHealthUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Item var2) {
|
public void sendCollectItemAnimation(Player var1, Item var2) {
|
||||||
((CraftPlayer)var1)
|
((CraftPlayer)var1)
|
||||||
.getHandle()
|
.getHandle()
|
||||||
.connection
|
.connection
|
||||||
.send(new ClientboundTakeItemEntityPacket(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
.send(new ClientboundTakeItemEntityPacket(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Command var1) {
|
public void registerCommand(Command var1) {
|
||||||
this.a(var1, var1.getCommand());
|
this.a(var1, var1.getCommand());
|
||||||
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(Command var1) {
|
public void unregisterCommand(Command var1) {
|
||||||
RootCommandNode var2 = this.e().getDispatcher().getRoot();
|
RootCommandNode var2 = this.e().getDispatcher().getRoot();
|
||||||
var2.removeCommand(var1.getCommand());
|
var2.removeCommand(var1.getCommand());
|
||||||
var1.getAliases().forEach(var2::removeCommand);
|
var1.getAliases().forEach(var2::removeCommand);
|
||||||
BukkitCommands.b(var1);
|
BukkitCommands.unregisterCommand(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Commands e() {
|
private Commands e() {
|
||||||
@@ -137,26 +137,26 @@ public class V26_1Platform implements ServerPlatform {
|
|||||||
return 1;
|
return 1;
|
||||||
});
|
});
|
||||||
LiteralCommandNode var4 = var3.build();
|
LiteralCommandNode var4 = var3.build();
|
||||||
if (!ServerVersion.d) {
|
if (!ServerVersion.IS_PAPER) {
|
||||||
BukkitCommands.a(new VanillaCommandWrapper(this.e(), var4));
|
BukkitCommands.registerBukkitCommand(new VanillaCommandWrapper(this.e(), var4));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.e().getDispatcher().getRoot().addChild(var4);
|
this.e().getDispatcher().getRoot().addChild(var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double b(Player var1) {
|
public double getWaypointReceiveRange(Player var1) {
|
||||||
AttributeInstance var2 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
AttributeInstance var2 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
||||||
return var2 == null ? 0.0 : var2.getBaseValue();
|
return var2 == null ? 0.0 : var2.getBaseValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, double var2) {
|
public void setWaypointReceiveRange(Player var1, double var2) {
|
||||||
AttributeInstance var4 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
AttributeInstance var4 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
||||||
if (var4 != null) {
|
if (var4 != null) {
|
||||||
var4.setBaseValue(var2);
|
var4.setBaseValue(var2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Block var1, Material var2) {
|
public void setBlock(Block var1, Material var2) {
|
||||||
CraftBlock var3 = (CraftBlock)var1;
|
CraftBlock var3 = (CraftBlock)var1;
|
||||||
ServerLevel var4 = var3.getCraftWorld().getHandle();
|
ServerLevel var4 = var3.getCraftWorld().getHandle();
|
||||||
BlockState var5 = CraftMagicNumbers.getBlock(var2).defaultBlockState();
|
BlockState var5 = CraftMagicNumbers.getBlock(var2).defaultBlockState();
|
||||||
@@ -164,11 +164,11 @@ public class V26_1Platform implements ServerPlatform {
|
|||||||
var4.sendBlockUpdated(var3.getPosition(), var4.getBlockState(var3.getPosition()), var5, 0);
|
var4.sendBlockUpdated(var3.getPosition(), var4.getBlockState(var3.getPosition()), var5, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HologramEntity a(World var1, double var2, double var4, double var6) {
|
public HologramEntity createHologram(World var1, double var2, double var4, double var6) {
|
||||||
return new V26_1HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
return new V26_1HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(Block var1, double var2, double var4, double var6) {
|
public boolean isInsideBlockHitbox(Block var1, double var2, double var4, double var6) {
|
||||||
CraftBlock var8 = (CraftBlock)var1;
|
CraftBlock var8 = (CraftBlock)var1;
|
||||||
ServerLevel var9 = var8.getCraftWorld().getHandle();
|
ServerLevel var9 = var8.getCraftWorld().getHandle();
|
||||||
VoxelShape var10 = var9.getBlockState(var8.getPosition()).getShape(var9, var8.getPosition());
|
VoxelShape var10 = var9.getBlockState(var8.getPosition()).getShape(var9, var8.getPosition());
|
||||||
@@ -188,7 +188,7 @@ public class V26_1Platform implements ServerPlatform {
|
|||||||
return var17.booleanValue();
|
return var17.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2, Score var3, int var4) {
|
public void sendScorePacket(Player var1, boolean var2, Score var3, int var4) {
|
||||||
if (var2) {
|
if (var2) {
|
||||||
((CraftPlayer)var1).getHandle().connection.send(new ClientboundResetScorePacket(var3.getEntry(), var3.getObjective().getName()));
|
((CraftPlayer)var1).getHandle().connection.send(new ClientboundResetScorePacket(var3.getEntry(), var3.getObjective().getName()));
|
||||||
} else {
|
} else {
|
||||||
@@ -199,7 +199,7 @@ public class V26_1Platform implements ServerPlatform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Team var2, String var3, String var4, OptionStatus var5) {
|
public void sendTeamPacket(Player var1, Team var2, String var3, String var4, TeamVisibility var5) {
|
||||||
if (var1.getScoreboard() == var2.getScoreboard()) {
|
if (var1.getScoreboard() == var2.getScoreboard()) {
|
||||||
CraftPlayer var6 = (CraftPlayer)var1;
|
CraftPlayer var6 = (CraftPlayer)var1;
|
||||||
PlayerTeam var7 = var6.getScoreboard().getHandle().getPlayerTeam(var2.getName());
|
PlayerTeam var7 = var6.getScoreboard().getHandle().getPlayerTeam(var2.getName());
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class V26_1PlatformFactory implements VersionFactory<ServerPlatform> {
|
public class V26_1PlatformFactory implements VersionFactory<ServerPlatform> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "26.1";
|
return "26.1";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.startsWith("26.1");
|
return var1.startsWith("26.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerPlatform a(Server var1) {
|
public ServerPlatform create(Server var1) {
|
||||||
return new V26_1Platform(var1);
|
return new V26_1Platform(var1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -12,7 +12,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class BombLobbersV26_1TntFactory implements BombLobbersTntFactory {
|
public class BombLobbersV26_1TntFactory implements BombLobbersTntFactory {
|
||||||
public TNTPrimed a(Player var1, Color var2, Vector var3) {
|
public TNTPrimed spawnTnt(Player var1, Color var2, Vector var3) {
|
||||||
ServerPlayer var4 = ((CraftPlayer)var1).getHandle();
|
ServerPlayer var4 = ((CraftPlayer)var1).getHandle();
|
||||||
BombLobbersV26_1TntEntity var5 = new BombLobbersV26_1TntEntity(var4, new DustParticleOptions(var2.asRGB(), 1.0F), var3);
|
BombLobbersV26_1TntEntity var5 = new BombLobbersV26_1TntEntity(var4, new DustParticleOptions(var2.asRGB(), 1.0F), var3);
|
||||||
var4.level().addFreshEntity(var5, SpawnReason.CUSTOM);
|
var4.level().addFreshEntity(var5, SpawnReason.CUSTOM);
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class BombLobbersV26_1TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
public class BombLobbersV26_1TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "26.1";
|
return "26.1";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.startsWith("26.1");
|
return var1.startsWith("26.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
public BombLobbersTntFactory a(Server var1) {
|
public BombLobbersTntFactory create(Server var1) {
|
||||||
return new BombLobbersV26_1TntFactory();
|
return new BombLobbersV26_1TntFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -16,15 +16,15 @@ import org.bukkit.entity.WitherSkull;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class MiniWallsV26_1EntityFactory implements MiniWallsEntityFactory {
|
public class MiniWallsV26_1EntityFactory implements MiniWallsEntityFactory {
|
||||||
public Wither a(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
public Wither spawnWither(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
||||||
return (Wither)new MiniWallsV26_1Wither(var1, var2, var3).getBukkitEntity();
|
return (Wither)new MiniWallsV26_1Wither(var1, var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Arrow a(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
public Arrow spawnArrow(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
||||||
return (Arrow)new MiniWallsV26_1Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
return (Arrow)new MiniWallsV26_1Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WitherSkull a(Wither var1, Vector var2, Predicate<Entity> var3) {
|
public WitherSkull spawnWitherSkull(Wither var1, Vector var2, Predicate<Entity> var3) {
|
||||||
return (WitherSkull)new MiniWallsV26_1WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
return (WitherSkull)new MiniWallsV26_1WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class MiniWallsV26_1EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
public class MiniWallsV26_1EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "26.1";
|
return "26.1";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.startsWith("26.1");
|
return var1.startsWith("26.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
public MiniWallsEntityFactory a(Server var1) {
|
public MiniWallsEntityFactory create(Server var1) {
|
||||||
return new MiniWallsV26_1EntityFactory();
|
return new MiniWallsV26_1EntityFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+11
-11
@@ -35,34 +35,34 @@ public class PropHuntV26_1PropEntity extends ArmorStand implements PropHuntProp
|
|||||||
this.setItemSlot(EquipmentSlot.HEAD, CraftItemStack.asNMSCopy(var2));
|
this.setItemSlot(EquipmentSlot.HEAD, CraftItemStack.asNMSCopy(var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.a(var3);
|
this.teleport(var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID a() {
|
public UUID getUniqueId() {
|
||||||
return this.uuid;
|
return this.uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropType b() {
|
public PropHuntPropType getPropType() {
|
||||||
return this.c;
|
return this.c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack c() {
|
public ItemStack getItem() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player d() {
|
public Player getOwner() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void setOwner(Player var1) {
|
||||||
this.a = (CraftPlayer)var1;
|
this.a = (CraftPlayer)var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location e() {
|
public Location getLocation() {
|
||||||
return new Location(this.level().getWorld(), this.getX(), this.getY() + 1.35, this.getZ(), this.getYRot(), this.getXRot());
|
return new Location(this.level().getWorld(), this.getX(), this.getY() + 1.35, this.getZ(), this.getYRot(), this.getXRot());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Location var1) {
|
public void teleport(Location var1) {
|
||||||
double var2 = var1.getX();
|
double var2 = var1.getX();
|
||||||
double var4 = var1.getY() - 1.35;
|
double var4 = var1.getY() - 1.35;
|
||||||
double var6 = var1.getZ();
|
double var6 = var1.getZ();
|
||||||
@@ -76,13 +76,13 @@ public class PropHuntV26_1PropEntity extends ArmorStand implements PropHuntProp
|
|||||||
this.snapTo(var2, var4, var6);
|
this.snapTo(var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void f() {
|
public void attachOwner() {
|
||||||
if (this.a != null) {
|
if (this.a != null) {
|
||||||
this.getBukkitEntity().addPassenger(this.a);
|
this.getBukkitEntity().addPassenger(this.a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void h() {
|
public void destroy() {
|
||||||
this.discard();
|
this.discard();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class PropHuntV26_1PropEntity extends ArmorStand implements PropHuntProp
|
|||||||
|
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (this.a != null && !this.a.isInsideVehicle()) {
|
if (this.a != null && !this.a.isInsideVehicle()) {
|
||||||
this.a(this.a.getLocation());
|
this.teleport(this.a.getLocation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -10,11 +10,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class PropHuntV26_1PropFactory implements PropHuntPropFactory {
|
public class PropHuntV26_1PropFactory implements PropHuntPropFactory {
|
||||||
public Particle a() {
|
public Particle getDisguiseParticle() {
|
||||||
return Particle.HAPPY_VILLAGER;
|
return Particle.HAPPY_VILLAGER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntProp a(PropHuntPropType var1, ItemStack var2, Location var3) {
|
public PropHuntProp createProp(PropHuntPropType var1, ItemStack var2, Location var3) {
|
||||||
PropHuntV26_1PropEntity var4 = new PropHuntV26_1PropEntity(var1, var2, var3);
|
PropHuntV26_1PropEntity var4 = new PropHuntV26_1PropEntity(var1, var2, var3);
|
||||||
var4.level().addFreshEntity(var4, SpawnReason.CUSTOM);
|
var4.level().addFreshEntity(var4, SpawnReason.CUSTOM);
|
||||||
return var4;
|
return var4;
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class PropHuntV26_1PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
public class PropHuntV26_1PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "26.1";
|
return "26.1";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.startsWith("26.1");
|
return var1.startsWith("26.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropFactory a(Server var1) {
|
public PropHuntPropFactory create(Server var1) {
|
||||||
return new PropHuntV26_1PropFactory();
|
return new PropHuntV26_1PropFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-4
@@ -22,22 +22,22 @@ public class V26_1HologramEntity extends ArmorStand implements HologramEntity {
|
|||||||
super.setInvisible(true);
|
super.setInvisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1) {
|
public void setText(String var1) {
|
||||||
super.setCustomName(CraftChatMessage.fromStringOrNull(var1));
|
super.setCustomName(CraftChatMessage.fromStringOrNull(var1));
|
||||||
if (super.hasCustomName()) {
|
if (super.hasCustomName()) {
|
||||||
super.setCustomNameVisible(true);
|
super.setCustomNameVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LivingEntity a() {
|
public LivingEntity getEntity() {
|
||||||
return (LivingEntity)this.getBukkitEntity();
|
return (LivingEntity)this.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void updateMetadata(Player var1) {
|
||||||
this.a(this.b(var1));
|
this.a(this.b(var1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
ServerGamePacketListenerImpl var3 = this.b(var1);
|
ServerGamePacketListenerImpl var3 = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
var3.send(
|
var3.send(
|
||||||
|
|||||||
+4
-4
@@ -13,10 +13,10 @@ import org.bukkit.craftbukkit.entity.CraftPlayer;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class V26_1PacketInterceptor implements PacketInterceptor {
|
public class V26_1PacketInterceptor implements PacketInterceptor {
|
||||||
private static final Field a = Reflection.a(ServerCommonPacketListenerImpl.class, Connection.class);
|
private static final Field a = Reflection.findFieldByType(ServerCommonPacketListenerImpl.class, Connection.class);
|
||||||
|
|
||||||
private Channel a(Player var1) throws IllegalAccessException {
|
private Channel a(Player var1) throws IllegalAccessException {
|
||||||
Connection var2 = (Connection)Reflection.a(a, ((CraftPlayer)var1).getHandle().connection);
|
Connection var2 = (Connection)Reflection.getFieldValue(a, ((CraftPlayer)var1).getHandle().connection);
|
||||||
return var2.channel;
|
return var2.channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ public class V26_1PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1, Player var2) {
|
public void inject(String var1, Player var2) {
|
||||||
try {
|
try {
|
||||||
ChannelPipeline var3 = this.a(var2).pipeline();
|
ChannelPipeline var3 = this.a(var2).pipeline();
|
||||||
this.a(var3, var1);
|
this.a(var3, var1);
|
||||||
@@ -37,7 +37,7 @@ public class V26_1PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(String var1, Player var2) {
|
public void eject(String var1, Player var2) {
|
||||||
try {
|
try {
|
||||||
Channel var3 = this.a(var2);
|
Channel var3 = this.a(var2);
|
||||||
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
||||||
|
|||||||
+4
-4
@@ -37,11 +37,11 @@ public class V26_1Npc extends ServerPlayer implements Npc {
|
|||||||
this.a = var4;
|
this.a = var4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int a() {
|
public int getEntityId() {
|
||||||
return this.getId();
|
return this.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location b() {
|
public Location getLocation() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ public class V26_1Npc extends ServerPlayer implements Npc {
|
|||||||
this.b = var1;
|
this.b = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
this.connection = this.b(var1);
|
this.connection = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
this.connection.send(new ClientboundPlayerInfoUpdatePacket(Action.ADD_PLAYER, this));
|
this.connection.send(new ClientboundPlayerInfoUpdatePacket(Action.ADD_PLAYER, this));
|
||||||
@@ -85,7 +85,7 @@ public class V26_1Npc extends ServerPlayer implements Npc {
|
|||||||
return ((CraftPlayer)var1).getHandle().connection;
|
return ((CraftPlayer)var1).getHandle().connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void removeFromTabList(Player var1) {
|
||||||
this.b(var1).send(new ClientboundPlayerInfoRemovePacket(List.of(this.uuid)));
|
this.b(var1).send(new ClientboundPlayerInfoRemovePacket(List.of(this.uuid)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+9
-9
@@ -28,7 +28,7 @@ public class V26_1NpcFactory implements NpcFactory {
|
|||||||
this.a = var1;
|
this.a = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V26_1Npc a(Location var1, Player var2) {
|
public V26_1Npc createPlayerNpc(Location var1, Player var2) {
|
||||||
ServerPlayer var3 = ((CraftPlayer)var2).getHandle();
|
ServerPlayer var3 = ((CraftPlayer)var2).getHandle();
|
||||||
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName(), var3.getGameProfile().properties());
|
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName(), var3.getGameProfile().properties());
|
||||||
return new V26_1Npc(((CraftServer)this.a).getServer(), var3.level(), var4, var1);
|
return new V26_1Npc(((CraftServer)this.a).getServer(), var3.level(), var4, var1);
|
||||||
@@ -36,20 +36,20 @@ public class V26_1NpcFactory implements NpcFactory {
|
|||||||
|
|
||||||
public V26_1Npc a(Location var1, String var2, SkinTexture var3) {
|
public V26_1Npc a(Location var1, String var2, SkinTexture var3) {
|
||||||
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
||||||
ImmutableMultimap var5 = ImmutableMultimap.of("textures", new Property("textures", var3.a(), var3.b()));
|
ImmutableMultimap var5 = ImmutableMultimap.of("textures", new Property("textures", var3.getValue(), var3.getSignature()));
|
||||||
GameProfile var6 = new GameProfile(UUID.randomUUID(), var2, new PropertyMap(var5));
|
GameProfile var6 = new GameProfile(UUID.randomUUID(), var2, new PropertyMap(var5));
|
||||||
return new V26_1Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var6, var1);
|
return new V26_1Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var6, var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V26_1Npc a(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
public V26_1Npc createNpc(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
||||||
V26_1Npc var5 = this.a(var1, var2, var3);
|
V26_1Npc var5 = this.a(var1, var2, var3);
|
||||||
ArrayList var6 = new ArrayList();
|
ArrayList var6 = new ArrayList();
|
||||||
var6.add(new Pair(EquipmentSlot.MAINHAND, CraftItemStack.asNMSCopy(var4.a())));
|
var6.add(new Pair(EquipmentSlot.MAINHAND, CraftItemStack.asNMSCopy(var4.getMainHandItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.OFFHAND, CraftItemStack.asNMSCopy(var4.b())));
|
var6.add(new Pair(EquipmentSlot.OFFHAND, CraftItemStack.asNMSCopy(var4.getOffHandItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.HEAD, CraftItemStack.asNMSCopy(var4.c())));
|
var6.add(new Pair(EquipmentSlot.HEAD, CraftItemStack.asNMSCopy(var4.getHelmetItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.CHEST, CraftItemStack.asNMSCopy(var4.d())));
|
var6.add(new Pair(EquipmentSlot.CHEST, CraftItemStack.asNMSCopy(var4.getChestplateItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.LEGS, CraftItemStack.asNMSCopy(var4.e())));
|
var6.add(new Pair(EquipmentSlot.LEGS, CraftItemStack.asNMSCopy(var4.getLeggingsItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.FEET, CraftItemStack.asNMSCopy(var4.f())));
|
var6.add(new Pair(EquipmentSlot.FEET, CraftItemStack.asNMSCopy(var4.getBootsItem())));
|
||||||
var5.a(var6);
|
var5.a(var6);
|
||||||
return var5;
|
return var5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
||||||
<artifactId>platforms-latest-modern-b</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
<artifactId>platforms-latest-modern-b</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
||||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>platform-api-latest</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-modern-b</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-modern-b.jar</systemPath></dependency></dependencies>
|
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-modern-b</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-modern-b.jar</systemPath></dependency></dependencies>
|
||||||
</project>
|
</project>
|
||||||
+19
-19
@@ -60,48 +60,48 @@ import org.bukkit.entity.Item;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scoreboard.Score;
|
import org.bukkit.scoreboard.Score;
|
||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
import org.bukkit.scoreboard.Team.OptionStatus;
|
import ro.fr33styler.arcade.platform.api.scoreboard.TeamVisibility;
|
||||||
import ro.fr33styler.arcade.api.engine.command.Command;
|
import ro.fr33styler.arcade.api.engine.command.Command;
|
||||||
|
|
||||||
public class V26_2Platform implements ServerPlatform {
|
public class V26_2Platform implements ServerPlatform {
|
||||||
private final V26_2NpcFactory a;
|
private final V26_2NpcFactory a;
|
||||||
private final V26_2PacketInterceptor b = new V26_2PacketInterceptor();
|
private final V26_2PacketInterceptor b = new V26_2PacketInterceptor();
|
||||||
private static final Field c = Reflection.a(Mob.class, "goalSelector");
|
private static final Field c = Reflection.findFieldByName(Mob.class, "goalSelector");
|
||||||
private static final Field d = Reflection.a(Mob.class, "targetSelector");
|
private static final Field d = Reflection.findFieldByName(Mob.class, "targetSelector");
|
||||||
|
|
||||||
V26_2Platform(Server var1) {
|
V26_2Platform(Server var1) {
|
||||||
this.a = new V26_2NpcFactory(var1);
|
this.a = new V26_2NpcFactory(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V26_2NpcFactory a() {
|
public V26_2NpcFactory getNpcFactory() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V26_2PacketInterceptor b() {
|
public V26_2PacketInterceptor getPacketInterceptor() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void sendHealthUpdate(Player var1) {
|
||||||
var1.sendHealthUpdate();
|
var1.sendHealthUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Item var2) {
|
public void sendCollectItemAnimation(Player var1, Item var2) {
|
||||||
((CraftPlayer)var1)
|
((CraftPlayer)var1)
|
||||||
.getHandle()
|
.getHandle()
|
||||||
.connection
|
.connection
|
||||||
.send(new ClientboundTakeItemEntityPacket(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
.send(new ClientboundTakeItemEntityPacket(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Command var1) {
|
public void registerCommand(Command var1) {
|
||||||
this.a(var1, var1.getCommand());
|
this.a(var1, var1.getCommand());
|
||||||
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(Command var1) {
|
public void unregisterCommand(Command var1) {
|
||||||
RootCommandNode var2 = this.e().getDispatcher().getRoot();
|
RootCommandNode var2 = this.e().getDispatcher().getRoot();
|
||||||
var2.removeCommand(var1.getCommand());
|
var2.removeCommand(var1.getCommand());
|
||||||
var1.getAliases().forEach(var2::removeCommand);
|
var1.getAliases().forEach(var2::removeCommand);
|
||||||
BukkitCommands.b(var1);
|
BukkitCommands.unregisterCommand(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Commands e() {
|
private Commands e() {
|
||||||
@@ -139,26 +139,26 @@ public class V26_2Platform implements ServerPlatform {
|
|||||||
return 1;
|
return 1;
|
||||||
});
|
});
|
||||||
LiteralCommandNode var4 = var3.build();
|
LiteralCommandNode var4 = var3.build();
|
||||||
if (!ServerVersion.d) {
|
if (!ServerVersion.IS_PAPER) {
|
||||||
BukkitCommands.a(new VanillaCommandWrapper(this.e(), var4));
|
BukkitCommands.registerBukkitCommand(new VanillaCommandWrapper(this.e(), var4));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.e().getDispatcher().getRoot().addChild(var4);
|
this.e().getDispatcher().getRoot().addChild(var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double b(Player var1) {
|
public double getWaypointReceiveRange(Player var1) {
|
||||||
AttributeInstance var2 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
AttributeInstance var2 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
||||||
return var2 == null ? 0.0 : var2.getBaseValue();
|
return var2 == null ? 0.0 : var2.getBaseValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, double var2) {
|
public void setWaypointReceiveRange(Player var1, double var2) {
|
||||||
AttributeInstance var4 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
AttributeInstance var4 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
||||||
if (var4 != null) {
|
if (var4 != null) {
|
||||||
var4.setBaseValue(var2);
|
var4.setBaseValue(var2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Block var1, Material var2) {
|
public void setBlock(Block var1, Material var2) {
|
||||||
CraftBlock var3 = (CraftBlock)var1;
|
CraftBlock var3 = (CraftBlock)var1;
|
||||||
ServerLevel var4 = var3.getCraftWorld().getHandle();
|
ServerLevel var4 = var3.getCraftWorld().getHandle();
|
||||||
BlockState var5 = CraftMagicNumbers.getBlock(var2).defaultBlockState();
|
BlockState var5 = CraftMagicNumbers.getBlock(var2).defaultBlockState();
|
||||||
@@ -166,11 +166,11 @@ public class V26_2Platform implements ServerPlatform {
|
|||||||
var4.sendBlockUpdated(var3.getPosition(), var4.getBlockState(var3.getPosition()), var5, 0);
|
var4.sendBlockUpdated(var3.getPosition(), var4.getBlockState(var3.getPosition()), var5, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HologramEntity a(World var1, double var2, double var4, double var6) {
|
public HologramEntity createHologram(World var1, double var2, double var4, double var6) {
|
||||||
return new V26_2HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
return new V26_2HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(Block var1, double var2, double var4, double var6) {
|
public boolean isInsideBlockHitbox(Block var1, double var2, double var4, double var6) {
|
||||||
CraftBlock var8 = (CraftBlock)var1;
|
CraftBlock var8 = (CraftBlock)var1;
|
||||||
ServerLevel var9 = var8.getCraftWorld().getHandle();
|
ServerLevel var9 = var8.getCraftWorld().getHandle();
|
||||||
VoxelShape var10 = var9.getBlockState(var8.getPosition()).getShape(var9, var8.getPosition());
|
VoxelShape var10 = var9.getBlockState(var8.getPosition()).getShape(var9, var8.getPosition());
|
||||||
@@ -190,7 +190,7 @@ public class V26_2Platform implements ServerPlatform {
|
|||||||
return var17.booleanValue();
|
return var17.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2, Score var3, int var4) {
|
public void sendScorePacket(Player var1, boolean var2, Score var3, int var4) {
|
||||||
if (var2) {
|
if (var2) {
|
||||||
((CraftPlayer)var1).getHandle().connection.send(new ClientboundResetScorePacket(var3.getEntry(), var3.getObjective().getName()));
|
((CraftPlayer)var1).getHandle().connection.send(new ClientboundResetScorePacket(var3.getEntry(), var3.getObjective().getName()));
|
||||||
} else {
|
} else {
|
||||||
@@ -201,7 +201,7 @@ public class V26_2Platform implements ServerPlatform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Team var2, String var3, String var4, OptionStatus var5) {
|
public void sendTeamPacket(Player var1, Team var2, String var3, String var4, TeamVisibility var5) {
|
||||||
if (var1.getScoreboard() == var2.getScoreboard()) {
|
if (var1.getScoreboard() == var2.getScoreboard()) {
|
||||||
CraftPlayer var6 = (CraftPlayer)var1;
|
CraftPlayer var6 = (CraftPlayer)var1;
|
||||||
PlayerTeam var7 = var6.getScoreboard().getHandle().getPlayerTeam(var2.getName());
|
PlayerTeam var7 = var6.getScoreboard().getHandle().getPlayerTeam(var2.getName());
|
||||||
|
|||||||
+5
-5
@@ -7,16 +7,16 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class V26_2PlatformFactory implements VersionFactory<ServerPlatform> {
|
public class V26_2PlatformFactory implements VersionFactory<ServerPlatform> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "26.2+";
|
return "26.2+";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
int var2 = ServerVersion.a(var1);
|
int var2 = ServerVersion.parseMajorVersion(var1);
|
||||||
return var2 >= 27 || var2 == 26 && ServerVersion.b(var1) >= 2;
|
return var2 >= 27 || var2 == 26 && ServerVersion.parseMinorVersion(var1) >= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerPlatform a(Server var1) {
|
public ServerPlatform create(Server var1) {
|
||||||
return new V26_2Platform(var1);
|
return new V26_2Platform(var1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -12,7 +12,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class BombLobbersV26_2TntFactory implements BombLobbersTntFactory {
|
public class BombLobbersV26_2TntFactory implements BombLobbersTntFactory {
|
||||||
public TNTPrimed a(Player var1, Color var2, Vector var3) {
|
public TNTPrimed spawnTnt(Player var1, Color var2, Vector var3) {
|
||||||
ServerPlayer var4 = ((CraftPlayer)var1).getHandle();
|
ServerPlayer var4 = ((CraftPlayer)var1).getHandle();
|
||||||
BombLobbersV26_2TntEntity var5 = new BombLobbersV26_2TntEntity(var4, new DustParticleOptions(var2.asRGB(), 1.0F), var3);
|
BombLobbersV26_2TntEntity var5 = new BombLobbersV26_2TntEntity(var4, new DustParticleOptions(var2.asRGB(), 1.0F), var3);
|
||||||
var4.level().addFreshEntity(var5, SpawnReason.CUSTOM);
|
var4.level().addFreshEntity(var5, SpawnReason.CUSTOM);
|
||||||
|
|||||||
+5
-5
@@ -7,16 +7,16 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class BombLobbersV26_2TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
public class BombLobbersV26_2TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "26.2+";
|
return "26.2+";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
int var2 = ServerVersion.a(var1);
|
int var2 = ServerVersion.parseMajorVersion(var1);
|
||||||
return var2 >= 27 || var2 == 26 && ServerVersion.b(var1) >= 2;
|
return var2 >= 27 || var2 == 26 && ServerVersion.parseMinorVersion(var1) >= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BombLobbersTntFactory a(Server var1) {
|
public BombLobbersTntFactory create(Server var1) {
|
||||||
return new BombLobbersV26_2TntFactory();
|
return new BombLobbersV26_2TntFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -16,15 +16,15 @@ import org.bukkit.entity.WitherSkull;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class MiniWallsV26_2EntityFactory implements MiniWallsEntityFactory {
|
public class MiniWallsV26_2EntityFactory implements MiniWallsEntityFactory {
|
||||||
public Wither a(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
public Wither spawnWither(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
||||||
return (Wither)new MiniWallsV26_2Wither(var1, var2, var3).getBukkitEntity();
|
return (Wither)new MiniWallsV26_2Wither(var1, var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Arrow a(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
public Arrow spawnArrow(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
||||||
return (Arrow)new MiniWallsV26_2Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
return (Arrow)new MiniWallsV26_2Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WitherSkull a(Wither var1, Vector var2, Predicate<Entity> var3) {
|
public WitherSkull spawnWitherSkull(Wither var1, Vector var2, Predicate<Entity> var3) {
|
||||||
return (WitherSkull)new MiniWallsV26_2WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
return (WitherSkull)new MiniWallsV26_2WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+5
-5
@@ -7,16 +7,16 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class MiniWallsV26_2EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
public class MiniWallsV26_2EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "26.2+";
|
return "26.2+";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
int var2 = ServerVersion.a(var1);
|
int var2 = ServerVersion.parseMajorVersion(var1);
|
||||||
return var2 >= 27 || var2 == 26 && ServerVersion.b(var1) >= 2;
|
return var2 >= 27 || var2 == 26 && ServerVersion.parseMinorVersion(var1) >= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MiniWallsEntityFactory a(Server var1) {
|
public MiniWallsEntityFactory create(Server var1) {
|
||||||
return new MiniWallsV26_2EntityFactory();
|
return new MiniWallsV26_2EntityFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+11
-11
@@ -35,34 +35,34 @@ public class PropHuntV26_2PropEntity extends ArmorStand implements PropHuntProp
|
|||||||
this.setItemSlot(EquipmentSlot.HEAD, CraftItemStack.asNMSCopy(var2));
|
this.setItemSlot(EquipmentSlot.HEAD, CraftItemStack.asNMSCopy(var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.a(var3);
|
this.teleport(var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID a() {
|
public UUID getUniqueId() {
|
||||||
return this.uuid;
|
return this.uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropType b() {
|
public PropHuntPropType getPropType() {
|
||||||
return this.c;
|
return this.c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack c() {
|
public ItemStack getItem() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player d() {
|
public Player getOwner() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void setOwner(Player var1) {
|
||||||
this.a = (CraftPlayer)var1;
|
this.a = (CraftPlayer)var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location e() {
|
public Location getLocation() {
|
||||||
return new Location(this.level().getWorld(), this.getX(), this.getY() + 1.35, this.getZ(), this.getYRot(), this.getXRot());
|
return new Location(this.level().getWorld(), this.getX(), this.getY() + 1.35, this.getZ(), this.getYRot(), this.getXRot());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Location var1) {
|
public void teleport(Location var1) {
|
||||||
double var2 = var1.getX();
|
double var2 = var1.getX();
|
||||||
double var4 = var1.getY() - 1.35;
|
double var4 = var1.getY() - 1.35;
|
||||||
double var6 = var1.getZ();
|
double var6 = var1.getZ();
|
||||||
@@ -76,13 +76,13 @@ public class PropHuntV26_2PropEntity extends ArmorStand implements PropHuntProp
|
|||||||
this.snapTo(var2, var4, var6);
|
this.snapTo(var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void f() {
|
public void attachOwner() {
|
||||||
if (this.a != null) {
|
if (this.a != null) {
|
||||||
this.getBukkitEntity().addPassenger(this.a);
|
this.getBukkitEntity().addPassenger(this.a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void h() {
|
public void destroy() {
|
||||||
this.discard();
|
this.discard();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class PropHuntV26_2PropEntity extends ArmorStand implements PropHuntProp
|
|||||||
|
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (this.a != null && !this.a.isInsideVehicle()) {
|
if (this.a != null && !this.a.isInsideVehicle()) {
|
||||||
this.a(this.a.getLocation());
|
this.teleport(this.a.getLocation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -10,11 +10,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class PropHuntV26_2PropFactory implements PropHuntPropFactory {
|
public class PropHuntV26_2PropFactory implements PropHuntPropFactory {
|
||||||
public Particle a() {
|
public Particle getDisguiseParticle() {
|
||||||
return Particle.HAPPY_VILLAGER;
|
return Particle.HAPPY_VILLAGER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntProp a(PropHuntPropType var1, ItemStack var2, Location var3) {
|
public PropHuntProp createProp(PropHuntPropType var1, ItemStack var2, Location var3) {
|
||||||
PropHuntV26_2PropEntity var4 = new PropHuntV26_2PropEntity(var1, var2, var3);
|
PropHuntV26_2PropEntity var4 = new PropHuntV26_2PropEntity(var1, var2, var3);
|
||||||
var4.level().addFreshEntity(var4, SpawnReason.CUSTOM);
|
var4.level().addFreshEntity(var4, SpawnReason.CUSTOM);
|
||||||
return var4;
|
return var4;
|
||||||
|
|||||||
+5
-5
@@ -7,16 +7,16 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class PropHuntV26_2PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
public class PropHuntV26_2PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "26.2+";
|
return "26.2+";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
int var2 = ServerVersion.a(var1);
|
int var2 = ServerVersion.parseMajorVersion(var1);
|
||||||
return var2 >= 27 || var2 == 26 && ServerVersion.b(var1) >= 2;
|
return var2 >= 27 || var2 == 26 && ServerVersion.parseMinorVersion(var1) >= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropFactory a(Server var1) {
|
public PropHuntPropFactory create(Server var1) {
|
||||||
return new PropHuntV26_2PropFactory();
|
return new PropHuntV26_2PropFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-4
@@ -22,22 +22,22 @@ public class V26_2HologramEntity extends ArmorStand implements HologramEntity {
|
|||||||
super.setInvisible(true);
|
super.setInvisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1) {
|
public void setText(String var1) {
|
||||||
super.setCustomName(CraftChatMessage.fromStringOrNull(var1));
|
super.setCustomName(CraftChatMessage.fromStringOrNull(var1));
|
||||||
if (super.hasCustomName()) {
|
if (super.hasCustomName()) {
|
||||||
super.setCustomNameVisible(true);
|
super.setCustomNameVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LivingEntity a() {
|
public LivingEntity getEntity() {
|
||||||
return (LivingEntity)this.getBukkitEntity();
|
return (LivingEntity)this.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void updateMetadata(Player var1) {
|
||||||
this.a(this.b(var1));
|
this.a(this.b(var1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
ServerGamePacketListenerImpl var3 = this.b(var1);
|
ServerGamePacketListenerImpl var3 = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
var3.send(
|
var3.send(
|
||||||
|
|||||||
+4
-4
@@ -13,10 +13,10 @@ import org.bukkit.craftbukkit.entity.CraftPlayer;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class V26_2PacketInterceptor implements PacketInterceptor {
|
public class V26_2PacketInterceptor implements PacketInterceptor {
|
||||||
private static final Field a = Reflection.a(ServerCommonPacketListenerImpl.class, Connection.class);
|
private static final Field a = Reflection.findFieldByType(ServerCommonPacketListenerImpl.class, Connection.class);
|
||||||
|
|
||||||
private Channel a(Player var1) throws IllegalAccessException {
|
private Channel a(Player var1) throws IllegalAccessException {
|
||||||
Connection var2 = (Connection)Reflection.a(a, ((CraftPlayer)var1).getHandle().connection);
|
Connection var2 = (Connection)Reflection.getFieldValue(a, ((CraftPlayer)var1).getHandle().connection);
|
||||||
return var2.channel;
|
return var2.channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ public class V26_2PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1, Player var2) {
|
public void inject(String var1, Player var2) {
|
||||||
try {
|
try {
|
||||||
ChannelPipeline var3 = this.a(var2).pipeline();
|
ChannelPipeline var3 = this.a(var2).pipeline();
|
||||||
this.a(var3, var1);
|
this.a(var3, var1);
|
||||||
@@ -37,7 +37,7 @@ public class V26_2PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(String var1, Player var2) {
|
public void eject(String var1, Player var2) {
|
||||||
try {
|
try {
|
||||||
Channel var3 = this.a(var2);
|
Channel var3 = this.a(var2);
|
||||||
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
||||||
|
|||||||
+5
-5
@@ -41,11 +41,11 @@ public class V26_2Npc extends ServerPlayer implements Npc {
|
|||||||
this.a = var4;
|
this.a = var4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int a() {
|
public int getEntityId() {
|
||||||
return this.getId();
|
return this.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location b() {
|
public Location getLocation() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ public class V26_2Npc extends ServerPlayer implements Npc {
|
|||||||
this.b = var1;
|
this.b = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
this.connection = this.b(var1);
|
this.connection = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
this.connection.send(new ClientboundPlayerInfoUpdatePacket(Action.ADD_PLAYER, this));
|
this.connection.send(new ClientboundPlayerInfoUpdatePacket(Action.ADD_PLAYER, this));
|
||||||
@@ -79,7 +79,7 @@ public class V26_2Npc extends ServerPlayer implements Npc {
|
|||||||
this.connection.send(new ClientboundSetEquipmentPacket(this.getId(), this.b));
|
this.connection.send(new ClientboundSetEquipmentPacket(this.getId(), this.b));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ServerVersion.b < 27 && ServerVersion.c < 3) {
|
if (ServerVersion.MAJOR_VERSION < 27 && ServerVersion.MINOR_VERSION < 3) {
|
||||||
this.connection.send(new ClientboundAnimatePacket(this, 0));
|
this.connection.send(new ClientboundAnimatePacket(this, 0));
|
||||||
} else {
|
} else {
|
||||||
this.connection.send(new ClientboundSwingAnimationPacket(this, InteractionHand.MAIN_HAND, SwingAnimation.DEFAULT));
|
this.connection.send(new ClientboundSwingAnimationPacket(this, InteractionHand.MAIN_HAND, SwingAnimation.DEFAULT));
|
||||||
@@ -93,7 +93,7 @@ public class V26_2Npc extends ServerPlayer implements Npc {
|
|||||||
return ((CraftPlayer)var1).getHandle().connection;
|
return ((CraftPlayer)var1).getHandle().connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void removeFromTabList(Player var1) {
|
||||||
this.b(var1).send(new ClientboundPlayerInfoRemovePacket(List.of(this.uuid)));
|
this.b(var1).send(new ClientboundPlayerInfoRemovePacket(List.of(this.uuid)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+9
-9
@@ -28,7 +28,7 @@ public class V26_2NpcFactory implements NpcFactory {
|
|||||||
this.a = var1;
|
this.a = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V26_2Npc a(Location var1, Player var2) {
|
public V26_2Npc createPlayerNpc(Location var1, Player var2) {
|
||||||
ServerPlayer var3 = ((CraftPlayer)var2).getHandle();
|
ServerPlayer var3 = ((CraftPlayer)var2).getHandle();
|
||||||
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName(), var3.getGameProfile().properties());
|
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName(), var3.getGameProfile().properties());
|
||||||
return new V26_2Npc(((CraftServer)this.a).getServer(), var3.level(), var4, var1);
|
return new V26_2Npc(((CraftServer)this.a).getServer(), var3.level(), var4, var1);
|
||||||
@@ -36,20 +36,20 @@ public class V26_2NpcFactory implements NpcFactory {
|
|||||||
|
|
||||||
public V26_2Npc a(Location var1, String var2, SkinTexture var3) {
|
public V26_2Npc a(Location var1, String var2, SkinTexture var3) {
|
||||||
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
||||||
ImmutableMultimap var5 = ImmutableMultimap.of("textures", new Property("textures", var3.a(), var3.b()));
|
ImmutableMultimap var5 = ImmutableMultimap.of("textures", new Property("textures", var3.getValue(), var3.getSignature()));
|
||||||
GameProfile var6 = new GameProfile(UUID.randomUUID(), var2, new PropertyMap(var5));
|
GameProfile var6 = new GameProfile(UUID.randomUUID(), var2, new PropertyMap(var5));
|
||||||
return new V26_2Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var6, var1);
|
return new V26_2Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var6, var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V26_2Npc a(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
public V26_2Npc createNpc(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
||||||
V26_2Npc var5 = this.a(var1, var2, var3);
|
V26_2Npc var5 = this.a(var1, var2, var3);
|
||||||
ArrayList var6 = new ArrayList();
|
ArrayList var6 = new ArrayList();
|
||||||
var6.add(new Pair(EquipmentSlot.MAINHAND, CraftItemStack.asNMSCopy(var4.a())));
|
var6.add(new Pair(EquipmentSlot.MAINHAND, CraftItemStack.asNMSCopy(var4.getMainHandItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.OFFHAND, CraftItemStack.asNMSCopy(var4.b())));
|
var6.add(new Pair(EquipmentSlot.OFFHAND, CraftItemStack.asNMSCopy(var4.getOffHandItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.HEAD, CraftItemStack.asNMSCopy(var4.c())));
|
var6.add(new Pair(EquipmentSlot.HEAD, CraftItemStack.asNMSCopy(var4.getHelmetItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.CHEST, CraftItemStack.asNMSCopy(var4.d())));
|
var6.add(new Pair(EquipmentSlot.CHEST, CraftItemStack.asNMSCopy(var4.getChestplateItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.LEGS, CraftItemStack.asNMSCopy(var4.e())));
|
var6.add(new Pair(EquipmentSlot.LEGS, CraftItemStack.asNMSCopy(var4.getLeggingsItem())));
|
||||||
var6.add(new Pair(EquipmentSlot.FEET, CraftItemStack.asNMSCopy(var4.f())));
|
var6.add(new Pair(EquipmentSlot.FEET, CraftItemStack.asNMSCopy(var4.getBootsItem())));
|
||||||
var5.a(var6);
|
var5.a(var6);
|
||||||
return var5;
|
return var5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
||||||
<artifactId>platforms-latest-v1_18_R2</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
<artifactId>platforms-latest-v1_18_R2</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
||||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>platform-api-latest</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-v1_18_R2</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-v1_18_R2.jar</systemPath></dependency></dependencies>
|
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-v1_18_R2</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-v1_18_R2.jar</systemPath></dependency></dependencies>
|
||||||
</project>
|
</project>
|
||||||
+14
-14
@@ -46,7 +46,7 @@ import org.bukkit.entity.Item;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scoreboard.Score;
|
import org.bukkit.scoreboard.Score;
|
||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
import org.bukkit.scoreboard.Team.OptionStatus;
|
import ro.fr33styler.arcade.platform.api.scoreboard.TeamVisibility;
|
||||||
import ro.fr33styler.arcade.api.engine.command.Command;
|
import ro.fr33styler.arcade.api.engine.command.Command;
|
||||||
|
|
||||||
public class V1_18_2Platform implements ServerPlatform {
|
public class V1_18_2Platform implements ServerPlatform {
|
||||||
@@ -57,32 +57,32 @@ public class V1_18_2Platform implements ServerPlatform {
|
|||||||
this.a = new V1_18_2NpcFactory(var1);
|
this.a = new V1_18_2NpcFactory(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_18_2NpcFactory a() {
|
public V1_18_2NpcFactory getNpcFactory() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_18_2PacketInterceptor b() {
|
public V1_18_2PacketInterceptor getPacketInterceptor() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void sendHealthUpdate(Player var1) {
|
||||||
((CraftPlayer)var1).sendHealthUpdate();
|
((CraftPlayer)var1).sendHealthUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Item var2) {
|
public void sendCollectItemAnimation(Player var1, Item var2) {
|
||||||
((CraftPlayer)var1).getHandle().b.a(new PacketPlayOutCollect(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
((CraftPlayer)var1).getHandle().b.a(new PacketPlayOutCollect(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Command var1) {
|
public void registerCommand(Command var1) {
|
||||||
this.a(var1, var1.getCommand());
|
this.a(var1, var1.getCommand());
|
||||||
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(Command var1) {
|
public void unregisterCommand(Command var1) {
|
||||||
RootCommandNode var2 = this.e().a().getRoot();
|
RootCommandNode var2 = this.e().a().getRoot();
|
||||||
var2.removeCommand(var1.getCommand());
|
var2.removeCommand(var1.getCommand());
|
||||||
var1.getAliases().forEach(var2::removeCommand);
|
var1.getAliases().forEach(var2::removeCommand);
|
||||||
BukkitCommands.b(var1);
|
BukkitCommands.unregisterCommand(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CommandDispatcher e() {
|
private CommandDispatcher e() {
|
||||||
@@ -120,11 +120,11 @@ public class V1_18_2Platform implements ServerPlatform {
|
|||||||
return 1;
|
return 1;
|
||||||
});
|
});
|
||||||
LiteralCommandNode var4 = var3.build();
|
LiteralCommandNode var4 = var3.build();
|
||||||
BukkitCommands.a(new VanillaCommandWrapper(this.e(), var4));
|
BukkitCommands.registerBukkitCommand(new VanillaCommandWrapper(this.e(), var4));
|
||||||
this.e().a().getRoot().addChild(var4);
|
this.e().a().getRoot().addChild(var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Block var1, Material var2) {
|
public void setBlock(Block var1, Material var2) {
|
||||||
CraftBlock var3 = (CraftBlock)var1;
|
CraftBlock var3 = (CraftBlock)var1;
|
||||||
Chunk var4 = ((CraftChunk)var1.getChunk()).getHandle();
|
Chunk var4 = ((CraftChunk)var1.getChunk()).getHandle();
|
||||||
IBlockData var5 = CraftMagicNumbers.getBlock(var2).n();
|
IBlockData var5 = CraftMagicNumbers.getBlock(var2).n();
|
||||||
@@ -132,11 +132,11 @@ public class V1_18_2Platform implements ServerPlatform {
|
|||||||
var4.D().a(var3.getPosition(), var3.getNMS(), var5, 0);
|
var4.D().a(var3.getPosition(), var3.getNMS(), var5, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HologramEntity a(World var1, double var2, double var4, double var6) {
|
public HologramEntity createHologram(World var1, double var2, double var4, double var6) {
|
||||||
return new V1_18_2HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
return new V1_18_2HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(Block var1, double var2, double var4, double var6) {
|
public boolean isInsideBlockHitbox(Block var1, double var2, double var4, double var6) {
|
||||||
CraftBlock var8 = (CraftBlock)var1;
|
CraftBlock var8 = (CraftBlock)var1;
|
||||||
VoxelShape var9 = var8.getNMS().j(var8.getCraftWorld().getHandle(), var8.getPosition());
|
VoxelShape var9 = var8.getNMS().j(var8.getCraftWorld().getHandle(), var8.getPosition());
|
||||||
if (var9.b()) {
|
if (var9.b()) {
|
||||||
@@ -155,12 +155,12 @@ public class V1_18_2Platform implements ServerPlatform {
|
|||||||
return var16.booleanValue();
|
return var16.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2, Score var3, int var4) {
|
public void sendScorePacket(Player var1, boolean var2, Score var3, int var4) {
|
||||||
Action var5 = var2 ? Action.b : Action.a;
|
Action var5 = var2 ? Action.b : Action.a;
|
||||||
((CraftPlayer)var1).getHandle().b.a(new PacketPlayOutScoreboardScore(var5, var3.getObjective().getName(), var3.getEntry(), var4));
|
((CraftPlayer)var1).getHandle().b.a(new PacketPlayOutScoreboardScore(var5, var3.getObjective().getName(), var3.getEntry(), var4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Team var2, String var3, String var4, OptionStatus var5) {
|
public void sendTeamPacket(Player var1, Team var2, String var3, String var4, TeamVisibility var5) {
|
||||||
if (var1.getScoreboard() == var2.getScoreboard()) {
|
if (var1.getScoreboard() == var2.getScoreboard()) {
|
||||||
EntityPlayer var6 = ((CraftPlayer)var1).getHandle();
|
EntityPlayer var6 = ((CraftPlayer)var1).getHandle();
|
||||||
ScoreboardTeam var7 = var6.fF().f(var2.getName());
|
ScoreboardTeam var7 = var6.fF().f(var2.getName());
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class V1_18_2PlatformFactory implements VersionFactory<ServerPlatform> {
|
public class V1_18_2PlatformFactory implements VersionFactory<ServerPlatform> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.18.2";
|
return "1.18.2";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.18.2");
|
return var1.equals("1.18.2");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerPlatform a(Server var1) {
|
public ServerPlatform create(Server var1) {
|
||||||
return new V1_18_2Platform(var1);
|
return new V1_18_2Platform(var1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -13,7 +13,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class BombLobbersV1_18_2TntFactory implements BombLobbersTntFactory {
|
public class BombLobbersV1_18_2TntFactory implements BombLobbersTntFactory {
|
||||||
public TNTPrimed a(Player var1, Color var2, Vector var3) {
|
public TNTPrimed spawnTnt(Player var1, Color var2, Vector var3) {
|
||||||
EntityPlayer var4 = ((CraftPlayer)var1).getHandle();
|
EntityPlayer var4 = ((CraftPlayer)var1).getHandle();
|
||||||
Vector3fa var5 = new Vector3fa(var2.getRed() / 255.0F, var2.getGreen() / 255.0F, var2.getBlue() / 255.0F);
|
Vector3fa var5 = new Vector3fa(var2.getRed() / 255.0F, var2.getGreen() / 255.0F, var2.getBlue() / 255.0F);
|
||||||
BombLobbersV1_18_2TntEntity var6 = new BombLobbersV1_18_2TntEntity(var4, new ParticleParamRedstone(var5, 1.0F), var3);
|
BombLobbersV1_18_2TntEntity var6 = new BombLobbersV1_18_2TntEntity(var4, new ParticleParamRedstone(var5, 1.0F), var3);
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class BombLobbersV1_18_2TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
public class BombLobbersV1_18_2TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.18.2";
|
return "1.18.2";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.18.2");
|
return var1.equals("1.18.2");
|
||||||
}
|
}
|
||||||
|
|
||||||
public BombLobbersTntFactory a(Server var1) {
|
public BombLobbersTntFactory create(Server var1) {
|
||||||
return new BombLobbersV1_18_2TntFactory();
|
return new BombLobbersV1_18_2TntFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -16,15 +16,15 @@ import org.bukkit.entity.WitherSkull;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class MiniWallsV1_18_2EntityFactory implements MiniWallsEntityFactory {
|
public class MiniWallsV1_18_2EntityFactory implements MiniWallsEntityFactory {
|
||||||
public Wither a(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
public Wither spawnWither(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
||||||
return (Wither)new MiniWallsV1_18_2Wither(var1, var2, var3).getBukkitEntity();
|
return (Wither)new MiniWallsV1_18_2Wither(var1, var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Arrow a(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
public Arrow spawnArrow(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
||||||
return (Arrow)new MiniWallsV1_18_2Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
return (Arrow)new MiniWallsV1_18_2Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WitherSkull a(Wither var1, Vector var2, Predicate<Entity> var3) {
|
public WitherSkull spawnWitherSkull(Wither var1, Vector var2, Predicate<Entity> var3) {
|
||||||
return (WitherSkull)new MiniWallsV1_18_2WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
return (WitherSkull)new MiniWallsV1_18_2WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class MiniWallsV1_18_2EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
public class MiniWallsV1_18_2EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.18.2";
|
return "1.18.2";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.18.2");
|
return var1.equals("1.18.2");
|
||||||
}
|
}
|
||||||
|
|
||||||
public MiniWallsEntityFactory a(Server var1) {
|
public MiniWallsEntityFactory create(Server var1) {
|
||||||
return new MiniWallsV1_18_2EntityFactory();
|
return new MiniWallsV1_18_2EntityFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+11
-11
@@ -35,34 +35,34 @@ public class PropHuntV1_18_2PropEntity extends EntityArmorStand implements PropH
|
|||||||
this.a(EnumItemSlot.f, CraftItemStack.asNMSCopy(var2));
|
this.a(EnumItemSlot.f, CraftItemStack.asNMSCopy(var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.a(var3);
|
this.teleport(var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID a() {
|
public UUID getUniqueId() {
|
||||||
return this.aj;
|
return this.aj;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropType b() {
|
public PropHuntPropType getPropType() {
|
||||||
return this.c;
|
return this.c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack c() {
|
public ItemStack getItem() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player d() {
|
public Player getOwner() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void setOwner(Player var1) {
|
||||||
this.a = (CraftPlayer)var1;
|
this.a = (CraftPlayer)var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location e() {
|
public Location getLocation() {
|
||||||
return new Location(this.s.getWorld(), this.dc(), this.de() + 1.35, this.di(), this.dn(), this.do_());
|
return new Location(this.s.getWorld(), this.dc(), this.de() + 1.35, this.di(), this.dn(), this.do_());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Location var1) {
|
public void teleport(Location var1) {
|
||||||
double var2 = var1.getX();
|
double var2 = var1.getX();
|
||||||
double var4 = var1.getY() - 1.35;
|
double var4 = var1.getY() - 1.35;
|
||||||
double var6 = var1.getZ();
|
double var6 = var1.getZ();
|
||||||
@@ -76,13 +76,13 @@ public class PropHuntV1_18_2PropEntity extends EntityArmorStand implements PropH
|
|||||||
this.c(var2, var4, var6);
|
this.c(var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void f() {
|
public void attachOwner() {
|
||||||
if (this.a != null) {
|
if (this.a != null) {
|
||||||
this.getBukkitEntity().addPassenger(this.a);
|
this.getBukkitEntity().addPassenger(this.a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void h() {
|
public void destroy() {
|
||||||
this.ah();
|
this.ah();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class PropHuntV1_18_2PropEntity extends EntityArmorStand implements PropH
|
|||||||
|
|
||||||
public void k() {
|
public void k() {
|
||||||
if (this.a != null && !this.a.isInsideVehicle()) {
|
if (this.a != null && !this.a.isInsideVehicle()) {
|
||||||
this.a(this.a.getLocation());
|
this.teleport(this.a.getLocation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -10,11 +10,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class PropHuntV1_18_2PropFactory implements PropHuntPropFactory {
|
public class PropHuntV1_18_2PropFactory implements PropHuntPropFactory {
|
||||||
public Particle a() {
|
public Particle getDisguiseParticle() {
|
||||||
return Particle.VILLAGER_HAPPY;
|
return Particle.VILLAGER_HAPPY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntProp a(PropHuntPropType var1, ItemStack var2, Location var3) {
|
public PropHuntProp createProp(PropHuntPropType var1, ItemStack var2, Location var3) {
|
||||||
PropHuntV1_18_2PropEntity var4 = new PropHuntV1_18_2PropEntity(var1, var2, var3);
|
PropHuntV1_18_2PropEntity var4 = new PropHuntV1_18_2PropEntity(var1, var2, var3);
|
||||||
var4.s.addFreshEntity(var4, SpawnReason.CUSTOM);
|
var4.s.addFreshEntity(var4, SpawnReason.CUSTOM);
|
||||||
return var4;
|
return var4;
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class PropHuntV1_18_2PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
public class PropHuntV1_18_2PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.18.2";
|
return "1.18.2";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.18.2");
|
return var1.equals("1.18.2");
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropFactory a(Server var1) {
|
public PropHuntPropFactory create(Server var1) {
|
||||||
return new PropHuntV1_18_2PropFactory();
|
return new PropHuntV1_18_2PropFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-4
@@ -22,22 +22,22 @@ public class V1_18_2HologramEntity extends EntityArmorStand implements HologramE
|
|||||||
super.j(true);
|
super.j(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1) {
|
public void setText(String var1) {
|
||||||
super.a(CraftChatMessage.fromStringOrNull(var1));
|
super.a(CraftChatMessage.fromStringOrNull(var1));
|
||||||
if (super.Y()) {
|
if (super.Y()) {
|
||||||
super.n(true);
|
super.n(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LivingEntity a() {
|
public LivingEntity getEntity() {
|
||||||
return (LivingEntity)this.getBukkitEntity();
|
return (LivingEntity)this.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void updateMetadata(Player var1) {
|
||||||
this.a(this.b(var1));
|
this.a(this.b(var1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
PlayerConnection var3 = this.b(var1);
|
PlayerConnection var3 = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
var3.a(new PacketPlayOutSpawnEntity(this));
|
var3.a(new PacketPlayOutSpawnEntity(this));
|
||||||
|
|||||||
+2
-2
@@ -19,7 +19,7 @@ public class V1_18_2PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1, Player var2) {
|
public void inject(String var1, Player var2) {
|
||||||
try {
|
try {
|
||||||
ChannelPipeline var3 = this.a(var2).pipeline();
|
ChannelPipeline var3 = this.a(var2).pipeline();
|
||||||
this.a(var3, var1);
|
this.a(var3, var1);
|
||||||
@@ -28,7 +28,7 @@ public class V1_18_2PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(String var1, Player var2) {
|
public void eject(String var1, Player var2) {
|
||||||
Channel var3 = this.a(var2);
|
Channel var3 = this.a(var2);
|
||||||
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -34,11 +34,11 @@ public class V1_18_2Npc extends EntityPlayer implements Npc {
|
|||||||
this.a = var4;
|
this.a = var4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int a() {
|
public int getEntityId() {
|
||||||
return this.ae();
|
return this.ae();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location b() {
|
public Location getLocation() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ public class V1_18_2Npc extends EntityPlayer implements Npc {
|
|||||||
this.b = var1;
|
this.b = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
ServerPlayerConnection var3 = this.b(var1);
|
ServerPlayerConnection var3 = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
var3.a(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.a, new EntityPlayer[]{this}));
|
var3.a(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.a, new EntityPlayer[]{this}));
|
||||||
@@ -67,7 +67,7 @@ public class V1_18_2Npc extends EntityPlayer implements Npc {
|
|||||||
return ((CraftPlayer)var1).getHandle().b;
|
return ((CraftPlayer)var1).getHandle().b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void removeFromTabList(Player var1) {
|
||||||
this.b(var1).a(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.e, new EntityPlayer[]{this}));
|
this.b(var1).a(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.e, new EntityPlayer[]{this}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+9
-9
@@ -27,7 +27,7 @@ public class V1_18_2NpcFactory implements NpcFactory {
|
|||||||
this.a = var1;
|
this.a = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_18_2Npc a(Location var1, Player var2) {
|
public V1_18_2Npc createPlayerNpc(Location var1, Player var2) {
|
||||||
EntityPlayer var3 = ((CraftPlayer)var2).getHandle();
|
EntityPlayer var3 = ((CraftPlayer)var2).getHandle();
|
||||||
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName());
|
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName());
|
||||||
var4.getProperties().putAll(var3.fq().getProperties());
|
var4.getProperties().putAll(var3.fq().getProperties());
|
||||||
@@ -37,19 +37,19 @@ public class V1_18_2NpcFactory implements NpcFactory {
|
|||||||
public V1_18_2Npc a(Location var1, String var2, SkinTexture var3) {
|
public V1_18_2Npc a(Location var1, String var2, SkinTexture var3) {
|
||||||
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
||||||
GameProfile var5 = new GameProfile(UUID.randomUUID(), var2);
|
GameProfile var5 = new GameProfile(UUID.randomUUID(), var2);
|
||||||
var5.getProperties().put("textures", new Property("textures", var3.a(), var3.b()));
|
var5.getProperties().put("textures", new Property("textures", var3.getValue(), var3.getSignature()));
|
||||||
return new V1_18_2Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var5, var1);
|
return new V1_18_2Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var5, var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_18_2Npc a(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
public V1_18_2Npc createNpc(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
||||||
V1_18_2Npc var5 = this.a(var1, var2, var3);
|
V1_18_2Npc var5 = this.a(var1, var2, var3);
|
||||||
ArrayList var6 = new ArrayList();
|
ArrayList var6 = new ArrayList();
|
||||||
var6.add(new Pair(EnumItemSlot.a, CraftItemStack.asNMSCopy(var4.a())));
|
var6.add(new Pair(EnumItemSlot.a, CraftItemStack.asNMSCopy(var4.getMainHandItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.b, CraftItemStack.asNMSCopy(var4.b())));
|
var6.add(new Pair(EnumItemSlot.b, CraftItemStack.asNMSCopy(var4.getOffHandItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.f, CraftItemStack.asNMSCopy(var4.c())));
|
var6.add(new Pair(EnumItemSlot.f, CraftItemStack.asNMSCopy(var4.getHelmetItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.e, CraftItemStack.asNMSCopy(var4.d())));
|
var6.add(new Pair(EnumItemSlot.e, CraftItemStack.asNMSCopy(var4.getChestplateItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.d, CraftItemStack.asNMSCopy(var4.e())));
|
var6.add(new Pair(EnumItemSlot.d, CraftItemStack.asNMSCopy(var4.getLeggingsItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.c, CraftItemStack.asNMSCopy(var4.f())));
|
var6.add(new Pair(EnumItemSlot.c, CraftItemStack.asNMSCopy(var4.getBootsItem())));
|
||||||
var5.a(var6);
|
var5.a(var6);
|
||||||
return var5;
|
return var5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
||||||
<artifactId>platforms-latest-v1_19_R3</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
<artifactId>platforms-latest-v1_19_R3</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
||||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>platform-api-latest</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-v1_19_R3</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-v1_19_R3.jar</systemPath></dependency></dependencies>
|
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-v1_19_R3</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-v1_19_R3.jar</systemPath></dependency></dependencies>
|
||||||
</project>
|
</project>
|
||||||
+14
-14
@@ -46,7 +46,7 @@ import org.bukkit.entity.Item;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scoreboard.Score;
|
import org.bukkit.scoreboard.Score;
|
||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
import org.bukkit.scoreboard.Team.OptionStatus;
|
import ro.fr33styler.arcade.platform.api.scoreboard.TeamVisibility;
|
||||||
import ro.fr33styler.arcade.api.engine.command.Command;
|
import ro.fr33styler.arcade.api.engine.command.Command;
|
||||||
|
|
||||||
public class V1_19_4Platform implements ServerPlatform {
|
public class V1_19_4Platform implements ServerPlatform {
|
||||||
@@ -57,32 +57,32 @@ public class V1_19_4Platform implements ServerPlatform {
|
|||||||
this.a = new V1_19_4NpcFactory(var1);
|
this.a = new V1_19_4NpcFactory(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_19_4NpcFactory a() {
|
public V1_19_4NpcFactory getNpcFactory() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_19_4PacketInterceptor b() {
|
public V1_19_4PacketInterceptor getPacketInterceptor() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void sendHealthUpdate(Player var1) {
|
||||||
((CraftPlayer)var1).sendHealthUpdate();
|
((CraftPlayer)var1).sendHealthUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Item var2) {
|
public void sendCollectItemAnimation(Player var1, Item var2) {
|
||||||
((CraftPlayer)var1).getHandle().b.a(new PacketPlayOutCollect(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
((CraftPlayer)var1).getHandle().b.a(new PacketPlayOutCollect(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Command var1) {
|
public void registerCommand(Command var1) {
|
||||||
this.a(var1, var1.getCommand());
|
this.a(var1, var1.getCommand());
|
||||||
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(Command var1) {
|
public void unregisterCommand(Command var1) {
|
||||||
RootCommandNode var2 = this.e().a().getRoot();
|
RootCommandNode var2 = this.e().a().getRoot();
|
||||||
var2.removeCommand(var1.getCommand());
|
var2.removeCommand(var1.getCommand());
|
||||||
var1.getAliases().forEach(var2::removeCommand);
|
var1.getAliases().forEach(var2::removeCommand);
|
||||||
BukkitCommands.b(var1);
|
BukkitCommands.unregisterCommand(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CommandDispatcher e() {
|
private CommandDispatcher e() {
|
||||||
@@ -120,22 +120,22 @@ public class V1_19_4Platform implements ServerPlatform {
|
|||||||
return 1;
|
return 1;
|
||||||
});
|
});
|
||||||
LiteralCommandNode var4 = var3.build();
|
LiteralCommandNode var4 = var3.build();
|
||||||
BukkitCommands.a(new VanillaCommandWrapper(this.e(), var4));
|
BukkitCommands.registerBukkitCommand(new VanillaCommandWrapper(this.e(), var4));
|
||||||
this.e().a().getRoot().addChild(var4);
|
this.e().a().getRoot().addChild(var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Block var1, Material var2) {
|
public void setBlock(Block var1, Material var2) {
|
||||||
CraftBlock var3 = (CraftBlock)var1;
|
CraftBlock var3 = (CraftBlock)var1;
|
||||||
IBlockData var4 = CraftMagicNumbers.getBlock(var2).o();
|
IBlockData var4 = CraftMagicNumbers.getBlock(var2).o();
|
||||||
((CraftChunk)var1.getChunk()).getHandle(ChunkStatus.o).a(var3.getPosition(), var4, false);
|
((CraftChunk)var1.getChunk()).getHandle(ChunkStatus.o).a(var3.getPosition(), var4, false);
|
||||||
var3.getCraftWorld().getHandle().a(var3.getPosition(), var3.getNMS(), var4, 0);
|
var3.getCraftWorld().getHandle().a(var3.getPosition(), var3.getNMS(), var4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HologramEntity a(World var1, double var2, double var4, double var6) {
|
public HologramEntity createHologram(World var1, double var2, double var4, double var6) {
|
||||||
return new V1_19_4HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
return new V1_19_4HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(Block var1, double var2, double var4, double var6) {
|
public boolean isInsideBlockHitbox(Block var1, double var2, double var4, double var6) {
|
||||||
CraftBlock var8 = (CraftBlock)var1;
|
CraftBlock var8 = (CraftBlock)var1;
|
||||||
VoxelShape var9 = var8.getNMS().j(var8.getCraftWorld().getHandle(), var8.getPosition());
|
VoxelShape var9 = var8.getNMS().j(var8.getCraftWorld().getHandle(), var8.getPosition());
|
||||||
if (var9.b()) {
|
if (var9.b()) {
|
||||||
@@ -154,12 +154,12 @@ public class V1_19_4Platform implements ServerPlatform {
|
|||||||
return var16.booleanValue();
|
return var16.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2, Score var3, int var4) {
|
public void sendScorePacket(Player var1, boolean var2, Score var3, int var4) {
|
||||||
Action var5 = var2 ? Action.b : Action.a;
|
Action var5 = var2 ? Action.b : Action.a;
|
||||||
((CraftPlayer)var1).getHandle().b.a(new PacketPlayOutScoreboardScore(var5, var3.getObjective().getName(), var3.getEntry(), var4));
|
((CraftPlayer)var1).getHandle().b.a(new PacketPlayOutScoreboardScore(var5, var3.getObjective().getName(), var3.getEntry(), var4));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Team var2, String var3, String var4, OptionStatus var5) {
|
public void sendTeamPacket(Player var1, Team var2, String var3, String var4, TeamVisibility var5) {
|
||||||
if (var1.getScoreboard() == var2.getScoreboard()) {
|
if (var1.getScoreboard() == var2.getScoreboard()) {
|
||||||
EntityPlayer var6 = ((CraftPlayer)var1).getHandle();
|
EntityPlayer var6 = ((CraftPlayer)var1).getHandle();
|
||||||
ScoreboardTeam var7 = var6.fY().f(var2.getName());
|
ScoreboardTeam var7 = var6.fY().f(var2.getName());
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class V1_19_4PlatformFactory implements VersionFactory<ServerPlatform> {
|
public class V1_19_4PlatformFactory implements VersionFactory<ServerPlatform> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.19.4";
|
return "1.19.4";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.19.4");
|
return var1.equals("1.19.4");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerPlatform a(Server var1) {
|
public ServerPlatform create(Server var1) {
|
||||||
return new V1_19_4Platform(var1);
|
return new V1_19_4Platform(var1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -13,7 +13,7 @@ import org.bukkit.util.Vector;
|
|||||||
import org.joml.Vector3f;
|
import org.joml.Vector3f;
|
||||||
|
|
||||||
public class BombLobbersV1_19_4TntFactory implements BombLobbersTntFactory {
|
public class BombLobbersV1_19_4TntFactory implements BombLobbersTntFactory {
|
||||||
public TNTPrimed a(Player var1, Color var2, Vector var3) {
|
public TNTPrimed spawnTnt(Player var1, Color var2, Vector var3) {
|
||||||
EntityPlayer var4 = ((CraftPlayer)var1).getHandle();
|
EntityPlayer var4 = ((CraftPlayer)var1).getHandle();
|
||||||
Vector3f var5 = new Vector3f(var2.getRed() / 255.0F, var2.getGreen() / 255.0F, var2.getBlue() / 255.0F);
|
Vector3f var5 = new Vector3f(var2.getRed() / 255.0F, var2.getGreen() / 255.0F, var2.getBlue() / 255.0F);
|
||||||
BombLobbersV1_19_4TntEntity var6 = new BombLobbersV1_19_4TntEntity(var4, new ParticleParamRedstone(var5, 1.0F), var3);
|
BombLobbersV1_19_4TntEntity var6 = new BombLobbersV1_19_4TntEntity(var4, new ParticleParamRedstone(var5, 1.0F), var3);
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class BombLobbersV1_19_4TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
public class BombLobbersV1_19_4TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.19.4";
|
return "1.19.4";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.19.4");
|
return var1.equals("1.19.4");
|
||||||
}
|
}
|
||||||
|
|
||||||
public BombLobbersTntFactory a(Server var1) {
|
public BombLobbersTntFactory create(Server var1) {
|
||||||
return new BombLobbersV1_19_4TntFactory();
|
return new BombLobbersV1_19_4TntFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -16,15 +16,15 @@ import org.bukkit.entity.WitherSkull;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class MiniWallsV1_19_4EntityFactory implements MiniWallsEntityFactory {
|
public class MiniWallsV1_19_4EntityFactory implements MiniWallsEntityFactory {
|
||||||
public Wither a(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
public Wither spawnWither(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
||||||
return (Wither)new MiniWallsV1_19_4Wither(var1, var2, var3).getBukkitEntity();
|
return (Wither)new MiniWallsV1_19_4Wither(var1, var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Arrow a(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
public Arrow spawnArrow(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
||||||
return (Arrow)new MiniWallsV1_19_4Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
return (Arrow)new MiniWallsV1_19_4Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WitherSkull a(Wither var1, Vector var2, Predicate<Entity> var3) {
|
public WitherSkull spawnWitherSkull(Wither var1, Vector var2, Predicate<Entity> var3) {
|
||||||
return (WitherSkull)new MiniWallsV1_19_4WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
return (WitherSkull)new MiniWallsV1_19_4WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class MiniWallsV1_19_4EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
public class MiniWallsV1_19_4EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.19.4";
|
return "1.19.4";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.19.4");
|
return var1.equals("1.19.4");
|
||||||
}
|
}
|
||||||
|
|
||||||
public MiniWallsEntityFactory a(Server var1) {
|
public MiniWallsEntityFactory create(Server var1) {
|
||||||
return new MiniWallsV1_19_4EntityFactory();
|
return new MiniWallsV1_19_4EntityFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+11
-11
@@ -35,34 +35,34 @@ public class PropHuntV1_19_4PropEntity extends EntityArmorStand implements PropH
|
|||||||
this.a(EnumItemSlot.f, CraftItemStack.asNMSCopy(var2));
|
this.a(EnumItemSlot.f, CraftItemStack.asNMSCopy(var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.a(var3);
|
this.teleport(var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID a() {
|
public UUID getUniqueId() {
|
||||||
return this.ax;
|
return this.ax;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropType b() {
|
public PropHuntPropType getPropType() {
|
||||||
return this.c;
|
return this.c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack c() {
|
public ItemStack getItem() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player d() {
|
public Player getOwner() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void setOwner(Player var1) {
|
||||||
this.a = (CraftPlayer)var1;
|
this.a = (CraftPlayer)var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location e() {
|
public Location getLocation() {
|
||||||
return new Location(this.H.getWorld(), this.dl(), this.dn() + 1.35, this.dr(), this.dw(), this.dy());
|
return new Location(this.H.getWorld(), this.dl(), this.dn() + 1.35, this.dr(), this.dw(), this.dy());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Location var1) {
|
public void teleport(Location var1) {
|
||||||
double var2 = var1.getX();
|
double var2 = var1.getX();
|
||||||
double var4 = var1.getY() - 1.35;
|
double var4 = var1.getY() - 1.35;
|
||||||
double var6 = var1.getZ();
|
double var6 = var1.getZ();
|
||||||
@@ -76,13 +76,13 @@ public class PropHuntV1_19_4PropEntity extends EntityArmorStand implements PropH
|
|||||||
this.d(var2, var4, var6);
|
this.d(var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void f() {
|
public void attachOwner() {
|
||||||
if (this.a != null) {
|
if (this.a != null) {
|
||||||
this.getBukkitEntity().addPassenger(this.a);
|
this.getBukkitEntity().addPassenger(this.a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void h() {
|
public void destroy() {
|
||||||
this.ai();
|
this.ai();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class PropHuntV1_19_4PropEntity extends EntityArmorStand implements PropH
|
|||||||
|
|
||||||
public void l() {
|
public void l() {
|
||||||
if (this.a != null && !this.a.isInsideVehicle()) {
|
if (this.a != null && !this.a.isInsideVehicle()) {
|
||||||
this.a(this.a.getLocation());
|
this.teleport(this.a.getLocation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -10,11 +10,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class PropHuntV1_19_4PropFactory implements PropHuntPropFactory {
|
public class PropHuntV1_19_4PropFactory implements PropHuntPropFactory {
|
||||||
public Particle a() {
|
public Particle getDisguiseParticle() {
|
||||||
return Particle.VILLAGER_HAPPY;
|
return Particle.VILLAGER_HAPPY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntProp a(PropHuntPropType var1, ItemStack var2, Location var3) {
|
public PropHuntProp createProp(PropHuntPropType var1, ItemStack var2, Location var3) {
|
||||||
PropHuntV1_19_4PropEntity var4 = new PropHuntV1_19_4PropEntity(var1, var2, var3);
|
PropHuntV1_19_4PropEntity var4 = new PropHuntV1_19_4PropEntity(var1, var2, var3);
|
||||||
var4.H.addFreshEntity(var4, SpawnReason.CUSTOM);
|
var4.H.addFreshEntity(var4, SpawnReason.CUSTOM);
|
||||||
return var4;
|
return var4;
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class PropHuntV1_19_4PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
public class PropHuntV1_19_4PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.19.4";
|
return "1.19.4";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.19.4");
|
return var1.equals("1.19.4");
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropFactory a(Server var1) {
|
public PropHuntPropFactory create(Server var1) {
|
||||||
return new PropHuntV1_19_4PropFactory();
|
return new PropHuntV1_19_4PropFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-4
@@ -22,22 +22,22 @@ public class V1_19_4HologramEntity extends EntityArmorStand implements HologramE
|
|||||||
super.j(true);
|
super.j(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1) {
|
public void setText(String var1) {
|
||||||
super.b(CraftChatMessage.fromStringOrNull(var1));
|
super.b(CraftChatMessage.fromStringOrNull(var1));
|
||||||
if (super.aa()) {
|
if (super.aa()) {
|
||||||
super.n(true);
|
super.n(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void updateMetadata(Player var1) {
|
||||||
this.a(this.b(var1));
|
this.a(this.b(var1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public LivingEntity a() {
|
public LivingEntity getEntity() {
|
||||||
return (LivingEntity)this.getBukkitEntity();
|
return (LivingEntity)this.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
PlayerConnection var3 = this.b(var1);
|
PlayerConnection var3 = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
var3.a(new PacketPlayOutSpawnEntity(this));
|
var3.a(new PacketPlayOutSpawnEntity(this));
|
||||||
|
|||||||
+4
-4
@@ -13,10 +13,10 @@ import org.bukkit.craftbukkit.v1_19_R3.entity.CraftPlayer;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class V1_19_4PacketInterceptor implements PacketInterceptor {
|
public class V1_19_4PacketInterceptor implements PacketInterceptor {
|
||||||
private static final Field a = Reflection.a(PlayerConnection.class, NetworkManager.class);
|
private static final Field a = Reflection.findFieldByType(PlayerConnection.class, NetworkManager.class);
|
||||||
|
|
||||||
private Channel a(Player var1) throws IllegalAccessException {
|
private Channel a(Player var1) throws IllegalAccessException {
|
||||||
NetworkManager var2 = (NetworkManager)Reflection.a(a, ((CraftPlayer)var1).getHandle().b);
|
NetworkManager var2 = (NetworkManager)Reflection.getFieldValue(a, ((CraftPlayer)var1).getHandle().b);
|
||||||
return var2.m;
|
return var2.m;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ public class V1_19_4PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1, Player var2) {
|
public void inject(String var1, Player var2) {
|
||||||
try {
|
try {
|
||||||
ChannelPipeline var3 = this.a(var2).pipeline();
|
ChannelPipeline var3 = this.a(var2).pipeline();
|
||||||
this.a(var3, var1);
|
this.a(var3, var1);
|
||||||
@@ -37,7 +37,7 @@ public class V1_19_4PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(String var1, Player var2) {
|
public void eject(String var1, Player var2) {
|
||||||
try {
|
try {
|
||||||
Channel var3 = this.a(var2);
|
Channel var3 = this.a(var2);
|
||||||
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
||||||
|
|||||||
+4
-4
@@ -35,11 +35,11 @@ public class V1_19_4Npc extends EntityPlayer implements Npc {
|
|||||||
this.a = var4;
|
this.a = var4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int a() {
|
public int getEntityId() {
|
||||||
return this.af();
|
return this.af();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location b() {
|
public Location getLocation() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ public class V1_19_4Npc extends EntityPlayer implements Npc {
|
|||||||
this.b = var1;
|
this.b = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
ServerPlayerConnection var3 = this.b(var1);
|
ServerPlayerConnection var3 = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
var3.a(new ClientboundPlayerInfoUpdatePacket(net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a.a, this));
|
var3.a(new ClientboundPlayerInfoUpdatePacket(net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a.a, this));
|
||||||
@@ -68,7 +68,7 @@ public class V1_19_4Npc extends EntityPlayer implements Npc {
|
|||||||
return ((CraftPlayer)var1).getHandle().b;
|
return ((CraftPlayer)var1).getHandle().b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void removeFromTabList(Player var1) {
|
||||||
this.b(var1).a(new ClientboundPlayerInfoRemovePacket(List.of(this.ax)));
|
this.b(var1).a(new ClientboundPlayerInfoRemovePacket(List.of(this.ax)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+9
-9
@@ -27,7 +27,7 @@ public class V1_19_4NpcFactory implements NpcFactory {
|
|||||||
this.a = var1;
|
this.a = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_19_4Npc a(Location var1, Player var2) {
|
public V1_19_4Npc createPlayerNpc(Location var1, Player var2) {
|
||||||
EntityPlayer var3 = ((CraftPlayer)var2).getHandle();
|
EntityPlayer var3 = ((CraftPlayer)var2).getHandle();
|
||||||
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName());
|
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName());
|
||||||
var4.getProperties().putAll(var3.fI().getProperties());
|
var4.getProperties().putAll(var3.fI().getProperties());
|
||||||
@@ -37,19 +37,19 @@ public class V1_19_4NpcFactory implements NpcFactory {
|
|||||||
public V1_19_4Npc a(Location var1, String var2, SkinTexture var3) {
|
public V1_19_4Npc a(Location var1, String var2, SkinTexture var3) {
|
||||||
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
||||||
GameProfile var5 = new GameProfile(UUID.randomUUID(), var2);
|
GameProfile var5 = new GameProfile(UUID.randomUUID(), var2);
|
||||||
var5.getProperties().put("textures", new Property("textures", var3.a(), var3.b()));
|
var5.getProperties().put("textures", new Property("textures", var3.getValue(), var3.getSignature()));
|
||||||
return new V1_19_4Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var5, var1);
|
return new V1_19_4Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var5, var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_19_4Npc a(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
public V1_19_4Npc createNpc(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
||||||
V1_19_4Npc var5 = this.a(var1, var2, var3);
|
V1_19_4Npc var5 = this.a(var1, var2, var3);
|
||||||
ArrayList var6 = new ArrayList();
|
ArrayList var6 = new ArrayList();
|
||||||
var6.add(new Pair(EnumItemSlot.a, CraftItemStack.asNMSCopy(var4.a())));
|
var6.add(new Pair(EnumItemSlot.a, CraftItemStack.asNMSCopy(var4.getMainHandItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.b, CraftItemStack.asNMSCopy(var4.b())));
|
var6.add(new Pair(EnumItemSlot.b, CraftItemStack.asNMSCopy(var4.getOffHandItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.f, CraftItemStack.asNMSCopy(var4.c())));
|
var6.add(new Pair(EnumItemSlot.f, CraftItemStack.asNMSCopy(var4.getHelmetItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.e, CraftItemStack.asNMSCopy(var4.d())));
|
var6.add(new Pair(EnumItemSlot.e, CraftItemStack.asNMSCopy(var4.getChestplateItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.d, CraftItemStack.asNMSCopy(var4.e())));
|
var6.add(new Pair(EnumItemSlot.d, CraftItemStack.asNMSCopy(var4.getLeggingsItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.c, CraftItemStack.asNMSCopy(var4.f())));
|
var6.add(new Pair(EnumItemSlot.c, CraftItemStack.asNMSCopy(var4.getBootsItem())));
|
||||||
var5.a(var6);
|
var5.a(var6);
|
||||||
return var5;
|
return var5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
||||||
<artifactId>platforms-latest-v1_20_R4</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
<artifactId>platforms-latest-v1_20_R4</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
||||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>platform-api-latest</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-v1_20_R4</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-v1_20_R4.jar</systemPath></dependency></dependencies>
|
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-v1_20_R4</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-v1_20_R4.jar</systemPath></dependency></dependencies>
|
||||||
</project>
|
</project>
|
||||||
+15
-15
@@ -52,7 +52,7 @@ import org.bukkit.entity.Item;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scoreboard.Score;
|
import org.bukkit.scoreboard.Score;
|
||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
import org.bukkit.scoreboard.Team.OptionStatus;
|
import ro.fr33styler.arcade.platform.api.scoreboard.TeamVisibility;
|
||||||
import ro.fr33styler.arcade.api.engine.command.Command;
|
import ro.fr33styler.arcade.api.engine.command.Command;
|
||||||
|
|
||||||
public class V1_20_6Platform implements ServerPlatform {
|
public class V1_20_6Platform implements ServerPlatform {
|
||||||
@@ -63,32 +63,32 @@ public class V1_20_6Platform implements ServerPlatform {
|
|||||||
this.a = new V1_20_6NpcFactory(var1);
|
this.a = new V1_20_6NpcFactory(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_20_6NpcFactory a() {
|
public V1_20_6NpcFactory getNpcFactory() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_20_6PacketInterceptor b() {
|
public V1_20_6PacketInterceptor getPacketInterceptor() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void sendHealthUpdate(Player var1) {
|
||||||
var1.sendHealthUpdate();
|
var1.sendHealthUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Item var2) {
|
public void sendCollectItemAnimation(Player var1, Item var2) {
|
||||||
((CraftPlayer)var1).getHandle().c.b(new PacketPlayOutCollect(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
((CraftPlayer)var1).getHandle().c.b(new PacketPlayOutCollect(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Command var1) {
|
public void registerCommand(Command var1) {
|
||||||
this.a(var1, var1.getCommand());
|
this.a(var1, var1.getCommand());
|
||||||
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(Command var1) {
|
public void unregisterCommand(Command var1) {
|
||||||
RootCommandNode var2 = this.e().a().getRoot();
|
RootCommandNode var2 = this.e().a().getRoot();
|
||||||
var2.removeCommand(var1.getCommand());
|
var2.removeCommand(var1.getCommand());
|
||||||
var1.getAliases().forEach(var2::removeCommand);
|
var1.getAliases().forEach(var2::removeCommand);
|
||||||
BukkitCommands.b(var1);
|
BukkitCommands.unregisterCommand(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CommandDispatcher e() {
|
private CommandDispatcher e() {
|
||||||
@@ -126,25 +126,25 @@ public class V1_20_6Platform implements ServerPlatform {
|
|||||||
return 1;
|
return 1;
|
||||||
});
|
});
|
||||||
LiteralCommandNode var4 = var3.build();
|
LiteralCommandNode var4 = var3.build();
|
||||||
if (!ServerVersion.d) {
|
if (!ServerVersion.IS_PAPER) {
|
||||||
BukkitCommands.a(new VanillaCommandWrapper(this.e(), var4));
|
BukkitCommands.registerBukkitCommand(new VanillaCommandWrapper(this.e(), var4));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.e().a().getRoot().addChild(var4);
|
this.e().a().getRoot().addChild(var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Block var1, Material var2) {
|
public void setBlock(Block var1, Material var2) {
|
||||||
CraftBlock var3 = (CraftBlock)var1;
|
CraftBlock var3 = (CraftBlock)var1;
|
||||||
IBlockData var4 = CraftMagicNumbers.getBlock(var2).o();
|
IBlockData var4 = CraftMagicNumbers.getBlock(var2).o();
|
||||||
((CraftChunk)var1.getChunk()).getHandle(ChunkStatus.n).a(var3.getPosition(), var4, false);
|
((CraftChunk)var1.getChunk()).getHandle(ChunkStatus.n).a(var3.getPosition(), var4, false);
|
||||||
var3.getCraftWorld().getHandle().a(var3.getPosition(), var3.getNMS(), var4, 0);
|
var3.getCraftWorld().getHandle().a(var3.getPosition(), var3.getNMS(), var4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HologramEntity a(World var1, double var2, double var4, double var6) {
|
public HologramEntity createHologram(World var1, double var2, double var4, double var6) {
|
||||||
return new V1_20_6HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
return new V1_20_6HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(Block var1, double var2, double var4, double var6) {
|
public boolean isInsideBlockHitbox(Block var1, double var2, double var4, double var6) {
|
||||||
CraftBlock var8 = (CraftBlock)var1;
|
CraftBlock var8 = (CraftBlock)var1;
|
||||||
VoxelShape var9 = var8.getNMS().j(var8.getCraftWorld().getHandle(), var8.getPosition());
|
VoxelShape var9 = var8.getNMS().j(var8.getCraftWorld().getHandle(), var8.getPosition());
|
||||||
if (var9.c()) {
|
if (var9.c()) {
|
||||||
@@ -163,7 +163,7 @@ public class V1_20_6Platform implements ServerPlatform {
|
|||||||
return var16.booleanValue();
|
return var16.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2, Score var3, int var4) {
|
public void sendScorePacket(Player var1, boolean var2, Score var3, int var4) {
|
||||||
if (var2) {
|
if (var2) {
|
||||||
((CraftPlayer)var1).getHandle().c.b(new ClientboundResetScorePacket(var3.getEntry(), var3.getObjective().getName()));
|
((CraftPlayer)var1).getHandle().c.b(new ClientboundResetScorePacket(var3.getEntry(), var3.getObjective().getName()));
|
||||||
} else {
|
} else {
|
||||||
@@ -174,7 +174,7 @@ public class V1_20_6Platform implements ServerPlatform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Team var2, String var3, String var4, OptionStatus var5) {
|
public void sendTeamPacket(Player var1, Team var2, String var3, String var4, TeamVisibility var5) {
|
||||||
if (var1.getScoreboard() == var2.getScoreboard()) {
|
if (var1.getScoreboard() == var2.getScoreboard()) {
|
||||||
EntityPlayer var6 = ((CraftPlayer)var1).getHandle();
|
EntityPlayer var6 = ((CraftPlayer)var1).getHandle();
|
||||||
ScoreboardTeam var7 = var6.gr().b(var2.getName());
|
ScoreboardTeam var7 = var6.gr().b(var2.getName());
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class V1_20_6PlatformFactory implements VersionFactory<ServerPlatform> {
|
public class V1_20_6PlatformFactory implements VersionFactory<ServerPlatform> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.20.6";
|
return "1.20.6";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.20.5") || var1.equals("1.20.6");
|
return var1.equals("1.20.5") || var1.equals("1.20.6");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerPlatform a(Server var1) {
|
public ServerPlatform create(Server var1) {
|
||||||
return new V1_20_6Platform(var1);
|
return new V1_20_6Platform(var1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -13,7 +13,7 @@ import org.bukkit.util.Vector;
|
|||||||
import org.joml.Vector3f;
|
import org.joml.Vector3f;
|
||||||
|
|
||||||
public class BombLobbersV1_20_6TntFactory implements BombLobbersTntFactory {
|
public class BombLobbersV1_20_6TntFactory implements BombLobbersTntFactory {
|
||||||
public TNTPrimed a(Player var1, Color var2, Vector var3) {
|
public TNTPrimed spawnTnt(Player var1, Color var2, Vector var3) {
|
||||||
EntityPlayer var4 = ((CraftPlayer)var1).getHandle();
|
EntityPlayer var4 = ((CraftPlayer)var1).getHandle();
|
||||||
Vector3f var5 = new Vector3f(var2.getRed() / 255.0F, var2.getGreen() / 255.0F, var2.getBlue() / 255.0F);
|
Vector3f var5 = new Vector3f(var2.getRed() / 255.0F, var2.getGreen() / 255.0F, var2.getBlue() / 255.0F);
|
||||||
BombLobbersV1_20_6TntEntity var6 = new BombLobbersV1_20_6TntEntity(var4, new ParticleParamRedstone(var5, 1.0F), var3);
|
BombLobbersV1_20_6TntEntity var6 = new BombLobbersV1_20_6TntEntity(var4, new ParticleParamRedstone(var5, 1.0F), var3);
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class BombLobbersV1_20_6TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
public class BombLobbersV1_20_6TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.20.6";
|
return "1.20.6";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.20.5") || var1.equals("1.20.6");
|
return var1.equals("1.20.5") || var1.equals("1.20.6");
|
||||||
}
|
}
|
||||||
|
|
||||||
public BombLobbersTntFactory a(Server var1) {
|
public BombLobbersTntFactory create(Server var1) {
|
||||||
return new BombLobbersV1_20_6TntFactory();
|
return new BombLobbersV1_20_6TntFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -16,15 +16,15 @@ import org.bukkit.entity.WitherSkull;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class MiniWallsV1_20_6EntityFactory implements MiniWallsEntityFactory {
|
public class MiniWallsV1_20_6EntityFactory implements MiniWallsEntityFactory {
|
||||||
public Wither a(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
public Wither spawnWither(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
||||||
return (Wither)new MiniWallsV1_20_6Wither(var1, var2, var3).getBukkitEntity();
|
return (Wither)new MiniWallsV1_20_6Wither(var1, var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Arrow a(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
public Arrow spawnArrow(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
||||||
return (Arrow)new MiniWallsV1_20_6Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
return (Arrow)new MiniWallsV1_20_6Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WitherSkull a(Wither var1, Vector var2, Predicate<Entity> var3) {
|
public WitherSkull spawnWitherSkull(Wither var1, Vector var2, Predicate<Entity> var3) {
|
||||||
return (WitherSkull)new MiniWallsV1_20_6WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
return (WitherSkull)new MiniWallsV1_20_6WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class MiniWallsV1_20_6EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
public class MiniWallsV1_20_6EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.20.6";
|
return "1.20.6";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.20.5") || var1.equals("1.20.6");
|
return var1.equals("1.20.5") || var1.equals("1.20.6");
|
||||||
}
|
}
|
||||||
|
|
||||||
public MiniWallsEntityFactory a(Server var1) {
|
public MiniWallsEntityFactory create(Server var1) {
|
||||||
return new MiniWallsV1_20_6EntityFactory();
|
return new MiniWallsV1_20_6EntityFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+11
-11
@@ -35,34 +35,34 @@ public class PropHuntV1_20_6PropEntity extends EntityArmorStand implements PropH
|
|||||||
this.a(EnumItemSlot.f, CraftItemStack.asNMSCopy(var2));
|
this.a(EnumItemSlot.f, CraftItemStack.asNMSCopy(var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.a(var3);
|
this.teleport(var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID a() {
|
public UUID getUniqueId() {
|
||||||
return this.az;
|
return this.az;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropType b() {
|
public PropHuntPropType getPropType() {
|
||||||
return this.c;
|
return this.c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack c() {
|
public ItemStack getItem() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player d() {
|
public Player getOwner() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void setOwner(Player var1) {
|
||||||
this.a = (CraftPlayer)var1;
|
this.a = (CraftPlayer)var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location e() {
|
public Location getLocation() {
|
||||||
return new Location(this.dP().getWorld(), this.du(), this.dw() + 1.35, this.dA(), this.dF(), this.dH());
|
return new Location(this.dP().getWorld(), this.du(), this.dw() + 1.35, this.dA(), this.dF(), this.dH());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Location var1) {
|
public void teleport(Location var1) {
|
||||||
double var2 = var1.getX();
|
double var2 = var1.getX();
|
||||||
double var4 = var1.getY() - 1.35;
|
double var4 = var1.getY() - 1.35;
|
||||||
double var6 = var1.getZ();
|
double var6 = var1.getZ();
|
||||||
@@ -76,13 +76,13 @@ public class PropHuntV1_20_6PropEntity extends EntityArmorStand implements PropH
|
|||||||
this.e(var2, var4, var6);
|
this.e(var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void f() {
|
public void attachOwner() {
|
||||||
if (this.a != null) {
|
if (this.a != null) {
|
||||||
this.getBukkitEntity().addPassenger(this.a);
|
this.getBukkitEntity().addPassenger(this.a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void h() {
|
public void destroy() {
|
||||||
this.ao();
|
this.ao();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class PropHuntV1_20_6PropEntity extends EntityArmorStand implements PropH
|
|||||||
|
|
||||||
public void l() {
|
public void l() {
|
||||||
if (this.a != null && !this.a.isInsideVehicle()) {
|
if (this.a != null && !this.a.isInsideVehicle()) {
|
||||||
this.a(this.a.getLocation());
|
this.teleport(this.a.getLocation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -10,11 +10,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class PropHuntV1_20_6PropFactory implements PropHuntPropFactory {
|
public class PropHuntV1_20_6PropFactory implements PropHuntPropFactory {
|
||||||
public Particle a() {
|
public Particle getDisguiseParticle() {
|
||||||
return Particle.HAPPY_VILLAGER;
|
return Particle.HAPPY_VILLAGER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntProp a(PropHuntPropType var1, ItemStack var2, Location var3) {
|
public PropHuntProp createProp(PropHuntPropType var1, ItemStack var2, Location var3) {
|
||||||
PropHuntV1_20_6PropEntity var4 = new PropHuntV1_20_6PropEntity(var1, var2, var3);
|
PropHuntV1_20_6PropEntity var4 = new PropHuntV1_20_6PropEntity(var1, var2, var3);
|
||||||
var4.dP().addFreshEntity(var4, SpawnReason.CUSTOM);
|
var4.dP().addFreshEntity(var4, SpawnReason.CUSTOM);
|
||||||
return var4;
|
return var4;
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class PropHuntV1_20_6PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
public class PropHuntV1_20_6PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.20.6";
|
return "1.20.6";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.20.5") || var1.equals("1.20.6");
|
return var1.equals("1.20.5") || var1.equals("1.20.6");
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropHuntPropFactory a(Server var1) {
|
public PropHuntPropFactory create(Server var1) {
|
||||||
return new PropHuntV1_20_6PropFactory();
|
return new PropHuntV1_20_6PropFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-4
@@ -22,22 +22,22 @@ public class V1_20_6HologramEntity extends EntityArmorStand implements HologramE
|
|||||||
super.k(true);
|
super.k(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1) {
|
public void setText(String var1) {
|
||||||
super.b(CraftChatMessage.fromStringOrNull(var1));
|
super.b(CraftChatMessage.fromStringOrNull(var1));
|
||||||
if (super.ag()) {
|
if (super.ag()) {
|
||||||
super.o(true);
|
super.o(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LivingEntity a() {
|
public LivingEntity getEntity() {
|
||||||
return (LivingEntity)this.getBukkitEntity();
|
return (LivingEntity)this.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void updateMetadata(Player var1) {
|
||||||
this.a(this.b(var1));
|
this.a(this.b(var1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
PlayerConnection var3 = this.b(var1);
|
PlayerConnection var3 = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
var3.b(new PacketPlayOutSpawnEntity(this));
|
var3.b(new PacketPlayOutSpawnEntity(this));
|
||||||
|
|||||||
+4
-4
@@ -13,10 +13,10 @@ import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPlayer;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class V1_20_6PacketInterceptor implements PacketInterceptor {
|
public class V1_20_6PacketInterceptor implements PacketInterceptor {
|
||||||
private static final Field a = Reflection.a(ServerCommonPacketListenerImpl.class, NetworkManager.class);
|
private static final Field a = Reflection.findFieldByType(ServerCommonPacketListenerImpl.class, NetworkManager.class);
|
||||||
|
|
||||||
private Channel a(Player var1) throws IllegalAccessException {
|
private Channel a(Player var1) throws IllegalAccessException {
|
||||||
NetworkManager var2 = (NetworkManager)Reflection.a(a, ((CraftPlayer)var1).getHandle().c);
|
NetworkManager var2 = (NetworkManager)Reflection.getFieldValue(a, ((CraftPlayer)var1).getHandle().c);
|
||||||
return var2.n;
|
return var2.n;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ public class V1_20_6PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(String var1, Player var2) {
|
public void inject(String var1, Player var2) {
|
||||||
try {
|
try {
|
||||||
ChannelPipeline var3 = this.a(var2).pipeline();
|
ChannelPipeline var3 = this.a(var2).pipeline();
|
||||||
this.a(var3, var1);
|
this.a(var3, var1);
|
||||||
@@ -37,7 +37,7 @@ public class V1_20_6PacketInterceptor implements PacketInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(String var1, Player var2) {
|
public void eject(String var1, Player var2) {
|
||||||
try {
|
try {
|
||||||
Channel var3 = this.a(var2);
|
Channel var3 = this.a(var2);
|
||||||
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
||||||
|
|||||||
+4
-4
@@ -36,11 +36,11 @@ public class V1_20_6Npc extends EntityPlayer implements Npc {
|
|||||||
this.a = var4;
|
this.a = var4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int a() {
|
public int getEntityId() {
|
||||||
return this.al();
|
return this.al();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location b() {
|
public Location getLocation() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ public class V1_20_6Npc extends EntityPlayer implements Npc {
|
|||||||
this.b = var1;
|
this.b = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2) {
|
public void setVisible(Player var1, boolean var2) {
|
||||||
this.c = this.b(var1);
|
this.c = this.b(var1);
|
||||||
if (var2) {
|
if (var2) {
|
||||||
this.c.b(new ClientboundPlayerInfoUpdatePacket(net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a.a, this));
|
this.c.b(new ClientboundPlayerInfoUpdatePacket(net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.a.a, this));
|
||||||
@@ -69,7 +69,7 @@ public class V1_20_6Npc extends EntityPlayer implements Npc {
|
|||||||
return ((CraftPlayer)var1).getHandle().c;
|
return ((CraftPlayer)var1).getHandle().c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void removeFromTabList(Player var1) {
|
||||||
this.b(var1).b(new ClientboundPlayerInfoRemovePacket(List.of(this.az)));
|
this.b(var1).b(new ClientboundPlayerInfoRemovePacket(List.of(this.az)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+9
-9
@@ -26,7 +26,7 @@ public class V1_20_6NpcFactory implements NpcFactory {
|
|||||||
this.a = var1;
|
this.a = var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_20_6Npc a(Location var1, Player var2) {
|
public V1_20_6Npc createPlayerNpc(Location var1, Player var2) {
|
||||||
EntityPlayer var3 = ((CraftPlayer)var2).getHandle();
|
EntityPlayer var3 = ((CraftPlayer)var2).getHandle();
|
||||||
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName());
|
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName());
|
||||||
var4.getProperties().putAll(var3.gb().getProperties());
|
var4.getProperties().putAll(var3.gb().getProperties());
|
||||||
@@ -36,19 +36,19 @@ public class V1_20_6NpcFactory implements NpcFactory {
|
|||||||
public V1_20_6Npc a(Location var1, String var2, SkinTexture var3) {
|
public V1_20_6Npc a(Location var1, String var2, SkinTexture var3) {
|
||||||
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
||||||
GameProfile var5 = new GameProfile(UUID.randomUUID(), var2);
|
GameProfile var5 = new GameProfile(UUID.randomUUID(), var2);
|
||||||
var5.getProperties().put("textures", new Property("textures", var3.a(), var3.b()));
|
var5.getProperties().put("textures", new Property("textures", var3.getValue(), var3.getSignature()));
|
||||||
return new V1_20_6Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var5, var1);
|
return new V1_20_6Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var5, var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_20_6Npc a(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
public V1_20_6Npc createNpc(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
||||||
V1_20_6Npc var5 = this.a(var1, var2, var3);
|
V1_20_6Npc var5 = this.a(var1, var2, var3);
|
||||||
ArrayList var6 = new ArrayList();
|
ArrayList var6 = new ArrayList();
|
||||||
var6.add(new Pair(EnumItemSlot.a, CraftItemStack.asNMSCopy(var4.a())));
|
var6.add(new Pair(EnumItemSlot.a, CraftItemStack.asNMSCopy(var4.getMainHandItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.b, CraftItemStack.asNMSCopy(var4.b())));
|
var6.add(new Pair(EnumItemSlot.b, CraftItemStack.asNMSCopy(var4.getOffHandItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.f, CraftItemStack.asNMSCopy(var4.c())));
|
var6.add(new Pair(EnumItemSlot.f, CraftItemStack.asNMSCopy(var4.getHelmetItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.e, CraftItemStack.asNMSCopy(var4.d())));
|
var6.add(new Pair(EnumItemSlot.e, CraftItemStack.asNMSCopy(var4.getChestplateItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.d, CraftItemStack.asNMSCopy(var4.e())));
|
var6.add(new Pair(EnumItemSlot.d, CraftItemStack.asNMSCopy(var4.getLeggingsItem())));
|
||||||
var6.add(new Pair(EnumItemSlot.c, CraftItemStack.asNMSCopy(var4.f())));
|
var6.add(new Pair(EnumItemSlot.c, CraftItemStack.asNMSCopy(var4.getBootsItem())));
|
||||||
var5.a(var6);
|
var5.a(var6);
|
||||||
return var5;
|
return var5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
||||||
<artifactId>platforms-latest-v1_21_R7</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
<artifactId>platforms-latest-v1_21_R7</artifactId><properties><maven.compiler.release>17</maven.compiler.release></properties>
|
||||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>platform-api-latest</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-v1_21_R7</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-v1_21_R7.jar</systemPath></dependency></dependencies>
|
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>latest-v1_21_R7</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-latest-v1_21_R7.jar</systemPath></dependency></dependencies>
|
||||||
</project>
|
</project>
|
||||||
+17
-17
@@ -54,7 +54,7 @@ import org.bukkit.entity.Item;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scoreboard.Score;
|
import org.bukkit.scoreboard.Score;
|
||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
import org.bukkit.scoreboard.Team.OptionStatus;
|
import ro.fr33styler.arcade.platform.api.scoreboard.TeamVisibility;
|
||||||
import ro.fr33styler.arcade.api.engine.command.Command;
|
import ro.fr33styler.arcade.api.engine.command.Command;
|
||||||
|
|
||||||
public class V1_21_11Platform implements ServerPlatform {
|
public class V1_21_11Platform implements ServerPlatform {
|
||||||
@@ -65,32 +65,32 @@ public class V1_21_11Platform implements ServerPlatform {
|
|||||||
this.a = new V1_21_11NpcFactory(var1);
|
this.a = new V1_21_11NpcFactory(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_21_11NpcFactory a() {
|
public V1_21_11NpcFactory getNpcFactory() {
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public V1_21_11PacketInterceptor b() {
|
public V1_21_11PacketInterceptor getPacketInterceptor() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1) {
|
public void sendHealthUpdate(Player var1) {
|
||||||
var1.sendHealthUpdate();
|
var1.sendHealthUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Item var2) {
|
public void sendCollectItemAnimation(Player var1, Item var2) {
|
||||||
((CraftPlayer)var1).getHandle().g.b(new PacketPlayOutCollect(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
((CraftPlayer)var1).getHandle().g.b(new PacketPlayOutCollect(var2.getEntityId(), var1.getEntityId(), var2.getItemStack().getAmount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Command var1) {
|
public void registerCommand(Command var1) {
|
||||||
this.a(var1, var1.getCommand());
|
this.a(var1, var1.getCommand());
|
||||||
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
var1.getAliases().forEach(var2 -> this.a(var1, var2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(Command var1) {
|
public void unregisterCommand(Command var1) {
|
||||||
RootCommandNode var2 = this.e().a().getRoot();
|
RootCommandNode var2 = this.e().a().getRoot();
|
||||||
var2.removeCommand(var1.getCommand());
|
var2.removeCommand(var1.getCommand());
|
||||||
var1.getAliases().forEach(var2::removeCommand);
|
var1.getAliases().forEach(var2::removeCommand);
|
||||||
BukkitCommands.b(var1);
|
BukkitCommands.unregisterCommand(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CommandDispatcher e() {
|
private CommandDispatcher e() {
|
||||||
@@ -128,37 +128,37 @@ public class V1_21_11Platform implements ServerPlatform {
|
|||||||
return 1;
|
return 1;
|
||||||
});
|
});
|
||||||
LiteralCommandNode var4 = var3.build();
|
LiteralCommandNode var4 = var3.build();
|
||||||
if (!ServerVersion.d) {
|
if (!ServerVersion.IS_PAPER) {
|
||||||
BukkitCommands.a(new VanillaCommandWrapper(this.e(), var4));
|
BukkitCommands.registerBukkitCommand(new VanillaCommandWrapper(this.e(), var4));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.e().a().getRoot().addChild(var4);
|
this.e().a().getRoot().addChild(var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double b(Player var1) {
|
public double getWaypointReceiveRange(Player var1) {
|
||||||
AttributeInstance var2 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
AttributeInstance var2 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
||||||
return var2 == null ? 0.0 : var2.getBaseValue();
|
return var2 == null ? 0.0 : var2.getBaseValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, double var2) {
|
public void setWaypointReceiveRange(Player var1, double var2) {
|
||||||
AttributeInstance var4 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
AttributeInstance var4 = var1.getAttribute(Attribute.WAYPOINT_RECEIVE_RANGE);
|
||||||
if (var4 != null) {
|
if (var4 != null) {
|
||||||
var4.setBaseValue(var2);
|
var4.setBaseValue(var2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Block var1, Material var2) {
|
public void setBlock(Block var1, Material var2) {
|
||||||
CraftBlock var3 = (CraftBlock)var1;
|
CraftBlock var3 = (CraftBlock)var1;
|
||||||
IBlockData var4 = CraftMagicNumbers.getBlock(var2).m();
|
IBlockData var4 = CraftMagicNumbers.getBlock(var2).m();
|
||||||
((CraftChunk)var1.getChunk()).getHandle(ChunkStatus.n).a(var3.getPosition(), var4, 530);
|
((CraftChunk)var1.getChunk()).getHandle(ChunkStatus.n).a(var3.getPosition(), var4, 530);
|
||||||
var3.getCraftWorld().getHandle().a(var3.getPosition(), var3.getNMS(), var4, 0);
|
var3.getCraftWorld().getHandle().a(var3.getPosition(), var3.getNMS(), var4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HologramEntity a(World var1, double var2, double var4, double var6) {
|
public HologramEntity createHologram(World var1, double var2, double var4, double var6) {
|
||||||
return new V1_21_11HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
return new V1_21_11HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(Block var1, double var2, double var4, double var6) {
|
public boolean isInsideBlockHitbox(Block var1, double var2, double var4, double var6) {
|
||||||
CraftBlock var8 = (CraftBlock)var1;
|
CraftBlock var8 = (CraftBlock)var1;
|
||||||
VoxelShape var9 = var8.getNMS().f(var8.getCraftWorld().getHandle(), var8.getPosition());
|
VoxelShape var9 = var8.getNMS().f(var8.getCraftWorld().getHandle(), var8.getPosition());
|
||||||
if (var9.c()) {
|
if (var9.c()) {
|
||||||
@@ -177,7 +177,7 @@ public class V1_21_11Platform implements ServerPlatform {
|
|||||||
return var16.booleanValue();
|
return var16.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, boolean var2, Score var3, int var4) {
|
public void sendScorePacket(Player var1, boolean var2, Score var3, int var4) {
|
||||||
if (var2) {
|
if (var2) {
|
||||||
((CraftPlayer)var1).getHandle().g.b(new ClientboundResetScorePacket(var3.getEntry(), var3.getObjective().getName()));
|
((CraftPlayer)var1).getHandle().g.b(new ClientboundResetScorePacket(var3.getEntry(), var3.getObjective().getName()));
|
||||||
} else {
|
} else {
|
||||||
@@ -188,7 +188,7 @@ public class V1_21_11Platform implements ServerPlatform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Player var1, Team var2, String var3, String var4, OptionStatus var5) {
|
public void sendTeamPacket(Player var1, Team var2, String var3, String var4, TeamVisibility var5) {
|
||||||
if (var1.getScoreboard() == var2.getScoreboard()) {
|
if (var1.getScoreboard() == var2.getScoreboard()) {
|
||||||
CraftPlayer var6 = (CraftPlayer)var1;
|
CraftPlayer var6 = (CraftPlayer)var1;
|
||||||
ScoreboardTeam var7 = var6.getScoreboard().getHandle().b(var2.getName());
|
ScoreboardTeam var7 = var6.getScoreboard().getHandle().b(var2.getName());
|
||||||
|
|||||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
public class V1_21_11PlatformFactory implements VersionFactory<ServerPlatform> {
|
public class V1_21_11PlatformFactory implements VersionFactory<ServerPlatform> {
|
||||||
public String a() {
|
public String getVersionLabel() {
|
||||||
return "1.21.11";
|
return "1.21.11";
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(String var1) {
|
public boolean supports(String var1) {
|
||||||
return var1.equals("1.21.11");
|
return var1.equals("1.21.11");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerPlatform a(Server var1) {
|
public ServerPlatform create(Server var1) {
|
||||||
return new V1_21_11Platform(var1);
|
return new V1_21_11Platform(var1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -12,7 +12,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class BombLobbersV1_21_11TntFactory implements BombLobbersTntFactory {
|
public class BombLobbersV1_21_11TntFactory implements BombLobbersTntFactory {
|
||||||
public TNTPrimed a(Player var1, Color var2, Vector var3) {
|
public TNTPrimed spawnTnt(Player var1, Color var2, Vector var3) {
|
||||||
EntityPlayer var4 = ((CraftPlayer)var1).getHandle();
|
EntityPlayer var4 = ((CraftPlayer)var1).getHandle();
|
||||||
BombLobbersV1_21_11TntEntity var5 = new BombLobbersV1_21_11TntEntity(var4, new ParticleParamRedstone(var2.asRGB(), 1.0F), var3);
|
BombLobbersV1_21_11TntEntity var5 = new BombLobbersV1_21_11TntEntity(var4, new ParticleParamRedstone(var2.asRGB(), 1.0F), var3);
|
||||||
var4.A().addFreshEntity(var5, SpawnReason.CUSTOM);
|
var4.A().addFreshEntity(var5, SpawnReason.CUSTOM);
|
||||||
|
|||||||
Loaded 100 of 1353 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user