Skip to content

Commit

Permalink
fix event def
Browse files Browse the repository at this point in the history
  • Loading branch information
iceBear67 committed Dec 13, 2024
1 parent d71df28 commit ae8b32e
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'dev.tylerm'
version = '1.8.0a'
version = '1.8.1a'
description = 'Hide and Seek Plugin'
java.sourceCompatibility = JavaVersion.VERSION_21

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/dev/tylerm/khs/event/GameEndEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ public WinType getType() {
return type;
}

public static HandlerList getHandlerList() {
return HANDLERS;
}

@Override
public @NotNull HandlerList getHandlers() {
return HANDLERS;
}

}
4 changes: 4 additions & 0 deletions src/main/java/dev/tylerm/khs/event/PlayerKillEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public Player getVictim() {
return HANDLERS;
}

public static HandlerList getHandlerList() {
return HANDLERS;
}

@Override
public boolean isCancelled() {
return cancelled;
Expand Down
27 changes: 27 additions & 0 deletions src/main/java/dev/tylerm/khs/event/StartTimerUpdateEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package dev.tylerm.khs.event;

import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;

public class StartTimerUpdateEvent extends Event {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final int timeLeft;

public StartTimerUpdateEvent(int timeLeft) {
this.timeLeft = timeLeft;
}

public int getTimeLeft() {
return timeLeft;
}

public static HandlerList getHandlerList() {
return HANDLER_LIST;
}

@Override
public @NotNull HandlerList getHandlers() {
return HANDLER_LIST;
}
}
4 changes: 2 additions & 2 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ spawnPatch: false
gameLength: 300

# The last seconds in the game we'll highlight hiders around seekers.
whenToHighlight: 30
whenToHighlight: 20

# How long will be added into the timer when a seeker is found
extendPerKill: 30
extendPerKill: 10

# How long in seconds will the initial hiding period last, minimum is 10 seconds
# default: 30
Expand Down

0 comments on commit ae8b32e

Please sign in to comment.