#dev-general
1 messages · Page 197 of 1
what about that code being ran size^3 times
:what:
It wont?
What about spaghetti?
how will it not be?
🍝
this is confusing me lol
still ran way too many times though
what else could be causing the item frames to keep placing?
he said loads of them drop on the floor
sigma 
bruh what
my bad 😂
I was gonna say
it’s maths lol
What exact part confuses you?
ffs lol
Have you studied vector maths?
nop
oof
Coordinate geometry?
what kinda stuff is that lol
What grade are you in my guy?
I’ve studied both of those
10 lol
How?
How?
._.
I learnt this shit in year 10 (US grade 9 equivalent)
what for weird edu system do you guys have
what kinda stuff is coordinate geometry lol
I might know it, just never heard that name before
It deals with coordinate systems
basically drawing shapes between coordinates I believe
and gives a intro to vectors
A vector is basically something that has direction and has a length(termed as magnitude of the vector)
is it like parabolas or whatever?
just read the wikipedia page lol
A vector may represent position, or directional length ..ect
In mc
Your location
Thats a vector
comprising or your x,y,z positions
a vector is a measurement made of two main components: speed and magnitude (direction)
Vector distance between you and another player is the difference between, but do keep in mind, vector is relative
isnt that like vector from dispicable me's slogan
yes
a vector is any quantity that has those two properties
for example, velocity is a vector
Direction of A from B = A - B
Are you really not being taught vector? 👀
That is final position - initial position
I've already learnt the coordinated geometry when I was in grade 9
wait how is velocity a vector
Are you really not being taught vector? 👀
^
nerds
^
I've already learnt the coordinated geometry when I was in grade 9
^^
wait how is velocity a vector
Velocity has direction, does it not?
we're doing like quadratics and stuff
Uh.. also
imagine remembering anything from school kekw
velocity is speed relative to direction
I'm pretty dissapointed tho..
does that have anything to do with the cube im tryna make?
nothing in development support is related 
vectors aren’t measurements of distance though, they’re measurements of speed relative to direction
:what:
what?
A vector is not speed relative to direction
That makes no sense
A vector is simply a direction with some length
It can represent directional speed i.e, Velocity, Yes
But that does not make all vectors velocity
actually you’re right, BLOODY SCIENCE CONTEXT-RELATED DEFINITIONS
Its not a context related defenition
No?
actually you’re right, BLOODY SCIENCE CONTEXT-RELATED DEFINITIONS
@jovial warren barry broke with caps
I was told a vector was a quantity with speed and magnitude, that’s context-related
pretty sure yugi is correct lol
You probably are misremembering
I’m not
a vector having speed doesnt make sense
Take your books out my guy
I voted for Yugi's
that’s exactly what science taught me Yugi
science wrong
As I said
religion right
Open your book
Vector is just direction thingy, nothing special
Check
religion right
and I’ve read now on wikipedia that it’s wrong
😂
get phillip from earlier on that
you think I have last year’s book on me? I’m at school rn lol
also I can 100% guarantee that’s exactly what I was told
^
Average elara user
https://media.tenor.com/images/3e0209cb79440822d41f30b651404a6a/tenor.gif
Go check your book when you get home 🙂
vector is da best
I am 999999% guaranteeing that I’m right Yugi
Go check your book when you get home 🙂
ffs stop doubting me and just believe me
no need for books when u have the internet
right, so is this what ive gotta work out how to do lol?
Assume center = (cx,xy,cz)
current_position = (x1,y1,z1)
trying to find inward direction:
inward_direction = (center - current_position) with sigma function applied to each coordsblock_to_check = current_position + inward_direction
also it’s unlikely I have that in my book @old wyvern as I’m a lazy bastard and never write anything down
yes Aj
hmmmmm
That should be pretty simple
so do I have to convert the location to a vector?
ligma function
whats ligma
ligma function
Better to do so aj,
you can’t believe that all they give us in science is context-related “dumbed down” definitions can you Yugi
advanced maths
ah yes
location mutates with most functions
Assume center = (cx,xy,cz) tf is cx xy and cz lol
also wouldnt centre just be the current location?
just variables since I didnt know ur value?
so is it just the centre of the cube?
you can’t believe that all they give us in science is context-related “dumbed down” definitions can you Yugi
@jovial warren you might check your school sometimes 👀
right, so just the input location .toVector im guessing lol
inward_direction = (center - current_position) with sigma function applied to each coords
Does the current position change? Wont this always = 0 since center = current_position?
yeah
current position is the location of a block on the shell you generated
so just in the middle of all the loops?
I havent read your code, but where you place the blocks, yes
and what should the inwardDirection be lol? And Int? A vector? Or like :what:
val inwardDirection = location.toVector().subtract(Vector(x,y,z)) 🤔
Dont you have the location instance of the block?
oh yeah
Just use toVector on that
val inwardDirection = location.toVector().subtract(loc.toVector())
with sigma function applied to each coords whats this about?
Then youd need to use signum on each coordinate
Math.signum
You probably wont need that if you are dealing with block locations
but just in case
after substraction
on what values
tf does normalize mean
yup forgot
Unit vector
Make it a vector with length one and just direction
use the normalize function
declaration: package: org.bukkit.util, class: Vector
val inwardDirection = location.toVector().subtract(loc.toVector()).normalize()
then what values to I call signum on lol
the x, y, z components
Actually it may be worth it to just do the math on each coordinate than using Vectors
as in the Vector class
Actuall nah just continue
what do I do with the result of like sign(inwardDirection.x)
(IJ told me to use sign not Math.signum)
val inwardDirection = location.toVector().subtract(loc.toVector()).normalize()
val inwardBlockPos = Vector(sign(inwardDirection.x), sign(inwardDirection.y), sign(inwardDirection.z))
That should give you the block direction you want to move towards
If you were using int block positions you probably wont need to do the last step tbh
Actually nvm
wait so what position does this give me lol
You still would have cases which you would need to do the same
the one i need to put the item frame?
wait so what position does this give me lol
@obtuse gale
What you need to substract from current pos to get the block location to place the item frame at
Add actually
val inwardDirection = location.toVector().subtract(loc.toVector()).normalize()
val inwardBlockPos = Vector(sign(inwardDirection.x), sign(inwardDirection.y), sign(inwardDirection.z))``` So do I just do location.subtract(inwardBlockBos)? Dont I already subrtact it from the centre in the first val?
Thats to get the direction
What you did is get 1 block movement to that direction
And its add
oh what
val inwardDirection = location.toVector().subtract(loc.toVector()).normalize()
val inwardBlockPos = Vector(sign(inwardDirection.x), sign(inwardDirection.y), sign(inwardDirection.z))
val finalPosition = location.add(inwardBlockPos)```
add what? centre to block position?
val inwardDirection = location.toVector().subtract(loc.toVector()).normalize()
val inwardBlockPos = Vector(sign(inwardDirection.x), sign(inwardDirection.y), sign(inwardDirection.z))
val finalPosition = inwardBlockPos.add(location.toVector()).toLocation(world)``` like that?
isnt that what I had above?
is location not center?
it is
so do I add inwardBlockPos to loc?
alright
then I still need to get a BlockFace dont I? So I know what way to face the itemframe
Cant you getFace on new location's block with old loc as arg?
getFace?
What exactly do you want?
dotn I need to call this for stuff to work?
won’t there be multiple faces?
itemFrame.setFacingDirection
what does that do, just from the name, tell me
...sets the facing direction?...
call getFace on the itemframe location with block location as arg
the opposite face should be the face u want
exactly @obtuse gale , now, is that what you want to do?
getFace doesnt exist lol
What are you calling it on?
exactly @obtuse gale , now, is that what you want to do?
yes but I dont know what to set it to
Location
what does it take?
I said block
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Block.html#getFace(org.bukkit.block.Block)
declaration: package: org.bukkit.block, interface: Block
you said item frame location
call getFace on the itemframe location with block location as arg
getFace takes in a BlockFace
Cant you getFace on new location's block with old loc as arg?
getFace takes in a BlockFace
It takes in a block
oh yeah
right
it no work :((
[00:24:25 WARN]: Caused by: java.lang.IllegalArgumentException: Cannot spawn hanging entity for org.bukkit.entity.ItemFrame at Location{world=CraftWorld{name=mapgames},x=-2.0,y=98.0,z=-2.0,pitch=0.0,yaw=0.0} (no free face)
Did you call opposite face?
call getFace on the itemframe location with block location as arg
the opposite face should be the face u want```
BlockFace#oppositeFace() I think
lemme check
declaration: package: org.bukkit.block, enum: BlockFace
BlockFace#getOppositeFace()
still get the error
Check the output you get for inwardBlockPos, finalPosition and the respective loc
the respective loc?
The block location in respect to which you wanted to place the item frame
isnt that finalPosition?
val inwardDirection = location.toVector().subtract(loc.toVector()).normalize()
val inwardBlockPos = Vector(sign(inwardDirection.x), sign(inwardDirection.y), sign(inwardDirection.z))
val finalPosition = loc.clone().add(inwardBlockPos).toBlockLocation()
inwardBlockPos.debug()
finalPosition.debug()
location.debug()
world.spawn(finalPosition, ItemFrame::class.java){ itemFrame->
val direction = itemFrame.location.block.getFace(location.block)?.oppositeFace ?: return@spawn
itemFrame.setFacingDirection(direction)
}``` thats what ive got lol
the loc
isnt that finalPosition?
@obtuse gale
Final position should be the inner location
yeah
ok
having a look
hmm thats a corner block?
You dont need to place there
Ignore the 8 corner blocks
Distance
also if i actually teleport to the world only one block was placed
@obtuse gale
What?
If I go to the location only the block at 0 0 was placed before the exception was thrown
As in the center?
yeah
Why are you running this on the center block?
You only need to run it on the shell locations
Use pythagoras formula to ignore the corners
what lol?
Ah distance formula in 3d
Wait no
pythagoras should be fine
One sec
actually root of r^2
but yea
You get the point I assume
You could just compare distance squared
and then what do i check from that tho?
@obtuse gale
Distance sqaured to center
All 8 corners should satisfy that
Alternatively you can create a list of the 8 corners beforehand and just check if your list contains the placing location
Basically you need to apply that earlier part only on the wall blocks
Not on the center
Not on the corners
🤔
You have any questions?
many
Ask away
how do i get the distance squared to the centre lol
Pythagoras Theorem?
For a block being placed you would need to get the lengths from difference from center
Math.pow(Math.abs(center.x - blockpos.x), 2) + Math.pow(Math.abs(center.z - blockpos.z), 2)
then what do i check if that =
radius squared
still get the error 😎
[01:01:48 WARN]: Caused by: java.lang.IllegalArgumentException: Cannot spawn hanging entity for org.bukkit.entity.ItemFrame at Location{world=CraftWorld{name=mapgames},x=-2.0,y=98.0,z=-2.0,pitch=0.0,yaw=0.0} (no free face)
yugi boutta flex his math skills
🙃
What's the java equivalent to kotlin's setOf() ?
Java 8 it'd be something like new HashSet<>(Arrays.asList("", ""))
In java 9+ there is Set.of()
danke
time to switch to latest java
cba
look at that boilerplate cut down
new java is actually good
still java tho
kotlin still better
Elara best
:elaramoon:
After 10 years of trying i finally managed to deploy with Gradle, holy shit
Also made this work https://repo.mattstudios.me/ 
After 10 years of trying i finally managed to deploy with Gradle, holy shit
Lol
in before niall says maven is better
Well, it kinda is for deploying to central
🙁
I'm debating on how I should handle storage with this, do I just go for a db and say fuck it or
with what
Check what I'm playing 
uh oh
Oh, gl adding the dinosaurs
Luck is indeed what I'll need
Also add the Snow Owl for me kthanks
Best creature ever 
100% ^^
The goal is to not use an RP for everything, cause otherwise I could just cheese it with that
We should make it a fabric mod
@prisma wave Does this actually work for you? https://github.com/knightzmc/pdm/blob/master/build.gradle#L35
The getting the credentials from gradle.properties
yeah works fine for me
Can't seem to get it to work >.<
Tried all sorts of things, every time i try to publish it gives me error like the credentials are wrong
Are you using ~/.gradle/gradle.properties?
I have it on the project, let me try putting it there
The thing is that when i println the values it actually works
Hmm
Omg..
oh?
The error was the dumbest thing
So, repoUsername = "admin" this bad
But repoUsername = admin good..
oof

jesus niall
lol
@ocean quartz You ever used world painter or whatever it's called?
@prisma wave are you good with databases
Well I may ask here right now, how would I do self checking
It's kind of a way to store ids
Store IDs as in?
in a database
I have no idea what you mean
primary keys
No but assume I want to store ids which are unique in a database and I want to store the IDs in base 10 mainly
So self checking would be the best way to do it I heard
although I dont get how it works mathmatically
Just a Integer for the primary key then?
yeah but how would the self checking part be done
yes
I have no idea what the objective is here
@hot hull For like creating custom terrain and stuff?
Yea
No but assume I might want to store IDs somewhere. I don't want it recurring and don't want to store it as UUID because its not user friendly. So I could use self checking for the IDs. Yes I'd store it as an int. For instance generating random ints wouldn't be smart as that can generate duplicates.
I have used it yeah
just let the db generate your ids?
You could have it auto increment
Wanna make me The Island 
auto increment has lack of thread safety?
what?
or maybe I'm wrong
what database server you using?
I can try xD
Currently none. I was mainly confused about how the selfchecking part would be done
Hibernate has a thread safe id generator
okay because iirc self checking was something 8 numbers summed individually equals the last two
Lets hibernate together
but I don't understood why it would be useful to do that
idk what you read
but it's weird and wrong
if you want to just use incrementing ids you can just let the database handle all that without you having to worry
and if you are using an ORM you can actually choose what for primary key generation you want
For example hibernate + native AI = no batching enabled
So you use hibernates own generator
hmm okay
i linked my account but cant see the premium support channels?
dev general
Already handled the above
my bad
ngl pretty neat pipelines https://i.lemmotresto.com/2020-09-23--02-13-01pm.png
Laravel
not everything php related is laravel niall
Ive used propel before
never heard of propel before
How do Idelete a github prject
oh it's an old orm
i want to delete this
it was meant to be a milestone
@frigid badge Can you give me permission
on PlaceholderAPI/Animations-Expansion
To transfer issue to it
what issue
72
niall is at the forefront of the spring circlejerk
thanks
https://paste.jaims.dev/qupuxowawa.coffeescript i have this event waiter that i just made for handling events inside of command classes instead of the normal way with a list or map of uuids, then checks and all that stuff
it is working for me, but does anyone see anything that looks like a bad way to do something or ways it could be optimized
how do i set like a lobby compass ?
to open a menu
?
#development but just make a click listener (PlayerInteractEvent iirc), then open the menu when it runs
CloudFlare Blog
we have decided to switch our backend infrastructure to elara as we have found it is quicker than assembly
we now serve double the bandwidth per second
@steel heart the type system is a big feature
elara moon
🌚
most probably yes
let onEnable = {
print "lol"
}```
Okay Java and kotlin be flopping
uh
anybody know the right x values to make a hand swing animation for an armor stand?
when (step) {
0, 8 -> moveArm(210.0)
1, 7 -> moveArm(240.0)
2, 6 -> moveArm(270.0)
3, 5 -> moveArm(300.0)
4 -> moveArm(300.0)
9 -> {
moveArm(180.0)
step = 0
}
}
private fun moveArm(to: Double) {
robot.stand.rightArmPose = robot.stand.rightArmPose.setX(to)
}```
This rotate it backwards lol
ayeeee, using Math.toRadians(to) fixed it 😮
gaby i thought you didn't like kotlin
nah @ocean quartz made my try it
I mean when statement is lit
only if the pickaxe was also rotating O.o
when (step) {
0, 6 -> moveArm(240.0)
1, 5 -> moveArm(270.0)
2, 4 -> moveArm(300.0)
3 -> moveArm(330.0)
7 -> {
moveArm(210.0)
step = 0
}
}```
no but like how does minecraft handle the values of x y and z to the arm
is it rotations?
oh so a x y and z angle
mhm
it doesn't look too organic
too hacky?
ye
instead of 8 steps make 20
uh
considering tps is 20
10 forward, 10 backwards?
Is BigInteger a smart class to use when wanting to store large numbers?
or is some type of encoding and decoding better
the numbers is big and will be used frequently over the network
Big numbers use more ram iirc
yes, TEN, very useful
:))
Yeah that’s why I considering not using it
I was thinking base64 but it would mess with performance
Because decoding and encoding every tick isn’t very convenient
arent big numbers some kind of array of strings?
Why you big brain
array of strings?
xd
I really doubt it is
God, adventure is just as ass to work with as bungee's chat 😫
use negative numbers :smart:
Well minecraft tends to crash when you put a too big number
I doubt anyone will play minecraft in Long.MAX_VALUE ticks but it’s possible
Yeah that’s smart as well
What is it you're trying to do lmao
arent statistics stored as integers?
So basically an entity which has an age in ticks data paremeter
And I got to the conclusion it might mess up
If long max value is the maximum value
Because when passing over it minecraft would start to behave weird
Since the size of the entity is based on the ticks
Isn't the age of an entity, like, backwards?
Like a countdown
It's a baby till it reaches 0
Normally yes
But?
In general terms it's that way, there's a countdown and stuff happens when it reaches 0
Assuming we have more than just a baby and an adult I’d have a ton of those timers
Run them async 
Ayyyy got it working
Hmm yeah
Conclure, this means forge compatibility 
lmfao
Matt that’s very GODLY
I don’t know why mine is particularly small
someone's has to
Oh wait, i don't think adventure has forge
LAFF
So technically works on, Bukkit, Bungee, Velocity, Sponge, Fabric
who uses forge anyways
It shouldn't, just thought it was already a thing with adventure
Hmm I can try implement it if you are tired of that
Nah, haven't been working much on it at all xD
Jokes aside, i can try
The annoying part is just testing

Yeah Matt I agree. Like in forge one run takes for fucking ever
Heyo @quiet depot I have a few Gradle related questions, on RPF you have different modules right?
So i am trying to do the same, I have all the modules set and everything, the problem is when publishing
Idk how to set the maven publish to have the modules like mf-msg-bukkit and mf-msg-adventure
yea
still need help fixing this
[12:00:34 WARN]: Caused by: java.lang.IllegalArgumentException: Cannot spawn hanging entity for org.bukkit.entity.ItemFrame at Location{world=CraftWorld{name=mapgames},x=-2.0,y=98.0,z=-2.0,pitch=0.0,yaw=0.0} (no free face)```
code:
If instead of spawning an item frame I place a block it places blocks in all the right locations...
except it does place some on the corner piece
heey I bought AutoSell via SPIGOT. what version do i need for 1.8.8?
?spigot
Spigot Account Linking
To get support for a premium plugin owned by Clip or Glare you will need to verify your spigot account using =spigot in the #bot-commands channel. After you have successfully linked your spigot account you should ask your question in the coresponding channel for that plugin. If you have already linked your account and want to update your roles, run this command =spigot check.
@white kettle
Anyone know how to use the IJ debugger well lol?
JetBrains do, they even made a full guide on it
apparently I need to step through my code and work out why im being told to fuck off by the exception
And I worked out how to step through and stuff...
@obtuse gale
Is this what you wanted?
Yes
Reminder, the top and bottom doesnt seem to work on spigot 1.14.4, but does on paper spigot 1.14.4. Apparently its fixed on 1.15+ on spigot as well I think
I'm on 1,16,3
Alrighty, make sure you the block location you are using has whole number values
Else just do location#block#location, it gives you back whole numbers
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
@obtuse gale
Heres what I tried
https://paste.helpch.at/jasezunugu.m
Seems to work
ty ill check it out
FlightTrails
@old wyvern this works
private fun World.placeItemFrameAt(center: Location, x: Int, y: Int, z: Int, r: Int) {
val location = Location(this,center.x + x, center.y + y, center.z + z)
val inwardDirection = center.toVector().subtract(location.toVector()).normalize()
val vx = if (abs(x) == r) sign(inwardDirection.x) else 0.0
val vy = if (abs(y) == r) sign(inwardDirection.y) else 0.0
val vz = if (abs(z) == r) sign(inwardDirection.z) else 0.0
val finalPosition = location.clone().add(vx,vy,vz)
center.world?.spawnEntity(finalPosition, EntityType.ITEM_FRAME)
}``` But this doesnt
```kotlin
private fun World.placeItemFrameAt(center: Location, x: Int, y: Int, z: Int, r: Int) {
val location = Location(this,center.x + x, center.y + y, center.z + z)
val inwardDirection = center.toVector().subtract(location.toVector()).normalize()
val vx = if (abs(x) == r) sign(inwardDirection.x) else 0.0
val vy = if (abs(y) == r) sign(inwardDirection.y) else 0.0
val vz = if (abs(z) == r) sign(inwardDirection.z) else 0.0
val finalPosition = location.clone().add(vx,vy,vz)
val itemFrame = center.world?.spawnEntity(finalPosition, EntityType.ITEM_FRAME)
}```
which I thought was impossible but i mean
Huh, what does it result in?
the error from earlier
Are you sure center is block location?
val center = location.block.location
hmm
Yugi
Yes?
I made gamemodes plugin, and its only self gamemode changing
so im trying to make it so I can change other people gamemode
by using arguments
but look at this
if (target.equalsIgnoreCase("")) {
here I need to put the name of the player?
What?
uhh
Why are you comparing that to an empty string?
I am asking if I need to put in that empty string the event to get player name
What you just said makes no sense
idk
getPlayer*
aren't location's immutable? No need to clone it @obtuse gale
Lemmo you ever built like an advanced search/pagination system?
define advanced
oh yeah I've done that
yeah
aren't location's immutable? No need to clone it @obtuse gale
most methods mutate them dont they?
How do you do it (talking mainly about form handlin) unless you have only done it restfully
they don't mutate they make a new location @obtuse gale
I've only done it restfully
but if you are using spring you can just use spring's lang for that
it has an entire search/filter language right
pretty sure stuff like Location#add adds to the current location
https://helpch.at/docs/1.16.2/org/bukkit/Location.html#add(double,double,double)
"Returns: the same location"
Its messed me up some times before
it has an entire search/filter language right
@frigid badge
Believe so. Im looking at Specification<T> currently
I thought location's were immutable my bad
I thought you already knew this before?
probably, I don't remember. I never work with bukkit
If I wanna include an image that my plugin uses can I keep it in the jar or do I need to like unpack it to the config folder or something?
If so how do I get it as a file
saveResource()?
hm?
Can I just chuck the image in the resources file then access it from within the plugin?
Try to see if saveResource also work with images. You might be able to access it from inside the jar but idk how
@frigid badge whats best layout:
aircraftService.findByOperator(Operator operator)
operatorService.findAircraft(Operator operator)
You can use saveResource on an image
but im not tryna save an image im tryna get an image
That’s what it does you can get the image from resources
It’s a little misleading of a name
@ocean quartz I have such good ideas on how to make the dinosaurs but not sure how doable it'll be since they'll be pretty intense
saveResource saves it
you can just get a stream from the resource
@obtuse gale
find by operator
saveResource saves it
@frigid badge to data folder
yes and he only wants to load it from his resources folder.
here's an example of just loading it as an image ImageIO.read(getClass().getResource("/images/squared_menu_main.png"));
@obtuse gale
final d = new DataInputStream(null);
System.exit();
That is definitely the final d 😔
I hate imageio
Big brain lemmo
This pagination kind of beautiful
aren't location's immutable? No need to clone it @obtuse gale
@frigid badge
sadly its not 😂
Spigot 👏
or rather Bukkit I guess
f bukkit
whats better performance wise, I heard someone say if I wanted to like set a block I should do
Add to location
Set block
Subtract intial add,
instead of cloning, or is the difference negligible
Its possibly better to add and substract
It’s does cause less objects
Atleast if thts being run a lot of times
whats the best way to handle players in my games
@EventHandler
fun onInteract(event:PlayerInteractAtEntityEvent){
val game = gameManager.games.firstOrNull { event.player in it.players }
if(game == null || game !is TicTacToe) return
// Do stuff here - the player is in a game of TicTacToe
``` This is what ive got atm, idk if its a good way to do things tho....
whats it?
Kotlin thing
Maybe have Map<Player, Game>
Quicker lookup (since its every interaction)
well games can have multiple players
atm Game has a val list = mutableListOf<Player>
and I just add the players to that at the start, but i feel its a weird way to do it
I would do
Have a map of all players and there current games
Maybe make it static in the game class
When you add a player to a game you add it to the map
what would the map be?
<player, game>
Doesnt matter
ah right
As long as a player cant be in 2 games at once
and chuck it in a companion object?
yeah
I still need to run instanceOf checks tho? Isnt that the slow bit?
for game in games {
for player in players {
if player == thisplayer {
}
}
}
vs
game = map.get(player)
if game == null || !(game instanceof TickTacToe) {
return
}
//do stuff
Compared to the iteration I think it should be fine
alright
Thinking about it each game can only ever have two players
should I use a Pair for that or stick with a list or something?
I guess its expandable if I use a list, that way if in future I decide to have more players I can
If you have similar games you could consider Compat
Whats compat?
Ahh yeah it may not be it’s real name it’s used primarily for adding support for multiple plugins aka all the different factions plugins by having methods that are identical in name in each handler
But in theory it could be used for the different games
But I feel it’s too limiting actually
Wait so should game contain a list of players?
I have the game instance but not the players
and the map is <Player ,GAme>
it might be useful if the game had a list of players
so should I just add the list of players to the itnerface?
Then when would I set that list in the implementation
val players: MutableCollection<Player>
and then just implement it
MutableCollection because that allows you flexibility with the type of collection you want to use (e.g. set, list, etc.) and it allows you to manipulate it
When should I add the players to the list?
okay nerds 
When they join the game
how the fuck would you make a client like badlion
would it just be one chonker of a forge mod
A client for the server and then render the received data
As with most client like applications
no @remote goblet , it’s a massive collection of utilities and a lot of design work by Badlion’s designers
Ori support
To get an itemframe by a location would I have to use getNearbyEntities?
Most likely
1 To be safe
try with 0
well there are itemframes around it
it'll be more efficient if you can do it like that
here's an example of just loading it as an image
ImageIO.read(getClass().getResource("/images/squared_menu_main.png"));
@frigid badge Caused by: java.util.zip.ZipException: invalid bit length repeat
code?
val bottomRightRenderer = ImageRenderer.create(ImageIO.read(this::class.java.getResource("/maps/bottom_and_right.png")))```
make sure your resources are correct in the jar
yeah they are
it's caused by your ImageRenderer
oh
im using johnnys lib, is it thats fault, or is it that im passing it in a dodgy picture or something
Try replacing the image in the jar with a fresh copy without building
oh alright
to make sure it isn't due to building basically
ah ok, trying now
I had a similar issue earlier
I couldnt be bother with fixing it at that time so I just did that, you probably need to make a custom task copy the file
😂
Nowwww
How do I make it like not do that lol
heyo
when will deluxe be updated to 1.16.2?
theres about a thousand deluxe plugins
deluxe chat xD
#deluxechat pinned messages
ah right, ty.
Can anyone help me??
Ah yes because we read minds.
So how do i make it so that certain lp groups can see liek certain buttons kind of thing
Wrong channel
I seemed to get ignored in the other one
Because you're saying "hi help me" we don't read minds, ask the actual question and someone will help if they know
is there a plugin that would allow you to buy/sell items such as a diamond hoe durability X ID?
im planning on making a bunch of new custom items using the durability ID's on items
im using 1.12
but i need to know if those items can be actually sold/maybe even bought so they function properly.
Wrong channel
I still don't get why most people in Spigot discord hates kotlin because it's so-simplified Java 
🤷
Because they are smoothbrains lol
The majority is
I still don't get why most people in Spigot discord hates kotlin because it's so-simplified Java
@regal gale I mean there is always this argument like “oh boilerplate reduces isn’t always good” or like “I heard it lacks in performance” :/
They worries about wrong performance
worried*
boilerplate 🤢
public final class Node {
private final Location location;
private final Material material;
public Node(final Location location, final Material material) {
this.location = location;
this.material = material;
}
public Location getLocation() {
return this.location;
}
public Material getMaterial() {
return this.material;
}
}
Funny thing, why even use java if you only care about speed
Go C++ then 
Ye
@ Niall
So I'm trying to make "natural" looking material nodes, anyone got any suggestions on how one would achieve that (otherwise I'm just gonna experiment random shit)
Material nodes?
Basically Stone, Iron, Flint, etc
Shade?
What?
You want to spawn ores on the map?
Yes Gaby
Could use worldedit and create structures I guess
hmm
Or just bukkit if the structures are small
Gonna use worldedit for other stuff anyways so might as well for this
Commission or for fun?
Look at what I'm working on
You really think anyone would commission something like this?
Yes?
lol
No Gaby no
People play rust un minecraft
You do realize it's a massive game, which would be hella expensive, ain't nobody gonna spend that much
People talking "big project" with 100 classes 🙄
From seeing how people commission shit in the past :((
Horrible
Horrible syntax*
it's still light
Horrible eyes
#(println %) lambda
ew
tfw a rust "noob" talks about their new "macro" and your just like "no :)"
plebs ```rust
if condition {
blah
} else {
blah
}
```clojure
(if condition
(blah)
(blah))
clojure master mind
Agreed ^
bm how do you do multiple things in your if block
Nope
(if condition
(
blah
blah
)
(blah))```?
You dont
Gaby am I dumb or
maven { url = "https://maven.enginehub.org/repo/" }
compileOnly "com.sk89q.worldedit:worldedit-bukkit:7.1"
ew =
ok boomer
Check their wiki
I did but it's confusing as shit, should be what I put
Was hoping you used it in the past 
@surreal quarry the first list is the if, the second is the else
so yeah something like this
(if condition
((println "1")
(println "2"))
(println "Else"))
(if condition
((blah)
(blah))
(blah))```?
not sure that's formatted properly
ah ok
but yeah
ew again
kinda ugly :)
meh
lol
looks fine in practice
i could jsut never get used to having to wrap every line in parenthesees
you do get used to it
also it makes sense
since the parentheses are for function calling
its like ; with extra steps
well in terms of the syntax, if takes a list of expressions
it just so happens that lists and expressions are both made with ()
since, you know, it's a lisp
wack
I mean it's good that there's so much variety in languages.
indeed
fun test(t: String.() -> String) {
print(t("abc"))
}
fun otherTest(t: (String) -> String) {
print(t("abc"))
}
whats the difference between these two
cause they seem to do the exact same thing
like (String) vs String.()
the first one has the String as the receiver (i.e this) the second it's a parameter (i.e it)
when would you use one or the other?
does it not matter
or do they have a specific use case
doesn't particularly matter
just depends on if you want the user to have to type it or not
the only time you might want to consider it is if you have nesting
as kotlin fun1 { fun2 { fun3(this@fun1) } } is gonna be more annoying and messy than kotlin fun1 { a -> fun2 { b -> fun3(a) } }
I did but for 1.8 @hot hull
These API docs really wanna make me yeet
Already figured it out Gaby :p, but yea the docs are actual garbage
"Ah yes so we use an Actor from an EditSession" now have fun trying to figure out how the fuck to get an actor or an edit session from a user, cause why would we document that
