geforkt von Mirrors/Paper
fixed PlayerCommandPreprocessEvent inheritance
By: sunkid <sunkid@iminurnetz.com>
Dieser Commit ist enthalten in:
Ursprung
7237d8aa07
Commit
7e6d0bd531
@ -4,6 +4,7 @@ package org.bukkit.event.player;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
|
|
||||||
@ -17,10 +18,13 @@ public class PlayerChatEvent extends PlayerEvent implements Cancellable {
|
|||||||
private final Set<Player> recipients;
|
private final Set<Player> recipients;
|
||||||
|
|
||||||
public PlayerChatEvent(final Player player, final String message) {
|
public PlayerChatEvent(final Player player, final String message) {
|
||||||
super(Type.PLAYER_CHAT, player);
|
this(Type.PLAYER_CHAT, player, message);
|
||||||
this.message = message;
|
}
|
||||||
|
|
||||||
|
protected PlayerChatEvent(final Type type, final Player player, final String message) {
|
||||||
|
super(type, player);
|
||||||
recipients = new HashSet<Player>(Arrays.asList(player.getServer().getOnlinePlayers()));
|
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;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class PlayerCommandPreprocessEvent extends PlayerChatEvent {
|
public class PlayerCommandPreprocessEvent extends PlayerChatEvent {
|
||||||
public PlayerCommandPreprocessEvent(Player player, String message) {
|
public PlayerCommandPreprocessEvent(final Player player, final String message) {
|
||||||
super(player, message);
|
super(Type.PLAYER_COMMAND_PREPROCESS, player, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren