fix ServuxStructuresProtocol (#89)

* Add LeaveHooks to fix bug caused by servux structures protocol

* add missing file

* add comment

* add license
This commit is contained in:
Helvetica Volubi
2025-11-16 20:51:19 +08:00
committed by GitHub
parent 735fe8855a
commit dbcf764e76
18 changed files with 70 additions and 1 deletions
@@ -0,0 +1,37 @@
/*
* This file is part of Leaves (https://github.com/LeavesMC/Leaves)
*
* Leaves is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Leaves is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Leaves. If not, see <https://www.gnu.org/licenses/>.
*/
package org.leavesmc.leaves.region;
import ca.spottedleaf.moonrise.paper.PaperHooks;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.level.chunk.LevelChunk;
public final class LeavesHooks extends PaperHooks {
@Override
public String getBrand() {
return "Lophine"; // Lophine - rebrand
}
@Override
public void onChunkWatch(ServerLevel world, LevelChunk chunk, ServerPlayer player) {
super.onChunkWatch(world, chunk, player);
org.leavesmc.leaves.protocol.servux.ServuxStructuresProtocol.onStartedWatchingChunk(player, chunk); // servux
}
}