Skip to content

Commit

Permalink
fix component not found
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Mar 5, 2024
1 parent eedb93b commit 03f32e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@
import java.util.Optional;

public class PortalListener extends ListenerComponent {
private final DebugComponent debug = plugin.get(DebugComponent.class);
private DebugComponent debug;

public PortalListener(BasePlugin plugin) {
super(plugin);
}

@Override
public void load() {
debug = plugin.get(DebugComponent.class);
}

@EventHandler
public void onPortalReady(EntityPortalReadyEvent event) {
if (event.getPortalType() != PortalType.NETHER) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@
import java.util.Optional;

public class RespawnListener extends ListenerComponent {
private final DebugComponent debug = plugin.get(DebugComponent.class);
private DebugComponent debug;

public RespawnListener(BasePlugin plugin) {
super(plugin);
}

@Override
public void load() {
debug = plugin.get(DebugComponent.class);
}

@EventHandler
public void onRespawn(PlayerRespawnEvent event) {
debug.debug("Respawn: " + event.getPlayer().getName() + " in " + event.getRespawnLocation());
Expand Down

0 comments on commit 03f32e2

Please sign in to comment.