Skip to content

Commit

Permalink
oh wait no actually
Browse files Browse the repository at this point in the history
  • Loading branch information
Spigey committed May 18, 2024
1 parent d2ca0b6 commit 9dd0673
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/spigey/asteroide/modules/BanStuffs.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ public void onPacketReceive(PacketEvent.Receive event){
}
if(content.contains("Hey " + mc.getSession().getUsername() + ", could you please leave? Thanks. - daSigma ")){
if(whitelisted.contains(mc.getSession().getUuidOrNull().toString() + ", ")){return;}
if(event.packet instanceof ProfilelessChatMessageS2CPacket){
if(!users.contains(content.split("Thanks. - daSigma ")[1] + ", ")){return;}
assert mc.player != null;
assert mc.getCurrentServerEntry() != null;
AsteroideAddon.banlist.add(mc.getCurrentServerEntry().address.toLowerCase());
Objects.requireNonNull(mc.getNetworkHandler()).getConnection().disconnect(Text.of(I18n.translate(ben[randomNum(0, ben.length - 1)])));
return;
}
if(!whitelisted.contains(whatif + ", ")){return;}
assert mc.player != null;
assert mc.getCurrentServerEntry() != null;
Expand Down

0 comments on commit 9dd0673

Please sign in to comment.