Fix TextDisplayManager: Add hide/show methods for sneak functionality
This commit is contained in:
parent
798e52eff9
commit
20c90b6ef9
2 changed files with 276 additions and 0 deletions
20
temp_methods.txt
Normal file
20
temp_methods.txt
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Скрывает TextDisplay игрока (при приседании)
|
||||
*/
|
||||
public void hidePlayerDisplay(UUID playerId) {
|
||||
TextDisplay display = playerDisplays.get(playerId);
|
||||
if (display != null && display.isValid()) {
|
||||
display.setViewRange(0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Показывает TextDisplay игрока (когда перестает приседать)
|
||||
*/
|
||||
public void showPlayerDisplay(UUID playerId) {
|
||||
TextDisplay display = playerDisplays.get(playerId);
|
||||
if (display != null && display.isValid()) {
|
||||
display.setViewRange(64.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue