Skip to content

Commit

Permalink
Last "cleanup"
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixuge committed Apr 27, 2023
1 parent 9f6e82b commit 15a5b25
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
6 changes: 1 addition & 5 deletions src/main/java/wdl/WDLEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -778,15 +778,11 @@ public void onCrashReportPopulateEnvironment(CrashReport report) {
private static final int WDLo = ('W' << 24) | ('D' << 16) | ('L' << 8) | ('o');

private class StartDownloadButton extends WDLButton {
public StartDownloadButton(GuiScreen menu, int x, int y, int width, int height) {
public StartDownloadButton(GuiScreen _menu, int x, int y, int width, int height) {
super(x, y, width, height, null);
this.menu = menu;
this.id = WDLs; // keep unique, even though this isn't used by WDL
}

// The GuiScreen containing this button, as a parent for other GUIs
private final GuiScreen menu;

@Override
public void beforeDraw() {
final String displayString;
Expand Down
21 changes: 0 additions & 21 deletions src/main/java/wdl/WDLPluginChannels.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,17 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;

import javax.annotation.CheckForSigned;
import javax.annotation.Nullable;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;

import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.network.NetworkManager;
import net.minecraft.world.chunk.Chunk;
import wdl.functions.PacketFunctions.ChannelName;

/**
* World Downloader permission system implemented with Plugin Channels.
Expand Down Expand Up @@ -235,18 +226,6 @@ public static void addChunkOverrideRequest(ChunkRange range) {
chunkOverrideRequests.add(range);
}

/**
* Channels that the server has registered/unregistered.
*
* A map from a NetworkManager instance to a String, so that data is kept per-server.
*
* Unfortunately, clearing in onWorldLoad -> newServer doesn't work right, as that happens
* after (possibly far after) plugin messages are handled.
*
* XXX Equally unfortunately, the server never bothers to tell the client what channels it will send on...
*/
private static final Map<NetworkManager, Set<@ChannelName String>> REGISTERED_CHANNELS = new WeakHashMap<>();

/**
* The state for {@link #sendInitPacket(String)} if it was called when no channels were registered.
*/
Expand Down

0 comments on commit 15a5b25

Please sign in to comment.