⁠
joe: Include much more detail in inspection descriptions
- <!--
- Minecraft Development for IntelliJ
-
- https://mcdev.io/
-
- Copyright (C) 2026 minecraft-dev
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation, version 3.0 only.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- -->
-
- <html>
- <body>
- A method in a class annotated for one side cannot be declared as being in the other side. For example, a class which is annotated as @SideOnly(Side.SERVER) cannot contain a method which is annotated as @SideOnly(Side.CLIENT). Since a class that is annotated with @SideOnly brings everything with it, @SideOnly annotated methods are usually useless
- </body>
- </html>
- <!--
- Minecraft Development for IntelliJ
-
- https://mcdev.io/
-
- Copyright (C) 2026 minecraft-dev
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation, version 3.0 only.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- -->
-
- <html>
- <body>
- <p>
- Reports methods annotated with a different <code>@SideOnly</code> side than their class, and methods returning a type
- annotated with a different <code>@SideOnly</code> side than the method or its class.
- </p>
- <!-- tooltip end -->
- <p>
- A class annotated with <code>@SideOnly</code> is removed together with everything in it on the other side, so a method in it
- can't be for a different side, and <code>@SideOnly</code> annotations on its methods are usually useless. Likewise, a method
- can't return a type that doesn't exist on its side.
- </p>
- <pre><code>
- @SideOnly(Side.SERVER)
- public class ServerData {
- @SideOnly(Side.CLIENT) // bad
- public void render() { ... }
- }
- </code></pre>
- </body>
- </html>