Skip to content

Commit

Permalink
his name is shithead, a single cell ornagnism.
Browse files Browse the repository at this point in the history
  • Loading branch information
not-coded committed Jan 4, 2024
1 parent 041463f commit 1645869
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
9 changes: 0 additions & 9 deletions src/main/java/com/nexia/ffa/uhc/utilities/FfaAreas.java
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
package com.nexia.ffa.uhc.utilities;

import com.combatreforged.factory.api.util.Identifier;
import com.nexia.core.utilities.chat.ChatFormat;
import com.nexia.core.utilities.player.PlayerUtil;
import com.nexia.core.utilities.pos.BlockVec3;
import com.nexia.core.utilities.pos.EntityPos;
import com.nexia.core.utilities.pos.ProtectionBlock;
import com.nexia.core.utilities.pos.ProtectionMap;
import com.nexia.core.utilities.time.ServerTime;
import com.nexia.ffa.Main;
import net.kyori.adventure.text.Component;
import net.minecraft.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.notcoded.codelib.util.world.structure.Rotation;
import net.notcoded.codelib.util.world.structure.StructureMap;

import static com.nexia.minigames.games.bedwars.areas.BwAreas.protectionMap;

public class FfaAreas {
public static ServerLevel ffaWorld = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,6 @@ public static void startGame() {

ArrayList<EntityPos> positions = new ArrayList<>(SkywarsGame.map.positions);

ServerTime.factoryServer.runCommand(String.format("execute in skywars:%s run worldborder set 30 60", SkywarsGame.id), 4, false);

for (AccuratePlayer player : SkywarsGame.alive) {
EntityPos pos = positions.get(RandomUtil.randomInt(positions.size()));
ServerPlayer serverPlayer = player.get();
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/com/nexia/minigames/games/skywars/SkywarsMap.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.nexia.minigames.games.skywars;

import com.combatreforged.factory.api.util.Identifier;
import com.nexia.core.Main;
import com.nexia.core.utilities.pos.BlockVec3;
import com.nexia.core.utilities.pos.EntityPos;
Expand Down Expand Up @@ -68,8 +67,8 @@ public class SkywarsMap {
), new StructureMap(new ResourceLocation("skywars", "skyhenge"), Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-77, -7, -77), true));

public static SkywarsMap BELOW = new SkywarsMap("below", 8, new ArrayList<>(Arrays.asList(
new EntityPos(-29.5, 81.0, 69.5),
new EntityPos(29.5,81.0,69.5),
new EntityPos(-28.5, 81.0, 69.5),
new EntityPos(28.5,81.0,69.5),
new EntityPos(69.5,81.0,28.5),
new EntityPos(69.5,81.0,-28.5),
new EntityPos(29.5,81.0,-68.5),
Expand All @@ -78,6 +77,13 @@ public class SkywarsMap {
new EntityPos(-68.5,81.0,29.5))
), new StructureMap(new ResourceLocation("skywars", "below"), Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-76, -9, -76), true));

public static SkywarsMap NULL = new SkywarsMap("null", 4, new ArrayList<>(Arrays.asList(
new EntityPos(-24.5, 77.0, 25.5),
new EntityPos(25.5, 77.0, -24.5),
new EntityPos(-24.5, 77.0, 25.5),
new EntityPos(-24.5, 77.0, -24.5))
), new StructureMap(new ResourceLocation("skywars", "null"), Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-33, -42, -33), true));


public static SkywarsMap identifyMap(String name) {
for(SkywarsMap map : SkywarsMap.skywarsMaps) {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/nexia/world/WorldUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public static void deleteTempWorlds() {
List<String> duelsDelete = new ArrayList<>();

for (ServerLevel level : ServerTime.minecraftServer.getAllLevels()) {
String[] split = level.dimension().toString().replaceAll("]", "").split(":");
if (split[1].toLowerCase().contains("duels")) {
duelsDelete.add(split[2]);
Identifier split = WorldUtil.getWorldName(WorldUtil.getWorldName(level));
if (split.getNamespace().toLowerCase().contains("duels")) {
duelsDelete.add(split.getNamespace());
}
if (split[1].toLowerCase().contains("skywars")) {
skywarsDelete.add(split[2]);
if (split.getNamespace().toLowerCase().contains("skywars")) {
skywarsDelete.add(split.getNamespace());
}
}

Expand Down

0 comments on commit 1645869

Please sign in to comment.