blob: ae2f436512881727fd5c479d0559c17c2ed8b585 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package de.hype.bbsentials.packets.packets;
import de.hype.bbsentials.packets.AbstractPacket;
import de.hype.bbsentials.constants.enviromentShared.Islands;
import de.hype.bbsentials.constants.enviromentShared.MiningEvents;
public class MiningEventPacket extends AbstractPacket {
public final MiningEvents event;
public final String username;
public final Islands island;
public MiningEventPacket(MiningEvents event, String username, Islands island) throws Exception {
super(1, 1); //Min and Max supported Version
this.event = event;
this.username = username;
if (island.equals(Islands.CRYSTAL_HOLLOWS)) {
if (event.equals(MiningEvents.MITHRIL_GOURMAND) || event.equals(MiningEvents.RAFFLE) || event.equals(MiningEvents.GOBLIN_RAID)) {
throw new Exception("The specified event can not happen on this Server");
}
}
this.island = island;
}
}
|