#help-development
1 messages · Page 94 of 1
Ah so you want to turn a string into a key
No
I want to get the key
for v1_15_R1
the photo is code that was originally written in 1.19.1
At
Ah
I guess the api didn’t have that method in 1.15
Why are you using an execute command to teleport a player
Its for clickable text
I see
Could always register a custom command and use that
Anyway if the getKey method didn’t exist then you probably need NMS
Could you even cross dim tp back then
no
but the thing that worlds have always had though is UUID's
it was an easier time when I only supported 1.19
well it is up to you what you want to support
personally I only support latest versions in my plugins
it isn't my problem or concern if people choose to not update that is their choice, but that doesn't mean I have to support their choices in my development process
ik but I made a really cool versioning framework and I want to use it with something
yeah I was thinking about that
wdym
entity#getLocation()?
how can I refresh a make it where a menu refreshes?
idk
How to get if player's feet touching groud if only thing you can get is player's location? (player is not real)its an npc
get location, y-1 and check if its solid
i will ask one more time
how to check armor stand is on ground?
= there's no event
bruh why do think there is an event for that?
not everything has an event
spigot isn't all events
https://www.spigotmc.org/threads/how-to-create-a-custom-world-generator.545616/#post-4359392
Hi, I was following this tutorial on creating a custom world generator and asked how I could create a structure and make it generate?
Can Someone help me
how to add payment on spigotmc?
i want buy resoures on spigotmc but how to add payment in your account?
how?
by clicking the buy button
on me not have buttons
🙏
Look
You need to 18+ to have a paypal account, at least for Australia
😛
owh damn 😦
F
How should I change my maven module java version so I don't get cannot access net.minecraft.world.level.WorldGenLevel (assuming thats the problem)
Which dependency are you using
my code is here https://github.com/KyTDK/NeoUtils
the culprit is this one https://github.com/KyTDK/NeoUtils/blob/master/1_17_R1/pom.xml
https://www.spigotmc.org/threads/how-to-create-a-custom-world-generator.545616/#post-4359392
Hi, I was following this tutorial on creating a custom world generator and asked how I could create a structure and make it generate?
belt
thanks
np, it was really hard using https://google.com for a second and I think I should be compensated
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
i tried most of what i find but they don't work
for this i think i should use the Block Populator?
Hi! I am trying to use spigot instead of spigot-api since it has net minecraft server in it but when i try to do it in maven it shows pom.xml
Could not find artifact org.spigotmc:spigot:pom:1.12.2-R0.1-SNAPSHOT in spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)
I tried to use buildtools but
Exception in thread "main" org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: C:\Users\Remixiak\Downloads\Bukkit```
I register an objective like this after unregister it:
this.objective = scoreboard.registerNewObjective("edi-display", "dummy", ChatColor.GOLD + "EDInfo");
But for some reason, when I list myself all objectives of the scoreboard, it isn't there
you did <Player>.setScoreboard(<Scoreboard>)?
yes
then idk
ScoreboardManager manager = Bukkit.getScoreboardManager();
Scoreboard scoreboard = manager.getNewScoreboard();
Objective o = scoreboard.registerNewObjective("pit", "dummy");
o.setDisplayName(ChatColor.LIGHT_PURPLE.toString() + ChatColor.BOLD + "THE PIT");
o.setDisplaySlot(DisplaySlot.SIDEBAR);
o.getScore(ChatColor.LIGHT_PURPLE.toString()).setScore(7);
o.getScore(ChatColor.WHITE + " XP: " + ChatColor.AQUA + playerData.getXp()).setScore(6);
o.getScore(ChatColor.WHITE + " Gold: " + ChatColor.GOLD + playerData.getCoins()).setScore(5);
o.getScore(ChatColor.AQUA.toString()).setScore(4);
o.getScore(ChatColor.WHITE + " Status: " + ChatColor.RED + "SOON").setScore(3);
o.getScore(ChatColor.WHITE + " Bounty: " + ChatColor.RED + "SOON").setScore(2);
o.getScore(ChatColor.BLACK.toString()).setScore(1);
o.getScore(ChatColor.LIGHT_PURPLE + "example.com").setScore(0);
event.getPlayer().setScoreboard(scoreboard);```
i have it like this
Can have a play mulitple scoreboard?
when i do Bukkit.getOfflinePlayer(UUID), where does it get the info from?
because, i have a plugin for selling regions that stores the owners uuids. the problem is that somehow i messed it up, and now the server doesnt know the name of a lot of uuids (unless they join the server again), and many regions owned by people who have not logged in for a long time have "unknown uuid" as the owner name
but worldguard saves its own cache of uuid -> name keyvalue pairs in profiles.sqlite, so maybe i could use that to fix it, but how? where does the getOfflinePlayer method get the data from? so i can manually set it
what do you mean
Like that a player has multiple scoreboards. Like one plugins sets the scoreboard, but a other one sets it too.
they gonna conflict
So wouldnt It be better to get the players scoreboard?
why cant u make it one plug
I mean just in Case another plugin that runs on the server do something with scoreboards too
Just have a boolean in the config to disable the scoreboard
Alright, say there is Plugin A and Plugin B. How do you load Plugin B if it is shaded inside of Plugin A, and there isn't a physical .jar for Plugin B inside of the plugins folder.
If you check in your server, you should find a players.yml. if not I guess it's saved in the world folder
You can't, shading is meant for libraries, not plugins
How then would I go about properly modulating a plugin if I am only able to have 1 jar in the plugins folder for deployment purposes?
there is no player.yml file in the server root directory
What do you mean? Do you want to create multiple plugins in one java project, or do you want to make modules that you can load directly to your plugin ?
in world folder maybe
Second option, but note that those modules call Spigot methods
there are some <uuid>.dat files inside each world playerdata/ folder
but which one does it uses? im using multiverse
also, those files seem to be just raw binary data or something
There is no way then except creating multiple plugins. Or you can create the spigot interface in your plugin, and create separated jar modules that call your interface?
wait are you using some hashmap that have Player, Data?
umm, i have the players database from worldguard
My bad it's usercache.json
it has all uuids with their names, so
yea, that does exists, and that may be what i want
How would I go about getting my modules to be able to call Spigot methods from the main plugin
why u get OfflinePlayer
im not, its not my plugin
you should find data by UUID not OfflinePlayer
The best way to go would be to reconstruct your userchache.json: when you don't find your OfflinePlayer, fetch its name from an web api and add it to your usercache
but its getting the offline player to get the name
Oh that's not your plugin...
maybe (Player) Bukkit.getOfflinePlayer(UUID)
i dont want to modify the plugin, i want to know how getOfflinePlayer works under the hood, and i assume that it uses that userdata.json file to get the name from an uuid
so, ill try that
thanks
My best advice is to create multiple plugins. But if you want to create modules, then you'll have to create a huge interface that you implement in your main plugin and which take all the spigot calls (for example you'll have to create a sendMessage interface and implement it to call the player sendMessage). Then you get this interface in the module and call it
it returns OfflinePlayer object
Exactly, it reads usercache.json
May be null if the player is not in that json file
ye
what does the expiresOn date mean?
i did (byte)loc.getX(),(byte)loc.getY(),(byte)loc.getZ()
i guess did something wrong
That sounds reasonably painful, the only reason I would want to have everything still run on one plugin is because if I do what you are referencing; if there is ever an update to say the holograms api, I would need to update both the core plugin and the hologram plugin
how can i spawn redstone block break particle in 1.12.2 api?
Player.spawnParticle(Particle.BLOCK_DUST, p.getLocation().add(0.0D, 1.0D, 0.0D), 30, Material.REDSTONE_BLOCK.getData());
^ gives me an error
There is also overhead for every given plugin, and the more plugins that I add to a server the longer it'll take to startup
Not necessarily, APIs are made to be backwards compatible (actually they should). So you won't need to update your plugin for each dependency updates
What error ?
Is there a way to get the current potion duration of the player, as well as the duration of a potion they just drank?
I'm talking about in most scenarios that we would update a framework, we would also update how the core plugin uses that framework and at a larger scale we could be replacing say 10 plugins per server every update
It also makes development on localhosting harder as we would have to manually update all the libraries as our individual localhosts doesn't have the deployment system that the production server has
https://www.spigotmc.org/threads/how-to-create-a-custom-world-generator.545616/#post-4359392
Hi, I was following this tutorial on creating a custom world generator and asked how I could create a structure and make it generate?
how to properly cast double into byte?
(byte)loc.getX(),(byte)loc.getY(),(byte)loc.getZ() is just like few blocks away
Whats your usecase
i want to sent packet to update npc position
A byte only goes so high
it requers byte, so i want to cast double into byte
PacketPlayOutEntity.PacketPlayOutRelEntityMove
And it’s relative to cur position
I think max you cab move is around 20 blocks or so
wait rel means relative
Yep
okay
Caused by: java.lang.IllegalArgumentException: data should be class org.bukkit.material.MaterialData got class java.lang.Class
Gosh spigot being so annoying
Crash plugins are against the rules just cause the troll plugin has one command that kicks the player and prevents him from joining back for 10 seconds, are you kidding? Now I gotta wait another 6 weeks to get this approved
a question i want generate custom structure inside my world generator i tried to do that from post and forum but none gives a result only crash, someone have a simple or some sort of generator with structure built in?
Player#getActivePotionEffects
What is your plugin meant to do actually, and what modules are you thinking of ?
You'll have to create a byte array
Show your code and your errors
i delete it let me try recover it
Right now we are currently a 1 plugin server on all of our gamemodes, and because of this our plugins have gotten extremely large (our SkyBlock has just under 2500 class files). Alot of our gamemodes have very similar frameworks, with examples being our NPC System, Hologram Framework, Redis framework, Mongo framework, etc - so we had wanted to move all of these into an individual module that would be implemented as a dependency on our core plugins. The modules are not meant to have anything gamemode specific as they are on every gamemode, so the modules are just doing the heavy grunt work while the core plugin for the gamemode uses the modules to say create npcs and holograms
sounds like a massive refactor
It is, and it'll be an even bigger one if we also have to remake our deployment system to suit having all of the modules being a different .jar on the server
@agile anvil ^
If you're a server network, then you'll want to work like this:
- having a "core" plugin that as all libraries (mongo, holograms, npc) and bring all the player data
- having a plugin for each gamemode (in your case for instance the Skyblock plugin) that hooks in the core plugin
- may be some other plugins that need to be separated such as AC or idk what
i lost them totaly (anyway a method for spawning them?)
This is the cleanest way to work
You'll have to check the javadoc
There are reasons for it to be modulated;
- The core plugin will end up getting too big which is our current issue anyways
- It allows us to give developers separate modules which will help prevent larger code leaks
- We are able to give more split up documentation per-module (see https://cdn.discordapp.com/attachments/860459080165359617/1013364177219366942/unknown.png)
how can I make a command tab complete on the first argument with all players who have ever joined the server?
where do I open a report on spigot's website?
There is no problem of making a "big" plugin.
To solve your modulation issue, you could simply separate each "modules" and shade them directly into the plugin. If it's not a new plugin, you can use spigot calls.
It will end with a big plugin, but everything would be separated in modules
i cant find anything
what am i doing wrong exactly?
you could simply separate each "modules" and shade them directly into the plugin
How would you achieve this?
Did you check the spawnParticle doc ?
yes
Well, in your build setup you'll have to fetch all your modules, and shade them in one jar file. You'll also have to figure out how to create the JavaPlugin class, and make it available in other plugins (maybe create a boilerplate with just a JavaPlugin class so that the modules can call this class)
57000 results in 0.5s
event.getPlayer().spawnParticle(Particle.BLOCK_DUST, placed.getLocation(), 5, blockInstance.getBlockData());
i think blockdata is not in 1.12.2
as someone told me
Particle.getDataType()?
REDSTONE BLOCK DUST
yes
Player.spawnParticle(Particle.BLOCK_DUST, p.getLocation().add(0.0D, 1.0D, 0.0D), 30, Particle.REDSTONE.getDataType());
so like this?
Maybe
You'll have to try yourself, and find out how to do
Or just update your plugin to last version
tried
Caused by: java.lang.IllegalArgumentException: data should be class org.bukkit.material.MaterialData got class java.lang.Class
points on this line
.
Is there a way to set health for offline player?
Did you cast the getData to materialdata ?
Create a tabexecutor, and for the first argument return the getOfflinePlayers that you filtered with the first few chars (I recommend requiring at least 3 to 4 chars)
Idk maybe
Cannot cast from Class<capture#2-of ?> to MaterialData
Yeah, save somewhere you hvae to change the player health, and when he joins change it
someone know the last version can be usable in worldedit api
What's getDataType return type ?
Check the worldedit page and find the last version name
is 7.3.0 but going to install it do this
Failed to read artifact descriptor for com.sk89q.worldedit:worldedit-bukkit:jar:7.3.0-SNAPSHOT
Unresolved dependency: 'org.spigotmc:spigot-api:jar:1.18-R0.1-SNAPSHOT'
Unresolved dependency: 'co.aikar:acf-paper:jar:0.5.0-SNAPSHOT'
Unresolved dependency: 'com.sk89q.worldedit:worldedit-bukkit:jar:7.3.0-SNAPSHOT'
Unresolved dependency: 'commons-lang:commons-lang:jar:2.6'
Unresolved dependency: 'com.google.guava:guava:jar:31.0.1-jre'
Unresolved dependency: 'com.google.code.gson:gson:jar:2.8.8'
Unresolved dependency: 'net.md-5:bungeecord-chat:jar:1.16-R0.4'
Unresolved dependency: 'org.yaml:snakeyaml:jar:1.28'
Unresolved dependency: 'com.google.guava:failureaccess:jar:1.0.1'
Unresolved dependency: 'com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava'
Unresolved dependency: 'com.google.code.findbugs:jsr305:jar:3.0.2'
Unresolved dependency: 'org.checkerframework:checker-qual:jar:3.12.0'
Unresolved dependency: 'com.google.errorprone:error_prone_annotations:jar:2.7.1'
Unresolved dependency: 'com.google.j2objc:j2objc-annotations:jar:1.3'
Returns the required data type for the particle
how can I use java 17 in my maven module but keep my project at java 8?
eclipse alert
From what class is this method ?
particle class? wdym
Set the source to 8 and target to 17
Oh that's graddle sorry so idk 😂
maven all the way boyz
Bro, I need the one from the material
The last argument
What is the type ?
^
I dont really have any experience with tab completion and the docs relating to it are a bit confusing, would you be able to send me a piece of code for that
Last time I check for you : https://helpch.at/docs/1.12.2/org/bukkit/Material.html#getData--
It's MaterialData
So figure out how to cast a class to MaterialData
I can't now, can't you find some online ?
Player.spawnParticle(Particle.BLOCK_DUST, p.getLocation().add(0.0D, 1.0D, 0.0D), 30, Material.REDSTONE_BLOCK.getData());
so i need to do this?
I've disabled BlockBreak and BlockPlace events on a world but using world edit to break or place is possible, is there a way to stop that?
Hook the WorldEditAPI
ah okay
not working
Read the error
Caused by: java.lang.IllegalArgumentException: data should be class org.bukkit.material.MaterialData got class java.lang.Class
points on this line again
I need help with this
So to confirm, it is not possible to load a dependency, pass through your plugin instance to it, allowing the dependency to call spigot methods?
any idea cannot access net.minecraft.world.level.WorldGenLevel
this? @agile anvil
that means its returning class, not its instance
so you cant cast it
Yes. It's way better to create multiple plugins anyway
;-;
No, when you cast it
¯_(ツ)_/¯
so what
Did you try casting to MaterialData ?
why are you doing Material.REDSTONE_BLOCK.getData() in the first place ?
if you are using this, read what data means
no
why i have to when its already MaterialData
Gotta update
no
1.12 is old enough if you think about it
i tried Particle.REDSTONE.GetDataType()
but it was same error
Helping you with using deprecated methods isn't good advice
Also I see no where #spawnParticle method that overloads with your number of arguments
i might be blind
you have only 4 args
If I call this constructor
public net.minecraft.network.protocol.game.ClientboundSystemChatPacket(net.kyori.adventure.text.Component,java.lang.String,boolean)
With these values
null, {"text":"§cPVP is OFF (example)"}, true
I get java.lang.IllegalArgumentException without any description
That's not Spigot
u sure u get the right constructor?
Yes, I have printed the constructor right before I've invoked it
System.out.println(constructor);
return new Reflection(constructor.newInstance(arguments));
Why are are you using packets for messages?
yap im blind
Action bar
But that is not the question
This has been in the api for ages
You didn't provide the full error nor the full code
Ok I can do that if you want
And you're not using Spigot nor using the existing api
Yes
lol
?whereami
💀
you know you can do pretty much anything with spigot api that paper api can
The issue is the same on Spigot, but then with BaseComponent[]
nah, im also looking at them, just blind
The only thing that differs is the constructor
this?
yap
If you want adventure components use the adventure api
intellij will tell you when you use which
Can I get some help with this compilation error cannot access net.minecraft.world.level.WorldGenLevel
There is no reason for nms packets
its going something to do with java versions I think
No I don't want it. READ THE FRICKING CODE
oh god c# codestyle
There is. How would I else be able to replace placeholders in the action bar after it is sent by another plugin???
not with that attitude
Yes that's 100% true
Done helping you now
So my project is java 1.8 but once it tried to compile the 1.17> modules I get that error which indicates its caused by the java versions. I would say that I would need to compile 1.17> modules with java 16-17 to fix the cannot access net.minecraft.world.level.WorldGenLevel error. Is this a correct assumption and how do I go about doing that?
Ok I will find it out myself
Since you want to make yourself suffer don't drag us in to it
brutal
Main module Java 8
NMS module Java 17
Then shade
Yes I did that but I get an error, please give me a bit to regenerate the error
Seems that I have made a stupid mistake. I was inserting a List in the constructor, not an Object[]. That was everything. If you have looked at my code you might have noticed..... Maybe?
Tackling the first module that throws the error, 1_17_R1, I got this error ```java
invalid target release: 16
Module NeoUtils-1_17_R1 SDK 1.8 is not compatible with the source version 16.
Upgrade Module SDK in project settings to 16 or higher. Open project settings.
I didn't bother with your attitude
You still need a Java 17 jdk
I was asking a clear question, and you were telling me things to do that had nothing to do with the error. That is why I got mad
you come here to spigot using paper api and expect support
Also I doubt Paper would help with that
Its not justified to treat people that way
The issue was an reflection issue
Is there any event I can use for disabling grass spreading?
Compiling with java 17 for my NMS module java <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>17</source> <target>17</target> </configuration> </plugin>
This exact answer is why I got mad. It's my own decision if I use reflection or not, and how I approach the problem. I only asked you if you know a fix for the error
ty
You can always do a suggestion, but you are NOT telling me what I must to do
doesnt matter if problem has to do or doesnt have to do with spigot
btw fyi posting paper only plugins on spigot is not allowed
Reflection is general Java
Lol
That was the fix for the error though
but you use paper api dont you?
why are you mad because of a recommendation
Not using reflection in the first place
skill issue
Yes, because my client uses Paper
spigot plugins work on paper though
Because he told it me in a way he forced me to do something
adventure also works on spigot
@chrome beacon I changed it to java 17 but the error is practically identical, am I missing something crucial? ```java
invalid target release: 17
Module NeoUtils-1_17_R1 SDK 1.8 is not compatible with the source version 17.
Upgrade Module SDK in project settings to 17 or higher. Open project settings.```
gotta shade it
Yes that's true, but if I work with packets I unfortunately have to check their Component classes too
cry about it
Oh do I need one of those little properties things for java 17?
how sensitive kids are now
send them to the ranch
back in my day u would get screamed at brutally for not knowing java 😂
that still happens
having an ego when youre asking for help is straight up pathetic imo
Ok, then if you find it so funny, tell me ANOTHER way on how to solve the problem:
- A plugin is sending an action bar (ANOTHER plugin then my plugin) via the Spigot API
- My plugin intercepts that action bar (by packets) and replaces
(This is what my client requested)
not as severe as a year ago or so
people are like, to code plugisn you msut know every java keyword
one easy way to do it
is just use a custom jar
You don't need to use that packet constructor for that
He told me I cannot edit the plugin, that's the problem
A guide providing more than enough info to nudge aspiring java coders forward, with details about many of java's components, what Java is used for, and more!
lmao
🙂
I am not new sorry
i have 17 years of experience
I found out that that plugin is using this API method (CraftPlayer). If you are knowing everything so good, tell me then what to do without intercepting that packet?
i have 32 years of experience, i learnt java when it released!!!
i know skript
get out
java skript
mmm, you're lucky pal
console.log("plugin started")
You should be intercepting the packet not creating a new instance of it
You don't need a new instance
thats nms lmao
?paste
I create a new instance of the packet, because the packet is a record class. There is no way to edit record fields with the java reflection API. And I knew, that all record fields are present in the constructor
Exactly
i told you a pretty good solution
use MixBukkit
Again use the api to send the modified message
No reason to create that packet
So you say cancel the packet and then send the modified message?
This is my pom for my NMS module, do I need a properties tag or what to define that I am using java 17 https://paste.md-5.net/ponisuxadi.xml
tbh nowadays u barely need to use nms
there are a lot of libraries and stuff that abstract it
Yeah
yeah but I don't really want to be using a library in my library, other than shit that would take me a lifetime to code
like commons, obviously
what are you trying to do?
And does not even know about Java version...
alright so, I got 1.8-1.19 nms modules but I get an error in my 1.17> modules saying cannot access net.minecraft.whatever. I deduced its a java version related problem so I figured I need to define my parent module to be 1.8 and all 1.17 and up NMS modules to be java 17.
My current pom gets me the following error
invalid target release: 17
Module NeoUtils-1_17_R1 SDK 1.8 is not compatible with the source version 17.
Upgrade Module SDK in project settings to 17 or higher. Open project settings.```
I've been basing a lot of my structure off other libraries, however, I still get this error
Just wondering where I should go from here to not f everything up
Is this the same project you added me to yesterday?
Alright could you send the poms
so much nms 
use this to send links without embeds:
<google.com>
thanks, I'll use that next time
I also want to make it clear that I only just learnt the principles of SOLID yesterday and I have been coding without knowing them for about 4 years
so if anything looks a bit funky, thats most likely why
you're done
Hello, I have this code with new Runnable() and I am trying to make respawn counter for five seconds. But if I will kill my self and then respawn, it don't run timer, and make nothing what in it. It make everything, what is out of run(), but it not run what is inside of run(). Can someone help me with it? Here is code: https://pastebin.com/R6vZRcgj
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
ouch that code isn
't going to work very well
You need a timer per player
Also hardcoding those items like that isn't ideal
oh so make loop for Player p : Bukkit getOnlinePlayers?
no
The timer int would be better off being stored in the runnable
Because right now every player shares the same timer int
that will cause issues
oh ok thanks
Also the run method will only be triggered once
You probably want a repeating task instead
?scheduling
☕ A coffee an hour keeps the bugs away.
ok I will look on it
Oh shoot I forgot to push my code, alright if you look now you should see my current poms, sorry about that
main concern is this one https://github.com/KyTDK/NeoUtils/blob/master/1_17_R1/pom.xml
whats the problem
this
i dont see why there would be a version issue
i cant really even look cause i dont have all the nms versions lol
I built every Spigot version 1.8 - 1.19.2
i reiterate my previous comment 😝
only true mega chads have every nms version
You never know when it's needed
how big is your .m2?
🤷♂️
use illegal codemc repo 
2.8G is the size of my .m2
smol
damn
thats like one node project
I need to step up my game
fucking Microsoft truncates my name 
although i found a way around it - dont sign in with microsoft when you are setting up your pc and it will use the full name you give it. then just sign in when you are into windows
microsoft is so good...
.wurst 👀
naughty naughty naughty
ugh i really dont want to finish this paper lol
im at 3000 words and i need to get to 5k
I was testing my anticheat honestly
anyone #1012313792488681492
Your computer is bad that's the issue
If it works in a vm you might just do a 1-2 hour trip to reinstall Windows and revocer all your files from an external drive at this point💀
bruh
wtf???
I do that about once every 1 or 2 years anyway
It's legit super easy
how
Do you have a usb-stick > 8 GB?
no
You can reinstall windows without removing personal files
how will reinstalling windows fix anything eitherway?
depends
Because everything will be installed from scratch? So any bugs or corrupted files are gone
I once broke my computer so bad that I couldn't actually reset it
or run the restore command
it was fucked
i dont have a usb stick thats over 8gb
Order one from amazon. it's like 4€ lol
lol very specific
nah you need 8+😅
for it to take around 4 months to deliver?
and there aren't any tech shops?
then you just need something to store your files on
But not async chunk loading.
just write down all the binary on paper and then re-enter it afterwards
Do you have 2 or more hdds/ssds/m2s?
I think it's the computer just can't keep up with MC anymore
no
or an external drive?
i get 200 to 300 fps
i dont think its the computer's fault
specs?
and plus
it worked once when i did some certain jvm args
but then it randomly stopped
I mean you could try another jdk
i tried that
I told you 2Hex, those free asian dating ads aren't real
wtf
jokes
Did you try removing all other jdks? And setting your environment variables yourself?
Like manually instead of installer
try it manually with azul zulu jdk
didn't you have microsoft?
Can you download it from azul directly then? And just try to remove all jdks and install that one manually? Maybe your multiple installers messed something up
i dont have azulu zulu but i could swear i installed it
that's why you don't use the msi xD
Well time to uninstall all java versions
You could. I just dunno how to change it in mc
So I would want to be sure it's actually using the right one
Because I also had a scuffed jdk before and I couldn't compile something that usually takes a minute to compile in 30 min and my cpu was at 100% constantly
no don't use the installer
mc uses its own jre anyways unless u tell it not to
download zipped version
ok i have it then
Alright. Now go to C:/Program Files
and rename Java (so it won't find it anymore). Just do Java_Old or whatever
Close all java apps beforehand obviously
okay
Create a new Java folder
done
move in the content of the zip. So there's Java/<whatever name>/bin conf demo etc
you will need whatever name for the environment variables. I usually just go with jdk-17
Google for zulu jdk and you should already land on the right page
and jdk also contains a jre
alright
alr
and ill have to change my environment variables tbh
since theyre messed up now
after changing shit
Now open you environment variable dialog
Ye we gonna do that now
You have a JAVA_HOME variable?
yes
good point it to the Java/whatever name folder
C:\Program Files\Java\jdk-17 in my case
dang wrong slash xD
aight fixed it
alright
next click edit on your variable named Path
should all be under system unless you installed java for only one user or whatever
okay
Are there any lines that point to JAVA_HOME or previous jdks/jres in that Path?
%JAVA_HOME%\bin;
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;%JAVA_HOME%\bin;C:\Users\pcc\Downloads\gradle-6.9.1-bin\gradle-6.9.1\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin
is this good
Don't think you need them but now you have them backed up anyway.
so you deleted all of those?
I would remove the oracle one aswell
since it's another jdk or jre
besides that keep the rest
then open cmd (or powershell) and run java -version
okay
Does anyone perchance know what eclipse or intelliJ uses to resolve the dependencies of a maven project?
Did it work? Does it show zulu?
I don't quite get the question. It uses the pom file and the maven repo.
What internals it uses
Correctly trying to write a maven plugin that adds a dependency to the maven project
While the maven-compiler-plugin recieves the dependency, eclipse and IntelliJ do not
I see. But idk sorry :/
yes
Alright then try minecraft again. Either tell it to use that jdk or set it to whatever the default setting was
alright
Okay I guess I'll have to be like SpecialSourceMP and publish the artifact to the local repo there. Could've been worse
How does it not work?
hellos. i've saved locations into the config using:
plugin.getConfig().set("RegisteredBlocks." + plugin.getConfig().getConfigurationSection("RegisteredBlocks").getKeys(false).size(), block.getLocation());```
now i want to check whether said block has already been registered every time this registerblock command is executed. any idea on how i could do that?
data file looks like
```yaml
RegisteredBlocks:
'0':
==: org.bukkit.Location
world: world
x: -12.0
y: 73.0
z: -30.0
pitch: 0.0
yaw: 0.0
there will be multiple locations btw, so '0', '1' blah blah
BuildTools not working on --rev=1.12.2 and in pom.xml package spigot instead of spigot-api is not working
What is the error when running BT?
works fine if you use teh correct java
And if you are running BT in the correct folder
this is error
it worked for latest version
Tested and ran fine ```Success! Everything completed successfully. Copying final .jar files now.
Copying craftbukkit-1.12.2-R0.1-SNAPSHOT.jar to P:\BuildTools\BuildTools..\craf
tbukkit-1.12.2.jar
- Saved as ..\craftbukkit-1.12.2.jar
Copying spigot-1.12.2-R0.1-SNAPSHOT.jar to P:\BuildTools\BuildTools..\spigot-1.
12.2.jar - Saved as ..\spigot-1.12.2.jar```
mission success or nah?
idk if it cna be fixed at all at this point
well. I would clean reinstall windows at this point. But you would need an external drive (or usb-stick if storage is sufficient) and another usb stick to install windows with
Worth it for minecraft🙂
You don't need to wipe everything to reinstall windows
I really suggest doing that tho
I still think the PC just can't handle the new MC features. If it was truly a PC problem why would old versions work fine
I know you don't but that's the only way to really get a clean state. Otherwise you will keep rubbish on your drive
Other versions work fine right?
The java version
I thought you had issues with 1.17
can u send me on dms?
just build it with jav 8 or 11
What message
that i am using wrong java version
How much ram does your computer have?
if you have multiple java versions you have to specify a full path
I use ```bat
@echo off
mkdir BuildTools
cd BuildTools
SET JAVA_CURRENT="C:\Program Files\Eclipse Adoptium\jdk-17.0.1.12-hotspot\bin\java.exe"
SET JAVA_8="C:\Program Files\AdoptOpenJDK\jdk-8.0.252.09-hotspot\bin\java.exe"
SET BUILDTOOLS_URL="https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
curl -z BuildTools.jar -o BuildTools.jar %BUILDTOOLS_URL%
SET /p Input=Enter the version: || set Input=latest
for /f "tokens=1,2,3 delims=." %%a in ("%input%") do set major=%%a& set minor=%%b& set revision=%%c
IF "%major%"=="latest" (
SET cmd=%JAVA_CURRENT%
GOTO execute
)
IF "%major%"=="1" (
IF %minor% GEQ 17 SET cmd=%JAVA_CURRENT%
IF %minor% LEQ 16 SET cmd=%JAVA_8%
)
:execute
%cmd% -jar BuildTools.jar --generate-source --generate-docs --remapped --output-dir .. --rev %Input%
cd ..
pause
:: --generate-source --generate-docs --remapped```
i tried allocating 4gb and it still did nothing
8
Does f3 show anything sus?
not really
i did java -version and it was jdk 8
but ill try
what about alt+f3
sorry for double asking but does anyone have a good way to pull this off?
could you point me in the right direction? any links on how to do so?
or cache per chunk type deal
For my client-sided blocks system I did a chunk system and used chunksection hashes to fetch blocks per chunk n all
Cache just means load the data to memory for quick access
Depends how you want to structure it
Like illusion said, a per chunk cache would probably be most efficient
i need help with the nms api (minecraft 1.19)
Useful info:
PacketPlayOutPlayerInfo.EnumPlayerInfoAction.a is the obfuscated version of PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER
PacketPlayOutPlayerInfo.EnumPlayerInfoAction.e is the obfuscated version of PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER
its quite simple but i cant find any resources online:
Im making an npc by sending java connection.a(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.a, fakePlayer.getHandle())); (along with a couple others) to all nearby clients, then im trying to use the packet PacketPlayOutPlayerInfo.EnumPlayerInfoAction.e to remove the npc from the tablist without despawning it
The issue: After I call the packet to remove the npc, the skin of the npc gets removed, whats the actual way of removing an npc/player from the tablist?
im not trying to destroy the entity tho
im trying to remove the npc from the tablist
add player and remove player should do the job
it does work but as i said in the original post, it removes the skin of it as well
private static void showAll(Npc npc) {
ClientboundPlayerInfoPacket playerInfoAdd = new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, npc);
ClientboundAddPlayerPacket playerSpawn = new ClientboundAddPlayerPacket(npc);
ClientboundRotateHeadPacket headRotation = new ClientboundRotateHeadPacket(npc, (byte) Math.floor(npc.getYHeadRot() * 256f / 360f));
ClientboundPlayerInfoPacket playerInfoRemove = new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.REMOVE_PLAYER, npc);
// For Entities (packet based) require this packet for skins.
//ClientboundSetEntityDataPacket entityData = new ClientboundSetEntityDataPacket(npc.getId(), npc.getEntityData(), true);
for (Player player : Bukkit.getOnlinePlayers()) {
ServerGamePacketListenerImpl connection = ((ServerPlayer) NMSUtils.getServerPlayer(player)).connection;
connection.send(playerInfoAdd); // Inform client this Entity exists.
connection.send(playerSpawn); // Spawn this entity on the client.
//connection.send(entityData); // EntityData (Packet based Entity) to show skins.
connection.send(headRotation);
connection.send(playerInfoRemove); // Remove from servers tab list
}
}```
spam but
thats spawning a fake player and removing from tab list
wtf
at least it did last I tested on 1.19.1
im using 1.19.2
the thing is, im on 1.19.2 and when i insert the connection.a(..... for remove_player, the skins stop working
I can't test at the moment
what does that do
ill send u screenshots of both f3 and alt f3 later
any idea why
your dad went to get milk?
!verify
Usage: !verify <forums username>
but, I have one project, opened it after some time
I can't verify because my other account was verified and it got deleted
and they won't unverify me
y it got deleted
and there are dependency errors with spigot, that it was not found, but it worked before
I have no idea, they deactivated it and then removed
using spigot instead of spigot-api?
discord sent me email saying some bullcrap but it had nothing to do with it
so u can use nms
yep, but I have downloaded both build tools
added spigot jar to ur project?
no, I don't think so, didn't have to do it beofre
Hello everyone, its been a while that i've been combining resourcepack, but anyways IDK why it doesnt work can anybody help me about how I can merge/combine this 2 resourcepack?
I think it was mfnalex that made a program to mrege packs
Just write a generic merge method. Shouldnt be too hard.
oh wow
Unless... oh yeah you need to also merge the json files...
Gson can merge JsonTrees so this should also be possible.
OHHHH THANK YOU SO MUCH ALL ❤️
I love you 😍
at io.github.moterius.WaterColor.Commands.CommandTest.onCommand(CommandTest.java:35) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.19.2-R0.1-SNAPSHOT.jar:?]
... 23 more```
how to use remapped again
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
is there a setting for the entity view distance server-side?
You mean for the entities to detect a player?
no, I mean visually rendering an entity client-side
I have it tuned up to 500% on my client but it feels very short
Oh. Thats just the entity tracking distance.
is it?
what the
which command to use to give someone essentials kit
if you're using nms mobs I'd recommend overriding the isSunSensitive boolean
👀
EntityCombustEvent
I will once these bad boys start navigating
yessir
fastttttttttttttttttttttttttt
fasttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
fuck
no one ever ever help me in this server
sedboi
there’s something very strange in one of my config files. Basically I have plugin which you’re able to create custom foods and then everything is handled through config but I don’t know why when you add one more new food without the plugin GUI it doesn’t detect the food
This is the channel for development related questions you clown...
i know
1 - we won't google for you
2 - yelling fastttttttttttttttttttttt doesn't make us think about helping you faster
i googled pls
We aren't paid to be your babysitter
but will yelling fastttttttttttt make my A* algorithm run faster? Let's find out!
this will fix it
Then why do you spawn non-development related questions and expect an answer?
You are the kind of kid that asks his history teacher when you are starting to learn about multiplication.
i just want 1 answer man
7smile what happened to your profile picture, did you stop touching grass?
well then ask in #help-server and wait
be patient
Then ask in the appropriate channel
I got access to DallE 2 and this is one of the first images i generated.
fancy
fuck off kid this is for dev
gaming
I don't know whether to laugh or cry at all these questions
how can i hack hypixel? i have my cmd already open
magma you should make bloons TD but with actual monkes throwing darts
?paste
Which spigot version are you using and are you using a proxy (like bungeecord)
they're all burning :(
man how is it everyone knows bloons but they don't know line tower wars
I need to fix that
bloons is popular
but did y'all play pokemon td
on newgrounds
that's the real question
Oh you are making a TD minigame. Noice.
alright placement pathing and stuff is working, time to play around with the navigation, wish me luck
does someone know why the plugin will not detect the new config section when the section have been created through text editor?
sure
reloaded it?
can anyone tell me why this code makes it so it cant save the chunk
https://paste.md-5.net/iwuvokasex.cs
yes
i am using bungee cord and using 1.8.8 spigot
LMAO look at this kid
But when I add another one with the plugin GUI the other manually added through text editor gets deleted
suck it
??
?1.8
Too old! (Click the link to get the exact time)
this issue started happening on 1.19
Then update. 1.8 is ancient and support for that version was dropped years ago. Nobody plays it anyways.
only network that I allow to run 1.8 (well 1.7 modified) is hypixel
bro this happens in 1.16.5
and that's because their codebase is hella ancient
cuz the plugin has a interanlly saved version of that file, which overwrites the manually made one
bro its 1.16.5
although they're hiring resource pack devs so they might be working on new stuff?
stfu mf
now what to do
do i need to modify 1.8 to be here legally using it?
what should i do
you must be a network that is so big, that you can't ever update because it takes longer to update than for mojang to release new versions
But as far as I know this didn’t happen on the older version e.g 1.16,1.17
shrug
You must have a group of experienced devs that can deal with any issues that arise
but i like 1.8 pvp
Do you? That's a weird interest but to each their own
oh god choco is typing
minemen.club
not what i meant
I too enjoy auto clickers
don't judge a mans kinks 👀
play minemen.club anti auto click
set your autoclicker to 1.9's values
How can I get information about a potion the player is drinking?
drinking? Or has drank?
Has drank
Are you getting paid by them or something
PlayerItemConsumeEvent -> PotionMeta
PlayerItemConsumeEvent iirc, then you can get the item, check if it's a potion, get its meta, cast as PotionMeta
ye
we answer questions that are worth answering
or stuff that we know how to answer
like
check pins
point, this is a bit niche
I never messed with nms biomes so I'm not gonna clown myself
.
accompanied by this error [15:53:59] [Server thread/ERROR]: Unknown registry element in ResourceKey[minecraft:root / minecraft:worldgen/biome]:Direct{net.minecraft.world.level.biome.BiomeBase@1e146473} [15:53:59] [Server thread/ERROR]: Failed to save chunk -5,4 and a stacktrace to some nms methods
Is the biome in the registry
i... dont think so?
Put it in the registry
Probably not because those registries get frozen after the registration period. It's non-writable
anyone got a project I can copy from where you used gradle to add a version of the spigot api with mappings? the only way I've gotten that to work is through maven
Biome one does not get frozen
What did I do wrong here?
@EventHandler
public void onPotionDrink(PlayerItemConsumeEvent event) {
if (event.getItem() == Material.POTION){
}
}
Uhh paper
The biome registry is one of the fancy dynamic ones
hm
ItemStack != Material
There's paperweight but no official spigot method
Because datapacks can register biomes
would it help to load the plugin pre world gen and manipulate the registry on world load?
Dude I just wish my messages would fucking send lol
im assuming the registry is some part of the world data
No
If you want to go the paper route, my build.gradle looks like this:
https://paste.md-5.net/fagarukiqo.cs
https://paste.md-5.net/obequbovah.bash
you get access to the paper api and all
just don't use paper stuff
and you should be fine
but hey you can locally test directly in your ide and all
How long until someone makes a gradle plugin that yells at you for using paper api methods
XD
so the trick is because paper uses spigot's mappings if you use paper you inherit that basically right
it provides some nice stuff
ye
well mojang's mappings but you get what I mean
Mhm
it's a neat trick...
You do have to deal with being yelled at about deprecation a ton though
r u serious tho
I'm guessing doing this but not using any of the actual paper methods would make it spigot compatible?
man it's tempting
Why is new Runnable() dark? Is it wrong?
No
you can use a lamdba, its simply a suggestion
ok
just do what intellij tells u to
can you send me a documentation to that? I dont really understand how ItemStack is supposed to be used
Yes
?jd-s
though hold on if I do that how do I deal with mappings changing from version to version?
MojMap doesn’t really change
Revenge ping
For pinging for something that don't make sense @grim ice here double
What I mean is that an ItemStack will never equal a Material. But every ItemStack has a Material. You can get it with getType(). Your check can become
if (event.getItem().getType() == Material.POTION)
Cuz music goes bye bye in 1 min
But does ur video have epic music?
Can I remove onDisable if I don't use it
yes
this is true to almost everything that overrides other methods, unless youre implementing an interface
make an abstract adapter for the last case 
Hi 🙂 ,
I'm having a problem creating my API, I'm using the ServicesManager as Vault does, but it's not registering me to the service apparently, in my plugin it tells me it's registered but when I get the active services in another plugin it's not active, I don't know what I'm doing wrong. I depend on my plugin too.
My plugin: https://hastebin.com/liposewaki.kotlin
My class in my plugin: https://hastebin.com/orujumaxom.java
Other plugin: https://hastebin.com/kopuwobizu.kotlin
Api: https://hastebin.com/icecasawix.java
I am implementing my api dependencies in each plugin and I am not relocating any package.
Loader? so not Spigot?
loader is an interface that I created, it is not relevant
Its very relevant as we have no way of telling if ANY of your code is actually executed
do you see the System.out.println("Service: " + provider.getService()); message?
Everything is executed...
obvyous
read the message I posted above
ok I don;t work well with attitude. Good luck in finding help
sorry if you felt attacked, it was not my intention, I just want to tell you that everything is running, everything works, but in my plugin the service is registered but in the other plugin when I get the active services the Collection appears empty :l
in what order do said plugins load?
cause I mean, if latter registers, but former tries to consume it you have the order in the wrong way
My plugin registers the service before the other plugin starts up, is that what you mean?
log
[16:39:29 INFO]: [SimpleBlockRegen] Enabling SimpleBlockRegen v0.2.0-SNAPSHOT
[16:39:29 INFO]: [SimpleBlockRegen] [STDOUT] Service: interface net.shibacraft.simpleblockregen.api.TestClazzImpl
[16:39:29 INFO]: [SimpleBlockRegen] [STDOUT] Version: 0.2.0```
```yaml
[16:39:31 INFO]: [SimpleDropInventory] Enabling SimpleDropInventory v0.0.9-SNAPSHOT
[16:39:31 INFO]: [SimpleDropInventory] [STDOUT] Null
[16:39:31 ERROR]: Error occurred while enabling SimpleDropInventory v0.0.9-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "net.shibacraft.simpleblockregen.api.TestClazzImpl.getVersion()" because "test" is null```
yes
lets make it this way
your plugin that depends on said api, let it load after the plugin that provides the api
yes
This code in your second plugin runs at instancing, before your load() method is run in your main plugin. Your this.testClazz is set before anything is registered ```java
public MainModule(SimpleDropInventory plugin){
this.plugin = plugin;
this.testClazz = getProvider(TestClazzImpl.class);
}```
oh yeah that too btw
Can I ask you a question?
ask away
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
@EventHandler
public void OnDamage(EntityDamageByEntityEvent event) {
Player player = (Player) event.getDamager();
if (event.getDamager() instanceof Player) {
if (player.getInventory().getItemInMainHand() == ItemManager.TNTSword) {
player.getWorld().createExplosion(event.getEntity().getLocation(), 1.5f);
}
}
}
why does this not work
How do I apply the NPC's skin layer? I've been doing it for 7 hours.. :((
But the load() method of my main plugin loads before that instance of the other plugin doesn't it?
the constructor runs as soon as you instance the class. I have no idea what your Loader does, which is why it's relevant.

