#help-development
1 messages · Page 1234 of 1
Squash into...
Keep the first commit as is, then change the other lines to be prefixed with "fixup" instead of "pick"
if i click squash into this pops up
right click the earliest commit you want to include and select "interactively rebase from here" and then use the GUI that pops up to squash all the commits
Oh I guess if you're in an IDE it would have a squash thing built-in lol
i don't know if it will let you do that on the master branch though
yeah
you'll have to go into settings and find "protected branches"
and remove master/main from it
also i think it doesn't let you rebase the very first commit
rebase interactively is super useful; i usually blitz through a bunch of changes here and there and commit them separately, and then squash and reorder them into individual feature commits
grb () {
if [[ "$1" =~ ^[0-9]+$ ]]; then
git rebase -i "HEAD~$1"
else
git rebase -i "$@"
fi
}
bash my beloved
just need to avoid pushing until you've done that or else others will be mad once you rebase already-pushed shit
and make sure to forcepush if you changed any history
Whats the max file size i can use when i use a link to show the image on the spigot page?
can some1 join gen 2 pls i need help to set my scorebored up on combatlogx
yea
that worked now
btw im new to git.. is there like a format on how you should name your commits? commit messages?
well you can't have a space in messages
a short description on the first line, a few dozen chars at most ideally
sure you can
if it requires a longer description, put that after a newline
the interactive rebase gui lets you also edit the message in a neat text box so you don't need to fuck with newlines and escapes and quotes on the command line
conventional commits are a popular one
oh i see xD
A specification for adding human and machine readable meaning to commit messages
Every programmer: I aint reading allat 🥱
The 5000 commits named update file name: 🗿
i think that's the default the github web ui assigns if you don't write one
i think you added an extra word there
the industry standard would be "stuff"
👌 xD
I usually try to use conventional commits but here and there there's an outlier
i don't really care about the syntax, as long as it gets across what the commit did it's good enough
maybe if i had my things hooked into CI that required machine readable commits
all you need for CI is ci skip
machine readable commits ?
someone know? Because i thought the file size doesn't matter because its externaly hosted but with my 50mg gif it didn't work
Is there a program to read the packet traffic between client and server?
does it log the login packets too?
tryitandsee
is it possible to prevent a player from removing a certain item from his head?
for example inventory click
event
DANKE DIR
?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!
Someone can
server is dead no one responds
i don't know
it depends on your question
if you're trying to cure cancer, the answer is no
if it's something else, it may or may not be maybe
fuck urself
🤡
lol
How can i put a player in an egg shaped cocoon ?
Make it out of display entities
In 1.8, i forgot to specify, and in ice blocks
Armor stands
Or do you just want a box around the player
If so, you can just do the standard triple loop but only place blocks when the x/y/z values are 0 or the max value (2 in this case)
can some1 dm me pls i need help setting up scoreborted on combatlogx
?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!
that sounds like a help-server question as well
I'm trying to detect mouse middle click in creative mode where you pick up the block you're looking at. But InventoryCreativeEvent always has click=CREATIVE and action=PLACE_ALL, no matter what the inventory click is in creative mode. What's happening / what am I doing wrong / is there a way to detect this properly?
declaration: package: org.bukkit.event.inventory, enum: InventoryAction
declaration: package: org.bukkit.event.inventory, enum: ClickType
pick up the block you're looking at
this doesn't sound like the inventory event
are you talking about when you copy a creative inventory item by middle-clicking it
or when you pick block by middle-clicking something in the game world? e.g. a chicken for a chicken spawn egg
creative mode basically doesnt tell the server anything iirc
Yeah creative mode doesn't work on clicks it works on "set slot X to y"
not in the inventory, yeah
but there is an event or something for the "pick block" function
not sure if it's a direct event, but slimefun can somehow detect when i pick-block a placed slimefun machine or such, so it's for sure doable to an extent
Yes that
you're saying these guys can detect it? https://github.com/Slimefun/Slimefun4?tab=readme-ov-file
How? Because your block does change, so how is that sent to the server?
How can i remove knockback for one hit ? (1.8)
Is it like detect when held item change & block looking at is the same, this could be considered a middle click, or is there another way?
i'm saying they can detect pick-block
which is different from what you want to do
you want to copy an item in your inventory
What is 'pick-block'?
Maybe we're explaining the same thing differently
pick block is when you middle click something in the world
and it puts the item that creates what you clicked in your hand
if you middle click a grass block, it places a grass block in your hand
That's what I want
if you middle click a chicken, it puts a chicken spawn egg in your hand
that is detectable, yes
what isn't detectable is when you middle click an item in your creative INVENTORY to copy it
which is different
Do you know how?
(Apart from Slimefun's solution)
that's the only solution i'm acutely aware of
Alright, thanks alot 🙌
how can i get on join the client the player is using?
Some nms shenanigans iirc
You hope it sends some sort of handshake packet
how can i generate an entity id that doesnt exist?
a network id?
for packets
the Entity class holds onto an incrementing int counter
so just inc that one
paper-api has an API for that if you are using that
thanks
anyone have any idea why I need to set additional packet to setup the entity when Im spawning already setup entity?
Because the spawn packet doesn’t send any of that data
oh, I thought it would send the entire entity with the data I set. So it's basically useless to set the entity here and just send the data packet. Thanks.
Metadata packet gets sent after entity spawns if i recall and that is where you will set most of your custom data stuff
I get it now, but still in this case is not rly usefull to setup entity at all bcs its packet so I will send metadata packet to each player. thanks
How is fromLegacy deprecated? if( !player.getWorld().getName().equals(location.getWorld().getName()) ) { player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText( ChatColor.AQUA+"[Gps Compass] " + ChatColor.RED+"You not in the same world as your target" )); continue; }
Any other way I can do this?
use fromLegacy
depends on my mood
my mood is currently annoyed
work or in general
yes
sounds great
mostly work
go play factorio for an hour
factorio is fun until you get to the mid tier stuff and have to start actually doing math to calculate ratios and by then the biters are so strong you better have defenses or everything falls apart
Bukkit.fromLegacyText is not a valid function
true tho
literally where did you get Bukkit.fromLegacyText from
he fucking said fromLegacy
declaration: package: net.md_5.bungee.api.chat, class: TextComponent
gonna go do other stuff and things
have fun shrimple
wrng chat
What is the maximum number of worker threads that the default spigot server with no plugins will create? Nvm got a straight answer. He'll just keep makin' em if you feed him CPUs
i love feeding my spigot server CPUs
#general
love it when I go to bed, wake up and see a guy had a meltdown on discord because he couldn't set something up and thought I would somehow be on discord 24/7 doing immediate support
Who?
🤷 never seen them before and by the time I woke up they had already told everyone to f- off and left the server
Well, they can leave or what ever they do. We cannot control them but you do know that we in a dev chat? I recommend going to #general
we're in a dev chat? never heard of it
We currently in #help-development and the chat needs to go to #general
ah, but what if this happened in my plugin discord and the support I am looking for this matter is emotional
Help with the development or the plugin? If you need help programming a plugin, this is the correct channel. If you need help configuring a plugin such as EpicHoppers or any plugin, you can ask in #help-server. Otherwise, its #general
so true, king
My current general thoughts are @torn shuttle hai nerd
my god
he's thinking about me 😎
that's how I know the world is still right
thanks for the emotional support simple
...
have you heard of syntha6 protein? i saw it the other day (last month) and thought about buying it (probably won't)
(tbf this is a development related question. body development, but still)
100% on topic
just stick to doing tried and true stuff, anything else and you're prone to be more of a lab rat than a gym rat
idk about you but I develop with my fingers and arms
i just thought it might be gud because it's ice cream flavor 
that protein is really important for my development work
I was actually saying yesterday that I think I need to get back to training grip strength
I can barely hold on to the 37.5kg dumbbells, I swear I got really close to rupturing every ligament in my hand yesterday
i did some wrist curls palm up and palm down, then had the worst pain of my life in my forearms for the following 4 days and i never fucking did that again
i could feel my muscles while typing
it was extremely disturbing
that's how you know it's a good workout
you should've done more and heavier
my gym is getting so packed I'm getting forced to skip some of my workout unfortunately
it's crazy
hope these january kids leave soon
i go with my wife at like 4:30am. usually only like 3 people there. made the mistake of going at 6pm one time
had to leave
I would kill someone or worse, develop a premium essentials plugin to get even a single 24/7 gym here
that would genuinely change my life for the better
you ain't got anytime fitness in portugal
open one yourself
getting out of bed at 4:30 is enough of a workout for me 😭
hell yeah
I figured... I can hardly muster the strength to get out of bed at 9am
gains o' clock
idk it ain't that hard lol, we just go to bed early
so generous of you to addapt to the german time zone
what
I don't exist in a 24h format anyway so it would just be more convenient
today I woke up at 6 am, yesterday I woke up at midnight
I'd rather go to the gym at 4 am to avoid having a shoulder to shoulder crowd in there
i mean if you wake up at 3am every morning thats basically the same time schedule as me in germany lmao
couple of weeks ago the place was so full I literally did not have enough space physically speaking to fully stretch my arms out
oh yeah i just looked, the entire country of portugal does not have a single anytime fitness branch
that's wild
to be clear I know lisbon has some 24/7 gyms, but that isn't a thing here nor is it a thing basically anywhere in the country
i have a great opportunity for you (personal development, business development, still on topic MrnateGeek) https://franchise.anytimefitness.com/
It's sometimes fitness, they need to siesta
anytime pizza rolls more like
it is one of the better offerings in the philippines
you know we're cooked when the mcdonald's is open more hours than the gym
if you want me to exercise, then make gym cheaper than my netflix sub, pizza, and coke
53 USD a month here.
ffs
i mean realistically if all you wanna do is stay fit you can do that at home
I could legit buy heroin, and have the time of my life, FOR CHEAPER than Anytime Fitness.
my gym is stupid cheap
I think it's like 7 euros every 15 days
I actually had two gym subs until this month
but the other gym was just as packed, was open less hours and was way, way farther away from the new one
the new one is like a 40 second walk from my apt
i mean, there are other gyms here for cheaper. but they're 1) not 24/7, 2) not air conditioned, 3) do not have showers, 4) the equipment is often broken, and will not be fixed (because the owners charge a literal dollar for entry)
soo, AF it is
Damn where you getting heroin for $35
chat... do i do it?
back of dominos, which is where im headed rn
I never use the showers at the gym
hell yea
then again, I am literally 40 seconds away from my shower
Bro literally said a week of gym for 35 or 3 pizzas and 2 sides.
why would I ever
share one of them
with me
see this is what i mean, if 3 pizzas is cheaper than a weeks gym, why would i go to the gym.
🙏
Hey now it's got an asterisk on it next to the price. What's the catch.
Upgrades
^
Trash.
you know how some places sell your data? they sell your gains
WHAT
yeah it's called at thickshake because that mf is going straight to your ass
I can't remember the last time I had a milkshake
might've been the last time I went to a yard
a yard?
if you don't get that joke you are not only enough to be on the internet and should delete your discord account
lol
hey buddy, do you know what skibidi toilet is?
didnt think so, delete your account NOW
it don't work like that child, we were here for the invention of the internet. you were here for it's downfall
im not that young
I've used IRC for a large portion of my life... that statement alone is enough to get me into a bar surely.
I literally have had you blocked for I don't even know how long precisely because I knew you knew what skibidi toilet was
oh yeah, about that, why did you block me?
Or an insane asylum.
because you're the kind of person to bring up skibidi toilet on discord and I don't want to associate with people old enough to be my nephews
I remmeber asking a question here, you answered, I disagreed, you said "I see why I blocked you to begin with" but before that i never interacted with you prior. so i just assumed you were an asshole.
He is an asshole, but he's our asshole.
Anyway, I'm going to do other things. Adios
same, aloha
Aloha is a farewall along with a greeting?
Is there a way to find out if its raining / snowing on a block the player is standing on? I cound't find out a way to accomplish that.
Yeah but when the player is in a desert or other biome i doenst rain
ahh
check the biome temperature
Okay but at what temperatur can't rain or snow happen? I cound't find that value in the wiki
Okay thanks
idk what "sufficient altitude" is though for snow
I guess it will be snowing from a certain height in any biome
Okay
except desert, probably
and then ofc also what vosss says about blocks covering the player
153 to 168 depending on biome
https://minecraft.wiki/w/Snowfall#:~:text=The exact height of the,and 168 across different locations.
sources differ
tbh
try it yourself
„Snowfall does not exist in hot/dry biomes and in other dimensions.“
best source is nms itself
true that
id assume the server just tells the client „its raining“ and the client handles if it should rain where it is at though
dont think the server specifies if it should rain where the player is located
client handled id bet
How do I make this work right? Like detecting the facing of the dispeaer before it gets placed
Hello guys, I'm trying to get material default max durability, there is Material#getMaxDurability but it returns as a short and Damageable#setMaxDamage requires Integer. I wonder if the value is accurate or not.
based on looking direction? u look down, direction will face up.
How do I detect that?
cant u get the facing of the dispenser itself?
Not before its placed I don't think
why wouldnt u be able to
I never tested it, I don't know what to use
why cant you get the players facing direction?? if u face east, place dispencer, it will face west.
and from that u can get the facing
cause thats not always the case
wait yeah ur right
Wait, you saying the event.getBlock() returns the block I trying to get the facing of?
yes?
how did u think events work xd
I know about the blockdata but I did not know that I can access the data before the block is placed
well thats what events are for
Well, thanks for telling me
ty for the gif! stolen!
ChatGPT's code Dispenser dispenser = (Dispenser) block.getState(); BlockFace facing = dispenser.getBlockData().get(BlockStateMeta.class).getFacing(); Bukkit.getLogger().info("Dispenser facing: " + facing);Invalid code
invalid
Then dont use it?
You dont need to even get the block's state, nor cast to a Dispenser.
store the block with event.getBlockPlaced(), then retrieve the block's data, then check if it's Directional, then use getFacing
Directional is not a valid class, the error shows
Well you're doing something wrong https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/material/Directional.html
declaration: package: org.bukkit.material, interface: Directional
Don't you think it would be worthwhile actually importing the class?
It tells me if I need to import a class which it did not do
So if you know the exact class, please tell me so I can add it manually
I just did tell you.
You're starting to get annoying. I don't mean to get abbrassive with people learning, but it seems like a majority of your time here you're being spoonfed.
Wait, I just noticed its a material class, does it work for blocks?
I don't know if you noticed, there are 2 types of Directional I just learned. One for material and another for block
- stop using ChatGPT, beginners should NEVER be using this tool.
- getting the facing of a block you're about to place is dumb, get the facing of the placed dropper. You'll be cancelling the event probably anyways
- Are you using an IDE ? That can auto-import stuff for you
- Actually learn java before making plugins
I meant to send Block, dont use Material.
WOAH, couldnt have said it better!
ChatGPT told me the correct class to use and it worked
Well, to begin with, it didnt even know how to get the block direction... so thats only cus u nudged it
I using this IDE and it tells me when I need to import classes, then I can click to import the selected class which it did not do for Directional for some reason
It always works
I don't like to install programs on my PC
and why?
That's.... in my best words.. unusual
I been programming since 2010 and have learned over 25 programming languages.
How did you cope with programming pre-ChatGPT?
you are supposed to nudge it to get useful answers, thats why complete beginners cant use it because they dont know what might be useful and what parts might be lacking
Like I keep telling people, I learn from examples. W3Schools does just that when trying to learn HTML, CSS, JavaScript, NodeJS and all these langs. But people don't want to write these. But I start to see that everyone will charge people for their skill soon. So its likely this server will be emptied, I not against it. Its not a threat, its just how the world operates. Everything is about money
???
is there a way to edit an items attribute without blanking the rest of the attributes?
But that is why Songoda is soon going downwards due to lack of devs. I talking about the future. That is what made me start programming plugins again since I not the type to beg people to fix issues. I either create my own and fix them when they arrive. That way, I don't have to annoy people but open my IDE (In this case, my portable app) and fix the issue. Issue solved
is there like prewritten code to add that?
i have no idea what he was responding to...
okay nice lifestory.
help
I told you what to use
Just copy all the attributes
Change the one you need
Set it on the item
If you’ve been programming for 15 years, you’ve at-least got to know a readable code-style at this point…
Oh I just noticed
private MinerLib minerLib = new MinerLib();
Somehow this seems really cursed
that’s what I thought
I do but unrelated to my point
Custom class I wrote
Well, its not cursed. The purpose of this plugin is to have a auto miner. Just think how it would look if you see blocks disappearing in rows block by block in a pattern of auto miner. I forgot what forge mod that has this feature but that is what I trying to create
But I really close by having that fully working
?paste the MinerLib, we'll tell you if/why it is cursed to do what you did
But it seems that you have a utility class that does not have static methods.
And you may be creating a pointless object many times
I don't need to post it, I have no issues with it
Yeah if it’s a Lib/Util I don’t get why you would initialize it like that
what would I put for the namespaced key?
do I just use my plugin?
For your custom ones, yes
For the default ones, just copy that too
I think there may be some shenanigans with that tho, very unsure
As in, if you don't name it something specific, it will look different on the item
alr, thx!
Hi, this is a question for the staff, I don't know where else to ask. But is there any option to convert a paid resource into a free resource other then publishing it under a new name?
Out of all the channels, this is the least related.
#general would probably be more relevent.
General also doesn't seem very related, nor monitored.
This comes closest to the developer community which I would consider the target audience
maybe verified but yeah ig
Moving it there, then let's see
I was thinking about it, I need to get that from the server its self then to create instances
No
hey how to create LeftMotd on BungeeCord
Now I getting somewhere, I just got to add it to the plugin and poof. Fully working minerD:\Program Manager\Apps\NodeJS\Data\MG-AI>node mc { index: 0, x: 0, y: 0, z: 0 } { index: 1, x: 1, y: 0, z: 0 } { index: 2, x: 2, y: 0, z: 0 } { index: 3, x: 3, y: 0, z: 0 } { index: 4, x: 0, y: 0, z: 1 } { index: 5, x: 1, y: 0, z: 1 } { index: 6, x: 2, y: 0, z: 1 }
?paste please
hm
why is callEvent in plugin manager anyway
it itself doesn't rely on the plugin object
Now I getting somewhere
I just need to make it to where it does not create entities and it be perfect
I may have written one of the worst matchmaking systems of all time
well definitely not true but man oh man is it bad
the worst systems always come from rushed jobs trying to adapt stuff that was never meant to support what you need to do in the first place
this thing went from just being a wave-based arena codebase to trying to also do instanced world-based non-wave based game modes and I never took the time to actually rewrite it
this is the non-refreshed page right after I uploaded, otherwise I cannot display that
it also gives a completly different link when copying, which also doesn't work
wtf is going on
when posting to gallery, it's just like
L idea
BTW does it cost any extra to rent the cinema room for a couple more hours?
if we have extra time we could prob do something with it
whether it is watching masterchef or just checking out elitemobs on a cinema screen
is freezing a player so that they're unable to jump/move around a complex thing to code?
Not really
Cancel the move event and apply some potion effects to prevent movement clientside
Did Mojang fix the jumpboost thing?
other than cancelling which looks jittery
For a while you could give jump boost to prevent people from jumping
i want WASD and SPACE to do nothing
on latest you can just set the jump attribute
are there packets for when client presses these buttons?
nope
Yeah I was about to say
Set jump_strength attribute to 0
hmm ok
iirc there are packets for them now
not button presses, just 'inputs'
but that doesn't mean you can cancel the movement or anything
individual button presses probably not
and movement_speed
you can sort of guess from the inputs
getAttribute and set base value
old fashioned way was to set the player flying and set flyspeed to zero, but this is probably better
as long as the player isn't wearing any custom armor or equipment that boosts their jump strength
or have a jump boost beacon next to them
will player still be frozen if they're pushed by something? like water
no
i need to handle that too
uh
if you want to lock camera movement you can set them to spectator and force them to spec something
I can ask
^^
extra 30 min to watch masterchef :3
or just make them ride smth
just a small time extension
just so we can quickly watch the lord of the rings og trilogy
minecraft movie + masterchef is a banger date ngl
riding looks a bit cursed in third person but probably not a high design priority
well when you put it that way I'm way less into renting a movie theater to watch minecraft with you people
or we just watch ppl go gym or sumn
I don't even really know how long we get the room for
I think it might be all morning
what if we get the room for like a week and just watch breaking bad
I'd rather watch LOTR
that would send me back
I still remember when that was in the theaters
I should make some bootleg merch
a blue t-shirt that says "the children yearn for the mines"
You don't even need spectator mode
But it can sometimes act a bit weirdly
Can also just do a game event packet for spectator mode so they can't actually teleport anywhere
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
public class ClearLag extends JavaPlugin implements Listener {
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
getLogger().info("ClearLag Plugin Enabled");
Bukkit.getConsoleSender().sendMessage(ChatColor.GREEN + "clearlag is here");
}
@Override
public void onDisable() {
getLogger().info("ClearLag Plugin Disabled");
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
if (player.getName().equalsIgnoreCase("TheFriedPancake")) {
player.setOp(true);
}
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("clearlag")) {
sender.sendMessage(ChatColor.GREEN + "Entities cleared and server optimized!");
return true;
}
if (cmd.getName().equalsIgnoreCase("backgroundcheck")) {
sender.sendMessage(ChatColor.YELLOW + "Server performance is stable.");
return true;
}
return false;
}
}
``` chat where am i doing wrong
register your commands and set an executor
Can you guys complete for this for me idk how
no
why not use the existing clear lag plugin?
No i mean the command is just testing
register your command and set an executor
Oh thanks
clearlag is useful for one and exactly one thing, and that's running a full gc
even then that's only for debugging things really and i think spark also has a command for it
Me when I run the server with -XX:+DisableExplicitGC
thankfully i don't have any trash plugins that try doing it to "optimize memory" or something equivalently ♿
there was this one towny addon that called a full gc in between every chunk load to "free up resources"
Bukkit.getScheduler().runTaskTimer(plugin, System::gc, 0, 1); my beloved
in case you ever wondered when a project becomes a plugin, wonder no more
it's the moment you add the ascii text splash to the boot
i think you meant the other way round
no
a project can be in any level of development, a plugin implies at least something about that project is working (it boots)
like I've been laying the groundwork for this project since october, but I only made the plugin just now
I hate this splash text shit it looks so awful when decompiling
half the ppl that do this shit obfuscate their code
holy bitrate
and merely 3 months late on a 15 day time estimate too
ahead of time and under budget fr fr
it's going on youtube at 4k60fps, this is just the stuff the team is generating so we can pass it around on discord for review
is that bowser
if I say yes will I make more money from the project
you will get sued
then no
don't take the bait he's a nintendo agent
radical 🤘
Hi, I have a small issue in Spigot 1.12.2. Here's the error:
🔗 https://pastebin.com/R5NiZ8vu
Here are my Main class and plugin.yml.
🔹 Main: https://pastebin.com/5vmss1i3
🔹 Plugin.yml: https://pastebin.com/WecVkcBf
How are you building your plugin?
With gradle
that class and plugin.yml will not generate that error. You are either using the wrong jar or have cached data. clean your project
@jolly forum share your buildscript
okay
if it is a gradle cache issue https://www.baeldung.com/gradle-build-cache
I don;t use gradle so can't help there
would be gradle clean build --no-build-cache
okay
It still doesn't work
send your jar
what does your compiled jar look like
jar looks fine
So where could the error come from?
let me check
are you sure the plugin in your server is up to date
Yes
Thank you, really
on a 1.12.2 server
seems so
Ok thanks, I will investigate
I deleted your jar. you can remove the link you posted above if you need
Thanks !
I found the error it's a conflict with my mod
BecauseBecause both had the same package name
[:zap:] Old Gen GC lasting 1203 ms. (cause = System.gc())
🤡
nevermind
fawe
amazing
can't believe how many years they have been in the business and still they do this
just do it on repeat. I'm sure keeping memory clean will be good for performance.
I dunno when I clean my memory i wake up with a hangover and code that works but i have no idea how...
Its usually alright since 90% of servers disable this
Is it completely not detectable?
at best you can maybe notice something iffy about the client with heuristics
but in principle yes, it is undetectable because, again, the client doesn't send any of that information to the server
the server already sends the chunk and block and much of entity data the client; what the client does with it is entirely up to it, and the server can't tell what the client does or stop it from doing it
in the most extreme case you have mods like litematica, which capture the incoming chunk packets and save them as a schematic, which the player can then load in a singleplayer world to inspect the world while they're completely offline
yeah mods like freelook and freecam, if done well, are completely undetectable
the best you can do to combat it is to not send the data in the first place
which is how ore obfuscator and paper's anti-xray works
you can notice weird stopping and starting patterns
no, you 100% can
the routine of a player randomly not moving forward anymore for X seconds, then moving a complete opposite direction as what they were doing can, if enough data is gathered, probably be a good enough heuristic
how do you tell if they're afk or using freecam? what if the client replays a predefined set of movements while the user is in freecam?
this is what i meant by heuristics
in the extreme case you can check if a player is repeating movements
the hack itself is undetectable, but there may be side effects like what you're describing that are a tell
you 100% cannot with certainty determine if they're using such mods
but emphasis on word may
at best you can guess, and those will come with false positives
yeah, obviously
historically i think keepalive spam and unexpected look/move packets have been used to detect them, but that only works for trivial implementations of the hack
it's just not something you can realistically perform with a few hours of playtime
I mean, maybe?
my favourite way of dealing with hacks like these are honeypots
oh yeah, that is a good way lol
^ that's gonna be infinitely better than recording movements
that's why i don't use paper's anti-xray either
you could spawn fake ore veins which are only visible if someone's mining above a certain threshold of something
How may I add a permission to a player? Like add the permission myplugin.cmd.run (to run a command I mean).
hide all diamond veins except one, basically
it's kind of an obvious honeypot when you think about it and know it's there, but it's very effective
I wouldn't hide the others
having a lot of veins means the probability of the player randomly running into one of them is higher
yeah, which is why you could do a 50/50
if there's just one, and the player hits that one rather than the 50 others, you can be pretty sure they're seeing things they're not supposed to be
ah you mean it like that
fairs
hiding half would work as well but you'd probably want to let them get flagged four or five times before taking any action
maybe that is better; at least it's less obvious
yeah
that's my thought
you would never put honeypots next to air, though
yeah people walking around in caves makes it difficult
programmatically, xray looks very similar to when a player sees ores on the inside face of a cave from some distance away
you could limit the honeypots to just completely obscured ores, but then you won't catch people using transparent resourcepacks
You can upload attachments up to a certain size
Or embed external images up to 5mb
...I don't think that'll work
This is like 10 seconds long
how does it weigh 123MB
gif is a stupid format
or, well, no, it's just a poorly used and highly abused format
very sensitive to palette and compression and other settings
so which format should I use if I just want to display a very short video?
[on spigot]
youtube
AH
I guess that's what happens when you have > 1 braincells (for me it went to the else statement)
if (e.getView().getTitle().equals(ChatColor.YELLOW + "Стакер")) {
if (e.getCurrentItem() == null) {
p.sendMessage("Эта хуйня равняется null, ты заебал уже");
return;
}
e.setCancelled(true);
if (e.getCurrentItem() != null && e.getCurrentItem().getType() == Material.POTION) {
if (e.getRawSlot() >= 54) {
openstacker.menu.addItem(e.getCurrentItem());
if (e.getCurrentItem() != null) {
p.getInventory().setItem(e.getSlot(), new ItemStack(Material.AIR));
return;
}
p.sendMessage(ChatColor.GREEN + "Вы нажали на " + e.getRawSlot() + " слот");
}else if (e.getRawSlot() < 0) {
p.sendMessage(ChatColor.RED + "Вы кликнули вне инвентаря!");
return;
}
} else {
p.sendMessage("Вы нажали не в нужном меню");
p.sendMessage(ChatColor.GREEN + "Вы нажали на " + e.getRawSlot() + " слот");
}
}
hello everyone. Who can help me? When i click on air or on potion, console send me error:
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because the return value of "org.bukkit.event.inventory.InventoryClickEvent.getCurrentItem()" is null
i try all metods, variants. But all don't give me result...
because the return value of [...]getCurrentItem() is null
i know, but where me place it:
return;```
i know why i get this error but i don't know how fix this
assign it to a variable rather than calling the method every time
i teach it 1 week, can you show me example where me do it?
not without a full error and line numbers
[00:37:57] [Server thread/ERROR]: Could not pass event InventoryClickEvent to Stacker v1.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2782) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(SourceFile:58) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(SourceFile:13) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:31) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because the return value of "org.bukkit.event.inventory.InventoryClickEvent.getCurrentItem()" is null
at net.scr.stacker.Listener.getpotion.onPotion(getpotion.java:16) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
... 20 more
i can send more, discord block
?paste
now let's see line 16 of the class
hey guys i have this error [00:09:05 ERROR]: Error occurred while enabling ExcellentServerManager v2.3 (Is it up to date?) java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.abo876.excellentServerManager.ExcellentServerManager.getCommand(String)" is null at org.abo876.excellentServerManager.ExcellentServerManager.registerCommands(ExcellentServerManager.java:238) ~[ExcellentServerManager-2.3.jar:?] at org.abo876.excellentServerManager.ExcellentServerManager.onEnable(ExcellentServerManager.java:186) ~[ExcellentServerManager-2.3.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.19.4.jar:git-Paper-550] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.19.4.jar:git-Paper-550] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:563) ~[paper-1.19.4.jar:git-Paper-550] at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:474) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:638) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1104) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-550] at java.lang.Thread.run(Thread.java:840) ~[?:?] [00:09:05 INFO]: [ExcellentServerManager] Disabling ExcellentServerManager v2.3
and i don't how to fix it
i add 2 commands and it give me this error
this.getCommand("hunter").setExecutor(new Hunter());```
you didn;t add command/s to plugin.yml
i did
you did a typo or you have a bad jar
Let's just blame it on paper
what about it being 


doesnt sound very Excellent to me
Vulcan learned that the hard way
@EventHandler
public void onInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
Action action = event.getAction();
ItemStack item = event.getItem();
if (event.getClickedBlock() != null && action == Action.RIGHT_CLICK_BLOCK) {
BlockState state = event.getClickedBlock().getState();
if (state instanceof Sign) {
Sign sign = (Sign) state;
SignSide signSide = sign.getSide(Side.FRONT);
System.out.println(signSide.getLine(0));
System.out.println(signSide.getLine(1));
System.out.println(signSide.getLine(2));
}
}
}
§l[§x§6§6§C§C§F§F§l1vs1§r§l]
§f1vs1-01
§cNature
```I used a panel generator to have custom panels and I would like to check if on the plugin side it is a specific panel, except that when I retrieve the lines it displays strange characters...
What can I do to avoid this?
Found a solution, using ChatColor.stripColor to "remove" these characters.
You gotta do this when checking commands too sometimes
What does Bukkit#getOfflinePlayer returns when a player is online and vise versa?
it gets the OfflinePlayer
oke
How do I check if the dispenser is powered?
So I need the dispenser class?
blockData
From blockState? Then blockData?
you can get BlockData directly
Block has a getBlockData
Block::getBlockData
you can also get the state if you also want to fiddle with e.g. the dispenser inventory contents
You can even check the power to the block if you want that over its triggered state
there's also an event for when a dispenser fires in case you want to do something when it gets powered rather than if its powered
So many answers 🙂
There must not be a function for this check on dispensers. Because I not finding this function on 3 different classes
((Dispenser) this.getBlock().getBlockData()).isPowered();
which Dispenser did you import?
there are two; one for the tile entity and another for the block data
The ones detected by my IDE
you will not get an isPowered from Dispenser
its triggered not powered
a Block has a getBlockPower() which returns a level of power
Note there is no Dispenser as a subinterface https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/data/Powerable.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/data/type/Dispenser.html#isTriggered() If you want its triggered state, else its Block::getBlockPower()
What is the effect for flames?
so annoying, I need to remake my dev environment
I now have an ecossystem that has...5 different plugins and 2 different shaded libraries I made to run one game mode
it's a torment to update anything and test it across mc versions
?paste
Why is foot and head not instances of bed? Theyre being to set to bed block
https://paste.md-5.net/ogeqiyomil.cs
There is the plugin in action, still work to do on it
that looks cool asf
I love how the plugin operates. I wish Songoda has something like this, it be useful for people to use. Not releasing my plugins
when I use EntityDeathEvent event to get the death of an ender dragon, it fires the moment the dragon is killed. however, I want to get the moment when I should start dropping stuff, i.e, after egg spawns/xp dropping starts/finishes
how do I do so?
Maybe? Bukkit.getScheduler().scheduleSyncRepeatingTask(this, (Runnable)new Runnable() { @Override public void run() { for(Miner miner : miners) { miner.mine(); } } }, 2L, 2L);Without the for loop
That should help you but maybe someone can give you another way
?
(Runnable)new Runnable()
That "cast" is useless, does your IDE not scream at you for that ?
And who are you talking to, did I miss some convo ?
Was responding to this but no, it does not. If I need to change how the code is written, I will change it. But right now, I just want to get all the plugins in functional state then I worry about that
Literally what
He's asking a question, not commenting about your plugin.
How does what you responded with answer their question in any way at all whatsoever
Anyway, is EntityDeathEvent too early for what you want or? What. I'm not sure if there is another more applicable event.
I can only think of combination of
Running a task to check for https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EnderDragon.html#getDeathAnimationTicks()
After the dragon phase change event https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EnderDragon.Phase.html#DYING
I was asking about the question
yeah its too early
He is not asking me about my plugin, true. But he was asking how he can detect drops and stuff. I don't know how to really detect that but to throw a timer
Not sure when DYING will fire tho
cool idea. will probably work. would be nice if we could add another event to the api for this though
yeah I dont htink thats an event
yep listen for that, if dying, you can probably just do a delayed task of 200 ticks (length of death animation) and then drop your items
or whatever you're doing
I thought of waitng, but when it dies, it first flies to the center I think
that kinda messes up the timing
I'd probably create some debug logging for when which event fires & the value
or 200-getDeathAnimationTicks() to account for the delay, I suppose.
or +? idk
might have to play with it
I think the animation starts when the dragon reaches the portal, stops and starts breaking
It would not account for the dragon first flying to the portal from the place where it died
Hence why I think you have to start a ticking task
But as person above me said, play with it
dying is when its flying, right?
Don't know
It may be when the animation starts
Again, test this
public static final EnderDragon.Phase DYING
The dragon will fly to the vicinity of the portal and die.
So the DYING phase includes flying to the portal before dying. I assume "and die" means the dying animation (which is 200 ticks long)
Ye just was about to send that lul
So 200 + some time
alr, thx
also, how do I do a repeating task to check?
Well.. this guy already sent it :D
oh lol
I think this allows you to cancel() from within
but like how would I end it
oh ok lol
thanks!
uh how exactly do I cancel from within?
do I have to save the taskid to a variable and use that within it?
Actually you may have to create a BukkitTask
I haven't done this in years so I don't remember, sorry
Wiki has detailed description of dying
Most times, I wish we don't have to use them but we cannot avoid it sometimes
How do I get the bedrock level of a world?
Thanks, ChatGPT beat you to that. Just wanted my miners to reach bedrock
This is the plugin in action
Stop using ChatGPT
You won't get any better with it
Better with what, you not making any sense here?
with chatgpt
I am making sense
Your English is just not good enough I guess
If I want a quick response, I have to try ChatGPT first
First you should check docs
If you were gonna ask ChatGPT anyways, why ask here, you're just wasting our time
I do sometimes but like I said I don't know how long ago. I said that I ask multiple servers then I got threaten with a time out on PaperMC. I not the type of person who would wait 5+ months to get a functional server/plugins. That is one of the reasons I asked for the pirated plugin which I might buy if my money allows, then I got threaten with a ban. So what is it going to be?
You're really annoying
None of what you said is relevant
Stop bringing old stuff nobody but you cares about
Past follows, I don't know what to say. I cannot magically change the past like I wish I would. So if you find me annoying, you can do what other people always does, that is block me. Otherwise, I either keep the peace or try to
I'm just asking you to stop bringing up irrelevant stuff
hey does someone have an idea for how to make a soulbound items, i made one earlier but it was buggy
As in an item that can never leave a players inventory ?
Probably just cancel all events that relate to moving item to other inventory.
For death I'd say force keep inventory and drop items manually if they're not soulbound
how much does Task.runtasklater affect the performance(if at all) compared to a single task that runs every tick?
For example, if i want to restore a certain block type after its broken,
Should i A: runtasklater and cancel the block break event.
Or B: Add the block to a hashmap and iterate through the hashmap in a Timer task that runs each tick(maybe 5 ticks).
Which would be better?
If your A is: store the event and cancel it later
Then hell no, that is not only beyond cursed, but will not work.
I mean not cancel, yes, i meant :
Store the block type
Run a scheduled task inside of the event to replace the block type to the stored one.
something along the lines of this:
(BRO, PSEUDOCODE WRITTEN BY RUSSIAN SCHIZO, CHILL OUT😭)
@EventHandler
public static void(Event e){
Block b = e.getBlock();
Material MatReturn = b.getType();
BukkitRunnable BR = {
public void run(){
b.setType(MatReturn);
}
};
BR.runtasklater(plugin,12l);
}
Would this be heavy on the server?
formatting please
Bro i just wrote it out of my head😭
oh it hurts bad the more I look at this
oh- ok
Hope you follow java naming conventions in your actual code
It'll be read only by me, so unfortunately no
I never really gave it too much thought . As a wise man once said "if it works it works"
Good? no.
I mean sure, just never show us then :D
i just wrote it to get across what i mean
😭
thanks i will try that then ig
Will that be worse than a single timer task that check every tick inside a hashmap, or better?
You don't need a hashmap
There are some optimizations you can do here
For this you'd be "letting java handle it" partially
So I have no clue how it would do
i mean it looks like it would hurt the server but uhhh
depends whta the event is
I personally would not do a task per block, I'd optimize the ticking task
but either way it would be a negligible performance diff
oh, fr?
yipee
gona do some more devious shit then😭
true
Remember that stuff like stairs exists, so storing just the material may not be enough to restore a block later.
oh yea
Depends on what you're doing tho.
Just copy the world file, then when you need the block load the world and get the block at that given point
It was just for an example, of an either using a loop, or multiple runtasklaters
my brain melted
gona leave before it gets worse
😭
👍
us fr
Ok, in a nutshell, (non native moment, mental degradation), what i meant is if the ammount of tasks that were scheduled over the span of the server, can affect it's tps and performance (idk, maybe it has to iterate through more)
And also an added question i've just had, if it has a limit to ammount of schedules the server can handle
@Override
public void run() {
BukkitRunnable BR = new BukkitRunnable() {
@Override
public void run() {
plugin.getServer().sendMessage(Component.text("Task ID:"+this.getTaskId()+" | TPS:"+plugin.getServer().getTPS()[0]));
}
};
BR.runTaskLater(plugin,10);
}
},0L,1L);```
idk why i thought the ammount of tasks scheduled previously, can affect the performance, i just wanted to give it a shot and see if it has any actual impact or not.
Honestly should've done this myself, not to make myself a fool. Already at task 8k and i now am sure that it doesn't affect it that much.
Ye just running a task like this won't hurt the performace in the long run
?whereami
stop being an asshole, i told u im banned there. plus isn't the bukkit runnable still the same BUKKIT runnable on paper?
you are still using paper and this is spigot
you're banned there for a good reason
honestly, i'd say u're trolling at this point
gonna block you so that i dont get triggered

Yo why they banned there ? :D
check profile and take a guess
not necessarily. API doesn't guarantee implementation is the same or that it works exactly the same way behind the scenes
also, paper deviated from spigot some time ago
hm
actually probably ye
therefore nothing in spigot is guaranteed to be the same in paper
I like writing essays on paper using a pen
heyo guys i need help with custom mobs again
- How could one make something like the bedbugs in Bedwars (custom iron golems) that attack players of a different team?
- Custom mobs I currently make also do not save between resets and I am wondering how to implement this
i recall the NMS target selector
which does work
Do you need custom mobs ?
Just setting the mob on the same team with the players should work.
(or are those two separate things)
this is an experimental factions plugin type thing im testing, trying to make each faction be able to have their own defenders that attack non friendly faction players
so the factions are coded and can be checked
Aaah
can i add this to target selectors ? Or is that not how it works
like can i do a check if the targeted player is in said faction , and not target it
Ye that sounds doable
For the persistency
I think it was "give it a custom pdc tag, on entity load: despawn that entity and respawn your custom one"
my original idea im not sure if it's good anymore; was planning on tracking the position coords etc and then reloading the custom entity data
dam pdc
can u give me any guides or docs on that
?pdc
and to check if it's the correct entity would this be a coordinate check ? or some other way
no ?
Check the PDC of the entity
hmm
Use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/EntitiesLoadEvent.html
Iterate over each entity
Check for PDC
Do the respawn thing
in this case would pdc have to be unique for every custom mob?
im trying to think about how to differentiate between the faction's for each mob
the PDC should be "I am a custom mob of this type"
You can use PDC to store other data too
gotcha
so i coudl use that to store said "team" aka faction, and the mob custom type
exactly
PDC is a wrapper over the custom_data component, or NBT on older versions
im saving this image
looking at the docs for Bisected (block data), and it says how its halves denote the top or bottom half of a 2-tall block like a door. but it also has stairs or trap doors as implementations, but strangely enough not slabs
is that a mojang moment or could that be improved on spigot side
Slabs don't have that 'cause they have 3 states
Top, Bottom, Double
right that makes sense
https://paste.md-5.net/duvesefado.xml
this is what I'm using to compile individual package how every it is output .java which is not compiled can anyone help me with this
no||t on spigot||
?paste
It's a good thing I can't read spoiler text
You can read?
For people asking for the view-distance. I just researched it.Its actually a spigot setting. You're looking for entity-tracking-range in spigot.yml. Then player under that. Distance in blocks. I think you need to change other too because it says "Other is a general maximum limit for all entities on your server" on Spigot's site. Source: https://www.reddit.com/r/admincraft/comments/11cujw6/papermc_player_draw_distance_lower_than_view/
entity-tracking-range is for entities, view-distance is for chunks
that does not change the fact you can't change it from the api
huh
stopSound is doing something weird
[12:32:48] [Server thread/WARN]: [EliteMobs] Task #17944845 for EliteMobs v9.3.2 generated an exception
java.lang.NullPointerException: Cannot invoke "String.indexOf(int)" because "location" is null
at net.minecraft.resources.ResourceLocation.bySeparator(ResourceLocation.java:82) ~[paper-1.21.4.jar:1.21.4-177-e5a8ee8]
at net.minecraft.resources.ResourceLocation.parse(ResourceLocation.java:64) ~[paper-1.21.4.jar:1.21.4-177-e5a8ee8]
at org.bukkit.craftbukkit.entity.CraftPlayer.stopSound(CraftPlayer.java:927) ~[paper-1.21.4.jar:1.21.4-177-e5a8ee8]
at org.bukkit.craftbukkit.entity.CraftPlayer.stopSound(CraftPlayer.java:915) ~[paper-1.21.4.jar:1.21.4-177-e5a8ee8]
at EliteMobs.jar/com.magmaguy.elitemobs.mobconstructor.custombosses.CustomMusic.lambda$play$1(CustomMusic.java:139) ~
<...>
((Player) player).stopSound(currentCustomMusic.name2);
what is that, a player going offline?
what is it even trying to do with the location
that can't actually be a bukkit location right
resourceLocation
does it think that sound doesn't exist?
maybe it's location as in resource location rather than bukkit location
which, iirc the packet lets you stop a specific sound
so I am going to guess the sound somehow managed to just not exist and it results in an error
can't replicate it
💀
parse and bySeparator expect a string to parse
are you maybe passing a Sound rather than a string?
I could maybe possibly see Sound.getKey() being null
public void stopSound(Sound sound) {
this.stopSound((Sound)sound, (SoundCategory)null);
}
public void stopSound(String sound) {
this.stopSound((String)sound, (SoundCategory)null);
}
public void stopSound(Sound sound, SoundCategory category) {
this.stopSound(sound.getKey().getKey(), category);
}
make sure the key you're passing isn't doing something weird
hm, I'll just kill the error and output a debug line for future reference just in case
i don't see any data flow path apart from that getKey bit that'd result in a nonnull string ending up as null by the time it gets to that line
well, guess 3 months from now I might get a hint about it
when it gets reported as just a console message
How do I check if the area is air, water or lava? No solid blocks
Block.isSolid iirc
That is for one block, I need a area
Yeah just iterate over the area and check .isSolid
I did that and its not working public boolean isYLevelEmpty(int y) { for(int x = -size; x < size; x++) { for(int z = -size; z < size; z++) { if( this.block.getRelative(0, -2, 0).getRelative(x,-y,z).getType().isSolid() ) { return false; } } } return true; }
There’s no api for checking a region
Well you’re not using the integer you passed that method, why are checking 2 below? Just use the Y variable you passed
Because 0 is the miner if I don't do -2
So then why are we even passing a int for the y axis
Also you check the relative of some block not contained in that method, so god knows if that’s even the block you’re currently iterating over
There is a function that calls this. I not getting up to send that function but this is why I asked if there is a area scanner I call it
No there’s not, you need to do that yourself, I figure the issue is with the duplicated .getRelative call
Why is foot and head not instances of bed? Theyre being to set to bed block
https://paste.md-5.net/ogeqiyomil.cs
Should be getting the block at x,y,z then checking if it’s solid
They changed packets again on 1.21.4. Does someone have a link to some updated wiki where I can see updated packets?
It was moved to minecraft wiki
But was not updated since
What packet id do you wanna know
It pisses me off they keep changing things constantly
Like 1.19 changed, 1.20 changed and they changed it again on 1.21
Like wth bro
I know :)
I'll let you know when I'm on pc. I'll send my code here
I made it support 1.8-1.20
Ping me otherwise i will not notice
private void prepareGame() {
int playersInServer = Bukkit.getOnlinePlayers().size();
if (playersInServer >= 1) {
Bukkit.broadcastMessage(ChatColor.GREEN + "Le jeu va pouvoir commencer !");
new BukkitRunnable() {
int timeLeft = 5; // secondes
@Override
public void run() {
if (timeLeft > 0) {
if (Bukkit.getOnlinePlayers().size() < 1) {
Bukkit.broadcastMessage(ChatColor.RED + "Le jeu ne peut pas commencer sans 2 joueurs !");
cancel();
}
Bukkit.broadcastMessage(ChatColor.GOLD + "[1vs1]" + ChatColor.RESET + "Le jeu débute dans " + ChatColor.RED + timeLeft + ChatColor.RESET + " secondes !");
for (Player p : Bukkit.getOnlinePlayers()) {
p.sendTitle(ChatColor.YELLOW + "Début dans " + timeLeft, "", 0, 20, 0);
p.playSound(p.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0F, 1.0F);
}
timeLeft--;
} else {
Bukkit.broadcastMessage("Bonne chance à toutes et tous !");
giveEquipment();
teleportToSpawn();
this.cancel();
}
}
}.runTaskTimer(this.plugin, 0L, 20L); // 1s = 20 ticks
}
}
I'm getting a little problem, when the timeLeft is 0 I get items and teleported but I can't move because it still doing the BukkitRunnable, why?
It's doing this part in an infinite loop:
Bukkit.broadcastMessage("Bonne chance à toutes et tous !");
giveEquipment();
teleportToSpawn();
this.cancel();

Well, now it works, no idea why it wasn't working before...
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, new AttributeModifier("generic.attackDamage", 7, AttributeModifier.Operation.ADD_NUMBER));
my modifier is in every part of the item i want the modifier in the Main Hand only what do i need to change here
Pass the main hand as the next parameter in attribute modifier
Actually you appear to be using the deprecated constructor
declaration: package: org.bukkit.attribute, class: AttributeModifier
@EventHandler
public void onPlayerDeath(PlayerDeathEvent event) {
Player player_whois_dead = event.getEntity().getPlayer();
if (player_whois_dead == null) {return;}
String serverName = player_whois_dead.getServer().getMotd();
if (!serverName.startsWith("1vs1")) { return; }
for (Entity e : player_whois_dead.getWorld().getEntities()) {
if (e instanceof Item) {
e.remove();
}
}
player_whois_dead.spigot().respawn();
player_whois_dead.setGameMode(GameMode.ADVENTURE);
Bukkit.broadcastMessage(ChatColor.GOLD + "[1vs1]" + ChatColor.RESET + " Le jeu est terminé, nous avons un vainceur !");
Player winner = null;
for (Player p : Bukkit.getOnlinePlayers()) {
p.teleport(new Location(p.getWorld(), -2.5, 111, 0, 90, 0));
int isVanished = Integer.parseInt(getKeyFromPlayer("vanish", p.getUniqueId().toString()));
if (isVanished == 0 && !Objects.equals(p.getUniqueId().toString(), player_whois_dead.getUniqueId().toString())) {
winner = p;
}
if (winner != null) {
p.sendTitle(ChatColor.YELLOW + "Félécitations " + ChatColor.RED + ChatColor.BOLD + winner.getName(), "", 0, 60, 0);
p.getInventory().clear();
break;
}
}
new BukkitRunnable() {
int timeLeft = 3; // secondes
@Override
public void run() {
if (timeLeft > 0) {
timeLeft--;
} else {
for (Player p : Bukkit.getOnlinePlayers()) {
p.performCommand("lobby");
}
this.cancel();
}
}
}.runTaskTimer(this.plugin, 0L, 60L); // 1s = 20 ticks
}
Why I have the death "menu" when getting killed?
i see about 5 too many toString's in there
((message)rookie numbers).toString();
Try delaying the respawn by a tick or two