removed deprecated use of old DimensionType constructor and updated map file paths accordingly
This commit is contained in:
1 parent
7734b225eb
commit
26eff149d4
78 files changed
+17
-8
No files matched your search
Generated
+7
@@ -3,4 +3,11 @@
|
|||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<bytecodeTargetLevel target="21" />
|
<bytecodeTargetLevel target="21" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="JavacSettings">
|
||||||
|
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||||
|
<module name="Minigames" options="-Xlint:deprecation" />
|
||||||
|
<module name="Minigames.test" options="-Xlint:deprecation" />
|
||||||
|
<module name="eu.mhsl.minenet.Minigames.main" options="-Xlint:deprecation" />
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
</project>
|
</project>
|
||||||
+2
-1
@@ -26,6 +26,7 @@ import net.minestom.server.item.ItemStack;
|
|||||||
import net.minestom.server.item.Material;
|
import net.minestom.server.item.Material;
|
||||||
import net.minestom.server.timer.ExecutionType;
|
import net.minestom.server.timer.ExecutionType;
|
||||||
import net.minestom.server.timer.TaskSchedule;
|
import net.minestom.server.timer.TaskSchedule;
|
||||||
|
import net.minestom.server.world.DimensionType;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -41,7 +42,7 @@ public class Bedwars extends StatelessGame {
|
|||||||
|
|
||||||
public Bedwars() throws IOException {
|
public Bedwars() throws IOException {
|
||||||
super(Dimension.OVERWORLD.key, "Bedwars", new LastWinsScore());
|
super(Dimension.OVERWORLD.key, "Bedwars", new LastWinsScore());
|
||||||
this.setChunkLoader(new AnvilLoader(Resource.GAME_MAP.getPath().resolve("bedwars/test")));
|
this.setChunkLoader(new AnvilLoader(Resource.GAME_MAP.getPath().resolve("bedwars/test"), DimensionType.OVERWORLD.key()));
|
||||||
|
|
||||||
Configuration config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(Resource.GAME_MAP.getPath().resolve("bedwars/test/config.yml").toFile());
|
Configuration config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(Resource.GAME_MAP.getPath().resolve("bedwars/test/config.yml").toFile());
|
||||||
List<String> teamNames = config.getStringList("setup.teams");
|
List<String> teamNames = config.getStringList("setup.teams");
|
||||||
|
|||||||
+2
-1
@@ -15,6 +15,7 @@ import net.minestom.server.entity.Player;
|
|||||||
import net.minestom.server.event.player.PlayerMoveEvent;
|
import net.minestom.server.event.player.PlayerMoveEvent;
|
||||||
import net.minestom.server.instance.anvil.AnvilLoader;
|
import net.minestom.server.instance.anvil.AnvilLoader;
|
||||||
import net.minestom.server.instance.block.Block;
|
import net.minestom.server.instance.block.Block;
|
||||||
|
import net.minestom.server.world.DimensionType;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
@@ -23,7 +24,7 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
public class BoatRace extends StatelessGame {
|
public class BoatRace extends StatelessGame {
|
||||||
public BoatRace() {
|
public BoatRace() {
|
||||||
super(Dimension.OVERWORLD.key, "boatRace", new FirstWinsScore());
|
super(Dimension.OVERWORLD.key, "boatRace", new FirstWinsScore());
|
||||||
this.setChunkLoader(new AnvilLoader(Resource.GAME_MAP.getPath().resolve("boatRace/woodlandMansion")));
|
this.setChunkLoader(new AnvilLoader(Resource.GAME_MAP.getPath().resolve("boatRace/woodlandMansion"), DimensionType.OVERWORLD.key()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ import net.minestom.server.event.player.PlayerBlockBreakEvent;
|
|||||||
import net.minestom.server.event.player.PlayerBlockInteractEvent;
|
import net.minestom.server.event.player.PlayerBlockInteractEvent;
|
||||||
import net.minestom.server.event.player.PlayerBlockPlaceEvent;
|
import net.minestom.server.event.player.PlayerBlockPlaceEvent;
|
||||||
import net.minestom.server.instance.anvil.AnvilLoader;
|
import net.minestom.server.instance.anvil.AnvilLoader;
|
||||||
|
import net.minestom.server.world.DimensionType;
|
||||||
import java.nio.file.Path;
|
|
||||||
|
|
||||||
public class Hub extends MineNetInstance implements Spawnable {
|
public class Hub extends MineNetInstance implements Spawnable {
|
||||||
public static final Hub INSTANCE = new Hub();
|
public static final Hub INSTANCE = new Hub();
|
||||||
@@ -21,7 +20,7 @@ public class Hub extends MineNetInstance implements Spawnable {
|
|||||||
static {
|
static {
|
||||||
MinecraftServer.getInstanceManager().registerInstance(INSTANCE);
|
MinecraftServer.getInstanceManager().registerInstance(INSTANCE);
|
||||||
|
|
||||||
INSTANCE.setChunkLoader(new AnvilLoader(Resource.HUB_MAP.getPath()));
|
INSTANCE.setChunkLoader(new AnvilLoader(Resource.HUB_MAP.getPath(), DimensionType.OVERWORLD.key()));
|
||||||
|
|
||||||
INSTANCE.eventNode()
|
INSTANCE.eventNode()
|
||||||
.addListener(PlayerBlockBreakEvent.class, CommonEventHandles::cancel)
|
.addListener(PlayerBlockBreakEvent.class, CommonEventHandles::cancel)
|
||||||
@@ -33,7 +32,6 @@ public class Hub extends MineNetInstance implements Spawnable {
|
|||||||
|
|
||||||
private Hub() {
|
private Hub() {
|
||||||
super(Dimension.THE_END.key);
|
super(Dimension.THE_END.key);
|
||||||
this.setChunkLoader(new AnvilLoader(Path.of("maps/hub")));
|
|
||||||
|
|
||||||
this.setTime(18000);
|
this.setTime(18000);
|
||||||
this.defaultClock().pause();
|
this.defaultClock().pause();
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import net.minestom.server.entity.Player;
|
|||||||
import net.minestom.server.event.player.PlayerBlockBreakEvent;
|
import net.minestom.server.event.player.PlayerBlockBreakEvent;
|
||||||
import net.minestom.server.event.player.PlayerDisconnectEvent;
|
import net.minestom.server.event.player.PlayerDisconnectEvent;
|
||||||
import net.minestom.server.instance.anvil.AnvilLoader;
|
import net.minestom.server.instance.anvil.AnvilLoader;
|
||||||
|
import net.minestom.server.world.DimensionType;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -102,7 +103,7 @@ public class Room extends MineNetInstance implements Spawnable {
|
|||||||
|
|
||||||
private void construct() {
|
private void construct() {
|
||||||
MinecraftServer.getInstanceManager().registerInstance(this);
|
MinecraftServer.getInstanceManager().registerInstance(this);
|
||||||
this.setChunkLoader(new AnvilLoader(Resource.LOBBY_MAP.getPath()));
|
this.setChunkLoader(new AnvilLoader(Resource.LOBBY_MAP.getPath(), DimensionType.OVERWORLD.key()));
|
||||||
|
|
||||||
this.gameSelector = new GameSelector();
|
this.gameSelector = new GameSelector();
|
||||||
this.gameSelector.setInstance(this, new Pos(0.5, 50, 19.5));
|
this.gameSelector.setInstance(this, new Pos(0.5, 50, 19.5));
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import net.minestom.server.entity.GameMode;
|
|||||||
import net.minestom.server.entity.Player;
|
import net.minestom.server.entity.Player;
|
||||||
import net.minestom.server.event.player.PlayerMoveEvent;
|
import net.minestom.server.event.player.PlayerMoveEvent;
|
||||||
import net.minestom.server.instance.anvil.AnvilLoader;
|
import net.minestom.server.instance.anvil.AnvilLoader;
|
||||||
|
import net.minestom.server.world.DimensionType;
|
||||||
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -29,7 +30,7 @@ public class TournamentDisplay extends MineNetInstance implements Spawnable {
|
|||||||
|
|
||||||
public TournamentDisplay(Tournament tournament) {
|
public TournamentDisplay(Tournament tournament) {
|
||||||
super(Dimension.OVERWORLD.key);
|
super(Dimension.OVERWORLD.key);
|
||||||
this.setChunkLoader(new AnvilLoader(Resource.RESULT_DISPLAY.getPath()));
|
this.setChunkLoader(new AnvilLoader(Resource.RESULT_DISPLAY.getPath(), DimensionType.OVERWORLD.key()));
|
||||||
this.places = tournament.getPlaces();
|
this.places = tournament.getPlaces();
|
||||||
this.tournament = tournament;
|
this.tournament = tournament;
|
||||||
|
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user