retrooper / graphene

Developing a 1.18.1 vanilla minecraft server from scratch using PacketEvents.
5 stars 3 forks source link

Avoid creating UUID object for every call to sendMessage #2

Open Sculas opened 2 years ago

Sculas commented 2 years ago

After looking at the code, I found this: https://github.com/retrooper/graphene/blob/083fa400a4ee6fe1f99528e059bebdfe1d835754/src/main/java/com/github/graphene/player/Player.java#L148-L150 This doesn't seem right, why are we creating a UUID object for every call to sendMessage? Wouldn't it make sense to make some final constant somewhere for this?

NoJokeFNA commented 2 years ago

done https://github.com/retrooper/graphene/pull/3/files#diff-d6b45259c8e2c54bff734cd6614174cde244b4a979ac7c8cded4e5093d9654c3R144