#help-development
1 messages · Page 751 of 1
$1 more then me but i am most likely getting a promotion and raise next month lmao
I mean
you live in the states
Its not about reputation rather connections
it doesn't take that much effort to make 25/hr there
wdym
Yes, and no
Just like a degree
Reputation helps a bit
Most of my money i have ever made is because i either knew someone or someone knew me
Connections help a bit more than reputation
I personally think could be enough for a certain small age
oh yeah btw frosty I drove a car for the first time today
well "first time"
more than going back n forth and stalling that bitch 4 times
25/hr is a small payment amount
25 * 40 * 4 is about 4k / mo
Which is about..
5-6x min wage here
you aren't getting full 4k btw
First and reverse take getting some used to. Even though i drive a stick for many years is still every great once in a while stall my car
not ever they pay you for each hour if you're not working all time
That is what the 40 is
40 hours a week
was driving in first
didn't play with gears
I suck at controlling RPM, it's way too sensitive
and clutch is way too heavy, can't really control it 100%
the one thing I'm really smooth at is braking
given this is my dad's shitty car and I was on a dirt road, apparently first gear likes doing that shit where it goes in bursts
or waves
whatever
it's called "this car is shit"
You want low rpms for shifting up and high rpms for shifting down. Easy way you do it is wait a second when you hit the clutch before releasing again. You dont have to be quick
it would become a job, but in spigot idk if it would be enough
I mean like
I find a hard time getting a steady RPM
Not much about shifting
I mean you can maybe earn more than this
I legit just had clutch engaged all the way in
and started playing with the accel
1k, 1.2k, 1.4k, 1k, 1.2k, 1.4k, 1.6k, ...
just trying to be consistent with it
in reality I'd aim for 1.4k and do 2k
better than the 4k I was going when I went back n forth on my parking lot lmao
Well typically you know you need to shift if you hit 3k rpms but you can wait till 3.5k-4k except 1st gear you want to shift around 2.5k
but yeah I did a couple laps around a dirt road
nothing special
there was a big hole, I'd try to avoid the big hole, go into the road, back to the dirt thing, stop at X location etc
next week I'll prob try shifting into 2nd
Stopping is not hard. You dont need to go through the gears for stopping unless you want to ease into it to avoid brake wear but the trade off is clutch wear
Just stick it in neutral. Also when stopped for prolonged periods dont hold the clutch down
Stick it neutral and release clutch. Holding the clutch down for prolong periods will burn the clutch out
This is because the fly wheel is still spinning as well as the trans shaft. But the clutch plate isnt spinning since the clutch has it pulled away
fun
so the clutch was p much melting
also it was a diesel car
it loves to stall if I go below 95% clutch power and have no gas whatsoever
Motor type doesnt matter with the transmission
eh true
but ppl say diesel stalls a lot easier
p sure driving schools use diesel here for that reason
mine has a mediocre audi :(
saw a driving school mercedes s-class today
no clue what model though
Probably because the idle is lower
Since no spark plugs
Idles at 800
Yeah gas engines idle between 1k-1.5k lol
uh dev question, how can i see a Potion's level? PotionType doesnt seem to have a method to query which level it has
neither does PotionEffectType
getAmplifier
on what?
its not on Type, EffectType, or PotionData
bleh wtf is this doing in PotionData
I'm making a plugin to protect creative mode(canceling events). The result is a lot of classes that execute the cancel logic with repeating code. What is the best thing to do in this case? Inheritance or a separate class that will remove the repetition of code
separate class
^^ any experts in nms?
You know it won't move even if you got the spawn packet working
which packet should I use?
also is it possible to just make it move like a normal bat
Im doing some per player stuff so
nms
You can hide entities
1.8.8
nms?
You'd need a packet listener
so yes but I recommend using ProtocolLib or PacketEvents
is there some sort of tutorial already made?
or a resource?
@chrome beacon
sorry for ping
🤷♂️
☠️
prob dumb question but @EventHandler is making use of the observer pattern and registers the obserable function pointer to the observer that is the bukkit server?
also if so, how does it automatically detect the correct event based on the functions signature
Wha?
It does nothing with function pointers. You can imagine it as if bukkit creates a method that is as follows:
void exec(Event e) {
handler1.method4737(e);
If (!e.isCancelled()) {
Handler2.method5837(e);
}
}
The generated method that is called depends on the event that is executed
I see some very intuitive variable and method names lol
Can you detect TAB key
When registering the listener the type hierarchy of the parameter is walked and it is checked wether a handler list for the type exists, if it does the listener is added to the list. This causes aforementioned synthetic executor to be discarded and regenerated.
The var and method naming is not of relevance, hence the naming scheme
¯_(ツ)_/¯
Note that bukkit doesn't actually generate a synthetic method, but paper does.
I wonder what all of that wizardy means
For our sake it is pretty much the same - bukkit simply invokes it via reflection/MethodHandles instead of a direct call
It is complicated, and I probably made it look much more complicated than it actually is
Is it possible to build bukkit/spigot for a snapshot
https://github.com/Starloader-project/Starloader-API/blob/past/1x/src/main/java/de/geolykt/starloader/api/event/EventManager.java is an event system close-ish to bukkit you could look at in case you don't understand Bukkits system. Though uh, please don't use it in production anywhere.
Not really unless you are willing to do all the work yourself at which point yes - why not?
Afaik there have been spigot snapshot builds in the past
Does that mean I'll have to manually write and fix patches
Yes
any reasons why not use in production?
CMarco be like:
Does reflection in java reflect light?
Well, interesting
🦐

Furthermore it may not be thread-safe and it rebuilds ALL handlers even if only rebuilding a part may be sensical
No.
You could make a client side mod for that
Well, both sides actually
But I don't think the client sends any key presses to the server
I mean due to latency it makes little sense anyways
Who causes latency
Why would that be an issue
It calls public void registerEvent(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin, boolean ignoreCancelled); in PluginManager with the event being the first parameter of the method and the listener being that class that the method is in, the executor is the method itself
If I just want a key for example open GUI xy, latency is not an issue
I swear I had an event library
Yeah for singular keystrokes yes - for continuous key-presses no
Yeah see then lemme receive those
Something I thought of
Keep the game like it is, handle the stuff on the client side but send a keypress started and keypress stopped packet
But people would only use it for anticheats that are pretty garbage anyways
This could bring innovation
Also you'd likely want to rebind keys and such
No popular servers currently are innovative. We need innovation.
CMarco style
hmm what is the event, where the client request the data required
to fill the tab
We need a join message 56 pixels to the right
How tf do you wanna be innovative when everything has been done and the weird golf thingy died
Let the server send the client a list of keys that they want and then they show up in the keybind config
He's making fun of CMarco
With defaulted key for example to K
it should not go per key character
No not everything has been done
What was the golf thingy called
PuttPartyMC
Oh, right
Server - Client: I want a hotkey for "open GUI xy". Then it registers it to the keybind menu and defaults to key xy
Because people don't want innovation
People are afraid of it
People are stupid
Ah yes
My genius never-done-before claim plugin recieved little attention due to that for example
Imagine buying ads for a spigot plugin
Well it was paper-only because it used a hefty amount of adventure, so it wasn't available on spigot and hence few would even know how to download it

I think this is ok
The only thing that I could maybe improve
is follow the srp but idk
yeah I might do that
cause in the same class I have the implementation (the actual abilities and stuff) the names and reference names etc
how to make a minecraft slushie
Are there rainbow tables for {OfflinePlayer:%s} md5 (minecraft offline player uuid)?
A big part is selling your plugin with vibrant colors and gifs. Mc is still predominantly used by a younger audience.
Look at this one gal who even made her own shop website for her plugins (cant remember the name). She always
had vibrant colors, round corners and a bunch of moving pictures in her plugin page. Big success.
Ah Songoda
When i rebuild the project i get
Module sleepforce sdk does not support source version 1.5
Better use rainbow tables than try every options 😅
Set a higher java version
Can i dm u ? I cant send pics here
?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>
Zzzx i dont have forums acc
Now read the whole message
You may want to send all relevant POMs
?paste
Anyone know why the pathEntity is null every time? its within 20 blocks ?
https://paste.md-5.net/ubojozigev.java
😢
except they didn't create a majority of that stuff, scammed the people of paying that did do the work, constantly lied to both customers and employees. Yes they were successful for a time in scamming their way which is no different then anyone else who does scams.
probably wouldn't really use them as an example lol
"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.
Simple question, where in the NMS code or general Bukkit Code is the CraftBukkit Constructor called? I didnt see anything where it gets initialized on server startup.
Their is a patch for the main class
You'd need to follow the instructions on stash to setup the environment and look in Main
Alternatively you can just decompile your spigot jar and look at the Main class
no please no
never
You could also look at the Main.patch file
Imagine server receiving unsent messages, just because someone typed it in server chat but never sent it
That'd get me banned everywhere
If they added something like that
The server would have to subscribe certain keys
And clients would need to be informed
And it would 100% have to only work when the game window is focused
Minecraft: Keylogger Edition
ta b completion
The only thing if i follow the code is this in MinecraftServer.class but its Deprecated:
@Deprecated
public static MinecraftServer getServer() {
return (Bukkit.getServer() instanceof CraftServer) ? (MinecraftServer)((CraftServer)Bukkit.getServer()).getServer() : null;
}
What are you looking for?
Ah
It's done in PlayerList iirc
Yeah, first line of PlayerList constructor
this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this);
The gained traction through their appealing plugin sites. And they are the best example
for showing how to appeal to a broad target audience. Doesnt matter what they did otherwise.
But why is it as a variable in MinecraftServer and not initialized?
It is
That initializes it
this.cserver = minecraftserver.server = new CraftServer... notice how it assigns both
ohh i see
But now is the question where PlayerList gets initialized. haha
or better DedicatedPlayerList
because it extends from it
What exactly is your plan here?
I want to understand how the Spigot/Bukkit source works.
Have a plan for my server with it
How to make my plugin support all version (1.16.5+)?
(Sorry I'm begginer developer)
Use the lowest version you want to support for development. Spigot is generally backwards compatible.
If you want to go below 1.13 then there is a ton you have to do completely different.
If you use NMS then its a different story as well.
if my plugin support 1.16.5 it can support 1.17, 1.18 and like that?
yes
COOL!!
i have LinkedHashMap how do i get like the number 10 key and value from the top
Loop through
By iterating
I mean it has. But by its actual keys.
No linked data structure has random access 🤔
Yeah, bc List compells it. But all it does is iterate from the top and increment an index.
Ye
Myeah, but you should be fine with what Java provides.
Needing index access on a LinkedHashMap sounds like a design problem to me.
Can I change the direction a falling sand block looks at, i.e. if it is set as a passenger on an armor stand
Hi! I have a scheduleSyncRepeatingTask that counts down a float every 1 Tick. It always subtracts 0.05F but for some reason I get really long weird floats and it never hits 0. Am I get java precision errors or what is happening?
Can I somehow prevent this while still having a "small-stepped" timer
just manually canc the task when your float is less than .05?
Yeah good idea
Either that or use an int and just divide to get the output
Guess what 😎
I've made an anti-wallhack
https://www.youtube.com/watch?v=3NWr1ziqkVY
TheHolyElements, the first minecraft game mode with an integrated wallhack anticheat.
THIS IS ONLY A PREVIEW, FURTHER TESTING IS BEING DONE, FOR NOW IT DOES NOT HAVE A HIGH IMPACT ON PERFORMANCE
2% average tick time with 2 players.
Lets show us how this scales with 10.
Im assuming you implemented the straight forward approach which scales n squared.
That's just a test
But to be honest, for the amount of things the plugin does internally, it's quite fast
Its a nice first result 👍
Probably right now with 10 players the server tps would fall to 5 or 7.5
Why do you have to do so much internally? With the hasLineOfSight and hidePlayer methods this
should be possible in a few lines.
Because hasLineOfSight is not 100% precisse and it has some fails
So yes, I implemented my own "hasLineOfSight"
I see, well then keep going until its done 
Btw my first try at improving the performance would be a dynamic polling rate depending on the distance of the two players
and disable it completely for the case that they are outside of the entity tracking distance.
Looks like you have a datapack which messes up your world?
smile
So on the block or armor stand? Therefore found nothing about yaw here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/FallingBlock.html
that world never had a single datapack in it
ever
like the folder literally never contained one
Did you get this world from somewhere?
I have literally never encountered such an error from the mc server.
One reason could be a faultily saved world after the jvm was forcefully stopped while writing to the world file.
i dont recall that happening
iJ freezes from time to time but thats about it
oh
i do recall my computer crashing
maybe i had the server n
i... cant remember. i dont think it did but im not sure
welp, delete level.dat i guess
Do keep in mind that the PlayerMoveEvent doesn't fire for tiny movements not sure how much that can be abused
Im guessing this is scheduled
wtf is 'random_sequences'
Did you stop developing? 🫤
this channels not meant for recruiting im afraid
(cough cough nudge nudge make one md_5)
its one of the most frequent asked questions here
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
ehh
It’s complicated as I was doing it on a pc. And I may or may not have got in a huge argument with zed owner of pc, now I can not continue for now
what if we had a #recruit channel
Great idea
have you seen that illusion
I remember seeing a java ide with maven support for android but idk if it's good
thats what the service link is for though?
I’ve got a iPhone and a iPad
its just 'computer degree' 'we are aspiring... (read: no pay)' '7+ years of experience', 'one person should be an entire it department'
all I know is that I'm feeling happy that I got a random message pinned
we need a more laid back easier to use channel
Well, idk if it exists for iPhones
so... I'm the ideal candidate
That why I’m asking for it to be made for me 🙃
i mean should you tho lol
I wanna make a java ide that will be accessible from the browser so people can dev from their mobile devices
oh thats just my general experience scrolling through there
anydesk
@sterile sapphire check dms
Alr
like this is pretty standard
Is it some desktop-> other device screensharing crap
i think so
alright whered u find that
I have all of that or atleast almost, don't remembering when I started deving in spigot
i would qualify if not for the nms stuff
like 3rd post
I have some experience in nms
but im sure nms isnt hard
just a little annoying
I've got 7 years of experience, a degree, full knowledge of NMS but I'd prob get rejected
or lowballed
because my website has lorem ipsum or some BS excuse
Make a thread, just as the current mega thread for getting code rated or reviewed
ehh no
I started learning java by coding forge mods because I thought it would be as easy as learning js by coding discord bots lmao
I quit like 10 times until I understood anything
Dude went from 😺 to 🗿
I've always had interest in java as a kid
decided to learn so because I got in an argument over a buggy plugin that "could not be fixed"
so I made my own plugin that fixed it
was some anticheat incompatibility with slimefun
I had interest in coding as a kid, because I thought it's so cool to make own games that do exactly what I want them to do and be
now the real fun, calculating 3rd person
No way I'm doing that
Can you even track that
ofc
2,2% usage with 2 players, imagine if I add 3d person checks 💀
First things first, optimization
i recommend looking at spark
I would be very surprised if you came up with a ways to track that
to get accurate profiler data
multiple plugins do that alreay
anticheataddition for example
its open source aswell
Pretty sure it's just a packet that gets sent to the server for some reaason
MaybE?
there's 100% a mathemathical way of doing it
Yeah, i dont believe that. You can literally use a free cam on your client and the server would have exactly no idea about it
Btw, how does freecam work?
Just because the player is rotated in a certain direction, doesnt mean the client also looks into that direction
I mean, the only magical way againts freecam would be the server literally only sending the blocks it thinks the client can see
All the data gets sent to your client. You can do with that what you want. Copy it, fly around in it etc.
which, my god that would be terrible
Are you talking about re-doing the chunk generation system server-side?
No way
I wonder if giving the server a gpu would make that somewhat okay
the server send the client a chunk packet with all blocks of the chunk
Then send fake data
changes to the chunk after sending are communicate via e.g. single block or multiblock packets
So if the client exploits it, it crashes 😈
but the client always has a full "copy" of the chunk state locally
It would be hilarious if the server would just hog the clients resources for chunk generation.
"Oh you dont use those cores? Let me generate random chunks in there. And mine some crypto while im at it"
oh and theres an anti xray plugin (for paper antixray) that also calculates 3rd person
black market challenge
make a mod for it
and then the client just generates a ton of diamond blocks lmfao
The real crypto miner mod
Never
It's a bad idea
they send every time you press the offhand button
i dont mean movement input
each bitcoin you generate for the mod author you get 1 diamond
F is enough!
i mean just keys pressed while the game is in focus
yeah F is enough
That would be good
mm malware opportunity
Or just make as FiveM does, to send the client a set of custom keybidings the client can set
minecraft generally isnt rly mod friendly
Pee
Spout 2.0
secscore
The new gamemode, harder than hardcore
It has the same as minecraft, but with a spicy touch 😈
Now, talking seriously, let's make SpigotCraft
The official spigotmc minecraft client
Client sided plugins?
That's called fabric
Fabric = forge but faster
Not client side plugins
Integrated code for the client
That can be used by spigot
I'm currently running into a more complicated issue with my inventory-saving-thing/vault-system.
I managed to serialize and deserialize it using a byte-Array.
Now I have x yml files called vault_x.yml in a folder that is unique to the player that created the vault.
So basically the vaultId now is a single-digit int (so x).
I accomplished this by creating an instance of a class that handles the vaults with the values needed and then save/load/create the vault. (the file with the number is created upon creating the object)
Now I need to save the vault from a InventoryCloseEvent-Listener.
The problem now is the number.
I can't really give the number to the Listener since I would have to add a variable outside of the onCommand()-Method which isn't unique to one command-execution, iirc, since the method is only being called and not a new instance created each time the command is executed.
So when one player opens Vault 0 and another player opens Vault 1 the number will be one.
But when the first player then closes his Vault 0, the plugin will save to Vault 1 since the number is 1.
How do I fix that?
fabrigot
spigorge
says who?
hi ego /s
That sounds like you should create a Vault class which has the id and inventory inside.
Then a VaultManager class which keeps track of all loaded vaults in a Map<Integer, Vault>
uhm
I don't know if I understand correctly, but I think it would be easier for you if you try to switch to json files
no. i tried that. didn't understand shit, then left it.
since spigot has yaml integration
I sure hope you created a system like that and dont have all your code bunched up in command and listener methods.
Commands and listeners should only contain a few simple lines of code and mainly call methods from manager classes.
Yes, but yaml is not for storing data
neither is json
It is
yeah i do have a seperate class for the vault
ironically it's currently called VaultUtils (which dosen't make sense since it's not a Utility class)
if you step by step explain to me how i would serialize that shit, sure lmao
because i sure didn't understand in my hours of research, i don't even know why lol
JSON (JavaScript Object Notation) is a lightweight data-interchange format
Well, I guess I was wrong
Hey, I have a question, if I wanna make a custom crate plugin with animations should I hard code the animations or should I make it randomly generate the patterns?
But json is used by some databases (obviously that doesn't make json a database) but I hope you get into my point
JSON is used to format API data aswell which makes it nicer 😛
I think 7smile answer was the best one
That sounds like you should create a Vault class which has the id and inventory inside.
Then a VaultManager class which keeps track of all loaded vaults in a Map<Integer, Vault>
I remember a server that used json to store data in json files and ended up corrupting the file because the server crashed while saving
Yeah but I don't quite get what it means lol
the map part
What to do with the map
Yes, that's what differences json from a database, integrity
Anyway, json is still a good option to go (not the best of course)
You map the vault id to a vault
how so
keylogger
i mean
I'd take that as a lesson to make backups of your json files after saving, so incase json file 1 is corrupt, the other will not be
still
only game input would be sent
why are u typing sensitive info while logged into the server while tabbed into minecraft
So I map the vaultID to the instance that is being created upon executing the command?
AuthMe:
at that point just write a mod with custom keybinds 😅
there
thanks
what about server shutdown tho
won't i need to store that map as well?
wait
Server loads -> Load your vaults into the map
Server stops -> Save your vaults into files
Every 15min -> Save your vaults into files
Are loot-table keys like NamespacedKey.minecraft("zombie") or do they use different IDs?
and when executing the command, if the vault is a new one there is an entry added to the map?
ic i'll try to wrap my head around it
Why a mod? Make it a malicious application
Sending key strokes across a network is a bad idea, full stop, no questions asked. This is not a Minecraft exclusive issue
yeah put an exe in your respurcepack
In a game you're often sending the actions that occur as a result of said key presses
I wrote an optional mod for VeinMiner that lets people press a keybind to activate vein mining, but the solution to that wasn't to send the key that was pressed and check it on the server, but rather a packet to enable and disable the state of vein mining
Thats literally what I said earlier
Let a resourcepack have custom keybinds like enable, then let the client send this packet
Server registers a keybind with a namespaced key and default key
Yes
When the client presses it a packet with the namespaced key is sent to server
Yes
What is a namespaced key
"enable xy"
mc uses it for everything
Mapping to key Shift+V for example
wot. Server doesn't register keybinds
My brain is boiling rn
minecraft:barrier
I mean, how else would servers add custom keybinds
(Sadly)
I sincerely doubt that would happen lol
But those lazy mfs probably won't :(
The main issue is you'd still know the default key for the keybind
It's not a laziness thing, it's a "This doesn't make sense for us to do" thing
it's literally a feature for modding
They have no reason to add that sort of detail because anybody capable of modding the game will likely use plugin messaging to send actions, not keybinds
wow
You do precisely what I did
I don't care about client modding at this
Ofc that would work, obviously
But thats garbage
You're not going to have a server-sided only solution
We need it Vanilla
Sadly not, would be an amazing feature tho
Thats my entire point
wonder how hard it would be to make a generic mod that would accept a packet from server when someone joins, register keybinds then send them back
Easy
Not hard
Like 3 classes?
^
it would be like veinminer
you can do it without the keybind you could just also install the mod and now you can customize stuff
And guess what? Not everyone installs the mod
and that wouldnt matter
So client mods suck for servers
Yes but im talking about shit where it is necessary
if you want to customize it you install it, if you dont want to or know how to do you dont have to
@worldly ingot when does veinminer compat come to modrinth
tf? Never 
Wait, did Choco dev the veinmeiner mod?
Not the original Forge mod
Oh ok
Who tf uses modrinth
give it to spigot then
me
Like a crap ton of peeps
most people who download mods through their launcher too
I can count 100 people that use curseforge and not even 5 that use modrinth
i now prefer to use modrinth where i can
Modrinth really be better
yes they do
A lot use it
Crazy, never saw that
Okay mr. oldschool who has never seen modern people
sodium doesnt use curseforge anymore because modrinth isjust metter, 26 million downloads on curseforge, 5 mil on modrinth
just the fact that modrinth API is soooo nice
like thank god
it makes this so fantastic to download from
modrinth gui is also just better
and the site looks neat
It may be 1000x better but yet I never encounter people using it
Smart devs post on both sites for extra profits
way easier to get the version you want without going through 90 pages
Well, if you don't see people using it, doesn't mean people don't use it
Can I upload modpacks on modrinth?
yeah
the best download platforms are the ones you spend the least amount of time looking at
Curseforge is slow
bump
you could make presets for animations,
but randomness can look nice as well when controlled
Yeah I was thinking to make presets for the animations
would this remove the itemstack from where it currently is and place it in the slot, or would it copy and paste the itemstack into the slot, or can a single itemstack just live in 2 slots at once?
"setHelmet"
Why do powered minecarts still exist?
Why doesn't mojang either:
- Make them less jank
- Remove them, just as jeb hinted in 2016.
power minecarts? you mean the furnace ones?
yes
Good for big power furnaces system
Good for big headaches
they dont seem very jank and dont have any reason to remove them
useful for transporting mobs up a hill without spending a ton of gold
They are legacy entities
Interacting with them with code is painful
they were implemented before physics; they don't accept vectors
Their teleportation is painful
the only way to control them is through nms or a paper patch
they have velocity methods
They do, but the methods one needs to use only exist for powered minecarts; not for normal entities.
and they are not wrapped in upstream; just in paper
PushX() and PushZ() are stupid methods.
entity have getVelocity and setVelocity
Yes, but not powered minecarts
they are old entites that ignore normal velocity
they just do their own thing
they literlaly do
declaration: package: org.bukkit.entity.minecart, interface: PoweredMinecart
use ur eyes
Look at the actual implementation
Last I looked, it inherits it, but then proceeds to ignore it.
For example, if you setvelocity of a moving powered minecart to 0, it will keep moving because it uses an internal Push method instead
Velocity works for all other entities in the game
- Not display entities
it's just powered minecarts that don't work since they are ancient and implemented in a terrible way.
true.
In any case, a powered minecart should accept velocity. It doesn't, or at least doesn't consistently, since velocity is overridden by an ancient PushX PushZ SetFuel system that nobody uses and that everyone hates.
Also, while ranting about them, even from a gameplay perspective, it's outdated.
They only accept coal and charcoal since, last time the entity was touched, coal blocks didn't exist in the game.
Ive asked this question before but i didnt get the answer i was hoping for. I am trying to make a "reset" system for a arena that basically saves the way the arena looks before the fight and then repairs it after. Its important that i can do this WITHOUT removing the players from the world or the locatíon
any ideas?
Any more details on what sort of mode it is?
Curious on where you want the players to be during the reset
the players are going to be teleported to a "spawn" location from which they can reenter the arena
but for this to happen as smooth as possible i want that all to happen in the same world
probally also good to add that the arena isnt thaaaat massive
at least the part that needs to be reseted
bumb
i wish i knew about schematics api
arlight ill check that out thx
teleport the players away & paste it
i was making shit that needed structures to be pasted and instead of using we schematics i tried to make my own schematic system
so much regrets
damn
exclamation on tried
omg fk discord they stole my developer badge
l
Can I make my plugin that works for servers also a library in one jar
tut from 6 years agio good enough for worldedit api?
world edit api is easy enough once you figure out how it works
alright
it might have, idk if it did
docs are my worst nightmare
i know 😭
do you guys save NamespacedKeys?
Save them where
only if i am going to use it later
Yeah I have a class with them all held static
like if its a one time namespaced key then ill just instantiate it once and let it die
it tells me i need to use BlockVector3 what ever that is but i cant
BlockVector3.at(x, y, z)
so could i just load them all at plugin startup and use them afterwards, like some sort of registry
yeah exactly
oh yh works thx Ebic
this seems to be outdated what is it today
ClipboardFormat
how would one define a region that is not cuboid
some articles for multi-version plugin compatibility?
they didn't appeal to a broad target audience, and they didn't gain traction because of their sites either. They spammed about their plugins everywhere. But hey if you think they are the perfect shining example of something then so be it, never one being a fan of advertising scammers 😉
yes
how the fuck does she have 18k instagram followers what
Im not advertising anyone. Im giving a neutral example. I also think apple is a garbage company but they have outstanding
marketing. And they absolutely appealed to a big audience. Their plugin sells show that clearly.
Lol
how can apples advertising be compared to songodas
It can not and i never did compare them
her blog is just the depiction of mental instability goddamn
pass null
inventoryholders are a weird thing
avoid using them
I was making a point that you can use a company as an example in a field they clearly excel in, without
regarding any periferals that might be attached to the company otherwise.
but they don't excel at it. They excel at scamming kids
Songoda has some nice plugins though
Quality plugins
So for me their advertising techniques isn't really a point
Their plugins where pretty trash last time i checked them (when they where still on spigot).
The only thing they did properly is the plugin page design. Thats my whole point.
i dont wanna be annoying but does anyone mind explaining me how to exactly use that? i really dont understand anything they say in the documentation
Isn't songoda a development team?
Their plugins are very optimized and over the top
Especially their premium plugins
this is where im at rn
this is not true at all
not who you are trying to fool
And they sold a shit ton of plugins. Regardless of their shady involvements.
I'm not fooling anyone? I used to use some of their plugins and I did not get any issues with them
ClipboardFormats.SPONGE etc
Sure, two actually. PlayerItemConsumeEvent and EntityPotionEffectEvent
Wait, where did the question go
They work expectationaly well and do not have any issues with optimization
bros schizhophrenia is showing up
You shouldnt
you may not have had issues with them, but they are far from being optimal
hardware can do a lot to hide non-optimal stuff just fyi
No software is ever optimal to be fair
true
sure, but that isn't what I am referring to
It is optimal enough for a minecraft plugin compared to some
can't wait to release my skyblock core and blow up everyone's internet connections with the way I'm handling database io
I actually almost worked for Songoda. I was part of all the chats and got to see all the inner workings
it is the reason I know so much
I mean, did you follow the convo? They are scamming, botting scumbags who exploit their devs and customers...
They are literally a terrible person. Only reason I didn't get caught up in the dev stuff is because she failed to pay me on top of failed to give me anywork. And then when she tried to give me work couldn't even explain what it was that she wanted me to do
so I was like whatever this isn't good at all XD
cmarco is literally money driven istg
bros whole personality is praying to god he makes more money than the day before
you'll make more money in a week at McDonald's than making plugins
true
You need to be REALLY good to make more money making plugins than at a real job
i mean from my personal experience i can say that its a good part time job if you wish to become a good programmer one day. You learn new things while getting payed for it
its definetly better then just learning
Look for a dev spot. Thats pretty much where proper income can be made.
Otherwise: Follow the advise i gave earlier, using songoda as a prime example.
Design appealing plugin pages, with vibrant colors, round corners and moving imagery.
Update with small improvements to push your plugin to the front page often.
Update with small improvements to push your plugin to the front page often.
This is the problem with spigot's plugins website. There is too much junk there and updating your plugin 4 times a day will make it go up instantly.
Is there really no limit/day?
yall we should bring the idea of owning your own minecraft sever into peoples heads again. More people want a server = more jobs for us
I keep saying to marco
make good content in the first place
and people will come
bro replies with a measuring tape plugin
Myeah thats not entirely true. The market is saturated and a consumer which visits other places, uses spigot as well with a very high probability.
Spigot seems outdated on the website compared to other websites.
well then do something about it
So you have no good intentions is what you're saying, exclusively profit driven
im sure if you send md a updated version of the website he will replace it
Time to learn web development from ground
xD if you ever really give it a shot hmu ill try to help as much as i can
btw yall know how much hypixel pays their devs? these guys making a fortune
the same way releasing free products isn't slavery
Currently busy making this system for myself. Maybe later when I finally am ready to learn about web frameworks & other web related stuff
Got a question, since I haven't been able to find it. Is there an API for finding or checking for structures in the world? I found the API for generating new structures or making structure but none for locating or checking for existing ones.
You're putting your greed above your morals and making a genuinely bad product rather than trying to benefit the community
And people catch on to that
If they want to pay someone to hook into your plugin they can't
isnt this already a minecraft feature?
All you're doing with obfuscation is hiding your lousy code
im sure you can acsess that somehow
nvm
All you're doing by licensing free stuff is being predatory with who can work with you
PlaceholderAPI succeeded because it is free, open source and genuinely a decent product
They pay for the web hosting for their ecloud system
Yes, but I am trying to do it from code. (Mostly I am trying to see if an entity is inside of a structure.) I have some NMS code that can do it, but I want to do it with out NMS stuff.
API's don't have to be free
what im saying is if its already a minecraft feature im pretty sure you can easily acsess it without having to rely on an api
What I'm saying is that the FOSS model is one of the few things that work in this case
You either make something revolutionary or you make something for free and pray you get donations
what is the default value for extra in spawnParticle?
If you want money make commissions
I am not sure what you are going on with rate limits. Anyways, API's that cost money can't be some lousy made thing. They need to solve a problem or make it easier to do something that is otherwise annoying or difficult to do.
Well, there is no way to access it from code without NMS code currently.
No paid product grows if you don't have an audience
At least that I can find
You don't grow an audience by making shitty plugins and paywalling everything
Correct
You can try a freemium model where you make something great for free and any additional content is paywalled
ImIllussion im sure you wanna tell me how to do this rightttttt :DDDDD
or solve an actual problem that no one else is
Your ego is so fucking high that you'd rather believe that the world is wrong rather than believing that your strategy is flawed
do i even have to use clipboard? i have like 0 idea what im doing rn
A clipboard is basically a representation of an already read schematic
oh
You can get a clipboard by reading a file, or creating one from a region in case you want to save it to a file
ClipboardFormats.WHATEVER.read(file)
etc
im trying to do the second
To create a clipboard, you grab the region and construct an impl
iirc it's BlockArrayClipboard
don't quote me on this
It is
I find it ironic really, what they preach and the ways they go about making money 😂
theres like a million
the entire church industry does this
we are now talking about how your beliefs don't align with your actions
and your way of conducting business
BlockArrayClipboard clipboard = new BlockArrayClipboard(region); just found this does that also work?
oh sorry
well at least you are making progress 🙂
I am still digging around the Bukkit API hoping I missed something because I really don't want to have to use NMS to be able to see if a BlockPos is inside of a specific structure type.
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/World.html#locateNearestStructure(org.bukkit.Location,org.bukkit.generator.structure.Structure,int,boolean)
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/World.html#locateNearestStructure(org.bukkit.Location,org.bukkit.generator.structure.StructureType,int,boolean)
declaration: package: org.bukkit.util, interface: StructureSearchResult
Yea, was trying to check if an entity was in an existing structure's bounding box. Might be able to get those to do what I want.
it trows a filenotfound exeption on line96
im trying to create a file not read one
am i sloq
use plugin#getDataFolder to get your plugins folder
like this?
remove the start slash
java.io.IOException: The process cannot access the file because another process has locked a portion of the file
public static void backupWorld(File source, File destination) {
if (source.isDirectory()) {
if (!destination.exists()) {
destination.mkdir();
}
String files[] = source.list();
for (String file : files) {
File fromFile = new File(source, file);
File toFile = new File(destination, file);
backupWorld(fromFile, toFile);
}
} else {
try {
InputStream in = new FileInputStream(source);
OutputStream out = new FileOutputStream(destination);
byte[] buffer = new byte[1024];
int length;
while ((length = in.read(buffer)) > 0) {
out.write(buffer, 0, length);
}
in.close();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Is there a way around this? I only get this error when the server is running so it's the only process that could be in use. When the server is offline, I am able to copy the file:
I'm essentially just trying to copy the world file to a backup folder (and later, vice versa).
I am using Multiverse Core. Could this have something to do with it?
Hm... I kinda need to do it outside of server load. I'm making a game system and want to revert the world to a backup when the game is finished.
then it might be better to unload certain chunks, and swap them from backup
Why not use the Files api
also you can use try with resources
Make sure to fully unload the world before replacing any files
Can I cancel other plugin event? I dont have access to source code of that plugin.
Its custom event in that plugin
The events dont belong to plugins. Spigot fires an event and it is passed to each registered listener method, one after another.
You can increase the priority of your listener by using the annotation parameters. Higher prio listeners get called after lower
prio ones. You can cancel and even uncancel the event after other plugins made changes to the outcome.
Hmm, maybe I can just listen do custom event instead idk if that is possible, but should be. But there is no API for plugin
If they fire their custom event through spigot then you can just listen to it like you would for vanilla events.
If it's a custom event fired by that plugin you can only cancel it if it implements cancellable
I will need to take a look on that if It is cancellable. If not it will not be possible. Sometimes when I ask question, solution come in my mind xD thanks. Something new I learnt by explanation. Thanks a lot!
hi who know i get getConfigurationSection from multiple file .yml player
?configs
See this wiki page on how to use custom configuration files: https://www.spigotmc.org/wiki/config-files/
yes
i create every player join file uuid.yml
how i can get the kills and deaths to sorted for leaderboard
Files are really not ideal for this. But you would have to essentially iterate through all files in the player data folder.
File userFolder = ...;
File[] userFiles = userFolder.listFiles();
if(userFiles == null) {
// Do something
}
for(File userFile : userFiles) {
// use each file
}
But thats some basic java you should be able to just get with a quick internet search
even GPT can make it for you, its faster thank looking in google
so minecraft is one threaded with servers, how can i make my database calls asynchronous then?
I mean i adopted GPT as native navigator
MInecraft is single threaded, so you must do database oepration over async. In case of spigot they provide something called scheduler which allow you to run async process
There are multiple ways to handle this. If you have more experience with the bukkit scheduler, then you can just use
async bukkit tasks to do this. Just remember to start a sync task inside the async task later on, so you can get your
data back on the main thread.
Actually... i should write a guide for that. Maybe tomorrow.
interesting
I created some Shapeless Recipes and registered them to the server, I also discovered them for all players, but while the recipes work when manually crafting them, they do not show up in the Crafting Menu unless I select all recipes. The recipe output is enchanted and the ingrediants have lore
DatabaseManager Class: https://pastebin.com/z1KMJrZR
GUICommand Class: https://pastebin.com/NZVR1V4E
Events Class: https://pastebin.com/WpdjabHG
Main Class: https://pastebin.com/Tfp2Kxij
Hello, I'm having trouble with MySQL, it's not saving data for some reason, I've checked for errors and found nothing, MySQL database works fine with any plugin I've found so it couldn't be permissions.
Any ideas?
have you checked your data is created in the tables?
No data created.
wait am I supposed to add it in pom.xml?
What can cause my friend getting said the repo trying to clone was not found. When it perfect works for another friend
How do I even add the driver?
I found this:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.26</version>
</dependency>
don't those have to be registered?
there is a map for registered structures
and an api to search for structures in the world folder, datapack etc
Will this do?
try {
Class.forName("com.mysql.cj.jdbc.Driver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/generator/structure/Structure.html
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/structure/StructureManager.html#getStructures()
declaration: package: org.bukkit.generator.structure, class: Structure
declaration: package: org.bukkit.structure, interface: StructureManager
I added it into the DatabaseManager class
are these not sufficient?
whats the difference between calling a method and doing instance of it and then calling object
two instances of an object are not the same. So sometimes you want to do something on the instance that already exists, not make a new one. For example, you are not going to have two instances of a block at the same location there can only be one
They don't let you find existing strucutres very easily in a way that won't bog down the server. (For example if I wanted to give someone an effect is they were inside on one of the structures.)
so it wouldn't make sense to make a new instance of it, instead you want to manipulate the one already there
It also doesn't seem to have a good way of getting the bounding box of a structure. (Not sure if there is a way to go between the 2 Structure classes Bukkit has)
my question was to coll, the locate structures method if I recall uses what MC has implemented
and you are right, its not efficient
I was the one that original asked about it so I was replying xD
oh ok
yeah you are right they are not efficient but that is because mojang implemented an inefficient method for it
spigot attempts to not introduce too much in terms of customizations or bypassing the vanilla mechanics
Mojang has a good method for it tho. As I am currently using it in NMS code
I tried it, still nothing is saving.
oh yeah one more question
I dont get one line that says this.variable = variable
when I see it in class where you have methods and constructor
when the term this is used it refers to the variable specifically declared in the class, and the variable on the right refers to the one declared in the method
Also whats the point of constructor, cant you just define variables inside class and call it a day?
public class something {
private Something plugin;
public void doSomething(Plugin plugin) {
this.plugin = plugin // if it was plugin = plugin java thinks you are trying to say plugin from the method equals plugin in the method, when really we want to say plugin from the class equals plugin from the method
}
There is a way, the NMS StructureManager class has a structuresAt function. Which takes a block pos and returns you a map holding structures and a longset. Which is different the the normal locateStructure method that tries to find that structure in the world out for a given point.
passing variables between classes
Or setting up something sort of internal state for the class object
Can they just be set to public?
Uhh no
Encapsulation is one of the few core principles of OOP
But also with a constructor you simply can't init the object without passing those values
With public variables there's no obligation to do so
@EventHandler
public void onCobaltArmorEquip(final ArmorEquipEvent event) {
Player player = event.getPlayer();
int amountOfArmor = 0;
for (ItemStack i : player.getInventory().getArmorContents()) {
if (i == null)
continue;
if (i.getType().toString().contains("DIAMOND")) {
amountOfArmor++;
}
}
if (amountOfArmor == 4) { // player has 4 pieces of diamond armor on
player.setHealth(20);
player.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 999999999, 50));
} else if (amountOfArmor < 4) { // player has less then 4 pieces of diamond armor on
player.removePotionEffect(PotionEffectType.FIRE_RESISTANCE);
}
}
}
Why the hell its work like on reverse, when I put last piece of armor then it's do nothing and when I deequip one then I get effect and after puting it again the effect get deleted
think of it this way, there is only two ways to pass variables to other classes. Either the class asks for it or it gets told it. Its like working, sometimes your manager tells you things to do even though you didn't ask but you didn't know you need to do those things otherwise. Then sometimes you ask later for more information but you didn't know to ask until you were first told to do something or something happened during your normal duties and not sure how to proceed.
this is the best analogy I can give right now
most of the time you want to tell the classes to do something
So if I just declare x in class Something I wont be able to change it outside of class with Something.x = 5?
you could but that changes it for everything
not just for your one thing
so it may not be wise to do so
How can I change its value outside of class?
I would suggest learning java before trying to code a plugin
Its make your life easier than just trying to discover how it works
Hi, do armorstands (or other entities) need to be updated after being teleported?
Updated in what way?
The position of the entity
Only thing i know that would require updating such things is if the entity is fake and thus it would be required to send some packets to inform of its new location
Otherwise if its an entity created using the api and thus server aware of it. It shouldnt be required to do anything else after teleporting as the server would do it for you
At least it should anyways
I dont really have mc installed
Im using World#spawnEntity to summon my armorstands, however when I summon one, and update its position, it isnt in the correct position (its offset a certain amount), then after around 1250 ticks its teleports back to the correct position
Sounds like a client issue more then a server one
Yeah its likely, but i cant see how i could fix it client side
I think i found the issue, it seems like i was spawning the armor stands, and in the same tick, moving them to a different position, which was causing my client to be confused.
Fixed it by spawning the stand at the same place it would get teleported to.
Thanks for the help
Hi, how do I change the name above the player (I also have Adventure API though paper)
You’ll have to spoof the player data packet (forgot the proper name)
Just intercept it and modify the name value
With something like Protocol Lib or what?
Why doesnt Spigot provide something for it 😭
