Only clear fly/nofall data if changing form/to creative mode.

This commit is contained in:
asofold 2012-10-02 15:51:58 +02:00
parent 74b3c1c84f
commit 8b92bd74dc

View File

@ -230,10 +230,12 @@ public class MovingListener implements Listener {
* \____|_| |_|\__,_|_| |_|\__, |\___| * \____|_| |_|\__,_|_| |_|\__, |\___|
* |___/ * |___/
*/ */
if (event.getPlayer().getGameMode() == GameMode.CREATIVE || event.getNewGameMode() == GameMode.CREATIVE){
final MovingData data = MovingData.getData(event.getPlayer()); final MovingData data = MovingData.getData(event.getPlayer());
data.clearFlyData(); data.clearFlyData();
data.clearMorePacketsData(); data.clearMorePacketsData();
} }
}
/** /**
* We listen to this event to cancel the placement of boat the ground. Boats are made to float on water, right? * We listen to this event to cancel the placement of boat the ground. Boats are made to float on water, right?