add toString for Area
This commit is contained in:
parent
764ead46c2
commit
3d35de3fe3
|
|
@ -2,7 +2,6 @@ package cc.maxmc.blastingcrisis.misc
|
||||||
|
|
||||||
import org.bukkit.Location
|
import org.bukkit.Location
|
||||||
import org.bukkit.Material
|
import org.bukkit.Material
|
||||||
import org.bukkit.block.Block
|
|
||||||
import org.bukkit.configuration.serialization.ConfigurationSerializable
|
import org.bukkit.configuration.serialization.ConfigurationSerializable
|
||||||
import org.bukkit.configuration.serialization.SerializableAs
|
import org.bukkit.configuration.serialization.SerializableAs
|
||||||
import org.bukkit.util.Vector
|
import org.bukkit.util.Vector
|
||||||
|
|
@ -102,6 +101,7 @@ class Area(loc1: Location, loc2: Location) : ConfigurationSerializable {
|
||||||
return locMin == other.locMin
|
return locMin == other.locMin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
var result = locTop.hashCode()
|
var result = locTop.hashCode()
|
||||||
result = 31 * result + locMin.hashCode()
|
result = 31 * result + locMin.hashCode()
|
||||||
|
|
@ -110,4 +110,8 @@ class Area(loc1: Location, loc2: Location) : ConfigurationSerializable {
|
||||||
|
|
||||||
override fun serialize() = mutableMapOf<String, Any>("locTop" to locTop, "locMin" to locMin)
|
override fun serialize() = mutableMapOf<String, Any>("locTop" to locTop, "locMin" to locMin)
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Area(locTop=$locTop, locMin=$locMin)"
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue