201 questions
0
votes
1
answer
49
views
How do I refresh Players to change their skin?
I am trying to change the skins of the players on the Server. I've looked it up and found that you would need to send the correct packets with one being the deletion and the other the adding of the ...
1
vote
1
answer
62
views
How to set a Minecraft Villager entity's pathing to a Location? i.e. make mob walk to specific spot, using Spigot API
For Minecraft, utilizing the Spigot API, I have a LivingEntity Villager that I would like to path, or "walk" to a Location.
I have seen some older examples using PathEntity to perform this ...
0
votes
1
answer
31
views
Item name and lore de/serialization
For some reason when setting a item's name/lore using custom ChatColors via the Bukkit API(aka ItemMeta#setDisplayName()) and then later checking its NBT, it formats the NBT using redundant formatting ...
0
votes
0
answers
42
views
Hit Counter Counts Twice in PaperMC Plugin
I'm working on a 1.19.4 PaperMC plugin that counts hits for a super attack. My problem is that when I hit an entity, the hit is counted as two. The hit counter is needed to activate the super attack, ...
0
votes
1
answer
58
views
onPluginMessageReceived not working when sending from velocity to spigot
I'm learning how velocity plugins work for my minecraft network, and I wanted to make a simple /screenshare (player) command to bring both players onto the screenshare server. Since i want the spigot ...
0
votes
1
answer
77
views
PLAYERINTERACT event called TWICE
Problem with double use of an item during PlayerInteractEvent in a Minecraft plugin
Context: I am developing a plugin for Minecraft version 1.16.5, where a special item FlashDust is added, which when ...
-1
votes
1
answer
93
views
ClassNotFoundException in Minecraft plugin coded with visual studio code in maven
I made a jar file including some code that is useable for me to create minecraft plugins and wanted to make a local repository to the other file, which is called lavidefaultlib-1.3.jar.
The ...
0
votes
1
answer
102
views
Vault doesn't load correctly. [PaperSpigot 1.21.1]
So I'm writing a minecraft plugin for Paper 1.21.1. The concept is a PaySign, so you're able to place a special sign that when you right click it, it sends Money to another player.
I added ...
0
votes
0
answers
43
views
TabCompleter isn't working propertly - Minecraft Paper Plugin
After typing /dystrykt zapros, TabCompleter should prompt list of all online players. But in reality, TabCompleter prompts nothing.
In my code i wanted to get list of all online players but after ...
-2
votes
1
answer
51
views
Why do i get "Invalid plugin.yml"
Hello i want to create my first plugin but i have been running into a problem with the invalid plugin
here is my code
I am using Gradle Minecraft 1.20.4
Error :
org.bukkit.plugin....
0
votes
1
answer
83
views
How to get the player input from a custom anvil menu
For my plugin I want to get the users input from a custom anvil UI. When a player enters a command, it opens a custom anvil UI where they can enter a string by renaming a item. When they press the ...
-1
votes
2
answers
111
views
How do i make a anvil inventory with nms
I am making a Minecraft plugin in 1.20.2 and want to get the users input with a anvil menu. I have searched and tried things but I can't figure out how to make a custom anvil inventory and open it.
...
0
votes
1
answer
85
views
How to make data storage in Minecraft Plugins?
I'm trying to make a plugin for ranked parkour but im stuck at some point. I wanted players do some parkours, for example parkour 1, and after finish the parkour they can go parkour 2 but not parkour ...
-1
votes
1
answer
52
views
Minecraft protocol modifying handshake
Currently working on a project and wondering how I can modify the Minecraft login handshake to change a players IP in the game. Essentially modifying what ip the server thinks the player is joining ...
1
vote
1
answer
45
views
How to reference an ItemStack Block in Bukkit Events?
I am currently making a plugin for Minecraft 1.20.6, and I'm trying to setup where when you right click a certain block (AKA My Chest ItemStack but placed) it pops up with my Custom Inventory. But I'm ...
2
votes
0
answers
126
views
How to change a nametag with or without protocollib
So i've been searching for the past year and out of all the solutions to change the nametag of a player 2 have been standing out one is using reflection and another is just using protocollib.
The ...
1
vote
0
answers
57
views
I am creating a plugin and getting a PlaceholderAPI error in Minecraft
Version 1.20.I am creating a plugin and getting a PlaceholderAPI error in Minecraft. The console gives me this error:
[18:02:29] [Server thread/ERROR]: Error occurred while enabling WarpManager v1.0 (...
1
vote
1
answer
62
views
Where am I initializing my main class twice?
I'm receiving the error Plugin already initialized!. I already know that this means that I'm initializing my main class twice and Bukkit/Spigot doesn't like this.
I cannot seem to figure out where I'm ...
-1
votes
2
answers
126
views
Does PacketPlayOutPlayerInfo allow individual packets for changing a player's name?
I'm currently working on a plugin for my own Spigot server (1.8.x) and I'm encountering an issue with PacketPlayOutPlayerInfo.
I'm trying to make the player name (above the head) display a different ...
0
votes
0
answers
58
views
Gradle does not permit writing to files in build directory
I am working on a gradle plugin that downloads a file with tiny mappings to remap a spigot plugin that remaps nms into other mappings, either obfuscate them back from mojang or remap into an ...
0
votes
0
answers
25
views
PaperMC - Firing two RayTraces at a 45 degree angle from where the player is facing
I am trying to - as the title suggests - fire two rays from the direction that the player is facing but at a 45 degree angle along the x axis. I have managed to get this to work in some instances but ...
-1
votes
1
answer
70
views
How do i replace the default Ender Dragon with my custom one?
Pretty straightforward, i just started using NMS and i wanna make a custom Ender Dragon with some attributes changed (faster, bigger, etc etc) to replace the default one. I'm using NMS on 1.20.4 but i'...
0
votes
0
answers
32
views
Java JSONObject converts map elements to typeId and empty
I am making a Spigot plugin where I need to store the player's items in a json file. However, the resulting json file shows "tags":{"isWand":{"typeId":3,"empty":...
1
vote
1
answer
603
views
Im getting an error when trying to use NMS on spigot
Im getting this error when trying to use nms on spigot 1.20.4
For this one I tried in artifactID removing -api like a saw in a tutorial.
Here is part of my pom.xml file:
<dependencies>
<...
0
votes
1
answer
78
views
java get random from list by its percentage chance
i've have an list:
public List<Map<Integer, Rarity>> classes = Arrays.asList(
Collections.singletonMap(0, new Rarity("rarity_default", "Default!", 55.0)),
// ...
);
...
0
votes
1
answer
105
views
Cannot import any org.bukkit libs
I am making a spigot mod with using a spigot jar and running that and I cannot import anything from org.bukkit.
My plugin is supposed to give players random hearts when they join for the first time.
...
0
votes
1
answer
53
views
Saving Hashmap of Player and an Integer
I want to save a Hashmap to a file:
public static Map<Player, Integer> seconds = new HashMap<>();
It is to keep track of an integer given to a player, more specifically a timer.
This is ...
0
votes
0
answers
77
views
Dependencies not shading with Maven shade
I'm making a minecraft plugin for use with a server. I have tried to get jackson-databind to work so many times, however (with the use of jar tf) I find that jackson is never included and this then ...
1
vote
1
answer
141
views
java.lang.IllegalStateException: Asynchronous player kick
When I go to run a spigot plugin I have created, when a player completes certain actions, they will be kicked. For some reason, instead of kicking them once they have sent certain packets 20 times,
It ...
0
votes
0
answers
33
views
How can I change MongoDB Sync Driver Logging level to SEVERE using PaperMC?
I am using:
MongoDB Sync Driver 5.0.0
Paper 1.20.4
I've tried several solutions found online, but none seem to be working for me. Among the most promising attempts, I've experimented with using a ...
0
votes
1
answer
82
views
Question about vectors (player velocity) and Spigot API
I can’t understand how I can push the player back, left and right, I only understood how to push the player to the side where he is looking.
I tried to use ChatGPT but it produced code that doesn't ...
-1
votes
1
answer
41
views
Bukkit create 2 Instances of the same item
When I use for the first time my item (flame launcher), it works perfectly.
But if I give to myself another flame launcher, it seems like that it takes the other one's properties.
How can I create 2 ...
1
vote
1
answer
65
views
Spigot - Creating, writing, and reading YAML files in Command class
I am a 14-year old intermediate programmer. I ask humbly that you explain your answer in terms that I would understand, and not criticize me for asking a seemingly obvious question. With that, here is ...
0
votes
1
answer
59
views
Selfwritten plugins fail to load on server startup, due to "dependency-circulations"
I have two self-written plugins. NovEcon2 and RealBanks2.
NovEcon2 is my economy-plugin, which depends on Vault and RealBanks2 as softdepend.
RealBanks2 is my banking-plugin, which also depends on ...
1
vote
1
answer
90
views
How can I read text from a sign on PlayerInteract event after the new double sided sign changes with SpigotMC?
I am trying to get text from an in-game sign as a string, when the player clicks on that sign. Following the new changes made in Minecraft, which allow signs to be edited on both sides, many of the ...
0
votes
1
answer
117
views
Tracking items dropped to the ground
I'm making a spigot plugin that makes dropped item explode when it touched the ground and the version I'm working on is Minecraft 1.20.2(paper server) with spigot 1.20.2 API.
The problem is that when ...
0
votes
1
answer
62
views
Serialization of Custom Consumer
I am working on a statue plugin for Spigot 1.20.4 (Java) that creates NPC statues. Currently, when you create a statue, you can use a consumer to define what happens when said NPC is right clicked.
...
0
votes
1
answer
270
views
Why can't i import NMS in Spigot?
import net.minecraft.server;
gives me the error:
Cannot resolve symbol 'minecraft'
How do i fix this? The version of spigot api i am using is
spigot-api-1.14.4-R0.1-20191205.000449-89-shaded.jar
...
1
vote
1
answer
3k
views
Create brand new weapon with BlockBench and a MineCraft Plugin API
I would like to use Blockbench (a 3d modelling application like blender) to create an entirely new Minecraft weapon.
Then, with java and some API (for example bukkit), I want to have a brand-new ...
0
votes
0
answers
197
views
Sending data from Spigot server to Fabric client
I wanna send data from server to client using pluginMessage.
using this code on the server
public static void sendPmcAdd(Player player, RegionContainer container) {
if(!player.hasPermission(...
0
votes
0
answers
67
views
Is it possible to programatically add plugins to a Bukkit server properly?
I am currently working on a Minecraft plugin using the Bukkit API. The plugin needs to, at runtime, add additional plugins to the server programatically. In SimplePluginManager, used by the ...
0
votes
1
answer
43
views
"The plugin is registered in the main program but not functioning."
"I have a question. My plugin has two files, FireballPlugin.java (main program) and BlockReset.java (subprogram). However, when I write Bukkit.getPluginManager().registerEvents(new BlockReset(), ...
0
votes
1
answer
124
views
Unable to send UPnP search message in Java via jupnp
I am trying to send a UPnP search message in Java using jupnp. However, the documentation appears out of date and trying to send a search message results in the ControlPoint being null and therefore I ...
0
votes
1
answer
270
views
Minecraft/Spigot: Porting from Spigot 1.8 to 1.20 | Packets
Hello I wanted to port a old plugin from 1.8 to 1.20.
I never used a higher version than 1.8 spigot and I also didnt coded anything since 4 years in that either.
My old Plugin contained a function ...
0
votes
0
answers
53
views
How to get every entity between two locations
VMPlugin plugin = VMPlugin.getPlugin(VMPlugin.class);
Location target = p.getTargetBlock(null, 5).getLocation();
World world = target.getWorld();
Location ploc = p.getLocation();
Entity[] entities = //...
0
votes
1
answer
56
views
SQLite database connection closed or null Java
I am trying to make a Ban command for minecraft spigot 1.20.2. I am using SQLITE to store the data. I am using OnPlayerJoinEvent to check to see if the player is banned or not, if they are then we get ...
0
votes
1
answer
65
views
Why is Maven shade skipping a file from the MCCoroutine library
When running my Spigot plugin (built with Kotlin and Maven) I'm receiving an error about a missing class.
The file 'com.github.shynixn.mccoroutine.bukkit.impl.MCCoroutineImpl' is missing in my .jar. ...
-3
votes
3
answers
146
views
Java (Spigot/Bukkit) multiple classes
I have my main class Main.java (onEnable method)
and 3 others.
in Main.java I'm registering other classes so:
new Example(this);
new Shop(this);
new Info(this);
and in the classes themselves, I use ...
1
vote
1
answer
101
views
Permanently lose hearts when you take damage
I want that if the player takes damage and the player permanently loses that hearts.
import org.bukkit.entity.Player;
import org.bukkit.entity.Entity;
import org.bukkit.event.entity.EntityDamageEvent;
...
0
votes
0
answers
319
views
Minecraft move entity with Spigot 1.20.1
I have the following code:
public void lungeTask(Entity entity) {
this.entity = entity;
Location spawnLoc = getLocAroundCircle(this.player.getLocation(), Double.valueOf(Lunged.getInstance()....