aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/TheMod.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-08-20 16:09:25 -0400
committerbowser0000 <bowser0000@gmail.com>2020-08-20 16:09:25 -0400
commit3023a9d96d300706b692d313799978de848bb12f (patch)
tree7617c5d052d0972872dfb17fd12cacdea2cf3874 /src/main/java/me/Danker/TheMod.java
parentd23181a65d0e49ea612d7d1ea2ae53701cfe7f0b (diff)
downloadSkyblockMod-3023a9d96d300706b692d313799978de848bb12f.tar.gz
SkyblockMod-3023a9d96d300706b692d313799978de848bb12f.tar.bz2
SkyblockMod-3023a9d96d300706b692d313799978de848bb12f.zip
Add option to block AOTD ability
Diffstat (limited to 'src/main/java/me/Danker/TheMod.java')
-rw-r--r--src/main/java/me/Danker/TheMod.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java
index 8c04511..c546dbd 100644
--- a/src/main/java/me/Danker/TheMod.java
+++ b/src/main/java/me/Danker/TheMod.java
@@ -42,6 +42,7 @@ import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.event.ClickEvent;
import net.minecraft.event.ClickEvent.Action;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
@@ -52,6 +53,7 @@ import net.minecraftforge.client.event.sound.PlaySoundEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
@@ -1379,6 +1381,17 @@ public class TheMod
}
}
+ @SubscribeEvent
+ public void onInteract(PlayerInteractEvent event) {
+ if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return;
+ ItemStack item = event.entityPlayer.getHeldItem();
+ if (item == null) return;
+
+ if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons") && event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR) {
+ event.setCanceled(true);
+ }
+ }
+
public void increaseEmpSC() {
LootCommand lc = new LootCommand();
ConfigHandler cf = new ConfigHandler();