JEFF Media Developer Blog

Java & Spigot development

Menu
  • Blog
  • Main Website
  • Privacy Policy
Menu

Why IntelliJ complains about your pom.xml file

Posted on February 23, 2023 by mfnalex

Sometimes, people suggest you to change something in your pom.xml, and then IntelliJ starts to complain: That is totally normal. You simply have to click the “maven reload button” in IntelliJ. Maven will then continue to download the required dependency/plugin, if it’s available. After a few seconds, everything should be fine. You can find the…

Continue reading

How to make maven automatically put your plugin’s .jar into your test server’s plugins folder

Posted on February 23, 2023March 31, 2023 by mfnalex

If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in…

Continue reading

Use Consumers when spawning custom entities

Posted on January 23, 2023January 23, 2023 by mfnalex

When you want to spawn a custom entity, e.g. with a custom name or certain items equipped, you must use the method World#spawn(Location, Class<T extends Entity>, Consumer<T>) unless you give a shit about compatibility with other plugins. I’ll explain why. The shitty way Usually, you can easily spawn entities like this: That is fine, as…

Continue reading

Java’s init blocks

Posted on October 10, 2022October 10, 2022 by mfnalex

Java allows you to use the so called “init blocks”. You can declare static and instance init blocks. The static init blocks will run exactly once, when the ClassLoader loads the class that declares it, and the instance init blocks run everytime you construct a new object, after the actual constructor ran. The general order…

Continue reading

Bukkit vs. Spigot-API vs. CraftBukkit vs. Spigot

Posted on August 30, 2022September 18, 2022 by mfnalex

Some people are confused about what the difference between Bukkit, Spigot-API, CraftBukkit and Spigot is, so I’ll try to explain. Bukkit is the basic API Bukkit contains all the usual interfaces and enums, like org.bukkit.entity.Player or org.bukkit.Material. For most plugins, this is all you need. It does not contain any implementations, meaning: you cannot “run”…

Continue reading

Switching from Spigot mappings to Mojang mappings

Posted on August 20, 2022September 10, 2022 by mfnalex

If you are switching from Spigot’s mappings (with class names like EntityZombie, WorldServer, PacketPlayOutSpawnEntity…) to Mojang mappings, you will notice that many of the classes you were using can’t be found anymore, since they now have different names. You will have to change all your references to those classes to their new names. Setup Mojang…

Continue reading

Creating custom heads in Spigot 1.18.1+

Posted on August 1, 2022August 18, 2022 by mfnalex

Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,…

Continue reading

Three Common Maven Questions

Posted on March 19, 2022January 16, 2023 by mfnalex

People just getting started with maven always ask me the same 3 questions, so here’s a a short FAQ! How to change the output directory / file name? Changing the file name and output directory of your .jar file simply requires some changes in the maven-jar-plugin. If you don’t have it inside your pom.xml yet,…

Continue reading

Don’t jump off bridges, or: Why you shouldn’t use Exceptions to control code flow

Posted on March 11, 2022March 11, 2022 by mfnalex

Exceptions are a wonderful thing. They can let your code recover from unexpected situations in a nice and clean way, if you use them properly. That does not mean that you should always rely on them though. For example, imagine this: Most highways have guardrails in the middle to avoid cars going into oncoming traffic….

Continue reading

Manually installing .jar files to your local Maven repository

Posted on March 11, 2022 by mfnalex

Sometimes you have a certain .jar file that you need as dependency, but the author of that .jar was too lazy to properly upload it to a public repository. That’s bad, but not a problem. There are two ways to solve this, but only one proper way. The proper way: install the dependency The proper…

Continue reading
  • 1
  • 2
  • 3
  • Next

Recent Posts

  • Why IntelliJ complains about your pom.xml file
  • How to make maven automatically put your plugin’s .jar into your test server’s plugins folder
  • Use Consumers when spawning custom entities
  • Java’s init blocks
  • Bukkit vs. Spigot-API vs. CraftBukkit vs. Spigot

Recent Comments

  1. mfnalex on NMS: Use Mojang mappings for your Spigot plugins with Maven
  2. fisher on NMS: Use Mojang mappings for your Spigot plugins with Maven
  3. stromectol no prescription on Obfuscate plugins using allatori
  4. pharmacy uk on Obfuscate plugins using allatori
  5. mfnalex on Obfuscate plugins using allatori

Archives

  • February 2023
  • January 2023
  • October 2022
  • August 2022
  • March 2022
  • December 2021
  • October 2021
  • August 2021
©2023 JEFF Media Developer Blog
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT