Skip to content

Commit

Permalink
Update all signs (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 authored Jul 21, 2024
1 parent 6c2f22f commit d5627a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
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

0 comments on commit d5627a9

Please sign in to comment.