#help-development
1 messages · Page 1490 of 1
i think because they are new
who?
the voices or arent they?
no they are not
rip
they have been there for ever
they don't have any role :/
its my alt account
blue = lead dev
nah, he is our favourite person on here
i don't think so
if (event.isRightClick()) {
plugin.getConfig().set("command." + i, null);
plugin.saveConfig();
plugin.reloadGuis();
plugin.blocksGui.show(event.getWhoClicked());
}
FOr some reason
this isnt saving
reloadGuis just refreshes the open gui
so i have an open gui that relies on whatever is in that "command" key
and the item disapears, meaning its doing something
but when i reopen it again it doesnt work
oh
im dumb
nvm
I have a list of items in a config
command:
- kick %player% Having Illegal Items
How do i remove a specific one?
If i dont know the order
Why is this the wrong data for this particle? Trying to do the explosion particles
playerSender.getWorld().playEffect(playerSender.getLocation(), Effect.SMOKE, 0.1, 2);
too many args
whats the double for?
speed
what's the exact exception
😢
List::remove
yea but i dont know the position
List::remove
08.06 13:41:27 [Server] INFO Caused by: java.lang.IllegalArgumentException: Wrong kind of data for this effect!
/**
* Removes a single instance of the specified element from this
* collection, if it is present (optional operation). More formally,
* removes an element {@code e} such that
* {@code Objects.equals(o, e)}, if
* this collection contains one or more such elements. Returns
* {@code true} if this collection contained the specified element (or
* equivalently, if this collection changed as a result of the call).
*
* @param o element to be removed from this collection, if present
* @return {@code true} if an element was removed as a result of this call
* @throws ClassCastException if the type of the specified element
* is incompatible with this collection
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
* collection does not permit null elements
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
* @throws UnsupportedOperationException if the {@code remove} operation
* is not supported by this collection
*/
boolean remove(Object o);
@wraith rapids removing the double worked but the Effect.SMOKE is not the explosion effect - do you know which one is the explosion effect
wouldn't that be a particle
Alright, so im having a bit of an issue; Essentially
return Material.valueOf("SUNFLOWER");```
Throws the error:
> `java.lang.IllegalArgumentException: No enum constant org.bukkit.Material.LEGACY_SUNFLOWER`
However when I try things such as
```java
return Material.valueOf("DIAMOND");```
It works perfectly fine, would anyone perhaps know a reason as to why this is happening?
set your api-version to 1.13+
if it's set to 1.12 or is unset, the server rewrites the bytecode of your plugin to facilitate some bastardized sort of backwards compat
omg you're right idk why i was using playEffect
I meant
playerSender.getWorld().spawnParticle(Particle.EXPLOSION_HUGE, playerSender.getLocation(), 1, 15);
which means your valueOf("SUNFLOWER") actually looks for "LEGACY_SUNFLOWER"
because it's a 'legacy plugin'
Ah alright, thank you for the help
could someone help me figure out why i get null
https://paste.md-5.net/igiwovifoy.cs
in SpawnParticleOnPlayer, line 78
and list on line 75 is empty
not null, empty
{}
why are you calling a map a list
get returns null when there is no value associated with the given key
if the map is empty, every get operation returns null
list of particles
but that cannot happen
when i run the command it adds the player uuid as key and args0 as value
i have no fucking clue what I am reading
so theres always a value for the key
spawn a particle under the player constantly
so like you run command /particles FLAME
and it will spawn a flame under you
until you disable it
getHash returns a new, empty hash map each time
new CreateHashMap().put(player.getUniqueId(), particle);
you are creating a new CreateHashMap
which creates a new HashMap
you then add uuid, particle to it
and then you discard the entire created hash map
and forget about it, forever
new creates a new object
if you create a new object, you obviously don't have any changes made to it
if you create a new hashmap, the hashmap will be empty
public HashMap<UUID,Particle> getHash(){
return new CreateHashMap().getHashMap();
}
this returns a new, different, empty hashmap each and every time you call it
because it creates a new, different, empty CreateHashMap
HashMap<UUID, Particle> playerParticle = new HashMap<>();
which then creates a new, different, empty hashmap
what is this channel for?
read the channel description
too difficult
so i have to check if its not created create it
i've read it but there are multiple ways to interpret it
otherwise just add the elemnt
like help with coding your spigot etc plugins or helping the creation of new spigot versions?
former
how are you gonna make a new spigot version
well maybe they had some kind of channel to post issues they stumbled upon for other excluded devs to help out with? i dunno, maybe that could have been a thing?
that why people use @override on most or all of their methods? so it doesnt create a new hashmap?
"This is a java question. Override does what it says, it overrides the method from the extended class, and you don't create a new one, it doesn't actually matter in terms of runtime."
no. absolutely not
no
you are so clueless and wrong that it's not possible for me to put it into words
why do you have a million classes to begin with
then how do you create a gobal variable without creating a new class?
you don't want a global variable
why are you trying to make global variables
cuz its a hashmap
?
then share it
that doesn't imply a global variable
don't make it global; share it
but i dont want to put everything in a single class
why
share it; give it to the other objects that depend on it
all of these classes are needlessly useless on their own
classes should accomplish a specific task
having one class call three other classes to do it's one simple job is very unorganized
then why do people do this? like they put variables on the start to share on the class
they don't
but it gets too long
what people?
i don't have the effort to handhold you on a "how to design a project" right now
maybe tomorrow
you're literally having more lines of code doing it your way than just putting all relevant code in the same class
It's most likely that they're inexperienced then
i dont even know what you mean lmao
that's evident
you're either misunderstanding what people have made, or the people you're looking at are just as clueless as you are
i look at choco's code
send it
wait let me find an example
you should consider learning from it and understanding it rather than just looking at it
But even so Choco isn't a java enterpriser so his code isn't the best goto
its way better than mine so
haha
i would argue that the whole thing being static is poor design
the only reason code like this is "okay" is because this class is never instantiated
this reeks of static abuse
wait fr?
I mean that code could work fine non statically
@worldly ingot justify yourself
i have been looking at his code for week s
lmao
so 1 big class is better than small classes?
like 1 big class doing 1 thing
Altho I guess looking at his code might be more pleasing than other developers who over engineer everything they touch.
it isn't a matter of size
yea but when you say it like that saving the hashmap in the config file sounds like a purpose so i create a new class for that
but ig thats wrong?
assigning a value to a variable is also a purpose
but you won't create a new class for every = operator in your code
yea ig
psh speak for yourself :^)
psh?
Onomatopoeia (also onomatopeia in American English), is the process of creating a word that phonetically imitates, resembles, or suggests the sound that it describes. Such a word itself is also called an onomatopoeia. Common onomatopoeias include animal noises such as oink, meow (or miaow), roar and chirp. Onomatopoeia can differ between languag...
It's stateless
private static final Map
this looks like state though
The stated data is handled by Metrics, but all instances of Metrics are going to want to send the same stats that the plugin is collecting
wouldn't a singleton serve the purpose better
It was a singleton at one point, actually
and then you made it static
Look at the most recent commit in that file lol
Make everything static
haram
i suppose it makes practically zero difference either way but I'd probably hold a canonical instance of the class in my main class instance
instead of a singleton or an entirely static class
honestly for such a simple task I don't blame choco for having that be static
might not be the best way to do it but convenient ¯_(ツ)_/¯
It felt impractical having it be a singleton because I'd just call StatHandler.get().myMethod() every time I wanted to do something and they were always single-method calls
I never held a temporary instance of StatHandler in a local var
The get() was superfluous
That being said, my code shouldn't ever be considered the arbiter of good code design lol. I think my design choices are mostly well justified, this case included, but I'm most definitely subject to mistakes and poor design
this is vaguely acceptable
If I had kept local reference to the StatHandler, I'd have kept it as a singleton
bro i dont understand 70% of what their saying lmao
Though I didn't ;p
regrettably though paradis is getting some bad impressions from misunderstanding it
i don't know what part of this inspired him to make a dedicated class for a new HashMap operation
I missed earlier conversation so I'm OOTL
idk im just trying to clean mym code
basically
he made this
he's basically writing single-method subclasses instead of methods
ahhahahahahaahaa
btw
/**
* a scheduler to spawn particles on location of each player, using the hashmap<UUID, String> where string is the
* particle
*/```
should be
```public class StartSchedule {
/**
* a scheduler to spawn particles on location of each player, using the hashmap<UUID, Particle>
*/```
i forgot to change it
?paste
you just don't get it man, give it another 5 years and each class will be 10k lines long
ironically I do have a glorified startschedule class but it's quite big and specific
yea apparently long classes are not bad, they just have to be clean
my longest class is 1432 lines long
I'm pretty sure at least 1000 lines are dedicated just to the word banks I use for procedural item generation though, so that's sort of cheating
consider reading them from a resource
eh I could do that but really I just don't have much of an incentive to touch it
plenty of other priorities I should be getting to regardless
like shortening your class names
actually can you help me brainstorm, I have a class that has a name too short
BinderOfWorldsPHase1EndermiteReinforcementConfig
I feel like that's not specific enough
consider including the full package and your plugin name in it
yes, after all, how else would you find things that were modified at a specific time
there is literally no other way
EliteMobsSrcMainJavaComMagmaGuyEliteMobsConfigCustomBossesPremadeBinderOfWolrdsPhase1EndermiteReinforcementConfigExtendingCustomBossConfigFieldsTime11_11PMOnTheEighthOfJulyOfTheYearOfOurLordTwoThousandTwentyOne
perfection
if i'm repeatedly iterating over and modifying a list of values, is it faster to
a) pop out of one binary heap and push to a second binary heap, then swap
b) iterate a sorted list in order, then add the elements to an unsorted list, then sort the list and swap
c) iterate a sorted list in order, then add the elements to a sorted list, sorting them on insert, and swap
pretty sure that depends on the size of the list
bogosort
I've had to do some research in the past to optimize the trackers and came to realize that the reality of sorting under 100 elements and sorting 10,000+ elements is quite different, things that may make sense for a shitload of elements may not really be worth implementing when you're dealing with, say, 10 elements per tick
though imo the best sorting is no sorting at all, so just try to not have to do it in the first place would be my advice
thing is I have to iterate over things from highest to lowest
and then modify the values, and then iterate over them again
i need to make sure that I modify each element exactly once per scan
is there really no way to just do one scan in the first place?
reordering as I go might end up with the same element being iterated over twice in succession
hm not if you're reordering them into a different list
myeah
that's why each of the options I listed involves writing to a second heap/list and then swapping at the end
well what scale of operations are we talking about here and how frequent is this going to be running, are you reorganizing a data lake every ms or are you keeping scores for 5 players once a month
mm, sorting a list in place is usually O(n log n) i think, which is apparently the same as inserting n elements into a heap
i would throw a vague guess of abount 20-200 elements being juggled around every second or so
you're fine then
it's not really something that needs minmaxing especially as it's done asynchronously
but I still want to use the more efficient implementation
building a heap in place is significantly faster than sorting a list
but that comes at the cost of each retrieval being done in logarithmic rather than constant time
yeah it has its cost, that's why I mentioned scale
I mean if you really want to know do quick sort on one do your heap on the other and time them
i suppose that is a way of going about it
it doesn't take a whole lot of time to test them anyhow
around 20 minutes probably
but you get something far more important than money from it
you get KNAWLEDGE
out here in the hollywood hills, driving my laborghini
i'm going to use an online java compiler because compiling a test in the current project would take eons and switching projects on this machine takes ages
i guess i could use fucking notepad and javac but i'd rather not
how scuffed is your setup man
600mhz processor running windows
dafaq
I am pretty sure you are in that hell dimension from doom just based on your UI
wut
yeah and I am pretty sure you are red colorblind
possibly from all the blood on your screen
i will write the code in my ide for autocompletions and shit
when is spigot 1.17 releasing? sorry if this was answered earlier
and then cuntpaste it into the online compiler
There is no ETA for 1.17. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.
watch yo profanity
everything is better with more profanity
would changing to the latest rpi be an upgrade for your setup
probably
this is a shit tier laptop, the processor does actually go up to like 3ghz
actually we live in a world where upgrading to the hardware contained in a macbook charger might be an upgrade
the issue is the cooling
the processor is permanently throttled down to 600mhz due to overheating
passive cooling, glued together plastic case without any air holes in it
I would tell you to fix it but if you're stuck with that pc I have to imagine you don't have access to a drill and a fan
i have access to many things
I just don't want to buy a new computer because that would involve effort
and I don't have any
or a good naming sense for classes
I want a better pc but I also don't want to get ripped off by some salesman for my ignorance
and I don't have the effort to do anything about my ignorance
smh
not that the money is an issue
nor getting a substandard pc for the money involved
hell these days it doesn't even take more than 15 min to go from nothing to full build with stuff like r/buildapc
i just don't want to make scams successful
I am pretty sure you are successfully scamming yourself out of living a decent life
maybe, but at least it doesn't involve filling some scammer's pockets
all this waste fills the chaos gods' pockets
how's that going for you
i call it maninism
that's not even yours
then pick a different name because it already exists
stop trying to scam people with your scuffed religion which isn't even yours
this is like trying to sell someone a bridge except it's selling the concept of a religion which doesn't even belong to you
except for a good pc, that is
money is pointless
sure, give yours to me
you're just a victim of capitalistic propaganda
yeah I need aid relief funds
how do you do fellow spigot developers
get out scarsz can't you see I'm debating the money off of nny
i have no idea what i just read but i like it
i heard that 1.17 sucks and doesn't have any of the promised features
is this true
-256 to 256 or no?
so uh
oh nvm
is there a buildable void below bedrock now
since the generator didn't get changed
let me generate a world
i think so
What is ur pc atm?
Out of interest
lenovo something i think
Ohhhh I get ya
i'm not sure, I'm not seeing any labels or names anywhere
Fair - I have built my own over the last maybe 2 years (as in slowly upgraded)
I managed to get an Rtx 3060ti at msrp
Which was very nice
But yeah - pcs are kinda expensive atm
lol
Looking for help with a USA map server development, reward will be permanent administrative rights on the server. Need help specifically with setting up plugins and protecting land. Server will be some from of factions or land sale system, the economy will be based off where you are on the map, with some resources being abundant places and non existent other places.
Map is 80,000 blocks coast to coast
This is not the channel
I don't know where else to ask this but pretty much I have a project that I compiled in java7 before I realised that I had done it by mistake but I changed the project version but I'm still getting errors does anyone know how I can change the class version?
Witch channel?
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
ok thank you
cheers
the same way you did it in the first place
man I have to review one of my core config systems and I am not looking forward to it
the systems have become too large for the originally really simple format
can't have 40 arguments when I use maybe 10 on avg...
40 arg constructor? 😬

You may as well write the whole plugin on one line at that point.
this is also the system that reads and writes to and from config using defaults so I need to make sure I set it up in a way that is easy to play wwith
this plugin is 47696 lines long, I don't quite think 40 lines for a constructor really compares to it
Magma, have you ever tried Guice or a DI framework?
I can;t even imagine 40 args in a constructor
well it's the constructor for making custom bosses, so every feature you can customize about default bosses is in here, which was fine when it was like name and damage and such but now there's stuff that is very niche and only 1 of them actually uses
I believe native minecraft code had extremely long constructors and yes they resolved it with builders
I might, I have to look around for good solutions because this both sets defaults but also respects custom values and such
just want to make sure I get good, scalable solution which is not a pain in the ass to play with
reward will be permanent administrative rights on the server
that's not a reward
and should not be given out as a reward
also I don't want to write 40-60 builders multiple times just because I fucked up and there was a better solution lol
I'd have to see code to comment
I dread to see how long this will get
uh
6% comment lines
on avg
total of 2711 comment lines
36924 source code lines, rest is blank
it's decently chunky
it's a good thing that I can't count total lines ever committed easily or I might just lose all hope
I suspect it's well over 500k
pretty sure you can only control pitch
But there is a spigot server where they do it
called DiamondFire, pretty sure they use spigot and they can slow it down
playSound only has pitch and volume. Volume only affects how far it can be heard
I don't understand how that server does it then but all right
does it use a resource pack?
those overwrite other sounds though, right?
that's only the case for block and entity textures by this point i think
items and other resources can be added arbitrarily
then I guess they have custom speeds from 1-100% for every sound in the entire game unless it is possible in spigot ¯_(ツ)_/¯
oh cool I will try that then
though i'm pretty sure the minimum pitch is 0.5 or something
Why is the steam fee so high why can't it be like u need a Dev account to publish games and to get it u have to pay like $5 like Google has this and they don't get spammed by bots??
because otherwise I would have to look at your crappy game on steam
for playsound is volume 1-100 and same for pitch?
see the docs
Playsound in-game it's 1-10 for volume 0-2 for pitch I think
pretty sure somewhere in there it lists the valid ranges
if we go by the vanilla ranges, 0.5 to 2.0 for pitch
Oh though it was 0-2
let me share the AMAZING way I did sounds for a quick thing https://hatebin.com/kaeziagjsn
gotcha, thanks for the assistance
top notch, bet there wasn't a better way either
cowards will argue you can group the cases together, I will remind them how impossible that makes it to compose a song sequentially lol
also I'll give an internet cookie for the first person to recognize the song
wouldn't a list be less cancerous
honestly the real cancer was trying to get the notes right when your background in music was failing to play the recorder nearly 20 years prior
i'd probably us private final fields rather than methods and a float array rather than a string of cases
then get arr[counter++]
iirc I ended using methods because I then wanted to use the same notes for some other minor stuff in some other class, can't really remember what that was about now
make a note enum 
also while not impossible I would have to fill the list with pauses which uh
the real question is why the api doesn't have a note enum
Spigots going to be Java 16 for mc 1.17 right?
yup
Da
fun. I Haven't really had to change java versions much but its pretty much cross compatible right?
Like my java 8 plugins should work on 16?
Nani da FAQ java 16 dope
yeah crazy stuff innit
wild
what's next, getting rid of CME erros before we colonize mars?
there's literally tens of possibilities out there
get rid of Throwable 
I'm going to say something out of this world
no longer needing getters and setters
sorry for the faint of heart in the audience that just passed away from a heart attack, my thoughts and prayers are with their families
yo this is a maths thing but does anyone here know the value of:
a^1 + a^2 + a^3 + ... + a^n
or what the name of this series is
n*a^n ?
nice meme
oh lol didnt see it
oh yeah right
a geometric series?
ahh thats the one
only difference is I need to start from a^1
so it would be (geometric series) - a^0 = (geometric series) - 1
I mean seems rather trivial with a for loop no
unless you're looking for a purely mathematical solution
yeah but a for loop is slower than the direct solution
uh
I don't know how long your series is planning to be but computers are quite fast at this sort of operation
it feels good to go from 0.01ms to 0.0001ms
n
Σ a^i
i = 1
this right?
I somehow doubt it would take 0.01ms for a computer to do that
unless you're going real big
yup
uni has conditioned me to believe that a toll road can have up to 10^8 tollgates
I think your uni has been watching too many cyberpunk movies
if that's the future they're preparing you for
they're preparing me for a future where I can skip exactly h toll gates in a row, no more and no less, after which I must not skip any of the next c tollgates
hey you studied math, how many tollgates could you afford with how much you paid for tuition
let me check
i often wish i had studied math more in depth
I was thinking much of the same and am currently reading a book to learn it
turns out shit that seems entirely useless is kind of useful for all sorts of shit
see the difference between nny and I is that I have the energy to follow through
i have more pressing matters to attend to
all roads are free in my country except for 2 tunnels, one costs 5 euro and the other 2 euro for a passenger car
with my first year of tuition I could pass the 5 euro tunnel about 208 times
ok so you're telling me you could've spent a year travelling around the country around 200 times but instead spent that time calculating 10^8 tollgates when there's only 2 of those
gasoline costs money
I hate to say it but I think you got scammed
i could pass 1401 of the most expensive toll roads in my country with my tuition 
yall's a bunch of suckers
oh shiit lol
I could have spent a year going back and forth through the same tunnel
on foot
no in a small passenger vehicle
that has additional costs
it must be a lit tunnel for it to be the only one you pay for
well you can't
fuel is actually quite a small part of the upkeep cost of a vehicle
you spent all of your budget calculating what would happen if there were 10^8 tolls
maintenance and registrations and taxes and all that shit cost quite a bit as well
I came prepared
that's not really true nnya, unless your car is a shitcan you are probably spending thousands of dollars in fuel for hundreds in maintenance
it is
fuel is inexpensive
you lost teh money and now get to go nowhere
thorough maintenance is not
maintenance just seems like a small cost set because it's so infrequent
I've had a car for 6 years, gas is by far the loss leader
6 years is nothing
like, not even close
in some cities you can't have cars that are older than 6 years old my dude
most passenger cars don't have major maintenance needs in the first 10 years
yeah and that's because it's often cheaper to buy a new one than to maintain and repair the old one
the car itself is starting to push 20
no, it's due to newer cars on average being more fuel efficient
especially with more modern production lines with worse spare part availability
the cities that do it in europe cite air pollution as the reason
mind you I think gas in europe is about 2x more expensive than in the US
nowdays production lines and spare parts are deprecated in just a few years except for the very popular models
around 4 to 8 times depending on the region
yeah and I'm in one of the most expensive ones
so am i
then stop ramming your car into walls
my car is 20 and I don't spend that much on maintenance
for example, many logistics companies are installing turbine clutches on their trucks
or close enough to 20 anyhow
gasoline price is about €1.78/L and one litre of gasoline will allow me to drive about 17km in a VW golf so with my 1st year tuition I could drive 9,932km
even though it increases fuel cost by around 20%
Cars deteriorate at different speeds based upon use and area.
it nets significant savings from longer lifespan and reduced maintenance
Here in the UK its so wet and humid + salt on the roads in winter they fall apart
Why are we talking about cars lol
yeah, salting roads in the winter is a killer
yeah that sucks
ain't no cold weather here, you can keep your car for as long as the parts hold in semi ideal conditions
most vehicles are manufactured in warmer climates without salt so there is next to no protection to speak of
My car is about to hit 20 and I had to do the first bit of welding on it this year.
i.e. I could drive to mongolia
most of my cars are 20-40 years
I look forward to global warming, summer year round let's go boys
I'd love a 40+ year old. No road tax or MOT needed on them
it's beach weather 'eeryday
got a 60 year old truck as well although it isn't licensed
i have many things
honestly plausible
many of them are very good
i would never trade my old model toyota hiace for a new van
new cars suck
at this point I would pay $5 to see nnya take a camera and catalog all of their stuff with creepy music in the background
Toyota Hiace are excellent. unkillable
I have a toyota rav4
i get several emails and mails from all sorts of places of people wanting to buy my hiace
I hope to never stop having that
you know, having rented cars in africa I can't say that that speaks to the quality or reliability of the car as much as the price
the cars that people use in those countries have to be built to last and to be maintainable
every single time people go on convoys about 50% of the cars break down at some point and at least 20% get replaced
every - single - time
it's sort of wild really
they're certainly maintainable, I've seen people fix their cars with bananas
so gj on that
just a shame it lasts for another 50 miles and then dies lol
if you fix it with a banana, it sure will
Same reason Russian tanks beat German tanks in the 2nd world war. German tanks were precision engineered and broke down often and could not be repaired in the field. Russian tanks were built in tractor factories.
yeah well the whole continent is bananas
if you actually do it properly, it'll go for half a lifetime before the next major repair around the same area
yeah my opinion of the repair shops I've seen there isn't exactly very high
then again I too would be at a loss if I have to resort to using bananas to fix car parts
the people there have a different mindset
it's quite remarkable what they are able and willing to do
yeah that mindset got us stranded in the middle of a safari about 8 times the year I went there
But if need be, they can build a welder out of an old battery and a stripped down microwave.
they maintain out of date and heavyweight technologies with poor tools and just ingenuity and experience
tbf it was quite remarkable to have to pull a car out of reptile infested waters
I still remember that
and they often can make a better job of it than high end repair shops in the western world
I wasn't on the canoe that ran into the hippos though, there I might've lost my shit for real
pussy
Car in the river = fishing for dinner
you go to africa and you get surrounded by the most dangerous animal there and tell me how you feel
My wife?
especially when there is quite literally nothing between you and them
pussy
all of it should be fucking nuked
there is nothing of interest or worth looking at or knowing there
I can see this comes from experience
well yeah that I could've guessed
I'm honestly surprised some mod hasn't caught on to the hitler with a santa hat yet but it's not my problem
being racist isn't a crime
you don't have to be a criminal to get banned from discord
you do have to break the rules, though
which i have not
exept when i've felt like it
today 🙂
there are zero mods and all of them are perma dead anyway so whatever
I mean any mod could argue your profile pic breaks rule 2
There are rules?
the more likely reason for me to get banned is because I keep shitting on bukkit and spigot in particular and md5 gets his panties in a twist because of it
oh yeah, I remmeber
at present it seems like the most likely outcome
He kicks him frequently
that's an award you can print
I still have you beat though
md5 banned not me but my username for a couple of years
and forced me to use a username I picked specifically to be "different"
unfortunately he won't let me have it back on discord, I loved that username
\^-^
pretty sure that hit all the irc characters they had forgotten or didn't really want to ban for usernames
Can someone please help me
No idea
I’m trying to create a meme plug-in we’re three birch logs in a row makes a netherite block. Eclipse says the code is all good but when I put it in to the server it says Custom recipe can’t be enable crafting rows need to be 1,2 or 3 characters long does anyone know how to fix this
?paste show your code
haha they said sex 🍆
there i pasted it can u see
You need to show us the link
too many in teh middle one
so how do i write that
i see 3 things wrong at first glance. 1, you have a capital letter in the key. 2, your getRecipe() is returning null. 3, your middle row is 5 chars not 3 (" TET ")
return recipe;
which named space key both of em ?
it says change to NamedSpaceKey with kap K and then Org.Bukkit
Netherite_block is wrong. needs to be netherite_block
try it and see 😉
did you get a new error?
theres nothing wrong with that code
Send the stacktrace in a paste please
the error in your console
Introduction:
It has come to my attention, recently, that a lot of new developers do not understand the true reason of a stack-trace: Trouble-shooting...
it works now i just made the Key capital
?paste
I don't care enough to read all of that lmao
any problems with it or do you just need to try it
Lombok 
lick my lombocks conclure
🥴
if my object class didnt use lombok itd be atleast 1500 lines
Is trivial with an ide tho
https://paste.md-5.net/yusenakico.cs
Doing anything wrong here?
yes, unless you're refactoring existing structures
I don't like lombok at all, I guess cuz I'd rather kotlin to java
Kotlin my guy
Also records Rack

what
I think IDEA does it already
Im confused
nope
🤝
Hi confused
not with what I was working with
Depends of how your methods are named I mean
I'm pretty sure it did it to me in some ocasions
more complicated than that, not worth getting into
😔
Basically, Kotlin Data Classes :kappa:
It needs Java 14 tho
Some hosts don't provide any Java further than 11
Minecraft 1.17 
meet the shit that makes more sense now https://hatebin.com/dbggywkyre
Java is advancing more this couple years than it did 8y ago
bye bye
public BinderOfWorldsPhase1EndermiteReinforcementConfig() {
super("binder_of_worlds_phase_1_endermite_reinforcement",
EntityType.ENDERMITE.toString(),
true,
"$reinforcementLevel &5Reality Corruptor",
"250",
2,
false,
0.1,
0.5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
false,
false,
null,
null,
null,
null,
null,
null,
null,
null,
null);
}
lol
wee
that is way too many fucking constructor arguments
Yeah ever heard of project valhalla?
yeah this is the one that broke the camel's back and why I am currently rewriting all of it
so this is going to be my life until
idk 8 am probably
Yes, but I'm not sure what is about
Hmm I can probably make you understand it with 1 line:
List<int>
Ok you got me
rate my weight loss journey
public BinderOfWorldsPhase1EndermiteReinforcementConfig() {
super("binder_of_worlds_phase_1_endermite_reinforcement",
EntityType.ENDERMITE.toString(),
true,
"$reinforcementLevel &5Reality Corruptor",
"250");
setTimeout(2);
setHealthMultiplier(0.1);
setDamageMultiplier(0.5);
}
Phenomenal
well its certainly better
thanks bae
Undeniable better
Is there a reason you turn ENDERMITE enum to a string?
like is it a display argument
yeah it's writing it as a default into a config file
ah
this generates a config file
in short
this has big pimple popping energy
hm this is probably going to end with a net loss in line count
ah yeah important documentation
can I type into the console if I don't launch the spigot server using a bat file?
The most efficient way would probably be with the MapChunk packet
But that has a weird format
how do i add comments to my config.yml file?
what the fuck is that
code rot circa 2021, colorized
If you write comments in the files within your jar and then copy them with saveResource or saveDefaultConfig they should stay
But if you ever save the file from the code they will be lost
nono there was this api
spiderYML?
snake
it was a thing
i cant remember what thing
i saw it like 5 hours ago
snakeyaml java spigot
yess
i found it
Spigot uses snakeYML
yay thz
But it’s an outdated version sadly
Mhm
idk
Hopefully MD will update it one day
@crisp citrus 1 you cant add comments using the vanilla way like saveConfig etc
I feel like refactoring this code should entitle me to getting an emotional support dog
You can add them fine with the default code
saveDefaultConfig and saveResource should preserve them
idk i never really made any comments in my yml files
its on my todo list
I was wondering (as the title says) if there's a possibility to add comments to the config using the default config API(bukkit)?
Example:
This thing...
this might help
but im not sure
thanks
As long as you don’t modify the files via code you don’t need anything fancy
If you do, there are probably a bunch of apis on the forums
so basically ```java
FileOutputStream writer = new FileOutputStream(new File(getDataFolder() + File.seperator + "config.yml"));
InputStream out = <yourMainClass>.class.getResourceAsStream("path_to_your/file");
byte[] linebuffer = new byte[4096];
int lineLength = 0;
while((lineLength = out.read(linbuffer)) > 0)
{
writer.write(line buffer, 0, lineLength);
}
fw.close();
Like I said, you shouldn’t need that to just copy a file from within the jar
Yeah, that's what saveResource() is for
I didn’t know that at first and made a method to handle it
Need to remember to remove that
Is there a way to check if a player is standing still?
why have you not saved my heart choco
tfw you forget entire complex features your plugin has
I'm using it
thanks for the answer But the speed while a player walks/runs is the same as that of a stationary player is (0.0,-0.07,0.0), but if the player runs and jumps the value will be different.
hence the "for now"
I’ve rewritten custom enchantments way too many times
?paste
https://paste.md-5.net/fijutosawe.java send help
because I'm using a builder pattern to create config files
Player velocity has not changed. it is equal when the player standing still or when walking,running without jumping
god this truly is the accounting of programming
and hey I was pretty close with my time estimate I think
actually nah I finished 2 hours early, probably still have 1h of debugging to do to make sure stuff is working
it's just a refactor, I'm not too worried
actually spotted a few undetected bugs while working on this which was depressing
just keeps reminding me of why I absolutely despise having to type a string twice regardless of context
it's really easy to get it one character off and the entire thing can break in non-obvious ways
When walking without jumping:
http://prntscr.com/aslx9w
Sprint jumping:
http://prntscr.com/aslxw2
i displayed only p.getVelocity().getX() p.getVelocity().getZ()
You may also want to try the length of their movement vector
should i release the source code of my plugin? (https://www.spigotmc.org/resources/manhunt.91326/)
cuz it doesnt have comments yet
i will probably have to choose like a license though
I've an issue with something about library shading
[07:20:39 WARN]: [SayanChat] Loaded class me.Mohamad82.RUoM.StringUtils from DuelOrganizer v0.9.1 which is not a depend, softdepend or loadbefore of this plugin.
This SayanChat and DuelOrganizer both have a library named RUoM and it's shaded in their jar file, But it's like SayanChat is trying to get classes of the library from DuelOrganizer, SayanChat has it's own me.Mohamad82.RUoM.StringUtils but it's using from DuelOrganizer
What should I do to prevent this?
System.out.println("1");
if(player.getInventory().getItemInHand().equals(Material.COMPASS)){
System.out.println("2");
openGui(event.getPlayer());
}
}```
even tho i have a compass in hand it console logs 1 only
refer
thanx :)
to spigot API
you can change the package location of the shades so they arent using the same package location
spigot Jd i mean
jd?
javadocs
ohh ok
btw its better if you use an abstract GUI class
i think i can't because i'm importing it with Maven
Is there a configuration that changes the path? A documention link is just fine for me
Yeah, you can do it with maven
hold up ill get an example
Really appreciate
um
Is there any wiki/tutorials on how to create a dummy player?
I want to run a command as player so i'll have to create dummy player
any idea on how would i do that?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>shade</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>the.apis.initial.package</pattern>
<shadedPattern>the.apis.relocated.location</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>```
@nocturne quest
juist that extra bit in config will do it
Craft player just implements the player
yep
and the craftplayer is what holds
to
nmsPlayer
when you .getHandle()
so for e.g.
my progress till yet
So the pattern should be the original path in Maven repository and shadedPattern my custom path right?
That's great, Thanks!
but package name
I got it.
this is an uneccesary way to do it
well, maybe tell me how would i do that?
i cant just do new CraftPlayer() Ig
so this is what i saw from the decomp
public CraftPlayer(CraftServer server, EntityPlayer entity)
this is a constructor to the CraftPlayer that you can use
EntityPlayer is a nmsEntity
so let me find that constructor for you too
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager)
so whats PlayerInteractManager
What’s the problem here?
umm so i have to create a dummy player
that can execute command as player
but is actually not a player
As an npc?
NPC is not an player
Yes it is it’s a fake player
can it run commands as player?
But I’m just using that as a word, no? Not unless you make it
yes
How do you plan to execute commands
it can be a craftplayer
so, i've a player only command
which can execute command
looking for where playerinteractmanager is atm but if i cant find this is its constructor
public PlayerInteractManager(World world)
that is nmsWorld
nmsWorld
WorldServer worldserver
alright
is it just named nmsWorld?
no
When they do what
When do you execute the command
@silk mirage do you also want other players
smh so listen,
if player do /migrateme
it'll trigger plugin commannd, plugin will dispatch a command as the fake player and do the other jon
it'll dispatch comamnd from another plugin
i don't care
i just want a CommandExecutor
as an instance of player
ah gotcha
new CraftPlayer((CraftServer)Bukkit.getServer(), new EntityPlayer(((CraftServer)Bukkit.getServer()).getHandle(), ((CraftWorld)world).getHandle(), gameprofile, new PlayerInteractManager(world)));
``` will this work?
What’s the problem dude, just make a block of code
Run on your fake entityplayer
I don’t understand what’s so hard about that?
When that specific case happens
i hope it'll
whats value for "gameprofile"
you need to create GameProfile gameprofile and World world variables
then what do u call
public GameProfile(UUID paramUUID, String paramString)
i'll do that
constructor at gameprofile
k, i can do UUID.random for UUID
UUID.randomUUID()
what about paramString
ye 🤞
airbubble event changed plz
what
idk
I doubt it
look at the spigot javadocs
unpog