@@ -77,27 +77,25 @@ private void giveRewards(int streaks, Player player) {
7777 .forEach (command -> Bukkit .dispatchCommand (Bukkit .getConsoleSender (), command ));
7878 }
7979
80- public void add (Player player ) {
80+ public void add (Player killer , Player deader ) {
8181 // カウントを追加
82- int streaks = get (player ).incrementAndGet ();
82+ int streaks = get (killer ).incrementAndGet ();
8383
8484 // 報酬を付与
8585 if (LeonGunWar .doubleRewardEnable ){
86- giveRewards (streaks , player );
86+ giveRewards (streaks , killer );
8787 }
88- giveRewards ( streaks , player );
88+
8989
9090 if (LeonGunWar .getPlugin ().getManager ().getMatchMode ()
9191 == MatchMode .LEADER_DEATH_MATCH_POINT ) {
92- if (LeonGunWar .getPlugin ().getManager ().getLDMLeaderMap ().containsValue (player )) {
93- if (LeonGunWar .doubleRewardEnable ){
94- player .sendMessage (
95- Chat .f ("{0}&7あなたはリーダーなので &e2倍 &7の報酬を受け取りました!(報酬ブーストは適用されていません)" , LeonGunWar .GAME_PREFIX ));
96- }else {
97- player .sendMessage (
98- Chat .f ("{0}&7あなたはリーダーなので &e2倍 &7の報酬を受け取りました!" , LeonGunWar .GAME_PREFIX ));
99- giveRewards (streaks , player );
100- }
92+ if (LeonGunWar .getPlugin ().getManager ().getLDMLeaderMap ().containsValue (killer )) {
93+ killer .sendMessage (
94+ Chat .f ("{0}&7あなたはリーダーなので &e3倍 &7の報酬を受け取りました!" , LeonGunWar .GAME_PREFIX ));
95+ giveRewards (streaks , killer );
96+ giveRewards (streaks , killer );
97+ giveRewards (streaks , killer );
98+
10199 }
102100 }
103101
@@ -107,7 +105,7 @@ public void add(Player player) {
107105 .map (Map .Entry ::getValue )
108106 .map (Map .Entry ::getKey )
109107 .flatMap (List ::stream )
110- .map (message -> Chat .f (message , LeonGunWar .GAME_PREFIX , player .getPlayerListName ()))
108+ .map (message -> Chat .f (message , LeonGunWar .GAME_PREFIX , killer .getPlayerListName ()))
111109 .forEach (BroadcastUtils ::broadcast );
112110 LeonGunWar .getPlugin ().getKillStreaksConfig ().getTimeConditionedStreaks ().entrySet ()
113111 .stream ()
@@ -118,14 +116,14 @@ public void add(Player player) {
118116 .map (Map .Entry ::getValue )
119117 .map (Map .Entry ::getKey )
120118 .flatMap (List ::stream )
121- .map (message -> Chat .f (message , LeonGunWar .GAME_PREFIX , player .getPlayerListName ()))
119+ .map (message -> Chat .f (message , LeonGunWar .GAME_PREFIX , killer .getPlayerListName ()))
122120 .forEach (BroadcastUtils ::broadcast );
123121 LeonGunWar .getPlugin ().getKillStreaksConfig ().getLevels ().entrySet ().stream ()
124122 .filter (entry -> streaks % entry .getKey () == 0 )
125123 .map (Map .Entry ::getValue )
126124 .map (Map .Entry ::getKey )
127125 .flatMap (List ::stream )
128- .map (message -> Chat .f (message , LeonGunWar .GAME_PREFIX , player .getPlayerListName ()))
126+ .map (message -> Chat .f (message , LeonGunWar .GAME_PREFIX , killer .getPlayerListName ()))
129127 .forEach (BroadcastUtils ::broadcast );
130128 LeonGunWar .getPlugin ().getKillStreaksConfig ().getTimeConditionedLevels ().entrySet ().stream ()
131129 .filter (entry -> entry .getKey ().isDuring ())
@@ -135,7 +133,7 @@ public void add(Player player) {
135133 .map (Map .Entry ::getValue )
136134 .map (Map .Entry ::getKey )
137135 .flatMap (List ::stream )
138- .map (message -> Chat .f (message , LeonGunWar .GAME_PREFIX , player .getPlayerListName ()))
136+ .map (message -> Chat .f (message , LeonGunWar .GAME_PREFIX , killer .getPlayerListName ()))
139137 .forEach (BroadcastUtils ::broadcast );
140138 }
141139}
0 commit comments