#dev-general
1 messages · Page 12 of 1
i am, yes
you have a much longer range than him
huh
just farm railgun from far away and then burst him down
oh
longer effective range, i mean
is it instant shoot
yes
is bastion instant hit
yes
oh
hitscan is the right term lol
oh
tank*
singular
and thats why you flank
or just walk around them
u cant all hide behind a tank in ow 2
i am
left click = projectile
right click = hitscan
yea
isn't left click railgun
oh wait
no
im gonna try widowmaker
Noo
someone else is using your hiding spot
If you wood lick to Buy Direct Message mee
message sent
you are lieing i donut have it
You donut have 20 years experience either, so I guess y'alls even lmaoo
how wood 🪵 yu no that
i sed 20- any way
\😆
I hope he commits to rewriting all of twitter that would be very cool I think
rewrite twitter in rust 🚀 🔥
That's funny
sir this is #dev-general
Must be Brett's alt
Does anyone know packets?
I am having issues with packet order
basically sometimes when I close the inventory, it opens the inv back (while using the animated title)
I have tried adding some debug, but it didnt really help
Isn't there a packet to set the title of the inventory the player is viewing? If so use that instead of using the open inventory packet with the updated name.
I dont know abt that tbh
ClientboundContainerSetDataPacket Try looking into this one maybe?
it seems like this one
should I just update the inventory with the same inventory ID?
Try it
you mean haskell right?
Is possible to disable having to click exactly on the name of the file to open it in IJ?
wdym
I remember being able to open a file in IJ by clicking anywhere in this rectangle, but now I have to put my mouse exactly on the name
could be a bug
Is that the new UI?
no
But yeah most likely a bug
sure
no spamming
no spamming
no spamming
no spamming
where's non-general plugins?
Everywhere and nowhere 🤫
I finally got the hacktoberfest badge ❤️
Where
is there a way to get paper to use <GOLD> in broadcast and not &6
Override the command and parse the message
ok, so there is no way at the moment without coding
no, the command doesn't parse legacy color codes either by default, if you have essentials installed, it has its own /say command and that's why it does parse color codes
ohh, I guess ess is parsing it for me, so making a say and broadcast command within my plugin will fix my problem
Any ideas if TAB has velocity support? couldn't find it anywhere
Hi, I wanna learn Java, does anyone know of any good YouTube courses for beginners (I don’t know anything about how to code, etc)
?learn-java
Online Courses:
Online courses are also great for learning java. Some websites that offer them are:
- Coursera - Free unless you want a certificate
- PluralSight - Great courses from what I've seen. Mostly Paid
- Udemy - Never used them myself but they seem to all or at least most be paid.
My first ever course was one from Coursera. - I can say it was pretty good at introducing me to the programming world as a whole not just java.
Oracle Docs:
Oracle docs can help a lot at learning and understanding java:
- Start with this,
- Breeze through this (skipping stuff that doesn't seem relevant like bitwise operators),
- Hit this.
They're the first three from this larger thing which you should definitely go through overall. But those three should be enough for slightly better understanding of what is happening here without feeling like a huge time sink.
That one is a small part of this larger site wherein "Essential Java Classes" and "Collections" also have good useful stuff
Other services:
Some other cool services that will help you learn java are:
As you can see there are plenty of good ways to learn as long as you're willing to invest the time. Have fun learning!
it had a velocity folder on the github so id assume yes
apparently they do not support it and will never support it.
They supported it for a while but dropped support because of velocity's api
yeah don't know what that's about
but it really pisses me off
so if you find an alternative, please do let me know
cause that shit buggy as hell
tab or velocity?
@mental summit VelocityTabListPlus when?
tab lol
well we also need a nametag manager preferably with permission support
and a nickname plugin that stores nicknames in luckperms
man i got a lot of things to do
DAMN
all these cool tools and my co-worker uses fucking eclipse
lol
he said he will only switch to IJ because eclipse removed the support for <editor-section> or whatever
that unused import
it would eat me from inside if I don't replace the image
lmao
Development versions of Velocity 💀
actually looks kinda nice though
also anyone know of a good plugin for multiline nametags to replace TAB?
really just needs to read placeholders essentially
what’s wrong with TAB out of curiousity
Oh I read up, didn’t realize they officially dropped it
uh no idea, I recall seeing this api: https://github.com/iso2013/MultiLineAPI but it's a bit outdated, although you could see how they do it and replicate it
Selenium is the most ugly thing on the planet
If you are talking about FindBy, those are just locators
element[index]/elment/element[index] is the bad way of doing them xD you would usually want something that won't break at the smallest change on the page
well yeah that seems extremely fragile
hy
I believe nez was looking at re-adding Velocity support
well he better be
cause i'm real close to just not having nametags at this point lmao
I could probably try doing some work adding support for that stuff to TAB Velocity, though it's hard because Velocity doesn't have a scoreboard API and so we'd have to use internals somehow
Bungeecord has a scoreboard API?
I don't see why they have to do anything
they just need to pass around placeholders and store data centrally
Either way, I did some tweaking myself to get the latest version working, but it's pretty buggy and not worth it at this point
They don't, but I believe we are using their proxy module which is published to my repo
It used to be on Luck's repo, but it was removed iirc
We could probably do the same with Velocity, we just haven't yet
ah okay
well yeah Velocity is definitely the future
so it's really disheartening to see support for it dropped
Yeah
I think nez also had issues with the community. Quite a few members of the Velocity community in the old Discord server didn't like him and weren't very friendly to him
I disagree
Velocity is the present.
Yeah... Time is a bitch
aren't there more bungee plugins though
More == Better
Every time
Velocity is a vector expression of the displacement that an object or particle undergoes with respect to time
Exactly my thoughts
which looks better? 1 or 2?
to me, 2
I can't believe I missed the drop of cum
First
the names are very .. questionable
im experimenting with method chaining
to see if its viable for the shops instead of doing everything through the constructor
i think method chaining would work better when loading from file rather then hardcoding shops
https://mvnrepository.com/artifact/com.charleskorn.kaml/kaml/0.49.0
Ah don't you just love it when they upload a jar that's 695 bytes that only contains a META-INF folder?
I'm so confused
this is the latest version that has an actual jar
Ok ignore above I just found an alternative solution
but
anyone know how to apply kotlin plugin but not shade kotlin?
don't use shadow?
I'm using shadow for other dependencies though
exclude moment
imperceptible thoughts wiki is p good, highly recommend
I need to find out more info on Maven shading, I need to be able to remove modules I'm not using in a plugin
Google is a great resource
yes, I added a few lines and my file got 50% smaller <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>Autorank</shadedClassifierName>
minifying the jar is not a great idea from my experience, there might be some classes that maven thinks aren't used but they are
I've had so many problems from that ^
I actually never had any issues with minimizing
although I use gradle 😎
gradle > maven
Gradle does the same thing
sus never had issues with it
also random question, Waterfall VS Velocity, which wins? (or any other fork if suggested)
I got my new commands to work in game, when I try to run them from my config only one works the other nothing not even an error
Please always give more details
If you don't have an error, show the code
If something doesn't work, if there is an error, show the error. If there is no error, usually you should show the code, and if you can't show the code or the code doesn't help, then describe in-depth what the issue is, what you've tried, etc
if I run command in game it works, when I run command from a config nothing
it deserializes color codes
Are both commands being ran as a player?
So for example, what would the commands be
Autorank has a paths.yml which can run commands as a result
command2:
value: ar broadcast <GOLD>&p <GREEN>has more power level then 4!
command3:
value: ar say <GREEN>Congratulations, your power level is more then 4!
ar broadcast and ar say are my two new commands
Make sure that it's actually running: ```java
System.out.println("RUNNING COMMAND " + command);
// code that runs the command
broadcast works say does nothing from config
code for both commands are near identical
but if you do /ar say <GREEN>Congratulations, your power level is more then 4! does it work fine?
yes
can you show the code where you get the commands from the paths.yml and make the player run the command? Since if the manual command works then the SayCommand class should be fine
I'm not sure what the issue could be
looking into code I didn't write
What class is the part where the commands from here are ran?
it's a pretty big project 🥲
So you're sending the command as the console
which would be running /say from console
not as the player
that would make sense so no perms are needed to run command
So basically to reproduce this issue without code:
- Open console
- Type in
ar say <GREEN>Congratulations, your power level is more then 4! - See if it shows up in your Minecraft client
got an error
_ _
Thanks I know my issue, now to figure out a way to make this command work
since you know the issue, the best solution would probably to make the say command have a parameter for the player to send the message to
Right now, the say command just sends the message to the command executor... (so in this case, console -> console which is not what you want)
or use message class so it will have a player to cast too
this should remove 'ar say ' from front of a string ?this.msg.replace("ar say ", "");
no not in front, it will remove ar say everywhere in that string
Why are you doing this?
I already told you what solution is recommended
the code send this as a message not a command, everything works but it has ar say in from when sent to chat
Why aren't you running it as a command anymore?
the command still works, need the command to run from the config
don't need the command to run from console
then set the player to op and run from the player
so I can send that info to the console
what info
final boolean beforeState = player.isOp();
player.setOp(true);
try {
// commands
} finally {
player.setOp(beforeState);
}
This is it
The better way would probably be to do what I've mentioned above but this is a simple solution which should also work
I forgot to save the change in the replace, my short code add works fine if (this.msg.startsWith("ar say ") ){ this.msg = msg.replace("ar say ", ""); AutorankTools.sendDeserialize(player, this.msg); return true; }
There's no point in having it start with ar say then...
there's no purpose of the ar say command
there is if you want to use minimessage color codes
But it only sends it to themselves
not other players
Either setup the command to work to be able to run from console or don't use the command at all
yes, the broadcast works also
Making it like this, especially if it's a public plugin, will cause confusion
broadcast is fine
didn't think about that, guess I'm to tired to think clearly
and if the text happens to have ar say in it then it will be removed
If you are going to do the startsWith method, you have to use something like substring
but if you're going to use startsWith, you should probably remove the ar say subcommand
But do you see what I mean by this?
Sorry if it's sounding confusing
Basically I mean that you have a command in the config (ar say ...) but it doesn't actually run the command - that's the issue simplified, and above is more detail
yes, I was trying to under how to fix it as a command
if I go with my replace fix use a simple catch to not confuse the public
Does anyone know how to learn js
Yes
Youtube is good too
lol
Dont store it as a class variable
Bukkit.createBossBar("Welcome To Hell", BarColor.PINK, BarStyle.SEGMENTED_6); this should make a bossbar ingame right?
my ide isnt erroring so i assume so? but it just doesnt make it ingame
might be bcs of me putting it in the onEnable section
smh
Looks like it creates an instance of a BossBar so it can be displayed
It doesn't display it on its own
Lmao
what class it from
Bukkit
@Nullable
public static KeyedBossBar getBossBar(@NotNull NamespacedKey key)```
Gets the KeyedBossBar specified by this key.
- not bound to a
Boss - not created using
createBossBar(String, BarColor, BarStyle, BarFlag...)
e.g. bossbars created using the bossbar command
bossbar or null if not exists
key - unique bossbar key
Feels weird to type that
also spigot is default
😠
so u can d;bukkit#getbossbad
d;bukkit#createBossBar
@NotNull
public static KeyedBossBar createBossBar(@NotNull NamespacedKey key, @Nullable String title, @NotNull BarColor color, @NotNull BarStyle style, @NotNull BarFlag... flags)```
Creates a boss bar instance to display to players. The progress defaults to 1.0.
This instance is added to the persistent storage of the server and will be editable by commands and restored after restart.
the created boss bar
key - the key of the boss bar that is used to access the boss bar
title - the title of the boss bar
color - the color of the boss bar
style - the style of the boss bar
flags - an optional list of flags to set on the boss bar
So how would i display it?
I don't use spigot, but I imagine Player has a method for it
what do u use?
I develop on Sponge usually.
ah
Oh I see
declaration: package: org.bukkit.boss, interface: BossBar
You add players to the bossbar apparently
how would i add all?
d;Bukkit#getOnlinePlayers
@NotNull
public static Collection<? extends Player> getOnlinePlayers()```
Gets a view of all currently logged in players. This view is a reused object, making some operations like Collection.size() zero-allocation.
The collection is a view backed by the internal representation, such that, changes to the internal state of the server will be reflected immediately. However, the reuse of the returned collection (identity) is not strictly guaranteed for future or all implementations. Casting the collection, or relying on interface implementations (like Serializable or [List](https://docs.oracle.com/javase/8/docs/api/java/util/List.html "class or...
This description has been shortened as it was too long.
a view of currently online players.
dont think i fully understand getOnlinePlayers -> this is what i got
Bukkit.createBossBar("Welcome To Hell", BarColor.PINK, BarStyle.SEGMENTED_6).addPlayer(Bukkit.getOnlinePlayers());
well getOnlinePlayers returns a Collection, and #addPlayer takes a Player, so there's going to be an issue
i see
BossBar bossbar = Bukkit.createBossBar("Welcome To Hell", BarColor.PINK, BarStyle.SEGMENTED_6)
Bukkit.getOnlinePlayers().forEach(player -> bossbar.addPlayer(player));
Something like that would probably work
works!, good to know that for next time
(how getonlineplayers and for each works)
piece of advice, you just spent 120 bucks on a course (imo wasted money), then follow it. You starting to try to do stuff outside the scope of your knowledge is useless, you won't learn how it works and you will be asking questions 24/7. Besides that, learn java before spigot api.
@humble prism
not saying to not try new stuff, but learn the basics before doing it.
not me..
i wasnt the one who bought the course....
and that course was for javascript not java
and im just trying to have fun while learning
Hi I have a problem with player.spigot() it works just fine but when I add craftbukkit as a lib to use nms, player.spigot() just stops working does anyone know why is this happening?
d;Player#spigot
@NotNull
Entity.Spigot spigot()```
player.spigot().sendMessage(mainComponent); here you go
why th would you need the spigot?
so confused
the #spigot() method has stuff that just
isnt in the player object
reminder that spigot api is fucking terrible
you need player.spigot() to send TextComponents you can't sent it with just player.sendMessage()
There's positives and downsides to using paper api
SpongeAPI is very nice 😌
if you make a public plugin for example
it would shock you how many people dont actually use paper
excluding public plugins (although 2/3 already use paper anyways)
that's an extra headache and in some cases i think paper can overcomplicate stuff
Most servers use paper at this point
.
With certain aspects of paper, to me, it feels like it takes an extra step for some stuff 
example?
we already know im not a fan of adventureapi so that's the only example off the top of my head i can think of
but i don't jerk off everything in paper or use it much so i can't give you specifics
Might effect a minority of users and broad examples including "I don't care for adventure"
(although imo adventure is simply pog)
honestly fair im talking shit
i do appreciate the events that are in paper however 
okay yeah im talkin shit
😔
I'm getting this in startup log [01:01:01] [Server thread/INFO]: [Autorank] Enabling Autorank v5.1.7 [01:01:01] [Server thread/INFO]: [Autorank] mainclass getHumanPluginName = null [01:01:01] [Server thread/INFO]: [Autorank] mainclass getInternalPluginName = null [01:01:01] [Server thread/INFO]: [Autorank] mainclass isPluginAvailable = false
alright
uh so I having this debate with some guys, they claim you ca copyright server features?? (I am like, wtf? Thats false right?)
an example would be server A creates this super unique gamemode and trademarks/copyrights it, so server B cant just copy that gamemode
like, I can see a lot of issues with this but like, idk why they keep saying they do it?
maybe you can, but is it even effective? lol
Uhh it kinda depends
can you copywrite or trademark a gamemode, maybe.
But you'd have to do it anywhere that has a patent office and then go on to enforce your patent/copywrite
Frankly the legal costs would be more than its worth to even bother
Ye, which leads to me believing they are just cap lol
how tf would they copyright it?
its not a software
I asked, they didnt answer lmao
bukkit plugins? yes
also all mc creations are technicly owned by mojang no?
but we are not speaking about the pkugins we are speaking about the idea (aka in this example gamemode)
or was that the exception
thats a yesish
u cant copyright a idea can u?
u cant copyright car
"How do I protect my idea? Copyright does not protect ideas, concepts, systems, or methods of doing something."
it very much does not
I'm pretty sure hypixel attempts to copyright all their minigames, including the ones they stole like bedwars.
lol without success I assume
IDK just heard about the attempt.
"stole"
What minigame do you think bedwars is copied from? Yes it has differences but the game idea is the same.
eggwars?
Ding ding
Probably copied from the classic game of Tag! You're it!
lol
Regardless, hardly a theft.
They even modified it lmao
eh its hard to maintain competition if your competition blantely copied you lmao
Mans never heard of 2 different ketchup companies
I was trying to fix mainclass issues and got this error also https://paste.helpch.at/bitosuvuse.php, this is my pom I made a few I thought were minor changes https://paste.helpch.at/kisacacoje.xml
not the same in minecraft I would say...
well kinda
Just the same mini-game, but slightly different
Much in the way one ketchup is slightly different than another ketchup
how can i convert a string like that: &#D9CCA9&lTEST in colored text?
hexcolors?
oh nvm
didnt see what channel im in
hehe
np
private Pattern hexPattern = Pattern.compile("#([A-Fa-f0-9]){6}");
public String hexColor(String s) {
if (s == null)
return s;
if (s.isEmpty())
return s;
Matcher matcher = hexPattern.matcher(s);
return matcher.replaceAll(color -> ChatColor.of(color.group()).toString());
}
```I made a simple method for it. (Java 9)
what is colored text?
Matcher.replaceAll()
idk
have seen some people speaking about it
I only know MiniMessage though
¯_(ツ)_/¯
Also Java7
Try it 😉
Java 9
Is it? I only have java 17 lol
👍
426 votes and 123 comments so far on Reddit
but you're linking to the Java 19 page 🤓
ok you got me there
d;jdk Matcher#replaceall(function)
public String replaceAll(Function replacer)
throws ConcurrentModificationException, NullPointerException```
Replaces every subsequence of the input sequence that matches the pattern with the result of applying the given replacer function to the match result of this matcher corresponding to that subsequence. Exceptions thrown by the function are relayed to the caller.
This method first resets this matcher. It then scans the input sequence looking for matches of the pattern. Characters that are not part of any match are appended directly to the result string; each match is replaced in the result by the applying the replacer function that returns a replacement string. Each replacement string may contain references to captured subsequences as in the appendReplacement method.
Note that backslashes (\) and dollar signs ($) in a replacement string may cause the results to be different than if it were being treated as a literal replacement string. Dollar signs may be treated as...
This description has been shortened as it was too long.
9
The string constructed by replacing each matching subsequence with the result of applying the replacer function to that matched subsequence, substituting captured subsequences as needed.
replacer - The function to be applied to the match result of this matcher that returns a replacement string.
ConcurrentModificationException - if it is detected, on a best-effort basis, that the replacer function modified this matcher's state
NullPointerException - if the replacer function is null
dd better
gaby can't resist the urge to use dd
Yeah I cant
unofficial docs, probably modified

true
https://github.com/dkim19375/DkimBukkitCore/stargazers
I got a star????? 😮
looking at their github they don't even do anything spigot or java related lol
I was trying to fix mainclass issues and got this error also https://paste.helpch.at/bitosuvuse.php, this is my pom I made a few I thought were minor changes https://paste.helpch.at/kisacacoje.xml
at me.armar.plugins.autorank.config.ConfigUpdater.update(ConfigUpdater.java:20) ~[Autorank-5.1.7-shaded.jar:?] at me.armar.plugins.autorank.config.SettingsConfig.updateConfigWithNewOptions(SettingsConfig.java:43) ~[Autorank-5.1.7-shaded.jar:?] at me.armar.plugins.autorank.Autorank.onEnable(Autorank.java:141) ~[Autorank-5.1.7-shaded.jar:?]
NPE
not in his code
java.lang.NullPointerException: null
at java.io.Reader.<init>(Reader.java:168) ~[?:?]
it starts on ConfigUpdate:20
yes, I suspect that the plugin doesn't have the file in it and I am verifying that right now
that indicates that it tries to create a Reader with a null value
Hmm it should work
null*
@sturdy zinc
can you print out plugin.getResource(resourceName)? like ```java
System.out.println("Resource " + resourceName + ": " + (plugin.getResource(resourceName) != null));
and also open up the jar and make sure that Settings.yml is present inside the jar file
ok
also @sturdy zinc license and readme are not supposed to be in resources
well usually they aren't
they're supposed to be in the project directory
yes missing all my config files
when you ope nthe jar?
yes
but the plugin.yml is there?
and only plugin.yml
since the plugin wouldn't even load without one
Oh interesting
odd how only plugin.yml is there...
oh
it's because you made it only include plugin.yml
line 57 of pom.xml
ok, so I either add rest of files or delete that section
You can try to add rest of files
or removes the includes (but keep the rest since idk what it does)
I first deleted the few lines to include the plugin.yml and the rest are there now
pom.xml:57 set it to *.yml
ok, it works again I wish I figured this out last night
ok, back to fixing this [15:56:21] [Server thread/INFO]: [Autorank] Enabling Autorank v5.1.7 [15:56:21] [Server thread/INFO]: [Autorank] mainclass getHumanPluginName = null [15:56:21] [Server thread/INFO]: [Autorank] mainclass getInternalPluginName = null [15:56:21] [Server thread/INFO]: [Autorank] mainclass isPluginAvailable = false
what is that?
and where is that?
logs
what class is it printing from
Hey, working with worldedit, how do I not have blocks fall when pasting schematics?
no clue, just shows up in startup logs
Look for something related to side effects
if you find it, disable physics from there
Or wait does pasting schematics use edit sessions?
since edit sessions have a setSideEffectsApplier method or smth
since I'd assume you have IJ in this project already, can you ctrl F?
right click the project
and press Find
not exactly ctrl F but find feature
find in which class or all
all
I was talking to Ivanix
look here and below
ctrl + shift + f getLogger().info(
4 classes came up for mainclass
please elaborate
did search for the word mainclass
read it wrong, one class four lines in Library.java
Not sure what you're looking at 🤨 but the three search results for the logs are in onEnable, line 122 - 124
I'm not sure what your issue is though
but that's where the logs are coming from
unless you changed it and didn't update it on github
all files on github are up to date, pom and plugin.yml are only changes
alright then the info above should be accurate
not sure why those lines are there
ummm
I guess because someone write those lines of code?
getLogger().info prints out to console
I will see how long they have been there
Yeah I think it is
He mentioned that he didn't write a lot of the code
although it is still quite clean code compared to other decompilations
and also has comments in some places
no Gaby, inherited code
I guess it was decompiled at some point
I may of since I broke my Github a year ago and didn't get it fixed till a few weeks ago
just going to delete those three lines
they seem to do anything
I change a few things and now it returns [16:23:36] [Server thread/INFO]: [Autorank] Enabling Autorank v5.1.7 [16:23:36] [Server thread/INFO]: [Autorank] mainclass getHumanPluginName = Autorank v5.1.7 [16:23:36] [Server thread/INFO]: [Autorank] mainclass getInternalPluginName = Autorank v5.1.7 [16:23:36] [Server thread/INFO]: [Autorank] mainclass isPluginAvailable = true [16:23:36] [Server thread/INFO]: [Autorank] Generated new log file: log-2022-11-07.txt [16:23:36] [Server thread/INFO]: [Autorank] The settings.yml is up-to-date [16:23:36] [Server thread/INFO]: [Autorank] Generating new PluginLibrary instance
👍
I must of changed it to AURELIUM_SKILLS when it should of been Autorank
Yeah
follow this
Couldn’t I also make another plugin to cancel the physics events?
Uhhhhhh I wouldn't recommend it
worldedit has a method for it
on the EditSession
Alr I’ll check it out
Does anyone know if Minecraft uses -9.8 m/s^2 for gravity, and also if it uses air resistance?
Specifically for falling blocks
Actually I found this https://minecraftbedrock-archive.fandom.com/wiki/Gravity
That's bedrock though
Basically I want to calculate where a block will land
And it turns out there is air resistance, so not fun
Oh smart
I cannot understand what is going on lol, it is very obfuscated
Anyone here experienced with modpacks?
are these errors on my part? https://paste.helpch.at/egelesatoc.rb
When Intellij starts indexing... I really need a better computer lol
Print out your last 30/60 days of code and Elon Musk will review it.
Take your code print outs and fax them to our troll free number Quality website
LMAO watch the video
I love how Elon handwrites the reviews and grades my code. Just like my college professors. From 1940s.
I bet someone does
So I found this: https://paste.helpch.at/ikafimohey.java
which I took from https://github.com/Groomon/EntityFlingerTest/blob/e83ff71fce002dd00ec09dd464b2b12950075dbd/src/main/java/com/github/groomon/entityflingertest/EntityFlingerTest.java#L295
But now I'm trying to figure out where a velocity will cause a block to land instead of finding the velocity from the end block
Some help would be great, I'm being pretty stupid
xD
I believe in you
I'm _ _
yoo, I am too good, first time having a 2 day streak 😎 (quite offtopic ik)
Good at math and able to help?
to much sin() and cos() for my liking (don't even know if you use them, although I assume you do? or you use velocity, idk)
Lol there is neither in that code
dkim.send()
lol
dkim.inertia = Integer.MIN_VALUE
You're just going to stay there
😭
I swear I'll actually pay whoever figures it out
Someone also told me about this if it helps:
int ticks = 0;
Location current = start;
while (current.getBlock().getType() == Material.AIR) {
ticks++;
// 0.04
initialVelocity.add(new Vector(0, -ACCELERATION_IN_TICKS, 0));
initialVelocity.multiply(new Vector(0.98, 1.0D, 0.98));
initialVelocity.multiply(new Vector(1, 0.98, 1));
current.add(initialVelocity);
Bukkit.broadcastMessage("Velocity: " + initialVelocity + " - " + ticks);
Bukkit.broadcastMessage("Current: " + current.toVector() + " - " + ticks);
}
return initialVelocity;
So this works, but it's off by like 1 block, and it gets off by a tiny bit more for really long launches
I just ended up looking through the tick() method like Emily suggested, I forgot mojang mappings were a thing lol
That's my name
It is, thank you for your suggestion
Also it was off because I forgot to add the initial velocity
I didn't think a class name like this
would actually be in a project
A builder for a factory for a factory
isn't that great
lmao
no no its awesome
yo wtf is the jdk one
That's straight up an error message as a class
second one is awesome though lol
Hello there
If I run my command it will always return the usage message
How do I fix?
nvm I fixed it
Can someone still help me tho?
with?
target.getWorld().spawnParticle(Particle.EXPLOSION_HUGE, player.getLocation(), 100);
/particle minecraft:cloud ~ ~ ~ 0 0 0 1 50
How do I get it like this?
the particle itself doesnt really care rn
It's the information
I'm a bit confused right now. Are you trying to replicate the same thing that the command does but with code?
you are using the wrong location I believe
you're using the sender's location but the target's world
target.getLocation(),
Fixed it
but how do I get the same arguments I'm using 0 0 0 1 50
Because there are like 20 spawnparticles
I'm not quite sure what they all mean. I'll have to google that first to tell you
If you have time and if you want to do that Can you please check 🙂
in like 5-10 minutes.
Thank you
So from what I understand is that this spawns the particle at the exact location of the player, with no offset, with a speed of 1 and with a count of 50
target.getWorld().spawnParticle(
Particle.EXPLOSION_HUGE,
target.getLocation().getX(),
target.getLocation().getY(),
target.getLocation().getZ(),
50,
0.0,
0.0,
0.0,
1.0
)
I believe this might be exactly the same thing
the last thing is the speed
so 1.0
and the 50 is the count
of particles that will be spawned
Check out all the spawnParticle methods
they have different parameters and they're all documented
use the one you want from there.
This worked
Is there anyway I can make it so Only 1 player can see that particle
Maybe this should work
using protocollib should work
Using the spawnParticle method on Player will only show them to the player
The one on World will broadcast the packet to everyone nearby

no need to use packets or whatever else
just use target.spawnParticle instead of target.getWorld().spawnParticle
some1 that can help me out? I created a function, included that function in a page but idk how to put the session of the function in a db.
@remote gobletyou can't read minds so you can help all
i was not aware of that, the more you know
huh
hello
I have the DeluxeMenus plugin on a server and it has a huge delay when executing a menu command.
Probably better for #general-plugins or #1007620980627230730 , but I would suggest trying to do a spark profiling report while reproducing it and sharing it here.
Okay, I'll do it and share a media snippet.
Fun
ew, getters
Kotlin user?
Anyone know why JitPack build is failing? It says
Execution failed for task ':compileJava'.
invalid flag: --release
And it appears to be using Java 1.8, but I specified Java 17 in mybuild.gradle
https://github.com/Fisher2911/FisherLib/blob/master/build.gradle.kts
I haven't used JitPack to host a repository before so I'm don't have any clue what I'm doing lol
toolchains moment
tl;dr:
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
also you don't need the source/targetCompatibility when using the release flag
I thought source/target compatibility did something similar
What's the difference?
In some projects (including my own) I see source/target compatibility, but in others, such as this one, I see toolchain
and which one should I have? or should I use both?
toolchain versions sets the.. version of the toolchains to use (that is, the distribution/version for javac, javadoc etc (basically what jdk it will use)), you can explicitly specify which one it shall use, otherwise it will do all that stuff mentioned in the page above
sourceCompatibility/targetCompatibility set the -source/-target flags in javac but they're just bad for other reasons, if --release is present they are ignored entirely
what's the easiest way to track time played?
Doesn't minecraft have a statistic that tracks that?
yes, have you tried looking for it?
I mean, I have found several options to do this, but apparently from a thread I saw, using the spigot statistic doesn't work properly
they don't elaborate on "what doesn't work" though
you can disable some/all statistic tracking on Spigot so that might be why
but, if you don't, it will work fine
so it's the Statistic.PLAY_ONE_MINUTE right?
Which returns the play time in seconds in that server
the name of this stat makes even less sense lmao
🙂
ty though
@obtuse gale DM me abt your placeholders request.
so then what's the point of using source/target if toolchain changes the jdk version?
toolchain does not change that
source/target are the "old" way of telling the compiler what classfile version you wanted to produce
but it's ass
that's why release exists
why did I tell Fish to specify the toolchain is because shitpack provides jdk8, and he wants to use jdk17, hence it needs to be specified, toolchain has got nothing to do with source/target/release flags
how can toolchain increase the java version?
how do I set the release? I can't find any info online
it downloads the whole of jdk you tell it to
that's how
oh so you can use gradle without installing the JDK yourself?
--release with plain old javac
oh
ty
i shall use that now
you can use gradle without a jdk yes and it will download one, but obviously you need at least a a jre to run it
oh right yeah
Ok I was an idiot there was nothing here before
okay
reverse this
quick question, is there a way to display the vanilla sidebar
/scoreboard objectives ... setdisplay sidebar
- Per player - so the whole server doesnt see it (so I can see it for testing purposes)
- Per world - the reason above, if first not achievable.
Probably not
maybe through packets?
yeah it is possibly with the API too
basically, Player#setScoreboard, and you can create them with the ScoreboardManager, then listen to the relevant change world events and such
I tried looking into it but its very confusing
I managed to show display for everyone else but me lol
Use https://paste.helpch.at/ for errors, logs and configs. So we don't spam the discord.
hey, uh
I have a json object
Object { Email: (1) […] )
Email: Array [ "The email address is not valid." ]
0: "The email address is not valid."
I need to access the 0th element of it, how would I go around doing it?
And the object can be anything
Someone has forgotten to add something in the OneBlock plugin
In JS?
js, ts
well, the initial path of it is
err.response.data.errors
and it gives an object of X, that has an array of errors
object[0]
if you mean err.response.data.errors[0], it doesnt work
if I use err.response.data.errors['Email'] I get the object with array, but thing is, 'Email' cant be anything.
well, Object.getOwnPropertyNames(obj) does the trick
💀
already replaced every occurrence with my solution
const keys = Object.getOwnPropertyNames(err.response.data.errors);
const errors = keys.map(k => err.response.data.errors[k][0]);
notifyFailure("Creation of a new user has failed: " + errors?.join(";"));
thank god modern text editors have a replace all feature
Object.keys may be a better fit than getOwnPropertyNames here imo
alternatively, it looks like you're discarding the keys entirely and only using them to get values, when you'd want Object.values instead
[request]
True
Notepad has
they said modern text editors. notepad is futuristic
1.8 forge? 💀
if so (since that's probably why) I'd just clone an existing 1.8 mod lol
that's what worked for me
How many crrsions behind r u 🤣
Release Date: September 14th, 2015. Holy crud.
Its bad i know, but im litteraly writing a 10 line program and updating stuff seemed like a bigger task
IntelliJ 2019 to the rescue
that seems like a lot of effort for a 10 line program and a weird choice of version
Just rewrite the whole thing lmao
@leaden crag is your Minimap a legit plugin? How is all the client side stuff done? Is it a resource pack with a LOT of images?
Yeah it is 😄
The client mod fix the rendering issue that occours when using Optifine for example.
I am guessing that the resource pack is dynamically updated when new chunks get made or chunks get updated, right?
Not quite
How do the images get updated with the chunks?
(Not sure if this is too much to ask, might ruin the secret behind the plugin, I am just curious 🙂 )
I'll surely tell you more around the 26th of November.
I assume it works similarly to avatar plugins where it uses colored pixels
Pretty neat though, would like to see a video of it working 😅
Water 🚰
I'll be able to showcase it soon
interesting
do any of u know how to disable the entity clear from essentialsx
its killing all our mobs
essentials doesn't have any auto entity clear
plugins like ClearLagg have those
or it's just natural mob despawn
also #general-plugins
its just odd becuz theres a /killall command
with essentials
but it keeps running
and killing mobs i dont want to die
we r using mohoist 1.16.5 tho
That's a manual command
Not auto
Iirc
You can show plugin and mod list though note that mohist is not recommended and I think essentials has like a whole page on iy
uhm
why my ajleader boards doesnt connect or smth
i put the plugin in my plugins
but it doesnt exist
btw i use 1.16.5
Kicked
in the face?
👢
Is it someone encounter this issue https://paste.helpch.at/jewusilaxa.less ? is when you shift-click items to inventory on custom inventory were the plugin then remove the item added (one tick later). Has no problems on 1.16+ with same code.
only fix i find for this is to cancel the event and remove items directly from player inventory (is same issue if you run 1.9.4 also).
whats the exact code your using thats doing this?
https://paste.helpch.at/peyenokatu.kotlin and https://paste.helpch.at/ametiketid.java I think this is the most important parts.
if heaven
?
lots of if statements
yeah but that are not the issue here, ether way how i use the inventory it demands lots of checks.
ik i was just making an obversation
yeah is cleaned up a bit, was worse before 🙂
ether way confused way the server get upset of my code and it not even stacktrace to any of my code.
but seams to be problems when you try remove item from inventory on really old minecraft versions in some cases at least.
yeah but is not only 1.8.8 but also 1.9.4 both paper and spigot
does it occur in 1.10?
can see if i can get hold on 1.10
same issue in 1.10.2
keep going up the versions till you find one that doesnt do that
well the earliest one that doesnt
would you mind running the plugin on spigot 1.8.8 instead of paper cus the java lines dont match the spigot nms
the error lines dont match and i wanna know what to look for
paper 1.12.2 works at least 🙂
I find away to solve it, but set items to 0 not always work as intended with 1.8.8 and 1.9.4.
set type to air?
My fix i do like this clickedPlayer.getInventory().setItem(event.getSlot(),null); , it instead set item inside playerinventory and never add items to custom inventory (I plan to use that on old minecraft versions).
i just wonder why it stackoverflow errors
I guess they use while loop and if the item get removed it never can stop the loop.
oh recursion
i see why its looping now
well kinda
a() is just a another method for the same clickItem() method
so click item runs a() which then runs clickitem
on loop for whatever reason
its a bug with the server jar and was probably not fixed till 1.12.2
yeah, spigot are slow to fix stuff 🙂
the problem couldve been fixed by paper
the bug couldve existed for years which it seems like it did and just wasnt found till 1.12 existed
cant fix something if you dont know its occuring
the mojang auth servers were vunerable because of legacy auth and it was vunerable for years till it was found and quickly fixed
yeah could, but seams back then they more copy spigot an import mojang mappings self.
uhh mojang mappings didnt exist for the server jar till 1.14.4
yes I mean they really more on spigot an try import mojang classes self.
Other bug you can look on, is the InventoryMoveitemEvent , that are still broken 😄
if you try get inventory contents it will not return right amount on first slot, if you not do it one tick later.
thats to be expected cus afaik the event is called just before it actually makes changes to the inventory
spigot modify the inventory before calling the event.
i was sure it was before
no they clone the item after they get first item and change stacksize.
They should then do that after cancel not before.
now i see why people on here dislike older versions cus trying to support so many versions is hard work
Does anyone know about Velocity?
Does JDA have support for apps?
Great, ty em
Velocity is the directional speed of an object in motion as an indication of its rate of change in position as observed from a particular frame of reference and as measured by a particular standard of time.
how could i effect the mob spawn rates
Lol, about the Velocity proxy
well. then Emily's answer still stands
Which one?
is there a plugin or skript that i can use to give my player rewards for standing afk in a world ?
@vagrant gazelle
yeah and add extra code. can say both 1.8.8 and 1.9.4 should not be used on live server today (was pretty buggy experiences).
Ether way that event are not fixed even in 1.19.2 (I have report it to both paper and spigot (but will not likely be fixed this lifetime)). Could be nice not need use bukkitrunnable some add some extra complexity and load on the server.
I have a doubt is there anyway to let a modded client in a normal paper server
Just so u know the modded client not only client side mods
no.
Hmm
I was wondering if there is a more efficient way to go about repeating tasks than a BukkitRunnable. I need something that can occur every n ticks but I need it efficient. Is there a better solution than a BukkitRunnable?
your code won't be more efficient magically. If you have performance issues with your current implementation, it's not caused by how BukkitRunnable works but by your code
Could always make your own.
Ex; https://github.com/TheCrappiest/TaskManagement
yeah like sirywell said, your code won't run any faster or slower simply by running in any particular thread, the slowness of your code comes from.. your code
I am not concerned about my code, I was just wondering if there was a better system that would run more efficiently (maybe not async) but would also not lag out the server.
what does that even mean, "run fast"?
well what does that mean
again, the "fastness" of your code comes from your code, not from the thread it runs on
yeah basically 99.99% of the performance of that depends on your code
in other words, the BukkitScheduler/BukkitRunnable is not the cause for performance hits
if you want to have something continuation-styled, you'll need to build that yourself, because your code needs to be cooperative then
uhhh
if you block the main thread, you block the main thread
i don't think you're using bukkit runnables correctly then lmao
I give up
why
you're like, 90% of the way there
just like, make sure you're doing runTaskAsynchronously
@long dagger show your code.
cause i'm guessing you're running it synchronously, which executes on the main server thread, which lags your server hardcore
I confused myself
so, I was concerned about other systems interacting with the class while it was updating, resulting in invalid operations, since the data wasn't current (on an async bukkit runnable)
so then you should focus on creating new state and doing callbacks, rather than accessing old state
though I guess it really depends on what you're doing specifically
oh okay
but yeah, i'd recommend either just doing a mongo call on every action if it really needs to be up to date or it doesn't happen often, or implement a solid caching strategy that makes sure that your in-memory java cache is always the same as the mongo db
Hello im learning how to make plugin in kotlin but i get this error:
https://paste.helpch.at/ovegagimes.rb
Do i need to paste a code?
Your main class and your plugin.yml
package mauliy.plugins.commands
import org.bukkit.event.Listener
import org.bukkit.plugin.java.JavaPlugin
abstract class Commands : JavaPlugin(), Listener {
override fun onEnable() {
// Plugin startup logic
logger.info("Custom Commands has been enabled")
registerCommands()
}
private fun registerCommands() {
getCommand("jump")?.setExecutor(JumpCommand())
logger.info("Registered command /jump!")
}
override fun onDisable() {
// Plugin shutdown logic
}
}```
```yml
name: Commands
version: '${project.version}'
main: mauliy.plugins.commands.Commands
api-version: 1.19
commands:
jump:
description: Jump command
Why would you do that xD
java.lang.IllegalArgumentException: Plugin already initialized!```
Now i get another error
Are you trying to instantiate the class somewhere?
i got another file with class
package mauliy.plugins.commands
import net.kyori.adventure.text.Component
import net.kyori.adventure.text.format.TextColor
import org.bukkit.command.Command
import org.bukkit.command.CommandSender
import org.bukkit.entity.Player
import org.bukkit.util.Vector
import org.bukkit.plugin.java.JavaPlugin
class JumpCommand : JavaPlugin() {
override fun onCommand(sender: CommandSender, command: Command, label: String, args: Array<out String>?): Boolean {
if(sender is Player) {
if(sender.isOp) {
sender.sendMessage(Component.text("You have successfully used command!").color(TextColor.color(0, 255, 0)))
sender.velocity = sender.velocity.add(Vector(0.0, 10.0, 0.0))
}
else {
sender.sendMessage(Component.text("You don't have perm to use this command!").color(TextColor.color(255, 0 , 0)))
}
}
return false
}
}
You can't have 2 plugin classes
i was following tutorial when coding and he have 2 classes
he has two classes, yes, not two classes that extend JavaPlugin
ty
but now
org.bukkit.command.CommandException: Unhandled exception executing command 'jump' in plugin Commands v1.0-SNAPSHOT```
no its not
show the whole error
- are you shading kotlin?
- you have to relocate kotlin
or use spigot libraries feature
omg i started today and dont rly know what to do
interesting decision to start with kotlin first, there's less resources for spigot related stuff for it
but anyways the easiest way is probably to just add the library to the plugin.yml
@bleak scaffold what program do you use to code?
IntelliJ IDEA Community Edition 2022.2.3
do you use either maven or gradle?
maven
🤢 show pom.xml
turnxml <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib-jdk8</artifactId> <version>${kotlin.version}</version> </dependency> into xml <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib-jdk8</artifactId> <version>${kotlin.version}</version> <scope>provided</scope> </dependency> and then in plugin.yml put: ```yml
libraries:
- org.jetbrains.kotlin:kotlin-stdlib:1.7.21
this is probably the easiest way

