-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
110 additions
and
8 deletions.
There are no files selected for viewing
15 changes: 13 additions & 2 deletions
15
src/main/java/me/hsgamer/yatpa/command/PlayerTabComplete.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
src/main/java/me/hsgamer/yatpa/event/PreTeleportRequestEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package me.hsgamer.yatpa.event; | ||
|
||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class PreTeleportRequestEvent extends Event implements Cancellable { | ||
private static final HandlerList HANDLERS = new HandlerList(); | ||
private final Player player; | ||
private final String targetPlayerName; | ||
private final @Nullable Player targetPlayer; | ||
private boolean cancelled; | ||
|
||
public PreTeleportRequestEvent(Player player, String targetPlayerName, @Nullable Player targetPlayer) { | ||
this.player = player; | ||
this.targetPlayerName = targetPlayerName; | ||
this.targetPlayer = targetPlayer; | ||
} | ||
|
||
public static HandlerList getHANDLERS() { | ||
return HANDLERS; | ||
} | ||
|
||
public Player getPlayer() { | ||
return player; | ||
} | ||
|
||
@Nullable | ||
public Player getTargetPlayer() { | ||
return targetPlayer; | ||
} | ||
|
||
public String getTargetPlayerName() { | ||
return targetPlayerName; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancelled) { | ||
this.cancelled = cancelled; | ||
} | ||
|
||
@Override | ||
public @NotNull HandlerList getHandlers() { | ||
return HANDLERS; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/me/hsgamer/yatpa/event/TeleportPlayerListEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package me.hsgamer.yatpa.event; | ||
|
||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.List; | ||
|
||
public class TeleportPlayerListEvent extends Event { | ||
private static final HandlerList HANDLERS = new HandlerList(); | ||
private final List<String> playerNames; | ||
|
||
public TeleportPlayerListEvent(List<String> playerNames) { | ||
this.playerNames = playerNames; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return HANDLERS; | ||
} | ||
|
||
public List<String> getPlayerNames() { | ||
return playerNames; | ||
} | ||
|
||
@Override | ||
public @NotNull HandlerList getHandlers() { | ||
return HANDLERS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters