Try fixing the map selection.
This commit is contained in:
parent
644d6c9914
commit
ec3bc7cc38
@ -34,6 +34,8 @@ public class ChooseMapButton implements IButton
|
|||||||
public void onClick(Player player, ClickType clickType)
|
public void onClick(Player player, ClickType clickType)
|
||||||
{
|
{
|
||||||
_arcadeManager.GetGameCreationManager().MapSource = _gameType.GetName();
|
_arcadeManager.GetGameCreationManager().MapSource = _gameType.GetName();
|
||||||
|
if(_gameType.getMapSource() != null)
|
||||||
|
_arcadeManager.GetGameCreationManager().MapSource = _gameType.getMapSource()[0].GetName();
|
||||||
_arcadeManager.GetGameCreationManager().MapPref = _map;
|
_arcadeManager.GetGameCreationManager().MapPref = _map;
|
||||||
_arcadeManager.GetGame().setGame(_gameType, player, true);
|
_arcadeManager.GetGame().setGame(_gameType, player, true);
|
||||||
player.closeInventory();
|
player.closeInventory();
|
||||||
|
@ -34,7 +34,13 @@ public class ChooseMapPage extends BasePage
|
|||||||
addBackToSetGamePage();
|
addBackToSetGamePage();
|
||||||
|
|
||||||
int slot = 9;
|
int slot = 9;
|
||||||
for (String cur : getPlugin().LoadFiles(_gameType.GetName())){
|
String loadMaps = _gameType.GetName();
|
||||||
|
if(_gameType.getMapSource() != null)
|
||||||
|
{
|
||||||
|
loadMaps = _gameType.getMapSource()[0].GetName();
|
||||||
|
}
|
||||||
|
for(String cur : getPlugin().LoadFiles(loadMaps))
|
||||||
|
{
|
||||||
ChooseMapButton btn = new ChooseMapButton(getPlugin(), getShop(), _gameType, cur);
|
ChooseMapButton btn = new ChooseMapButton(getPlugin(), getShop(), _gameType, cur);
|
||||||
addButton(slot, new ShopItem(Material.PAPER, cur.split("_")[1], new String[]{"§7Click to select map."}, 1, false), btn);
|
addButton(slot, new ShopItem(Material.PAPER, cur.split("_")[1], new String[]{"§7Click to select map."}, 1, false), btn);
|
||||||
slot++;
|
slot++;
|
||||||
|
Loading…
Reference in New Issue
Block a user