95 lines
1.9 KiB
Java
95 lines
1.9 KiB
Java
package nautilus.game.arcade;
|
|
|
|
import mineplex.core.common.MinecraftVersion;
|
|
import mineplex.core.common.Pair;
|
|
import nautilus.game.arcade.game.Game;
|
|
|
|
/**
|
|
* This Object represents a Gamemode used in the GameType constructor
|
|
*
|
|
* @author xXVevzZXx
|
|
*/
|
|
public class GameMode
|
|
{
|
|
|
|
private Class<? extends Game> _gameMode;
|
|
private GameType _gameType;
|
|
private String _name;
|
|
|
|
private Pair<MinecraftVersion, String>[] _resourcePackUrls;
|
|
private boolean _enforceResourcePack;
|
|
|
|
/**
|
|
*
|
|
* @param gameMode Game class that in most cases extends the host game class
|
|
* @param name Gamemode name
|
|
*/
|
|
public GameMode(Class<? extends Game> gameMode, GameType gameType, String name)
|
|
{
|
|
this(gameMode, gameType, name, null, false);
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param gameMode Game class that in most cases extends the host game class
|
|
* @param gameType original GameType of modded game
|
|
* @param name Gamemode name
|
|
* @param resourcePackUrls URLs to 1.8/1.9 resource pack
|
|
* @param enforceResourcePack enforece resource pack on players
|
|
*/
|
|
public GameMode(Class<? extends Game> gameMode, GameType gameType, String name, Pair<MinecraftVersion, String>[] resourcePackUrls, boolean enforceResourcePack)
|
|
{
|
|
_gameMode = gameMode;
|
|
_gameType = gameType;
|
|
_name = name;
|
|
_resourcePackUrls = resourcePackUrls;
|
|
_enforceResourcePack = enforceResourcePack;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @return Game class
|
|
*/
|
|
public Class<? extends Game> getGameClass()
|
|
{
|
|
return _gameMode;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @return Gamemode name
|
|
*/
|
|
public String getName()
|
|
{
|
|
return _name;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @return Gamemode gametype
|
|
*/
|
|
public GameType getType()
|
|
{
|
|
return _gameType;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @return Gamemode resource pack URLs
|
|
*/
|
|
public Pair<MinecraftVersion, String>[] getResPackURLs()
|
|
{
|
|
return _resourcePackUrls;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @return Gamemode enforcing of resource packs
|
|
*/
|
|
public boolean enforceResourcePack()
|
|
{
|
|
return _enforceResourcePack;
|
|
}
|
|
|
|
}
|