-
Notifications
You must be signed in to change notification settings - Fork 0
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
9 changed files
with
60 additions
and
30 deletions.
There are no files selected for viewing
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
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
35 changes: 35 additions & 0 deletions
35
src/main/java/com/reider745/commands/PlayerInfoCommand.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,35 @@ | ||
package com.reider745.commands; | ||
|
||
import cn.nukkit.Player; | ||
import cn.nukkit.command.Command; | ||
import cn.nukkit.command.CommandSender; | ||
import cn.nukkit.command.data.CommandParamType; | ||
import cn.nukkit.command.data.CommandParameter; | ||
import com.reider745.hooks.PlayerHooks; | ||
import com.zhekasmirnov.apparatus.multiplayer.server.ConnectedClient; | ||
|
||
public class PlayerInfoCommand extends Command { | ||
public PlayerInfoCommand() { | ||
super("player_info", "debug inner core network player"); | ||
this.commandParameters.clear(); | ||
this.commandParameters.put("default", new CommandParameter[]{ | ||
new CommandParameter("player", CommandParamType.STRING, false), | ||
}); | ||
} | ||
|
||
@Override | ||
public boolean execute(CommandSender commandSender, String s, String[] args) { | ||
if(!commandSender.isOp() || args.length < 1) return false; | ||
|
||
Player player = commandSender.getServer().getPlayer(args[0]); | ||
if(player != null){ | ||
ConnectedClient client = PlayerHooks.getForPlayer(player); | ||
if(client == null) return false; | ||
|
||
commandSender.sendMessage("=====" + args[0] + "=====\n" + "ConnectedClient protocol: " + client.getChannelInterface().getChannel().getProtocolId()); | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} |
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
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
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