forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -34,6 +34,7 @@ public class AdventListener implements Listener {
|
||||
|
||||
public static final int ADVENT_SLOT = 7;
|
||||
public static final SWItem ADVENT = SWItem.getPlayerSkull("MHF_Present1");
|
||||
|
||||
static {
|
||||
ADVENT.setName("§fAdvent");
|
||||
}
|
||||
@@ -41,7 +42,7 @@ public class AdventListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void handlePlayerInteract(PlayerInteractEvent event) {
|
||||
ItemStack item = event.getItem();
|
||||
if(item == null)
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
if (item.getType() == Material.PLAYER_HEAD && item.getItemMeta() != null && item.getItemMeta().getDisplayName().equals("§fAdvent")) {
|
||||
|
||||
@@ -44,7 +44,8 @@ public class PresentClickListener implements Listener {
|
||||
}
|
||||
AdventsCalendar.getPresentList().forEach(present -> {
|
||||
if (present.getDay() != day) return;
|
||||
if (NodeMember.getNodeMember(present.getSchematicId(), SteamwarUser.get(event.getPlayer().getUniqueId()).getId()) != null) return;
|
||||
if (NodeMember.getNodeMember(present.getSchematicId(), SteamwarUser.get(event.getPlayer().getUniqueId()).getId()) != null)
|
||||
return;
|
||||
LobbySystem.getMessage().send("ADVENT_CALENDAR_MESSAGE", event.getPlayer());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class EggHuntListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void handlePlayerInteract(PlayerInteractEvent event) {
|
||||
ItemStack item = event.getItem();
|
||||
if(item == null)
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
if (item.getType() == Material.DRAGON_EGG && item.getItemMeta() != null && item.getItemMeta().getDisplayName().equals("§fEaster Hunt")) {
|
||||
|
||||
Reference in New Issue
Block a user