#dev-general
1 messages · Page 204 of 1
👀
I really wanna tryout dev
its ur life, lol
so do whichever you think is more fun
It’s interesting and very demanded in the French community of modded pvp faction
So like I need to learn everything to make a server so like plugins + how to add new items in the game with effects and stuff
If you want plugins and mods then sponge is probably best
The sad thing about minecraft is that you can literally make a server with the online plugins
The free to use
So it sucks
But yea. I’ll work with big servers which really need to make some different and never seen content
What sucks?
It sucks for the devs that want to make money since you can make a server up without any dev
Like from internet
You just copy and paste
Nothing wrong with that?
Yes nothing wrong
Why remake the wheel for everyone
It's difficult to make a fun server without custom things
Yes I know
That’s why they always stay little
So if I get ever called it’s gonna be for bigger servers
But I first need to learn other a lot of time
Okay so I use sponge ?
I write sponge minecraft and can find it?
yeah, learn Java and then read through the Sponge API docs
@prisma wave how long have you been coding
How old are you now ?
16
I guess lol
What do you use your knowledge for ? Getting payed to do work or for your own server?
Do you know if sponge works under minecraft under launchers ?
I started learning for my own server but I mostly work for money / fun now
wdym?
sponge is for forge iirc
idk, not used it much
Cuz french faction servers are mostly modded with a custom everything
Like it’s under laucher
oh yeah
Arent factions usually not modded?
Havent seen any modded factions server atm
It’s very different
So for exemple the server is called hypixel
It’s a laucher you click on it you log on it
And it opens a custom minecraft
You click join and basically everything is different and custom
Huh
But you still keep all minecraft items
The inventory is different
Many other things are different
Is it basically the same then normal minecraft in terms of developing it or no
What is HelpChat ? I just typed discord for minecraft dev
Bukkit plugins are specifically server-side, while mods may be both server-side and client-side
@prisma wave I think i figured my problem, when publishing it doesn't include the stuff on the plugin itself, for example, kotlin, spigot, the dependency i was trying to do, so when the plugin is getting added it'll search for the dependencies since it'll be on the pom
oh yeah
pdm had the same problem
It's not easy to fix 🙂
I had to make a custom shading method that shaded all the plugin's dependencies without including them in the published pom
Tell me about it, nothing so far has been easy xD
ofc not lol
Gradle is so poorly documented that i am surprised there are so many plugins
Gonna see if i can copy your method xD
Also, plugins that can be used in the plugins block are only the ones on the main gradle repository right?
yeah I think so
What's the easiest way to get a ItemStack from a string?
IE:
"STONE" -> Stone ItemStack
Material.parse something iirc
Material.matchMaterial + ItemStack constructor probably
call ItemStack constructor
I'm not too sure what that is
new ItemStack (material)
cheers
@obtuse gale I'm 20
@obtuse gale Just put some time into it first and if you hate it, try something else out instead
Hey
ye
Ok
also it has more use if you own a minecraft server to test things out on
And what is dev in part of your life?
but you first have to actually learn java
Full time job ?
Same
So what is it
Last semester right now
And how much you made around in how long?
I'm still doing my education, but a lot of my free time is dev-related things, either chatting w/ devs in places like this, support for stuff, or actually programming
idk lol
tbh I haven't made any money from dev yet haha
How long you dev?
@umbral mica ye same on that one. It's just a hobby that mostly consists of developing things and supporting people (big part)
Oh really @hot heron
Well I haven't really tried to make money yet haha
It’s just “fun” ?
I think I make like €300-500 a month from minecraft dev things
I've been programming since nov and haven't made any effort to profit from my skills yet
(programming as in actually programming, I'd been fucking around with arduinos and such for many years before)
@naive pelican how do you make that money?
that's one way of programming things
Sell your progams or what?
@obtuse gale custom projects, spigotmc, sponsorships, website ads
What?
How do you make money from website ads
And what sponsor?
Where do you find people in need of devs this is the real question
It's not just for fun for me. I will start trying to get a job in programming very very soon
But I'm just focused on finishing my last semester because the burnout is real
Yea but
How do you make money from website ads
@obtuse gale I got a website, google adsense (and another provider), people watch, I get money
That’s not really big
But I'm just focused on finishing my last semester because the burnout is real
@hot heron I feel you buddy
@naive pelican where do you get the people in need of service from?
Oh you got a channel ? What is it
idk my Discord server or SpigotMC DMs
people just come to me like Yo i need a plugin
but I don't think you should be focused on making money from developing minecraft plugins.
^, i feel like ur too focused on the money. if u dont enjoy programming, u shouldnt do it
@naive pelican I switched majors twice too 😛 I'm 27
Meh
programming really isn't going to be fun if you don't like actually doing it
^
@hot heron what y doin now?
^, i feel like ur too focused on the money. if u dont enjoy programming, u shouldnt do it
The real reward for me has definitely been the hobby and the stuff I've learned rather than any amount of money
ye
Started as Chemical Engineering, went to CIT because the guidance people didn't know what they were talking about
most of the time it's just boring typing characters in a way that makes sorta sense
and then ended up at Software Engineering
most of the time it's just boring typing characters in a way that makes kinda sense
@naive pelican when you reach that point, just learn a new language
Then there's a whole new combination of letters to type 
Don't do that
@naive pelican when you reach that point, just learn a new language
@prisma wave I mean that's not what I think. I enjoy it. Otherwise I wouldn't be studying it
but why would you need vim
@prisma wave I mean that's not what I think. I enjoy it. Otherwise I wouldn't be studying it
@naive pelican even if you enjoy it, it's possible to get bored. I love learning new languages even if I never use them
I'm basically a Clojure expert for example
ye true
im an elara expert 🤓
Wtf gradle
shadow 🤢
im an elara expert 🤓
@surreal quarry in 2021 everyone will be an elara expert
shadow jar removing gradle files wack
pdm would never
theres probably a way to tell shadow jar to stop being stupid
oh look at that I reached level 5
idk if minimize() might cause that if you have it, but thats my best guess lmao
actually idk if that does anything when you reload the gradle project
Nah that is legit just adding the plugin, not even running anything 
Bm, are you talking about this? https://github.com/knightzmc/pdm/blob/master/publish-all.sh
@prisma wave in bot commands?
welp
@GCNTDo =github for free level 10
Isn't asking for people to star the repo in return for a reward against discord tos?
*GH
I'm assuming it's this stuff
configurations {
unzip
shade
compileOnly {
extendsFrom unzip
extendsFrom shade
}
}
Yeah that's it
Isn't asking for people to star the repo in return for a reward against discord tos?
Hopefully not
Correct
I lied, I have made money from dev. I'm a TA for a CS class lol
pay to win 
There you go, perfect 
Now to see if that fixed my problem
Kinda appeared but not working yet
ok well that spigot linking thing is broken
Not errors though which is nice
has a bug*
btw yall, is there any good way to get contact details of a spigot user like they do here? API?
Spiget? or is that just for resources?
Oh you want more stuff
No what Barry uses is basically reading the html iirc
what does it do matt
The plugin adds the dependency to the project with the annotation, then once you build the project it'll scan your files for a class annotated with that and if it finds it it'll add the path to the generated plugin.yml
oh nice
Very nice
how does it handle multiple things being annotated?
Well, for now it'll check if it also extends JavaPlugin, if still has more than one is found it'll ignore after the first
sudo rm -rf /* is actually th best option
--no-preserve-root 😍
I mean if you have 2 classes with it, it's user error
I guess i could make it not compile
throw a lot of exceptions all at once
maybe enough to freeze their computer for their mistakes
while (true) {
throw new RuntimeException();
}
recursive exception throwing
actually that probably wouldn't work now that i think about it
Also BM idk how PDM does it but it only lets me add the dependency if i do it afterEvaluate ;o
Huh
I didn't even know that existed
Pdm just does it in the method of Plugin, can't remember what it's called
while (true) {
throw new RuntimeException();
}
@umbral mica that would break from the loop lol
oh shush it's called pseudocode
lmao
@prisma wave Sorry for pinging so much, but i might require your big brain again
It doesn't seem to have any issue with shade for kotlin, but spigot is giving me NoClassDefFoundError, did you encounter that at any poing?
is there a way one could limit the interval between which players can activate a button/lever?
make a list of uuids on cooldown
or a map of that and when they went on cooldown
then cancel the event if they are on cooldown
Aaaaand fuck... my idea won't work, trying to instantiate a class requires all it's dependencies 😩
Gonna have to find a different solution
ah thanks james!
matt get some sleep today 😩
No 😩
Omg after way too long and suffering..
auto-gen plugin.yml I think
I see, I mean mc dev does that for you so 
no like as in there's a config section in your gradle where you punch in the things and it formats it appropiately
plus it autodetects the main class with the annotation that matt's been working on for 2 days now
Mc dev?
Okay yea nah not the same then, neat then Matt
Any reason why you don't just scan classes and just check if it extends JavaPlugin?
Took me way too long to get the detection working xD
Can't do that unfortunately
Plus not every main class actually extends JavaPlugin directly
Well I mean every plugin main class will extend it, and everything will get initialized within it
There could be an intermediate abstraction frost
Like that other lib someone sent earlier this week
For example my plugins extend TriumphPlugin, which extends JavaPlugin, if I were to check I'd get the wrong parent
Ah I see
Also since when is ASM part of the jdk?
wdym?
The lib
No clue what ASM is
I dont think it is part of the jdk
Wait really?
Yeah
TF
What in the
It's what saved me, i was getting a bunch of NoClassDefFoundError but since it's in the jdk I don't need to worry about it
Wait so what's the difference between this and mcdev
mcdev just generates the boilerplate stuff for you one time
And what does this do
Is it like if you refactor your main class or something it'll update in plugin.yml?
Basically there is no plugin.yml, you don't need the file
Gradle will generate it for you
I'll show an example tomorrow once it's a little closer to being done
oh right
what if you wanna add like authors and stuff to it
and stuff like a load tag
@ocean quartz did you fix the NoDef error?
I wanna make something cool but idk what to do :/
I know what. something cool
Thanks for the suggestion
and call it 2kript
Skript
2kript > java > skript
how do you make a skript thats actually good lol
ElaraScript > Everything else
k tnx bye
^
^
how do you make a skript thats actually good lol
Contribute your soul to elara
^
^
someone ban this man before I destroy his entire life
p
elara not good
whats so bad about skript?
I dk. I know that the worst part are the users of skript
bcz they dk how to actually code and just make very bad skripts in terms of performance
and then sell them
Pretty much
as if they were premium plugins
As a concept it's not bad
^
it could have been executed a bit better tho. I mean currently to do anything you need 5 windows of each extensions documentation open
Because every sentence structure matters
like its just better to learn java instead of actually learning skript
mhm
On a completely unrelated note does spring work with spigot lol
There's a reason programming isn't done in natural language
One of my friends asked me to use skript to make this logger and I fucking bet you I wasted most of my time just looking for the right way to write a statement
And each extensions seems to bring in there own take on english
mhm
idk what to make lol
One of my friends asked me to use skript
And you consider that braindead to be a friend?
M8 calm your tits
😂
I hope you considered your relationship with that human being 🙄
Tsk
idk what to make lol
EssentialsZ
EssentialsZ is a plugin that will go in a different way than EssentialsX
Welcome to Pokemon: Essentials
sounds not good
EssentialsXY
ElaraX
When
Joke's on you, elara will never be superseded :^)
sounds like just a shitty version of the current essentials
™️?
Yes
:0
Bump version
This is very frustrating lol
it shouldnt be possible whats happening
basically if two maps are next to each other then it decides to combine them
idk if im being weird or spigoots being weird
😮
XYZ was a series I'll forever cherish 😭
🤣
Elara:
'I suck'
☹️
Such harsh language Lemmo
is 1.16.4 out or just announced?
@frail glade What are the changes?
Should I even have module dependency
requireon js expansion?
I don't even know what you're asking xD
It's only announced, unsure of changes. Might be on JIRA.
well no I meant idk what you are asking because I don't understand the terminology so I can't answer xD
It's called "node_module" iirc
no no you don't understand me. I have no knowledge about what you are trying to do / doing. So I can't answer at all. I just said it to let you know I'm not just ignoring you.
Alright
@ocean quartz did you fix the NoDef error?
@prisma wave Not exactly, well i don't know why it was happening, but so far it stopped just because i am not really shading anything anymore
But i might wanna try fixing it just in case i need it again which i might
This was what saved me from having to solve that
Apparently asm is part of the jdk
if anyone got an idea and can help me. So basically I have a ptero panel set on my dedi and I forgot to renew my encryption certificate. My panel was completely broken but Piggy helped me renew it but now I can access the panel but can't access the console. Well I can access it but its not working at all and I get this error: https://i.imgur.com/xStgyJV.png. I googled a bit about this and I couldn't rly figure it out. If anyone got an idea what I could do to fix it please do tell. Thanks
@quiet depot Mark the commit for oktoberfest ;C
bruh this shit spamming me constantly https://i.lemmotresto.com/2020-10-07--12-35-39pm.png
Same for me on IJ
isn't there a bukkit method where i can like get an instance of my class through bukkits plugin manager
i basically need to be able to get config values inside an enum and to do so I need an instance of my main, but i can't pass that into an enum lol
iguess i could use static
You can do it via bukkit, but that's not great
JavaPlugin#getPlugin?
yea thats what i was looking for
Most people use a singleton patern, like this
class MyPlugin extends JavaPlugin {
private static MyPlugin instance;
public void onEnable() {
this.instance = this;
...
}
...
public static MyPlugin getInstance() {
return instance;
}
}
there is a getPlugin, but you need to provide the plugin name as a string, then nullcheck it, cast it etc. It's not great
well JavaPlugin#getPlugin returns the Class you provide it
i think thats what i've used in the past, but maybe a static instance is better
oh am I having a brainfart?
If you need something and can't use a constructor, use JavaPlugin#getPlugin over static
It took 20min for build tools to finish sheesh
oh yeah I forgot about the getPlugin(Class clazz) one, yeah that's probably better
It took 20min for build tools to finish sheesh
isn't that the normal time?
When I need it and DI isn't an option I normally do
JavaPlugin.getPorvidedPlugin(Class::class.java)
getPorvidedPlugin()
"Porvided"
Shhhh
oh THAT'S how I never noticed that call, it's static on JavaPlugin.
getPlguin returns my class, and getProvidingPlugin returns JavaPlugin
and I need my class to access a reference to a file manager
casting!
Though i'll tell you, doesn't seem like a good idea for you to get the config inside the enum, unless it's on a method, in which case just pass it as a parameter?
its a Lang enum like this, and I have a get() method that I can pass things to but I really dont wanna have to pass my plugin every time even though it would be a better option
it goes to the path, and if thats null it uses the default
iguess i could use static
I’d recommend using a static singleton over JavaPlugin.getPlugin even if it’s an ioc
iirc getPlugin has some reflection so using a plugins static singleton would be faster I guess although it’s negligible
So I made a first plugin in kotlin where I am building everything from the ground up and I've decided to actually make it useful beyond just a kotlin learning experience. It's a debugging plugin that has will have a listener for every event, printing the relevant event info to the console. The event listeners will be toggleable (on and off so you can display only the relevant info). Do you guys think this is something I should maybe publish?
@prisma wave Question, which would make more sense to be used in this situation?
with(yamlConfiguration) {
set("key", value)
}
or
yamlConfiguration.apply {
set("key", value)
}
2nd
seems interesting and could give insights in plugins for end users @empty flint
Dunno if I should pursue this project further or not
seems interesting and could give insights in plugins for end users @empty flint
@frigid badge Well it's not intended for end users really
@empty flint make a gui to turn them on or off :)
the end user being a developer and a server owner is what I mean
Maybe also include the plugins that are listening to that specific event and their priority
Gotcha ty lemmo
@obtuse gale move here for the convo
It's intended so you don't have to implement debugging stuff into your code when you work with events. I plan to expand it further and not just have it handle events, but events are an obvious first attempt at this.
@empty flint make a gui to turn them on or off :)
@surreal quarry
Maybe also include the plugins that are listening to that specific event and their priority
@old wyvern
Great ideas! I will definitely add Yugi's suggestion. James' I do want to add as well but guis are not my priority right now.
yea fair enough lol
it would be a massive gui too might not even be that helpfulk
Yeah, I figure commands are faster than a gui anyhow
is it hardcoded which events?
or are you using reflection/event executor/whatever to retrieve all events
is it hardcoded which events?
@frigid badge Well I am implementing each event by hand just to see how it works but I did want to see if there is a pattern that would allow me to use reflexion. The problem is that the field names and the values they carry are not very human-readable so for those 2 events I had to use some post-processing
Dont think you need reflection for this
No but it would be nice because it would be robust to changes and additions by spigot/minecraft
But this is the kind of proessing I mean
well you can easily make mappings for that
Heres an example of listening to all events without explicitly making a listening function for all
https://discordapp.com/channels/164280494874165248/165129131770511360/709966188788056094
well you can easily make mappings for that
@frigid badge But not general ones as far as I can tell.
as in uppercase first letter, spaces at a new uppercase within a field and some specific ones for uniqueId -> UUID for example
Sure but I'd have to map stuff for Address, LoginResult, Booleans...
I did it boys it's working
And not all Booleans are the same etc etc
why would you have to map for booleans
or for address?
address would be fine with just uppercase first letter
I've made a similar system for translating from code fields to human readable names
but it was for work and in a different language
I did it boys it's working
@ocean quartz Buy winrar, can't you see they're begging already? sheesh
Also congrats!
@ocean quartz I can highly recommend the grabver versioning plugin for gradle
So you don't have to manually type the new version every iteration
and just let a task increment it
congrats matt! looks great
and nice work @ocean quartz
no and it doesn't have to be tied to any build task
why would you have to map for booleans
@frigid badge Because not all Booleans are named in a human-readable way that makes it understandable for somebody who doesn't know what that event does
then I'd be useful for like a pipeline on a protected branch such as master, staging, develop
a boolean is true or false
how hard can a mapping be?
There are "on/off" booleans, "true/false" booleans, "is/is not" booleans.
It's not about making a mapping
it's about displaying information
the mapping is easy
grabver versioning plugin for gradle
@empty flint What is it?
@frigid badge Doesn't really increase the version on every build, it just generates the plugin.yml from the gradle, so if you don't give it a version it'll grab it from the project
I was talking about grabver not about your gradle plugin matt
Oh
@ocean quartz
Oh, don't really like that tbh
does it edit the build file
and when building it is placed into my plugin.yml jar
so I only ever touch the version when a new major or minor version comes out which is not that frequent. When patching or hotfixing, I just hit a button and bingo bango bongo it makes versioning go brrrr
Don't have to worry about it at all
does it edit the build file
@frigid badge No it keeps track of the version in its own file:
You an edit that but you basically never have to touch it if you don't want to
Then my plugin.yml looks like this:
ah okay
seems interesting for pipelines
Exactly
also this is an example of the mapping I have https://i.lemmotresto.com/2020-10-07--02-18-26pm.png
those are all database fields
there are a lot more and I've redacted the actual data for privacy reasons
Also I have a basic "empty" plugin project with my core lib and everything ready to go when I want to start a new plugin project, I just copy paste, replace the name of the plugin in 2 places and I'm ready to go
also this is an example of the mapping I have https://i.lemmotresto.com/2020-10-07--02-18-26pm.png
those are all database fields
@frigid badge I know how to parse a String into CamelCase and insert spaces in the right spaces (lol) but that's not the goal here
Again, I want the information to be instantly logical and understandable, not just there
And the fields have horrible names
Iknow but it's a suggestion since that would make it easily usable over multiple versions
I mean how do they have horrible names
Well I don't particularly like them. AsyncPlayerPreLoginEvent has "getName" for the player name for example. It's ambiguous because lots of things have names in MC. Idk it's just not my taste.
Also differentiating between fields that are for manipulating hte event and fields that display information is difficult to automate
without doing it custom for each event
I mean I do want to automate it all eventually and then I'll have to do a parser for event field names and types but for now, I retch at the thought
so yeah manual it is
@old wyvern So what information would you like to have from the HandlerList of an Event?
Plugin Name, priority and isignorecancel comes to mind
anything else?
maybe how often it fires?
like event statistics
actually that's not tied to event handlers ^^
but still interesting information
Maybe also include the plugins that are listening to that specific event and their priority
@old wyvern Any other info you'd be interested in from the EventHandler list?
Cant think of anything specific atm
@everyone
The 'everyone' mention is disabled so you can't annoy people.
xD
no idea. I use just bungee
there's a wiki for that...
that's literally what I didn. Hadn't used bungee for years then just followed that wiki
ok
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
The 'everyone' mention is disabled so you can't annoy people.
What the hell does "Plugin.setNaggable()" actually do? Is that the flag whether the plugin's logger can be used? I am not sure I get the Javadocs...
idk ive seen an error message that says like "something broke go nag author ... about ..."
it may enable that message when something doesn't work correctly
i ususally only see it on startup tho
Is it possible to get all subclasses of a class in Kotlin if the class in question isn't sealed?
I know you can get super classes but I can't find subclasses...
org.reflections or Classgraph can but not with "vanilla" reflection
hm seems too hacky
I'll stick to manual
@prisma wave could you help me out with this reflection stuff a bit?
I have the supertypes of my event, which is List<KType>. I want to filter that list to only contain KTypes that represent Event classes. What's the connection between KType and java Class?
KType is the kotlin equivalent of Type
it won't necessarily represent a class, but most of the time it will
KClass is a subclass of KType iirc
hm not sure I follow
let's do an example, hold on
Say you have an instance of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockDamageEvent.html
declaration: package: org.bukkit.event.block, class: BlockDamageEvent
BlockDamageEvent extends BlockEvent and implements Cancellable
The supertypes list will contain the KType of BlockEvent and Cancellable in that order afaik
how could I filter the list to only contain BlockEvent, without knowing that the event instance is a BlockDamageEvent?
I am guessing the KType of BlockEvent does not extend the KType of Event, right?
in this case the KType is almost always going to be a KClass
so you can basically just cast to that
gimme a sec to see what I can do with KClass
oh I can check if the KClass of Event is in the allSuperclasses of KClass of BlockEvent
One problem though: KClass is not a subclass of KType :/
I think I need to add kotlin.reflect.full to use allSuperclasses
probably
KClass is a KClassifier
which is accessible from KType
lmao
Smart cast to 'KClass<*>' is impossible, because 'it.classifier' is a property that has open or custom getter
frick me
So what happens when you cast a subtype to a supertype and then get the class?
Does it return the superclass or the subclass?
the concrete class
ye
Another last hacky question then
in java case... you can let it propagate down
can you let a when(...) continue with evaluating and doing stuff?
or do I have to make an if-tower?
basically I need to do
if(a) -> do a
if(b) -> do b
...
would be nice if that was possible in a when. I cant think of a way but maybe you know one 🙂
don't know what you are talking bout, but u can call me, maybe i can help ¯_(ツ)_/¯ ))
blocksMined.merge(uuid, amount) { _, value -> amount + value }
I can't use smth similar to Integer::sum as 3rd param?
no, because the lambda takes 2 parameters
whereas Integer::add would only take 1
actually
yeah i don't think so
How do I remove a whole lib from ShadowJar? - more specifically, com.google
what
I have this class called Settings and there can be multiple types
uh
If on an interface I add "val setting: Settings" I dont be able to access the methods specific to one class
What is the syntax?
class Blah<T: Settings> {
val settings: T
}```
K
otlin
no
yes
T in out under above
What does this guy mean lol https://github.com/CryptoMorin/XSeries/pull/72#pullrequestreview-504273991
Also, can I use any letter for generics?
Yep
well interfaces
generics*
The stream pipeline has like a name for the type
T_OUT or smtng
But by convention just one letter is enough
And it’s short and maintainable I guess
i have no idea what that's supposed to mean
The score should be provided. The annotation classes are not effective within the classpath. It's for Intellij IDEA.
Dope
bruh what does that mean
I mean IJ recognize certain annotations which iirc can be changed in settings if that’s what he is talking about
It has some inspections and code generations in addition to the “whitelisted” annotations
javax.annotations bad
yes but what he said still makes absolutely no sense
True
Amazing support https://github.com/dmulloy2/ProtocolLib/issues/933
Yo epic I’m a contributor to pdm now
Not at all
you literally changed 1 character
I can write a good docs if needed
victim.getInventory().remove(item);
Or even more
dont work
getArmor i believe
Johan you have to obtain the armor content array and change that then set it to the inventory
i am proud to say that i have committed more to pdm than conclure
It was essential
have you guys used java-deobfuscator/deobfuscator ?
Wait what are you actually trying to do
Decompile a jar to see if I can find the cause of a problem we have
And from what I have seen on the fewer docs some transformers require a mappings file
Oh you want to deobsfucate nms?
yeah think so
Anyways, gtg for now, Im tired
remove?
@distant sun what do you mean exactly?
+---< AsyncPlayerPreLoginEvent >---#
|> Player: BlockyBorzan
|> UUID: d144afc1-aa3b-47c7-a19c-cc0474a8e9cc
|> Address: /127.0.0.1
|> Login Result: ALLOWED
|> Kick Message:
+ -< inherited from Event >-
|> Is Asynchronous: true
|> Handlers:
|> - BlockyDebug [Priority: MONITOR] (ignores cancel)
|> - LuckPerms [Priority: MONITOR]
|> - LuckPerms [Priority: LOW]
+---< 2020-10-08 00:55:33.389 >---#
Kinda nice. Semi-manual with the inherited fields
hot
Tomorrow I'll add some event statistics
so you created plugin which sends data on event?
ye but it gets better
nice
what about NBT statistics?
.
what about NBT statistics?
@blazing minnow Not sure what NBT statistics you mean
like this
ID
Name
Last Played
First Played
First Played Date
Last Played Date
Bed Spawn Location
Total XP
XP Level
Selected Item Slot
GameMode
GameMode Name
Food Level
Health
Dimension
Dimension Name
Fly Speed
Is Flying
Invulnerable
Walk Speed
Last Location
i need some help with my Bedwars plugin, because we have each map on its own server the Bedwars plugin doesn't have the placeholder support for multi servers so players wont be able tell if the game is currently going on or ready to join in the lobby
is there anything you can do to sync Placeholderapi across servers?
it ust sends data on command
i need some help with my Bedwars plugin, because we have each map on its own server the Bedwars plugin doesn't have the placeholder support for multi servers so players wont be able tell if the game is currently going on or ready to join in the lobby
is there anything you can do to sync Placeholderapi across servers?
send plugin messages/use sql or other db
not their plugin
i need some help with my Bedwars plugin,
xqplc if you have your own plugin do that, but it sounds like its not yours
oh sorry i mean the bedwars plugin i bought
That support placeholders
but how to make plugin sync with sql - author's decision
like this
@blazing minnow
That would be a) too overwhelming for the console and b) not relevant to the evnet at hand
What NBT stats would you put for this event then for example:
+---< BlockBurnEvent >---#
|> Burning Block: Oak Leaves at [312, 66, -30] (minecraft:oak_leaves[distance=1,persistent=false])
|> Igniting Block: Air at [312, 67, -30] (minecraft:fire[age=8,east=false,north=false,south=false,up=false,west=false])
+ -< inherited from Cancellable >-
|> Is Cancelled: false
+ -< inherited from Event >-
|> Is Asynchronous: false
|> Handlers:
|> - BlockyDebug [Priority: MONITOR] (ignores cancel)
+---< 2020-10-08 01:09:19.583 >---#
No point. That could be another separate piece of info
like player stats or whatever
but not this
np
what is the best way to cancel knockback
Probably velocity
i want the knockback to be null i tried new vector but it still a little knockback
i did that code ```java
final Vector vec = new Vector();
p.setVelocity(vec);
new BukkitRunnable() {
public void run() {
p.setVelocity(vec);
}
}.runTaskLater(yourMainClass, 1l);
```
can someone help me?
So clip started this last year and it was a really great concept. https://github.com/PlaceholderAPI/Custom-Expansion
If anyone wants to pick it up and finish it, we could release the first version of it.
Mhmm
I'm assuming it's for customizing with like config or commands, instead of making an entire expansion for it
@quiet depot No I meant merged my pr so it counts for it
Isnt javax.annotation removed from newer versions of jdk?
@frail glade what is the expansion supposed to do?
Wot
isnt that what that js expansion does
Well that does too
But if you need for an example a placeholder called burgers and needed it to contain the value of 5, you can do /cme create server burgers integer 5, and then if you parse %custom_server_burgers%, it'll return 5.
oh right
can you make it so it doesnt always return 5?
Or is it moreso if you want something to change on all uses of the placeholder it would do that
Yes
yes
there is a command to increase and decrease the value so It probably needs to know which values can be modified
Can someone help me understand the difference here?
https://paste.helpch.at/miruhiyuyo.css
The first line if using both doubles but doesn't work and results in an error (https://paste.helpch.at/ebeguganig.bash)
somethings returning null there probably
what happens when no a class with no nullary constructor gets invoked by Class#newInstance?
InstantiationException
?
It’s not deprecated ?
It’s CallerSensitive
Or maybe it’s deprecated in newer versions
Doesn’t seem to be in 8
pretty sure it is
10/10 on the screenshot
-1 mpx
Well yeah java 8 is noob
help, show me the wrong please
give %player_name% shield 1 0 {BlockEntityTag:{Base:5,Patterns:[{Color:0,Pattern:"bri"},{Color:0,Pattern:"bri"},{Color:0,Pattern:"bri"},{Color:0,Pattern:"gru"},{Color:0,Pattern:"gra"}]}},{display:{Name:"&d&l█ &5&lОбсидиановый щит",Lore:["&7Владелец: &e%player_name%","&7","&9Неразрушаемый","&cПроклятие утраты"]},ench:[{id:71,lvl:1}],Unbreakable:1,HideFlags:7}
What
this command is not working, i wanna know the reason, why?
and fix it
Wrong channel lol
Also e more specific, what's not working
[12:56:26 ERROR]: [org.bukkit.craftbukkit.v1_12_R1.util.CraftMagicNumbers] null net.minecraft.server.v1_12_R1.MojangsonParseException: Trailing data found at: ...:"gru"},{Color:0,Pattern:"gra"}]}},<--[HERE] at net.minecraft.server.v1_12_R1.MojangsonParser.b(SourceFile:61) ~[server.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MojangsonParser.a(SourceFile:40) ~[server.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MojangsonParser.parse(SourceFile:29) ~[server.jar:git-Paper-1618] at
Wish if Barry had a json validator
Oh well
Add this: give %player_name% shield 1 0 [{BlockEntityTag:{Base:5,Patterns:[{Color:0,Pattern:"bri"},{Color:0,Pattern:"bri"},{Color:0,Pattern:"bri"},{Color:0,Pattern:"gru"},{Color:0,Pattern:"gra"}]}},{display:{Name:"&d&l█ &5&lОбсидиановый щит",Lore:["&7Владелец: &e%player_name%","&7","&9Неразрушаемый","&cПроклятие утраты"]},ench:[{id:71,lvl:1}],Unbreakable:1,HideFlags:7}]
Basically I just added surrounding square brackets
@obtuse gale
Thank you mate!!! ❤️
No problem
Welcome back
🥰 Thanks
Holy shit multiline string indentation in Kotlin is cancer
Incorrect 🙂
That's nice is it not?
@prisma wave how does this:
result in
this piece of shit output
pure indentation fuckery
like what?!
absolute horseshit
and it's so infuriating as well because you have 0 chance of figuring it out since in the code, the lines are all indented the same
@prisma wave do you know how the Kotlin compiler knows when to smart cast things?
I made this extension function that's essentially apply but with a condition:
public inline fun <R> R.transformIf(condition: kotlin.Boolean, block: R.() -> R): R { contract { /* compiled contract */ }; /* compiled code */ }
so if the condition is met, the block gets executed yada yada
But if I use it like so:
the compiler does not recognize that in order to execute the part where event.isCancelled is called, the event has to be a Cancellable
what's the contract?
gimme 5 minutes to look it up in my repo. I don't have that project locally on this laptop right now
@OptIn(ExperimentalContracts::class)
inline fun <R> R.transformIf(condition: Boolean, block: R.() -> R): R {
contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
return if(condition) block() else this
}
this does not imply that I guess
What contract would do that?
So do I have to wrap the block in the contract or something?
Not sure how contracts work here
Because I have the if condition already
Shouldn't the compiler know that the boolean is true?
it would be something like implies condition == true I think
not necessarily
well probably
but I think there could be a case where it isn't
and that is?
When the compiler has higher iq than the developer (:

Anybody want to help with a kt plugin? Basically I have a robots system (armor stands) and the problem is they get removed for no reason and the animation (their hand move to create a mining animation) freeze randomly
If you teach me kotlin fundamentals
kotlin ez
I have like 1 month experience and it’s by reading when you guys flame each other
mutableMapOf
Bm help 😭 this thing drives me crazy
T in and T out
thot
iana
what is problem
I stated it above
I know, I just mentioned is made in kotlin
I have like 1 month experience and it’s by reading when you guys flame each other
@steel heart That is probably the funniest thing I've read in this chat so far 😂
@prisma wave Nope, doesn't seem possible to use imply here
returns() implies (condition == true)
```?
"smart compiler" you know nothing. Rust is the smart compiler
Silence
said no person ever
returns() implies (condition == true)
```?
@prisma wave returns() is true even if condition is not true
?
dude stop spamming
Niall getting muted again smh
stoopid
You won't be unmuted
if I have an enum named PetType and a Map<PetType, class that extends pet> how can I make the map know which Pet class should return for each PetType?
PetType.MONEY -> MoneyPet
PetType.GEM -> GemPet
etc.
Who is spamming? Why don't I see it?
there's this thing called anti-spam
@distant sun https://stackoverflow.com/questions/10194855/java-map-key-class-value-instance-of-that-class
public class Favorites {
private Map<Class<?>, Object> favorites =
new HashMap<Class<?>, Object>();
public <T> void putFavorite(Class<T> type, T instance) {
if (type == null)
throw new NullPointerException("Type is null");
favorites.put(type, instance);
}
public <T> T getFavorite(Class<T> type) {
return type.cast(favorites.get(type));
}
}
Your enum PetType could contain a field with type Class<T extends Pet> or something and use that as the type here
If its only enums as keys use an enummap
what's wrong here? 🤣 https://i.imgur.com/HUvDcTM.png
Do you need the P: Pet<...>?
Can't you just use Pet<...>?
(not sure, genuinely curious)
And what types does MiningPet extend/implement?
Pet<S: PetSettings>
try P : Pet<*>
same
that won't work
then what @prisma wave
is it possible to open two IntelliJ projects at once?
In Webstorm / PyCharm it asks me whether I want to open a new window when I attempt to open ap project. Or I can just launch Webstorm twice if I want to.
IntelliJ however does not do this. Is this not possible for some reason or is my IDE just acting up?
i did it a while ago but it was really weird and sorta messed up my different projects gradle
you probably ticked something, you can have as many projects opened as you want
i dont even remember how
You can open 2 projects at the same time just fine
they want it in the same window
yugi, help me with generics xd
Whats do you need help with gab?
I guess imma give restarting my PC a shot, it just doesn't do anything when I try launching another InteliJ instance and when I open a project it just opens in the same window 😄
i mightve understood the question wrong then
are you trying to have 2 projects, one in each window separate?
noni ^
I guess imma give restarting my PC a shot, it just doesn't do anything if I launch another InteliJ instance and when I open a project it just opens in the same window 😄
@quaint isle
Just open a project from the File menubar, It will ask you if you want to open it in the same window or in another window, Choose another window
@surreal quarry yes exactly
I need that map to accept any subclass of Pet
you mightve ticked dont ask me again on accident once
if it doesnt ask you how you want to open the project
open settings and search for "open project" or smth like that
Gab You need to create an instance of the specified type
@old wyvern yup it doesnt give me that prompt. @surreal quarry I haven't, it's a fresh IntelliJ install. But lets see if it works after restart
kk
on a different note, does anyone here use a windows / linux dual boot and if so how hard is it to setup
wdym yugi
@distant sun
P there means a Specific subclass of Pet
You cant add any random implementation to a map of that
well how do i make it accept any subclass of Pet?
MiningPet extends Pet<MiningPetSettings> (it should be Money but ...
Y'all were right. I forgot my IDE settings are backed up with Jetbrains and apparently I set it to "always open in same window" sometime in the past. Thanks for trying to help me! 😄
@distant sun
I suggest having the value of the map as in Pet<out PetSettings> instead
So a Consumer of Pet type which is a Producer of PetSettings type
as in
val pets = mutableMapOf<PetType, Pet<out PetSettings>>()
Or if you want to make sure the type P is used id suggest having a Factory class of sorts for Pets
on a different note, does anyone here use a windows / linux dual boot and if so how hard is it to setup
@surreal quarry Are you talking WSL or just installing Linux & Windows alongside eachother?
If it's the latter, it's really quite simple. If you got windows on your device already popular distros like Ubuntu will even give you an option to install it alongside windows10.
What I actually want to do is a way to get the specific pet type by it's PetType value
im gonna try the latter noni.
Right now I have a C and a D drive, and I think I would wanna have ubuntu installed on the D drive where I have the most available space. Looks like that would be possible right?
so its Pet that represents a specific PetType?
@surreal quarry yeah that shouldnt be a problem. I've only done it once, but it was super straight forward. Just burn some iso to an USB stick and I'm sure it's easier than you think
Yes @old wyvern
Ok you wont need the generic type P,
Also you should probably just have a normal map instead of a mutable one and just map up there
val pets = mapOf<PetType, Pet<out PetSettings>> (
PetType.Money to MiningPet(MiningPetSettings(1,1))
)
@distant sun
it has to be a mutable map cuz they are loaded from config
(I am Brazilian, I use the Google translator) Hello, I would like to ask a question, when I type a personalized command in it is still in the red conversation bar, I would like to know how I do it to make it blue, just like be in the picture: https://prnt.sc/uvqwna
Make sure that the command is in the plugin.yml
@trim kraken Provavelmente vc nao esta registrando o comando direito
Provavelmente to you too matt
Thanks 
Não tem como eu registrador, pois o plugin não é meu.
There is no way I can register, because the plugin is not mine.
@old wyvern any way I can access MiningPet instead of Pet using pets[PetType.MONEY] ?
that's rare
I was typing, y'know, normal stuff, and something popped up on my screen just when I hit the enter key
I have no idea what I just installed
uh check programs and features or whatever tf it's callsed
Hello! I'm getting an error with SQL: No operations allowed after connection closed. while trying to get the balance of a player with PlaceholderAPI. I've tried looking up a fix but haven't found anything. Everything else in the plugin just not the Placeholders.
Placeholder Class: https://sourceb.in/9b86af4934
SQL Class: https://sourceb.in/27dd29ff7a
Bruh
┌───[ BlockDamageEvent ]
├ Breaks Instantly: false
├ Item in Hand: Diamond Axe ×1 (1556/1561)
├ Player: BlockyBorzan (OP) ❤ ×1,33 lv13
├───< inherited from BlockEvent >
├ Block: Oak Log at [314, 71, -22] (minecraft:oak_log[axis=y])
├───< inherited from Cancellable >
├ Is Cancelled: false
├───< inherited from Event >
├ Is Asynchronous: false
├ Handlers:
├ ─ BlockyDebug [Priority: MONITOR] (ignores cancel)
└───[ 2020-10-09 01:48:23.982 ]
Can you think of any other useful info from the event?
Anyone know how to fix this error in Intellij?
Could not find artifact me.clip:placeholderapi:pom: in spigot-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)
I copy and pasted the maven info from the github.
Fixed ✅
Can I make spring entities java 15 records?
If I have an object Pet and multiple subclasses such as MoneyPet, can I somehow like an enum value PetType with a certain subclass on a map or something?
I need the enum because I have to access them by a value
