#dev-general
1 messages ยท Page 177 of 1
you must have a glitched slime then
no it happens everytime i spawn it with packets
because the mini ones don't have big hitboxes like that
thats why im confused if i spawn it using spawnegg its normal if i spawn it using packets its like that
ยฏ_(ใ)_/ยฏ
@dusky drum there is probably a "state" or "data" field in the entity packet that you haven't sent
where can i post a question about bungee? ๐
thanks ๐
you're welcome
(.*?)(<([^ ]*)(.*?)>(.*?)<\/\\3>)(.*) anyone got any idea what this regex is likely to be for?
@heady birch you'll be the most likely to know since it's your regex
but I'm terrible with regular expressions lol
Any graphql developers in here
#738969308746612766 @jovial warren ๐
@jovial warren https://www.mine.tax/
just trying to get minetax up
A question about web development, how do I have a "template" in html and then replace data with placeholders in that template before displaying it. I assume there is use of javascript or possibly other scripting languages to do this?
sounds like something you'd need to do with JS
would it be possible with Python too since you can do web stuff with it?
you can't use Python for your frontend silly
oh yeee
also Python is trash as a backend as well
just... don't use Python for this sort of stuff lol
Ok
Python good for small projects that ya kinda just throw together, but things where performance matters is where Python lacks
need to do a project for school which involves html / js / php. would it be worth me picking up webstorm for it or just use IJ?
yeah webstorm is really, really good
I'd suggest to use WebStorm because I find using separate IDEs for separate platforms helps you distinguish between projects easier
no matter how many times @prisma wave says "just use IntelliJ", just ignore him, it's just one of the things he says that is proper wack lol
Especially with a name like that
everything is wack about bm
I'm not sure he is mentally stable
^ yeah that's wack lol
๐
Can't trust anyone these days
full moon hates u too
new moon is chill
They can stay

They will have to share with clojure moon though
๐คฎ
Oh wow
Another hater joins the club
They hated GroovJureScaLinJava Mitten because he told them the truth ๐
what truth
Idk
Something really cool
I was gonna pull the clojure joke but that's getting stale
Anyway
good ๐
Ah true lol 
ya
very useful
JS is easy anyway
probably the easiest language to learn imo
Apart from python perhaps
They hated GroovJureScaLinJava Mitten because he told them the truth pensive```
Wait what did I do? ๐
I walk a lonely road
๐ ๐
You'll never walk alone
#AlonePart2 #AlanWalker #AvaMax #YouAreNotAlone
Walkers!
The music video for my brand new single โAlone, Pt. IIโ with @Ava Max is finally here. This is the second chapter, continuing the story from the "On My Way" music video revealing many unanswered questions. I hope you l...
to anyone who gets that reference (and no, I'm not a fan if you understand the reference)
@prisma wave its official, i hate your library
How did you find that lol
thats cool
Oof
๐
Forgot that even existed lol
gogle
okay so i parsed some stuff but i want o edit that text under extra (its string but as json)
http://images.virtusdevelops.eu/shareX/hnlugkgg.png
if anyone has any good way of doing this
nvm
text<text key=value>text</text>text
Make sure you release that plugin Gasper 
i mean
i edit packets of HD
and set custom text
gotta figure out how to get the name of that
problem is i can only get json
and i cant colorize json
what are you using protocol lib?
Gasper, nah handle everything yourself 
does the HD dev add hex colours yet
eh im gonna write my own hologram plugin at some point
Ah okay @heady birch , also you gonna be on today? lol
Because I've got way, way more questions xD
Okay so I was thinking of having something like a MessageResponse after an event has fired (ie. join), which would contain all the executed format information (which format was used, etc). Now i'm wondering if it would make sense to have something like a ResponseListener which a user can implement and would grant them a onResponse sort of an "event" so they could access that. Would that make sense, or does anyone have any better suggestions?
cough @quiet depot ๐ cough
maybe
Okay good
Which files in the project do I have to add to the repository and which ones get auto-generated when importing a project?
like do I need the .gradle, gradle, .idea, and build folders?
what about gradlew etc...
@quiet depot :((
@empty flint you want to push gradle/, gradlew, and gradlew.bat
.gradle, and build/ shouldn't be pushed. .idea usually doesn't need to be pushed, this isn't always the case tho
@hot hull sounds fine
MessageResponse isn't a good name tho
as I assume messages aren't the only thing frozenjoin can do on join
do you have some sort of object that holds an individual join action?
I'm thinking Multimap<ActionType, Action>
which is held in your response event
That might be smart to do yea, so the user already receives processed data
yeye
Now I'm debating whether I should rewritte my action lib in java ;((
Why
are you sure
no
ok
Problem solved then
although iirc it could be an issue with your gradle configuration
Well I can access it all fine and dandy within a java class, just not kotlin so I don't know 
Send buildscripts
give me a lib to make
@heady birch make a lib that takes full control of code execution in the jvm
everything on a single thread
every line executed one by one
with a configurable interval in between
wha
make all of the bukkit API thread safe
By making wrappers that just add synchronized to everything
Ez
Yo
yes
and uses thread safe data structures instead of non thread safe structures
for paper, we have torch
same thing
just paper instead of spiglet
update no you cany
lmao
it's 200 iq
Huge brain
ginormous
Ayy Piggy
BUILD SUCCESSFUL in 28s
yay
@heady birch what's the createAnimation method for PulseAnimation?
because I got some really wacky decompiled code lol
one massive switch case
yeah I thought that's what it was, isn't it more than one though?
no only 1
ah okay
Piggy, would it make sense to make my own Listener thingy so I can manage both spigot and bungee listeners (as well as any custom ones) myself, (Instead of having like 3 different things for them)?
lemme show you what kinda wack I got from the decompiler first @heady birch lol
but yes you should use a platform independent one
anyway
guava has you covered
https://bin.bardy.me/Klddpl6y.cs this is what I got lol
what kind of shitty decompiler are you using lol
that came from luyten
oh my
try cfr
CFR is a JVM bytecode decompiler - it will decompile modern Java features (including Java 13) but is written entirely in Java 6, so will work anywhere! - It'll even make a decent go of turning class files from other JVM languages (eg Kotlin, Scala, Groovy) back into Java!
look like tis
repeated code lol
also why do I have an n variable I wonder
I have it in a few places
Piggy waiting for chrome to open so I can read up on the EventBus, in the meantime, I was thinking this would be the structure ish
bungee:
events:
- Handshake Event
- Disconnect Event
- etc.
spigot:
events:
- Join Event
- Quit Event
- etc.
Then I'd have either some sort of listener implementation, because the goal would be that the bungee version only provides the events (fires them), and things still get handled trough the spigot version
Chrome ew
your common subproject should have abstract join & quit events
which are called from bungee & spigot
the handling is in the common project
not spigot or bungee
yes
like how would you call them using event handlers?
guava has as event api you can use, called eventbus
ah okay
you just make the event classes
and call them from spigot/bungee with the relevant data
then listen to the events in the common
also bardy idk if u saw my message before
but look into cfr, because it's arguably a better decompiler than procyon
also @heady birch , in AnimationContext, what is the String method called?
@quiet depot okay yeah will do
gettext
so I did get it bang on then yay
that ain't an addon to something Niall
Interesting Piggy
it's not that interesting
also can I show what I've got in the API package @heady birch ?
it's the most straight forward solution
yes
honestly, and please take no offence, I've got no idea how you came up with yours
well, not package, module lol
I have a very smooth brain Piggy 
the animation API is still a W.I.P but it's coming together
howly fk
gasper?
Decent yeah
oh and also, the placeholder API is coming together somewhat as well
slowly going together with this to
http://images.virtusdevelops.eu/shareX/0qho6xq3.gif
if you got improvements suggest
I swear I'm gonna end up with a better project than the original lol
yo niall what happened to the ecloud
what's not great?
wym
animation api and placeholder
can probably be improved
and i dont like changing stuff, after releasing it to the API
as I said, animation API is still a W.I.P, I just put that in there because I wanted a skeleton to build on to
if you see what I mean
yeah fair enough
niall wym lemmo happened
the placeholder API is still W.I.P as well because I literally added that last night
seperated frontend&backend
yeah ik that's what you got in there
i mean its good but i have no idea
also I want to abstract with the events as well
if possible, I'd like for the API to be pretty much entirely standalone
have Bukkit handle them in the common module rather than the API module, relieving the API module from the dependency on Bukkit
I'm really going for an interface-only kinda approach to this API
and tbh one of things annoy me with the animations
i cycle through the frames then regenerate them
because of the damn placeholders
ofcourse it checks if its neccesarry first
that sounds like it can get quite performance intensive and also sounds like it can be improved somehow
as I said, still W.I.P, I'll see what I can do lol
Piggy so if I'm understanding this (not sure if I am),
I'd have something like this
class SomeListener : Listener {
@EventHandler
@Subscribe
fun onSomething(event: SomethingEvent) {
// Some code
}
}
Or am I missunderstanding this completelly?
if that's in your API module then no
unless @EventHandler comes from Guava and Bukkit lol
ยฏ_(ใ)_/ยฏ
Bardy, shush right now, Ignore me 
All you're gonna do is confuse the shit outta me
Okay so yea the Subscribe annotation is a substitutor for an interface, ie. Listener
hold on, say if I had an event that's an interface that's implemented in the common module where the implementation extends Event, and I register the event properly, now say if someone was to use that event from the API, if they made something like this: ```java
@EventHandler
fun handleMyEvent(event: MyEvent) {
}
```where MyEvent is the abstracted event from the API, would that still work since the implementation extends Event?
or do I still not fully understand how interfaces work lol
I mean if you want to look into the event buss designer pattern maybe this helps https://dzone.com/articles/design-patterns-event-bus
Now thats java but whatever
converting to Kotlin from Java is easy though
^
also am I the only one here who calls their event handler methods handleSomethingEvent instead of onSomethingEvent because it makes more sense as I'm handling the event? Just curious lol
I have never thought of which one is the best
Well in my case I'm just calling another event from those
Particularly speaking Bard, onSomeEvent is shorter
yeah but for me, using the word handle makes more sense
I mean both makes quite the same sense?
I mean, I guess?
I mean does it really matter?
It does matter because on is shorter in terms of length compared to handle
also @heady birch , I thought what might also be cool with some of the interfaces in the animation API is to turn them in to @FunctionalInterfaces where they only have a single method, for example: InterpolationStrategy's interpolate (or whatever you called it lol)
because being able to make a lambda from that is kinda handy
yes we love functional interfaces
in Kotlin we just have higher-order functions so we don't really need them all that much
@jovial warren you're not handling the event though
handling would imply you're calling it
you're merely listening to it
very true
therefore, onEvent is the convention
didn't think of that
@hot hull also sorry I was afk
but you'd still be handling it because you don't pass it on (actually that's BS), you handle what happens when it gets called
guava's eventbus doesn't have a listener interface
No worries, I'm reading this, but I'm sort of lost
at least I assume that's the case
How would I listen to the event bus?
Listener (common):
public final class ChatListener {
@Subscribe
public void onChat(@NotNull final ChatEvent event) {
if (event.getMessage().equalsIgnoreCase("beep boop")) {
System.exit(0);
}
}
}```
Registration (common):
```java
public void start() {
blah(); // fill vending machines
blah2(); // dust counters
blah3(); // change the date
blah4(); // flip the door sign
blah5(); // ensure there's toilet paper in the stalls
blah6(); // open the gates
eventBus.register(new ChatListener()); // register chat listener
}```
Spigot/Bungee:
```java
public final class ChatListener implements Listener {
@EventHandler
public void onChat(@NotNull final AsyncPlayerChatEvent event) {
eventBus.post(new ChatEvent(event.getSender(), event.getMessage()));
}
}```
I deducted all of that from the example on the page I linked earlier,
// Class is typically registered by the container.
class EventBusChangeRecorder {
@Subscribe public void recordCustomerChange(ChangeEvent e) {
recordChange(e.getChange());
}
}
// somewhere during initialization
eventBus.register(new EventBusChangeRecorder());
// much later
public void changeCustomer()
ChangeEvent event = getChangeEvent();
eventBus.post(event);
}```
it may be wrong
Yea I saw that, but wasn't sure how exactly you "listen" to them
I'll play around with it, much thanks
first code block is how you listen to them
also @heady birch , in PlaceholderManager, what is the method that returns String and takes a String and a final KiteUser? is it replace?
wat?
I have actually no clue what you're talking about just made a wild guess lol sry
public String a(String a, final KiteUser kiteUser) {
final Iterator<PlaceholderReplacer> iterator = this.c.iterator();
while (iterator.hasNext()) {
a = iterator.next().a(a, kiteUser);
}
return a;
}
```this is the method I got
I've been replacing a lot of these wack iterator thingys with foreach loops
ah
c is a Set<PlaceholderReplacer>
and a() is a method I'm unsure of, though it's most likely replace
PlaceholderReplacer#a(String ,KiteUser)
also, updating a parameter's value as if it was a field is a bad idea right? I mean, there's a reason why Kotlin parameters have strict immutability
yeah @steel heart that's the method there
I mean generally speaking I can't it being particularly bad
Although it can be confusing when later on calling it.
yeah
in Kotlin, all parameters are just final anyway, whether you specify it or not, and that's what I'm used to lol
I'm thinking it's a better idea to wrap a temp variable to store stuff in
yh
I personally don't think it's bad
I think it's only looked down upon because it's uncommon
I can just use a StringBuilder there which makes my life easier
Piggy, all the listeners should be registered in common right?
I don't think there's actually any underlying issues with modifying parameter values
yes
all the eventbus listeners
yeye
or in a separate API module if you're smart lol
wat
No
why tf would you register listeners in an api module
I will 
frosty your events should be in an api subproject
I smell like this is gonna be like 3 iterations before I release it :kek:
yeah it probably is
Worth it tho
yeah
oh I'm remembering how I register commands in my multi-module project now lol
i use my scanner for that shit
I basically use reflection to get all the subtypes of PunishCommand (the command interface implemented by all commands in the project) and create a new instance, get the name, and then set the executor lol
this: ```kotlin
Reflections().getSubTypesOf(PunishCommand::class.java) {
val command = it.newInstance()
getCommand(command.name).setExecutor(command)
}
(don't ask why it uses org.reflections, that wasn't my idea, I'm moving to kotlin reflect lol)
kotlin's reflection api isn't a replacement for org.reflections?
org.reflections is a classpath scanner
it's name is a bit misleading imo
it's even easier to do that with Spring, because in Spring, you can DI all beans that are a sub type of a specific type
yeah idk
does kotlin not have Iterator#remove()?
why would you need that?
well
if you call next(), it moves to the next element
ye but what if i want to remove it?
isn't that what an iterator does anyway?
no
when you move to the next element, it disregards the current element
actually it's not Iterator that has remove(), it's Iterable
and Collection is a sub type of Iterable
and Collection is also a super type of List, Set, basically any immutable collection
for mutable collections, you have MutableCollection, which is a sub type of MutableIterable, which is also a sub type of Iterable, because Kotlin has built-in collection immutability (unlike cough Java cough xD)
iirc Iterator#remove is a thing too
Piggy, should I have my event in my common, or should they be split up in spigot/bungee? Thinking common since that'd make more sense
How difficult is this to understand? I am struggling to find a simple way to explain what this config section does
What is that path sheesh
okay, first of all, that path does not follow convention at all
paths are meant to be snake_case
there's no convention
In config.ymls?
or atleast path-path
Wat
so it should be karma_soft_cap
but spaces in a path name seems like a bad idea
^
Bruh I legit never saw that in my life
your event class(es) should be in a separate subproject, called apifrosty
apifrosty
ohhhh
seems legit lol
Like legit all config.ymls I am looking at on the list of plugins I have do it like that ๐
Bardy, best api ever ๐
I dare you to call your subproject exactly that just for kicks lol
Klyser, spigot plugins right? :kek:
@dusky drum it's MutableIterator in kotlin
@foggy pond then they also have no idea lol
@dusky drum it's
MutableIteratorin kotlin
@prisma wave how did I forget that lol
ยฏ_(ใ)_/ยฏ
when you remember list immutability but don't remember that iterators also have immutability
The reason why I have spaces and no camel case is just for ease of readability, I don't care much if it follows conventions in this case but more that it is easy to read and understandable
Either way, nobody answered my question about whether the comment is hard to understand
Yeah but I have no idea how else to explain it
how do i make static methods in kotlin is it companion object?
yes and no
you can make methods that can be called from a singleton with the companion object
favour top level functions over companion object members
if you want them to be static as well, you need to annotate them as @JvmStatic
but static doesn't really matter in Kotlin, it's just for Java interop
What should I do if I cannot think of a better way to write it? I don't want to remove that config section, I'd rather the user be able to customize that
Shut up about the path name ๐ข
it ain't a problem in my eyes
ngl I didn't even know it was possible
I already said why I made this decision, I am aware that it is technically bad practice but I'd rather it be slightly more readable for new plugin users
That spaces are allowed?
yea
fair enough I guess
you do you lol
also, that comment will be fine for now
it explains what the thing does
The examples are somewhat necessary, maybe some day I will come up with something better
also @heady birch you sure about that regex btw? because I've put the text in that you sent and it says no match
@quiet depot Should I prefix other plugin events which I've made in my plugin (ie. a RegionEnteredEvent from WorldGuard) with Frozen? So it's uniform in the api, or not?
no
wtf is this
wtf is what
that regex?
noice
now i just change placeholder handler a bit to make it not run every 2 ticks
on every single hologram even if it doesnt have placeholders
now i have to make simple regex to check if hologram contains placeholders or no
or
wait
i can do that different
@quiet depot So this is what I currently have
https://github.com/Frcsty/FrozenJoinGlobal
is it me or spigot it's slow?
My intellij is still hella laggy on my mac even after a reinstall
also this dropbox things are kinda shit lol, you gotta actually click on the link to see the vid
wait... @quiet depot plays rust?
my brother plays that game
sorry, this should be in #off-topic lol
@obtuse gale why are you writing Integer.valueOf smh
"".toInt()
idk i didnt know w hat to type and i wanted to show the autocomplete lagging
this is always on my laptop tho
try increasing it's max heap RAM
default is 1024 I think, which is nowhere near enough
Mine uses 800 and it works fine 
just changed to 3072 and we'll see what happens
actually nvm mine's set to 2048
time to set that to 8192 because yolo
actually I think it was already 8192
Nope, didnt improve it at all, also cntrl + X normally just cuts a line, on this it works but it like takes 5 seconds to delete it and if you hold it down intellij lags for like 20 seconds, idk what to do lol
Do you think it's overkill if I add all the bungee connection related events to FJ, or nah?
@obtuse gale updated pdm to 0.0.26, should make it a bit faster, give it a try
load times not compile times
i must say i made trash http://images.virtusdevelops.eu/shareX/ojlues0o.png
alright ill check it out when im on my main pc tommorow, im on my laptop rn bm
me or gasper
u
,my hands just shifted to the right lol
switch (KiteUserImpl$2.a[groupType.ordinal()]) {
case 1: {
this.g = group;
this.a();
this.c();
}
case 2: {
this.h = group;
this.b();
this.d();
break;
}
}
```why does luyten do this to me lol
@prisma wave you're good with decompiled thingys right? what does that KiteUserImpl$2 mean?
doesn't $ usually mean a reference to an inner class or something?
Anonymous class
what type?
lambdas in switches ๐ฎ
wish java 8 had it
this is Java 8
which means that isn't a lambda
if you can't have lambdas in switches in Java 8
oh yh
but iirc java 14 have something like this:
switch (input) {
case 1, 2: -> {
}
}``` or smtng
can you have lambdas inside of switch expressions in Java 8?
I don't remember
ah okay
can you tell what type of anon class it's most likely to be or is it completely impossible?
what
I don't know
I don't understand this whatsoever
I've never ever put a lambda in a switch
bruh what are you on about
in the expression I mean
just look at the class definition
you mean the KiteUserImpl$2?
yes
what contract
dude
anywhere
oh you want the contents of KiteUserImpl?
yeah there's nothing with the name KiteUserImpl$2 in that package
what is there?
wait lemme actually decompile it fresh instead of referencing my saved code
the class with the square around it is the KiteUserImpl class, I highlighted it because this is the obfuscated version
could luyten be doing anything here?
potentially
lemme try using that one that pig mentioned earlier
check the obfuscated code to see what it references instead
the obfuscated code references a$2
interesting
ah okay I know
CFR to the rescue
the actual code is: ```java
switch (groupType) {// GroupType is an ENUM
case SCOREBOARD:
// do thingys
}
apparently enums compile to anonymous classes?
oh of course it's an enum because it calls groupType.ordinal()
I should've seen that wow
also I guess you learn something new every day
@prisma wave figured it out
@quiet depot you are an actual god
afaik they don't compile to anonymous classes though
Piggy!
you recommended CFR, which knows how to decompile enum switches properly
o
using luyten I got this: java switch (KiteUserImpl$2.a[groupType.ordinal()]) { case 1: { this.g = group; this.a(); this.c(); } case 2: { this.h = group; this.b(); this.d(); break; } } but with CFR, I got this: ```java
switch (groupType) {
case SCOREBOARD: {
// same as above
}
case TABLIST: {
// same as above
}
}
Also, km is right, enums dont always compile to anonymous classes
Only when it overrides any functions
which this doesn't... ๐ค
In which case it should simply be a static final field which is assigned to an instance of the class with the normal constructor
yeah
public enum GroupType {
SCOREBOARD("Scoreboard"),
TABLIST("Tablist");
private final String name;
private GroupType(String string2) {
this.name = string2;
}
public final String getName() {
return this.name;
}
}
```this is the pure decompiled enum from CFR
and luyten gives the same result
ugh i need to get brains my plugin uses like 1.6ms per tick or something what titmings say
also I never knew that compilers retained field names
Wdym?
So this is what I get right now when I build the project, 4 jars, 1 for each module, how does one fusion 360 or someshit them all into 1?
@prisma wave true
Implement them on the main one Frosty
just make bukkit depend on common for example, which depends on API, and then build bukkit and you'll get all of them bundled together @hot hull
Trying
also make sure not to forget your bungee.yml and plugin.yml (something I always forget somehow lol)
On the main build.gradle implement all modules and it should build it all into one jar
Pretty sure it is
because FrozenJoin kinda needs a Bukkit and a Bungee version
Why?
also make sure not to forget your
bungee.ymlandplugin.yml(something I always forget somehow lol)
@jovial warren thats what mc dev is for
No Bardy
You can have all in one jar
You can have them in one jar bard
yeah ik, but how would you use Bukkit-specific features in a plugin designed to work with both?
true
I mean, personally I hate the idea of a JAR that does both because it makes it difficult for me personally to differentiate, but my opinion isn't something I can lay down as a fact against it
Differentiate what?
^
differentiate between the versions of the plugin
because embedded in that single JAR is both a Bukkit and a Bungee version of the plugin
I mean get the jar, stick it anywhere and run
Shouldn't this be all I need?
include(
"common",
"spigot",
"bungee",
"api"
)
Hmm idk never did it like that
How did you do it?
That won't shade it
You should have a module that declares implementation dependencies on all of the other modules I think
Or just use the root module
Don't look at the rest of that, it's pretty bad
Material.matchMaterial or Material.getMaterial ?
matchMaterial
I only want to match precise Material names like BEDROCK etc
not the minecraft:bedrock and all the other stuff
pretty sure neither support namespaced keys
if you want an exact match, use valueOf or getMaterial
yeah getMaterial won't throw the exception right?
I think matchMaterial would be better
It does like double amount of checks
or I mean if the string isn't found in getMaterial it tries to modify it in terms of hopefully being able to retrieve it in getMaterial again
anyone here that would help me optimize my test plugin (its realy bad code)
Show
Can I use lazy {...} to initialize a top-level val whose value depends on something I calculate or obtain during execution?
Like I have a file that I'd like to store in a top-level val. But the file location is dependent on a specified folder.
Is there a way to do that?
if anyone wants to help out with this project
https://github.com/NeutralPlasma/ClickableHolosTest
its java/kotlin
might do after I've finished with KiteBoard
kiteboard?
yeah
nice
I'm deobfuscating it (with Niall's permission) and kinda messing around with it to make it better
because it's kinda fun lol
uke
idk, I = weird human being sometimes
eh i somehow cant make my plugin work faster, i guess protocollib doesnt have the fastest packet sending system?
idk, SuperVanish uses it and that's pretty fast
The level of abstraction that protocollib introduces is pretty small
ye but i mean sending packets every 2ticks to everyplayer active idk if im doing it good way
It's gonna be close to the speed of direct nms
If you're really concerned about performance, run a profiler
you realise there are free profilers right?
yes i just relized
Jprofiler also has a free trial I believe
VisualVM is one of them
There is also one included in Java 8+ iirc
Gasper, why are you sending it to every player?
every player thats in range to see hologram?
Lucko's thingy might be able to do a bit better
oh Spark?
Also check if the user is facing the hologram, that should reduce a few more
isnt that another check?
Yes
Although probably not a particularly intensive one if you do it right
It depends what the lag problem actually is
its updaing (placeholder) based lines every 2 ticks
atm there is only 1 holo with 1 line that has placeholder and it takes quite long time
Server side lag?
Reducing the amount of packets sent probably won't make a huge difference unless you significantly reduce it then
Afaik sending packets (apart from the IO) is pretty lightweight
Like I said, run a profiler if you want really detailed information
okay any that you recommend?
if anyone wants to help out with this project
https://github.com/NeutralPlasma/ClickableHolosTest
@dusky drum What#s the project about?
Has DeluxeChat got 1.16.2 support as of rn
#spigot-linking
i guess gradients use the most
http://images.virtusdevelops.eu/shareX/o8u9wqjf.png
@prime mica #spigot-linking
How do I track plugin usage via bstats? Does anybody have an example?
there's a Wiki on how to do that somewhere
#spigot-linking
@hot hull the owner of the server im on has it, i only wanna know if it has 1.16.2 so i can ask him to update, do i rly have to go all around the houses for a yes/no answer?
thats profiler
jprofiler
that top one
is all off tasks of entire server
i used search
@prime mica according to what I can see on the official Spigot page, it does indeed support 1.16
i guess that HD placeholder handler isnt realy the best to use.
plugin.tick updates placheolders on holograms
according to what I can see on the official Spigot page, it does indeed support 1.16
@jovial warren for 1.16.2 u need the pinned message in #deluxechat
see that was the answer i needed jesus
ill bring the owner in to get it ty
I'm annoyed Gasper
It's an easy return and you decided to indent the entire function -.-
0.2 + 0.0 + 0.0 + 0.0 + 0.0 != 100
@jovial warren 100 is the entire process time
yeah I didn't realise he was they were (it's 2020, I don't wanna get scalded lol) in search lol
which one frosty?
if alive
stfu
Ne.
sendpacket uses quite a lot huh
so basicly most of process is used by optional ...
next is hexutil
mostly parse gradients
if anyone has idea how to optimize that WrappedChatComponent#fromChatMessage
for gradients i can limit them thats the easiest fix from them all
I think Matt did a lot of testing and optimising for his LIB for this. https://mf.mattstudios.me/message/mf-msg Could use that instead for parsing and see if that makes a difference
im not sure if i can put packet into packet :'
a bit of optimizatioN
http://images.virtusdevelops.eu/shareX/p3v04skg.png
gotta say i cant belive i managed to use packets.
http://images.virtusdevelops.eu/shareX/j3pxa544.png
very nice
Good job
Gotta say, can't believe mojang is gae
Yeah
Well no
They use json in chat
but who guessed people would send thousands of packets a second on some wack animated scoreboard
Hm @jovial warren KiteUserImpl anonymous classes?
most likely these:
rip ๐
yeah that would be good
What, KiteBoard?
Yeah perhaps
Oooo
Nono Niall, not the topic I was implying
once I'm finished can I upload to a private repo or something to show you what I got?
yeah sure
okay cool
or actually zip it up and send it to me
@frail glade Do you think thats a good idea?
Hmm?
I think it's a personal preference but it might allow more people to contribute to it.
yeah I'll zip it and send it when I'm done
I say open-sourcing is a brilliant idea, but I'm very biased as I'm a massive fan and backer of open-source
I don't think it'll drop your sales or anything.
hey btw, can you tell me what the replace string is in AboutCommand? @heady birch
@frail glade who cares about sales am I right xD

I mean, I do, it helps pay for my college.
I don't care about anything that happens to my work, or any money that I make from it, because I program for fun, it's just a hobby for me
I mean, don't get me wrong, I love to see my work being appreciated and used, but money just isn't something I'm interested in for this sorta stuff
it's why I'm a fan of open-source, because it allows me to collaborate with others, which is fun, and I'm not bothered if making it open-source means I make no money
I'm probably one of the only programmers around here who actually doesn't care about the money lol
anyone who has expenses cares about money
Hello, I will be making a custom difficulty for Minecraft in plugin
What price would be fair for changing 50 game mechanics
niall i mean if you shared you prfect packet handler i wouldnt mind XDD
like what mechanics?
how he can send so many packets with no lag.
i get 200ms
over time
like 2-3ms
for packets
custom serializers
see i want that XD
I haven't seen any custom serialisers in this project lol
wait what classes as a "custom serialiser"?
brain
@prisma wave what counts as a custom serialiser?
idk apparently he uses custom packet serializers
for the scoreboard packet or whatever
which plugin are we talking about here? like which one does this?
KiteBoard doesn't have any custom serialisers from what I can see
it just makes a new packet, updates the fields reflectively, and sends the packet on to the player
but he chooses quite carefully when to actually send packets
also @heady birch do you think it would be cool if I added support for more database engines using ORM?
or is it not really that worth it
i just dont do that load of serialising and deserialising that the tutorials say
they make you get a chat component like:
IChatBaseComponent.ChatSerializer.a("{'text':'Your text'}"); or something
You can literally do
new ChatComponentText("your text")
but yeah i wrote a custom implementation to speed it up
Also Orm, probably not
what's wrong with ORM? lol
big
raw SQL is ew though
also @heady birch , StorageProvider has two methods that take a KiteUser, can you tell me what they are please?
push and pull
yeah
you got the format that they're stored laying around or am I gonna need to figure that out myself
I know they're stored by UUID
Guys
what could be causing this?
at net.minecraft.server.v1_16_R2.EntityPlayer.closeInventory(EntityPlayer.java:1381) ~[patched_1.16.2.jar:git-Tuinity-"f663f6e"]
at org.bukkit.craftbukkit.v1_16_R2.entity.CraftHumanEntity.closeInventory(CraftHumanEntity.java:456) ~[patched_1.16.2.jar:git-Tuinity-"f663f6e"]
at ot.dan.GameManager.Objects.Games.Types.BuildBattle.Events.BuildBattleHandler.onVoteInventoryClose(BuildBattleHandler.java:63) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor27.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.2.jar:git-Tuinity-"f663f6e"]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.2.jar:git-Tuinity-"f663f6e"]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.2.jar:git-Tuinity-"f663f6e"]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.2.jar:git-Tuinity-"f663f6e"]
at org.bukkit.craftbukkit.v1_16_R2.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:1421) ~[patched_1.16.2.jar:git-Tuinity-"f663f6e"]
do you open an inventory after closing it? Also, send the full stacktrance
Well yeah I am opening an inventory when a player closes one
Shouldn't that be possible?
Oh wait this isn't the support channel my bad. But yeah that is the log can't fit it all its too long @distant sun
@obtuse gale that error only occurs when you run out of space on the stack
But that is not caused by my plugin from what I understand ...
show the code
@EventHandler
public void onVoteInventoryClose(InventoryCloseEvent event) {
if (Games.getSelected() instanceof BuildBattle) {
if (Games.getSelected().gameState().equals(GameState.VOTING)) {
Player player = (Player) event.getPlayer();
// player.sendMessage("Test");
Voting voting = new Voting(player);
player.closeInventory();
player.openInventory(voting.getInventory());
}
}
}
}
I am just instantiating a new Voting object but that should be a problem
you got a stack trace for without?
Yeah I got that error while having only the openInventory
also send me line 63 of BuildBattleHandler
also you realise at the state that you're opening a new inventory, the current inventory isn't fully closed yet
Well I never had a problem opening an inventory while the other one is closing on older versions
InventoryCloseEvent is called as soon as the player presses escape to exit out of the inventory, and because this is fully synchronous, it executes your code before finishing execution of the inventory closing
Well there isn't an InventoryClosedEvent so that is not an option
lmfaoooo
Just started a new server and this was the first notable thing that happened on the server
[23:21:11] [Server thread/INFO]: Done (34.119s)! For help, type "help"
[23:21:24] [Server thread/INFO]: Villager EntityVillager['Villager'/82, l='ServerLevel[world]', x=-251.30, y=91.05, z=70.30] died, message: 'Villager suffocated in a wall'
f for the villager
@EventHandler
public void onVoteInventoryClose(InventoryCloseEvent event) {
if (Games.getSelected() instanceof BuildBattle) {
if (Games.getSelected().gameState().equals(GameState.VOTING)) {
Player player = (Player) event.getPlayer();
// player.sendMessage("Test");
Voting voting = new Voting(player);
// player.closeInventory();
player.openInventory(voting.getInventory());
}
}
}
}
This is the code as is for the error
Line 64 is the event handler
AFAIK, you have to delay the opening of the new inv
The documentation for that event warns you not to open an inventory within it
why didn't I think of that lol
Delay it by a tick
Well okay I never had a problem opening it like this on older versions but got it
I might go digging through CraftBukkit an NMS code to find out why that causes a StackOverflowError
I think opening an inventory causes it to fire the close event for the players crafting inventory
also from what I can see, the docs say nothing about not opening an inventory in the close event
declaration: package: org.bukkit.event.inventory, class: InventoryCloseEvent
Yeah I can't find it either anymore but I swear I read something with a warning somewhere
If I ever find it I'll link it
I'd be surprised if it was actually documented since md_5 and the old Bukkit team are/were lazy shitbags when it came to documentation
Well let me test it with a tick delay
The warning is in inventoryclickevent
ah okay
yeah I see it
declaration: package: org.bukkit.event.inventory, class: InventoryClickEvent
I do still wonder why that runs out of stack space though
Ok phew knew I wasn't crazy
Yeah anyway it works delaying it by 1 tick thanks
@tranquil crane lol
Strange I didn't get that error ever before
Weird that the warning would be in that spot
yeah
but as I said, documentation isn't one of Spigot's strong sides
neither is performance, or asynchronous computation, or just about anything lol
haha
I remember seeing once though, there was this @Deprecated method in somewhere, and the docs just said @deprecated Magic Number
nothing about why it produces a magic number or what to replace it with
because it's your job to figure that out
excuse me discord please parse that link properly
