Replace all Runnables with lambda .

This commit is contained in:
KrewsOrg 2020-04-23 18:08:37 +01:00
parent 4b278a2109
commit df2641f215
18 changed files with 98 additions and 179 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "morningstar-default-database"]
path = morningstar-default-database
url = https://git.krews.org/morningstar/morningstar-default-database

View File

@ -75,20 +75,13 @@ public class ButlerBot extends Bot {
tasks.add(new RoomUnitGiveHanditem(serveEvent.habbo.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), serveEvent.itemId)); tasks.add(new RoomUnitGiveHanditem(serveEvent.habbo.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), serveEvent.itemId));
tasks.add(new RoomUnitGiveHanditem(this.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), 0)); tasks.add(new RoomUnitGiveHanditem(this.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), 0));
tasks.add(new Runnable() { tasks.add(() -> b.talk(Emulator.getTexts().getValue("bots.butler.given").replace("%key%", key).replace("%username%", serveEvent.habbo.getHabboInfo().getUsername())));
@Override
public void run() {
b.talk(Emulator.getTexts().getValue("bots.butler.given").replace("%key%", key).replace("%username%", serveEvent.habbo.getHabboInfo().getUsername()));
}
});
List<Runnable> failedReached = new ArrayList(); List<Runnable> failedReached = new ArrayList();
failedReached.add(new Runnable() { failedReached.add(() -> {
public void run() { if (b.getRoomUnit().getCurrentLocation().distance(serveEvent.habbo.getRoomUnit().getCurrentLocation()) <= Emulator.getConfig().getInt("hotel.bot.butler.servedistance", 8)) {
if (b.getRoomUnit().getCurrentLocation().distance(serveEvent.habbo.getRoomUnit().getCurrentLocation()) <= Emulator.getConfig().getInt("hotel.bot.butler.servedistance", 8)) { for (Runnable t : tasks) {
for (Runnable t : tasks) { t.run();
t.run();
}
} }
} }
}); });

View File

@ -59,24 +59,21 @@ public class MassGiftCommand extends Command {
keys.put("message", Emulator.getTexts().getValue("generic.gift.received.anonymous")); keys.put("message", Emulator.getTexts().getValue("generic.gift.received.anonymous"));
ServerMessage giftNotificiationMessage = new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys).compose(); ServerMessage giftNotificiationMessage = new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys).compose();
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
public void run() { Habbo habbo = set.getValue();
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
Habbo habbo = set.getValue();
HabboItem item = Emulator.getGameEnvironment().getItemManager().createItem(0, baseItem, 0, 0, ""); HabboItem item = Emulator.getGameEnvironment().getItemManager().createItem(0, baseItem, 0, 0, "");
Item giftItem = Emulator.getGameEnvironment().getItemManager().getItem((Integer) Emulator.getGameEnvironment().getCatalogManager().giftFurnis.values().toArray()[Emulator.getRandom().nextInt(Emulator.getGameEnvironment().getCatalogManager().giftFurnis.size())]); Item giftItem = Emulator.getGameEnvironment().getItemManager().getItem((Integer) Emulator.getGameEnvironment().getCatalogManager().giftFurnis.values().toArray()[Emulator.getRandom().nextInt(Emulator.getGameEnvironment().getCatalogManager().giftFurnis.size())]);
String extraData = "1\t" + item.getId(); String extraData = "1\t" + item.getId();
extraData += "\t0\t0\t0\t" + finalMessage + "\t0\t0"; extraData += "\t0\t0\t0\t" + finalMessage + "\t0\t0";
Emulator.getGameEnvironment().getItemManager().createGift(habbo.getHabboInfo().getUsername(), giftItem, extraData, 0, 0); Emulator.getGameEnvironment().getItemManager().createGift(habbo.getHabboInfo().getUsername(), giftItem, extraData, 0, 0);
habbo.getClient().sendResponse(new InventoryRefreshComposer()); habbo.getClient().sendResponse(new InventoryRefreshComposer());
habbo.getClient().sendResponse(giftNotificiationMessage); habbo.getClient().sendResponse(giftNotificiationMessage);
}
} }
}); });

View File

@ -44,12 +44,9 @@ public class InteractionEffectGiver extends InteractionDefault {
this.setExtradata("1"); this.setExtradata("1");
room.updateItem(this); room.updateItem(this);
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override InteractionEffectGiver.this.setExtradata("0");
public void run() { room.updateItem(instance);
InteractionEffectGiver.this.setExtradata("0");
room.updateItem(instance);
}
}, 500); }, 500);
} }
} }

View File

@ -42,12 +42,9 @@ public class InteractionHanditem extends InteractionDefault {
this.setExtradata("1"); this.setExtradata("1");
room.updateItem(this); room.updateItem(this);
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override InteractionHanditem.this.setExtradata("0");
public void run() { room.updateItem(instance);
InteractionHanditem.this.setExtradata("0");
room.updateItem(instance);
}
}, 500); }, 500);
} }
} }

View File

@ -20,12 +20,9 @@ public class InteractionHanditemTile extends InteractionHanditem {
@Override @Override
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
InteractionHanditemTile instance = this; InteractionHanditemTile instance = this;
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override if (roomUnit.getCurrentLocation().x == instance.getX() && roomUnit.getCurrentLocation().y == instance.getY()) {
public void run() { instance.handle(room, roomUnit);
if (roomUnit.getCurrentLocation().x == instance.getX() && roomUnit.getCurrentLocation().y == instance.getY()) {
instance.handle(room, roomUnit);
}
} }
}, 3000); }, 3000);
} }

View File

@ -56,24 +56,14 @@ public class InteractionPressurePlate extends HabboItem {
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
super.onWalkOn(roomUnit, room, objects); super.onWalkOn(roomUnit, room, objects);
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> updateState(room), 100);
@Override
public void run() {
updateState(room);
}
}, 100);
} }
@Override @Override
public void onWalkOff(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { public void onWalkOff(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
super.onWalkOff(roomUnit, room, objects); super.onWalkOff(roomUnit, room, objects);
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> updateState(room), 100);
@Override
public void run() {
updateState(room);
}
}, 100);
} }
@Override @Override

View File

@ -48,12 +48,9 @@ public class InteractionTileEffectProvider extends InteractionCustomValues {
room.updateItem(this); room.updateItem(this);
final InteractionTileEffectProvider proxy = this; final InteractionTileEffectProvider proxy = this;
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override proxy.values.put("state", "0");
public void run() { room.updateItem(proxy);
proxy.values.put("state", "0");
room.updateItem(proxy);
}
}, 500); }, 500);
room.giveEffect(roomUnit, effectId, -1); room.giveEffect(roomUnit, effectId, -1);

View File

@ -52,12 +52,9 @@ public class InteractionTrap extends InteractionDefault {
roomUnit.setCanWalk(false); roomUnit.setCanWalk(false);
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override room.giveEffect(roomUnit, 0, -1);
public void run() { roomUnit.setCanWalk(true);
room.giveEffect(roomUnit, 0, -1);
roomUnit.setCanWalk(true);
}
}, delay); }, delay);
} }
} }

View File

@ -150,24 +150,21 @@ public class InteractionPetBreedingNest extends HabboItem {
HabboItem box = this; HabboItem box = this;
Pet petOne = this.petOne; Pet petOne = this.petOne;
Pet petTwo = this.petTwo; Pet petTwo = this.petTwo;
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override Pet offspring = Emulator.getGameEnvironment().getPetManager().createPet(petOne.getPetData().getOffspringType(), (int) Math.min(Math.round(Math.max(1d, PetManager.getNormalDistributionForBreeding(petOne.getLevel(), petTwo.getLevel()).sample())), 20), name, habbo.getClient());
public void run() {
Pet offspring = Emulator.getGameEnvironment().getPetManager().createPet(petOne.getPetData().getOffspringType(), (int) Math.min(Math.round(Math.max(1d, PetManager.getNormalDistributionForBreeding(petOne.getLevel(), petTwo.getLevel()).sample())), 20), name, habbo.getClient());
//habbo.getClient().sendResponse(new PetPackageNameValidationComposer(box.getId(), PetPackageNameValidationComposer.CLOSE_WIDGET, "")); //habbo.getClient().sendResponse(new PetPackageNameValidationComposer(box.getId(), PetPackageNameValidationComposer.CLOSE_WIDGET, ""));
habbo.getHabboInfo().getCurrentRoom().placePet(offspring, box.getX(), box.getY(), box.getZ(), box.getRotation()); habbo.getHabboInfo().getCurrentRoom().placePet(offspring, box.getX(), box.getY(), box.getZ(), box.getRotation());
offspring.needsUpdate = true; offspring.needsUpdate = true;
offspring.run(); offspring.run();
InteractionPetBreedingNest.this.freePets(); InteractionPetBreedingNest.this.freePets();
habbo.getHabboInfo().getCurrentRoom().removeHabboItem(box); habbo.getHabboInfo().getCurrentRoom().removeHabboItem(box);
habbo.getClient().sendResponse(new PetBreedingCompleted(offspring.getId(), Emulator.getGameEnvironment().getPetManager().getRarityForOffspring(offspring))); habbo.getClient().sendResponse(new PetBreedingCompleted(offspring.getId(), Emulator.getGameEnvironment().getPetManager().getRarityForOffspring(offspring)));
if (box.getBaseItem().getName().startsWith("pet_breeding_")) { if (box.getBaseItem().getName().startsWith("pet_breeding_")) {
String boxType = box.getBaseItem().getName().replace("pet_breeding_", ""); String boxType = box.getBaseItem().getName().replace("pet_breeding_", "");
String achievement = boxType.substring(0, 1).toUpperCase() + boxType.substring(1) + "Breeder"; String achievement = boxType.substring(0, 1).toUpperCase() + boxType.substring(1) + "Breeder";
AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement(achievement)); AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement(achievement));
}
} }
}, 2000); }, 2000);

View File

@ -45,14 +45,11 @@ public class InteractionPetToy extends InteractionDefault {
pet.getRoomUnit().setStatus(RoomUnitStatus.PLAY, "0"); pet.getRoomUnit().setStatus(RoomUnitStatus.PLAY, "0");
pet.packetUpdate = true; pet.packetUpdate = true;
HabboItem item = this; HabboItem item = this;
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override pet.addHappyness(25);
public void run() { item.setExtradata("0");
pet.addHappyness(25); room.updateItem(item);
item.setExtradata("0"); new PetClearPosture(pet, RoomUnitStatus.PLAY, null, true).run();
room.updateItem(item);
new PetClearPosture(pet, RoomUnitStatus.PLAY, null, true).run();
}
}, 2500 + (Emulator.getRandom().nextInt(20) * 500)); }, 2500 + (Emulator.getRandom().nextInt(20) * 500));
this.setExtradata("1"); this.setExtradata("1");
room.updateItemState(this); room.updateItemState(this);

View File

@ -72,12 +72,7 @@ public class WiredEffectChangeFurniDirection extends InteractionWiredEffect {
boolean hasHabbos = false; boolean hasHabbos = false;
for (Habbo habbo : room.getHabbosAt(targetTile)) { for (Habbo habbo : room.getHabbosAt(targetTile)) {
hasHabbos = true; hasHabbos = true;
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> WiredHandler.handle(WiredTriggerType.COLLISION, habbo.getRoomUnit(), room, new Object[]{entry.getKey()}));
@Override
public void run() {
WiredHandler.handle(WiredTriggerType.COLLISION, habbo.getRoomUnit(), room, new Object[]{entry.getKey()});
}
});
} }
if (!hasHabbos) { if (!hasHabbos) {

View File

@ -58,12 +58,7 @@ public class WiredEffectMoveFurniAway extends InteractionWiredEffect {
if (target != null) { if (target != null) {
if (RoomLayout.tilesAdjecent(target.getRoomUnit().getCurrentLocation(), room.getLayout().getTile(item.getX(), item.getY())) && (target.getRoomUnit().getX() == item.getX() || target.getRoomUnit().getY() == item.getY())) { if (RoomLayout.tilesAdjecent(target.getRoomUnit().getCurrentLocation(), room.getLayout().getTile(item.getX(), item.getY())) && (target.getRoomUnit().getX() == item.getX() || target.getRoomUnit().getY() == item.getY())) {
final Habbo finalTarget = target; final Habbo finalTarget = target;
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> WiredHandler.handle(WiredTriggerType.COLLISION, finalTarget.getRoomUnit(), room, new Object[]{item}), 500);
@Override
public void run() {
WiredHandler.handle(WiredTriggerType.COLLISION, finalTarget.getRoomUnit(), room, new Object[]{item});
}
}, 500);
continue; continue;
} }

View File

@ -717,14 +717,11 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
if (oldZ != roomUnit.getZ()) { if (oldZ != roomUnit.getZ()) {
this.scheduledTasks.add(new Runnable() { this.scheduledTasks.add(() -> {
@Override try {
public void run() { item.onWalkOn(roomUnit, Room.this, null);
try { } catch (Exception e) {
item.onWalkOn(roomUnit, Room.this, null);
} catch (Exception e) {
}
} }
}); });
} }
@ -1039,12 +1036,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
if (this.loaded) { if (this.loaded) {
try { try {
Emulator.getThreading().run( Emulator.getThreading().run(
new Runnable() { Room.this::cycle);
@Override
public void run() {
Room.this.cycle();
}
});
} catch (Exception e) { } catch (Exception e) {
Emulator.getLogging().logErrorLine(e); Emulator.getLogging().logErrorLine(e);
} }
@ -1175,12 +1167,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
habbo.getRoomUnit().kickCount++; habbo.getRoomUnit().kickCount++;
if (habbo.getRoomUnit().kickCount >= 5) { if (habbo.getRoomUnit().kickCount >= 5) {
this.scheduledTasks.add(new Runnable() { this.scheduledTasks.add(() -> Emulator.getGameEnvironment().getRoomManager().leaveRoom(habbo, room));
@Override
public void run() {
Emulator.getGameEnvironment().getRoomManager().leaveRoom(habbo, room);
}
});
continue; continue;
} }
} }
@ -1471,15 +1458,12 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
HabboItem item = room.getTopItemAt(tileInFront.x, tileInFront.y); HabboItem item = room.getTopItemAt(tileInFront.x, tileInFront.y);
if (item != null && itemsNewTile.contains(item)) { if (item != null && itemsNewTile.contains(item)) {
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override if (unit.getGoal() == rollerTile) {
public void run() { try {
if (unit.getGoal() == rollerTile) { item.onWalkOn(unit, room, null);
try { } catch (Exception e) {
item.onWalkOn(unit, room, null); Emulator.getLogging().logErrorLine(e);
} catch (Exception e) {
Emulator.getLogging().logErrorLine(e);
}
} }
} }
}, this.getRollerSpeed() == 0 ? 250 : InteractionRoller.DELAY); }, this.getRollerSpeed() == 0 ? 250 : InteractionRoller.DELAY);

View File

@ -8,7 +8,6 @@ import com.eu.habbo.habbohotel.navigation.NavigatorSavedSearch;
import com.eu.habbo.habbohotel.permissions.Permission; import com.eu.habbo.habbohotel.permissions.Permission;
import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.habbohotel.users.HabboManager; import com.eu.habbo.habbohotel.users.HabboManager;
import com.eu.habbo.habbohotel.users.inventory.EffectsComponent;
import com.eu.habbo.messages.NoAuthMessage; import com.eu.habbo.messages.NoAuthMessage;
import com.eu.habbo.messages.ServerMessage; import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
@ -36,7 +35,6 @@ import com.eu.habbo.plugin.events.users.UserLoginEvent;
import gnu.trove.map.hash.THashMap; import gnu.trove.map.hash.THashMap;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
@NoAuthMessage @NoAuthMessage
@ -178,14 +176,11 @@ public class SecureLoginEvent extends MessageHandler {
if (Emulator.getConfig().getBoolean("hotel.welcome.alert.enabled")) { if (Emulator.getConfig().getBoolean("hotel.welcome.alert.enabled")) {
final Habbo finalHabbo = habbo; final Habbo finalHabbo = habbo;
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override if (Emulator.getConfig().getBoolean("hotel.welcome.alert.oldstyle")) {
public void run() { SecureLoginEvent.this.client.sendResponse(new MessagesForYouComposer(HabboManager.WELCOME_MESSAGE.replace("%username%", finalHabbo.getHabboInfo().getUsername()).replace("%user%", finalHabbo.getHabboInfo().getUsername()).split("<br/>")));
if (Emulator.getConfig().getBoolean("hotel.welcome.alert.oldstyle")) { } else {
SecureLoginEvent.this.client.sendResponse(new MessagesForYouComposer(HabboManager.WELCOME_MESSAGE.replace("%username%", finalHabbo.getHabboInfo().getUsername()).replace("%user%", finalHabbo.getHabboInfo().getUsername()).split("<br/>"))); SecureLoginEvent.this.client.sendResponse(new GenericAlertComposer(HabboManager.WELCOME_MESSAGE.replace("%username%", finalHabbo.getHabboInfo().getUsername()).replace("%user%", finalHabbo.getHabboInfo().getUsername())));
} else {
SecureLoginEvent.this.client.sendResponse(new GenericAlertComposer(HabboManager.WELCOME_MESSAGE.replace("%username%", finalHabbo.getHabboInfo().getUsername()).replace("%user%", finalHabbo.getHabboInfo().getUsername())));
}
} }
}, Emulator.getConfig().getInt("hotel.welcome.alert.delay", 5000)); }, Emulator.getConfig().getInt("hotel.welcome.alert.delay", 5000));
} }

View File

@ -70,18 +70,15 @@ public class ReportEvent extends MessageHandler {
if (cfhTopic != null) { if (cfhTopic != null) {
if (cfhTopic.action != CfhActionType.MODS) { if (cfhTopic.action != CfhActionType.MODS) {
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override if (issue.state == ModToolTicketState.OPEN) {
public void run() { if (cfhTopic.action == CfhActionType.AUTO_IGNORE) {
if (issue.state == ModToolTicketState.OPEN) { ReportEvent.this.client.getHabbo().getHabboStats().ignoreUser(reported.getHabboInfo().getId());
if (cfhTopic.action == CfhActionType.AUTO_IGNORE) { ReportEvent.this.client.sendResponse(new RoomUserIgnoredComposer(reported, RoomUserIgnoredComposer.IGNORED));
ReportEvent.this.client.getHabbo().getHabboStats().ignoreUser(reported.getHabboInfo().getId());
ReportEvent.this.client.sendResponse(new RoomUserIgnoredComposer(reported, RoomUserIgnoredComposer.IGNORED));
}
ReportEvent.this.client.sendResponse(new ModToolIssueHandledComposer(cfhTopic.reply).compose());
Emulator.getGameEnvironment().getModToolManager().closeTicketAsHandled(issue, null);
} }
ReportEvent.this.client.sendResponse(new ModToolIssueHandledComposer(cfhTopic.reply).compose());
Emulator.getGameEnvironment().getModToolManager().closeTicketAsHandled(issue, null);
} }
}, 30 * 1000); }, 30 * 1000);
} }
@ -99,21 +96,18 @@ public class ReportEvent extends MessageHandler {
if (cfhTopic != null) { if (cfhTopic != null) {
if (cfhTopic.action != CfhActionType.MODS) { if (cfhTopic.action != CfhActionType.MODS) {
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override if (issue.state == ModToolTicketState.OPEN) {
public void run() { if (cfhTopic.action == CfhActionType.AUTO_IGNORE) {
if (issue.state == ModToolTicketState.OPEN) { ReportEvent.this.client.getHabbo().getHabboStats().ignoreUser(issue.reportedId);
if (cfhTopic.action == CfhActionType.AUTO_IGNORE) { Habbo reported = Emulator.getGameEnvironment().getHabboManager().getHabbo(issue.reportedId);
ReportEvent.this.client.getHabbo().getHabboStats().ignoreUser(issue.reportedId); if (reported != null) {
Habbo reported = Emulator.getGameEnvironment().getHabboManager().getHabbo(issue.reportedId); ReportEvent.this.client.sendResponse(new RoomUserIgnoredComposer(reported, RoomUserIgnoredComposer.IGNORED));
if (reported != null) {
ReportEvent.this.client.sendResponse(new RoomUserIgnoredComposer(reported, RoomUserIgnoredComposer.IGNORED));
}
} }
ReportEvent.this.client.sendResponse(new ModToolIssueHandledComposer(cfhTopic.reply).compose());
Emulator.getGameEnvironment().getModToolManager().closeTicketAsHandled(issue, null);
} }
ReportEvent.this.client.sendResponse(new ModToolIssueHandledComposer(cfhTopic.reply).compose());
Emulator.getGameEnvironment().getModToolManager().closeTicketAsHandled(issue, null);
} }
}, 30 * 1000); }, 30 * 1000);
} }

View File

@ -38,14 +38,11 @@ public class ThreadPooling {
public ScheduledFuture run(Runnable run, long delay) { public ScheduledFuture run(Runnable run, long delay) {
try { try {
if (this.canAdd) { if (this.canAdd) {
return this.scheduledPool.schedule(new Runnable() { return this.scheduledPool.schedule(() -> {
@Override try {
public void run() { run.run();
try { } catch (Exception e) {
run.run(); Emulator.getLogging().logErrorLine(e);
} catch (Exception e) {
Emulator.getLogging().logErrorLine(e);
}
} }
}, delay, TimeUnit.MILLISECONDS); }, delay, TimeUnit.MILLISECONDS);
} }

View File

@ -29,12 +29,9 @@ public class HopperActionOne implements Runnable {
this.client.getHabbo().getRoomUnit().setZ(this.teleportOne.getZ()); this.client.getHabbo().getRoomUnit().setZ(this.teleportOne.getZ());
this.client.getHabbo().getRoomUnit().setPreviousLocationZ(this.teleportOne.getZ()); this.client.getHabbo().getRoomUnit().setPreviousLocationZ(this.teleportOne.getZ());
Emulator.getThreading().run(new Runnable() { Emulator.getThreading().run(() -> {
@Override HopperActionOne.this.client.getHabbo().getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
public void run() { HopperActionOne.this.room.sendComposer(new RoomUserStatusComposer(HopperActionOne.this.client.getHabbo().getRoomUnit()).compose());
HopperActionOne.this.client.getHabbo().getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
HopperActionOne.this.room.sendComposer(new RoomUserStatusComposer(HopperActionOne.this.client.getHabbo().getRoomUnit()).compose());
}
}, 750); }, 750);
Emulator.getThreading().run(new HopperActionTwo(this.teleportOne, this.room, this.client), 1250); Emulator.getThreading().run(new HopperActionTwo(this.teleportOne, this.room, this.client), 1250);