#help-development
1 messages ยท Page 104 of 1
or while(response == null && !timeout) Thread.yield()
lets see if rabbit hasnt escaped again
my math working beatifully too
what are you making that lib for btw?
making a math expression parser just for fun
yoo nice
Math.pow impl is horrible lol
:D:D:D:D:D:
250 lines
return future.get(timeoutSeconds, TimeUnit.SECONDS)
can someone suggest how i should detect if a player has cooked an item? should i add a pdc to the itemstack if a player puts it in a furnace/cooking block
and then when they take it check it against the same player
or is there an event or easier way
how do i detect if a player shift clicks a cookable item into a furnace slot 0
my man
and it actually makes it there
break down your question
and figure stuff
How can I detect if a player shift clicks
- a cookable item
- into a furnace
- slot 0
no bc i've tried this yesterday with the craft one and it doesnt work
shift clicks into a slot, not actually clicking that slot
dont think thats my code lmao
is there a way to check where it's going
what were they on
that one time I wasted 2 hours making an if-less Math.abs
if an employer told me to refactor this code, i would quit
same lol
I once had to refactor a project full of those
was fun
why is my intellij crashing
lets not take that as an if
ternary is an if
:bonk:
the solution was setting the flag bit to 0
fancy if statement
or something
Shouldn't that be like 22.3%
rounded it, ill fix that
discord acc hacked
fr
I'd probably just be an idiot and return Integer.parseInt(value + "" + i)
if your isBlank() already does string operations the performance hit will be negligent
it's also simpler to understand lol
what are you gonna use the lib for Fourteen?
sometimes I'm such a performance freak lmao
good practice tbh
I can imagine myself getting accepted into some bank as a java dev and optimizing every single algorithm by like 25%
I wasted 4 hours optimizing a raytracing algorithm for a 2ms improvement
i didnt realise how inefficient my code was until i started working for a 3k+ concurrent player server
really brings out the worst in your plugins
worst part about the raytracing algorithm is that it was being run async so
ยฏ_(ใ)_/ยฏ
benefits of being paid hourly
I'm raytracing the pixel the player is looking at on a client-sided item frame
the annoying part is that the hitbox can be smaller depending on the frame's image
if it's 80x80, then anything between 81 - 128 will be empty and should be considered invalid
also that the frame's hitbox changes depending on rotation
i hate working with itemframe images lol
I got a whole API
is it working?
works a bit like C#'s winforms
where you can add labels, buttons
working on a template system so you can load image templates with buttons from a .yml file
should make a html renderer for minecraft maps pog
when your code is so bad it is considered obfuscated
possible lol
why is the getDurability method on itemstack deprecated
its in itemMeta now iirc
Damageable
fun thing I did was optimize minecraft's color rendering algorithm by about 100x
yeah minecraft's default one is shit
and made multiple color matching algorithms so you can pick the best for color fidelity
cast it to Damageable
the whole rendering pipeline for maps are a bit whack tbh
images render within 0.01ms
async?
yes
all async
colors are also cached when comparing
so the first image might take 100k ns
((Damageable)t).getDamage() yea?
but all the others would take about 9k ns to match and convert
pretty sure, yeah
9k ns = 0.09ms
not using minecraft's algorithms is so powerful
+1
I also got raytracing working sub-ms
the margins are 9-13k ns
but sometimes they reach 100k ns idk why
speaking of slow. My redis server is in america and minecraft server is australia
probably some concurrency stuff idk
get like .5ms latency lel
gc maybe?
then grab the block it hit and expand the raycast one final time to the distance between the ray location and the frame border
ensuring I can actually get what pixel I'm looking at
did you use marching cubes
idk what's that honestly
it was like 6am and I was obsessed with optimizing code
I didn't even sleep
raytracing algorith to get hit points efficiently
wait your raytrace would be orthographic anyway right
ehh I just made my own shitty version of it
code is basically
pseudo because I can't bother
no idea tbh..
just for fun?
ill see what future brings
maybe implement in into a discord bot command or whatever
guys i got an question guys
spawning random stactures not sure where to start
i want to spawn stractures and remove on the on stop
how do i get an items pdc if it has no itemmeta
now removing them wont be an issue probably making a list of locations and removing them
Vector start = eyeLoc
Vector direction = normalize(...);
Vector end = start + direction * maxDistance
Vector step = direction;
Location currentLoc = start
CanvasFrame chosenCanvas = null
outer:
while distance(start, end) > 0.1:
for(Canvas canvas : canvases)
chosenCanvas = canvas.getFrameAtBlock(currentLoc)
if(chosenCanvas != null)
break outer
currentLoc += step
if(chosenCanvas == null) // no frame
return null;
BlockFace face = chosenCanvas.getFace() // grab face from yaw
Location frameLocation = chosenCanvas.getLocation() - normalize(face.getDirection) * 0.4999 // almost half a block, but still inside same block
double axis = faceX == 0 ? frameLocation.z : frameLocation.x
double hit = faceX == 0 ? currentLocation.z : currentLocation.x
currentLocation += largeStep * abs(axis - hit)
// check currentLocation depending on the axis, compare to frame bounds etc
but how would i sapwn them in first place?
this is my crappy canvas raytracing
hmm how do i make this a sneakythrow?
I used to just make the step hella tiny until it hits a pixel
make a method that just throws it
i believe this works
quick question if I cancel a EntityPickupItemEvent does that stop the item from being picked up?
ayo @drowsy helm should we make a html renderer in minecraft
if an itemstack has more than one item and u add a pdc do all of the items have the data
it's a solid idea now that I think about it
i would if i had time lol
I already got clicking working
just make a selenium browser thing
and play with it
or we can just convert the .html file to a png and render it
implement scrolling
what if I implemented papi support and just like
sold it on spigot for 20$ ๐
name it like "InteractiveBoard but well written"
lmao
I was thinking on making a "but well written" series
where I rewrite popular plugins
like essentials and builder's utilities
to have actually decent code
sounds like a lotta upkeep tbh
hire slaves idk
only reason i dont make public plugins is because i dont want to keep them up to date
eek
my only reason is cuz i cant respect deadlines lmaoo
no criticism so no bugs to fix :D
oh yeah deadlines suck
Here's a project, do it in 1 month
starts in May, finishes mid-August
especially those at school smh
I only got one last year of school
starting 3 years college now ๐ฅบ
working for actual servers is much better money aswell
hypixel didn't like my schedule
and maybe my code idk
so can't relate
well ig I have a job where I just fuck around with my code and get paid well
hourly rate and they want experimental stuff no one else has ever done
so I get to waste 5 hours refactoring code and I can charge big bucks
i love doing stuff no one has done before
made my own Validate class ๐ค
thats basically the entrie server im working on rn
I'm also a little shit and decide to make client-side mobs that collide with client-side blocks because I can't bother making a map management system
when a player opens a furnace and they clck on a slot in their inventory is the inventorytype still furnace
no
its PlayerInventory
oh
getInventory is not getClickedInventory
https://wiki.vg/Inventory shows the bottom half as different slot ids so was just wondering
well im just having trouble detecting if a player puts an item in a furnace slot 0
which event are you using
inventoryclickevent
the problem is that they can shiftclick, right click, shiftrightclick, normally place
i just wanna check if they actually get the item into the furnace
I'm cringing so hard https://youtu.be/YpS0Jh5yqIw
How to write horrifically awful Java code!
Complete Java course: https://codingwithjohn.thinkific.com/courses/java-for-beginners
Any fool can write good Java code, but it takes an expert to create truly awful, unreadable, impossible-to-maintain Java code. That's what we'll be learning in this lesson!
What makes code bad? There are many ways yo...
why does he have a CatFeeder
lol no idea, he mad programmer
;-;
๐ข ๐ซ
let just take a byte[]
Variables class for everything
what is board ;-; why is it highlighted like a keyword
yep
char[][] iirc
right xD
I've seen worse code
lmao "many programmers forget that you can have multiple statements on one line, you just have to seperate them with semicolons ;-;"
truly mad
is there any way to get the item dropped after using Player.dropItem(1) for the purpose of applying pdc
probably my code
just get entities in radius ig
what pdc are you setting?
do spawn eggs trigger CreatureSpawnEvent
yep
custom Namespacekey
are you trying to apply it to the entity or the itemstack itself
if the latter just set it beforehand
well its in the scope of it being an entity, for things like itempickupevent
rate my terrible code and suggest an improvement if you can think of one. The reason for the triple nesting is because its a separation into block material - instance of one such material block - list of items near that instance
ArrayList<ArrayList<ArrayList<ItemStack>>> droppedItems = RStructHandler.scanStructure(struct,new Material[]{Material.LODESTONE});
event.getPlayer().sendMessage("First item is: "+droppedItems.get(0).get(0).get(0).getType());
bro this is the best advice ever https://youtu.be/YpS0Jh5yqIw?t=397
How to write horrifically awful Java code!
Complete Java course: https://codingwithjohn.thinkific.com/courses/java-for-beginners
Any fool can write good Java code, but it takes an expert to create truly awful, unreadable, impossible-to-maintain Java code. That's what we'll be learning in this lesson!
What makes code bad? There are many ways yo...
Thatโs for hoppers
how many fucking lists lol
only that one nested set
still
is there a better way to do this
ij complaining that i cannot save a name in a Optional<Optional<Optional<String>>> wtf
my advice is to select all the code and press backspace, buy some books on clean code, read them, then start again
rephrase
can anyone tell if theres a simpler/better way to do this
what im doing is scanning a structure, finding all blocks of certain materials - that list makes up the first list - then for every instance of one such material - second list - it gives all items directly above that block - third list
no, there are multiple events
is it? it doesnt look like it
InventoryDragEvent, InventoryClickEvent and a lot more
Yes it is
oh
what's this then
and the destination type can be furnace and everything
what do u think the best listener for what i wanna do is
iirc nbt blocks can be inventoryHolder
lmfao
"the call to nullable always fails" no intellij :/
nvm its only called when shift clickin
The better question is why the heck was it coded that way
Iirc you can attach a file writer to your plugins logger
Why would you force an argument to be null
uhh i got my reasons
Also the name is very misleading
tf ij
issue is that might not work on all plattforms since paper exposes a SLF4J logger
@Contract("!null -> fail") means that it will fail when providing smth notnull right?
!null -> fail means that it throws an exception if object != null, i requires object to be null
Gotta catch 'em all
I always read the @Contract annotation as if it was like a muscle contraction
always got hella confused
like ig that's how the code pulls itself together?
why does it tell it always fails then lol
The contract annotations is much nicer then it can be
Because operator is not null
ide cannot infer that, it can either be null or it cannot
(or throwable) as well as any listeners
sure? IDE says it can never be null
there's one thing I kinda hate about java
but it makes sense in a way
the Optional<T> class
like
pass a nullable arg?
I can't remove something fron an ArrayList in a for loop yea?
but at the same time it expresses that the param is optional
its first value is null and its set in the loophttps://paste.md-5.net/upunamezot.cs
The Optional class is nice if you wish to pass nullable stuff in the ConcurrentHashMap
use iterator or ::removeIf
Myeah tho according to Java Optional should in principle only be used for returning types
Alternatively use CopyOnWriteList ๐
then what's the fucking point
https://paste.md-5.net/atexekunit.cs
the return array has one entry in the first layer (im passing one material) and zero entries in the second layer. can someone tell me why? do i need to call .copy() ?
Yeah its stupid
I'd understand for stuff that doesn't like null values yet you need to pass an empty variable
I guess it's just a gateway for java 8 methods
which I kinda despise given I started coding on java 6
lambdas are nice, but streams, mapping optionals and all those 1-line replacements for native functions are not
Also its quite sad Java doesnโt have any future plans to enhance control and safety regarding nullability
thats a lot of validations lol ๐ค
indeed
even then I find myself using anonymous classes a lot less often nowadays
I guess consumers are the only thing I still do anonymally
Why you gotta do streams like that
Waste of performance and ends up taking more time to read
It's easier on the brain to understand a for loop
Meh
Unless you're converting a set to a list or something
I mostly use them at startup
Good thing not every brain is the same
But then again the constructor serves that purpose
Why call 20 methods that abstract all your code when you can just write simple code
When project valhalla finally delivers and when stream impl pipelines become intrinsic candidates its gonna be worthwhile to migrate entirely
I'd rather to a loop to check a list, than to stream it, filter, map, orelse
#getRelative checks are expensive right when done on every X ticks
Trying to convince someone to cache it instead
I advocate for simple code which is why I abstract a 100 line project into 49 different classes
Yeah, would argue for the amount of extra resources streams usually demand still is somewhat dramatic
Streams also loop the entire collection which is pointless if you only care about 1 element
Rarely the case a stream is more efficient apart from readability
Readability sometimes
don't think anyone is claiming streams are a performance gain xD
Fair
Parallel ones Ig
I mean, sorted, skip, take
those are my usual reasons why I move to a stream
map also just feels nice
Hehe
Ohh yeah that oughta be really nice
that went something like
public boolean isFull(Team team) {
return Optional.ofNullable(teamPlayers.get(team)).map(l -> l.size() >= team.getMaxSize()).orElse(false);
}
and I'm like
wtf
Lol
look at sponge API xD
tf
so I rewrote it
and then rewrote it even further down to 1 simple line
but I had to change backend for that
even though my method is technically 5 lines
in practice 3
Map<Team, List<UUID>> uh oh?
it's much cleaner
yeah that's the part I rewrote
each Team now has its own list
why not storing the members in the team?
smh
but it was made by someone that sometimes frequents this channel
so now I hold a grudge
I'm paid to clean up code, not to make garbage
poke
Cool kids just teams.getOrDefault(team, Collections.emptyList()).size() <= team.getMaxSize()
but probably mudability
cool kids store the members in the team and use a hashset :(
cool kids just return team.getPlayers().size() >= team.getMaxSize();
^^
yes xD
tho that requires a change in data structure
also fluent naming style ftw
how does team.getMaxSize() gets calculated?
better be a constant
ive tried a bunch of things and i cant seem to find an easy way to check if a player has put an item in a furnace slot
I believe it's a constructor param
team::isFull kekw
oh well gonna just furnaceextractevent
i hope team.getmembers returns a copy ๐
I'd need to add extra encapsulation for that
you should be able to check both the inventory type and inventory slot interacted with using the inventory events
yeah i figured that, but then i have to add data to the itemstack using pdc or something, but if the furnace already contains items that will cause issues, etc
how so
yeah thats not what i want
i'm trying to keep it vanilla as possible and oyu cant edit the data of individual items in a stack
or be stupid like me and client-side most of the data anyways
unfortunately they all merge when u combine them in the inventory, or don't stack at all
client-side lore is so handy for stuff that has placeholders or configurable items
Would it not be better to store the uuid as two longs in pdc
sure it saves like 63 bytes
i use mfnalexs morepdc api
or some stupid negligent amount like that
Perfect
more persistentdatatypes
My precious bytes
mans gonna have to buy more floppy disks
There's a difference between raw slot and slot.
Raw slot is what that wiki is displaying, and slot is per individual inventory
The only annoying thing about client side lore is creative mode breaking everything
ij assumes some stupid contracts smh
that's literally how it works
@echo basalt lemme dumb it down then
ArrayList<ArrayList<Object>> list1
ArrayList<Object> list2
...
list2.add(new ItemStack)
list1.add(list2)
list2.clear()
my question is, does list2.get(0).size() return 0 in this case, and if yes, would it be fixed by doing list1.add(list2.clone())
mutable ye
The real item wouldnโt even have the lore if creative wasnโt wack
deal with it
No :(
Nah
Looks like an IOOB
Iโm suing Mojangsoft
just crank up Akon's Smack That and get coding
well i guess it works now
Ooh quest system
theres a lot more as well
poor rewards :(
got these to do
Iโve wanted to make one of them for a while, but I could just never wrap my head around the logic it would need
the last one is gonna be a sheep fricker because im so mature
same, i only managed to make skills
its gonna be pain to program tho
Brain too smooth for quest
I tried making quests
lmfao
the backend is hell
I made an objective system once and that was hell
implementing all objectives at once tho
well yes thats what i get if i try list1.get(0).get(0). i want to know why it doesnt return a arraylist that contains an object
i mean
progress so far but i need suggestions bc my brain is getting smoother
but then again quests might actually be easier
i set a array list that had a object
hard coded rewards/tasks?
around june 2018
Yes @smoky oak
the backend isnt too bad tho
proof
lame
And yes clone would fix it
do it softcoded
k thx
thats it
oh god where are your listeners
can create quest like this
below that in another package
theyre quite simple tbh
The heck would the database entry for that be
Looks very coupled
o that's cool
wtf is this lol?
ignore that lmfao
i forgot itemstacks
have a builtin amount
if a player has an inventory opened and is dced does InventoryCloseEvent get called?
so i added my own, ill remove that at some poit
itemreward class has 4 constructors for different item types: my server custom item, itemstack, material (which is where the amount thing came from), and a banknote item from anotherp lugin i made
Yes @drowsy helm
how to make FallingBlock fall slower?
oh hell naw fallingblocks are pain
I'd rather make them clientsided than to use the api
too easy, thanks
๐
i could convert the first and third, but the banknote one is weird so i cant
has to be registered by the server, not just have the meta/pdc data
@ivory sleet why's ArrayList#clone() returning Object?
just so players dont fuck with it
Idk honestly 
But yeah you can use what Im said
Yeah altho you should be able to override the type
uh not really no
I mean yes
Damn I should learn basic oop
Cloneable -> Object so any derivatives of Cloneable can return any subtype of Object
hm maybe yeah
which iirc for instance bukkit does
would make some sense
press insert
insert?
^
press Insert
numpad 0
thanks
i used to rage whenever that happened
yeah i thought intellij was bugged
I used to restart intellij whenever
LMAO Smae
a|bc pressing d normally does abd|c
bump
thanks alot lmao
in this mode it does ad|c
._.
add counter velocity
imma disable gravity and set manually velocity
override the nms class and empty the move method
why should instanceof give issues?
arent they extending some entity class then?
they are extending the nms entity yeah
but getEntityType would still return the bukkit type
so it's irrelevant
and nms implement api so should be safe ig
why does intellij give me this warning even if it's 100% not null?
Bukkit.getPlayer is declared as @smoky tinsel
because getPlayer might return a different value the second time you call it
now it kinda makes sense
but it's suuuuch an edge case
also use Bukkit.getPlayerExact
why so?
Bukkit.getPlayer("fourteen") will return player with name fourteenbrush too
i'm using a uuid for this method, and getPlayerExact only accepts strings
ah thats an uuid
yeah
weird naming
true
didnt even see you checked != null lmao
xD
dont call it twice anyway
rename it to reporterId
and resolvedDate isnt a Date ๐ค
i'm fine with this, i don't almost ever use strings to determine players, unless offline and no uuid in possession
xD
i guess yeah
I just realized I've had my AC on while my window was open for the past 2 hours
as i'm going to introduce a variable for this
yeah i'll rename it to reporterUUID thx
double the windiness
double the power bill
i thought i saw my cat but it was my rabbit who had escaped ๐ค
ah yes
fuck I accidentally punched my desk
almost jammed my finger too
what the fuck is going on
i was typing like 30 minutes ago and suddenly shoved my ring finger into the keyboard
i don't even know how that happened
but i ripped off the delete button
speaking of typing
today I learned that I can do like 130wpm with my keyboard now that I got used to it
๐ฎ
I usually do like 90-100 with other keyboards
that's quite sick
I guess low-profile keyboards are fast for typing
i do 80-90
yeah mine is like a laptop keyboard
oof
okay i know i asked this before but should i pass my javaplugin instance to every class or make a static field in the main class to access it
so you're asking
dependency injection vs singleton
well
dependency injection ofc
Hot setup
I haven't used a singleton for the past like 2 years
my new monitor might arrive today honestly
these are both not quite the same thing either
hehe i stole my moms monitor for her work
why exactly?
to only learn years later, that she allowed it ๐
is there a good non-file-based way to retrieve persistent data from offline players? for online players i'd use pdc, but from what i know, pdc for offline players returns null
its pixel sharpness or whatever thats called sucks bruh
offline players don't have PDC yet
nearly a lil blurry
yeah that's why i'm asking
if you wanna access data for offline players
don't store your data in the PDC
you are using the wrong tool for the job
that's... why i'm asking.
overkill
any SQL or nonsql
Depends what information you are needing
loading player files on your own ๐ค
just a couple booleans lol
yaml
non-file-based
wtf do you mean "none file based" xD
purpose of these booleans?
i can do files but i'm too lazy for that
db is file based too lol
you are persisting data
everything is files
persisting something is done through files
yeah this might be an xyproblem let me explain
just use a pastebin
just take a damn sheet of paper and write it down
when a report is resolved, the player associated with it should get a message. but if the player is not online, i need to remember that player and then send the message when they get online
carve it into wood ๐
paint it on the walls
so my thought was to use pdc and add a boolean/string/whatever and check for it on join, but offline players don't have pdc
dang
my favorite part is the mousepad
minecraft fan
damn nice
I mean, where are your reports persisted o.O
monitor at the left is getting replaced like tomorrow
just persist that there ?
store it in the spawn chunks pdc
or today idk
yamlconfiguration with all reports
doesn't world have PDC too
1 i got no place for three screens on this table
2 i could go sit in my bedroom but theres no wifi there lmfao
or is that a paper thing
yeah chunks have it
I got a router at the corner of the desk
chunks have pdc, which is what I just said to do lol
that's kinda hacky, no?
my main fiber gateway is at my living room
i got the router next to me lmao
indeed world is also a persistent data holder
then I have a connection through the walls into my room
that goes into a wireless access point / switch
which, I'd argue should be used instead of the spawn chunks
that goes into my pc
wifi upstairs sucks so hard
not like the spawn chunk is going away
coc man
only thing I need now is a cellular repeater because I get like 3G on my room
honestly i'm just thinking of giving up and making a file where
resolvedReportIds:
- 205
- 207
so that the player will later get online, and the reports will get fetched by those ids (the reports already have ids so that's not new)
I get like 150mbps 4G+ at the store and only like 10kbps on my room
move to the store
what if each report had a uuid
db
while spawn chunks can change, your counter example would mean that worlds don't go away instead which in fact they do
easy food access and fast internet
which makes your point moot
easy food access
bold of you to assume I buy food
maybe, in the end, storing stuff in a PDC is stupid if you need it persistent globally
instead of ordering food every single day
i mean, ids or uuids, they still have an identificator
maybe suggesting PDC usage for something like this in the first place was a not smart idea
lol
then a file per report
uhhh
regardless of which is used, whether it is the world pdc or the spawn chunk pdc you will need to regularly prune the pdc
next to router
basically make your own bootleg sql
is the only thing I can think of to make use of without creating any additional storage method
the only other way I can think of, is to make use of custom achievements
proprietary files or something
idk I hate yml for database
takes too long to open once you actually have a decent scale
yml shouldn't be used for a DB anyways, you are just as good off with normal flat file storage instead of introducing a fancy api for said storage
if you are trying to read the data yourself, ideally you would load the file into memory using memorymapped api
custom file
fallingblocks are invisible when falling?
more like opaque
fallingblocks are janky
I hate em
I made a throwing blocks feature for a youtuber
and it took me like 10 hours
just to get something that doesn't despawn after 2 seconds
Just listen to System.err
nailed me
hope that means what i think it means
yes
that wonโt work because exceptions already get handled by bukkit
whats the most effecient way to store xyz, i want to make it as minimally space taking as it can be
x y z are doubles. Java double are 8 bytes long. So the most efficient way to store them is saving 3x8 bytes arrays
i dont want doubles, ints work
hello, I downloaded and run buildtools and i now have the Spigot 1.19.2 project
I did what is said in readme.md and compiled it using mvn install
I got two jars
one with the api and one with the spigot + nms without the api
how can i have both in one jar
Image
i added them to a project of mine and they work properly as long as i do both, is there a way i can combine them?
ints is 4 bytes iirc?
If you're xyz don't need 8 bytes each, you can stretch down the bytes arrays and only use the number of bytes you need for each, and create a separator byte
correct
so ill just store a 3x4 int array?
whats the thing with bitwize i remember someone saying
like u could do smth with the ints to make em into one or someshit i dont remember
Easiest way is to store 3 x 4 bytes arrays
But you can make it shorter
for instance 1 byte can store 256 possibilities
how did your deep dive into neural networks go xD
What have you already learned?
And CS you mean theory ? or pratic also count?
both
I'd always suggest going into hardware a bit
always pretty good to know at least the basics
e.g how pieces work?
the urge to crack a thats what she said joke here
arduino and stuff, its really fun
try making a hand controlling thing, where your hand uses a glove with a gyrometer to control your pc
with gestures and stuff
tf
i did it and its so cool i (made it in my class) i showed it to my class and i felt like the god that day
my crush was like just surprised (she is my gf now ๐ idk how a nerd like me got one)
get a nice micro processor kit
build your own clock
and pipe some bits around
thats fun
thats mostly not coding tho
u have to buy 50% of what ur doing here
I recently read a lot about nanotechnology, how is a sensor made, how works a cpu. Worth the time, and you can enlarge your research to how it is going to improve, why are SoC more and more common, and more
Or I also had a great time learning about Quantum Computing, Quantum cryptography
hf
alr ty
You mean the screen effect of an elder guardian going from top to bottom screen ?
Well I guess it's that sound, the name makes sense
didn't you try?
That's the sound, yes
uh actually
i have a question
i wanna make a macro recorder and player
i thought about making a frame data class, and on every frame, i capture the mouse, position the keyboard button clicked and the mouse button clicked
then adding it to a class
which implements List
something like
FramePackage
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
pretty sure blockplaceevent is called before you get to set the text
One message removed from a suspended account.
and otherwise the sign text might be sent after the block place
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
SignChangeEvent
by not having them to begin with
not sure what exactly you are doing, but should be careful with zips in java otherwise you might accidentally introduce a zip exploit via your plugin. But it sounds like you are doing something either out of order, or you are not checking if the file handle is still valid
is it too large for discord?
there is a file size limit
if a zip file isn't being used then you wouldn't be getting zip file closed errors
Zip file closed error usually appears when your software doesn't have the correct writing/reading/executing permissions
sometimes, but not usually. Typically get a different kind of error with this
One message removed from a suspended account.
you will typically get I/O errors or exceptions if its a permission problem
ChatColor.translateAlternateColorCodes
ChatColor or ChatColor.translateAlternateColors
smh
One message removed from a suspended account.
Also the only time I get zip file closed errors is when messing around and reloading plugins at runtime
Via /reload or plugman or whatnot
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
no, '&', "&a[WARP]"
One message removed from a suspended account.
I don't understand yours x)
One message removed from a suspended account.
You'll have to test but my guess is that it is fired even if there is no existing result
First arg should be a char
('&', input)
so do '&' not "&"
One message removed from a suspended account.
One message removed from a suspended account.
Using bukkit tasks
Any method to get all sheep colors?.
The sheep's colors are in an enum https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/DyeColor.html
declaration: package: org.bukkit, enum: DyeColor
runTaskTimer
Wait
Loop over what ?
No
Loop over what ? x)
Explain the feature you want step by step
So you want to loop all player's items and if one has the pdc do something ?
How can they get this kind of item?
Is it given through a command? Is it an item they can pickup? ... ?
How can I put a custom skull into an inventory with for example an arrow to the left or to the right
ok, thanks
Random question is posible to recreate spigot without using minecraft-sever?
Oh ok
Have a look at Minestom, they did it without implementing the entity AIs, and other minecraft behaviours
I ask because if you recreate it you wont have mojang copyleft issues
Or yes!
Can u confirm it please
Mhhh, I'm not sure. I'm not familiar with US laws sorry
Oh ok
Because mojang doesnt allow to redistribute their code and if you are creating your own server side you are not using their code in theory
That's right
But you're still using their protocol
idk if it's considered in the copyrights
They cannot i think
Isn't there also minestom
there is a million server implementations out there
more or less developed
minestorm mostly focuses on barebone so you can reduce the server to as little as you need
Hey
Protocols can be copyrighted, however that doesn't prevent their use if you implement the protocol yourself. Think of it more like a specification more then anything. You can't create a copy of their protocol for whatever else, but you can freely implement it as long as it is used as intended. Lets also not forget the fact that the MC protocol is built on top of TCP and UDP protocols which mojang doesn't own the rights to ๐
So if you dont use minecraft sever package they cannot apply law right?
Because you are not using their source codes
it depends
you can't copy their code. This is why clean room implementation is a thing
just because you coded it yourself, doesn't mean you didn't copy
You dont understand frost I mean
I saying that mojang cannot fuck you If you are just doing your own sever side implementation
basically, you would need to make your own server code without ever looking at how mojang did it
second, you will still need to implement their authentication library as well
since that is part of DRM
Laws aren't True or False, there is always a way to put you down
If you make it without ever looking at their code they can't really do anything to you
I mean you might end up with similar concepts but in the end it's different
I just want to know if they can fuck me up doing own sever side impl without seeing their code
Just following their protocol
I bet they won't even take a look at it
Probably not unless it gets massive lol
I wont do it
But maybe in a future after studied programming and being really skilled maybe I can give a try
Because i do that first thing I would make is implementing PMC (Plugin Messaging channel) without player connection
any non-deprecated way for this?
its deprecated cuz you should use Bukkit.getOfflinePlayer(UUID)
but you cant so its fine
Just as a warning
Yeah that's why you should first to try getting online player, if you don't get it you get with saved players in world file and if that doesn't work then no player
It doesn't require Mojang services at all
yeah i make sure that the player is not online, if they are online i just grab the uuid
Bukkit.getOfflinePlayer tries to get online player first
Does it!?
oh that makes it even easier
yes looked at impl
That's cool
Idk why I have built a method for that before
Maybe it was changed
Or maybe I am an idiot
?cba
OpKarol#5694 definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.
is there an efficient way i can apply a Supplier<String>... to a string, like String::formatted does?
stringbuilder ig
supplier returns a string?
ye
it doesn't run an action on it
nope
is there a way to show the durability bar on an unbreakable item?
I honestly don't know what you're tryna do
basically same thing as the other method but i wanna use suppliers
uhhhh
String[] contents = new String[placeholders.length];
for(int index = 0; index < placeholders.length; index++)
contents[index] = placeholders[index].get();
isNull(o, message, contents);
or if you like lambdas and all
String[] contents = Stream.of(placeholders).map(Supplier::get).toArray(new String[0]);
I hate em
I actually like streams purely because they look better
String[]::new
and take 5x longer to compute
they re slower
People who use them then pass in an atomic 
I actually made a PR to the terrible-plugin repo to use atomic everywhere lol
Lpl
I love the motd section
bump
Not with the unbreakable tag
so id have to implement my own unbreakable system by cancelling PlayerItemDamageEvent
or just not show the durability bar
also, can i somehow figure out the name of an item that the client shows? i want to add a prefix to the item name
Why do you want to show the durability bar ?
im implementing a tinkers construct type durability system, wanna make broken tools unbreakable but still show the bar to make it easier to see that theyre broken
Yes, you can get the locale name of an item
So the answer is yes
the terrible-plugin repo is so good, i decided to clone it with intellij and it froze for like 20 minutes
how would i do that? theres Player.getLocale but im not sure how to figure out the name from that
String.format or math.round
idk is it nullable? check the annotation
well if the getString javadoc doesn't say anything contrary then idk
one sec
If the String does not exist but a default value has been specified, this will return the default value. If the String does not exist and no default value was specified, this will return null.
saveDefaultConfig in onEnable
and just add the value like you'd do with a normal yml file in resources/config.yml
why are you forbidding multiple of the same operators
my loop stuff is a lil fucked up
Can I see your code
i was only allowing <x operator y> in the beginning and i still have to change stuff
lemme do some push
i'd love to too
