FIX PLAYER DISPLAY NAMES (MAJOR)
This commit is contained in:
parent
d733574b9f
commit
b69173c767
3 changed files with 3 additions and 16 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -49,3 +49,5 @@ gradle-app.setting
|
||||||
|
|
||||||
# Testing plugins
|
# Testing plugins
|
||||||
/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/testing
|
/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/testing
|
||||||
|
/.idea/modules/
|
||||||
|
/.idea/modules.xml
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/chomens_bot.iml" filepath="$PROJECT_DIR$/chomens_bot.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/chomens_bot.main.iml" filepath="$PROJECT_DIR$/.idea/modules/chomens_bot.main.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/chomens_bot.test.iml" filepath="$PROJECT_DIR$/.idea/modules/chomens_bot.test.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
|
@ -1,6 +1,5 @@
|
||||||
package land.chipmunk.chayapak.chomens_bot.plugins;
|
package land.chipmunk.chayapak.chomens_bot.plugins;
|
||||||
|
|
||||||
import com.github.steveice10.mc.auth.data.GameProfile;
|
|
||||||
import com.github.steveice10.mc.protocol.data.game.PlayerListEntry;
|
import com.github.steveice10.mc.protocol.data.game.PlayerListEntry;
|
||||||
import com.github.steveice10.mc.protocol.data.game.PlayerListEntryAction;
|
import com.github.steveice10.mc.protocol.data.game.PlayerListEntryAction;
|
||||||
import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
|
import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
|
||||||
|
@ -92,11 +91,7 @@ public class PlayersPlugin extends Bot.Listener {
|
||||||
public PlayerEntry getBotEntry () { return getEntry(bot.username); }
|
public PlayerEntry getBotEntry () { return getEntry(bot.username); }
|
||||||
|
|
||||||
private PlayerEntry getEntry (PlayerListEntry other) {
|
private PlayerEntry getEntry (PlayerListEntry other) {
|
||||||
final GameProfile gameProfile = other.getProfile();
|
return getEntry(other.getProfileId());
|
||||||
|
|
||||||
if (gameProfile == null) return null;
|
|
||||||
|
|
||||||
return getEntry(gameProfile.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeChat (PlayerListEntry newEntry) {
|
private void initializeChat (PlayerListEntry newEntry) {
|
||||||
|
|
Loading…
Reference in a new issue