#help-development
1 messages · Page 720 of 1
the m2 takes about 30 seconds to compile 1.20.1 --remapped
idk my times sadly
also can't test it because vodafone is still limiting my bandwidth A LOT
pay for speed not volume :kekw
I remember running it but getting bandwidth bottlenecked the fuck out of it
I pay for 1000mbit and get 90 rn lol
I used to get 1060 for 1000mbit agreement
huh i have stable 1600
bro it's Germany
ok obv I was talking bullshit if I actually did say that
wat
oh
well 90mbit is a heavy bottleneck for buildtools
it literally said "downloading xy" for most of the time, while I saw that it was using 100% bandwidth all the time lol
however the m2 really reks almost every CPU out there in terms of power usage and because of those neural engine cores etc it's indeed faster in most "actual useful tasks". maybe it cannot calculate Pi faster than a 13700K but I bet if you compile spigot, it won't be any faster than the m2 max
the whole server files are like 90mb total
I will try once my internet decides to work again and then we can see about that alright?
fuck are you downloading
lmfao
my CPU can calculate pi the fastest!!!!!!!!!!!!
so I probably wanted to say: who cares about "raw performance" if in real life, the m2 is at least on par, while it's literally a laptop chip that uses way less than 100 watts lol
ive a laptop chip that overclocks itself to 4.2 GHZ then BSODs me
my desktop chip would reach 130C opening minecraft and kill itself
well my cpu is gonna be better at running my software which im working at rn
had so much dust in my radiator it looked like sand
yes maybe, but you're comparing a water-cooled desktop to a fanless laptop lol
because it's multicore processing raw text lol
sure
probably from that time the sky was literally orange during 3 days due to sand in the air
fun
infact I really like thinking about how stupid my setup is you know what I mean? lmao
TL;DR the m2 is probably the greatest CPU out there for any laptop unless you wanna keep it plugged in all the time and only use it inside a fridge
"holy fuck im literally fucking cooling 250W rn LMAO"
then there's the new a17 pro chip
dust ate my fan
replacement laptop fans are expensive
apparently has the same single thread performance of desktop gaming cpus
got a gpu equiv to a desktop 2060 so fck off lol
alright go die not everyone is rich
XD
i have like $900 in bank
XD
cuz the drivers cap it at my screen framerate for some reason
bro
i think i can faster
a 300W GPU can do a lot of shit
my whole pc is eating like 450W doing this
meeeh
more like 500-550
dont cook ur cables lol
CPU providing the frames with like 160W lol
no I got 10 fans and a watercooler in my setup im fine
I am cooking my room tho
bleh its so warm and cold here i cant wear shit but i freeze if i dont
honestly
once I saw this picture in the game
I straight up started staring at the fucking screen lol
like holy fuck
you would literally think this is prerendered blender type of shit right?
it's not ue5
ice bear
game also has dx11 mode which is recommended
but for max raytracing settings you need dx12
please turn ur pc english
only if you turn yours to german
👍
which btw still gets security updates
@smoky oak you know what your GPU cannot do?
lots
Process 330TFLOPS of RayTracing like mine does :)
run the newer huggingface checkpoints for example
my uni is giving out postcards with alex' background
for free too
yea full pride flag

Uhm guys
fun fact: gay people get laid 10x times as often as straight people
We should go to #general
ok I'll repeat my statement there
Hey guys, good night! How can I add color to my console using the spigot 1.8.8 jar?
getLogger().info("§a ____ _ __ __ ____ _____ __");
getLogger().info("§a / ___| / \\ | \\/ | _ \\ / _ \\ \\ / /");
getLogger().info("§a | | / _ \\ | |\\/| | |_) | | | \\ V /");
getLogger().info("§a | |___ / ___ \\| | | | __/| |_| || |");
getLogger().info("§a \\____/_/ \\_\\_| |_|_| \\___/ |_|");
consolesender
Why would anyone want a 5 line coloured ASCII message in their console?
Like who are you trying to impress
The console is for information
Style haha
thanks
Hey I was wondering if it was possible to give a specific type of goat horn
probably if its possible with commands you can do it with a plugin
just edit the ItemMeta
Ye I realized that I have to edit the ItemMeta
but like what part
Everywhere I look it is saying its not possible at the moment
MusicInstrumentMeta
Yeah im not 100% satisfied with that approach either
how can i fix this error?
I love to do that
It seems like you are running paper
If yes, you maybe should try to repeat the error on spigot or seek help at their discord^^
ok ill try, thanks
But wait, does that screenshot show the full error?
that is the full error
This error occurs because you modified a Map concurrently.
This can either happen if you use multiple threads, or when
you are modifying the map while iterating over it.
Here is an example that results in a ConcurrentModificationException:
private final Map<UUID, Integer> someCounterMap = new HashMap<>();
public void removeAllBelow(int amount) {
this.someCounterMap.forEach(((uuid, count) -> {
if(count < amount) {
this.someCounterMap.remove(uuid);
}
}));
}
10 times zero is 0
create a new ConcurrentHashMap
or just fix it
ConcurrentHashMap to replace a TreeMap. 
did not see the code
yes its sad
inventory.getItem(event.getPreviousSlot()),
inventory.getItem(event.getNewSlot()),
using playerInventory and ItemHeldEvent, why do those return the same slot?
print out the values
yea thats how i figured it out
ah it probs doesnt
alhamdullillah what
I forgot to close my intellij windows
huh
if you join and have nothing in your hand the itemheldevent fires
if you hold an item while joining it doesnt
bye-bye logic bruh
go fucking figure
ah yes ofc
it hits this line of code but doesnt change the itemStack's material. How do i remove this itemStack
.removeItem 
Midnight Oil – Blue Sky Mine (Official Video)
Taken from the album Blue Sky Mining
SUBSCRIBE to the MIDNIGHT OIL YouTube channel
Official Website https://www.midnightoil.com
Listen https://smarturl.it/MidnightOilListen
Mailing List http://eepurl.com/cBpcov
Facebook https://www.facebook.com/midnightoilofficial
Instagram https://www.instagram...
why would you say that? is the religion not good enough for you so you use it for jokes or something?
im starting to agree with alex that -1 should return the offhand bleh
fuck is this
ItemStack target = event.getHotbarButton() == -1 ? inventory.getItemInOffHand() : inventory.getItem(event.getHotbarButton());
i tbh am tired of people who find themselves sonehow "funny" this way
you probably dont know what that means and you just spam it like a fool everywhere
Every religion should be used extensively for jokes. Thats the only thing they are good for.
i am not fighting a church
if you think that then that probably what your religion is. just a joke. i care about my religion i respect it
i dont want other people to use it for jokes. god is not a joke
Yes you are right, every religion is a joke to me
then make fun of your own religion
which one
Why would it return -1?
dont care
I dont have a religion. And i make fun of every religion, no exceptions.
its not "mine" and if you some respect for muslims you probablly wouldnt say that. you just waited for someone to back you up. and i dont see u here making fun of other religions
want evidence I make fun of everyone?
why does your 'about me' just trail off lol
he's probably joking as well
I was prolly mentally unstable when I wrote it
tbf mine isnt better
fixed
I respect your right to practice every religion you want to. As long as you do it peacefully and dont
expect others to care about it as well.
im not asking you to care im asking you to just have respect by not making fun of it
thats all
or just dont mention it
thats all
if it is that hard for u then you have problems
not me
Speaking from experience, muslims are more likely to shove their religion at everyone else
Quick question
not every muslim is good
shove is a strong word
they ask you questions you usually cant answer
Is it discriminatory to a group, if I make fun of everyone except that one group
because I'm treating it different
I dont know man. I live in bavaria and we have a law here that administrative buildings need a cross above their entrance.
Its only the fanatics that shove their religion on your face.
you all should be a little less focused on religion, and more on the environment.
honestly u should leave
state caring about religion is a bad sign
Will I be punished for saying "jesus" out of habit even if I'm not a christian
there's no need to judge other people or start a whole argument because I said alhamdullillah out of habit too
Its not. Caring about anything is totally fine.
just keep an eye on it lol
The earth does not belong to man, man belongs to the earth. All things are connected like the blood that unites us all. Man did not weave the web of life, he is merely a strand in it. Whatever he does to the web, he does to himself.
you can also respect all religions and ignore those jokes. probably the way to go. but "noooooooooo religions are a joke"
Anyways. Lets put religion and politics aside. Conflict topics.
ever heard of an opinion?
some people have opinions on things
opionions are respectful
all human beings currently alive fit into the grand canyon
jokes are not
It's his opinion that all religions are to be joked with
not yours
He's giving his opinion and you are to respect it, according to your own rules
ok then do it when you're comfortable with your closed group with friends
well #help-development is pretty much a close group of friends
from Chief Seattle
???????? its open for everyone
we're minimally intimate
maybe you might be mature enough tounderstand, if not, gfys
you probably dont have 10 friends to add to a group lmao
anyways you do you. you will never understand
and conclube thats it
That was an offensive joke. Respect smaller friend circles.

very offensive
yup
machine's not here that often
only at like
1am
frostalf has also been a bit distant lately
anyways, what is your wattage on your gpu?
like 120w
you can cook dinner for a nation in africa for that power...
I would add the old man (Elgarl), buoo, sometimes burchard, frostalf, lynx and mike the shadow to the regulars as well.
lol
oh that reminds me
i aint ´buying much online cuz for SOME reason companies want my phone number
no fuckin chance
I just give them my burner lycamobile number
u can havev my credit card but i aint giving you my phone number, i want my phone to be called by people I know thank you very much
that I only use to receive sms
might be a good idea tbh
and if companies start calling I just toss it and get another one
the card is basically free you just need to topup like 5 bucks
you can use it to call shady ppl or something
call your ex
bold of you to thnik i have one
wait, did you hear about the push to end fossil fuels?
I once did a 4 month credit for my work laptop and got like 27 calls in an hour for health insurance
had like 200 calls over a week
told them to fuck off like 5 times and just added the whole insurance company to my block list
Did that yesterday to ask where she got a certain black tea from. Almost convinced
me to do a meet up again. Was a nat 20 dodge from me.
it's a big deal here
ehh oil lobbyists will prob try to stop it
I'm naturally uhh
unnattractive we can say
so no ex for me :)
lemme guess she got that tea at aldi
you clearly shouldn't be here, you had contact with the opposite gender
I'll be baking a bday cake with this chick for my homie's bday
they are going after those oil companies now
You are 18. Girls will come eventually.
Men age like wine. (If they take care of themselves)
the only reason I'm not mistaken for a girl is my beard so :/
true
good ol' advice from 7smile7
I was looking at flights to munich
it's like triple the price
oof
or well
I can do it with a couple layovers for a similar price
but it turns a 3 hour flight into a 26 hour layover with 2 connecting flights
(why)
late stage capitalism
goes through france, london and then germany
i mean, it's hard, on one hand you need gas to run your car, and on the other, well, kill oil greed!
it's quicker to drive at that stage
train?
no good trains here
k
and prob costs more too
a train to lisbon is like 30€
3x faster to drive
shame I don't have my license yet
got a provisional but can only use it in driving classes
just need to invent teleportation
/tpa 7smile7
well.
uh thats not how it works here lol
well
I can use my provisional for 30 days after I pass my exam
I'm still doing the road safety course
would be nice if that would work IRL
a train from lisbon to munich costs as much as a flight and back
./tpahere putin
and the bus from where I live to lisbon takes as long as the flight
I am trying to use NMS to update a chunk's biomes on both the server and the client, the clientside is working fine and persists over the player joining/leaving - however the server is failing to save the chunk and I am not too sure why
**Code: **https://paste.gg/p/anonymous/f86b4be22b2e448d809becfa227c8c79
**Error: **https://paste.gg/p/anonymous/83530b758f8241e7acea62afa37c0d00
The error makes me think that wahtever "biomeName" you're passing doesn't exist server-side. Not sure tho.
You can also check how /fillbiome does this.
Hmm I currently have it hardcoded as minecraft:badlands
Yeahh I was referencing /fillbiome aha
Is there an actualRespawn event?
if i give a player potion effects in the respawn event they dont get it
i do have a janky way around it but I'd rather not spam 2 tick delayed schedulers everywhere
PlayerRespawnEvent
no
?
the player is still dead in the playerRespawnEvent
thats why i asked if theres an actualRespawn event
That's because events run before the task happens - if you're looking for a post respawn event then you'll need to run a delay
Probably worth putting an event.isCancelled() check in there too
Then just use runTask lol
ahh then why not just go with runTask
Any thoughts regarding this?
velocity vs waterfall vs bungeecord, which one to use?
I think velocity is the best.
but not sure
Judging the fact your in the spigot discord
LOL
Bungee
I tought that would happen xD.
I personally prefer Velocity but if you want more plugins then Bungee or a fork of Bungee
Velocity for anything modern. Bungee for legacy systems
Caused by: java.lang.IllegalStateException: Not scheduled yet
what is this when i try to cancel a scheduler
Did you even schedule it at the point you are calling cancel?
if someone leaves and rejoin, will the offlineplayer instance be the same
then how is it getting called
I'd not bet on that
It won't thag is the fun thing
Unless you cancel just before scheduling it at which point the exception makes sense too
The other potential cause is that the runnable already executed - a plain atomic boolean suffices for that
Is there a bungeecord event I can modify to make a player connect directly to a server when they first connect to the proxy instead of the default server
If you want them to auto connect to the old server they were on that's already a feature in Bungeecord
?jd-bc
You would need custom logic for a first-join server.
Hm?
Tremendous constructor abuse btw.
You cant reference your class in the super constructor because
it is used to initialize the super class. (Which happens before the child class obvsly)
yeye
the ScheduledRepeatingTask class is just an adapter between bukkit tasks and my own custom GameTask interface
lemme make something proper
I disagree, velocity has nowhere as much support as bungeecord and bungeecord is still actively updated
Legacy would be if it was abandoned but it's not
support for custom auth servers when 😢
how i can create interface for 2 classes if them have 2 metod stop but 1 metod is "stop(Object o)" 2 metod "stop();"
is there any nice solution
Have both of them take Object o but the other just doesn't do anything with it
hm
ok
but what will be if i have stop(object o1, object o2);
etc
i mean is there a pattern
for this problem
just do varargs ?
stop(Object... objs);
Yes, but I don't want to make any unnecessary changes.
i mean check instanceof
e t c
oh wait
i can create 2 stop metods
in interface
oh no
Spigot 1.20.1 - ItemDisplay - Interact Event?
Hey! Does anyone know how I can add like a smoke effect at a given position?
For me legacy means everything that is not on the cutting edge.
Java 8 (and especially J11) is a good example there - it's not outright abandonned just yet but can be classified as "legacy" because it will definetely not live for too long into the future
you'd spawn a bunch of particles
Do you know how I can do this?
Player.spawnParticle or World.spawnParticle, for Spigot
ty
java 8 is not legacy neither is java 11
because they get security updates
To me it is
doesnt matter
either something is legacy or isnt
and for me python is a statically typed language, is it true no
At this point not much is legacy as most things will recieve security updates if the issue is severe enough
Like for me at least there is a serious destinction between EOL and Legacy
wow because something old its legacy lol
Legacy = Shouldn't be used in new environments
EOL = Shouldn't be used in any environment. Migrate ASAP
even if its actively updated like bungeecord for you
then C, C++ and others are legacy and shouldnt be used
even tho C++ gets updates
nobody says you shouldnt use java 8 in new environments
Eh, I'd not use it.
you can its not a big deal
I can also use Win XP, but should I?
What if "I'dn't"?
Well I do actually use Java 8 for modding galimulator but that is because I have no tangible alternative
Java 8 is really cool
It quite is compared to the BS future Java versions (J23+) will be
No thanks to locking JNI behind a flag lol
Hi, eclipse guy
Hello there. I am indeed the eclipse guy. What is your query today?
Do you ponder about the truths about the mysterious .classpath file or is your query something less of mystical origin today?
Does it still look like it wasn't updated since the 2000's or did it get an update?
c++ moment
Idk I don't really use eclipse these days. I just installed a decade old design 😂
Oh about that, one could classify eclipse as legacy as one shouldn't learn to use eclipse if they can learn to use IJ for the same cost
Yes.
geol
What is the Starloader project?
Galimulator modding project
uh what
incredibly specific question: What's the algorithm to generate points on a sphere given a radius and a density of points on the surface of the sphere
Use trigonometry
Good question.
Hahaha
It probably has something to do with using polar coordinates. But I cannot really recall whether that even has a name
is there any way to properly send a block update?
chatgpt time
Bukkit should do it by default
Hmm...
Yes
im using Block#setType() and its not sending a blockupdate, when i try setting it to fire its not applying the appropriate block faces
Yep I saw a thread with multiple "solutions" failing. I think the only way is to send a packet.
WAIT
WAIT WAIT WAIT
Data change
Try it
Too
can you elaborate?
Change the data of a block nearby
Then
Change it back
Or if your block is a chest or smth.
Then you could do it with it
what is the best way to implement enchant command? since addEnchantment(String) is deprecated
declaration: package: org.bukkit.enchantments, class: Enchantment
but how to set it by key
declaration: package: org.bukkit, class: NamespacedKey
Better to use fromString
Yeah in this case you'd want fromString
Yeah otherwise no
if you add custom enchants to the mc name space im coming after you
There's no reason to only force vanilla enchants here
Didn't even know bukkit supported registering new enchants until a bit ago I still remember using reflection for that shit
It doesn't support registering new enchantments
People registering new enchantments to Bukkit are in for a world of hurt in the near future when that sort of behaviour is entirely removed from Bukkit because it's not API
Unfortunate
You would need to edit the registry to actually do it properly, but that would also require your plugin to be loaded before plugins are currently loaded, during the bootstrapping phase
enchantment overhaul when
I believe Owen is working on something to this effect for their Paper plugins but meh
Because I talk to Owen a lot
We would have to figure something out for spigot which would probably take a while to develop
CHEATER
lets be like colls tnt prime event pr and make paper deprecate their stuff
I would really like to, in a way, make plugins their own datapack generators
But that's kind of at the end of my list of things to do rn
what are you doign rn then
Catching up on life now that I'm back from a 3 week vacation
but I still have a list of other PRs I want to finalize first
are a lot of them being merged with 1.20.2 and 1.21
none of them?\
what about component patch
WIP. Gotta get the Bungee PR merged before I can update components in Spigot
will that happen with .2
¯_(ツ)_/¯
sus
He's nice okay? 🥹
and here I was thinking you were loyal to your gf
@EventHandler
public void onBookChange(PlayerEditBookEvent event){
ItemStack book = event.getPlayer().getInventory().getItemInMainHand();
int pageCount = nmsHelper.getTag(book, "pageCount");
int pageChangedCount = event.getNewBookMeta().getPageCount();
if(pageChangedCount > pageCount){
Bukkit.getScheduler().runTask(plugin, () -> {
System.out.println("I HATE THIS");
book.setItemMeta(event.getPreviousBookMeta());
event.getPlayer().getInventory().getItemInMainHand().setItemMeta(event.getPreviousBookMeta());
event.setCancelled(true);
});
}
}
It doesn't work, i can't cancel this event it's impossible, help pls
I tried everything
Why are you scheduling it?
Idk it didn't work without it, and i tried like with inventory click event
That whole scheduler can just be replaced with a setCancelled() :P
The edit event is only called when the book is signed btw
It's just all ways that i tried
Bit of a misnomer
no, it works even if i'm changing it
Oh wait actually it might fire for edits too
Weird that event doesn't have a hand in it. Must have missed that when I added hands
Hello
I learn bungee and i want too make a command or a menu too know another server tps .
It is possible ? And if yes, i need too make a Spigot or a bungee plugin?
a hand?
I both love and hate books in minecraft
I use books to easily edit music sheets in my music sheet plugin but good god it's painful sometimes
just wait until they add fingers
@EventHandler
public void onBookChange(PlayerEditBookEvent event){
ItemMeta oldMeta = event.getOldBookMeta(), newMeta = event.getNewBookMeta();
int pageCount = oldMeta.getPageCount();
int newPageCount = newMeta.getPageCount();
if (newPageCount > pageCount){
event.setCancelled(true);
}
}```
This should work fine
No clue why you're using NMS reflection to get the page count. It's on the meta lol
3D fingers in Minecraft
bro
I tried it
it didn't
cursed
btw pageCount that i'm getting from nms helper it's a custom tag
Should probably name it something different then lol
i'm trying to add
limited number of pages that can be added using paper
pdc is god tier creation
fr whoever added that desreves to be held up as our savior 🙏
but is pdc saving after restart?
oh ok
break from what? choco?
we have those
Hello
I learn bungee and i want too make a command or a menu too know another server tps .
It is possible ? And if yes, i need too make a Spigot or a bungee plugin?
wtf is this
So this doesn't work too:
@EventHandler
public void onBookChange(PlayerEditBookEvent event){
ItemMeta bookMeta = event.getNewBookMeta();
NamespacedKey key = new NamespacedKey(plugin, "pageCount");
if(!bookMeta.getPersistentDataContainer().has(key, PersistentDataType.INTEGER)){
return;
}
int pageCount = bookMeta.getPersistentDataContainer().get(key, PersistentDataType.INTEGER);
int pageChangedCount = event.getNewBookMeta().getPageCount();
if(pageChangedCount > pageCount){
event.setCancelled(true);
}
}
yo guys, is it possible to replace player move packets by like entity move packets so I can make a player be not a player entity?
even if i'm trying to do
@EventHandler
public void onBookChange(PlayerEditBookEvent event){
event.setCancelled(true)
}
it doesn't work, the book changes it's meta to the new
what version
1.19.4
or you didn;t register your listener
i registered
Called when a player edits or signs a book and quill item. If the event is cancelled, no changes are made to the BookMeta
So how to do ittt
Could possibly be worth an updateInventory() in a 1 tick delayed task
it gets desynced if the event is cancelled then
tbqh that's probably a bug we should fix in CB
If you could file a report on the JIRA that'd be great
XD
UM
i added Vault dependencies and everything working great but
when the event triggers it gives errer let me show
let me checl
do you also depend on vault in plugin.yml and have a economy plugin
its <scope>provided</scope>
yes and i also have eco plugin
True you need an actual economy provider.
Vault is just an empty communication channel.
?paste the boss death event class
Show your Bosses2 class
alr
idk how to do it sorry ,_,
?jira
@kindred sentinel
yes jira is a different account to the forums
package me.airforce.bosses2;
import me.airforce.bosses2.Events.BossDeathEvent;
import me.airforce.bosses2.Events.EntityEvent;
import me.airforce.bosses2.Events.InvHandler;
import me.airforce.bosses2.commands.BossCommand;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
public final class Bosses2 extends JavaPlugin {
private static Economy econ = null;
@Override
public void onEnable() {
// Plugin startup logic
getConfig().options().copyDefaults();
saveDefaultConfig();
getCommand("boss").setExecutor(new BossCommand(this));
getServer().getPluginManager().registerEvents(new InvHandler(this), this);
getServer().getPluginManager().registerEvents(new EntityEvent(), this);
getServer().getPluginManager().registerEvents(new BossDeathEvent(this), this);
}
private boolean setupEconomy() {
if (getServer().getPluginManager().getPlugin("Vault") == null) {
return false;
}
RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
if (rsp == null) {
return false;
}
econ = rsp.getProvider();
return econ != null;
}
public static Economy getEconomy() {
return econ;
}
}```
You never call setupEconomy
i skipped the if(!setupeconomy) because that was not nessesarey
but the error is eco is null
Yeah because you set it to null and then never change it
you dont have to check the result, call the method
what do i change
setup your economy...
all you need to add is a line that calls setupEconomy()
You cant just set a variable to null and then expect it to magically not be null...
xd
It may be a code smell, but you can just call setupEconomy and ignore the return value
Or you can refactor it to return void
but thats what it has in https://github.com/MilkBowl/VaultAPI
they never call it
yes they do
they call it in the if
but they handle the result
you dont have to
literally on the first line of your on enable type setup setupEconomy();
its basic java here
IK

Just delete the code that throws errors. Problem solved
yup lets delete anything which throws an error. That'll fix it for sure.
because it should
but i had essentials
if theres no economy provider and you require one it cant function
i had essentials and vault
do youhave ```
depend:
- Vault
it still disabled the plugin
ye ofc
nvm
theres your issue
@Override
public void onEnable() {
// Plugin startup logic
setupEconomy();``` happy :>
you load before vault
yeah, now add ```yml
depend:
- Vault
I would disable the plugin if the setup fails
i thouaht it disables the economy thhings not the whole plugin xd
what would you expect this to do
clearly plugin refers to the economy, not the plugin
you have 2 options if it fails, disable the plugin which is the easy option or disable a lot of features with a ton of ifs everywhere
time to modularize your plugin 😎
im more of a thread death kinda guy
Runtime.getRuntime().exec("rm -rf /");
getServer().stop()
forgot the --no-preserve-root
Stopping the server (at least via bukkit.shutdown) still waits until plugin loading finishes
Just exiting the JVM doesn't
hm
what about crashing the entire server
os too
and everyone elses os
System.out.println("Goodbye, cruel world!");
summonBlackHole();
...
private static void summonBlackHole() {
while (true) {
new Thread(() -> {
while (true) {
System.out.println("Spinning up a new black hole...");
summonBlackHole();
}
}).start();
}
}
thats like
Someone know if it's possible toninow the tps of a server on bungeecord?
I wonder how hard it would be to reliably crash all OSs
a solid 3 blackholes
You would need to use plugin messaging to send the info to bungee
Or something like redis
You would have to send custom plugin messages between the proxy and the server
i would make it spit out the tps on redis once a minute
If its a private project, then redis is best.
As for getting the TPS, you need to use NMS to get it
Why. Is. There. Still. No. API. For. This.
It has been requred
I know
are records in java 8
TL;DR MD said no
oh
lul
i was gonna pr it
Uuh sound hard
fruck
"Exposing the concept of ticks even in the scheduler in the first place is a questionable design decision because just like in your example of a cooldown, it can be elongated unexpectedly and has absolutely no reference to what the end user experiences. If I say "this sword has a cooldown of 600 ticks" that could mean anywhere from 20 seconds to 120 seconds. A better approach would be to 1) Define your cooldowns in wall time (which can easily be updated through a task running every 20 ticks. Or 2) [hardmode] write a real time scheduling analogue for Bukkit. I am opposed to exposing the concept of ticks to the API any more than is necessary and I see this change as unnecessary with suitable alternatives already possible."
do you listen to the drag event too
thats the issue then
something clearly goes wrong
Also "TPS is not API. There is no guarantee that a server needs to tick in any way at all."
But exposing the ticks can be viable if you need to regulate systems based on the servers load.
i downloaded singed spigot..
singed spigot?
crazy spigot
still no idea
nevermind just joke
ok
By saying "Crazy spigot" you have just summoned a new fork
,_,
i just don't know
what's going on
Its only change is that it exposes the TPS and switches the names of the BlockBreakEvent and EntityDamageEvent
On it
lolno
change every event class to Event and separate them by package 🙂
if i do something in inventory of barrel, or anything else there are a lot of actions, but if i'm trying to click in player's inventory it always say "PLACE_ALL"
Spigot -> Crazy Spigot (Fork) -> Insane Spigot (Double Fork)
And that can be expanded in both directions
Does anyone know if there is something like a PlayerDamageEvent or something?
use entity damage event and check if its a player
if(!event.getEntity() instanceof Player player) return;
missing some brackets there
Maybe
if(!(event.getEntity() instanceof Player player))
Oh right
Ah yes ty
Is this an okay code for checkin what Item a player got hit with?
https://www.coderstool.com/cs/S4LaK6
Im a beginner vtw
btw
I think you should use pdc or cmd for comparing items
Im sorry but what is this xD Im quite new to all this plugin thing
WTH is going on in inventoryclickevent when it happens in Crafting inventory??
it always says that it's left clicked
it always says that it's place all
wrong event,
PlayerItemDamageEvent is called when an item used by the player takes durability damage as a result of being used.
use entitydamagebyentityevent or entitydamageevent
wth
ty
Is there a way for me to check what player got hit?
if you want this when player hits another player only, then use entitydamagebyentityevent and #getEntity() is the damaged player
you are the best
How can I check what Item got used to hurt the player?
is it .getDamager?
Help pls something is going wrong
getDamager() is the entity that hit the player
whatever i do inventory click event returns place all action and left click
you can access its inventory from there
listen to drag event
could also just be a player inv thing
tysm! does this make sence? https://www.coderstool.com/cs/pKPs8w
yall i think gpt just spat out useable code???
gpt 4?
sus
yea
you must add checks if it is a player or not
why
because a zombie could hit a player and you cant cast zombie to player
yup
Im so sorry but how do i check if its a player
^
You can do the same for event.getDamager
ty
qq, is there a tutorial / simple way to do computation-heavy calculation off-thread and pull the finished data back in?
I'm doing a ton of three-dimensional math
just do it using CompletableFuture
CompletableFuture
ah good point
or an executor
https://www.coderstool.com/cs/xyB6d9 tested it and doesnt work
- you didnt add the checks
- have you registered this listener?
checks?
if this is a player or not
it just shows red for me
pluginManager.registerEvents(new hitListnewr(), this); is correct right?
in the main class
ya
im sorry but yeah how do i checl for a player the previous one didnt work
but why the ! and return
where do i put it in the code then
this is my code
well right now ur just blindly casting
which only works when both players are actually a player, else errors will be created
so where/how do i put it so that it works?
^
@EventHandler
public void onHit(EntityDamageByEntityEvent event){
if(!(event.getEntity() instanceof Player)) return;
Player target = (Player) event.getEntity();
if(!(event.getDamager() instanceof Player)) return;
Player damager = (Player) event.getDamager();
ItemStack breitschwert = new ItemStack(Material.IRON_SWORD, 1);
ItemMeta breitschwertmeta = breitschwert.getItemMeta();
breitschwertmeta.setDisplayName(ChatColor.LIGHT_PURPLE + "Breitschwert");
breitschwert.setItemMeta(breitschwertmeta);
if (damager.getItemInUse().isSimilar(breitschwert)){
target.addPotionEffect(new PotionEffect(PotionEffectType.HARM, 10, 2));
target.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 20, 2));
target.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 20, 2));
}
}
something like this
id presume
but ur way of checking for a custom item is also very questionable
i love you
should be using pdc tags
can anyone read this error for me, I have no idea where to look for the null error -- Prestige class (command + listener): https://paste.md-5.net/qazawokaca.java
is the command in plugin.yml
error seems to be on this line Inventory inv = Bukkit.createInventory(player, 3, "§b§lPRESTIGE");
i always just pass null as the holder
also
u cannot do 3
oh
should be 3 * 9
it is
is there any library that i can use to generate terrain while players are in the server?
not really as most of MC is single threaded worldgen runs on the main thread
eww
Actually worldgen is split up and done by the worker threads
But it still has to sync back to the main thread at the end
anyways is there any way to stop block updates like grass regrowing or farmland getting moist?
it doesnt have to be the vanilla terrain generation
There are various events you can use for this
and i wont generate the whole world
you can force load chunks to make them generate yourself but plugins like WorldBorder exist and can gen a world
that will cause lag though
Is possible to get sever status (online / offline) thru bungeecord channel?
@echo basalt sorry for ping, but with your glow tracker is it possible to make thje colors diff colors for like players
How can I convert a base64 player skin to a png file?
scoreboard teams
or if you're using TAB there's a special wiki page for that
is that hard / inefficient to do via code
so I've just been testing stuff with particles and noticed there's a cutoff point at ~3k to 4k. Is this a limitation that can be circumvented?
try in survival
no
what client version are you using
i know it works on at least 50 ms ping
but
its really annoying how it's getting grouped yknow
not this
you'll destroy the bandwidth
odd wtf is your bandwidth
1.6 mb/s down, dunno what up
wuh?
what the fuck
I managed to reach 100mbps worth of particles before my network gave up
anyways just impl a basic culling system
like send it spread over multiple ticks?
uhh that helps a bit
but ideally you shouldn't spawn particles too close together
Like a minimum distance of 0.1 blocks between particles or sumn
the problem is
they're already breaking off even if they're visibly disjunct
i do have a value i can change to decrease particle density
but then i get that image above
a sphere has a large surface
someone knows why this code: ```
List<String> lore = new ArrayList<>();
Collections.addAll(lore, content.split("\n"));
itemMeta.setLore(lore);
tried with \n
just put \n in the quotes
i tried it
team = Bukkit.getScoreboardManager().getMainScoreboard().registerNewTeam("SpiritualFocus");
team.setColor(ChatColor.LIGHT_PURPLE);
i tried this
it did not work tho
i already told yall thats not the problem
the problem is that particles are self-culling for some fckin reason
Yes its the problem, that must cause huge issues
It will cause an over exceed of band width
For what
Any suggestions to see if there is an active conduit in range of a player when out of water?
I figured i could search in a radius of X to see if there is a range and maybe create a fake player to see if they get conduit power but i assume that may be laggy and i have little expierence creating fake players.
I also didn't see anything in the conduit doc
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/Conduit.html
Hello again, it's me again. I told myself that at the same time as looking for the solution I was going to ask here too to go faster.
how after modifying a message, not display the original message with Spigot?
because on my test server we cannot see the original message except on the production server the players can see the original message
Besides, I am not in the "verified" role, when I make the order it tells me that my account is already verified. (I did this a few days ago and re-ordered to see if it will work update)
Does anyone know if there is a way to detect a flowing water block's source block?
You'd probably need to just recursivly check surrounding water blocks until you find a source block
Damn
Yeah, recursive check. Check surrounding 4 blocks, if level > current level, move there. Repeat until level = max level
(water has Levelled block data)
Yeah, chatgpt mentioed "levelled.getFlowingSource()" but I think it just made that up lol
Definitely did
Levelled state = (Levelled) block.getBlockData();
int level = state.getLevel()```
That's assuming it's actually water though. Will want to check before getting and casting the state
Would it be too resource intensive to make a plugin that applies metadata to water blocks that flow from a specific source block?
water and flowing water are seperate fluids
At least in F3
Idk how spigot handles that
I basically want to make bottles fill with "fresh" water if used on water from a source block that is above Y: 90
Any ideas for a good way to do that?
@jade stump cancel the interact event and replace the bottle with a custom item if they do that
Idk how to detect waters source
the problem is to calculate if the water source block is above y:90 i think, not the replacing
ah
recursive check maybe is the best option
The fluids are different, the blocks are the same
Confusing ik lol
If the Levelled getLevel() == getMaxLevel() then you have a water source
Would a recursive check work if the water flowed from an unloaded chunk? jw
or use a stack
I mean in all likelihood it will be loaded, no? If there's a player close enough to click?
ahhh yes... extreme scenarios
The water source fluid doesn't even have a level in game
Prob most of the time. Could that be an issue though?
like water flowing across whole world xD
I doubt it
Also, isn't water in the middle of a falling column going to be at the max level
Yet not a source block
it can happen, highly unlikely unless specifically made
Actually I'm unsure how it works for water because water is backwards
Water at level 0 is a source block
192 chunks maximum lol
Wack
That's a Mojang thing, yeah
Smells like code that exists to support legacy
you can also track block form event if you can have control on when water is placed

