KaspianDev / AntiPopup

Plugin giving back privacy that server owners deserve.
GNU General Public License v3.0
148 stars 19 forks source link

Ability to set content of popup instead #2

Closed PikaMug closed 2 years ago

PikaMug commented 2 years ago

Seems like this might be possible? https://github.com/retrooper/packetevents/blob/8aeef01bd4223c52322a44d3ceb44bcec5a3a388/api/src/main/java/com/github/retrooper/packetevents/protocol/chat/message/ChatMessage.java#L41

KaspianDev commented 2 years ago

Seems like this might be possible? https://github.com/retrooper/packetevents/blob/8aeef01bd4223c52322a44d3ceb44bcec5a3a388/api/src/main/java/com/github/retrooper/packetevents/protocol/chat/message/ChatMessage.java#L41

That one is for messages, not popup tho?

Edit: this is what popup uses https://github.com/retrooper/packetevents/blob/2.0/api/src/main/java/com/github/retrooper/packetevents/wrapper/play/server/WrapperPlayServerServerData.java#L108

PikaMug commented 2 years ago

That takes a boolean. I'm talking about changing the text.

KaspianDev commented 2 years ago

That takes a boolean. I'm talking about changing the text.

I'll tinker with it tomorrow, if you find something earlier feel free to PR.

SamB440 commented 2 years ago

Unfortunately, I'm pretty certain the text is clientside.

The client just displays the insecure popup to itself if that boolean is false.

ChatMessage is an unrelated class, that's to do with actually sending a chat message.

PikaMug commented 2 years ago

Haven't seen anything concrete about the text being client-side, but I clearly misinterpreted that class. Thank you both.