#help-development
1 messages · Page 1046 of 1
crumbs
what did i do
whys nothing highlighted
:'(
schedule it like a tick later
idk
that's not a development problem
server then?
(i'm really bad at explaining things, so forgive me) but could anyone possibly help me fix/update a few things? I have a command I use to protect spawn from mobs using command blocks, /teleport @e[type=!#cube_vanilla:spawn_safe,distance=..200] ~ ~-66 ~, and it's no longer working. Not sure what I have to update to get it to start working again.
lol
thank you
?notworking maybe?
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
like does it do nothing
have you actually added the tag
to those entities
yes, i would send the picture but i cant
do you want them to teleport downward
from their location
surely just kill them?
how are you adding this tag?
i sent you it over pm
because there is a difference between a type tag and a normal entity tag
ah
don't use
!#
that references a type tag
im fairly sure
how should I use it then?
/kill @e[type=!<whatever>,distance=..200]
surely this would work?
not too sure about how datapacks work, but if that doesnt work, try this:
well, I teleport them because if it kills them, it'll drop the mob items on the ground, don't want that
/kill @e[tag=!<whatever>,distance=..200]
ok
/execute at @e[type=!<whatever>,distance=..200] run data merge entity @s {DeathLootTable:"minecraft:empty"}
/kill @e[type=!<whatever>,distance=..200]
those 2 one after the other
I don't think that removes all possible drops. like equipment they might be wearing which isn't part of the loot table
how would I add that into a function?
/data merge entity @e[type=!<whatever>,distance..200] {ArmorItems:[{},{},{},{}],HandItems:[{},{}]}
also missing the new body item. idk if mobs can spawn with that
the what
the new equipment slot for the body that isn't an armor slot or a hand slot
I'm lost lol
did you figure out why teleport isn't working?
is it some other plugin overriding that command or smth?
cause teleporting them below the world is the best way to make sure there aren't any drops
still teleports me below ground
show me the command
oh wait, you are just going down 66 blocks?
that isn't enough to go below the world
depends where you put the command block
the world is way bigger now
the spawn is probably 66 above the void
just do like -4000
no point, idk what the actual problem is
like why do you want to prevent mobs there
and what server
type
etc
do you have plugins or what
I put the command block under the void anyways. (it's a private server) but vanilla
like 2-3
I'm doing away with votifier (used to do like awards and stuff my friends could trade with at spawn) but we're just gonna change it to a different item.
I have DiscordSRV, and a keep inventory toggle.
that's not vanilla
We've always wanted to go public, but we don't have anyone smart enough for that lol
semi-vanilla
Paper-spigot yea
just install worldguard
ew
...?
why is that
what's even wrong with that lol
just create a spawn region and disallow mob spawns
I don't like plugins because they take forever to update
there is no point in rewriting the wheel
most plugins that are that big would probably have dev builds
If it's just singleplayer, honestly just place torches lol
or light blocks even
if its just a few players
and you probably shouldnt be running 1.21 on prod yet anyway
I finally can, because all my server software is my own now lol
I gave up with random spigotp lugins
No support and no updates 😅
I don't have many additional stuff on my server that's like game changing... so like, I don't see why not to update lol
never trust anyone in a person
if worldguard updates like you say, I guess I could give it a try again
I wouldn't know how to set it up tho
You need worldedit too
yeah that ^^
is it even updated to 1.21? lol
yes, lol
If you're willing to install both of those, I'll walk you through the commands
yep, working on it now.
Someone PLEASE fix my Selling for my ./shop setup with EconomyShopGUI pleasE!
I'll pay you $10
i have an intense survival w my boys n its not working!
and if you add me a ./ah extra $5
i beg
real
dm me fam
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
No thanks
man those take too long
welp
I'd rather not work on fixing prebuilt plugins
Not exactly a unique server if you rely on it, just use the money to hire a dev or something
takes 90% of the time just to figure out what needs to be fixed
its my boys
just let them know its broken
I'm also sure there are plenty alternatives
my developer is just offline rn
well, good luck then
You have a dev for a priv server?
Anyone know an easy way to get a Material by it's ID? Or is that deprecated
ids dont exist anymore
Or better, a way to store an array of materials in a PDC
More to the point
lol
yeah lmao
string list
its a fun ass server
is that a default one
just want my shop to work so they can sell shit
yeah
LIST.string() iirc
I can't imagine there to be only a single shop plugin
its a good plugin
must be nice to have a dev for a private server lol
i just feel like essentials or something is overwriting its commands
I just have to ask around until I get help xD
nah bro
i had to finish this server asap i had no patience
and im not really experienced with mc plguins n shit
There's only one way to get experienced
prayers sent your way
stop teasing me man 🤣
Well if there's one thing you'll learn here, it's that people do not like to spoon feed you / hold your hand... they'll give you the pieces you may need but you gotta put them together
i used to spoonfeed but
i gave up after too many stupid questions
im just a people pleaser
fair enough
fam you guys take life too serious
people ask me for shit all the time n i help im a businessman ive been belssed with a good life i reciprocate idk if i spelt that right lmao
i paid my dev $300 just for importing some mods & plugins & having them work, its just unfortunate hes in a diff timezone so i can only hit him up in the morning for bugs n shit
i thought instead i should text a server see if i can get instant help
on my life
so you wanna help me now 😉
cmon man $15 to overwrite my economyshopgui over essentials & simply add auctionhouse
usually people work an hr to make $15, this sohuld take u 3 mins
Cool story bro, I ain't reading allat
I'm assuming that you want plugin development, if so, I know a guy who can help, he's really good and fast, but charges a pretty penny
cool, send him i need him now
the $300 was 2 days of work, this is 3 minutes.
Tf u mean? Shits a W for the guy receiving money
unldenis is his name, might be a language gap and timezone gap, he's a friend of mine but he's really nice!
Tho quite pricey it's worth it
and u too brother
yes coll cause im new to minecraft dev, i had to be picky of what i wanted in my server
but everything added very nicely
I mean plugins are generally designed to play nicely
but i was just config'ing essentials & shop prices, and it fucked with selling i think
it just says no items found which can be sold
If he doesn't respond within a week, he's busy with school, so don't spam @, just wait, he will see ur msg
That man is worth alot more than @opaque kestrel !
"i need a dev now" so you give him a dev that may or may not respond within a week 
Well, now is subjective
He's the best in the market tho
is he really
Your goddamn right
github?
uses maven, opinion invalid
Don't you say that shit, you do NOT know him! He's amazing!
I will die for that man!
neon ty ill keep him for future use
if i pay him for anything, ill give you a commission brother
Nah it's all him
No way you think fixing someone elses code + additions takes 3 mins... unless it's a 10 line class that's not real
Help me fix my hello world test project please!
ok ill pay $0.5 per pminute
You're not getting the point
man if u can help, js text me. Ill treat u right
No one wants to go through someone else's project, it's tedious and frustrating, not only that but it's a task that takes more thought than most consider 15$ to be worth
yeah it really is.
Idk what they actually want
essentials is just overwritign my shop
idk shit about configs lmao
we js wanted a minecraft server so i paid to have one made to my desires
usually when theres bugs like this my dev jus gets it fixed in minutes, so i would assume this is something easy.
If its not ofc ill pay you your worth
it doesnt even matter to me anymore atp ill js wait til tmr
public void onPlayerDeath(PlayerDeathEvent event) {
Player player = event.getEntity();
for (ItemStack item : player.getInventory().getContents()) {
if (!ItemGenerator.isItem(item, this, "§6§lAtlas Totem")) continue;
int uses = totemUses.getOrDefault(player.getName(), 0) + 1;
if (uses <= 10) {
event.setCancelled(true);
player.spawnParticle(Particle.TOTEM, player.getLocation(), 1);
player.sendMessage("§cYou died, your Totem only has §7'" + (10 - uses) + "'§c uses left!");
totemUses.put(player.getName(), uses);
} else {
item.setAmount(0);
totemUses.remove(player.getName());
}
break;
}
}
}
does anybody know how to make this so when they die at all by player or mob it will pop the totem?
doesnt that already do that?
add debug messages
Thare is none
So add some
Ik it's not, he asked about this earlier (using paper kek)
anyone know why this is saying Material.SOME_RANDOM_BLOCK isn't an item
do i really have to filter it for items only
Probably
sigh
Whats the difference between org.bukkit.Tag and com.destroystokyo.paper.MaterialSetTag
same enum i swear
the difference is spigot and paper
is there a preferred one
been as were in spigot were probably gonna say spigot
Their MaterialSetTags aren't real tags backed by the server. They're hard-coded Paper-defined tags, not present in a registry
Yes, looks fine
that interface is not valid for implementation
as pretty much all interfaces are in the API except for a specific few which are explicitly documented as valid for implementation
ava.lang.IllegalArgumentException: Unknown recipe stack instance me.vlink102.vlands.veinminer.VeinMiner$1@7b795bc3
not even sure what that meant
i think it would work, just need to supply valid itemstacks
not too sure about the clone one though
no documentation available
this seems to work without errors
ill test it
[01:44:55] [Server thread/INFO]: [VeinMiner] [STDOUT] Registered recipe: org.bukkit.inventory.ShapedRecipe@153f02ac
[01:44:55] [Server thread/INFO]: [VeinMiner] [STDOUT] Registered recipe: org.bukkit.inventory.ShapedRecipe@77edacad
yippee
!
Pretty sure it still won’t work
But does the check actually work
lol no i just tried it with a normal pickaxe
and it works too
not what i want
very sad and now idk what to do
I literally said you can't implement it
PrepareItemCraftEvent
any way to modify that?
Although it might now? I think the switch to components allowed ingredients with specific tags
There’s an event for it iirc
You’d have to listen for that and then mess with the inventory
Probably a tick later
Can i have help with this
@EventHandler
public void onPlayerDeath(PlayerDeathEvent event) {
Player player = event.getEntity();
for (ItemStack item : player.getInventory().getContents()) {
if (!ItemGenerator.isItem(item, this, "§6§lAtlas Totem")) continue;
int uses = totemUses.getOrDefault(player.getName(), 0) + 1;
if (uses <= 10) {
event.setCancelled(true);
player.spawnParticle(Particle.TOTEM, player.getLocation(), 1);
player.sendMessage("§cYou died, your Totem only has §7'" + (10 - uses) + "'§c uses left!");
totemUses.put(player.getName(), uses);
} else {
item.setAmount(0);
totemUses.remove(player.getName());
}
break;
}
}
}
Wen i get killed i lose my totem idk how to fix it
It's not gonna help just posting the same thing over & over when people already told you how to debug it
It’s still gonna drop regarless
None of your code is preventing it dropping
add print statements lol
yea
drop? or lose
like the animation
i'd suggest instead of playerdeath
use EntityDamageByEntityEvent
or EntityDamageEvent
check if its a player
check if the damage is >= the health of the player
and you can figure out the rest
yeah i wasnt sure either
idk if they can 🥲
thats most likely the way to go
also help why is my recipe only accepting 1 item
Not on spigot
i need it to accept a stack of each
They aren’t using the spigot api
Recipes aren’t designed for that
i see
They don’t handle stacked ingredients
Also this should probs be pdc
well
enlighten me
where do i look because my google searches are so specific theyre ending up with no results found
best i could find
i'll give their code a try
is there some bukkit or spigot api to get BlockFace off a vector
\kk th
more info?
what's the vector
what's the actual goal
Vector direction
vector direction to blockface
each blockface enum has a direction vector associated with it and i need the nearest blockface associated with the enum and i was wondering if there is already an api for that or if i have to loop thru all block faces and compare my direction vector to the enums
just get the location of the blockfaces and do some simple pythag
its gonna be at .5
the center of the face
I still don't understand your question
Like what's the end goal here
What is "compare my direction vector to the enums"
There is no specific end goal
The end goal is to get the nearest blockface associated with the direction vector i input
?paste
i knew
it
hold on
i couldnt find that site
for th elife of me
The last snippet of code is where the issue is
I'm logging it in client response in .getData(), and it returns the Array just fine
but as soon as it runs inside that last code snippet, it doesn't return?
I can even log bans
and the data hashmap shows
As soon as i type it as ArrayList<Ban> or it's shorthand BanList it stops returning
only if i do .toString() will it work
Can I use spigot buildtools in a paper plugin
or how can i access nms if I'm using paper
If you're set on using Paper, you should ask them for support. Their build system is totally different from Spigot's and we do not maintain Paper
We can't guess how it works for you. The people maintaining it can answer you directly
ill dm you it since the last time i tried to help someone they deleted it
Sorry to gravedig your message, did you ever figure this out? having the same issue rn
update intellij @simple frigate
Nah i just ran it through buildtools
My buildtools jar was gone because i did a funny
how would i go about querying developing a plugin
What 😭
is there a way to cancel button clicking, block breaking and attacking all at once?
or do I actually need to listen to all of those events
Listen to all of those events.
.
so its yes to this then
I'm actually so done, found out that you can't do the normal custom recipe stuff without nms if i want shaped recipes with stacked ingredients
anyone got a good api
excuse me thanks you
np
:(
me first
:p
I have a headstart
I've already run into about 5 walls
Good luck
Hi, I am new to making plugins. I trying for barrier blocks to be minable, but not instant. I want the player to try and "mine" the block for x ticks and break it after that. But it seem that any event I can find only triggers once at the start. There is no easy way to detect for me the players continuously trying to mine it.
All way I can think of or saw were rude-goldberg complicated for something that is a very easy ask (is-player-holding-left-click-on-this-block?). Like storing who clicked what block when and where and then counting up calculating the start end end times.
There is also an item_display entity at that the coordinates of the barrier if that helps but afaik I can not detect holding-left-click on that either?
I feel like there are only frustratingly complicated and elaborate methods to archive something that should be less than 10 lines of code :/
You have the start and end of mining
Make a runnable between the two states
?scheduling
Can I detect the release of left-click? Sorry if that is a stupid question
help with recursion
https://paste.md-5.net/edetoteyaz.java
if i will inject field type with 'injectClass' method then will creating loop
will loop
recursion
That's not specific enough
do you mean you are getting a stack overflow?
yes
does your ReflectionUtil access the ContextFactory?
then post a stacktrace so we can see the loop
^
it is not necessary. The loop will occur in the "getComponentOrBeanObject" method, so I would like to ask for help on how to get rid of this
if i try use "injectClass" method
for field type
so this will
stackOverflow
If you had just made a paste we'd not be asking all these questions. You are slowly providing the information we need
sorry
I tried this but it only runce once when I start mining. I do not know how to listen for stopped mining. I can not listen for a block break event since its unbreakable.
public void onTyingToBreakBlock (PlayerInteractEvent event) {
if (event.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
...
I do not know how to detect stop mining that not minable block
We still need a stacktrace so we can see the loop
I'm going to guess it's looping over componentFactory.getComponentObject(fieldType)
declaration: package: org.bukkit.event.block, class: BlockDamageEvent
i think this runs while he is continuing
It seems not to run at all for barrier blocks, since they are unbreakable aka not damageble :/
ohh
Its possible to make free grid blocks with a shulker as a passanger and that will provide hitbox?
Hi
Don't know if has been suggested but did you try this https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockDamageAbortEvent.html ?
declaration: package: org.bukkit.event.block, class: BlockDamageAbortEvent
Hi there,
I'm working on text-animating custom heads (generated from a given base64 value). The animation requires a cached ItemStack array with 40 frames per animation. This method works with other items or name-based custom player heads. However, when using the base64 value approach, it attempts to connect to the Mojang server for each cached frame, causing errors and lag due to the multiple requests. Is there a way to cache the returned result and make a single connection to the server?
a decoded base64 string contains a link to the mojang servers is all. It has no actual texture. Cache the heads on creation and re-use them
I'm already doing that, but every time I clone an ItemStack (since just changing the meta and caching it would change the meta for every referenced stored ItemStack), it makes a request. The problem is clear, but I don't know how to fix it.
"Cache the heads on creation and re-use them"
The problem is that to prevent changing the displayName/lore for every cached frame, I need to clone the itemstack instance
Is that a problem?
cloning makes a request to Mojang's servers
does it?
don;t clone, create yoru 40 ItemStacks and set their texture
you do this ONCE
on each head
then change anythign else you need on them, but re-use the 40 heads
once the texture is set on the head it will not make any more requests to mojang
wait, what about caching the SkullMeta?
https://paste.md-5.net/ilabonogud.cs (I put a // Here! on the important part)
(please, ignore the random println haha)
iam working on making a CosmeticUser , what will this user have is :
- owner cosmetic
- active cosmetic
what is the best aproch to do it?
or should i do a map with :
cosmetic_id, Cosmetic ?
class OwnedCosmetic {
public final Cosmetic cosmetic
private CosmeticState state = null; // ACTIVE/UNACTIVE
// getter & setters
public OwnedCosmetic(Cosmetic cosmetic, CosmeticState state) {
this.cosmetic = cosmetic;
this.state = state
}
}
Something like that.
huh nice
You can make signal for the setter to update the ui and/or handler(s)
Active means the selected?
i think so
How can I fix it if at the same time a player can open a shulker by right-clicking in the air and throw away the shulker?
if i want to save the data in databse , how many tables i need ?
- cosmetics_selected
- cosmetics_bought
or only 1?
I think only one
what do you think the structure will be?
uuid , cosmetic_id , cosmetic_state
right?
Yeah
right?
Yeah but idk how your code works tho.
oky thanks 🙂
Player's mouse sensitivity is only client-side?
Ofc
That'd be a weird server side feature
I just saw how 1 developer using datapacks made hollow knight in minecraft, and somehow changed players sensitivity
To -70
that sneaky throws doesnt seem very fun
Why have a sneaky throw if you have 2 try-catches in there already?
"idk"
Just try catch the entire plugin
name: CoolPlugin
version: 1.0
main: try ar.emily.cool.Plugin
main: isPluginEnabled("Vault") ? me.illusion.myplugin.LamePlugin : me.illusion.myplugin.CoolPlugin
A sink
A bath
So I was looking at some codebase and stumbled uppon the following code:
static int distance(int x1, int y1, int x2, int y2) {
var fix = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
var sqrt = (int) Math.sqrt(fix);
var hsqr = sqrt * sqrt + sqrt;
return sqrt + (~~(hsqr - fix) >>> (Integer.SIZE - 1));
}
Do you think that the ~~ actually makes sense here? To me it's a NOP operation but perhaps I may be mistaken
Meh, I'll replace that with Math#hypot
man, wtf XD
Not my fault
I don’t even know some of those operations 😓
what the actual fuck
where'd you find that lmao
ofc it isn't explained why they do that
Okay what the fuck is ~~
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/opsummary.html "Unary bitwise complement"
This beginner Java tutorial describes fundamentals of programming in the Java programming language
First time I see it
yeah
Bitwise complement kekw
I found this tho
TLDR JavaScript
I also had to look up >>>
Gross
That's unsigned shift right
Oh ig yk already now lol
Unsigned primitives when
🤡
char is u16
I love how there is only a ">>>" and not a "<<<". It makes sense, cause "<<" and "<<<" would do the same, but it's still odd to see ">>>" sometimes
dumb question, but i want to add minimessage support in my plugin and i have PAPI, how would i handle messages? would i first parse papi then minimessage or minimessage then papi? the first one sounds the most logical but i wouldnt know...
papi first
anyone knows the dif between iconst_m1 and iconst_1?
There's an "m" in there. Don't worry, don't have to thank me
ah bruh
m standing for minus
got it
megative
melow 0
Is there anything good for pathfinding for a player
Players don't have pathfinders
But you can use whatever pathfinding system you want to replicate them
ai generated cover clearly
oh
I will take a look thanks!
it is possible to add entity to the game with NMS?
you cannot create actual custom entities
you could, but the client will shit itself
I dont mean custom entity with models
- that's not how the API works
just like hypixel does it
ok
thats easy to do without NMS
I only now get the pun
There's no pun in ba sing se
What?
Avatar reference
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) {
Player player = e.getPlayer();
String uuid = String.valueOf(player.getUniqueId());
if (Bukkit.getWorld(uuid) != null) {
Bukkit.createWorld(new WorldCreator(String.valueOf(player.getUniqueId())).type(WorldType.FLAT));
Bukkit.getLogger().info("Loading world of " + uuid);
}
@EventHandler
public void onPlayerLeave(PlayerQuitEvent e) {
Player player = e.getPlayer();
String uuid = String.valueOf(player.getUniqueId());
if (Bukkit.getWorld(uuid) != null) {
Bukkit.unloadWorld(String.valueOf(player.getUniqueId()), true);
Bukkit.getLogger().info("Unloading world of " + uuid);
}
}
im trying to load the player's world when they rejoin, but if i restart the server, then rejoin, this code doesnt happen so the world doesnt load, idk how to fix this
its the players uuid
does the listener get called?
try print to the console when the listener is called
it is called
and "unloading world of..." is printed?
bro
so it only doesn't work if the server shuts down?
yes
List<String> list = new ArrayList<>();
face with raised eyebrow
drooling face
yeah quit events arent called on shutdown. you can create a new method that handles player leaves and have the quit listener call it and also in your onDisable in your main class go through each player in Bukkit.getOnlinePlayers and call that handler method as well
but when i join the server after a restart the world doesnt load
so thats only part of the issue
try changing the type to a List<String>, as you should usually infer the base class
how do I get spigot api?
?bt
or the dependency?
can I get spigot api separatly without buildtool?
?maven
https://hub.spigotmc.org/nexus/service/rest/repository/browse/snapshots/org/spigotmc/spigot-api/ and if you don't feel like using maven or gradle, you can always commit a warcrime against programmer kind
so i am storing some items(which have some nbt) in a yml, but when i update from 1.20.4 to 1.20.6 (which had the nbt -> components change) the items loose all the data they had.
Example
at 1.20.4
items:
'2':
==: org.bukkit.inventory.ItemStack
v: 3700
type: RED_STAINED_GLASS_PANE
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: '{"text":"","extra":[{"text":"Disabled ","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"red","bold":false},{"text":"[LEGS]","italic":false,"color":"gray"}]}'
internal: H4sIAAAAAAAA/7WPTU7EMAyFXX5EVUDiCCjr6QWyhTUXQKhyE7eNSJMqdgUIzRk4BvfgZGQKky0rdn7P9me/BqCGGxN5dkHPjk3rhGa4so6x97SpGk6chds8QSbhIDqR7Vgwa9uNHpm7BQNVcM1TfGklRt+KW6p6wywe39qAM8Hl16e5/+HaBk4Fx/8g/xmngvO7uAapGrj4pdRw9nDgfLwroVdRWqmdykVCpR+Ld7yQe7EfVjYoWegBPdNOOUHvTJFrsJT8IUixWJJ7JplSXMepuCb6mDI9beA++uPC/mkPUJ6FbzeCA9mqAQAA
at 1.20.6, it saves as so
items:
'2':
==: org.bukkit.inventory.ItemStack
v: 3839
type: RED_STAINED_GLASS_PANE
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: '{"text":"","extra":[{"text":"Disabled ","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"red","bold":false},{"text":"[LEGS]","italic":false,"color":"gray"}]}'
you test that in 1.21? i mean migrate from 1.20.4 to 1.21?
ah mb, i am testing it on 1.20.6 and not 1.20.5
but i think the issue still remains
can you test? also not sure beacuse i dont remember what "internal" makes... in teory the items are parsed correctly again unless you mess a few data
can you show more code?
looks like you are calling a null thing and not the var created...
what is the coded you execute?
because the error talk about a this.saveHunters what mean you has a class with that declared in a field not?
example this code throw the same error.
import java.util.List;
public class MyClass {
private static List<String> theList;
public static void main(String args[]) {
System.out.println("Run");
theList.add("");
}
}
Run
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.util.List.add(Object)" because "MyClass.theList" is null
at MyClass.main(MyClass.java:9)
How can I create ItemStack of material ItemFrame with item in it? Cannot find anything. I know is possible to get ItemStack like that with command
ItemFrames are entities
Yeah, but no in your inventory
Yes that doesnt work
I probably got it, I will need to use NBT API or NMS.
Ok
or that would be not working?
i mean, theoretically u could execute the vanilla cmd through ur plugin if u really need it
Or just use BlockPlaceEvent and some pdc?
alternatively check when the itemframe gets placed and set the item
this
I mean, you can do something for this
It will definitely be easier that way. I just hoped there will be some modified ItemMeta as there is for Corssbow or something. Thanks guys
np
thanks
but can you show the whole code?
the error tells you try to add to a null instance of the list... if cannot see the code just can assume that
okay you have a class and where you declare the array1 and array2?
can you pass the whole file?
?paste
and pass the current stacktrace
ok you in onEnable replace the saveHunters with another thing.. can you maybe test replace in line 47 replace with and addAll or something like this.. also a few debugs about what is saveHunters later of load
replace this
saveHunters = (ArrayList<String>) objectStream.readObject();
with
saveHunters = (ArrayList<String>) objectStream.readObject();
saveHunters.add("test");
for (String value : saveHunters) {
System.out.println("saveHunters -> " + value);
}
maybe i wrote a thing wrong because im not in IDE.. but you can test if in this step the saveHunter its not replaced with null or another thing
console nothing?
Hey,
blockCible.getRelative(0, 1, 0).setType(Material.POTATO);
I try to plant potatoes when I right click with a specific hoe but I have a nullPointerException (I'm obvisously checking if the blockCible is a farmland)
Working fine when I put dirt or any other blocks just not working with crops
pass the full stacktrace but pretty sure now is throw in onEnable?
POTATOES
Potato is the item
how i can check my redis (user , password setup) on my vps? ubuntu 20.04?
okay if now throw when you enable the plugin then the issue is saveHunters = (ArrayList<String>) objectStream.readObject();
because pretty sure (ArrayList<String>) objectStream.readObject() return null make the saveHunters fails later... try to check correctly all this thing about read a directory... because not sure why you are reading that for the info... or just try replace
saveHunters = (ArrayList<String>) objectStream.readObject();
with
List<String> listTempSaveHunters = (ArrayList<String>) objectStream.readObject();
if (listTempSaveHunters instanceOf ArrayList) {
saveHunters.addAll(listTempSaveHunters);
}
but this just a patch
Why are you even using object stream
went from a null object to an objectstream
Are you allowed to upload a plugin to spigotmc if it only runs on paper?
I consider hangar the primary location for my resources, but it's a shame because spigotmc gets me like triple the downloads hangar/modrinth does
I put some of my plugins on Modrinth. In 4 or 5 months, I've made a whopping 68 cents!
No way that's almost enough for a pack of gum
Also
When checking booleans
Don’t do if(challenge == false)
just use if (!challenge)
hey, i want to create a new world in spigot
is there a way to do that with a new seed?
rn it creates a new world with the same seed, as the main overworld
and i dont want that
WorldCreator::seed
oh, im stupid sry
but is there an easy way to get a new seed?
wdym get a new one, its just a random long innit?
does anyone know how I can make an entity that has a bounding box but doesn't affect anything like interactions?
I need to trick a hacked client into thinking an entity exists on a block so that it doesn't try and place an end crystal there
How can I get the player that shooted an arrow? I'm at the EntityDamageByEntityEvent event
done
Now get the shooter from the arrow
Its possible to cancel a player death?
I supose that if you listen to the death event and then use event.cancel() it should work
It’s not cancellable
Listen to the damage event and cancel it if the players health - event.getFinalDamage <= 0
okey thanks coll
I was just checking it out, you are right, srry
|| wellll 😏 ||
Yeah go review it
cancel player leave event

does the field (nms) Entity#bukkitEntity have the same name in every version?
that isn't API, so any assumptions about name and structure shouldn't be made
it might have the same name now and going back a ways (i don't actually know), but assuming that into the future is wrong
It won't change probably kekw
I think the safest use for it is to just use nms and not rely on reflection for it
I noticed that in 1.20.5 the negative mining fatigue effect I used for a custom breaking system was patched, the thing is that I can't make use of the new mining speed attribute added as my server is in 1.20.4, is there a way I can send a packet to a newer version with that new attribute?
How to turn off nether?
server.properties
Unknown or incomplete command, see below for error
server.properties<--[HERE]
hey can you check when the player break a crop if the crop is fully grow?
Get BlockData and cast to ageable
Ageable and Damageable are the bane of bukkit (there are multiple classes named Ageable and Damageable)
How does one hide armor stands even when player is in spectator mode. I saw this post (https://www.spigotmc.org/threads/invisible-armor-stands-while-in-spectator-mode.567756/) and I think I managed to do it in some older version before the same way as in this post by sending a remove entity packet to the player but it doesn't seem to work for me in 1.20, it just removes the entire entity as if it wasn't there, which kind of makes sense but I don't understand how was this possible before. Is this still possible? I'm looking for this effect to have a block spinning in air which in my case is done by adding a block on an armor stands head and rotating it.
declaration: package: org.bukkit.entity, interface: Player
but yea
in 1.20 you'd just use display entities
and call it a day
the hideEntity thing would also completely remove the entity sooo
My idea was to convert everything to bytes and send the packet as rawPacket with the ViaVersion API, but how would I convert the packet into a ByteBuf?
Everyone uses the PacketDataSerializer class but it doesn't seem to exist anymore in 1.20.4
why in BlockBreakEvent, when i break carrot, 4 drop but event.getBlock().getDrops().size say it's only 2?
Two dropped entities with 2 items in each
Actually it might just be the drop count being randomized
Don't expect get drops to match the result of the event
Use the BlockDropItemEvent
in blockBreakEvent?
?learnjava
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
how would i check if a player is vanished? without using an api
so like if they use essentialx / any other plugin, how would i be able to check that?
canSee 👀
i see that but how would i implement it
something like this
would i just create a normal player and check if it can see vanished players>
when are vanish plugins actually smart and use hidePlayer
they dont use hideplayer? thats like the first thing you'd think to use no?
hidePlayer didnt always exist
all the famous ones
I think most do. VNP does at least
how do i generate a new world with smaller biomes?
supervanish doesnt seem to use it
does anyone know where i can find the textures of mobheads (as a string) and how i turn them into a mobhead?
Does someone know how can I achieve this?
Haste effect?
Is it? Because I wrote it 
private boolean isVanished(Player player) {
for (MetadataValue meta : player.getMetadata("vanished")) {
if (meta.asBoolean()) return true;
}
return false;
}
close enough
Mine's better because it's indented with 4 spaces and uses actual if statement blocks because I'm not a psychopaths
Hello! I am trying to make a plugin that generates a World, where the Biomes are smaller then usual, i am trying todo this by placing my own code between the WorldGeneration calling getBiome and the actual function that gets the Biome, in my mind the x,y coordinate size should be anti proportional to the biome size, but sadly it errors because "chunkGenerator.getDefaultBiomeProvider(worldInfo)" returns null, where can i get the normal minecraft DefaultBiomeProvider?
BiomeProvider biomeProvider = new BiomeProvider() {
@Override
public Biome getBiome(WorldInfo worldInfo, int x, int y, int z) {
return chunkGenerator.getDefaultBiomeProvider(worldInfo).getBiome(worldInfo, x * 2, y, z * 2);
}
@Override
public List<Biome> getBiomes(WorldInfo worldInfo) {
return chunkGenerator.getDefaultBiomeProvider(worldInfo).getBiomes(worldInfo);
}
};```
Can't you make a world in singleplayer with smaller biomes and put it in your server?
I am trying to make a bingo plugin so i need a different map for each run
hi
I'm a bit new to all this and I'm trying to fork of a plugin and try to update it, the thing is that the plugin supports several previous versions so I should download the libraries from the buildtools
Will it be enough to install them in any folder ?
You might want remapped for every version
Idk why they wouldn't be using remapped until 1.20.4 but yeah otherwise that'll be fine
yea also even if you do remapped it'll still install the non remapped versions as well
so there's really no reason not to if you're a developer
I don't really know the reason why they only use the latest remapped version but I will do it the way they suggest, I don't want to do anything with the older versions I just want the libraries to work
okay well
you're trying to update the plugin right
then you shouldn't need any of the old versions
okay so
just install the version you need
actually nevermind
install them all to be safe
the way its designed it probably needs all of them
yeah, i'm already finishing installing all of it so imma just keep going like this
okay
bruh
[INFO] --- specialsource:1.2.4:remap (remap-obf) @ mcplanes ---
Adding inheritance /var/lib/jenkins/.m2/repository/org/spigotmc/spigot/1.21-R0.1-SNAPSHOT/spigot-1.21-R0.1-SNAPSHOT-remapped-mojang.jar
java.lang.IllegalArgumentException: Unsupported class file major version 65
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:196)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:177)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:163)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:284)
at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:268)
at net.md_5.specialsource.JarRemapper.remapJar(JarRemapper.java:205)
at net.md_5.specialsource.JarRemapper.remapJar(JarRemapper.java:178)
at net.md_5.specialsource.mavenplugin.RemapMojo.execute(RemapMojo.java:214)
cut it off after that
works perfectly fine on my computer
just not on ci
wait actually i never tried running package on my computer just compile 😭
so let me try that
okay gonna try updating it to latest don't know why I didn't just think of that
okay that fixed it idk why i complained before attempting to solve the problem myself
I want to learn how to make plugins how do I begin
?learnjava
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
Then after you have a good handle on java, start working with spigot / paper though most here including me will recommend spigot
i just started out making super simple plugins and watching tutorials
in a perfect world you should have a good understanding of java before making plugins but if youre just doing it for fun you dont really need anything past the very basics
but if you have to ask what a method is then you know you need to learn a bit more before you start
I mean even then you'll still get hit with a learnjava if you ask syntax questions here kek
Yeah I started making basic plugins to learn java, although I had a bit of knowledge of c++ previously, so it's not like I knew nothing
It doesn't hurt to learn basics, especially recursion and other basics
To be fair though, oop is a lot for a beginner to understand imo
recursion 
I'd say it's something that someone should know about when they go into making plugins lol
never fully learnt recursion and never needed it
I've really only used recursion for a scheduling system, other than that have not needed to use it
I'd agree with this in the sense that you should at least be aware of recursion
Hi, in plugin.yml Is writen api version: 1.20 but I make the project in 1.20.4 is normal?
yes
okay, and
is better to make a static getter or injection for dependecy sharing?
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
Dependency injection in every class that uses some other class?
:p
not what i said
yes, you just said dependency injection, which tells nothing about when to use it, unless thats explained in the link
anyone might be able to help me figure out how to use skinsrestorer api?
im trying to use it to change a players skin using a url but i cant really figure it out
also im using kotlin btw
I need an discordsrv bot
dont we all
Haste effect wouldn't make it so you mine the block faster?
I want a way to stop the player completely from breaking the block
And high level mining fatigue makes the player swing arm animation very very slow
?learnjava
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
can i get the block that the player break with BlockDropItemEvent, because event.getBlock is always air
What is some 2D datastructure which have very good querying speeds when it comes to obtaining the N-nearest neighbours within a 2D space? Every object can be considered to be infinitely dense - overlaps shouldn't occur.
I've tried out using some random PR-Tree library but that one completely destroys performance compared to the current brute-force method of querying a QuadTree and sorting the points, then copying those points again in order to cut off all elements above N.
when does Bukkit.getOfflinePlayers gets filled
i mean like when does a player get added into it
when they first join the server
regardless if they're currently online or not?
player extends offline
yes but the function's name is getOfflinePlayers
if they have joined at some time there will be an offline for them
i see
@eternal oxide so they'll be in that array even tho hasPlayedBefore() is false?
cuz hasPlayedBefore() returns false if its the player's first time joining
if hasPlayedBefore is false they have never joined
and they haven't gone offline yet
well from experience, hasPlayedBefore only returns true if the player goes online and then goes offline
thats possible I guess
perhaps its set the first time they log off
but there will still be an oifflinePlayer for a player who is online for the first time
and also for a player that has never been online
you can make an offline player if you know their uuid
or name I think
but thats expensive probably?
I know some java basics but I dont know how to setup the project or how to use the spigot api
youtube is your friend
some API stuff is likely outdated in tutorials but you should easily be able to get a project set up with a quick video
please dont watch codered or smth
codedred
kody simpson helped me get started with the spigot api ngl
back in like 2022 or maybe late 2021
they all write code thats a piece of shit if you look at it now
something for #1100941063058894868
hey, i have a simple scoreboard question.
My Scoreboard is only showing 1 player stats, and not per player.
player1 is seeing the scoreboard for player2, and player2 also sees the player2 scoreboard:
```java
public void setScoreboard() {
Scoreboard playerScoreboard = player.getScoreboard();
String uniqueTeamName = "TornadoMC_" + player.getName();
if (playerScoreboard.getObjective(uniqueTeamName) != null) {
playerScoreboard.getObjective(uniqueTeamName).unregister();
}
Objective objective = playerScoreboard.registerNewObjective(uniqueTeamName, "dummy", "§d§lTornadoMC");
objective.setDisplaySlot(DisplaySlot.SIDEBAR);
objective.getScore("§8").setScore(15);
if (playerScoreboard.getTeam(uniqueTeamName) != null) {
playerScoreboard.getTeam(uniqueTeamName).unregister();
}
Team team = playerScoreboard.registerNewTeam(uniqueTeamName);
team.addEntry("§8");
team.setPrefix(player.getName());
player.setScoreboard(playerScoreboard);
}```
This is my code, i will be happy if somebody can help me :=)
shouldnt you be creating an entirely new scoreboard?
as player::getScoreboard returns the servers main scoreboard?
i suppose
yes this was my first idea, but i have coded a tablist group prefix plugin (core plugin), but then the tablist prefixes are gone, or the new scoreboard disappear.
if you want each player to have a sidebar that looks different, each player needs a separate scoreboard
if you want teams to sync youll have to create them on all the scoreboards
or use packets
hmm, you mean that i should use in the scoreboard (sidebar) .getNewScoreboard() and then in the scoreboard teams plugin i have to get all scoreboards and add the teams to all scoreboards?
yes basically
i wanted to do something similar where i wanted to use placeholders in scoreboards whoch reauires separate board for every player
but i also have teams
and it works on you?
but in the end this was very messy so i opted to use packetevents
and just send player teams with packets
which is also complicates, but not scoreboard dependant
this is also a good idea. you send the teams with packets (just the teams) and then call .getNewScoreboard() in every scoreboard plugin?
but just adding the teams to every scoreboard shoul work
okay, i try it thank you. If i have any questions i'll ask
the client evaluates prefixes based on scoreboard but packets can override this by creatin teams regardless of scoreboard
yes thank you now I've learned a bit again :=)
depending on your structure it might be easy tojust create the same teams across all the boards
yes
why is that
because he does some awful things
do i have to do it with PacketPlayOutScoreboardTeam?
the teams with every scoreboard doesnt work because then in the tab only one player have a rank and the other rank disappeared
No
👀 I’m watching you
Hey I know someone who does though 😉
boys whats up
hows everyone doing
its the last few days of mens mental health month
|| Could use paper
||
cabernet mc
yeah, spigot plugins work on paper, paper plugins dont work on spigot
can anyone send me for 1.20.6 a scoreboard teams code with packets? i dont know how i can send the packet and create the packet
you wouldn't learn anything then
how much do you pay?
idk ☠️ i just want to know how this works
if someone can send me a code example for free will make me happy :=)
I used packetevents so I cant help with nms xD
but it is the packet you mentioned
that packet can create, remove and edit teams
in my case I just recreated the team everytime something changes, which isnt optimal, but by far the easiest way
for some reason you can just keep creating teams and it doesnt complain about duplicate names so I assume it just replaces the team
How can I add mods in spigot server?
sponge ig
thank you for your help
i try it again
Usually there are mod alternatives to many plugins, and it's usually best to stick with fabric/forge and find mod alternatives to your plugins instead of trying to mix and mash spigot and mods
but how you did that with PacketEvents? @steaf23
you go outside and start touching grass, its 30°C
oh
packetevents has a discord where anyone can help you
im busy rn
okay
what's wrong?
i mean a warning is just a warning
what abt here?
can you show your POM?
but looks like a issue with enconding
hmm try check this https://intellij-support.jetbrains.com/hc/en-us/community/posts/206236379-Unmappable-character-for-encoding-UTF-8 maybe is more a issue of the IDE
Hello,Intellij version : 110.291Maven version : 2.2.1Intellij then I compile some classes output : "unmappable character for encoding UTF-8".The encoding in my POM is set to CP1252. The project enc...
yay! mine has deteriorated further over the course of june
u2
i only got happy pride month wishes
to add to what retro said, if you wanna ping me, make sure to actually ping xD
well I didnt see any quotes
ah
ok
i
now
see
how
you
have
88k
messages
just split every word in a message into individual messages = profit
we all dislike it
Do that and you're dead
simple will fight you at somepoint
you need to think faster and
