File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
bukkit/src/main/java/com/github/games647/changeskin/bukkit/tasks Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2121import java .util .logging .Level ;
2222
2323import org .bukkit .Bukkit ;
24+ import org .bukkit .Chunk ;
2425import org .bukkit .command .CommandSender ;
2526import org .bukkit .entity .Player ;
2627
@@ -107,8 +108,12 @@ private void sendUpdateSelf(WrappedGameProfile gameProfile) throws FieldAccessEx
107108 //notify the client that it should update the own skin
108109 protocolManager .sendServerPacket (receiver , respawn );
109110
111+ //refresh the chunk
112+ Chunk chunk = receiver .getWorld ().getChunkAt (receiver .getLocation ());
113+ receiver .getWorld ().refreshChunk (chunk .getX (), chunk .getZ ());
114+
110115 //prevent the moved too quickly message
111- receiver .teleport (receiver );
116+ receiver .teleport (receiver . getLocation (). clone () );
112117
113118 //send the current inventory - otherwise player would have an empty inventory
114119 receiver .updateInventory ();
You can’t perform that action at this time.
0 commit comments