#help-development
1 messages · Page 682 of 1
It's in git, just build it
isnt dinner bone in git still
git never forgets
unless you squash your entire history and force push, but we don't talk about that :^)
We don't talk about Bruno either
what was that bug a mojang dev found that had something random in their git history
Toes
All of them
gime
why do you need toes
There was that story about how toes kept appearing in the git commits
Cause he's lack toes in toddler ants
ye
Nah it’s real
yeah
how did you hack github
and obfuscate your name
i think xilefian is telling us they like toes
who doesn't
Screenshoted. Reported.
Can't believe you'd betray Mojang like that. smh
That ss was larger than I thought it would be
its ultra hd 4k
^
where else is it gonna put all those pixels
Hello Im trying to create 2 swords 1 of which increase in sharpness every time it gets a kill while the other one smites the enemy every hit. here is my code: https://pastebin.com/NnftKqGj and the other file: https://pastebin.com/4RtN1J8t. It is not outputting an error, but it is not doing anything at all when the proper events are called
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
nvm
I realized the problem
this is pretty unnecessary
ur creating 2 instances of the exact same class
How do I temporarily allow player clip through blocks?
Spectator mode :p
I was making barricade mechanic that players can pass through.
When the player wants to pass through barricades, the server will send a block change packet.
So there's a way to allow player to do this?
They still would look weird
Im spitballing, but on the player move event, predict the player’s next position based on their current velocity
then check if that next location is your barricade of some sort
and if so, teleport them inside the block?
Any good way to create centered text in chat?? like ======={ Party }======= and so that the “=“ fill everything else
Hey there im trying to prevent breaking certain crops with BlockBreakEvent but when i break crops on farmland it turns the blocks below to dirt thus breaking the crop anyway. How do I stop that?
I've tried canceling BlockPhysicsEvent and EntityChangeBlockEvent
are you talking about the farmland turning to dirt when you step on it or something else?
Go the other way and replace the block wholesale if you cant find the event that triggers when the dirt breaks
actually i think i know what ur talking about
No, im referring to how when u break a seed or crop on farmland it now in the latest updates turns to dirt
can i see ur code for the cancelling of the blockbreakevent
But if it has already turned to dirt then the crop is broken so if I turn it back to farmland the crop is gone
its very extensive, this is a huge plugin so idk if it will help LOL
but i can sure
just the blockbreakevent part
Its very complicated unfortunately
basically i have reinforced blocks that take several hits to break
but when I break a crop once it turns the block below to dirt
thus breaking the crop anyway
is there an event for when a item is just added to the player's inventory?
No
not even pickup, since you can just add it using the playerinventory
there is an event for pickup yes
Might need to call in the more experienced individuals, @remote swallow
Normally you shouldnt worry about that
😄
Doing it when a specific item is in your inventory get buffs.
The crate system just gives you the item.
Ive asked ChatGPT and even it doesnt know hahah so im stuck
yo @remote swallow can u help technovision with his plugin
about the farmland thing
whats your issue? maybe i can help 😄
Check if the crate plugin has an api
epic will just ping me dw
making my own 😄
I need to cancel the farmland below a crop turning into dirt when the crop is broken
well its already made
its just for any case, i don't want to have to use a task ideally.
Illusion is a lot smarter than me
Custom event if its gonna be public
experienced is the right word
my family somehow managed to break the fibre cable so I don't have internet 
store opens in like 6 hours
ok then
This looks clean and ugly at the same time
why's everything a static method
you know what happens when you get lazy and drop the standards
i knowww but im literally almost done its just this farmland issue
and then its done
nah, not public, im just going to check every tick.
ideally could make that an event but its being used once
I just cant cancel this darn thing nomatter what event I use
server version?
1.20.1
?help
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous usernames, global display names, and server...
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
time to check nms
unless paperweight for 1.20.1 isn't out
because idk how to setup specialsource
It should be
Interestingly BlockPhysicsEvent fires when the block turns to dirt but canceling the event does nothing
it also fires when placing a seed
or u talking about decompiling?
drill holes in ur window to let the wifi in
this is going to take a while
oof sorry
wait @kindred pasture does your code cancel the block break every time the player attempts to break it
are u sure the error u were getting was not you just accidentally breaking the farmland
Well im testing it out rn and in 1.20.1 everytime u remove a seed or fully ready crop from farmland it always turns to dirt
it must be a newer feature cuz I dont remember that ever happening in the past
I also just tested it with EntityChangeBlockEvent and can confirm the event does NOT fire when breaking the crop above
it only fires when trampling a crop
like u are mentioning
oh hmm lemme try
what does FarmingHandler#removeCrop() do
removes the crop location from my database. The crops grow in real time thats why
like real life days
There does not seem to be a blockchangeevent
Just EntityChangeBlockEvent
but my prints arent firing so i assume it isnt related to the farmland thing
OH WAIT
IT DOES FIRE?
yeah i have no idea what's causing the issue tbh
man just made me download paperweight for nothing
no i still dont know the issue
ok ok
oh it wasnt evne the hoe it was just some random enderman in my world LOL
anyway i gtg sleep hope you find the bug
thnx man
but isnt that for just decay from lack of water? does that fire from breaking the crop?
ill try rn
Sadly it does not seem to fire when breaking the crop, only when decaying from lack of water source
WAIT
UHHHHH
is it not normal 1.20.1 behavior for the farmland to turn to dirt when harvesting?
I just jumped into a singleplayer world and its not happening....
lmfao one of your plugins is fucking with you
I was like "yeah it seems strange no one is talking about this"
right i couldnt find ANY google links on the forums about this
ok sorry ill go look at my code some more
thank u for the help
oh my god ur never gonna guess what it was...
im literally an actual idiot
all this time I had a leftover plugin from a trillion years ago called CropsRealism in my test server folder
BRUHHHHHH
idiot
is it possible to replace EssentialsX messages using listeners?
does anyone know if Player#showPlayer sends an equipment packet?
want to know if i need to manually send one
It should
Can you format a string but only allow specific color codes? For example making it so "&bExample &clol" only has &b formatted
Hello, since my server is running, I don't want to test. Instead I want to ask here for making sure. In BungeeCord, if I listen to the PostLoginEvent, what way is to get the player's IP? Can you straightly give me the method?
I ask this because I experienced something strange from getting player's ip while login in Bukkit.
there are 2 ways to get the player's ip in bukkit
There's a ServerPingEvent
that provides the real IP
If you're behind bungee, Player#getInetAddress will not return the player's actual address iirc
How can I get the max durability in 1.8 for materials, getMaxDurabiltiy doesnt work on non tools
Material.STONE.getMaxDurability() returns 0
changing player's skins would just involve intercepting the Player info packet right
outbound
maybe because blocks don't have durability
uhh
you can do that
So how can I let players input 0-6 for stone to get the different stones
But block 7+ to get the missing texture items
eh
ideally you just update instead of continuing to work on an 8 year old version
but you might be able to find out something within nms
Ive tried searching all the forums but cannot find anything
No one has ran into this throughout the 1.8 history?
But then that doesnt account for all other blocks
I am basically making a custom /give
yeah so you might need to manually map out these values
or just update to a version that's modern ffs
other method?
what exactly are you trying to do?
helping the guy out
that's 1.8 nms, not fun
lol
ChatColor.translateAlternate... i dont remember the whole name
regex for unallowed color codes, ain't that many
Hi, im in on some older version (1.12) and using PacketPlayOutGameStateChange to change sky color, they only real problem is the rain that can cause lag, i found a little fix to that using barriers in the top to obstruct the rain, there's a way to make the barrier ONLY visibile to a player and for the other not? (i suppose nms have some method) but i couldn't find something
(what im doing is an enchant for acid rain and setting the thing only to the player and just for him none else)
(a fix is using some effects to try getting the color with the smallest possibile value)
You could just set the biome
i just tried searching a method
like that but i didn't found something
why not cancel the weather change event?
is there a way to add PersistentDataContainer to all blocks?
because im using a packet to change the status and color
kinda makes sense
mfnalex has a lib for this
?blockpdc
Learn about CustomBlockData here:
https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/
thank you : )
Hi ! is there a way to code the plugin without keep restarting the server to test ?
You can hotswap or use the reload command
I have been using /rl since always
Some poorly written plugins may not work with it properly though
Why does my plugin not generate the .jar file using gradle, theres just a <pluginName>-dev.jar file in build.lib
so build/libs/ChiccenAPI-0.1-SNAPSHOT-dev.jar exists
but no build/libs/ChiccenAPI-0.1-SNAPSHOT.jar
Hey guys, does anyone know if it's possible to bring rgb color support to 1.8.8? (Even if it's hard)
No
It's a protocol limitation
Closest you can do is add server support for it and send rgb data to 1.14+ clients
help where to find a tool in intelji that will show in the code the method that consumes the most resources and time
premature optimization moment
Just focus on code quality and you'll go far, no need to crave that 0.001% performance boost
Now, if you care about code quality, go with SonarLint
it's a plugin
performance will come from profiling and finding points of failure in your code
Any java method that compiles down to invokevirtual is slow as it uses dynamic dispatch which often means a virtual method table is used
But like, that additional slowness is negligible and something no1 cares about
Is it a thing that shulker boxes can still be broken, when the blockbreakevent is cancelled?
Your font
thats got to be a crime
Hello guys, does anyone know something about Elemental Damage in Mmo Ites? Can Elemental Flat damage be upgrade in Item Upgrading settings?
can you help me instead please
waiting for the day someone makes an IDE plugin that autofills material names on yml files
because I don't know how to do it myself
but like you can just use the valueof if the names are consistent
that would be so good lol
It's not an enum
tbh how do you even code intellij plugins
it's a weird java thing
or just
make a map

no clue where I last used colors like this
probably something related to scoreboards
theres not rlly a good way to convert those from string to that
u would be better off just using rgb tbh
yeah
annoying ass thing is that if you don't pass an alpha value it defaults to like 255
and some parts of bukkit trip if they see an alpha value
or whatever idfk I just know that this saved me some exceptions before
no way this is better as a string
just look at the amount of new objects it has to create
why are you using a string builder for it
because i think it'll run faster than concatenating strings
where's md5 when you need him
pretty sure this is faster than the string counterpart
that is string
commandSender.sendMessage("§3Page " + page + " out of " + totalPages +
". Use §7/§c" + label + " help §8<§bpage§8>§3 to change pages!");
String.format("Page %s out of %s . Use / %s help <page> to change pages!", page, totalPages, label)
performance wouldnt be noticed here most likely
StringBuilder is O(1) with bigger overhead
String concat is O(n) iirc
and String.format is O(bsolete)
and takes forever to run
it was like
4ms vs 12ms vs 75 seconds
75 seconds sounds reasonable
go for it
i will use it fs
is it possible to send a Custom Hex Color Code or do i need a specific API?
Spigot's ChatColor has a ChatColor.of() method in which you can pass an integer
That being under the net.md-5 package. Not org.bukkit.ChatColor
Are auth systems allowed on spigotmc?
if i add a maven dependency to my plugin, how will i load it in server?
wdym by that
Can I add licensing system on my plugins
Yeah we don't allow licensing or DRM really
The only exception to that is that we do allow you to disable plugins remotely (usually with the NONCE id, or user id, whatever really). Though your plugin also has to work without a connection to the internet, so there's that
this plugin can show which method takes the longest and consumes resources
?
@echo basalt
Why is this unsafe?
(List<Player>) Bukkit.getServer().getOnlinePlayers().stream().toList();
getOnlinePlayers returns a list of ? extends org.bukkit.entity.player
so if i have my plugin open source, it cant have MIT license?
or any
He means authentication licensing i think
What? Sure you can
Oh, yeah
If you just want to sublicense your project that's totally fine lol
My mind jumped to DRM licensing
Collection<>
I'm gonna need more than that
It might not be a List
i wanted an explanatino not a 'how do i make this go away'
doesnt the stream.tolist deal with that?
Oh my mistake, didn't see the stream
It's still a capture of Player instances though. The placeholder generic still exists unfortunately
tbqh, the cast would probably work, IJ is just being anal
like tooltips say something along 'make this more generic'. Do captures not actually extend what they're extending?
also its maven thats complaining about this being unsafe, not IJ far as i can tell
Oh really? It rarely complains about source-level issues
Weird Bukkit design from back in the day
Was a discussion about it somewhat recently in here
Oh, actually, it was with you lol
i have no recollection of that
Does that work?
Hm
its one of the things IJ throws at me too
it might
ah yea this is the same exact piece of code this is about aswell
I'm not going to pretend to understand how this is any different from the other code but it works
Ye just create a new list from the returned collection.
Is there a reason you need a List over a Collection?
yes
then no
you can also Collection#forEach
by any chance can sending a message to a player be messed up if its line by line ?
though wouldnt this be the same issue? casting
Collection<snapshot<? extends org.bukkit.player>> -> Collection<Player>
i need to iterate over all players
just iterate, no need to cast anything
that makes no sense
so i have a List<player> to store one or all players
first comment, do not reference Players by their object.
*unless there's a reason to
like it's purely in teh scope of a method
right now yes
No. Holding reference to a Player object is totally fine if you need to invoke methods on a Player object. There's absolutely nothing wrong with that at all. So long as you're removing those references when the player leaves the server
If you're not operating on the Player object and you just need to check if a player is in some state, then hold its UUID
I'm def operating on the player
Then you're okay to hold reference to it. Just be sure to remove them on leave
Im keeping a reference by uuid->handler which holds the player object
that reference gets removed on leave
ok
You're all set then 
hey, so im creating chatcolor plugin that uses mysql. will it be okay if i check database on every player message send to check for data?
it will be laggy & not really good right?
a bit like this?
😄
just a poc of course. but i could turn this into a pretty helpful tool if you want to
Why do player instance becomes null when player leaves?
because the server creates a new instance
They don't become null, they just don't refer to that player anymore
Any operations you perform on it just kinda don't work
How can I spawn an NMS arrow?
I cannot use player#launchProjectile() because of this:
SSArrow extends EntityArrow
isn't Arrow an abstract
what do you mean?
EntityArrow is an NMS type but Player#launchProjectile() expects a Bukkit type
you're trying to make custom arrows from bukkit
Also, that
I know, so I was wondering how to spawn the arrow entity into the world
This did not work either, tho it does work for living entities
((CraftWorld) location.getWorld()).getHandle().addEntity(this);
this being the custom arrow
well, if you wanna make your own arrows from nms you can't just use bukkit for it
bukkit has been built to process the vanilla types
did you add the position?
and direction?
Yeah, this is the full method
public void launch(Player player, double power) {
Location location = player.getEyeLocation();
Arrow arrow = (Arrow) this.getBukkitEntity();
((CraftWorld) location.getWorld()).getHandle().addEntity(this);
setPosition(location.getX(), location.getY(), location.getZ());
arrow.setVelocity(location.getDirection().multiply(power));
}
so set position before adding entity to world?
yes
its a method I created inside the custom arrow class
and do it with custom spawn reason
it is not a vanilla arrow
and should be treated as a custom one
👍
so what kind of system should i set up?
you cache any lookups you need when the player joins
Is it possible to tell github dependabot to ignore certain dependencies? I need this declared only in my upload-to-central profiles and hence dont care about it
Its only declared as dependency inside a build plugin sooo doesnt matter at all
you can reply to the bot and it will not give any future nags
reply ignore or something
Ok thanks, But i gotta do that for all repos right?
yep
Aight thx
Would be nice if the official staging plugin would get fixed instead lol
Well its from sonatype not apache soo not really „official“
could someone explain me what the first boolean of this packet do? PacketPlayOutAdvancements
an example will be nice
probably clears current progress
may be could you explain what does each fields do?
so like ? if I set toEarn and toRemove to null
it will equal to reset?
this is my attempt to remove all the advancements that player has earned
why do you need nms for that
ermm for not showing the toast?
as I'm saving advancements for each world
so I need to add and remove everything without showing 100+ toast
the packet might still show toasts
nope it doesn't
also are you on 1.17.1 or higher
I'm too lazy to use mapping :l
Doesn't the client request the achievements each time they open the menu? Or is that only with statistics?
How I can disable server's no clip prevention to specific player?
the server has no clip protection?
Nope vanilla's
Sounds forkey
this is my problem in case you have any better idea
is there any reason you are saving per world
Maybe that's the idea of his plugin?
if only few interface implementations need a certain method, is it better to use abstract or an empty method body?
but theres advancements that require both worlds
it's there to reduce complexety in other methods, and to not have to change things in other classes (for example event hooks) if i make a new interface implementaiton
Well, what if it's for multiverse? Like, there are three survival worlds, all those have the nether and the end
that would be very painful
but "send" is much easier to remember than ".c.a" lol
and you should use bungee instead
Wait, doesn't mv-inventories do that or whatever it's called?
what method is it?
just add a default empty method
yea sounds about right
that's e.g. how JDA does it
👍
in JDA there's the abstract ListenerAdapter class that has a ton of void methods to listen for specific events, which all have a default-empty implementation so you don't have to override all of them https://javadoc.io/doc/net.dv8tion/JDA/latest/net/dv8tion/jda/api/hooks/ListenerAdapter.html
Is PlayerListener a thing in modern bukkit api?
wdym
In b1.7.3 it's used to do events
I has a lot of empty methods that are events that you can override
Just curious if that got removed
Because there still is an egg throw event from back when shooting projectiles had hardcoded functions and events for each
@young knoll egg
EggThrowEvent makes sense because you can set the number of animals hatched etc bla bla
bukkit 1.0.0 had Event.Categories and Event.Types, I wonder what that was used for
Erm that is a feature :l
feature of what
:l that is not what my client want
They save everything for each world instead of using bungeecord
I got everything done :l
But the problem is
The cache of advancements is still there
Mean if you earn the adavancement in a world
You cannot earn it in another
Unless you relog
time to go browse source and see if theres a specific reason for that
I believe I undercharge this 🥲
declaration: package: org.bukkit.advancement, interface: AdvancementProgress
Hello, I dont get remap working, can someone help me? This is my project setup (modules):
- v1_19_R3 (Java 20 & 1.19.4-R0.1-SNAPSHOT remapped-mojang)
- v1_20_R1 (Java 20 & 1.20.1-R0.1-SNAPSHOT remapped-mojang)
- core (Java 20 & spigot-api)
- plugin (Java 20 (just to combine all above)
In the 2 nms modules I have copied the remap plugin and changed the version to the correct NMS version. But on compiling I get the following error: Unsupported class file major version 64.
How can I fix this?
husksync can sync advancement between bungee servers and apply the advancement without showing a ton of toast messages, maybe look at their source
upgrade maven-shade-plugin to 3.5.0 for your plugin module
btw if core uses java 20, then all servers require java 20 too
if you wanna support 1.19 and 1.20 you should stick to java 17
They all have java 20
Oh yeh the reason I don’t use mapping because it is slow :d
well ok, still your issue is the outdated maven-shade-plugin
Now I have this in plugin module:
<build>
<finalName>CosmeticTest-${pretty.version}</finalName>
<defaultGoal>clean install</defaultGoal>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<rules><dependencyConvergence/></rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>false</shadedArtifactAttached>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
And still not working 😦
do you have the maven-shade-plugin declared in other pom as well?
run mvn clean install -X on the parent pom and upload the full log
maybe that error is also coming from an outdated specialsource plugin - hard to say without seeing the full maven log
how are they "slow"? o0
it's remapped at compile time, you'll end up with a .jar that uses spigot mappings
anyone know what this is?
you refactored the method to take in an event and now IJ tells you all the places where you use the old method so you can update them
🐈
//Interface
public void damageEvent(EntityDamageEvent event){}
//Implementer
@Override
public void damageEvent(EntityDamageEvent event){
event.setCancelled(true);
}
Updated specialsource-maven-plugin from 1.2.3 to 1.2.5 and now its working 🙂 Thanks alot!
np!
@tender shard this aint a refractor
then idk what IJ is trying to tell you
ah ok
why do you have your modifier and method name on different lines
cuz thats how im used to doing it
compiler removes all line breaks anyways
java is just one giant line of text
oh nvm thats just because it doesnt fit on my screen
Not sure why but is is indee slower by some seconds
you mean compiling is slower?
obviously it takes a tiny bit longer to compile as it remaps the .jar
on the other hand you can use proper method, field and class names and when a new version comes out, all you gotta is change the version in pom.xml instead of manually changing all the obfuscated names
well at least in 99% of cases you won't have to change anything besides the version
isnt it normal in testing you run a mojmap server, when you finish you run obsfucated
running mojmap during dev is nice for properly debugging stuff when shit goes south
and 🤓 technically it is faster to compile
technicallllly compiling should be equally fast, remap is done after compiling on the .jar directly runs away
i don't see how maven changes anything
yeah that makes little sense
yes sure, however writing code is like 20 times faster
Before using modules :l I was using reflections
@eternal night
?
event.getView().getPlayer() returns the inventory owner on InventoryClickEvent?
instead of using Bukkit.getOfflinePlayer(); since its deprecated what do i use?
What do you want to do
im getting a player balance
ermm nope
it show the inventory which that player is viewing
which is offline
help
ill just store the data i guess...
I add a plugin to spigotMC but for some reason the photo is not loaded there
i try add
this https://ru.imgbb.com/ - image container
Бесплатный хостинг картинок и фото обменник, загрузить изображение, фотохостинг. Предлагает решение для загрузки картинок на форумы.
but not work
spigotMC not load my image
why dont you upload the pic directly to spigotmc
then how will his embedded virus ever work
lol
hmm
my resurce publick
I want the actual playername tho
ok?
so u do Bukkit.getOfflinePlayer(uuid).getName()
or getdisplayname or whatever the method is called
I have no idea i tried loop etc but crashes, how can i make if the block that the player got is Air to check the one under it
https://paste.md-5.net/sidumomede.cs
block.getRelative(0, -1, 0) to get the block below a certain other block
but then if the relative becomes air the next one will not be get
and so one
so until it hits a block
what is that whole code supposed to do in the first place? I don't really understand what your goal is
rain hitting the block and then make it disappear (acid rain)
Hi, a question. How can I detect if the player use the portal in the end or in the overworld? using PlayerPortalEvent
Is there any form of IntelliJ plugin / tool or whatsoever that integrates a run configuration which builds your plugin to a server and runs that server?
PlayerPortalEvent is only called "when a player is about to teleport because it is in contact with a portal which will generate an exit portal." so only in the overworld
so if a player uses the exit portal, it'll just be https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/EntityPortalEvent.html
declaration: package: org.bukkit.event.entity, class: EntityPortalEvent
which has a getFrom() and getTo() location
Can someone help in #help-server
just use the maven-exec plugin
how can I edit the description of my resource in spigotMC (description, etc.)
example
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<workingDirectory>/path/to/my/server</workingDirectory>
<arguments>
<argument>-jar</argument>
<argument>spigot-1.20.1.jar</argument>
</arguments>
</configuration>
</plugin>
Alright thanks
by clicking on "Edit resource"
if it's not there, you don't have 2FA enabled
i have no clue what you're asking
the item in the yellow circle slot number is 40
and the next item to that, its slot 9
wanna a screen share to explain?
What is the condition to check?
you're confusing slow numbers with raw slot numbers and or the inventory's slot numbers with the inventory view's slot numbers
to check what exactly?
if enter or exit to or from the end
if sth is overworld / end etc, check the world's Environment https://hub.spigotmc.org/javadocs/spigot/org/bukkit/generator/WorldInfo.html#getEnvironment()
declaration: package: org.bukkit.generator, interface: WorldInfo
uh lemme check
were was demm this button
I have shown you
ngl im getting extremely fucking tired of trying to make gradle work for the first time. why the fuck would it NOT work if all i did is created a raw project in intellij?
psa i don't know why i'm running gradlew.bat instead of gradle build, but it should work either way because i applied zero modification to the out-of-the-box gradle files
?paste
https://paste.md-5.net/coyiverevi.makefile build.gradle.kts if that's needed
do you even have a gradle-wrapper.jar?
run gradle wrapper in your project
https://paste.md-5.net/gohilehigi.sql this shit happens when i try to sync the project
yeah the screenie of the zip archive is that exact file
and running gradle wrapper throws the same error
that i attached
i even installed gradle system-wide in hopes it'd work
build systems lately been fucking me up, first maven on my pc, now gradle on my laptop
almost if there's some unified hatred
its not working with END_GATEWAY can someone help me ?
@EventHandler
public void enterPortal(PlayerPortalEvent e){
System.out.println("Enter Portal");
if(!e.getCause().equals(PlayerTeleportEvent.TeleportCause.END_GATEWAY)) return;
e.setCancelled(true);
e.getPlayer().sendMessage(hex("&cYou cannot enter through this gate"));
}
i not have this
I have already mentioned to you why this is the case
THX
oh i see
having an uncontrollable desire to switch to rust and python permanently xD
@EventHandler
public void onPlayerPortal(EntityPortalEvent e) {
if (e.getEntity() instanceof Player) {
Player player = (Player) e.getEntity();
Location enter = e.getFrom();
Location exit = e.getTo();
World.Environment enterEnvironment = enter.getWorld().getEnvironment();
World.Environment exitEnvironment = exit.getWorld().getEnvironment();
System.out.println(enterEnvironment);
System.out.println(exitEnvironment);
}
}
Why it does not work??
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
does it not print anything? if so did you register the listener?
getServer().getPluginManager().registerEvents(new End(), this);
yeah, it doesn't print anything
heads up you should give more descriptive names to your classes and variables (e.g. EndSomethingListener instead of End & event instead of e) so that your future self can spend less time trying to figure out what the fuck this means and also to avoid ambigious naming (like is e an event or an entity)
How is strength handled in the game? There's neither PotionEffectType.POWER nor PotionEffectType.STRENGTH
evt ety epl
increase_damage i think
please
yea thats probs it
and similar stuff for enchantments (damage_all iirc)
makes perfect sense, seeing as there are multiple types of protection
i mean protection_all would be better of course
but protection_environmental sounds cooler
Sounds like more to type, thank god I have the key known as "TAB" to autocomplete my stuff
i mean yeah most people code with intellisense
so it does not really matter
as long as it fits in the screen's width
thx, but why it doesn't print anything?
@EventHandler
public void onArmorEquipEvent(ArmorEquipEvent e){
if(e.getNewArmorPiece() != null && e.getNewArmorPiece().equals(HealthAbilityItem.createHealthChestplate())){
Player player = e.getPlayer();
giveExtraHearts(player, 4);
}
if(e.getOldArmorPiece() != null && e.getOldArmorPiece().equals(HealthAbilityItem.createHealthChestplate())){
Player player = e.getPlayer();
takeBackExtraHearts(player, 4);
}
}
private void giveExtraHearts(Player player, double amount) {
AttributeInstance maxHealthAttribute = player.getAttribute(Attribute.GENERIC_MAX_HEALTH);
double currentMaxHealth = maxHealthAttribute.getValue();
double newMaxHealth = currentMaxHealth + amount;
maxHealthAttribute.setBaseValue(newMaxHealth);
player.setHealth(newMaxHealth);
}
private void takeBackExtraHearts(Player player, double amount) {
AttributeInstance maxHealthAttribute = player.getAttribute(Attribute.GENERIC_MAX_HEALTH);
double currentMaxHealth = maxHealthAttribute.getBaseValue();
if (currentMaxHealth > player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue()) {
double newMaxHealth = currentMaxHealth - amount;
maxHealthAttribute.setBaseValue(newMaxHealth);
if (player.getHealth() > newMaxHealth) {
player.setHealth(newMaxHealth);
}
}
}``` giveExtraHearts method is working but takeBackExtraHearts is not
Also there is no error in console
are YOU ACTUALLY FUCKING KIDDING
- maven will not find the proper entry point for some reason
- gradle does not work and the error is barely googlable
- intellij build system does not work with cyrillic characters??????????
im fucking done with this shit im never coding on this laptopt again
7 days before i am back to my pc
it's because you still refuse to use PDC tags to identify your custom item
instead you randomly create a new item everytime and check if the meta equals
I want to ask is there such a PlayerTeleportEndGatewayEvent because I'm trying this event PlayerPortalEvent but it's not working properly
which they will rarely do, e.g. it won't if they item ever got damaged
I have explained this to you 3 days ago already
Isn't it because they're checking if getBaseValue() > getBaseValue()?
Which would never be true
Should be currentMaxHealth = getValue()
the ONLY proper way to identify your custom item is a PDC tag, period
ahh
🤦🏻♂️
On older versions you gotta use NBT :(
if your item gets damaged only once, the Item you recreate everytime during that event will never be equal to the actual equipped armor's meta anymore
i doubt that my ArmorEquipEvent runs on such ancient versions in the first place
The build system should work with cyrillic characters, just make sure your encoding everywhere is UTF-8
yeah it works perfectly at my home pc
As for Maven and Gradle you'd have to provide the actual errors
If the problem is indeed PDC, is it possible to have giveTakeBackHearts() not running while giveExtraHearts() is running?
Кириллица! (Kirillitsa)
for gradle you can scroll a bit above
and maven is just fucking around for some reason with no errors, i'm yet to figure it out
maybe just use a normal username
i'm contemplating being born in a country where they use cyrillic
i have no idea why i used my actual name
i reinstalled in may and i still used the name
instead of something like a nickname
Having different alphabets is a pain, but I like cyrillic more, because more letters
i know two more alphabets which are hiragana and katakana
can't miss the opportunity to flex
Hungaria and katana
well they aren't exactly alphabets but who gives a shit
yes precisely
@EventHandler
public void onEndTeleport(EntityPortalEvent event) {
if (event.getEntity() instanceof Player) {
Player player = (Player) event.getEntity();
System.out.println(event.getFrom());
}
}
I really need help. It does not print in the console
why are you not debugging the outer scope
why are you doing it in the innermost scope
What if you use regular PlayerTeleportEvent
it kinda defeats the point
Wait, what if I made a minecraft horror map using a plugin
what about it
I've never seen a map being made like that
I once made an adventure map with a custom plugin. People were too stupid to run it as they didnt understand it required craftbukkit (was a looong time ago)
Oh lol
I was making a b1.7.3 gamemode creative plugin recently
I like the events there
someone made a backrooms plugin here before
And people were too stupid to host a server?
huh?
huh
Or was it like for a public server
How do I detect which world the event was called from?
for their own server im pretty sure
Makes sense
getFrom() and getTo()
Can anybody educate me on how psychodelic horror maps work?
someone should make a darkroom plugin
Lol
Hi I want to ask is there such a PlayerTeleportEndGatewayEvent because I'm trying PlayerPortalEvent event but it's not working properly 
just try the regular PlayerTeleportEvent then check the cause and the environment of the getFrom() or getTo() world
not sure what an end gateway is
is it the thing found in strongholds?
no
well they are all bedrock things
then check if getFrom() environment is END
it will be end on both
why
i don't know, they suck
The event does not work only when I enter the end portal or nether portal
just nether portal and end portal work fine 😦
but, PlayerTeleportEvent works only from overworld to end
because if I enter the portal from the end I don't read anything in the console
Yeah you need the PlayerRespawnEvent
Is World#getFullTime() measured in days?
ticks
Oh so thats going to be a huge number
yes
The player despawns during the credits scene and is respawned in the overworld
getFullTime() / 24000 should get me days (talking to myself, thanks!)
PlayerTeleportEvent works just fine on spigot.
How do I check if the respawn is due to the portal or due to a death?
You check the respawn reason
people are talking about two different things
try the end portal
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/player/PlayerRespawnEvent.html#getRespawnReason()
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/player/PlayerRespawnEvent.RespawnReason.html#END_PORTAL
declaration: package: org.bukkit.event.player, class: PlayerRespawnEvent
declaration: package: org.bukkit.event.player, class: PlayerRespawnEvent, enum: RespawnReason
Alex got you confused with the other person talking about end gateways
the normal "go back to overworld" portal indeed calls PlayerRespawnEvent
yeah it's a bit confusing, some people were talking about those 1x1 portals in bedrock
cause: ENDER_PEARL not END_GATEWAY can you try plesae
Yeah the ender pearl is teleported through the gateway
that's because I missed the portal. On my second screenshot you'll see it's END_GATEWAY
the tiny 1x1 portals are PlayerTeleportEvent with END_GATEWAY and the normal "back to overworld" portal is PlayerRespawnEvent
see here
End portal?
I'll make another video to get rid of all the confusion lol
TL;DR:
The tiny portals that TP you within the end are PlayerTeleportEvent with cause END_GATEWAY
The bigger portal in the middle of the end that brings you back to surface is PlayerRespawnEvent with respawnReason END_PORTAL
so many tabs lmao
Thank you all
How does he know which tab to use?
I'm used to macOS where I can easily search through tabs with cmd-space
that's why I never close them
in chrome it also works somehow
I think ctrl+shift+a
eah it's ctrl+shift+a
Hello guys! I am trying to make a plugin about storing UUIDs on config file when a player joins the server. I implemented the code but the config.yml file is blank/empty. Can I post my code here and assist me ?
?paste
Thanks for the link!
Here's the code:
https://paste.md-5.net/nayepamego.java
How am I doing so far ?
why doesn't spigot allow you to control (for example) cow's AI
why do you append a dot at the end of the path
that's not a valid path
remove the "." at the end of config.set(...)
Because nobody made a decent api and integrated it into spigot yet.
You can do that with NMS though.
because you haven't pull requested it
Oh, I see what you mean. Let me try that.
I know but I want to avoid using NMS
JeffLib allows you to write custom AI without NMS
why is all your stuff named "Jeff" Alex?
check the ai packages https://hub.jeff-media.com/javadocs/jefflib/
package index
Is it your boyfriends name?
that's my company's name
its name is jeff
I see. Why did you pick it?
thank you
So it was for the meme.
I'll look into it
basically you can just extend CustomGoal, and then you can use EntityUtils#getGoalSelector(someEntity) and add your own goal
CustomGoal has access to all movement things I considered useful, which is the JumpController, MoveCOntroller, and LookController
(certain basic goals are included in PathfinderGoals, e.g. TempGoals, AvoidEntityGoals and MovetoBlockGoal)
I did that, and the config.yml file is still empty. Are the rest of my config functions ok?
thoughts?
verii cool
I NEEEEEEEEEED ITT
haha
DIAMOND_sword 🤓
isnt that what illusion wanted
uppercase = yuck. using resource location = good
This is the code so far:
https://paste.md-5.net/teroxenepo.java
i can give it to u if u want. cba actually publishing it tho
Your instance is null 😭
Right, why didnt they send the stacktrace
idk
this is super cool, but i now have the config file inside java
😄
I used the instance variable to save the config in the Main Plugin class. Is this why it's not working ?
Would appreciate it if you did. :3
„Instance“ is always null, you would get an exception in console
So, what should I do now ?
You often need a reference to your main instance (the instance of your class that extends JavaPlugin) in some of your other classes. There’s two basic concepts for this. Choose whichever you like more. Method #1: Static Getter First way is to create a static method called getInstance() or similar in your main class. You...
Let me read the article and apply changes then
It worked perfectly! I understand the concept of the instance now thanks to your article! Bravo!
great! :3
Saved the article to my bookmark for future projects.
🤑
if any1 is interested u can get it here https://github.com/BertGarretsen/Mccc
i cant be responsible for slow ide's or more memory consumption though XD. since at startup it loads a bunch of shit. but for me its fine tho
@echo basalt
is there i way to check if end crystal is active like that
idk what the "bar" is but if it's the "beam target" then just check if EnderCrystal#getBeamTarget() != null
I was gonna suggest checking the DragonBattle.RespawnPhase since that process is specific to respawing.
yeah its work fine thank you (:
why does Player.setAllowFlight(true) cancel fall damage
probably because they could start to fly anytime any way
All javadoc comments are in Bukkit and not CraftBukkit right?
Meaning I would only need to edit Bukkit directly?
yes
I don't need to do anything like running applyPatches for bukkit do I?
correct
2k typos lmfao
yeah well IJ recognizes many "valid" words as typo, e.g. "to despawn"
I think most of those are jsut minecraft words that I haven't added to the dictionary, but the gramatical errors are something else. Just reading some of them are something else.
^
There are some errors I’ve seen
yeah e.g. the claim that md5's mixtape is fire while it's actually lame asf
Some people that have made PRs are ESL and MD doesn’t go super hard on grammar checking the javadocs
ESL?
English as a second language
Ah
usually people who got english as second language are better at spelling though lol
"should have/should of", their/they're/there, etc
I’ve noticed a lot of the people in my college course that are ESL would leave out small words
Like of/do/etc
Can't blame non native speakers for not getting all the nuance. English is hard.
https://www.youtube.com/watch?v=SfhKldRKmo8
Is this the final boss of English poetry?
The Jeaney Collective:
https://www.youtube.com/@JeaneyCollects/join
Patreon:
https://www.patreon.com/jeaneycollects
Twitter:
https://twitter.com/JeaneyCollects
The Jeaney Collection:
https://www.thejeaneycollection.com/
Images:
https://crimsun.tumblr.com/post/2999167799
https://unsplash.com/photos/...
kinda hard to check if one can correctly pronounce it if the dude is literally reading it out loud lol
True, but I would assume that people who are learning a langauge would need to hear how it's pronounced. When English has several words like what's in the video, it probably makes it harder to understand what words to use.
I use a lead to lead my pet chunk of lead
there they're their, where were, read read
Hi, I have for loop and taskTimer in it.I will make the same action in the taskTImer with different args in this for loop. And my question is how can I make the for loop wait until the taskTImer is done.
why don't you just run the loop in the task
I am not sure if it would work. Here is my code https://pastebin.com/zA390gtv
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
If I pass an event to a function using private void handle(Cancellable event, Player player, Entity entity) { event.setCancelled(true);
will it cancel the event
if done synchronous, yes
is there some java utility that lets me provide an object as argument but that object gets initialized lazily?
for example only after an if check
or i just gotta use a supplier?
A Supplier?
yeah thats what i was thinking
Is there an event called when a player places an armor stand
BlockPlaceEvent
are you sure? armor stands are not blocks
I'd assume placing them would trigger block place event though
if they don't we'd need an event for that
otherwise EntitySpawnEvent
Yea didnt trigger from BlockPlace
check PlayerInteractEvent / RIGHT_CLICK_BLOCK / itemInUse.getType() == Material.ARMOR_STAND
if you need the player
does anyone know how i would create a particle effect similar to this: https://www.youtube.com/watch?v=NRleb71KvF4&t=13s
Does anyone know how one can simplify Math.sqrt(2) * Math.sqrt(x / 100)
I'm lazy, thanks
there's a texture pack involved, you might wanna find it beforehand
learn math or ask wolfram alpha
for something that easy even chatgpt would work
The thing about learning maths: I should know that
It's probably the same as sqrt(x / 50)
Yep
see, knew you could do it
i don't care about the texture pack i'm talking about the particle crosshair thing how would i create that in a plugin
nah i already have my own texture pack for what im doing im just trying to figure out how i would make a crosshair like that
yes, sqrt(a)*sqrt(b) = sqrt(a*b)
well unless you care for the negative value too ofc
Its pretty horrifing that I'm doing the Abitur in the Mathe LK next year and I barely know these kind of things
What's even worse is that I'm the best of my class 💀
at least wolfram alpha thinks so too so I guess you're fine using x/50 lol
does anyone know how i would do this?
I just use the old trick in the book and substracted these two values and get a pretty good line of y=0
is it possible to make text at a specific location on ur screen?
not truely
I saw someone do it but im not sure how they did it
for code readability it could be better to keep it as the 1st form tho
Probably with whitespace
wdym with "specific location"? you got a screenshot?
one sec
you can never be sure about GUI scale, FOV etc of a player so text entities or armor stands will never truly work, nor will action bar or bossbars unless you use a custom resource pack and even that would be affected by gui scale
Well the orginal logic was
this.maxY = 0.8F * (float) Math.sqrt(starCount / 100.0F);
this.maxX = this.maxY * Space.aspectRatio;
but I simplified it to
this.maxX = (float) Math.sqrt(starCount / 50D);
this.maxY = this.maxX * ASPECT_RATIO;
not much of a difference aside from one less multiplication
would be helpful if you'd have sent the whole screenshot
alr 1s
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
!verify
Usage: !verify <forums username>
Smh
from DMs
that's a texture pack innit
or a mod even
Guns based
ye
You can achieve that with resource packs
must be a texture pack
ill have to look into that then
- optifine i think, if you want the ammo count and all to change
No you don't need optifine
you sure that isnt a stream overlay
It's 100% doable
mhm
!verify RunTellObama
A private message has been sent to your SpigotMC.org account for verification!
yess i got the blue name basic human rights unlocked
does anyone know how i would create a particle effect similar to this: https://www.youtube.com/watch?v=NRleb71KvF4&t=13s
Today I will tell you everything about the ARCHER ABILITY TREE on WYNNCRAFT
Subscribe for more content ▶ https://www.youtube.com/@celestialsorcery
Join Wynncraft now, a vanilla mmorpg server I'm playing on:
Website ▶ https://wynncraft.com
IP ▶ play.wynncraft.com
Background Music used 🎵:
Anthem of Rot (Decrepit Sewers) Wynncraft OST by @Mindl...
It's a circle with a bunch of lines
yes but how do i make a particle circle that moves relative to the direction the player looks
I really want a 3d printer to print minis for my dnd games and for my own entertainment but I'm a shit modeller, and even worse painter and most of all absolutely do not have the time to do anyt step of this
but man do I want it
i swear every time i ask for some help i feel like im getting somewhere but then they just stop replying
first you make a circle then you raycast from the player's sight, it's basic stuff
you make a bunch of vectors and rotate them around the player's yaw
would anyone know how to tell me in which version Minecraft started to support BaseComponent in messages?
it was 1.13?
prob 1.14
yes, sorry for the mistake. I would like to know about gradient messages
hex colors were added in 1.16
thxx
common 1.8 W
1.8 W?