Quick maintenance
This commit is contained in:
+11
@@ -1,12 +1,15 @@
|
||||
package rs09.game.system.command.rottenpotato
|
||||
|
||||
import api.removeItem
|
||||
import core.cache.def.impl.ItemDefinition
|
||||
import core.game.interaction.OptionHandler
|
||||
import core.game.node.Node
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.info.Rights
|
||||
import core.plugin.Initializable
|
||||
import core.plugin.Plugin
|
||||
import org.rs09.consts.Items
|
||||
import rs09.game.system.SystemLogger
|
||||
import rs09.game.system.command.CommandSystem
|
||||
import rs09.tools.stringtools.colorize
|
||||
|
||||
@@ -29,6 +32,14 @@ class RottenPotatoOptionHandler : OptionHandler() {
|
||||
node ?: return false
|
||||
option ?: return false
|
||||
|
||||
// re-add the fucking check because some fucking moron removed it at some point
|
||||
if(player.rights != Rights.ADMINISTRATOR)
|
||||
{
|
||||
removeItem(player, Items.ROTTEN_POTATO_5733)
|
||||
SystemLogger.logAlert("Player ${player.username} had a rotten potato. It has been removed.")
|
||||
return false
|
||||
}
|
||||
|
||||
when(option){
|
||||
"rs hd" -> player.dialogueInterpreter.open(RottenPotatoRSHDDialogue().ID)
|
||||
"heal" -> player.fullRestore().also { player.sendMessage(colorize("%RAll healed!")) }
|
||||
|
||||
Reference in New Issue
Block a user