mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2026-01-06 15:42:03 +00:00
Fixed #124 and whitelist command only works on non-proxies.
This commit is contained in:
@@ -134,8 +134,8 @@ public final class VelocityCommandUtil implements CommandUtil {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(Object player, String locale, CommandMessage message, Object... args) {
|
||||
cast(player).sendMessage(translateAndTransform(locale, message, args));
|
||||
public void sendMessage(Object target, String locale, CommandMessage message, Object... args) {
|
||||
((CommandSource) target).sendMessage(translateAndTransform(locale, message, args));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -143,16 +143,6 @@ public final class VelocityCommandUtil implements CommandUtil {
|
||||
cast(player).disconnect(translateAndTransform(locale, message, args));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean whitelistPlayer(String xuid, String username) {
|
||||
return false; // todo
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removePlayerFromWhitelist(String xuid, String username) {
|
||||
return false; // todo
|
||||
}
|
||||
|
||||
public Component translateAndTransform(String locale, CommandMessage message,
|
||||
Object... args) {
|
||||
return Component.text(message.translateMessage(manager, locale, args));
|
||||
|
||||
Reference in New Issue
Block a user