Remove join list, adjust intellij import style to be more like eclipse
This commit is contained in:
parent
eac0f9fd6a
commit
18e1265afd
@ -6,6 +6,20 @@
|
|||||||
<option name="FIELD_NAME_PREFIX" value="_" />
|
<option name="FIELD_NAME_PREFIX" value="_" />
|
||||||
<option name="STATIC_FIELD_NAME_PREFIX" value="_" />
|
<option name="STATIC_FIELD_NAME_PREFIX" value="_" />
|
||||||
<option name="USE_SINGLE_CLASS_IMPORTS" value="false" />
|
<option name="USE_SINGLE_CLASS_IMPORTS" value="false" />
|
||||||
|
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="20" />
|
||||||
|
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="10" />
|
||||||
|
<option name="IMPORT_LAYOUT_TABLE">
|
||||||
|
<value>
|
||||||
|
<package name="javax" withSubpackages="true" static="false" />
|
||||||
|
<package name="java" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="org.bukkit" withSubpackages="true" static="false" />
|
||||||
|
<package name="net.minecraft" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="" withSubpackages="true" static="false" />
|
||||||
|
<package name="" withSubpackages="true" static="true" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
<XML>
|
<XML>
|
||||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||||
</XML>
|
</XML>
|
||||||
|
@ -19,14 +19,12 @@ public class MapData
|
|||||||
public String MapName = "null";
|
public String MapName = "null";
|
||||||
public String MapCreator = "null";
|
public String MapCreator = "null";
|
||||||
|
|
||||||
public HashSet<String> WhiteList;
|
|
||||||
public HashSet<String> BuildList;
|
public HashSet<String> BuildList;
|
||||||
|
|
||||||
public MapData(String mapFolder)
|
public MapData(String mapFolder)
|
||||||
{
|
{
|
||||||
MapFolder = mapFolder;
|
MapFolder = mapFolder;
|
||||||
|
|
||||||
WhiteList = new HashSet<String>();
|
|
||||||
BuildList = new HashSet<String>();
|
BuildList = new HashSet<String>();
|
||||||
|
|
||||||
if ((new File(MapFolder + File.separator + "Map.dat")).exists())
|
if ((new File(MapFolder + File.separator + "Map.dat")).exists())
|
||||||
@ -68,11 +66,6 @@ public class MapData
|
|||||||
{
|
{
|
||||||
GameType = GameType.valueOf(tokens[1] == null ? "Null" : tokens[1]);
|
GameType = GameType.valueOf(tokens[1] == null ? "Null" : tokens[1]);
|
||||||
}
|
}
|
||||||
else if (tokens[0].equalsIgnoreCase("WHITE_LIST"))
|
|
||||||
{
|
|
||||||
for (String cur : tokens[1].split(","))
|
|
||||||
WhiteList.add(cur);
|
|
||||||
}
|
|
||||||
else if (tokens[0].equalsIgnoreCase("BUILD_LIST"))
|
else if (tokens[0].equalsIgnoreCase("BUILD_LIST"))
|
||||||
{
|
{
|
||||||
for (String cur : tokens[1].split(","))
|
for (String cur : tokens[1].split(","))
|
||||||
@ -103,13 +96,6 @@ public class MapData
|
|||||||
out.write("\n");
|
out.write("\n");
|
||||||
out.write("GAME_TYPE:"+GameType);
|
out.write("GAME_TYPE:"+GameType);
|
||||||
|
|
||||||
String whiteList = "";
|
|
||||||
for (String cur : WhiteList)
|
|
||||||
whiteList += cur + ",";
|
|
||||||
|
|
||||||
out.write("\n");
|
|
||||||
out.write("WHITE_LIST:"+whiteList);
|
|
||||||
|
|
||||||
String buildList = "";
|
String buildList = "";
|
||||||
for (String cur : BuildList)
|
for (String cur : BuildList)
|
||||||
buildList += cur + ",";
|
buildList += cur + ",";
|
||||||
@ -132,7 +118,7 @@ public class MapData
|
|||||||
|
|
||||||
public boolean CanJoin(Player player)
|
public boolean CanJoin(Player player)
|
||||||
{
|
{
|
||||||
return BuildList.contains(player.getName()) || WhiteList.contains(player.getName()) || player.isOp();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean CanRename(Player player)
|
public boolean CanRename(Player player)
|
||||||
|
Loading…
Reference in New Issue
Block a user