#help-development
1 messages · Page 75 of 1
🤓
gigachad
WonkyPigs behind the screen be like
he lifting with one arm while coding with the other
Working his jaw with his entire setup
while cardio
oh yeah forgot he's on a treadmill
And doing crypto trades while investing in NFT's and watching the Hustler University course videos.
what a legend
what an inspiration for all of us
Sharing data across servers (Bungee, spigot)
if i have 100 players in a List, for (Player player : players) runs 100 times the code at same time or waits first code gets done then next one?
how
yea this is not multithreading i m pretty sure
yes
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
Working with Hikari, do PreparedStatements need to be manually closed (with resources) or will Hikari deal with all tidy-up once the connection is released back to the pool?
100 players to iterate over is not a lot
Dont over optimise
If you create a new thread for each player you’re gonna end up using more resources and probably time anyway
yes
i mean this code i've sent
it runs for 100 players?
Wdym
what do u want to do
lemme explain deeper
It just runs to cancel itself
the BukkitRunnable javadocs are still broken
Keep in mind- the server runs hundreds of calculations per tick, per player without lag
List<Player> players = new ArrayList<>();
players.add(player1);
players.add(player2);
players.add(player3);
for (Player player : players) {
// code in here tooks 5 seconds to execute by a runnable
}
for loop waits 5 second to run next players code (player 2 and 3)?
or runs 3 players in 3 different codes
Oh like you want it consecutively doing the code in order?
Will run 3 at the same time
thats what i want, thanks
Use a runnable and iterate through a deque
i'm codding a simple tntrun plugin
i just wanted to know it runs for 100 players or waits and ......
Oh yeah nah
Kinda, thanks
🐟
So I have managers on my API which need an instance of my plugin. I created a ManagerHandle class which its instance can be retrieved from my API easily to create an instance of my multiple managers with ease, is there any convention or best method to making my multiple managers automatically generate an instance without requiring the client using the api to pass an instance of the main class?
Hi a question im using an editor in game for the config "plugin.getConfig().set("DisableChat", false);" but doesn't work how i can fix it?
Yes, you should definitely be closing Connection instances received from Hikari once you're done with them
is there any documentation what happens if you set a scheduler interval to -1?
It just defaults to 1 iirc
Na your computer blows up
I tore a hole in the space time continuum last time I tried that
Depends, is the api planned to be shaded or a plugin aswell
shaded
You have to save your config
How do you color your logs?
Eh not really. Might seem like a pain in the ass but letting them pass through the plugin through constructor is tour best option
I actually don't think the period time of -1 is handled. It might just schedule a single task
Internally, any repeating task with a period of < -1 is actually just a single scheduled task that won't repeat
Any task with a period of 0 will repeat every tick. But it doesn't look like == -1 is covered
Who needs runTask then
try it and tell us what happens, but if you travel back to the 18th century make sure you take some pictures
with plugin.getConfig().save()?
How he fonna travel back
plugin.saveConfig
Schedular set to +1
thanks
Integer.MAX_VALUE + 1
set it to 2022, duh
For the sake of clarity. Because runTaskTimer(plugin, () -> {}, 0, -10); is far less understandable than runTask(plugin, () -> {});
that's why a plugin that is stupid was only doing one tick on their repeating scheduling
Shh, details
Then it would probably just run once, yeah
and def interval is 60 * 20
the -1 is min
and it goes in the scheduler..
fk sake
Quick question about Java libraries
Lmao
and I typed it wrong smh
The temptation is real
I have used the gradle init task to make a new Java library but when I compile it and use it as an external dependency it doesn't seem to show up
I have read the Gradle docs but I don't really understand how to bundle it correctly
I just used the build and jar tasks
i fixed powerboard plugin, the tablist is shit
https://docs.gradle.org/current/samples/sample_building_java_libraries.html is the guide I followed
aaaaan it fucking works
To use it as an external dep you need to deploy it to an maven repository
The easiest way to do it is to deploy it to MavenLocal through ./gradlew publishToMavenLocal
Can't I just bundle it into a jar and add it via Project Structure > Libraries > +
Don't you need to sign up and wait like 2 days to be able to publish the library?
Not for a local dep
For OSSRH yes, for others not really
Especially since you can publish the jars whereever you want
Yes, possible but it is added headache for not much reason
ffs how do I stop my config maker lib show and use my api, which is shaded in it, when I add my api in my dependencies
How do you color your logs?
And publishing it to only mavenLocal is "good enough" for starters
On spigot you can do it through the ChatColor.* color codes, on paper you need to either use ANSI escapes (don't) or use the console command sender (I wouldn't use it to be honest)
Yeah, I second that
Yeah I doubt server owners are going to get hard on over coloured logs, not worth it
Colors are reserved for errors and warnings
Why do we have to declare the commands in the plugin.yml file? What does it do?
you don't "have to" do it in the plugin.yml, you just need to let spigot know which commands your plugin is making
Makes spigot actually register them
A) Optimisations (you can't just invoke the onCommand method to all plugin instances)
B) So the client recognises those commands
Legendary jeff, moment of respect okay, made this or stole it idk so you can register it without the plugin.yml, take a look https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/CommandUtils.java
C) To link the command to a plugin (which you should know why that is a good idea if you used plugins such as EssX in the past)
You can use bungee chat too
I see, thank you.
Bukkit.getConsoleSender().spigot().sendMessage(BaseComponent[])
But +1 on not colouring logs. It's annoying
lol
Very
I'd rather not go that route unless you want to use brigadier (even then it would be a different route)
I use it and works fine
It works fine until it does not
But, I have got a framework, if you only have 10 or so commands just put it in the plugin.yml
as with anything
Yes, but this thing is destined to blow up
I'll tread with caution then
Also check the sharing data thread, I want to make sure I didn't give this guy any bad advice
Not wrong per-se but not the full picture
dont reply with "learn java" or any other programming language
Go back to #general ya fucks
I have been coding for so long I forgot channels other than this one existed
Can I use my mariadb driver code with hikaricp without changing the code (just the class names)?
but why
Can I use my mariadb driver code with hikaricp without changing the code (just the class names)?
so ehm back to the definetly very development related talk yes
👍 all clean, plus java 18 is irrelevant
dont you need it for 1.19
No
do you?
or is that java 16/17
17
ah well HECC
J18 is nice and all, not very irrelevant
Sure, less relevant than J17 but has it's uses
And this is why you don't make plugins with java 18>
Do it anyways
screw them all
I will be the one laughing when minecraft releases an update tomorrow requiring all you plebs to update to J18
2.4% J18 usage for me - so good enough
where are you guys getting these charts
I doubt mc will do that
bstats
bstats
J18 isn’t LTS
oh they released?
They have mandated to J16 in the past iirc
quickie for you https://bstats.org/global/bukkit
Finally? That was like decades ago
With the death of mcstats bstats came, so big doubts in my part
like 70% of that is hypixel lol
- bstats 3 was released a year ago iirc
Hypixel doesn’t use bStats
why not
how would you know?
yeah that too
You have no idea what bstats is huh
yeah I really dont
its metrics you add to your plugins
Do you know what a decade is lol
that part I know
(or server software)
time to register to el bstats
so hypixel would have to use a plugin that uses bstats, or server software, which is unlikely because most or all of their plugins are made by their own devs
took them long enough
A long time - less time than a century which in turn is less time than a millenia which in turn is less time than an eon which in turn is less time than forever
most
they have plugins that they didn't make 🙂
But at least for 4 years now
A decade is bigger than 1 year
how dare they
They better be using my plugins 😉
I forget who it is, but we do have a person here who is a dev for them here
And they use paper iirc (or at least did for their SMP stuff), which also has bstats integrated
so Wonky was right
the author of spiget?
It's easy to switch metrics to false too
(So inventivetalent)
oh they made spiget, not surprising
must stay in java 8 for my plugin for 43 morons
lol
I just have 2 morons that are using J8
RCE them, be a man (do not reproduce)
I never supported java 8, scew em
I only have 1 plugin with bstats implemented and it's a trash plugin
4% is hardly a reason to keep using J8. They can use an older version of your plugin
It’s likely they’re running an older version of the server anyways
people using java 8 can't be trusted anyways
I think I compile against J16 now for VeinMiner but I could have easily done J17, I just had no compelling reason to
Which roughly correlates to the 4 people using versions that are 130-ish commits behind
I also compile aginst J16 ever since paper announced their Java 16 mandate for 1.17 (or 1.18 I do not remember)
I used to compile against j8 but now that I've been using j16 for a long time I just can't go back down 💀
imho, compile against the lowest version you need, but don’t be afraid to use new features
I use J16 features but I don’t use J17 features so I didn’t jump to it
I use a lot of j11+ features, j11 is like the lowest I'll willingly go I think
though before that I mandated Java 11 for a good year with surprisingly little negative feedback
11 was relatively popular for a while because it was LTS
I might make a public server version of a plugin I have sitting for private use on a server
hmmm do I want to though
Is it kewl
it's pretty kewl
whats cool?
Most people don't use obscure plugins
ok and
I prefer making obscure things over massive systems a bunch of people will use
humble
I made a huge system for moderation and worldguard region management on the server I work with and I disliked it in the end
Adelemphii makes my type of plugins 
Things I think are awesome in practice but hardly anybody would realistically use
I like making things that'd fit nice on a small smp
I always make things that could fit nice on a large smp server but they always end up on a server almost noone plays
true
I don't like bstats because it just reminds me that the only people who find my plugins are people who run servers like josue who get like 2 people on a good day kekw
^ tthis is a joke
I just always get addicted to numbers and graphs when I see them
Lies
That basically described my entire 7 and a half years experience making plugins
same lol
less players than servers lol
I'm also addicted to I18N-ing everything in my (newer) plugins even though everyone plays with the english locale
Meanwhile: me
at least it's going down. I still got 4% morons
lol wtf. I only got one plugin with less players than servers
See it's weird because VeinMiner has pretty much always had less players than servers. It being popular kind of shoots itself in the foot because people think it looks cool so they'll insta-install it for their new servers, then when their server gains no traction it just sits idle with no players online
bstats should add some metric like "average amount of players per server" that excludes all servers with no players
there are quite a bunch of servers that are only active in the morning/afternoon
Skoice is mainly used on small survival servers that stay online all the time with not many people on them
WorldEdit suffers this exact same problem
WorldEdit: 66272 servers 61334 players
wtf I would have thought that worldedit is on waaaay more servers
FAWE kind of skews that number
but 66k is still like 20x my plugin 
- some servers have metrics disabled
just checked your spigot, you have many plugins 😂
yeah I think it's 18 or so lol
but 2 of those are not plugins but standalone things
Every smp ends up there eventually
I kind of gave up playing smps with my friends
Because I would spend a lot of time building farms and such, but then other people would stop playing
i think my intellij is drunk today. it's "analyzing code" since 10 minutes now D:
And then eventually the server would shut down and all my builds would be for nothing
World download available but nothing to do with it
also wtf is this again
Give him what he wants: errors
For some reason my SMP got some players after I neglected it for a few months
auto-completed too quickly?
nah I typed this manually like 12 times
I ended up copy pasting the above thing and it accepted that. Don't ask, i have no idea
is github copilot worth paying for?
been using it for a long time I feel like I have gotten too used to it
looks like ima have to pay up
i dont know how expensive it is but if it's only like 10€ / months, I'd totally pay for that
it saves so much time
it is infact 10$/mo
that's totally worth it
i mean if you make 30$ per hour and it saves you only 20 minutes in one months, it's already worth it
hello after i moved to linux and installing intelij
I'm seeing really weird key bindings like shift + left / right arrow does the same thing that ctrl + left / right arrow does but in the keymap settings its the default one.
anyone knows how can i fix these weird things?
imagine only making 30$/hr
it also toggles the insert when i use ctrl + shift + left /right arrow
free for students 👌
just look at this lol
how does one actually use bstats
anyone know of a simple SQL browser? I need to view H2
hi, I have an error, saying import net.minecraft.server.v1_16_R3.NBTagCompound; saying error packing net.minecraft.server.v1_16_R3 doesn't exist
every one I find is rubbish
ULTRA YES
Tried DBVisualizer and I can;t even see the tables
don't run plugins using 1_16_R3 nms on versions other than 1.16.5 and 1.16.4
okay, its a plugin that, I am trying to add versions to, I have gone through build tools, it keeps on saying nothing exists
Are you depending on org.spigotmc:spigot or org.spigotmc:spigot-api?
wtf just tried those keys on pycharm and it was working fully well
Intellij 😄
org.spigotmc
1.16.3-R0.1-SNAPSHOT
use 1.16.5-R0.1-SNAPSHOT instead
Or 1.16.4-R0.1-SNAPSHOT if what I have heard from the other people is indeed correct
so take out org.spigotmc right?
nonono, just change the version string
So it'd be org.spigotmc:spigot:1.16.5-R0.1-SNAPSHOT
you might have used eclipse keybinds, but eh
nope
1_16_R3 = 1.16.5 and 1.16.4
idk why shift + left arrow works like ctrl + left arrow
what the hell is wrong with it
Ah that might be a linux moment
Ctrl + alt + left/right arrow for example changes the desktop
Why ctrl + left/right arrow was excluded idk
it isnt
invalid source release: 16 has anyone seen this error before
Java version?
Sure. You dont have the needed jdk version or an old maven plugin.
(or better said what version is your JAVA_HOME at?)
I think this shouldnt matter as Intellij provides jdks regardless of the host environment.
This is a compile time error iirc
"how to change java version" -> https://blog.jeff-media.com/common-maven-questions/
Yes
that does not do anything
If the JDK is missing for that version it won't compile no matter what
Ah you mean the IDE settings thing
I live too much in CLI world
oh you're using gradle
yeah haha
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '16' might do the trick
still throwing an error
Whle running it through CLI or through the IDE?
Quick question. is it possible for me to get to the spigot-api docs for specific versions of the game? say 1.18.1 or 1.19?
SQL is just too annoying to debug 😦
You can build them yourself with BuildTools. java -jar BuildTools.jar --rev 1.18.2 --generate-docs
I want to view teh tables and data, not have to write a query script to view it
ever heard of Alt+Enter?
also nice code organization btw
anyone knows how should i fix shift + left / right arrow not working in intelij linux?
it is working but its working same as ctrl + left / right does
whats a good item to use for a rainbow effect option in a gui?
for all the other colors im using the respective dyes
anyone knows where should i go to reset iintelij settings?
thats the only way that i have i guess
Let the button rotate through all colors
HM
Player player = e.getPlayer();
PersistentDataContainer pdata = player.getPersistentDataContainer();
if(!pdata.has(new NamespacedKey(plugin, "active_cosmetic"), PersistentDataType.STRING)) {
pdata.set(new NamespacedKey(plugin, "active_cosmetic"), PersistentDataType.STRING, "nil");
also btw (I am assuming I have to do this) like in item metadata, once you are done editing it you set it back with #setItemMeta so like, how would I go about doing that for a player?
You dont need to
nice
aight so im tryna do this and I created a bukkit runnable loop inside a new class so I can run it when I need to but the thing is, I gotta stop the loop when the player closes the inventory and I cant really figure out a good way to make it work
No idea how your design looks like. I would just have one runnable that is always running and where i add/remove the inventory tasks to/from.
In my current designs i never cancel any runnables.
is there a way that I can make EXPLOSION_LARGE bigger but keep that same particle?
I made a thread about it: https://www.spigotmc.org/threads/make-particle-explosion_large-bigger.570094/
How could i disable fireworks doing damage? By giving firework a meta and then checking if damager has that metadata doesnt work
you could always cancel the damage event right
The extra data of EXPLOSION_LARGE should handle this
ah ok
Is there a cause firework for entity damage event?
what do I put there though
can you link an example?
You might need to set the count to 0 like you would need to for setting the direction of a particle
there might be idk
Yes
how would setting the count to 0 make it bigger though
is there like an argument that you can use to set the size
Ah ok thats all i needed
declaration: package: org.bukkit.entity, interface: Player
preference I suppose, but there is different ways going about something and achieving the same end result
me I am more of a fan of not letting something run if it doesn't need to
is it just the extra that does it?
like for example: spawnParticle(Particle.EXPLOSION_LARGE, loc, 0, 0, 0, 0, 10); for a size of 10?
EDIT: nvm that didnt work its not extra
hm
I found this thread:
https://www.spigotmc.org/threads/increase-particle-size.504862/
but is there a way to do it in 1.19 withought using packets?
they also just toss in the "extra" float, don't they?
how exactly do you do it tho
the spawnParticle() method does exactly the same
my mind just cant figure it out
I tried the extra float it doesnt seem to do anything
Found it
block.getWorld().spawnParticle(Particle.EXPLOSION_LARGE, block.getLocation(), 0, 20, 20, 20);
if i wanted to implement chatchannels on my server, should i implement it like or or only save the users or channels on one side
class ChatChannel {
Set<KingdomsPlayer> joinedPlayers;
}```
```java
class KingdomsPlayer {
ChatChannel joinedChannel;
}```
2nd
then you'd have
ChatChannel - Base
GuildChatChannel
PartyChatChannel
then just send the message to that
wdym 2nd i mean would i save the joinedplayers and the current channel or only save one of those
and let polymorphism save the day
You want to save all of the possible receivers in that channel
and also save the channel in the user
thank you, but what are those 4 values? (0, 20, 20, 20) can you link me to the method you used with all of the arguments? arent those offset values?
declaration: package: org.bukkit, interface: World
What is the name of ServerPlayer class in 1.8.8?
EntityPlayer i guess
Thank you. So does offset increase the size of the particle? I thought it just made it offset of your location?
or is that only for explosions that it does size
i have no idea, all those particles behave very differently
all those spawnParticle methods are just a wrapper for the actual NMS packet
so what's called "offsetX" might be the actual X offset for some particles, but as you can see, also can be something different in another. it's kinda random lol
particles are so annoying
what i got so far lmao
agreed and thank you
yeah
you can use sth like
Instant.now().plus(Duration.ofDays(1)) or sth
and then use the appropriate conversion method
oh
ah
well that'd involve some local date stuff since 12am is not globally absolute
You could use the temporal accessor to just zero everything lesser than the year
wow you know what sucks?
but yeah, timezones are an issue
for (World world : Bukkit.getWorlds().stream().sorted(Comparator.comparing(World::getName)).collect(Collectors.toList())) {
System.out.println(world.getName());
}
this throws a NoClassDefFoundError in 1.16 when compiling against 1.17+
i reply to the wrong messagess all the time
just do forEach instead of collection them :D
Due to World.getName not existing or what?
hey so I have values in a string like BLUE, CYAN, RED, YELLOW, etc.
and I want to make it so that I can plug these in easily for Material.{String value}_DYE so I dont have to write 8 different if statements, would this be possible? (never tried it so idk)
No, I don't understand at all why that would NCDFE
nah, the method references is pointing to WorldInfo class (which world extends)
using a lambda instead works
Id say use LocalTime then morice or sth
so I have to add a comment to not use the quickfix to turn it into a method ref
thanks!
Alternatively use https://github.com/Geolykt/EnchantmentsPlus/blob/4xx/src/main/java/de/geolykt/enchantments_plus/util/ColUtil.java#L54 this bullshit
🥴
lol I think im good with the one line answer
But performance!
that kind of bullshit is exactly what I wanted to avoid
You only need to do it once either way
I haven't looked at the contents of that class for over 2 years now
first one works on all versions, second one only on 1.17 since World::getName() is actually a reference to WorldInfo::getName(). But intelliJ always wants me to "convert" it to the nonworking version lol D:
Why not use WorldInfo::getName()
because WorldInfo doesnt exist in 1.16
that's the whole problem lol
in 1.16, getName() is declared in World
in 1.17, getName() is declared in WorldInfo and World extends WorldInfo
smth like this?
millis is in millisecond resolution, nano in nanosecond resolution
Epoch is either AD or BC
(or some really obscure bullshit)
this is my weird fix to keep intellij from screaming at me
LocaleDate.from(Instant.now().plus(Duration.days(1))).atStartOfDay().toInstant().toEpochMilli()
EASY
Yeah
Oh right lol
Just some random typo from my side
why do you want epoch millis tho?
LocalDate.from(Instant.now().plus(Duration.days(1))).atStartOfDay().get(ChronoField.INSTANT_SECONDS) * 1000 would be the next-best thing I can think of
why not do that though?
Well @tender shard has turned on his big brain and his supporting versions he isn't compiling against
stackoverflow
Only issue is that +/- 1000 millis would get skipped
i see
at worst you have to add a static method for teh comparision and use that as a lambda
What is the caused-by message?
Chances are you could do LocalDate.from(LocalDateTime.now()[...] instead
I never really understood why Instant does not provide all the temporal fields
Ah yeah, then you need to specify a ZoneId
At worst just use ZoneId.systemDefault()
Nah, basically just LocalDate.from(LocalDateTime.now().plus(Duration.days(1))).atStartOfDay().toInstant(ZoneId.systemDefault()).toEpochMilli()
Basically we reuse my original approach, but with added hackery
I thought LocalDateTime would store it's ZoneId but apparently it does not
🤦♂️
Is World.getEntities() supposed to load chunks?
no
Yeah it shows the start of the day for UTC, but whatever
some1 know if is possible to make player dont see a particle ? (packets receiveded from the server)
Intercept the packet and cancel it if needed
Dividing nanoseconds with 1000 gives millis, yes
ProtocolLib would be the easiest
Beware - epoch means something comparable to era (so either BC, AD or Epoch (time since 1970))
i dont want use plib for that xd
Particle spawned from vanilla itself or your plugin?
entity particles
Yeah, that is based on the milliseconds of the current epoch
best thing i came accros today
nanos on the other hand are arbitrary
stackoverflow moment
arrow.getWorld().playEffect(arrow.getLocation(), org.bukkit.Effect.STEP_SOUND, Material.matchMaterial(effect + "_DYE"));
the mistake is probably something dumb but it is what it is
Hello, a person is constantly throwing my server when I start, the error that is displayed on the screen is the following.
Has anyone already had this problem with the InventoryClickEvent or knows how to solve it?
Once it generates the problem, it triggers an error with all plugins, and that massive spam causes the server to go down.
your error message compressed down to this
tell the authors of those plugins to check whether the clicked slot is inside the inventory's bounds
so I gotta find a green colored block now?
Thanks
how tf can a message be "not secure" if I literally sent it from console?
I wouldnt trust you either
cuz its not signed
also it'd be weird if you could report the console :P
hm weird. I enabled chat preview and still no message gets signed
tired of this shit
Bukkit.getScheduler().runtaskTimer().. no..?
the task itself works
I'm making a game where players can leave trails of blocks behind if they want to, everything will go away when the game is over, how do I go about this?
Currently, I just have a public static list in the listener class to store player uuid and materials, and simply listen to playermove at all times and if the player is in the listener, i'll draw the trail. Is there a better more efficient way to do this where I don't listen to players not involved in the game and not listen to anything when there is no game
well
theres some problem with the effect
you pass a Material right?
yeah I am
You will get infinite runnables for arrows that fly into unloaded chunks
check if isOnGround() or !isValid(), then cancel()
and use a BlockFace and not a Material for the playEffect
ok ok ok I just tested something
I put it back to Effect.STEP_SOUND and now it works perfectly
but the issue is that I want lesser particles and a less shitty sound
yeah because STEP_SOUND takes a Material, lol
just look at the Effect class and you'll see what data class i needed for which effect
Particles should be done by sending particles and not effects
I'll try that
Im just tryin out all the new stuff I can and learning how to use it as someone told me to
alright so particles are a success
I just need to color them accordingly now
If you want colored particles then you need redstone particles with a DustOption as extra parameter
BLOCK_MARKER is the best particle ever added
yeah I too love barrier blocks
but it works with ALL blocks :3
whats the name of the particles left by chorus fruit
Oh weird
its funny to play around with though lol
I can't really think of a good use for it
me neither
It only applies to blocks, right? You cant use ItemStacks
well it looks funny for flowers lol
lemme check for spawner
its really just the sprite of the base texture a block has
e.g. cobblestone stairs is the normal cobblestone texture
leaves are the uncolored version of leaves
etc
and it seems to always use the "bottom" texture
wait, no. for logs it shows the sideways texture
Is there a way to make missing command info in plugin.yml a compile time error?
Use a command framework that doesnt suck as much as the one from spigot
what would you recommend?
I also use ACF. But its really really hard to master.
Yeah redempt just recently finished his own. He almost baited me into writing the Brigadier implementation for it.
giant flowers lol
I cannot see it as a giant flower
yeah ACF is really annoying at first, but then it's suddenyl awesome
it's a huge flower in 30 meters distance! if you tell me something different, you're lying!
But as a flower item floating in front of me placed in an orientation to make it appear larger
Oh okay, this one? https://github.com/aikar/commands
yes
thanks
Have fun figuring out what the hell a context resolver does
And why you need annotations in Strings inside an annotation parameter
aka
@Values("@SomeThing")
okay lol
acf?
i love block markers
tbh most completion features are extremely easy
Is there a reason why my textures get jumbled up randomly? Rain looks like this lol
Well static completions really are. But having conditional async completions can be tricky.
until the moment acf starts taking a commandcontext as an argument 💀
why the heck is Material.LEGACY_RECORD_12.isBlock() == true
ikr
i always see shit like that in acf
in mixins, they just do for example:
@Inject(at = @At(...), ...)
what does this mean
org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.goodgoods.claim.Claim'
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:69) ~[spigot-api-1.19-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[spigot-api-1.19-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:393) ~[spigot-api-1.19-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:300) ~[spigot-api-1.19-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.loadPlugins(CraftServer.java:412) ~[spigot-1.19-R0.1-SNAPSHOT.jar:3544-Spigot-475f600-991aeda]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:224) ~[spigot-1.19-R0.1-SNAPSHOT.jar:3544-Spigot-475f600-991aeda]
at net.minecraft.server.MinecraftServer.v(MinecraftServer.java:966) ~[spigot-1.19-R0.1-SNAPSHOT.jar:3544-Spigot-475f600-991aeda]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:291) ~[spigot-1.19-R0.1-SNAPSHOT.jar:3544-Spigot-475f600-991aeda]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.ClassNotFoundException: me.goodgoods.claim.Claim
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.19-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.19-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:467) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:67) ~[spigot-api-1.19-R0.1-SNAPSHOT.jar:?]
... 8 more```
it means that you set your main class in plugin.yml to "me.goodgoods.claim.Claim" but that's not actually how its called
ok
oh wait
how do i fix it
ok
-> `me.goodgoods.claim.Claim' <-
Different quotes
bruh tab completion sucks if i want /cmd [on|off] [player] to work, would have to show on and off in the playerlist 💀
how?
Particle.BLOCK_MARKER + BlockData
version: '1.0'
main: me.goodgoods.claim.Claim
api-version: 1.19```
yeah, BlockMarker was added since LIGHT also works like this
it even uses the animations of those blocks, e.g. seewead
yes, minecraft 1.19 memory issues
you need a tab completer
everyone has it
bruh
Good god, is it a serverside or clientside issue?
@tender shard what do i put
version: '1.0'
main: me.goodgoods.claim.Claim
api-version: 1.19```
is that actually your main class name?
create a class that implements TabCompleter, then do getCommand("asd").setTabCompleter(yourTabCompleterInstance)
what's the name of your class that "extends JavaPlugin" ?
thank
do you actually have written ANY java code in your plugin yet?
yes
?paste it
here's a very stupid example. this will just always suggest "add", "delete" and "list" as tabcomplete:
public class ExampleCompleter implements TabCompleter {
@Override
public List<String> onTabComplete(CommandSender commandSender, Command command, String s, String[] strings) {
return Arrays.asList("add","delete","list");
}
}
of course you normally wanna either do it contextual, e.g. check what "strings" parameter already is, or if it's this simple, store the List<String> instead of creating it everytime
ok
but yeah the general idea is that you just implement the onTabComplete method
hows the drip lookin bois
I completely abandoned the idea of using colors as tbh they looked kinda lame aswell
I have adapted to particles
and THANKFULLY they all worked first try
claim
set "main" to "me.goodgoods.claim.ClaimPlugin"
it feels so good when code works first try :3
it just changes
back to the original
do not change it in your target folder
cursed config
never edit any files inside the target directory
above target, there's another resources directory
this is where you have to edit it
Drippin
i have issues running spigot.jar 1.16.5 with java 18
why do all heads (player_head, zombie_head, ender_dragon_head etc) have soulsand as texture lol
are the issues you are having maybe the following error message?
Unsupported Java detected (61.0). Only up to Java 16 is supported.
yeah
how do i fix it?
well
use java 16
or java 8
or java 11
it literally says "only up to java 16 is supported"
18 > 16
ok
im bored
is there an easy way to make players unlock custom recipes once they get one item in the recipe
me too
sure, you can just do Player#discoverRecipe
normally it should be enough to check for EntityPickupItemEvent, unless you also wanna trigger it for stuff like /give
see i was doing that but
there is no API way for that without reflection
you normally should identify your custom enchantments using a PDC tag instead
i have like 15 recipes
aaand?
api name?
and i didn't really feel like making a whole formal system 😅
alright ill get to work ig
https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/EnchantmentUtils.java#L30 You need reflection to register custom enchantments. here's how I am doing it, but remember, it's not really intended to do so
Avoid writing the same code over and over again - use JeffLib for your Spigot plugins! - JeffLib/EnchantmentUtils.java at master · JEFF-Media-GbR/JeffLib
And I'd opt to avoid doing that as well
Ideally you'd just make use of the PDC at this point
yeah you should rather use a PDC tag.
the oooonly thing I think where an actual custom enchantment is really needed is for the glow effect
unless there is API for that now
Which is annoying. HasFoil: true when, Mojang? :((
is Foil the glow thing?
Yeah they call it "foil" internally
yeah would be nice if that would be possible
I usually just register one "Glow" enchantment, then add the actual enchantments with PDC
not without a custom resource pack
the client doesn't have the translation for your custom enchantment
erm
I meant language pack, not resource pack
if you add the enchantment to the EnchantmentOffer in PrepareItemENchantEvent, then it should work for custom enchantments - it simply won't show them in the GUI
oh hm
then I fear there is no way
I've never seen any enchantment plugin that managed to show their custom enchantments in the table GUI
and I have like all the major enchantment plugins lol
Yeah no that is impossible since you would need to add them to the clients enchantment registry iirc
https://wiki.vg/Protocol#Set_Container_Property says that the enchantment IDs must be present
someone should edit the wiki.vg to say "it must not be present", and then it will magically work for everyone
Well it can be -1
With must be present I meant like somehow the client needs to convert from ID to the enchantment name
legacy code
Although yes it is surprising considering that a few mojang employees maintain(ed) that site
I think I might as well do something no enchantment plugin has done before then. Although that would require a clientside mod - and somehow circumventing the registry freeze that I assume exists
?jd-s
hekk u minecraft
Fandom is not the correct source for bukkit things - the javadocs are
But I don't think that I should convert EnchantmentsPlus from being the only enchantment plugin that follows the "spigot conventions" to being the only enchantment plugin breaking every convention out there - at least not just yet
Cannot invoke "org.bukkit.block.Block.getLocation()" because the return value of "org.bukkit.event.player.PlayerInteractEvent.getClickedBlock()" is null
So I'm working on a plugin that is supposed to check if the block you interact with matches the location of a stored block location in a config however I keep getting the above error whenever I interact with any block.
Anyone know what could be causing it?
probably because you interact with AIR?
^
when you interact, there's ALWAYS air if you're not stuck inside the block with the upper-body
and AIR is afaik not a block. at least not in most events
I right clicked the noteblock.
yea but
there's a block between you and this note block
which is null, because it's air
Ah so how do I circumnavigate this?
if(block =! null){
//do your stuff
}
Thanks
lol
afaik docs should even state that it can be null
I see that.
It's stopped the error, now I just need to figure out why it's not detecting that the location interacted with is the same as the one stored in the config.
you can also check if the click action was RIGHT_CLICK_AIR or LEFT_CLICK_AIR
that should also work
Okay so I'm trying to get the plugin to compare the location of an interacted block and the location stored in the config file. The locations match however it's not recognizing it. The comparison is this:
plugin.getConfig().set("direction", "up");```
The config location name matches and the loc is stored correctly as well. Any ideas?
Thanks
We're about to find out.
It works now thanks.
what event is it to get know when a player is killed by another player? (and be able to get the killer and victim player objects)
EntityDeathEvent exists
doesnt exist
cant even #getPlayer
I AM using PlayerDeathEvent
but that doesnt exist..
#getEntity#getPlayer exists
thanks
yeah I got it now
oh yeah I gotta make sure its instanceof player
just remembered lol
so the event will only run when a player is killed by a player?
- get the PlayerDeathEvent
- get the player
- get their killer and check if it's null
- if no -> player killed a player
or what are you trying to do?
Hey, is there any hacky way to remove that "hand swing up" animation when switching items?
if you also wanna know how the player was killed (with a sword, with an axe, with a potion, how much damage, etc), get the dead player's last damage cause and cast it to EntityDamageByEntityEvent
I kinda want to make animations with custommodeldata, wonder if it's possible
I can't seem to get it to work with negative mining fatigue potions
IIRC, yes. let me try something
Only difference is that like
mining fatigue can make it slower
but not faster
imagine if we completely ditched the client and made custom models with font characters
and emulate bobbing and such
Interesting idea. You could actually make the player invisible and mount him with an armorstand which has this custom model as a helmet or something like that.
Actually doable in theory.
I mean yeah but that's not applicable in a minigame
unless we can do some stupid shit like grabbing all the movement inputs and emulating movement
But you would have to do a LOT of work to include all animations like swimming
I just checked. I am in adventure, and I see the animation nonetheless. a PlayerAnimationEvent is also NOT called. I feel like it's really 100% client sided and you cannot get rid of the arm swing thing
Yeah we lose client side predictive computing. So all animations have to be made by using animated models
my issue is not with the packets honestly
Mining fatigue affects it
so there must be a janky way
same way how people add negative mining fatigue to prevent client-side block breaking anim
Where else would you live at 18? On the street?
I'd probably be living in the streets if I was 18 honestly
bro why is getItemInMainHand() NonNull but getItem(EquipmentSlot) Nullable
how would you know if getItemInMainHand had no item?
the main hand could also be empty though
I have no idea how many jobs you would have to work in order to afford a broom closet with < 25 here.
no job here pays above minimum wage
housing is 2 wages
yeah that, why would hands never be null but the rest be nullable
some mf probably did the nullable / notnull stuff across multiple days
and maybe potentially multiple mental breakdowns
lolz
I mean when i got my final degrees and get a good job in munich then i will probably be able to afford it. But prices here are currently insane.
nullability is not a minecraft thing
income tax percentages here are categorized by annual income
doesnt that depend on how many hours you work?
Having to null check is better than checking against a random new instance created by the getter
true yeah
saying full time more like
it's like
if you make more than 20k/year you pay like 36% income tax
make more than 30k/year and you pay about 48% income tax
- 4% tax for your employer
make more than like 60k/year and you max out around 60% tax
which it's why it's easier to just tax evade
I'm not in the us
41k€ in germany would be 8500€ income tax so about 21%
And free college
oh wow the free healthcare I haven't benefitted in the past 8 years
I went there once like a couple months ago
yeah exactly lol
"yo I haven't seen the doc since like 2010, am I good?"
lady just looked at me
"ye you're good"
and we left it at that
I mean it's good for those edge cases
like when I went to get my covid vaccine and the kid next to me passed out and smashed his face into the floor
right after getting jabbed
then like 20 people started calling their mommas
Thats a joke, right? If you are poor then you just die if nobody pays your bills.
my father has to "remargin" 70k€ of taxes for last year RIP lol
no idea if thats the proper word
free doesn't necessarily mean the best
my family is in permanent debt because they ran a business for a year and their accountant fucked up and got us like 80k in dept
F
combined household income is around 20k/year
sure, doesn't mean your level of care is.
this is germany's income tax. it's outdated but still kinda accurate
yeah this is kind of the definition of free. If you were billed then obviously it wasn't free to you
but free doesn't mean the best
goofy ahh stuff
its better then nothing that is for certain
But if the rich guys that own the hospitals suddenly stop giving a damn then nobody is going to help you.
The government is not inclined to provide you with basic medical care. Worst case you just die.
my family comes from a shitty village in the middle of nowhere, close to russia
don't care how big they are, they don't make money off providing free health care therefore you are not always priority unless you are in a critical state
they only got paved roads like 2 years ago
so it's fun to see evolution
also free healthcare here is kinda meh
like
We had a kitchen fire and my dad had to be flown to the central hospital
they charged him 2k for the helicopter ride
I'm european
so what's the point of all of this tax stuff
i love how the US asks you "have you participated in the 9/11 terrorist attack?" when applying for a VISA
#general maybe?
we're developing our uhh
did someone ask a dev question?
social skills
yes, I filled that form out on the plane
it's really one of the questions
at least it was back in 2008/2009/2010
paramedics in general are expensive to pay. Not everyone is a paramedic, but most people can be EMT's. But only paramedics and flight nurses can be in the helicopters
I mean who the fuck would say "yes, sure"
paramedics in most cases are not employed with hospitals as most hospitals do not own their own helicopters
I remember reading the term "paramedic" and "paratrooper" when I was young and like
"medics dropping into the field on parachutes?" was my first thought
that is what it comes from
As a European I'm very little tempted by going to the US
The culture there is just so unattractive when you see all these young people eating fat, "working" all day long but in reality filled with cigarette/coffee breaks, and the AVG low IQ of random people there
a friend of mine once was denied entry to the US when he was already at the airport in US. They asked him "do you plan to work here?" (he wanted to stay one year for exhange student stuff) and he said "no". then they showed him facebook posts of himself where he said "I already got a part time job secured, yaaay" and then he had to fly home again
albeit we don't need to airdrop them anymore
its an awesome place to visit but never would I wanna live there
but they are still called paramedics
smh my head
I'm planning on visiting the states next year
thing is you're making the visa process look scary
Yeah same
have you been here?
true but it's still amazing to see the great things that these "idiots" built
Been once for vacation yes
well i dont think the average american is stupid. it's just that the stupidest people are also the loudest
When i was younger i planned on visiting the states when i am older. Not so keen on that anymore.
visa process is really easy. Just don't lie and don't be posting stupid stuff 😛
my employer is gonna sponsor the trip so I have no reason to deny
Ye ofc it was exaggerated
when I was in florida I made a photo album of fat people using e-scooters at walmart
I still have it somewhere
Yes indeed I lookup to many major companies there
you're a couple years off of being double my age so I shall listen closely
Well not everyone works all day, and not everyone who has breaks smokes or drinks coffee. Not all of us eat out either. The majority of those in the US are not unhealthy obese people
whom do you eat out every day
my friend's mom
I have an uncle named gerd...
o
was he by any chance channcelor once?
lol...
gerd is an odd name
sounds like that is a yeas @tender shard
it's short for Gerhard i think
I mean techically gerhard
most of my uncles are just called "vanya" or "kolya" or "nicolai" or something russian
those are popular russian names
I just mean I don't like the lifestyle there, what i said was for sure over exaggerated
For me it's important to sit at meals and not eat at random hours, just like it's important to have efficient work with timetables and good enough salary
The education system over there is pretty shit too though, it clearly favours the wealthy kids
7smile's uncle doxxed
my uncle has a wikipedia page so I'm not ever gonna list my surname
^^
because the wealthy can pay for private school, but not all private schools are expensive either
school here just favors the dumb
i once had a funny discussion with someone on wikipedia because he critized by example java "stack" implementation
If you fail school often, they put you in some special program that pays you to go to school
If you're a bright mf, the teachers will try to cripple you
Public school has been and always will be for those that can't afford to pay for personalized education. It was the original intent
My dad actually also has one because he had some patents back when he worked for lucent technologies and texas instruments
this Herbert dude is a jerk
also he looks like a cyborg
I once got kicked out of class for saying "good morning teacher" and forced the board to host a 2 hour meeting about me because of it
Oof
All teachers voted against the bastard
I never really went to highschool and still passed my highschool exit exam 😄
I once got late to a science test because my dad crashed the van on the way there
teacher decided to be a bad cop and tried stopping me from leaving the classroom
to lecture me or some shit
so I jumped out the 2nd floor window and went home
that school was wack
its ironic that teachers want to discipline the child for being late when in most cases it isn't their fault.
if you are like a junior or senior in highschool it would be a bit different since you know you are close to being an adult
highschool is chill
specially towards the holidays
teachers are like
"the cafeteria opened, y'all can go have fun, I'm craving a coffee" and dismiss class like an hour early
the further in, the less effort people give
Fun story: I almost got the cops called on me because the teachers thought I was making bombs in chem class
in reality the other kids had been making deodorant bombs for years
exploding packets of milk in class
even just spinning / crushing bottles to shoot bottle caps with pure pressure
what happens if u order a shit ton of coffee and then
pour it all over the place
and run
you probably get to clean it with your tongue
fun thing with this, the teacher would had been the one to get in trouble since they are suppose to supervise 😄
is there any event of rename on anvil?
I've personally had about 4 fist fights in chem class
it's why I've failed chem for the entirety of this year
did you deserve it?
declaration: package: org.bukkit.event.inventory, class: PrepareAnvilEvent

