Eliminated plugin and kSpigot parameters

This commit is contained in:
bluefireoly
2020-10-12 17:01:01 +02:00
parent 6b2f95c7fa
commit 29bd82803d
11 changed files with 63 additions and 69 deletions

View File

@@ -2,12 +2,12 @@ package net.axay.kspigot.extensions.bukkit
import net.axay.kspigot.annotations.NMS_General
import net.axay.kspigot.extensions.onlinePlayers
import net.axay.kspigot.main.KSpigotMainInstance
import org.bukkit.Location
import org.bukkit.Material
import org.bukkit.attribute.Attribute
import org.bukkit.craftbukkit.v1_16_R2.CraftWorld
import org.bukkit.entity.*
import org.bukkit.plugin.Plugin
/**
* Checks if the entity is completely in water.
@@ -72,15 +72,15 @@ fun Player.feedSaturate() {
/**
* Hides the player for all [onlinePlayers].
*/
fun Player.disappear(plugin: Plugin) {
onlinePlayers.filter { it != this }.forEach { it.hidePlayer(plugin, this) }
fun Player.disappear() {
onlinePlayers.filter { it != this }.forEach { it.hidePlayer(KSpigotMainInstance, this) }
}
/**
* Shows the player for all [onlinePlayers].
*/
fun Player.appear(plugin: Plugin) {
onlinePlayers.filter { it != this }.forEach { it.showPlayer(plugin, this) }
fun Player.appear() {
onlinePlayers.filter { it != this }.forEach { it.showPlayer(KSpigotMainInstance, this) }
}
/**