Reformat and clean up "net" package

This commit is contained in:
P0nk
2021-09-09 23:26:02 +02:00
parent 69f4580637
commit 6be6ea9927
235 changed files with 3556 additions and 3398 deletions

View File

@@ -11,10 +11,16 @@ public class FamilyPreceptsHandler extends AbstractPacketHandler {
@Override
public void handlePacket(InPacket p, Client c) {
Family family = c.getPlayer().getFamily();
if(family == null) return;
if(family.getLeader().getChr() != c.getPlayer()) return; //only the leader can set the precepts
if (family == null) {
return;
}
if (family.getLeader().getChr() != c.getPlayer()) {
return; //only the leader can set the precepts
}
String newPrecepts = p.readString();
if(newPrecepts.length() > 200) return;
if (newPrecepts.length() > 200) {
return;
}
family.setMessage(newPrecepts, true);
//family.broadcastFamilyInfoUpdate(); //probably don't need to broadcast for this?
c.sendPacket(PacketCreator.getFamilyInfo(c.getPlayer().getFamilyEntry()));