a347d46
Branches > main > a347d46 > files
Move world and Items
Commit: a347d468a827896d1dab75ab34a26e338a324c40
Parent: 545457c
7 changed files:
src/main/kotlin/net/bowmap/events/Death.kt view file
@@ -1,7 +1,7 @@ package net.bowmap.events import net.bowmap.paper.*-import net.bowmap.mc.items.BUG+import net.bowmap.server.items.BUG import net.kyori.adventure.text.Component import net.kyori.adventure.text.format.NamedTextColor.* import org.bukkit.Materialsrc/main/kotlin/net/bowmap/events/Tutorial.kt view file
@@ -1,6 +1,6 @@ package net.bowmap.events -import net.bowmap.mc.items.TUTORIAL_BOW+import net.bowmap.server.items.TUTORIAL_BOW import net.bowmap.Main import net.kyori.adventure.text.Componentsrc/main/kotlin/net/bowmap/events/ZoneGuard.kt view file
@@ -6,9 +6,8 @@ import org.bukkit.event.block.BlockBreakEvent import org.bukkit.event.EventHandler import org.bukkit.block.Block-+import org.bukkit.Bukkit import org.bukkit.Location-import net.bowmap.world.world data class Region(val from: Location, val to: Location) { init {@@ -18,7 +17,10 @@ } } -val spawn = Region(Location(world, 5.0, world.minHeight.toDouble(), -5.0), Location(world, -5.0, world.maxHeight - 1.0, 5.0))+// TODO hmm...+// Would prefer if I didn't have to just rely on this+val spawnWorld = Bukkit.getWorld("world")!!+val spawn = Region(Location(spawnWorld, 5.0, spawnWorld.minHeight.toDouble(), -5.0), Location(spawnWorld, -5.0, spawnWorld.maxHeight - 1.0, 5.0)) fun isInsideRegion(region: Region, location: Location): Boolean { if (location.world != region.from.world) return falsesrc/main/kotlin/net/bowmap/perms/Perms.kt view file
@@ -1,4 +1,3 @@- package net.bowmap.perms import java.util.UUIDsrc/main/kotlin/net/bowmap/server/Setup.kt view file
@@ -1,12 +1,14 @@ package net.bowmap.server import org.bukkit.GameRules-import net.bowmap.world.world+import org.bukkit.Bukkit /// Sets up the world state fun setup() {- world.setGameRule(GameRules.ADVANCE_TIME, false)- world.setTime(18000L)- world.setGameRule(GameRules.RESPAWN_RADIUS, 0)- world.setGameRule(GameRules.MOB_GRIEFING, false)+ Bukkit.getWorlds().forEach { world -> + world.setGameRule(GameRules.ADVANCE_TIME, false)+ world.setTime(18000L)+ world.setGameRule(GameRules.RESPAWN_RADIUS, 0)+ world.setGameRule(GameRules.MOB_GRIEFING, false)+ } }src/main/kotlin/net/bowmap/server/entity/GameEntity.kt view file
@@ -0,0 +1,6 @@++// An immutable reference to a mutable entity+// Can only call impure functions on this entity to get things from it+// And execute effects on it to do things to it++// Players also go under this categorysrc/main/kotlin/net/bowmap/world/World.kt view file
@@ -1,6 +0,0 @@-package net.bowmap.world--import org.bukkit.Bukkit--// TODO this is very bad lol-val world = Bukkit.getWorld("world")!!