Skip to content

Commit

Permalink
remove mixin in favour of fabric api player disconnection event
Browse files Browse the repository at this point in the history
  • Loading branch information
Gegy committed Oct 3, 2021
1 parent 98d2098 commit 64a7ede
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 38 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ loader_version=0.11.6
fabric_version=0.36.1+1.17

# Mod Properties
mod_version=1.0.0
mod_version=1.0.1
maven_group=xyz.nucleoid
archives_base_name=game-parties
6 changes: 6 additions & 0 deletions src/main/java/xyz/nucleoid/parties/PartyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.common.collect.Lists;
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.network.ServerPlayerEntity;
import org.jetbrains.annotations.Nullable;
Expand All @@ -23,6 +24,11 @@ private PartyManager(MinecraftServer server) {
}

public static void register() {
ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> {
var partyManager = PartyManager.get(server);
partyManager.onPlayerLogOut(handler.player);
});

GameEvents.COLLECT_PLAYERS_FOR_JOIN.register((gameSpace, player, additional) -> {
var partyManager = PartyManager.get(player.server);

Expand Down
24 changes: 0 additions & 24 deletions src/main/java/xyz/nucleoid/parties/mixin/PlayerManagerMixin.java

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"entrypoints": {
"main": ["xyz.nucleoid.parties.GameParties"]
},
"mixins": ["game_parties.mixins.json"],
"depends": {
"fabricloader": ">=0.9.1",
"fabric": "*",
Expand Down
12 changes: 0 additions & 12 deletions src/main/resources/game_parties.mixins.json

This file was deleted.

0 comments on commit 64a7ede

Please sign in to comment.