Fix MFD linking

This commit is contained in:
Daniel Saukel 2018-08-15 23:34:51 +02:00
parent 53f8ec8584
commit 6db3b1abbf
6 changed files with 13 additions and 6 deletions

View File

@ -4,7 +4,7 @@
[![Wiki](http://feuerstern.bplaced.net/ressourcen/buttons/Wiki.png)](../../wiki/)
[![Issues](http://feuerstern.bplaced.net/ressourcen/buttons/Issues.png)](../../issues/)
[![JavaDocs](http://feuerstern.bplaced.net/ressourcen/buttons/JavaDocs.png)](http://erethon.de/javadocs/dungeonsxl/)
[![MCStats](http://feuerstern.bplaced.net/ressourcen/buttons/MCStats.png)](http://mcstats.org/plugin/DungeonsXL/)
[![MCStats](http://feuerstern.bplaced.net/ressourcen/buttons/MCStats.png)](http://bstats.org/plugin/bukkit/DungeonsXL/)
![Doge](https://i.imgflip.com/vtpyi.jpg)

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.erethon</groupId>
<artifactId>dungeonsxl</artifactId>
<version>0.16.2-SNAPSHOT</version>
<version>0.16.2</version>
<packaging>jar</packaging>
<name>DungeonsXL</name>
<url>https://dre2n.github.io</url>

View File

@ -74,7 +74,6 @@ public class DungeonCache {
if (artificial) {
DResourceWorld resource = plugin.getDWorlds().getResourceByName(name);
System.out.println("No resource of name " + name + " found");
if (resource != null) {
return new Dungeon(resource);
}

View File

@ -255,12 +255,15 @@ public class Game {
* @return the unplayed floors
*/
public List<DResourceWorld> getUnplayedFloors() {
List<DResourceWorld> unplayedFloors = new ArrayList<>();
List<DResourceWorld> unplayedFloors = null;
for (DGroup dGroup : dGroups) {
if (dGroup.getUnplayedFloors().size() < unplayedFloors.size()) {
if (unplayedFloors == null || dGroup.getUnplayedFloors().size() < unplayedFloors.size()) {
unplayedFloors = dGroup.getUnplayedFloors();
}
}
if (unplayedFloors == null) {
unplayedFloors = new ArrayList<>();
}
return unplayedFloors;
}

View File

@ -634,7 +634,7 @@ public class DGroup {
*/
public void finishFloor(DResourceWorld specifiedFloor) {
DungeonConfig dConfig = dungeon.getConfig();
int floorsLeft = getUnplayedFloors().size();
int floorsLeft = getDungeon().getFloors().size() + 1 - floorCount;//floorCount contains start floor, but dungeon floor list doesn't
DResourceWorld newFloor = null;
DGameWorld.Type type = null;
if (gameWorld.getType() == DGameWorld.Type.END_FLOOR) {

View File

@ -294,4 +294,9 @@ public class DResourceWorld {
return editWorld;
}
@Override
public String toString() {
return "DResourceWorld{name=" + getName() + "}";
}
}