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)
|
||||
{
|
||||
_arcadeManager.GetGameCreationManager().MapSource = _gameType.GetName();
|
||||
if(_gameType.getMapSource() != null)
|
||||
_arcadeManager.GetGameCreationManager().MapSource = _gameType.getMapSource()[0].GetName();
|
||||
_arcadeManager.GetGameCreationManager().MapPref = _map;
|
||||
_arcadeManager.GetGame().setGame(_gameType, player, true);
|
||||
player.closeInventory();
|
||||
|
|
|
@ -34,7 +34,13 @@ public class ChooseMapPage extends BasePage
|
|||
addBackToSetGamePage();
|
||||
|
||||
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);
|
||||
addButton(slot, new ShopItem(Material.PAPER, cur.split("_")[1], new String[]{"§7Click to select map."}, 1, false), btn);
|
||||
slot++;
|
||||
|
|
Loading…
Reference in New Issue