#help-development
1 messages ยท Page 55 of 1
which was said here
that wouldn't work
bruh it will try to do that on the servers machine..
it opens on the server
lmfao
nice
good work!
I tried to rewrite a part of my plugin
works lol
went fuck it and didn't touch it
not sure about ingame
me once a week
the logic is so flawed
fuckin BLOOM ai can't even understand tf this means
(it's trained on a couple hundred B parameters)
eek
the worst ones are where you have intertwined your classes into other systems
so have to backtrack EVERYTHING
Player player = event.getPlayer();
World world = player.getWorld();
if(!MainConfig.Elimination.isWorldAllowed(world))
return;
if(event.hasKiller() && event.getKiller() instanceof Player killer) {
HealthUtils.SetResult result =
HealthUtils.increaseIfUnder(
MainConfig.Elimination.environmentHealthScale * 2,
MainConfig.Elimination.getMax(),
killer,
true
);
if (result.hasUsedDefault()) {
// The player is at max
}
}
else if (!MainConfig.Elimination.environmentStealsHearts)
return;
HealthUtils.decreaseIfOver(MainConfig.Elimination.environmentHealthScale * 2, MainConfig.Elimination.getMin(), player, true);
if(HealthUtils.get(player) <= 0)
eliminate(player);
(Updating a part for a new feature), you do see that this is unreadable right?
that's what I gotta touch
The thing is, I am scared to since each time I touched it the plugin just magically went to fuck itself
like sometimes some things would work
yeah that seems to happen with most things lol
sometimes others wouldn't
and now its almost stable
bro I put 2 months aside for it
and it ain't fully workin
99% coding, the rest is for burnouts and crying
haven't had burnout affect me for the past 13 months
yeah i feel refactoring can be the most tiring part of coding
especially if you coded a pile of shit beforehand
I take a simpler route
this is the 3rd time I rewrite and soon my rewrite count will be 4
like the entire plugin
make sure its not a pile of shit beforehand ๐
sometimes it just happens
refactoring is fun if you profit from it by reusing a lot of code
keep piling on features
you just need to plan your design
think about the features you want to add
and how you are gonna do it
beforehand
Dude I planned my design around "jesus christ please let this shit run stably enough, amen"
tbh if i think about it too long it ends up being fucked
i think longterm i save time writing shit then refactoring it
Same
w e
WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
e
I ran out of breath
Oh you read it, was confused for a sec
yes
yes. Good
rewrote my plugin twice now
And, happy with it now?
anyone have any idea of what the default ghast fireball radius is?
Spawn one and use /data get entity? Dunno, might work
mwoa best thing i wrote until now but it still sucks
hello! How can I modify my config.yml in a event listener?
You shouldnt. Modify a something in memory and save it every 15mins or so and when the server restarts.
I want to use it like a database. is there any other options?
keep it in memory, modify the config in memory, commit changes in memory every so many minutes
in this manner you are not using too much disk I/O just for a config file lol
but the memory resets if the server is shutting down
I need the data for the next session
hence saving it every so often, and in the onDisable() put a save method for your config
so it saves before shutting down
alternatively you could go with memory mapped files and not really worry about the saving as the OS will take care of it
so thats the only option for a database on the disk?
flat file storage, pretty much
using the config file?
if you want a proper DB, then you go with things like sqlite or mysql
I just need to store 2 arguments like username and coordinations should I use like a proper DB?
scoreboard is the only thing I could think of where you could probably have something similar
i guess you could use the bossbar as progress bar
or well cooldown meter in this case
well I suppose boss bar would work too
what you should use or shouldn't use is for you to determine. For such simple thing like you said, I probably would just go with flat file storage
how can I change the config in the memory? I don't see the method in the plugin class
Your question is: Is there anything alike in the vanilla minecraft client.
The answer is: Bossbar, Actionbar, Scoreboard, Tablist, Title
You can display bars there as well. And with a bit of work and a resourcepack you can also mimic some more
declaration: package: org.bukkit.configuration.file, class: YamlConfiguration
you should probably learn more about java as you are now starting to ask questions that in the realms of being basic or part of the fundamentals.
probably with pathfindergoals
or make them target something far away
Du bist uberladen!
hmm yes intellij refuses to open
how can I remove a property from the config?
thats sick
did you do ui with custom font glyphs?
set it to null and save
how long does it take for a premium resource to get accepted? all forums ive found are 4 yrs old and its been over a week since i submitted my plugin
is there a way reload minecraft plugin in development without restarting the server?
or just to use /reload?
but many says its a very bad practice
idk if i understand correctly, but if you create a folder /plugins/update and place your plugin in there, when reloading it will be loaded instead of having to place your plugin in manually and restarting server
You can /reload in a development environment. That's fine. We only really discourage it in a live setting
I do it all the time
oh thanks!
Just bear in mind that some plugins don't play nicely with it. So long as you know what all is on your server you're fine
How does plugman do it?
/reload breaks my vanish plugin so hard lol
Very ugly but it's effectively a targeted reload
VeinMiner breaks as well, but not in any significant way. If anybody connected has the client mod and a reload happens, they have to relog in order for the mod to work again
I tried to write a fix for it because it's relatively trivial, but it's just not at all worth the effort. The cases where that situation would happen are slim to none
suddenly my bossbar gets duplicated lol
wdym? How can I do it
A lot of the time, supporting a /reload is not at all difficult. Developers are just partly lazy
uhh i should look into that lol
how did you make this?!
too lazy now actually ._.
and i really overcomplicated my stuff
going to rewrite it anyways
adds custom reload command
Genuinely I want to know
that seems difficult as shit
also wth ij isnt even opened
go into task manager
The tab or the timing indicators?
mye seems to have fixed it
both
Well the timing indicators are probably custom fonts, usinf a resourcepack, and then iterating through them. Tab, dunno, don't have much experience with those
probs custom fonts as well
The tab, well some of it, like thr title, but I think most can be done "easily"
https://dev.bukkit.org/projects/tablist
Found this rlq, maybe it is of use
Yeah I don't need it, just wanted to know how it worked
it seems like a pain in the ass
thing is that does not have source, so yeah I don't think looking at decompiled is best
There's something callwd "tabbed" didn't look into it, but it got a repo. Also you can send custom packages for the tab if need be
Does anybody know how to make the "full" invisibility like on hypixel bedwars, where no armor is shown?
I love people
Player#hidePlayer(Player)
Player#showPlayer(Player)
packets then
i think you will need to hide the armor with packets
send a packet that they don't have armor
and how do i do that
or does a plugin like that already exist?
no clue
lemme google
hmm "better invisibility" its for 1.16 tho
thats never gonna work on 1.18 is it
ill try it
big error
great
how can I set a list (array) property in FileConfiguration#set
config.set(list)
I can put brackets in .yml files but I get an error when I do it in the second parameter
[arg, arg, arg]
how does all of that packet stuff work?
magic
love magic
is anybody here smart enough to show me how it works or to just make it for me 
hey, I'm changing some blocks with my plugin using Block#setType(), but the walls are not automatically getting connected to blocks around them when placed. Is there some way to update those blocks so they connect?
You first need to decide if you actually need packets
does anyone know the pom tags that make i can use {project.version} or smth in my plugin.yml?
a plugin like that exists its outdated as hell tho
looked at the source code its just jibberish
->
is that for hiding players or items?
it does just what i want
its makes invisibility work like it does in hypixel bedwars
its 1.16 and doesnt come close to working on 1.18 where i need it
i found this but wth
you are wanting to insert into yrou plugin,yml for the version?
kinda a ded project but is there a way to port it?
yes
quite simple... sec
<resources>
<!-- Include all resources -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>*.yml</include>
<include>*.txt</include>
<include>*.json</include>
<include>*.properties</include>
</includes>
</resource>
</resources>``````yaml
name: ${project.name}
main: ${project.groupId}.${project.artifactId}.${project.name}
version: ${project.version}
api-version: ${project.bukkitAPIVersion}```
its teh filtering that does it
and include tells maven where to look for tags?
no, thats just saying, only include files of this type
oh
hello is anyone still there
I've never met someone named anyone
hey. IntelliJ is warning me that PersistentDataContainer#get(NamespacedKey, PersistentDataType) might produce a NPE.
JavaDocs suggest that it throws a NPE when NamespacedKey is null, and when PersistentDataType is null.
However, if I try to return if the key or datatype are null, it still warns me about NPE.
What's the correct way of getting data from PersistentDataContainer without getting warned about NPE?
well get also obviously can return null
If that data isn't present
Can you post the line in question
Presumably you auto unbox
NamespacedKey key = new NamespacedKey(plugin, "id");
if (key == null || PersistentDataType.INTEGER == null) {
return;
}
int id = data.get(key, PersistentDataType.INTEGER);```
data.get still warns about NPE
Yea you autounbox
Autounbox?
Well basically PDT.INTEGER means you get an Integer not an int
because PersistentDataContainer#get throws NullPointerException - if the type to cast the found object to is null
One is a primitive type the other an object
ohhhhh
well that was very dumb
String string = pdc.get(key, PersistentDataType.STRING);
if(string != null) {
doStuff();
}
So when you assign it to an int
It calls .intValue or smth in the background
Which would throw an NPE
getOrDefault ๐คค
Why when I;m on Creative mode and click on the item in inventory I'm getting CREATIVE ClickType instead or RIGHT?
isnt most stuff in creative handled clientside?
so how do I suppose to know if player click with right click on the slot?
also considered doing this, yeah
which is why when I do stuff that involves inventories, I just disable it from working in creative mode (most of the time)
omg but chest GUI works fine on creative
so you player Inventory has different event payload
nice
ended up going with this, thanks :)
I've got answer while chest is open InventoryClickEvent is triggered, but when player just click on its inventory InventoryCreativeEvent is triggered
Very nice thing
Still I'm waiting for the day where I can use Optionals in a meaningful way
Optional don't belong in Java it's just a slow null check
It's around 2 to 3x slower
i couldnt find an answer online but i have a few questions about nms, 1 if i want to make a plugin support 1.18-1.19 do i need to install every version of buildtools? like 1.18.1 and 1.18.2? and how can i import the right spigot version in maven depending on the server version?
Don't support minor versions under the latest
Just do 1.18.2
wdym why not
Because if someone's using 1.18.1 or 1.18 instead of 1.18.2 they are a dumbass
Put it simply
well id still kind of need to support it then
me using 1.17.1 ๐
Use a layer of interfaces and install 1.18.2 nms, 1.19nms and 1.19.2 nms under the abstraction layer
what
So run build tools
For 1.18.2 1.19 and 1.19.2
Than abstract the nms through interfaces in your project
:3
If you don't know what an interface is
i do
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
do u know da wae
i have no idea how this has anything to do with an interface
I'm telling you how to do multi version support
ik how to do that
Do you not know what abstraction is
i just dont know how to make it automatically get the right version in the maven
and what versions i need to install
id need to make a dependency for each one?
but then if the server loads on 1.18.2 for example the 1.19 dependency wouldnt be recognized
Yep or you could use reflection
pain and despair
eh found no solution yet
update block?
Or method handles
so if i wanted to support 1.18-1.19 i would need to run buildtools for EVERY version in between those 2? so id need to install 1.18, 1.18.1, 1.18.2, and 1.19?
myes
๐ข
Though usually you'd not support anything but the latest minor release of each major version
ok thanks
you technically could script up some automation scripts to automate everything for you, but I won't get into that because it requires a lot of knowledge about your plugin and etc lol
if i supported those versions what dependency of spigot would i use?
I'm not really too sure atm
simply because it's not often that I have to code a plugin
I'm working on one right now however
ah ok
Multi NMS version requires the use of Modules
and updating for every version that releases
each version needs its own module?
yes due to obfuscation
how does actionbarapi do it then? https://github.com/ConnorLinfoot/ActionBarAPI
random link is random
Reflection
Spigot already has an action bar api
i looked it up and it says with multi module projects theres a jar for each module though?
no, they are combined into one
well yes it makes a jar per module, but it combines them all into teh final jar
so i wouldnt need to have different jars for each version or anytihng?
no
ok ty
but you have to update for every version that changes
nms requires a far higher maintenance
hey i have a gui that use setCancelled so players cant take items out but players can still put items in how to i prevent this?
fix your logic
but how https://paste.md-5.net/piwojuqola.cs code
thats so much copy pasted code I'm not even going to bother going through it
use methods
don't copy paste
wdym methods?
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
don't code with spigot api until you learn java
i have ๐
i have bean using java for 3 years i made a hole game init
if (e.getWhoClicked().hasPermission("skins.cake")) {
if (e.getSlot() == 10) {
((Player) e.getWhoClicked()).sendRawMessage("MultiTool Skinned");
ItemMeta meta = e.getClickedInventory().getItem(40).getItemMeta();
meta.setCustomModelData(10);
e.getClickedInventory().getItem(40).setItemMeta(meta);
}
}``` why are you copy pasting this 10+ times instead of making a method
oh yeah thats a good point
ngl that code's terrible
its 2am here lol
I've been coding in java for 1 year
Don't think that's a valid excuse
i know i'll fix it now
Looks good to me. Just like writing a thesis the moment you are out of content to write about. "Just create as much text (or in this case code) as possible".
There's still managers that think "developer wrote more lines of code = (s)he's more productive"
Would it be sane to use the jni in a plugin and thus write most of the plugin using c++?
no, but have at it you could anyways
I usually use the obfuscated mappings.
no perks to obfuscated mappings
I rather just use mojang
If I was to use mappings. I'd prefer yarn over the official. Just, cuz I recall the licensing of the Mojang official was weird.
But, its quicker to not have mappings.
eh I think working with obfuscated names makes it harder when digging around lol
did bukkit really reject my icu project? "This doesn't seem to be an appropriate project" lmfao
gross I always forget bukkit exists
at least that side has a reward program, making something off free plugins :d
Im pretty sure curseforge does something similar. Not too sure on spigots hosting of your plugin though.
what is your icu project lol
a plugin to control a player
"Inappropriate. You may not possess people like a ghost."
just cancel the event if its in the inventory
I'm assuming that would be ok right?
why didn't include the ApplySkin method?
He's coded java for 3 years
doesn't have to
i need they player to put i diamond pickaxe in the gui
than just uncancel it if they put it in otherwise keep it cancelled
thanks
Also I think this should use || instead of &&
if (!(e.getSlot() == 40)&&!(e.getSlot() == 14)) {
e.setCancelled(true);
}```
i dont think an event should throw an interruptedexception
oh yeah thanks
he's coded java for 3 years you don't know
how could I transfer all data from a PersistentDataContainer to another?
if i had multiple modules for each version (using nms) would using the modules be the same/similar as just using classes? ex using an interface or? how would this be done
well fun, I have accidentally made a straight up code riddle for myself
this is textbook riddle stuff
how can I disable tnt dmg and grief?
Any type of polymorphism should do fine
ok and the only way to support multiple nms versions is multi-moduler?
or reflection, but modules are generally preferred
Yeah reflection, or method handles preferably
A third way would be to delegate nms dependent stuff to some well maintained library
Presupposing the library provides what you need
when i create a new module it makes a new plugin.yml, pom and everything, im assuming thats normal? but i found https://github.com/mbax/AbstractionExamplePlugin which seems to be a good example and in each version module theres only a file and pom no plugin.yml
Oh i donโt know I dont use maven but
Thats what I refer to when assisting with this
yeah same question applies
it creates a new plugin.yml and everything but these examples dont have that just a pom
You only need one plugin.yml
Does anyone know if thereโs something like this but updated for special source?
Best way of doing a vanish command? Having troubles hooking into an API.. Just doesn't work :/
What would i put in the brackets?
just player?
so for me, (p)
?jd-s
If someone could help me with this, or point me in the right direction, it would be greatly appreciated ๐
why is <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot</artifactId> <version>1.19.2-R0.1-SNAPSHOT</version> </dependency> saying Could not find artifact org.spigotmc:spigot:pom:1.19.2-R0.1-SNAPSHOT in spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/) Could not find artifact org.spigotmc:spigot:pom:1.19.2-R0.1-SNAPSHOT in spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/) yes i have 1.19.2 buildtools thingy installed
Doesn't vanish the player
Actually what it does is:
- send destroy entity packet to others
- do not send entity updates to others
ah ok good, I remember a while back, I knew some vanish plugins that just gave you invis lmao
good that there is a native method that doesn't do any of that and makes it so the client believes the vanished person doesn't exist/died
My gosh, good old school stuff lmao
But yeah, the fact of hidding is really like removing the player
p.hideplayer(p) does nothing for me
I'm also having problems getting this to perform the command:
How can I chang ethe name above player?
Hello can someone help me? I have upload the plugin excellent crates and I have version 1.18.1 but plugin is not working can someone explain me why
Send errors
ok give me 1 sec
i cant upload image
[13:11:53 ERROR]: Could not load 'plugins/ExcellentCrates-4.0.4.1.jar' in folder 'plugins'
this can help you?
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: su/nexmedia/engine/api/data/UserDataHolder
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:157) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:415) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:323) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R1.CraftServer.loadPlugins(CraftServer.java:420) ~[paper-1.18.1.jar:git-Paper-216]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:285) ~[paper-1.18.1.jar:git-Paper-216]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1211) ~[paper-1.18.1.jar:git-Paper-216]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-216]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
this?
how do I send players between bungeecord server with bukkit?
I need the whole thing
send or pull?
thx
i guess you have to shade your stuff
General question, what is the purpose of making the event type "final" ? I've seen others do it, but why
if someone can help me i will make him god
Doesn't it just mean that it creates "a copy" of the parsed obj, but does that matter when working with events
its a bit more verbose
some people like it
i am trying so many days and nothing
think Morice answered your question, the dependency is not included in the jar but is expecting it to be there so you either need to put the dependency in the plugin jar (shading) or if the api is a plugin, put the plugin in the plugins folder so the plugin can access the classes
=> not being able to reassign the variable
I'll be honest, my friend is a dev and he helped a little bit and told me to do it lol
So not sure entirely
anyone know the 1.19.2 version of ((CraftPlayer)player).getHandle().sendMessage(component); .sendMessage isnt recognized
pls someone
No worries, it wasn't a "bad" comment, just smth I've noticed and was interested in, maybe it would have made a significant difference, who knows when you don't ask
Well have fun and carry on, hope everything works out :D
thanks bro
why "snapchot" ? this is for the In dev ? or global
This looks to be the dependency https://github.com/nulli0n/NexEngine-spigot/releases
spigot 1.19.2 was released like an hour after vanilla was released
Yeah no problem ๐
the correct version is 1.19.2-R0.1-SNAPSHOT
ngl, should probably start doing this aswell, seems that it would be good practice to ensure that you cannot change the event
how can i put dependency in a plugin
with sqlite, should i work with a drivermanager based connection?
wdym
Anyone???
Upload the plugin that it's asking for
You don't need to given it is a plugin, in this case, just put it in the plugins folder
how can I transfer all data from a PersistentDataContainer to another?
loop over the existing keys, check what datatype they have, then simpy copy it manually
cant you iterate over all the entries?
oh ok i will try
or reflections ๐คค
something like pdc#copyTo(otherPDC)
you have to do that manually
oh, there is no deep copy?
Anyone help me with my issue?
that is not needed
Can't get the command to perform
https://github.com/JEFF-Media-GbR/CustomBlockData/blob/master/src/main/java/com/jeff_media/customblockdata/CustomBlockData.java#L362
this is a tiny method to show you what datatype a given key has
lets not expose that STAFF collection
ahhhhhhh
ye have a Set<UUID> instead and dont expose it to other classes, write dedicated methods for it
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
I have arraylist for uuid idk why i checked for player
whats the 1.19.2 version of PacketPlayOutChat https://nms.screamingsandals.org/ doesnt work at all
Still doesn't work though
of course it does work
wdym ofc it doesnt work
myes lol
Yeah fair enough but it still should work right?
and tbh that Pdc looks a head blag.... I'm new to java and bukkit so trying to take it one step at a time
Optional xD
and yep
I said that it does work, not that it does not work
and it doesn't perform command
https://nms.screamingsandals.org/1.18.1/net/minecraft/network/protocol/game/ClientboundChatPacket.html the real name is ClientboundChatPacket
huh whenever i paste it in the search bar nothing happens
also ClientboundChatPacket still doesnt work
well if you want to search for the spigot names, then you have to set the search to "spigot"
I have multiple other listeners that are working, just the perform command ones that aren't
PacketPlayOutChat is the spigot name, by default it expects you to enter the mojang names
theres your use case of an optional ๐
i cant make it ):
Hi. Does anyone know why "proxiedplayer.connect(ServerInfo)" causes me to see a void instead of the world itself?
I could find out it can have to do with Geyser, but that plugin is not on my server. Could not find anything else..
Whenever I send a player via Spigot to another server, this does not occur.
how do i get the version of nms where everything isnt obfuscated
You have to use a maven project and put something in the pom.xml: https://www.spigotmc.org/threads/spigot-bungeecord-1-19.559742/
the dependency is not included in the jar but is expecting it to be there so you either need to put the dependency in the plugin jar (shading) or if the api is a plugin, put the plugin in the plugins folder so the plugin can access the classes
yeah i did
i dont understand
is there a reason why ClientboundChatPacket isnt working on 1.19.2?
its just all a and b and c
i dont understand what to do
can someaone help me?
uhm idk if thats a very good use case lol lombok @NonNull carries
or if the api is a plugin, put the plugin in the plugins folder so the plugin can access the classes
I gave you the link to the repo and release and it is indeed a plugin so put the dependency in the plugins folder
Have you also added
<classifier>remapped-mojang</classifier>
to your dependency on Spigot?
why even using @NonNull instead of @urban grotto?
smh
i did
it all fails to load
@urban grotto is markup lol versus @NonNull having actual functionality
oh no, poor @ NotNull guy
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier>
</dependency>```
does it insert Validate.notNull? or smth related
Well, in some way or another I got it to work. So cannot quite help you out as I don't have a lot of knowledge about the pom.xml..
it literally requires it to not be null or causes an error
ah fun
@full perch i made it! thanks
No problem, be sure to check google for the answer if you can before asking in support channels though, being able to troubleshoot and solve problems on your own is very important
*google SearX ๐
this the correct way?
Bump?
I am unsure of why, could you show the example in practice (i.e show the code) and do you have a void world in any of your servers and when in that void, can you check what world it says you are in (Not sure if you can without making or having certain plugins though)?
Well.. The confusing this is that I am literally only calling "proxiedplayer.connect(ServerInfo)"
This results in me being sent to the server I put in there, but the server just appears as a void (just like myself when in f5-mode). Unfortunately I cannot attach any files..
I can see someone else breaking blocks if they do so. When I re-log I do see everything again.
no use Mongo
lol
here i'm again lol, anyways do you mean that i need a connection field which is opened permanently and use that instead of establishing a new connection every time?
I use a funny connection system
ignore the dynamictable map, it's some fancy auto-adjusting table system
smh
Hmm, only thing I know of is when the server is lagging or you have high ping the server might not send the terrain for a bit but you should get disconnected or in a few seconds get some data, sorry, haven't encountered this issue, hopefully someone else will be able to assist you
connection opened permanently?
easiest way is using a singleton object that has lazy loading
i think thats what frostalf tried to tell me
No problem. I have been online with this issue for at least 5 minutes, so that is not the case unfortunately..
I have thought of any other way in which I can send a player to another server, but there is none from within the proxy itself.
singleton.. uhh for what then? the db or the connection?
with a lazy loading singleton, anytime the singleton object is accessed it will always check if the instance is valid, if not it will make it valid ๐
the connection
yeah mine is basically that
ah i get it
if i have a multi modular project what module would i package to get the jar
except it's an abstract method on the sql driver class thing I use
fourteenbrush is using sqlite, not quite too sure if abstract way is ideal for that lol
How would I add a player to a team
I use it both for mysql and sqlite
mongo is a permanent connection iirc so I don't need it there
Anyone help me??
well, sqlite is a permanent connection until you lose the instance XD
liek thos?
yep
you gotta check for validity
connection.isValid(timeoutMs)
would be cool
throws an exception if invalid,
Can you shed any light on why the command isn't performing
i guess it wont
add some debugging code
to see where it stops
this is giving me so many mixed practices
LOl im new
anti-nesting pattern, yet still nests
I have a feeling it stops right at the top or you are not registering your listener
calls getter, assigns it a local value, continues to use getter
I've registered it
I'd say uhh
I am going with the staff check
Why?
how
Iโm currently learning how to create a BungeeCord plugin (I already have plenty of experience with Spigot plugins) and am struggling to understand PluginMessaging between Spigot and Bungee. Iโd like to create a โgetterโ, so that the Spigot server can request data, and the BungeeCord server will return it. Could anyone please help me or point me in the right direction? I havenโt found anything helpful online. Thanks ๐
yeah think its staff check i sent a message and didn't receive it
also, i just checked with the connection thing and my plugins keeps just disabling after not fully being initialized :/
longer timeout
might have a stacktrace but my stupid exception handling not printing it
100ms is quite short
checked with drivermanager configuration and same result
I love it when people DM me
lets wait 2 secs lol
my skyblock core got quite big (I'm taking a similar approach to you, and making 20 types of databases and handlers)
and I made an exception handler
that logs stuff to files
ah me just using Plugin#getLogger
20 types of DB's?
it might not even be thread-safe but
or are you saying it will have the ability to use 20 different types?
Why not just stderr illusion
flat-file, sqlite, mysql, mongo, amazon s3
wait its in seconds
type thing
o shit
Ah, make sure you use an Enum ๐
I do
10000 seconds maybe a little too much ๐ค
No try with resources :c
when using nms do you guys use the obfuscated one or the non-obfuscated one
It's more fun
because i cant find a proper tutorial for the non-obfuscated one ๐
the non-obfuscated one has changed stuff
EntityPlayer becomes ServerEntity
and a lot more
Well it's NMS you're going to have to figure things out yourself
@civic wind go bug someone else
don't you love it
when you're commenting about something
and the people asking for help on stupid stuff start dm'ing you
its very impolite to come to a discord ask people for help, and then assume its alright to DM and continue to ask for help one on one
always same result
npe is cuz my userrepo isnt instantiated, meaning onEnable hasnt been completed
lets see why im not getting a stacktrace
what is userrepo?
You don't need to be an ignorant sod... You're not famous simply reply and say you don't want to help lmfao.... Cringey guy
makes 0 sense quite clearly the modules exist https://imgur.com/rjT7DWL
I am actually quite well known
Thats very cringey. I have no idea who you are
that's because you're not a regular here
You shouldn't expect to find bill gates here
ah why didnt i see this
A regular lmfao. Kid has an ego because he talks all the time in a discord channel. Go touch grass
No need to call people "cringey" just because they called you out on trying to be pretentious and obtain personalized support for your stupid problem, after giving up on the first attempt
i think i- i made some stupid mistake
You lot got egos its minecraft mate
Don't act famous you need to go the see sun light
lmao
๐คก
and I am not a kid
we're all adults here, pretty sure
If you're not a kid you should be ashamed of yourself
for what?
for having a job and making a living out of video games?
At least if you were, you would have an excuse for being a childish attention seeker
Ashamed at what lmao
I'm new here, say hi!
I am waiting on what exactly I should be ashamed of
All you had to do was saying "I don't want to help" not beg your existence in this chat
Read what I put properly
seems your upset because I told you in a public setting instead of the DM
Yes, I'm just displaying maturity levels.
what does the ProfilePublicKey do and can i null it
Itโs just annoying when you help someone in a chat and they start dming you, when you DM you expect personalized help & give pings every time you send a message
You're pretending like you are mature, 2 different things
itโs unnecessary and annoying to people
What I did is mature because it expresses being displeased in you assuming I want to hold a private conversation with you
it would be no different if you approached me in public
I would tell you get lost in front of everyone
not step aside and do it
You're not famous though. All you have to do is reply saying I don't want to help... I wasn't asking for your debit card details lmfao... Just say the 5 simple words and thats the end of it. Instead you have spent 5 minutes arguing about it LMAO
bro what
I don't need to be famous to tell you anything
And your minecraft mates are replying with you, not sure if they've noticed i'm not talking to them?
Okay so if drake told you to get loss publically you'd respect, but because it's frostalf you don't?
You're massively missing the point LOL
Get a life lmao, what does being famous have anything to do with this
Cloutchaser
You guys can code but you sure as hell lack social skills
being famous just means people can be a nuisance to you and you should magically be fine
God your a child and everyone engaging is equally as stupid considering you are a brat no point in arguing anything
ยฏ_(ใ)_/ยฏ
his time is worth just as much as yours, personalized help because he was kind enough to offer it in a channel is not guaranteed
L
You arenโt paying him, are you?
Thats fine
imma get back to work
I'm not disputing this
Yeah probably right on this. When I was in a tank, I once used the main gun to talk to someone, didn't quite go too well ๐
so, that is one for you
๐ weird flex but okay
weird flex yeah
point is, you shouldn't make assumptions about people you don't know
Anyways, still have yet to know what exactly I should be ashamed of
we aren't multi-millionaire elon musk clones here
I am slowly building up to it
but we sure as hell aren't living a sad life rambling about dm'ing people for help
the only thing I want cloned from Elon musk is his bank account
he can keep everything else
lol
ignore chat
what about his shape
he built different
What assumption? I simple dmed you for help as you responded in here and the chat was going quick so to make it easy I messaged you. You acted a fool and responded with snarky comments in here instead of just replying in the dm saying no... It's that simple lmfao
If you're "mature" you would see it from my pov
it wasn't snarky, only you perceive it that way
man shut yo bitch ass up and move on jfc
honestly kilocodes you might not realize it but it happens a lot, it was just a comment on his end to the other people who experience is equally as much
Why you talking? I'm clearly not talking to you
Well i'm new... So i don't realise it
welp thatโs all it was
TL;DR - Kino DM'd frostalf, frostalf came here and rambled about people asking for help in dm's, kilo said he isn't famous enough to complain or some shit
Lmfao
Chinese whispers
kilocodes is upset because they DM'ed me for help, and instead of me replying in DM, I replied in public chat area telling them to go bug someone else. Their feelings are now hurt, and I should be ashamed as well as I am now magically a kid again
"famous enough"
Okay question regarding spawning items in the center of a block
I have 4 block locations like this. I have no clue in what order they are in
Now I originally modified the position of the spawn item like so
location.clone().add(0.5, 0, 0.5)
No obviously this doesn't work because I am automatically assuming every block is offset by that amount which it isn't necessarily true. Is there any way I can always get an item to spawn in the center regardless of the direction the block was placed at relative to the location
frostalf is a very patient person
if you're getting in an argument with him
you must be real stupid
I play the long game
i remember once he spent an hour explaining how bits worked to me
If a random kid in discord is saying i must be stupid, that must really mean im stupid!
not sure if "random" is the correct word
I mean you are pretty fucking stupid
the green clover at the end of your name says much
Right back at ya
unfortunately at present you are the random here
everyone else here right now, are regulars
Everyones random lmao
why is that even being used as an insult; like so what if theyโre a kid doesnโt mean they canโt be smarter than you xd
All of us have been here for around a year here
private static Location average(Location[] locations) {
double x = 0;
double y = 0;
double z = 0;
World world = null;
for (Location location : locations) {
if (world == null)
world = location.getWorld();
x += location.getBlockX() + 0.5;
y += location.getBlockY() + 0.5;
z += location.getBlockZ() + 0.5;
}
return new Location(world, x / locations.length, y / locations.length, z / locations.length);
}
is probably your solution
random to you maybe
they won't be wiser
have to be old to be wise
Who's insulting? Someones feelings are hurt?? Damn the irony
lol
you started crying when he turned you off on your very simple question
Smart on the keyboard doesnt always mean common sense smart folks!! anyways cya ๐
I'll try it out thanks
whatโs common sense
grass is green btw
You clearly have none
well there goes the fun
yes I just got back from a bike ride, thanks for telling me the color of grass
not sure if you're in the position to talk about that
aw man the circus is gone
damn i came late here
it was a pointless argument
yeah you pretty much missed the main event
entitled and wanted to defend himself when there wasnโt even a problem
hmmm I just realized I only have access to one location at the present class any ideas
as I said, they were upset because I responded in public and not in private
Entitled? I'm working class, a bricklayer... You guys are probs uni students or from a priv background lol
you can make the others from the relative offsets?
okay hold up
Lol?
I'm just going to move it up
bro what
another solution is
origin.add(furthestOffset.clone.divide(2))
a bricklayer surely has some guts insulting people with them being students
I am a military vet soo that is a no on the uni student part
What?
And what does you having a job have to do with anything?
I'm pretty sure average students would be more educated than you if you ended up a bricklayer
need an easy, non laggy way to check if a block is surrounded by 8 non-passable blocks
kilo youโre actually dumb if you think you can just pull insults out of your ass
awesome you have a job, but are you saying those without a job are lesser then you?
Can you build a house?
yes
no one here that I know of โhas it madeโ lol
Sure
oh no he's a working class citizen
Oh noo
who cares
๐จ
"Sure" says everyone who can't LOL
he has a job that i wouldnt get even if i was begged to
currently im using a long if statement which is slightly laggy aswell as buggy
im so sad
You can graft thats why
im in tears rn
background shouldn't matter in this argument
ur a soft x generation non binary pussy
these people donโt need to build a house because they have other skills, like development
LOL
u all probs think you can be a girl boy
yeah sure
weird ass kids
and what are you?
none of u get poony either ahhahaha
I think what you should be asking, is if they could build a house to code. Anyone can build a house, the homeless do it all the time. Doesn't mean it is always safe or to standard
TOUCH GRASS FREAKSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
a bulky black man with a mustache and a huge beard that can destroy earth with a single punch?
my uncle is the prime minister of an ex-soviet-union country - it doesn't make me better than any of you mfs
kilo needs humbling and maybe therapy
I like how at the end, they started calling people names
Lol he left
can he get banned for that shit at the end lol he doesn't deserve to ever come back
that is an insult to the circus to associate that person with them
yeah hes homophobic
nah what if he comes back to apologize
indeed
apologize? never
he won't be honest with yourself
hes a traumatized 13 years old who had to become a bricklayer and thinks univeristy students are bad because he never got to middle school
well, that is one way for the bricks to get their revenge on them
and thinks homophobia is a good idea
okay now stop arguing over this dumb fuck
the definition of garbage in society, if you ask me
didn't know kids could work at construction
and help me out
when i package my multi modular project it creates a jar in ever module.. how do i just get the compiled jar for everything
you're telling me that kid is an adult ๐
for loop
impossible
such is the life in some third world countries
I mean
I've been making plugins since before it was legal to work
and monetizing them
but construction is dangerous
o shit I forgo
Set<Location> hmm I got a set do you think I could probably use this to modify every position in the set
yeah just change Location[] to Set<Location>
and change the names
genius
I just happened to have a location[]
just making sure I'm not doing something stupid lol
because I was doing some stuff with double chests
for(x = -1, x <= 1, x++
y = -1, y <= 1, y++
whatev
if(x == 0 && y == 0 && z == 0) continue
Material blockType
!blockType.isOccludable
low effort
when i package my multi modular project
they will need 3 for loops
2 if they don't care about the y
Anyone knows the method to config a mob's drops?
if you want a smooth effect, you'd need to call that method in increments on a repeating task type deal
EntityDeathEvent should have a mutable drop list
starts at 0
brewing is usually 10 seconds iirc
I can't bother grabbing my Minecraft Blockpedia Book and fact-checking
How do I add/remove a player from a team?
addEntry
thanks
can you add a player to multiple teams
iirc
yea like
whatver.addEntry(player.getName());
but can you add a player to multiple teams tho?
curious about something so I was looking over the method what do you get out since you put in a list of locations is there a way to get the middle location of one of the specific locations in the set?
is there a way to check which team/s a player has been assigned to?
public void onMobDeath(EntityDeathEvent event){
if(event.getEntity(ironfish).getKiller() instanceof Player){
event.getDrops().add(new ItemStack(Material.IRON_ORE, 1));```
```getDrops()``` error: Cannot resolve method 'getDrops' in 'EntityDamageByEntityEvent'
any idea?
if there really is no such method here, then you should manually spawn item with World#dropItemNaturally
๐ค
ill try
EntityDeathEvent and EntityDamageByEntity are 2 completely different things
setBrewingTime(getBrewingTime - howeverManyTicksIWantToSkip)
if needed
public void onMobDeath(EntityDeathEvent event){
if((Silverfish) event.getEntity().getKiller() instanceof Player){
event.getDrops().add(new ItemStack(Material.IRON_ORE, 1));```
there are no errors, the custom mob I created is called, "ironfish"
but it still wont work
Why are you casting getKiller to a silver fish and then doing an instace of check on it
getKiller will always be a player
my bad
So that's always going to throw an error
Did you forget to register the listener?
No, its on the start of everything tho
the listener in what I send you was the silverfish
I also tried "ironfish" which was a other name I used but didn't work
theres a guide to create skills?
I want to create mob skills, but not for one mob on specific, I mean, a reusable skills
Okay I'm going to take another crack at asking this. I have a Set of 4 locations Set<Location>. On each of the red blocks I need an item to spawn in the center of the red block. The white area isn't supposed to have items on it. The issue I'm running into is I have no way to predict how to center the entity on the block is there any way to snap it into the center position? and no adding .5 to x or z won't work as it could be offset an amount that would move it to the wrong block
no idea tbh
first time making a mob also like third day on java spigot
well i already made it (with help)
all i need now is the drops when its killed
why does this code not removes item from cursor?
You need to lock it for the type of inventory
does spigot ship json-simple
what do you mean by lock?
Why do I get this, when >= 25?
does someone have some ways to easily create a team, and add player to it?
hi
guys how do i find out if an entity is in render distance of a player
can somebody just tell me how to add players to teams
Team#addEntry
yea but how to create the team in the first place
yea and i did exactly that
the thing is
how would i check which team a player is on
Scoreboard#getEntryTeam
lmao
does Bukkit.getServer().getViewDistance() give you the blocks of render distance or chunks
Player player = (Player) sender;
ScoreboardManager sm = Bukkit.getScoreboardManager();
Scoreboard scoreboard = sm.getNewScoreboard();
Team DinoMine = scoreboard.registerNewTeam("Map1");
//ADD PLAYER TO TEAM
player.setScoreboard(scoreboard);
DinoMine.addEntry(player.getName());
Player player = event.getPlayer();
if(player.getScoreboard().getEntryTeam(player.getName()).equals("Map1")){
player.sendMessage(ChatColor.GREEN + "YOU ARE ON TEAM MAP1");
}
This is my code for adding a player to a team, and then checking if the player is on said team when moving, why doesnt this work?
I made a custom plugin that works, the thing is that whenever it does its thing which is to spawn a mob when a certain block breaks, it fills my console with it
OH MY GOD I FUCKING HATE NMS
send code pls
where is this?
send the entire file not snippets
you could also use custom teams
create a new yaml file which stores stuff
didnt think of that
ill use that instead
lovely
2 files
are you still here?
im not mentally stable enough to fix ur problem lmao
i can barely make my own code work
oh lol
ngl
i kinda wanna take programming as a career
partially to throw a middle finger at my parents who think french > english and that i should stop learning english because its useless and that whatever i do (e.g coding) will not help me in the future
your parents are haunted by some kind of witchcraft
or they are witchcraft...
are there any other blocks besides sweet berry bushes that trigger PlayerHarvestBlockEvent currently (and maybe beehives/nests)
Hey, Ive been working on this plugin that uses the Bungeecord messaging channel , and it seems to send the message, but the other servers do not seem to recieve this message. Ive looked at the wiki on it, and used this method before, yet it isnt working this time
Sad to hear when parents are not supporting their child :c
can you send some code
from the spigot and bungee plugins
and some context like when its called
Yeah sure, I mean its only a spigot plugin since iirc you dont need a bungeecord plugin to use the messaging channel
Well its not called in the playerjoinevent
oh ok
It literally is just the same as the wiki says
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
have no idea why it doesnt work, i even modified my code so its literally just the same as the wiki, but it doesnt work
"Unable to obtain Instant from TemporalAccessor: 2023-05-11T22:27:20.108168480 of type java.time.LocalDateTime"
