Removed Grand Exchange privacy

This commit is contained in:
damighty
2025-08-18 14:34:42 +03:00
committed by Ryan
parent a0bf0d1d50
commit 80b1b4b01e
2 changed files with 2 additions and 13 deletions
@@ -101,13 +101,6 @@ class GrandExchange : StartupListener, Commands {
PriceIndex.allowItem(id) PriceIndex.allowItem(id)
notify(player, "Allowed ${getItemName(id)} for GE trade.") notify(player, "Allowed ${getItemName(id)} for GE trade.")
} }
define("geprivacy", Privilege.STANDARD) {player, _ ->
val current = getAttribute(player, "ge-exclude", false)
val new = !current
notify(player, "Your name is now ${if (new) colorize("%RHIDDEN") else colorize("%RSHOWN")}.")
setAttribute(player, "/save:ge-exclude", new)
}
} }
companion object { companion object {
@@ -231,8 +224,7 @@ class GrandExchange : StartupListener, Commands {
//GrandExchangeRecords.getInstance(player).update(offer) //GrandExchangeRecords.getInstance(player).update(offer)
if (offer.sell && !player.isArtificial) { if (offer.sell && !player.isArtificial) {
val username = if (getAttribute(player, "ge-exclude", false)) "?????" else player.username sendNews(player.username + " just offered " + offer.amount + " " + getItemName(offer.itemID) + " on the GE.")
Repository.sendNews(username + " just offered " + offer.amount + " " + getItemName(offer.itemID) + " on the GE.")
} }
if (ServerConstants.I_AM_A_CHEATER) { if (ServerConstants.I_AM_A_CHEATER) {
@@ -146,10 +146,7 @@ class GrandExchangeOffer() {
visualize(player) visualize(player)
stmt.close() stmt.close()
val username = if (getAttribute(player ?: return@run, "ge-exclude", false)) "?????" Discord.postNewOffer(sell, itemID, offeredValue, amount, player?.username ?: return@run)
else player?.username ?: "?????"
Discord.postNewOffer(sell, itemID, offeredValue, amount, username)
} }
} }
} }