Skip to content

Commit

Permalink
Clean up Triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
bundabrg committed Jul 10, 2020
1 parent 7b5c304 commit af9c270
Show file tree
Hide file tree
Showing 40 changed files with 118 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.geysermc.connector.command.CommandManager;
import org.geysermc.connector.configuration.GeyserConfiguration;
import org.geysermc.connector.dump.BootstrapDumpInfo;
import org.geysermc.connector.event.events.GeyserStartEvent;
import org.geysermc.connector.event.events.geyser.GeyserStartEvent;
import org.geysermc.connector.ping.GeyserLegacyPingPassthrough;
import org.geysermc.connector.ping.IGeyserPingPassthrough;
import org.geysermc.connector.utils.FileUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.geysermc.connector.bootstrap.GeyserBootstrap;
import org.geysermc.connector.command.CommandManager;
import org.geysermc.connector.dump.BootstrapDumpInfo;
import org.geysermc.connector.event.events.GeyserStartEvent;
import org.geysermc.connector.event.events.geyser.GeyserStartEvent;
import org.geysermc.connector.ping.GeyserLegacyPingPassthrough;
import org.geysermc.connector.ping.IGeyserPingPassthrough;
import org.geysermc.connector.utils.FileUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.geysermc.connector.command.CommandManager;
import org.geysermc.connector.configuration.GeyserConfiguration;
import org.geysermc.connector.dump.BootstrapDumpInfo;
import org.geysermc.connector.event.events.GeyserStartEvent;
import org.geysermc.connector.event.events.geyser.GeyserStartEvent;
import org.geysermc.connector.ping.GeyserLegacyPingPassthrough;
import org.geysermc.connector.ping.IGeyserPingPassthrough;
import org.geysermc.connector.utils.FileUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.bootstrap.GeyserBootstrap;
import org.geysermc.connector.dump.BootstrapDumpInfo;
import org.geysermc.connector.event.events.GeyserStartEvent;
import org.geysermc.connector.event.events.geyser.GeyserStartEvent;
import org.geysermc.connector.ping.GeyserLegacyPingPassthrough;
import org.geysermc.connector.ping.IGeyserPingPassthrough;
import org.geysermc.connector.utils.FileUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.geysermc.connector.command.CommandManager;
import org.geysermc.connector.event.EventManager;
import org.geysermc.connector.configuration.GeyserConfiguration;
import org.geysermc.connector.event.events.BedrockCodecRegistryEvent;
import org.geysermc.connector.event.events.network.BedrockCodecRegistryEvent;
import org.geysermc.connector.metrics.Metrics;
import org.geysermc.connector.network.ConnectorServerEventHandler;
import org.geysermc.connector.network.remote.RemoteServer;
Expand All @@ -56,8 +56,7 @@
import org.geysermc.connector.network.translators.world.block.BlockTranslator;
import org.geysermc.connector.network.translators.world.block.entity.BlockEntityTranslator;
import org.geysermc.connector.plugin.PluginManager;
import org.geysermc.connector.event.events.GeyserStopEvent;
import org.geysermc.connector.event.events.GeyserStartEvent;
import org.geysermc.connector.event.events.geyser.GeyserStopEvent;
import org.geysermc.connector.utils.DimensionUtils;
import org.geysermc.connector.utils.DockerCheck;
import org.geysermc.connector.utils.LocaleUtils;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.geyser;

import org.geysermc.connector.event.events.GeyserEvent;

/**
* EnableEvent is triggered for each plugin when enabling it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.geyser;

import org.geysermc.connector.event.events.GeyserEvent;

/**
* DisableEvent is triggered for each plugin when disabling it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.geyser;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.entity.PlayerEntity;
import org.geysermc.connector.event.events.CancellableGeyserEvent;
import org.geysermc.connector.network.session.auth.BedrockClientData;

@EqualsAndHashCode(callSuper = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.geyser;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.GeyserEvent;

import java.io.InputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.network;

import com.nukkitx.protocol.bedrock.BedrockPacketCodec;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.GeyserEvent;

@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.network;

import com.nukkitx.protocol.bedrock.BedrockPong;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.GeyserEvent;

import java.net.InetSocketAddress;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.packet;

import com.github.steveice10.packetlib.packet.Packet;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.geysermc.connector.event.events.CancellableGeyserEvent;
import org.geysermc.connector.network.session.GeyserSession;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.packet;

import com.github.steveice10.packetlib.packet.Packet;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.geysermc.connector.event.events.CancellableGeyserEvent;
import org.geysermc.connector.network.session.GeyserSession;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.packet;

import com.nukkitx.protocol.bedrock.BedrockPacket;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.CancellableGeyserEvent;
import org.geysermc.connector.network.session.GeyserSession;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.packet;

import com.nukkitx.protocol.bedrock.BedrockPacket;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.CancellableGeyserEvent;
import org.geysermc.connector.network.session.GeyserSession;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.plugin;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.GeyserEvent;
import org.geysermc.connector.plugin.GeyserPlugin;

@EqualsAndHashCode(callSuper = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.plugin;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.CancellableGeyserEvent;
import org.geysermc.connector.plugin.GeyserPlugin;

@EqualsAndHashCode(callSuper = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.plugin;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.CancellableGeyserEvent;
import org.geysermc.connector.network.session.GeyserSession;

@EqualsAndHashCode(callSuper = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.registry;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.geysermc.connector.event.events.GeyserEvent;

import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,35 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.registry;

import com.google.common.collect.BiMap;
import com.nukkitx.nbt.NbtList;
import com.nukkitx.nbt.NbtMap;
import it.unimi.dsi.fastutil.ints.Int2BooleanMap;
import it.unimi.dsi.fastutil.ints.Int2DoubleMap;
import it.unimi.dsi.fastutil.ints.Int2IntMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.IntSet;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.GeyserEvent;

@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@Data
public class RuntimeBlockStateReadEvent extends GeyserEvent {
private NbtList<NbtMap> blockStates;
public class BlockTranslatorRegistryEvent extends GeyserEvent {
NbtList<NbtMap> blocks;
Int2IntMap javaToBedrockBlockMap;
BiMap<String, Integer> javaIdBlockMap;
IntSet waterlogged;
Object2IntMap<NbtMap> itemFrames;
Int2ObjectMap<String> javaIdToBlockEntityMap;
Int2DoubleMap javaRuntimeIdToHardness;
Int2BooleanMap javaRuntimeIdToCanHarvestWithHand;
Int2ObjectMap<String> javaRuntimeIdToToolType;
IntSet javaRuntimeWoolIds;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
*
*/

package org.geysermc.connector.event.events;
package org.geysermc.connector.event.events.registry;

import com.github.steveice10.mc.protocol.data.game.window.WindowType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.geysermc.connector.event.events.GeyserEvent;
import org.geysermc.connector.network.translators.inventory.InventoryTranslator;

import java.util.Map;
Expand Down
Loading

0 comments on commit af9c270

Please sign in to comment.