Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

+ LabyModPlayerSwitchServerEvent

オープン
#7 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
api

調査の方向性

この issue ではリポジトリのファイルやテストが指定されていないため、まず Server API のイベント処理と、説明されている BungeeCord ServerSwitchEvent の動作を追跡します。LabyModPlayerSwitchServerEvent から、より新しいプロトコルバージョン向けにプレイヤーのサブサーバーを取得でき、示されているイベントハンドラーのユースケースをサポートできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement good first issue help wanted
General Troubleshooting
  • I am using the latest version of the LabyMod 4 Server API.
  • I have checked for similar issues on the Issue-tracker.
  • I have checked for Pull Requests that might already address this issue.
Feature Request
  • LabyModPlayerSwitchServerEvent

An event with which you can query a player's sub-server. With the ServerSwitchEvent from Bungeecord this works with 1.8 to 1.12 but everything above that is not recognized by the ServerSwitchEvent, something like Subtitles or TabListBanner etc

Example Use-Case
@EventHandler(priority = 0)
  public static void onServerjoin2(LabyModPlayerSwitchServerEvent event) {
	  final ProxiedPlayer player = event.getPlayer();
	  LabyModPlayer labyModPlayer = LabyModProtocolService.get().getPlayer(player.getUniqueId());
	  LabyModProtocol labyModProtocol = LabyModProtocolService.get().labyModProtocol();
	  List<String> addonsToDisable = new ArrayList<>();
	  PermissionGroup permissionGroup = CloudAPI.getInstance().getOnlinePlayer(player.getUniqueId()).getPermissionEntity().getHighestPermissionGroup(CloudAPI.getInstance().getPermissionPool());
	  labyModPlayer.sendTabListBanner(null);
	  labyModPlayer.sendTabListBanner("https://yourpng.com");
	  labyModProtocol.sendPacket(labyModPlayer.getUniqueId(), new PlayingGameModePacket(null));
	  if (player.getServer().getInfo().getName() == null) {
		  return;
	  }
	  else if (player.getServer().getInfo().getName().contains("CityBuild")) {
		  labyModProtocol.sendPacket(labyModPlayer.getUniqueId(), new PlayingGameModePacket("§3§lCB"));
	  }
	  else if (player.getServer().getInfo().getName().contains("Lobby")) { 
		  labyModProtocol.sendPacket(labyModPlayer.getUniqueId(), new PlayingGameModePacket("§bLobby"));
		  labyModPlayer.revertDisabledAddons();
	  }
主要言語
Java
スター
12
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

LabyMod/labymod4-server-api のほかの issue

LabyMod/labymod4-server-api の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。