File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
src/main/java/plugily/projects/buildbattle/arena/states Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,11 @@ public void handleCall(PluginArena arena) {
77
77
break ;
78
78
case BUILD_TIME :
79
79
handleBuildTime (pluginArena );
80
+ handleOptionsMenu (pluginArena );
80
81
if (arena .getTimer () <= 0 ) {
81
82
for (Player player : pluginArena .getPlayersLeft ()) {
82
83
IUser user = getPlugin ().getUserManager ().getUser (player );
83
84
84
- if (user .isSpectator ()) continue ;
85
-
86
85
Plot playerPlot = pluginArena .getPlotFromPlayer (player );
87
86
if (!pluginArena .getQueue ().contains (playerPlot )) {
88
87
pluginArena .getQueue ().add (playerPlot );
@@ -198,6 +197,15 @@ private void handleBuildTime(BuildArena pluginArena) {
198
197
pluginArena .checkPlayerOutSidePlot ();
199
198
}
200
199
200
+ private void handleOptionsMenu (BuildArena pluginArena ) {
201
+ if (pluginArena .getTimer () % 10 != 0 ) {
202
+ return ;
203
+ }
204
+ for (Player player : pluginArena .getPlayersLeft ()) {
205
+ pluginArena .getPlugin ().getSpecialItemManager ().getSpecialItem ("OPTIONS_MENU" ).setItem (player );
206
+ }
207
+ }
208
+
201
209
private void handlePlotVoting (BuildArena pluginArena ) {
202
210
203
211
}
Original file line number Diff line number Diff line change 26
26
import org .bukkit .entity .HumanEntity ;
27
27
import org .bukkit .entity .Player ;
28
28
import plugily .projects .buildbattle .arena .BaseArena ;
29
+ import plugily .projects .buildbattle .arena .BuildArena ;
29
30
import plugily .projects .buildbattle .arena .GuessArena ;
30
31
import plugily .projects .buildbattle .arena .managers .plots .Plot ;
31
32
import plugily .projects .buildbattle .handlers .themes .BBTheme ;
@@ -102,6 +103,7 @@ public void handleCall(PluginArena arena) {
102
103
}
103
104
//}
104
105
handleBuildTime (pluginArena );
106
+ handleOptionsMenu (pluginArena );
105
107
break ;
106
108
case PLOT_VOTING :
107
109
if (pluginArena .getRound () + 1 > pluginArena .getPlotList ().size () * pluginArena .getArenaOption ("GTB_ROUNDS_PER_PLOT" )) {
@@ -189,6 +191,15 @@ private void forceSetTheme(GuessArena pluginArena) {
189
191
setChosenTheme (pluginArena , getThemeByDifficulty (pluginArena , difficulty ));
190
192
}
191
193
194
+ private void handleOptionsMenu (GuessArena pluginArena ) {
195
+ if (pluginArena .getTimer () % 10 != 0 ) {
196
+ return ;
197
+ }
198
+ for (Player player : pluginArena .getCurrentBuilders ()) {
199
+ pluginArena .getPlugin ().getSpecialItemManager ().getSpecialItem ("OPTIONS_MENU" ).setItem (player );
200
+ }
201
+ }
202
+
192
203
private void setChosenTheme (GuessArena pluginArena , BBTheme bbTheme ) {
193
204
setTheme (pluginArena , bbTheme );
194
205
pluginArena .getCurrentBuilders ().forEach (HumanEntity ::closeInventory );
You can’t perform that action at this time.
0 commit comments