Fixed onDisable throwing an error.
This commit is contained in:
parent
8967d5dfd4
commit
ff7caf015e
4
pom.xml
4
pom.xml
@ -13,8 +13,8 @@
|
|||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>7</source>
|
<source>8</source>
|
||||||
<target>7</target>
|
<target>8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
@ -44,15 +44,13 @@ public class Main extends HabboPlugin implements EventListener {
|
|||||||
Field f = PacketManager.class.getDeclaredField("incoming");
|
Field f = PacketManager.class.getDeclaredField("incoming");
|
||||||
f.setAccessible(true);
|
f.setAccessible(true);
|
||||||
THashMap<Integer, Class<? extends MessageHandler>> incoming = (THashMap<Integer, Class<? extends MessageHandler>>)f.get(packetManager);
|
THashMap<Integer, Class<? extends MessageHandler>> incoming = (THashMap<Integer, Class<? extends MessageHandler>>)f.get(packetManager);
|
||||||
incoming.remove(Incoming.CameraRoomThumbnailEvent);
|
incoming.remove(Incoming.CameraRoomPictureEvent, CameraRoomPictureEvent.class);
|
||||||
incoming.remove(Incoming.CameraPublishToWebEvent);
|
incoming.remove(Incoming.CameraPublishToWebEvent, CameraPublishToWebEvent.class);
|
||||||
incoming.remove(Incoming.CameraPurchaseEvent);
|
incoming.remove(Incoming.CameraPurchaseEvent, CameraPurchaseEvent.class);
|
||||||
incoming.remove(Incoming.CameraRoomThumbnailEvent);
|
incoming.remove(Incoming.CameraRoomThumbnailEvent, CameraRoomThumbnailEvent.class);
|
||||||
packetManager.registerHandler(Incoming.CameraRoomPictureEvent, CameraRoomPictureEvent.class);
|
Emulator.getLogging().logStart("[Apollyon] Bye Bye.");
|
||||||
packetManager.registerHandler(Incoming.CameraPublishToWebEvent, CameraPublishToWebEvent.class);
|
|
||||||
packetManager.registerHandler(Incoming.CameraPurchaseEvent, CameraPurchaseEvent.class);
|
}
|
||||||
packetManager.registerHandler(Incoming.CameraRoomThumbnailEvent, CameraRoomThumbnailEvent.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
Loading…
Reference in New Issue
Block a user