Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sign updates on translation #670

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ public boolean equals(String[] a, String[] b) {
for (Map.Entry<String[], List<MovecraftLocation>> entry : signs.entrySet()) {
SignTranslateEvent event = new SignTranslateEvent(craft, entry.getKey(), entry.getValue());
Bukkit.getServer().getPluginManager().callEvent(event);
// if(!event.isUpdated()){
// continue;
// }
// TODO: This is implemented only to fix client caching
// ideally we wouldn't do the update and would instead fake it out to the player
for (MovecraftLocation location : entry.getValue()) {
Block block = location.toBukkit(craft.getWorld()).getBlock();
BlockState state = block.getState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,11 @@ public boolean equals(String[] a, String[] b) {
for(Map.Entry<String[], List<MovecraftLocation>> entry : signs.entrySet()){
SignTranslateEvent event = new SignTranslateEvent(craft, entry.getKey(), entry.getValue());
Bukkit.getServer().getPluginManager().callEvent(event);
if(!event.isUpdated()){
continue;
}
// if(!event.isUpdated()){
// continue;
// }
// TODO: This is implemented only to fix client caching
// ideally we wouldn't do the update and would instead fake it out to the player
for(MovecraftLocation location : entry.getValue()){
Block block = location.toBukkit(craft.getWorld()).getBlock();
BlockState state = block.getState();
Expand Down