You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
755 B
32 lines
755 B
package net.deliciousreya.minecraftportal.extensions
|
|
|
|
import org.bukkit.Location
|
|
import org.bukkit.util.Vector
|
|
|
|
operator fun Location.plus(v: Vector):Location {
|
|
return this.clone().add(v)
|
|
}
|
|
|
|
operator fun Location.plus(l: Location):Location {
|
|
return this.clone().add(l)
|
|
}
|
|
|
|
fun Location.plus(x: Double, y: Double, z: Double):Location {
|
|
return this.clone().add(x, y, z)
|
|
}
|
|
|
|
operator fun Location.minus(v:Vector):Location {
|
|
return this.clone().subtract(v)
|
|
}
|
|
|
|
operator fun Location.minus(l: Location):Location {
|
|
return this.clone().subtract(l)
|
|
}
|
|
|
|
fun Location.minus(x: Double, y: Double, z: Double):Location {
|
|
return this.clone().subtract(x, y, z)
|
|
}
|
|
|
|
operator fun Location.times(n:Double):Location {
|
|
return this.clone().multiply(n)
|
|
} |