mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 15:00:52 +01:00
Replace all Runnables with lambda .
This commit is contained in:
parent
4b278a2109
commit
df2641f215
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "morningstar-default-database"]
|
||||
path = morningstar-default-database
|
||||
url = https://git.krews.org/morningstar/morningstar-default-database
|
@ -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(this.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), 0));
|
||||
|
||||
tasks.add(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
b.talk(Emulator.getTexts().getValue("bots.butler.given").replace("%key%", key).replace("%username%", serveEvent.habbo.getHabboInfo().getUsername()));
|
||||
}
|
||||
});
|
||||
tasks.add(() -> b.talk(Emulator.getTexts().getValue("bots.butler.given").replace("%key%", key).replace("%username%", serveEvent.habbo.getHabboInfo().getUsername())));
|
||||
|
||||
List<Runnable> failedReached = new ArrayList();
|
||||
failedReached.add(new Runnable() {
|
||||
public void run() {
|
||||
if (b.getRoomUnit().getCurrentLocation().distance(serveEvent.habbo.getRoomUnit().getCurrentLocation()) <= Emulator.getConfig().getInt("hotel.bot.butler.servedistance", 8)) {
|
||||
for (Runnable t : tasks) {
|
||||
t.run();
|
||||
}
|
||||
failedReached.add(() -> {
|
||||
if (b.getRoomUnit().getCurrentLocation().distance(serveEvent.habbo.getRoomUnit().getCurrentLocation()) <= Emulator.getConfig().getInt("hotel.bot.butler.servedistance", 8)) {
|
||||
for (Runnable t : tasks) {
|
||||
t.run();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -59,24 +59,21 @@ public class MassGiftCommand extends Command {
|
||||
keys.put("message", Emulator.getTexts().getValue("generic.gift.received.anonymous"));
|
||||
ServerMessage giftNotificiationMessage = new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys).compose();
|
||||
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (Map.Entry<Integer, Habbo> set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
|
||||
Habbo habbo = set.getValue();
|
||||
Emulator.getThreading().run(() -> {
|
||||
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();
|
||||
extraData += "\t0\t0\t0\t" + finalMessage + "\t0\t0";
|
||||
String extraData = "1\t" + item.getId();
|
||||
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(giftNotificiationMessage);
|
||||
}
|
||||
habbo.getClient().sendResponse(new InventoryRefreshComposer());
|
||||
habbo.getClient().sendResponse(giftNotificiationMessage);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -44,12 +44,9 @@ public class InteractionEffectGiver extends InteractionDefault {
|
||||
this.setExtradata("1");
|
||||
room.updateItem(this);
|
||||
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InteractionEffectGiver.this.setExtradata("0");
|
||||
room.updateItem(instance);
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
InteractionEffectGiver.this.setExtradata("0");
|
||||
room.updateItem(instance);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
@ -42,12 +42,9 @@ public class InteractionHanditem extends InteractionDefault {
|
||||
this.setExtradata("1");
|
||||
room.updateItem(this);
|
||||
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InteractionHanditem.this.setExtradata("0");
|
||||
room.updateItem(instance);
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
InteractionHanditem.this.setExtradata("0");
|
||||
room.updateItem(instance);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
@ -20,12 +20,9 @@ public class InteractionHanditemTile extends InteractionHanditem {
|
||||
@Override
|
||||
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
||||
InteractionHanditemTile instance = this;
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (roomUnit.getCurrentLocation().x == instance.getX() && roomUnit.getCurrentLocation().y == instance.getY()) {
|
||||
instance.handle(room, roomUnit);
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
if (roomUnit.getCurrentLocation().x == instance.getX() && roomUnit.getCurrentLocation().y == instance.getY()) {
|
||||
instance.handle(room, roomUnit);
|
||||
}
|
||||
}, 3000);
|
||||
}
|
||||
|
@ -56,24 +56,14 @@ public class InteractionPressurePlate extends HabboItem {
|
||||
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
||||
super.onWalkOn(roomUnit, room, objects);
|
||||
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
updateState(room);
|
||||
}
|
||||
}, 100);
|
||||
Emulator.getThreading().run(() -> updateState(room), 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWalkOff(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
||||
super.onWalkOff(roomUnit, room, objects);
|
||||
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
updateState(room);
|
||||
}
|
||||
}, 100);
|
||||
Emulator.getThreading().run(() -> updateState(room), 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,12 +48,9 @@ public class InteractionTileEffectProvider extends InteractionCustomValues {
|
||||
room.updateItem(this);
|
||||
|
||||
final InteractionTileEffectProvider proxy = this;
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
proxy.values.put("state", "0");
|
||||
room.updateItem(proxy);
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
proxy.values.put("state", "0");
|
||||
room.updateItem(proxy);
|
||||
}, 500);
|
||||
|
||||
room.giveEffect(roomUnit, effectId, -1);
|
||||
|
@ -52,12 +52,9 @@ public class InteractionTrap extends InteractionDefault {
|
||||
|
||||
|
||||
roomUnit.setCanWalk(false);
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
room.giveEffect(roomUnit, 0, -1);
|
||||
roomUnit.setCanWalk(true);
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
room.giveEffect(roomUnit, 0, -1);
|
||||
roomUnit.setCanWalk(true);
|
||||
}, delay);
|
||||
}
|
||||
}
|
||||
|
@ -150,24 +150,21 @@ public class InteractionPetBreedingNest extends HabboItem {
|
||||
HabboItem box = this;
|
||||
Pet petOne = this.petOne;
|
||||
Pet petTwo = this.petTwo;
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
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());
|
||||
Emulator.getThreading().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.getHabboInfo().getCurrentRoom().placePet(offspring, box.getX(), box.getY(), box.getZ(), box.getRotation());
|
||||
offspring.needsUpdate = true;
|
||||
offspring.run();
|
||||
InteractionPetBreedingNest.this.freePets();
|
||||
habbo.getHabboInfo().getCurrentRoom().removeHabboItem(box);
|
||||
habbo.getClient().sendResponse(new PetBreedingCompleted(offspring.getId(), Emulator.getGameEnvironment().getPetManager().getRarityForOffspring(offspring)));
|
||||
//habbo.getClient().sendResponse(new PetPackageNameValidationComposer(box.getId(), PetPackageNameValidationComposer.CLOSE_WIDGET, ""));
|
||||
habbo.getHabboInfo().getCurrentRoom().placePet(offspring, box.getX(), box.getY(), box.getZ(), box.getRotation());
|
||||
offspring.needsUpdate = true;
|
||||
offspring.run();
|
||||
InteractionPetBreedingNest.this.freePets();
|
||||
habbo.getHabboInfo().getCurrentRoom().removeHabboItem(box);
|
||||
habbo.getClient().sendResponse(new PetBreedingCompleted(offspring.getId(), Emulator.getGameEnvironment().getPetManager().getRarityForOffspring(offspring)));
|
||||
|
||||
if (box.getBaseItem().getName().startsWith("pet_breeding_")) {
|
||||
String boxType = box.getBaseItem().getName().replace("pet_breeding_", "");
|
||||
String achievement = boxType.substring(0, 1).toUpperCase() + boxType.substring(1) + "Breeder";
|
||||
AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement(achievement));
|
||||
}
|
||||
if (box.getBaseItem().getName().startsWith("pet_breeding_")) {
|
||||
String boxType = box.getBaseItem().getName().replace("pet_breeding_", "");
|
||||
String achievement = boxType.substring(0, 1).toUpperCase() + boxType.substring(1) + "Breeder";
|
||||
AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement(achievement));
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
|
@ -45,14 +45,11 @@ public class InteractionPetToy extends InteractionDefault {
|
||||
pet.getRoomUnit().setStatus(RoomUnitStatus.PLAY, "0");
|
||||
pet.packetUpdate = true;
|
||||
HabboItem item = this;
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
pet.addHappyness(25);
|
||||
item.setExtradata("0");
|
||||
room.updateItem(item);
|
||||
new PetClearPosture(pet, RoomUnitStatus.PLAY, null, true).run();
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
pet.addHappyness(25);
|
||||
item.setExtradata("0");
|
||||
room.updateItem(item);
|
||||
new PetClearPosture(pet, RoomUnitStatus.PLAY, null, true).run();
|
||||
}, 2500 + (Emulator.getRandom().nextInt(20) * 500));
|
||||
this.setExtradata("1");
|
||||
room.updateItemState(this);
|
||||
|
@ -72,12 +72,7 @@ public class WiredEffectChangeFurniDirection extends InteractionWiredEffect {
|
||||
boolean hasHabbos = false;
|
||||
for (Habbo habbo : room.getHabbosAt(targetTile)) {
|
||||
hasHabbos = true;
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
WiredHandler.handle(WiredTriggerType.COLLISION, habbo.getRoomUnit(), room, new Object[]{entry.getKey()});
|
||||
}
|
||||
});
|
||||
Emulator.getThreading().run(() -> WiredHandler.handle(WiredTriggerType.COLLISION, habbo.getRoomUnit(), room, new Object[]{entry.getKey()}));
|
||||
}
|
||||
|
||||
if (!hasHabbos) {
|
||||
|
@ -58,12 +58,7 @@ public class WiredEffectMoveFurniAway extends InteractionWiredEffect {
|
||||
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())) {
|
||||
final Habbo finalTarget = target;
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
WiredHandler.handle(WiredTriggerType.COLLISION, finalTarget.getRoomUnit(), room, new Object[]{item});
|
||||
}
|
||||
}, 500);
|
||||
Emulator.getThreading().run(() -> WiredHandler.handle(WiredTriggerType.COLLISION, finalTarget.getRoomUnit(), room, new Object[]{item}), 500);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
@ -717,14 +717,11 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
}
|
||||
|
||||
if (oldZ != roomUnit.getZ()) {
|
||||
this.scheduledTasks.add(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
item.onWalkOn(roomUnit, Room.this, null);
|
||||
} catch (Exception e) {
|
||||
this.scheduledTasks.add(() -> {
|
||||
try {
|
||||
item.onWalkOn(roomUnit, Room.this, null);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1039,12 +1036,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
if (this.loaded) {
|
||||
try {
|
||||
Emulator.getThreading().run(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Room.this.cycle();
|
||||
}
|
||||
});
|
||||
Room.this::cycle);
|
||||
} catch (Exception e) {
|
||||
Emulator.getLogging().logErrorLine(e);
|
||||
}
|
||||
@ -1175,12 +1167,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
habbo.getRoomUnit().kickCount++;
|
||||
|
||||
if (habbo.getRoomUnit().kickCount >= 5) {
|
||||
this.scheduledTasks.add(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Emulator.getGameEnvironment().getRoomManager().leaveRoom(habbo, room);
|
||||
}
|
||||
});
|
||||
this.scheduledTasks.add(() -> Emulator.getGameEnvironment().getRoomManager().leaveRoom(habbo, room));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -1471,15 +1458,12 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
HabboItem item = room.getTopItemAt(tileInFront.x, tileInFront.y);
|
||||
|
||||
if (item != null && itemsNewTile.contains(item)) {
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (unit.getGoal() == rollerTile) {
|
||||
try {
|
||||
item.onWalkOn(unit, room, null);
|
||||
} catch (Exception e) {
|
||||
Emulator.getLogging().logErrorLine(e);
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
if (unit.getGoal() == rollerTile) {
|
||||
try {
|
||||
item.onWalkOn(unit, room, null);
|
||||
} catch (Exception e) {
|
||||
Emulator.getLogging().logErrorLine(e);
|
||||
}
|
||||
}
|
||||
}, this.getRollerSpeed() == 0 ? 250 : InteractionRoller.DELAY);
|
||||
|
@ -8,7 +8,6 @@ import com.eu.habbo.habbohotel.navigation.NavigatorSavedSearch;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
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.ServerMessage;
|
||||
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 java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
@NoAuthMessage
|
||||
@ -178,14 +176,11 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
|
||||
if (Emulator.getConfig().getBoolean("hotel.welcome.alert.enabled")) {
|
||||
final Habbo finalHabbo = habbo;
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (Emulator.getConfig().getBoolean("hotel.welcome.alert.oldstyle")) {
|
||||
SecureLoginEvent.this.client.sendResponse(new MessagesForYouComposer(HabboManager.WELCOME_MESSAGE.replace("%username%", finalHabbo.getHabboInfo().getUsername()).replace("%user%", finalHabbo.getHabboInfo().getUsername()).split("<br/>")));
|
||||
} else {
|
||||
SecureLoginEvent.this.client.sendResponse(new GenericAlertComposer(HabboManager.WELCOME_MESSAGE.replace("%username%", finalHabbo.getHabboInfo().getUsername()).replace("%user%", finalHabbo.getHabboInfo().getUsername())));
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
if (Emulator.getConfig().getBoolean("hotel.welcome.alert.oldstyle")) {
|
||||
SecureLoginEvent.this.client.sendResponse(new MessagesForYouComposer(HabboManager.WELCOME_MESSAGE.replace("%username%", finalHabbo.getHabboInfo().getUsername()).replace("%user%", finalHabbo.getHabboInfo().getUsername()).split("<br/>")));
|
||||
} 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));
|
||||
}
|
||||
|
@ -70,18 +70,15 @@ public class ReportEvent extends MessageHandler {
|
||||
|
||||
if (cfhTopic != null) {
|
||||
if (cfhTopic.action != CfhActionType.MODS) {
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (issue.state == ModToolTicketState.OPEN) {
|
||||
if (cfhTopic.action == CfhActionType.AUTO_IGNORE) {
|
||||
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);
|
||||
Emulator.getThreading().run(() -> {
|
||||
if (issue.state == ModToolTicketState.OPEN) {
|
||||
if (cfhTopic.action == CfhActionType.AUTO_IGNORE) {
|
||||
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);
|
||||
}
|
||||
}, 30 * 1000);
|
||||
}
|
||||
@ -99,21 +96,18 @@ public class ReportEvent extends MessageHandler {
|
||||
|
||||
if (cfhTopic != null) {
|
||||
if (cfhTopic.action != CfhActionType.MODS) {
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (issue.state == ModToolTicketState.OPEN) {
|
||||
if (cfhTopic.action == CfhActionType.AUTO_IGNORE) {
|
||||
ReportEvent.this.client.getHabbo().getHabboStats().ignoreUser(issue.reportedId);
|
||||
Habbo reported = Emulator.getGameEnvironment().getHabboManager().getHabbo(issue.reportedId);
|
||||
if (reported != null) {
|
||||
ReportEvent.this.client.sendResponse(new RoomUserIgnoredComposer(reported, RoomUserIgnoredComposer.IGNORED));
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
if (issue.state == ModToolTicketState.OPEN) {
|
||||
if (cfhTopic.action == CfhActionType.AUTO_IGNORE) {
|
||||
ReportEvent.this.client.getHabbo().getHabboStats().ignoreUser(issue.reportedId);
|
||||
Habbo reported = Emulator.getGameEnvironment().getHabboManager().getHabbo(issue.reportedId);
|
||||
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);
|
||||
}
|
||||
|
@ -38,14 +38,11 @@ public class ThreadPooling {
|
||||
public ScheduledFuture run(Runnable run, long delay) {
|
||||
try {
|
||||
if (this.canAdd) {
|
||||
return this.scheduledPool.schedule(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
run.run();
|
||||
} catch (Exception e) {
|
||||
Emulator.getLogging().logErrorLine(e);
|
||||
}
|
||||
return this.scheduledPool.schedule(() -> {
|
||||
try {
|
||||
run.run();
|
||||
} catch (Exception e) {
|
||||
Emulator.getLogging().logErrorLine(e);
|
||||
}
|
||||
}, delay, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
@ -29,12 +29,9 @@ public class HopperActionOne implements Runnable {
|
||||
this.client.getHabbo().getRoomUnit().setZ(this.teleportOne.getZ());
|
||||
this.client.getHabbo().getRoomUnit().setPreviousLocationZ(this.teleportOne.getZ());
|
||||
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
HopperActionOne.this.client.getHabbo().getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
|
||||
HopperActionOne.this.room.sendComposer(new RoomUserStatusComposer(HopperActionOne.this.client.getHabbo().getRoomUnit()).compose());
|
||||
}
|
||||
Emulator.getThreading().run(() -> {
|
||||
HopperActionOne.this.client.getHabbo().getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
|
||||
HopperActionOne.this.room.sendComposer(new RoomUserStatusComposer(HopperActionOne.this.client.getHabbo().getRoomUnit()).compose());
|
||||
}, 750);
|
||||
|
||||
Emulator.getThreading().run(new HopperActionTwo(this.teleportOne, this.room, this.client), 1250);
|
||||
|
Loading…
Reference in New Issue
Block a user