Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ScuffedItalian

Members
  • Joined

  • Last visited

  1. I have a simple event that when a chat message is sent the player gains the ability of flight. The PlayerAbility does not exist, how can I make this run correctly? package net.anthony.modtest; import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.ClientChatEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = modtest.MOD_ID) public class modevents { public final String flyCom = ">_fly"; public void clientChatFly(ClientChatEvent event) { String msg = event.getMessage(); if(msg.startsWith(flyCom)) { Minecraft mc = Minecraft.getInstance(); PlayerAbilities abilities = mc.player.abilities; boolean canFly = !abilities.allowFlying; abilities.allowFlying = canFly; abilities.isFlying = canFly; } } }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.