mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 00:07:56 +01:00
fixed PlayerCommandPreprocessEvent inheritance
By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
parent
7237d8aa07
commit
7e6d0bd531
@ -4,6 +4,7 @@ package org.bukkit.event.player;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
@ -17,10 +18,13 @@ public class PlayerChatEvent extends PlayerEvent implements Cancellable {
|
||||
private final Set<Player> recipients;
|
||||
|
||||
public PlayerChatEvent(final Player player, final String message) {
|
||||
super(Type.PLAYER_CHAT, player);
|
||||
this.message = message;
|
||||
|
||||
this(Type.PLAYER_CHAT, player, message);
|
||||
}
|
||||
|
||||
protected PlayerChatEvent(final Type type, final Player player, final String message) {
|
||||
super(type, player);
|
||||
recipients = new HashSet<Player>(Arrays.asList(player.getServer().getOnlinePlayers()));
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@ package org.bukkit.event.player;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class PlayerCommandPreprocessEvent extends PlayerChatEvent {
|
||||
public PlayerCommandPreprocessEvent(Player player, String message) {
|
||||
super(player, message);
|
||||
public PlayerCommandPreprocessEvent(final Player player, final String message) {
|
||||
super(Type.PLAYER_COMMAND_PREPROCESS, player, message);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user