#help-development
1 messages Β· Page 956 of 1
you know turkish, illusion?
From a plugin I already worked on before
No, but copilot does
damn youre almost software engineer?
"almost"
I have a degree in software engineering I guess it means something
Got it because I had to like pick a course
damn, bro made it
how do you get paid so little though
bc he accepts it XD
:D
And I was like "fuck it imma go on a programming course I get to have an excuse for being on my laptop in class"
Sometimes I get paid big
lol
I too, am an engineer
how does someone even make money these days form spigot development lol
aren't there like 3 servers these days?
ppl dont hire me for right jobs because not enough exp on papers
I legit lent my dad like my entire savings so I gotta afford food somehow
u dont
Those 8$ are dinner
at least basically all the german servers shut down
most ppl at least
that's whise
If you guys ever feel like clowns Cirque du Soleil has some banger soundtracks for y'all to get the immersive experience 
like how is it that ppl who do nothing and almost know nothing get high paying jobs in my field here
deep
π
damn
i get paid 15/hr
I charge 25/hr
though i dont do software engineering
I dont get paid hourly ":D" I've got extra small salary and completion based bonuses
that's.. not that much for a software developer. especially for someone who has an SE degree
how you ppl afford to eat??
just work more and eat cheaper
i mean same, i get paid monthly and just did pay/160
i mean. surely stuff would be cheaper then as well no?
Like I eat discount food only and I can barely live here
Not by that much
love and air
Like
(makes more sense in german tbh)
So you and your partner need to be both working full-time to live paycheck to paycheck
i'm currently looking for a place but that also only works bc i want to move together with my gf lol
I live in my own 55m2 apartment in the slums. moved out at 18.
what country?
me?
yea
finland :D
changed my pfp when the meme was super big and never changed it back fsr
almost 5 years now, kinda proud tbh
and yea a partner aint happening with the personality of a brick wall π
Or the roughness of one
change it to
this
give me a sec
no nitro
u dont need nitro to change ur pfp what
what even is your pfp? cat? dog?
its some kind of rodent :D it was on a feed bag
i thought it was a sheep π
the picture was looking too funny and i had to steal it
I look like a hampter irl ngl
perfect
at least i got cool glasses and minecraft girlfriend
the funniest bit is i basically start the minecraft client only for testing these days
when u say that i keep picturing something... lmfao
basically never play the game
lmao
:DD
remember the "monster school" stuff π
tfw you do programming work for a semi-dead game
thats what i am picturing
omg :D not like this
monster school?
yea there was this trend on youtube
couldnt get through a full video
elsagate type shit
you shoulnt xD
making sexually questionable videos with cartoon characters and labelling them as kid friendly so they get abused on yt kids
when I was a webdeveloper i used to watch animal documentaries half of the day
that was random
if u want a small rundown using an actual safe video. pretty sure this explains it https://www.youtube.com/watch?v=jAKmx7ioyEw
i AM a webdev rn (mostly writing java (spigot) bc i don't have enough stuff to do on work kekw)
I had to get that off my chest
it was just hanging in the office and drinking coffee thank god for covid and remote work
then I just drank coffee at home and played acoustic guitar
my neighbours love me btw
now what was I even coding
the ai controlling your minecraft girlfriend?
you can ask my girlfriend if you dont trust me ::D
which ai site can i find her on
now I wish I had bought some AI licence for bs-ing like doing a website called AI girlfriend
that would be dope, at least I'd have fun
mby I can steal a licence from the company and do it
have to ask my boss. he's quite the memel0rd, might let me do it
an engineer that engineered a body for a minecraft girlfriend?
the roast is real :D this spigot community is one of the best devcommunities im slightly participating in
@hybrid turret if you ever need more cat images for your profile
check https://catbase.siea.dev
my collection of cats
wtf is this error, while compiling plugin? π
thats all what is saying
as long as this is not an ip logger π
that all... thats the problem
where does this code occur?
If I delete data from that config.yml its all good but WTF
its open source xd
oh xD
wdym?
where do you use the value set in the config?
it is
Click on the topmost error instead of the innermost error
There might be more details there
what ever its gone for some reason... I runned maven clean and its gone wtf π
Gg
intelliJ really sucks for not having the top one selected by default
i mean it makes sense
but it's also kinda annoying
bc the logging in the inner ones is usually very slim
soon bigger than spigot
You are missing out on critical features π£οΈ π£οΈ π£οΈ
im using
Structure struc = FactoryPlugin.getPlugin().getServer().getStructureManager().getStructure(new NamespacedKey("minecraft", "dropper"));```
to load a structure that i saved using a structure block but it says struc is null does anyone know what i did wrong?
i saved the structure as minecraft:dropper in the structure block
why r u using structure blocks lolz
i figured id use minecrafts built in structure system to make my structures
use schematics
Structures are perfectly fine. If it says that struct is null, then it was not saved, or at least not with this exact namespacedkey.
why tf does var exist in java? just type the type???
i also feel like it would be bad practice to use var
( Ν‘Β° ΝΚ Ν‘Β°)
Β―_(γ)_/Β―
(β―Β°β‘Β°)β―οΈ΅ β»ββ»
( Ν‘Β° ΝΚ Ν‘Β°)
is the namespacedkey just the structure name that i put into the structure block?
so the stuff before colon is namespace and after is key right
let's talk about this again (kinda)
If i'm using an SQLite-DB (so a file), i should load everything onEnable, no? Bc if I don't i will access the .db-file over and over again when trying to get data, correct?
iirc yes
What is 0.1+0.2 equal to?
Math
weird the structure does load from cmd blocks
Nah, my js code says its 0.30000000000000004
java says it's prob 0.29999999999999999999991
Every language says that or something close
Thats a IEEE 754 rounding error
structure blocks*
y2k you're a nerd
but who gives a shit?
how dare you know the IEEE numbers
and what does that have to do with var?
But why?
fair enough
friday
Computers can't do decimals well look into IEEE binary doesn't exactly translate into decimals well
healthy
XD
This lets you print all loaded structures:
StructureManager structureManager = Bukkit.getStructureManager();
Map<NamespacedKey, Structure> structures = structureManager.getStructures();
structures.keySet().forEach(System.out::println);
https://0.30000000000000004.com/ my favourite website
Here is camman18's YouTube short about the mystery: https://youtube.com/shorts/WvyVFSOD-uM?si=yeOzmMj6BD0a0E3c
Huge thanks to Natalie for sending it to me!
This is the bug report Oliver found: https://bugs.mojang.com/browse/MC-119369?focusedId=804740
Explore floating point errors yourself using the IEEE-754 Floating Point Converter: https://w...
I didn't I had it backwards xD
that's just mojang logic being dumb
My brain is so weird
is there a difference between Bukkit.getStructureManager and plugin.getserver.getstructuremanager?
anyone? ^
ill try this out
what kind of data
Nope, not on spigot at least
You should be using a cache in most cases
if its playerdata i would load when the player logs in, save when he quits. plus save periodically every 5 min or something. async ofcourse.
^ this for a cache intermediary I'd personay use caffeine but guava has okay caches too
ummm never heard of either
Guava is a library bundled with spigot
It's google's
uhmmmmmmm
Caffeine is a caching library made by the same people who correct mistakes and issues with the first it's overall more performant and has more features
Does this just mean "load all the data related to a player in a listener for the PlayerJoinEvent"?
So you would have something like a PlayerDataManager?
yea. sure
with some player-related hashmaps
huh, that's an interesting design idea
i like it
yeah i can (i dont get why spigot wants you to login to view pictures btw lol)
and it only opens in a new tab
but it won't go big mode as in 7's screenshot
could also be caused by your browser
ive been doing the bedrock java crossplay with geyser on paperMC and ive been installing LOTs of plugins, and most of them have worked flawlessly on bedrock clients. some have sadly not. i'd love a tag to indicate compatiblity β€οΈ
chrome/brave?
would be kinda weird
HUH since when is that the case? i thought hash maps were really fast? o.O (source: https://www.geeksforgeeks.org/concurrenthashmap-in-java/)
They are probably talking about using a lock for the entire map when mutating it
uh they're talking about bucket locks
so you can have multiple threads working on multiple buckets at the same time
neat
ahhhhh icicic
Just take this away: Use ConcurrentHashMap for thread safety.
7 since you're here: https://www.spigotmc.org/threads/working-with-data.562421/
Is public class PlayerDataPersistenceHandler extends PersistenceHandler<UUID, PlayerData> really correct? Shouldn't it be implements?
PlayerDataPersistenceHandler is an interface
^
Interfaces extend other interfaces
I've been trying to search in here to see if it's been asked before but I am trying to detect an item being placed into a players inventory with InventoryClickEvent
Testing the event I can see the pickup action types is good to detect when you first pick up, but when I place the item in a slot it triggers the place action but returns air
because you "click" on air (empty slot)
yea I assumed it was the removal of air
Because the clicked slot is empty. The actual item during this event is on the players cursor slot.
Blud wants geyser protondb
7, how would one use the PlayerDataPersistenceHandler, when intending to use the abstract way of the "data-system"?
yes, is there an efficient way to detect the drop, I want to test for the item being placed in a slot and cancel it if it's not the correct item
maybe InventoryMoveItemEvent? But that's just a guess that sounds like it makes sense, i'm not sure tho
Only really possible if you properly check all possible outcomes for the InventoryClickEvent
That's for moving from 1 inventory to another
I'm printing the action and the only actions that are bing detected are Pickup and Place
do i just leave the interface empty (so it only exists to add the key and value type?
You can also shift click an item in the bottom inventory and move it up
Or drag a stack across the inventories with one item landing in your slot
yea they are printing pickup and place as well
question of architecture. I have a plugin for raids and there is a class that describes the raid object itself. The raid has states that change the behavior of the raid. What is better to describe the logic inside the Raid object or create a RaidManager
Does this modify minecrafts raid events?
How are the states defined?
I meant the actual 'state' of a raid. Is it an enum? Or an interface? Or something else.
Alright, so a Raid needs to be identifyable somehow. So a RaidManager should def be created for this.
However the RaidManager only contains logic managing the Raids, not the behavior of them.
Even Raids themselves shouldnt completely handle the behavior. This responsibility lays with the RaidState.
I would let RaidState be an interface with behavior defining methods.
Otherwise your Raid will have to create a ton of logic and use switch statements to define each RaidState behavior.
mr gestankbratwurst?
7 smile is wurst client ?!?!?!?!?1
hahahaha
lmao
He is Kraut like me π
he's a smelly bratwurst
a stink-bratwurst definitely is a bratwurst that stinks though
Canβt believe he made the wurst client
oh cmon gulliver, that's common knowledge

fan fact: i don't know my grandma's name
the good part is you dont have to
Can just call her "Omi" π
yes
doesn't matter really, she's dead anyway
How can I remove firework effects when player takes firework in his inventory? So like you can modify firework by adding flight durations, trails and I need to remove them and set it to just a normal firework when player's takes it in his inventory.
Same, F
Listen to all events which result in a player obtaining ItemStacks, check if they are Fireworks and remove the undesired effects.
EntityPickupItemEvent and InventoryClickEvent are the events that come to mind.
thanks i'll try
im trying to make a plugin where players can place things made out of multiple blocks
public static boolean Create(Location loc, String type){
Dropper dropper = new Dropper();
dropper.loc = loc;
Structure struc = Bukkit.getStructureManager().getStructure(new NamespacedKey("minecraft", "dropper"));
List<Location> blockLocations = new ArrayList<>();
if (struc != null){
dropper.size = struc.getSize();
for (double x = 0; x < dropper.size.getX(); x++){
for (double y = 0; y < dropper.size.getY(); y++){
for (double z = 0; z < dropper.size.getZ(); z++){
System.out.println(x);
System.out.println(y);
System.out.println(z);
Location blockLoc = dropper.loc;
blockLoc.add(new Vector(x, y ,z));
if(blockLoc.getBlock().getType() != Material.AIR && blockLoc != loc){
//if there already is a machine there say that it failed
return false;
}
System.out.println("Blockloc: " + blockLoc);
System.out.println("Loc: " + loc);
System.out.println("--------------");```
this is part of the code, issue is for some reason `loc == blockLoc` in every iteration
does anyone know why?
Should use .equals
still doesnt work + loc is still just blockLoc without me changing it at all
i never changed loc
oh wait then if i change blockLoc loc and dropper.loc also change? i thought it was just cloning the value
No
Locations are mutable and java is pass by reference for objects
You can .clone() locations to get a copy
no it doesnst or no im not cloning?
alr ty ill try this then

This is such a depated topic
big words lol
still waiting for the &mut 'a update to happen π
it worked thanks alot :)
the what ?
Is that an actual JEP ?
rust
just a tiny thing but you should be using NamespacedKey.minecraft("dropper") iirc
alright thanks im kinda new to this so any tips are appriciated :)
Has there always been this little hammer for final variables and classes in IJ? Lol
I mean I like it but it's new, no?
What is
what hammer
one more thing, im running the create function in BlockPlaceEvent but since i cancel the event the original block just becomes air even though i cancel the event before calling the function, does anyone know a fix?
Java is technically pass by value, no?
that would probably depend on your settings/ theme
but yes for me final has a dif icon as well
i think i have the dracula theme or whatever it's called
but there has always been an icon?
i never realized
i never saw that
Uhhh⦠is this gonna be on the test
final classes should be dif as well
for me at least
I'm using @RequiredArgsConstructor from lombok and I just realized that when trying to implement the data-structure thing by 7smile7 it shows me this issue in PlayerDataManager:
But I also have the annotation in DataManager
yea
what's the error message when hovering over the annotation?
i mean its alrdy defined
usually that shouldn't cause issues though
ah yeah, your DataManager needs a matching constructor
show your DataManager class
@RequiredArgsConstructor
public abstract class DataManager<K, V> {
private final Map<K, V> dataMap = new ConcurrentHashMap<>();
private final PersistenceHandler<K, V> persistenceHandler;
public void loadData(K key) {
V value = persistenceHandler.load(key);
dataMap.put(key, value);
}
public void unloadData(K key) {
Optional.ofNullable(dataMap.remove(key)).ifPresent(value -> persistenceHandler.persist(key, value));
}
public V get(K Key) {
return dataMap.get(Key);
}
}
bump
Not a huge fan of this annotation anymore btw.
I guess your DataManager needs a NoArgsConstructor, otherwise lombok wouldn't know what to pass for those
RequiredArgsConstructor really only looks at the current class and doesnt add params for fields from the inherited class IIRC
(not sure though)
Delombok
yeah the constructor annotations really aren't that great
oh :|
Use Block and getRelative when working with Blocks.
Locations are continuous and not suitable for working with voxels (Blocks).
Blocks are discrete and meant to represent a voxel position.
normally I like lombok but it definitely has some weird quirks
omg
what's wrong with lombok?
I just read "I feel like you could be that gay". And was like what?
hahahaha
π
I think lombok has some neat features, but ive def taken a step away from quite a few of them.
Its good boilerplate reduction i suppose, buuuuuUuut Kotlin!
@tender shard i need an answer
i like the getter and setter annotation
and data
don't really use it for more (except the constructor thing from 7's tutorial)
@lost matrix when did you get discord-helper
o.o
you were always that nitro booster that helps i have never seen your new role
is there any way to make a generic function like the one i have with this? i can only find that i can use an enum for this which has limited values
for what? sorry I was afk lol
I dont understand the question. Explain what you are trying to do in the first place.
basically all I used lombok for were data classes (which kotlin has), SneakyThrows (which kotlin has) and getters/setters (which kotlin also has basically)
only thing it's missing is this delegate thingy
which intellij can generate
@lost matrix i'll just ping you now lol bc i'm still a bit confused.
Do I understand correctly that, with the abstract representation of your data-manager-system you only have to create the extending classes and interfaces? Or do yo need to do more with them?
meh, kotlin
idk why but i like plain java
kotlin is nice. although I used to really hate it at first
maybe at some point in the future
i also hated gradle at first lol
A build system & dep manager
yes
So basically yes
gradle is like maven + more flexible (although less builtin features) + kinda more confusing at first
Agree fully
ive been thinking of learning kotlin a bit as well. but im not sure its worth it yet
it's definitely worth it imho. especially if you wanna do android apps.
look at this beauty https://github.com/spigotbasics/basics
idk if my pride can handle kotlin. i've been doing java for so long
Your XDataManager extends DataManager<K, V>. This is eough for the basic functionality [load, unload, get].
If you want to have additional methods, like public List<SomeData> getLiveTopList() etc, then this should be added to your XDataManager impl.
Otherwise its complete.
The XDataPersistenceHandler extends PersistenceHandler<K, V>. As its an interface, it still requires an implementation to actually provide any functionality.
So if you want to store your data in Files, then you need to create a XDataFilePersistenceHandler which implements XDataPersistenceHandler and
has useful implementations for your data storage. The same goes for other storage medΓums like databases or PersistentDataContainers.
any tips on where to get started?
oh yea i saw the basics thing thats actually rlly cool
Kotlin in my repertoire is for personal projects and smaller projects only.
but like to make plugins with kotlin. dont u need to ship an entire lib with ur plugin?
stdlib, yes. but with minimizing it's not that big. or you can just use libraries feature
basics has stdlib shaded (+ some other stuff) and it's "only" 3.33mb https://github.com/SpigotBasics/basics/releases/tag/0.1.13
Ahhhh. so if I want to store the data in a db i would replace the PlayerJSONPersistanceHandler something like PlayerDBPersistenceHandler?
fair enough. i might look into that a bit
might even write a module for basics sometime then π
PRs are always welcome :3
Yes. And having different implementations allows for example a config entry
Storage: "File"
Which you then can use to chose between one of your implementations.
PersistenceHandler<UUID, PlayerData> handler;
if(storageType.equals("File") {
handler = new PlayerFilePersistenceHandler();
}
But usually you just have one impl because maintinging multiple can be a bit of work.
btw @lost matrix did that gson type adapter factory turn into anything?
Ah, yes kind of. The main problem is the type hierarchy scanning.
There are just so many classes which contain interfaces in their hierarchy. This resulted in the class name being
appended to way more objects than needed.
ahh i see. thats kind of unfortunate
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
Okay, whats the problem
the code or the messages/config? π
The item names the boss bar
I am a Youtuber and don't have much knowledge about plugins
I just want it in English
I think you can understand
Okay do you have the sourcecode ?
I can pay too!
I can fix it for you
No! That's a big problem
I can recode it
well normally you'd just use a config file to make it translatable
config.yml:
boss-bar-text: "This is the bossbar text"
and then you can just do getConfig().getString("boss-bar-text")
It doesn't have
DM me what the plugin is soing then i can recode it and make everything how sou want
But my budget isn't high
I already paid 150$ for each plugin I bought 15 plugins
Hello, can someone help guide me through setting up the "Command Panel" plugin?
Yes, although I've been trying to get some support from them for about 12 hours now and still nothing
that should be the CommandPanels discord ^
well maybe the author is asleep? lol
So I figured I'd try somewhere else
anyway, you're in the wrong channel here -> #help-server
Yes, I've asked in that channel...
How can I get all firework effects and remove them with
fireworkMeta.removeEffect();?
tbf you haven't really asked any specific question
you only said that you didnt get it to do what you want
maybe ask some more specific questions, then someone might have an answer
I asked the same thing i asked here..
this is the wrong channel anyways
this is for coding
#help-server is for plugins (what you need)
like i've expressed already, ive asked there without any response, im asking here since this seems to be an active channel.
still the wrong channel
ask a specific question because people won't respond to open questions like that
Hey @earnest forum
what
Nvm I think I thought of something
But the reason why I'm looping trough the blocks is to check if my structure (dropper.struc) fits
What I ment is that rn I have something that works for any size of structure but getrelative uses blockfaces which are enums and not vectors which means I can't just plug in a relative number
Interesting, thank you.
ocp
nerd
ocp ocp ocp
what entities do hologram plugins use so that their lines are stacked perfectly while the entities have no hitbox ?
bump
Pre 1.19.4, armor stands
1.19.4+ text display
yes but you cant just stack armorstands on top of each other, can you?
Place the struct one tick later i suppose
they arent high enough
No but you can spawn them at specific spots
Give them some stuff then
oooh
i guess
:(
I'm faced with the problem of how to draw up official contracts
?
hey! i have a plugin which is in turkish language. I need to translate in english. I am a youtuber and bought these plugins from a dev but they were in turkish. I don't have the source code as the dev have lost them. I have around 15 plugins which needs to be translated. If anyone can help please message
I CAN EVEN PAY ( BUT NOT MORE )!!!!!!!!!!!!
?services
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/
can you help?
please refer to the link posted above
can't you help
please. refer to the link. posted above
i do not know turkish
i don't think elgar does either
no!
stop ignoring what people tell you. You were told yesterday too.
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/
keep exercising your luck i'm out
problem is not translation, we can do with google translator
but i dont know how to do!
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/
can you help?
lol
Sure.
- Click on the link posted
- Start a thread and ask for a developer
"Did I ever tell you what the definition of insanity is? Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy."
ok sure!
What event is triggered when Minecart is destroyed? EntityDeathEvent is not working
(if you havent reached post requirements check the offering section)
is there a vehicle destroy event
thx
How to copy some files from plugin -> resources -> files(folder with files I need to copy) into the plugin's server folder?
JavaPlugin#saveResource("path in resources, eg config.yml", replace eg false)
thanks
love a good ghost ping
I'm sorry it's me
and if I need to save a folder?
it will copy whatever you pass
eg you can pass something/other.yml and it will save to something/other.yml
but it didn't...
show what you have in resources
Am I doing all right?
oh
not a folder
Well I want to save a folder..
you have to parse the jar file and get the resources there then
If you export a file in a folder then the structure remains when exported.
But exporting an entire folder is not supported in the API currently.
And how to save resource in defined folder? Like from resources -> files->file; to Server's Plugin Folder -> rp-files->file?
"resources" do not exist inside the jar. they are just files/folders in the jar root
ohhh it explains a lot
hey, maybe anyone knows why items disappear when i drop them on the ground it's not always but sometimes?
in survival server
Probably a plugin removing them, or they hit a cactus and get damaged, or you have a scuffed server configuration, or the items actually still exist but vanish for your client. And dozens of other possibilities.
Thats as precise as we can go with this amount of information.
I use this:
if (Match.this instanceof BedFightMatch) {
BedFightMatch bedFightMatch = (BedFightMatch) Match.this;
matchPlayers.forEach(bedFightMatch::resetBeds);
}
But take a look at my code, i have provided my class so you can understand exactly what I am dealing with, I have been having trouble with resetting the beds in their original location before they were destroyed.
BedFightMatch.class: https://paste.md-5.net/ilubelojeq.java
I have gotten as far as placing the top half of the bed only, but I cannot get the full bed to place properly. The #placeBed method in my BedFightMatch.class is from a old thread I found when i was looking. But I have tried everything at this point it seems, I am completely stuck and all i need to do is figure this out and my gamemode can finally be playable!
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "Your command without slash");
is not workin for me :(
it says symbols dispatchCommand() and getConsoleSender() arent real
but theyre literally in the Bukkit class
what am i doin wrong yall
show the actual error
its a warning/error in your ide?
and underlines
this line
clear cache and restart ide
Yes agreed lol
Never seen this before
file menu (if intelij)
Invalidate Caches
fair enough i had JDK 21 die on me the other day
ahem
i dont have that
im on intellij
IF you do a lot of changes to your project sometimes InteliiJ gets unhappy
file invalidate caches
can u give me terminal command?
its not a terminal command
We recommend that you restart the IDE via Find Action: press CtrlShiftA
and type Restart IDE.
Im on 2023.3 lol
im on 2024.1
Ew
They took away all the stuff im familiar with
Oh, if i upgrade can i recreate 2023.3 Lol?
if its what i think so yeah
just disable the new ui or show main menu in a seperate toolbar
Btw EpicEbic, can you scroll up and read my post? I am super stuck
this one.
nothing changed
what spigot version are you on
its still saying im doin smt wrong
im not sure if i should even be asking this in a spigot serv
this is a paper project
smh
but its essentially the same thing isnt it
?fork
SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.
Yes.
I mean
Its literally the same tho?
Same API
no
the api's arent the same
you can access all spigot api in paper (currently) but you cant use paper api in spigot
can't use paper api in spigot*
ye
Anyways can you please assist me with that Bed Blocks?
best i can say is place both halfs of it
That really helps. (sarcasm)
I mean clearly thats my goal here, I talked about not knowing how to place the bottom half of the bed in my post. I just need help because I have never had so much trouble with placing a block before, but BED_BLOCK (s) are so confusing.
theres most likely something relating to it on a beds block data
or state i dont remember
You guys are telling me stuff I already know though which is not helpful
That I posted
you set each part
using Dirctional to get each part
or setFacing if setting the direction
ie (Bed) Block#getBlockData()).setPart(Bed.Head)
setting data back of course
then do the same for the other half
using setFacing to align
Im on 1.8 guys sorry i should have said something
In reply to this..*
does Material.bed.isHead exist in 1.8?
If I remember 1.8 used damage values to set teh color
Yes we have:
- isHeadOfBed
- setHeadOfBed
- setFacingDirection
- getFacing
then just use that
I tried to change the player skin using: ProfileUtils.applySkin(player, "21534c9bea4a10745128f0d7d5bd8fb1848ac82c793323be5c0612a91dd58bbd");
applySkin:
(1.19.4)
public static void applySkin(Player player, String skinURL) {
ServerPlayer nmsPlayer = getNmsPlayer(player);
broadcastPacket(new ClientboundPlayerInfoRemovePacket(List.of(nmsPlayer.getUUID())));
PlayerProfile playerProfile = player.getPlayerProfile();
PlayerTextures textures = playerProfile.getTextures();
try {
textures.setSkin(new URL("https://textures.minecraft.net/texture/" + skinURL));
} catch (MalformedURLException ignored) {}
broadcastPacket(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, nmsPlayer));
ServerLevel nmsWorld = nmsPlayer.getLevel();
ClientboundRespawnPacket respawnPacket = new ClientboundRespawnPacket(
nmsWorld.dimensionTypeId(),
nmsWorld.dimension(),
BiomeManager.obfuscateSeed(nmsWorld.getSeed()),
nmsPlayer.gameMode.getGameModeForPlayer(),
nmsPlayer.gameMode.getPreviousGameModeForPlayer(),
nmsWorld.isDebug(),
nmsWorld.isFlat(),
ClientboundRespawnPacket.KEEP_ALL_DATA,
Optional.empty()
);
sendPacket(player, respawnPacket);
player.updateInventory(); // Update the player's inventory because it will be empty after the respawn
}
It apparently still won't change the skin, wtf am I doing wrong? :(
private void placeBed(Location loc, BlockFace face) {
Block block = loc.getBlock();
BlockState bedFootState = block.getState();
Material type = Material.BED_BLOCK;
if (bedFootState.getType() != type) return;
Block bedHeadBlock = block.getRelative(face.getOppositeFace());
BlockState bedHeadState = bedHeadBlock.getState();
if (bedHeadState.getType() != type) return;
bedFootState.setType(type);
bedHeadState.setType(type);
MaterialData footData = new MaterialData(type);
bedFootState.setRawData((byte) face.ordinal());
bedHeadState.setRawData((byte) (face.ordinal() + 8));
bedFootState.update(true, false);
bedHeadState.update(true, false);
}
look
Also: after I try writing something in chat after executing this, I get kicked for "Chat message validation failure"
I want to get the server TPS in code. How to do that?
They didn't have colors yet iirc
differences between runTaskTimer and runTaskTimerAsynchronously ?
The latter runs it on a different thread
hey! i have a plugin which is in turkish language. I need to translate in english. I am a youtuber and bought these plugins from a dev but they were in turkish. I don't have the source code as the dev have lost them. I have around 15 plugins which needs to be translated. If anyone can help please message
I CAN EVEN PAY ( BUT NOT MORE )!!!!!!!!!!!!
?service
?services again
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/
I have a translator.
DM?
You will end up getting banned if you continue to ignore what you are told
Who will?
He doesn;t need a translator. He wants a dev to decompile/translate and build a new jar for him, as he has no source.
for 15 plugins
You know him?
He's been askign for two days
and been told multiple times to make a post in services
Is that even legal
questionable
Bro how can I make a forum post?
Yeah man i tried that already just didn't wanna burden you so I tried it again!
And just don't get anything. Its not setting the beds back to where they were.
This time It doesn't even set the beds, their just not their. Before i was able to get the top half of the bed only
You seem to be exiting your code in two places if it's not a bed block
so if the bed is broken your code never runs
I have made a forum
Hey
Hi
yes?
You look same
Hey!
wtf
Idk sometimes you just gotta talk to yourself
bro is autistic enough
is there a way to have something like "instance of Farmable" or smth like that ?
Well, there is BlockData which can be instanceof Ageable
Oh, thats a great idea lol
hey!
forgot that it even exists π
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
I have problem regarding my translation of plugin
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
create a services thread or contact a developer on the offering section
Not getting any good dev
find a services discord such as helpchat and create a post
Can you give link or something
hey so i tried using regex (no idea about it sorry xd) and have this code =
private final Pattern effectPatern = Pattern.compile("effect\\[(\\w+),(\\d+),(\\d+),(\\d+)] @OTHER");
public void setEffect(String input) {
Matcher matcher = effectPatern.matcher(input);
if (matcher.find()) {
System.out.println("a");
this.name = matcher.group(1);
this.level = Integer.parseInt(matcher.group(2));
this.duration = Integer.parseInt(matcher.group(3));
this.chance = Double.parseDouble(matcher.group(4));
}
}```
But the string matches the patter but "a" isn't printing, here the string:
those values are name, level, duration, chance
does someone know why this happens?
How do I make the list of approved materials for /hat everything in CMI?
Like is there a way to do it without adding every item in minecraft to the list
do u thing \d+ match 0.9?
effect\\[(\\w+),(\\d+),(\\d+),(\\d*\\.\\d+)\\] @OTHER
however can the number still be 1 or smth like that?
or should be 1.0
.9 1.9
no no, like exact 1,2,3...
i do not understand
Like, that number accepts numbers with decimals right?
but if the number is just 1
it won't accept it right
yeah, but u want it?
no, but just wondering
ok
hi, is someone can help me to do custom inventory gui, using spigot and ressource pack, i really need help to understand how to match ressource pack and a custom inventory gui. I apologize if it's the wrong channel or wrong discord to ask help tag me for any response or dm me pls
You just set the name of the inventory to the custom character you make
Or characters
Characters ?
bump
I read on reddit, i said Unicode or other things...
Sounds like another plugin might cause this
was happening with no other plugins on the server
I juste need to put the same name of the gui as the gui texture file ?
This server is running Paper version git-Paper-408 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: c5d168c)
i saw a github issue on paper's repo about this issue
OP resolved it by setting the spawnRadius gamerule to 0
but that didnt resolve my issue
tried a very big value too
Debug the event. Add a debug statements and print out the location the player is being set at
already done that
the event IS being called
but its ignoring the spawn location i set
only if the player hasnt played before
otherwise it works
tried teleporting the player in onJoin too
async
but doesnt work either
And you are sure the event is fired either way?
Yes
Are you on the latest version? Because im about to test that out myself.
im 70 versions behind
408
btw it ignores the world spawn point
im suspecting it might actually be something with mv core
because before i added that plugin i didnt debug my code, might've had a mistake during that time
only with it on the server
Alright i tested it out on both spigot and paper.
public final class SpigotSandbox extends JavaPlugin implements Listener {
private Location getSpawnLoc() {
return new Location(Bukkit.getWorlds().get(0), 0, 100, 0);
}
@Override
public void onEnable() {
Bukkit.getPluginManager().registerEvents(this, this);
}
@EventHandler
public void onSpawnLoc(PlayerSpawnLocationEvent event) {
event.setSpawnLocation(this.getSpawnLoc());
getLogger().info("Has played before: " + event.getPlayer().hasPlayedBefore());
}
}
It works flawlessly.
Can a counterfeit DRM system be created using https://www.spigotmc.org/wiki/premium-resource-placeholders-identifiers/ to prompt plugin users to input their SpigotMC ID used when downloading the plugin into the configuration file, making it more difficult for malicious distributors when spreading premium resources (as they might be compelled to display their SpigotMC ID)?
How would you prompt them?
Require users to enter their SpigotMC ID in the configuration file and compare it with %%__USER__%%. If it does not match, stop the plugin.
then they can just remove that part of the bytecode
or the people who distribute the plugin can tell the ones who download it to put in X user id
Yes, but introducing it this way makes it harder to directly distribute the plugin in a public place
thats basically against the rules
best you can do is not provide support for them
databases exist
- code obfuscation, but kinda hard to distribute unless you already have an audience as it doesn't seem as safe to buyers.
USER as in the env variable?
Can new worlds be generated async?
Kinda need a few things since if its not obfuscated, easier to remove in byte code
I think so iirc, I had a skyblock plugin that generated islands async
Ok interesting
Don't quote me, that project was like from a year ago
But this obviously doesnβt require an internet connectionπ€
I missed "without any manual installation steps"
π
Hello, how can I get a PacketType.Play.Server.OPEN_WINDOW_MERCHANT to edit the title of the inventory?
(I'm using ProtocolLib)
Here is the code I already have : https://paste.md-5.net/edosimukef.java
Dis packet only contains the merchants offers, right?
Logically it should contains the title?
What are the printed fields?
Forjava event.getPacket().getModifier().getValues().forEach((struc) -> { System.out.println("Modifier: " + struc); }); event.getPacket().getStructures().getValues().forEach((struc) -> { System.out.println("Structures: " + struc); }); event.getPacket().getOptionalStructures().getValues().forEach((struc) -> { System.out.println("Opt Structures: " + struc); }); event.getPacket().getStrings().getValues().forEach((struc) -> { System.out.println("Strings: " + struc); });
it's
PacketContainer[type=OPEN_WINDOW_MERCHANT[class=PacketPlayOutOpenWindowMerchant, id=43], structureModifier=StructureModifier[fieldType=class java.lang.Object, data=[com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@6a032fa3, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@2ed1ed, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@3dd64473, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@56998435, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@2594c772, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@5343db94]]]
[21:34:49 INFO]: [Named-Villagers] [STDOUT] Modifier: 10
[21:34:49 INFO]: [Named-Villagers] [STDOUT] Modifier: [net.minecraft.world.item.trading.MerchantRecipe@469b67dd, net.minecraft.world.item.trading.MerchantRecipe@45b7872b]
[21:34:49 INFO]: [Named-Villagers] [STDOUT] Modifier: 1
[21:34:49 INFO]: [Named-Villagers] [STDOUT] Modifier: 0
[21:34:49 INFO]: [Named-Villagers] [STDOUT] Modifier: true
[21:34:49 INFO]: [Named-Villagers] [STDOUT] Modifier: true
[21:34:49 INFO]: [Named-Villagers] [STDOUT] Structures: InternalStructure[handle=[net.minecraft.world.item.trading.MerchantRecipe@469b67dd, net.minecraft.world.item.trading.MerchantRecipe@45b7872b] (MerchantRecipeList)]```
You need to listen for the window packet
How would that help?
oh yeah packet
to override the work of the title
to change it
but nevermind
so PacketType.Play.Server.OPEN_WINDOW ?
This is the packet you want
okay so it's this one
I think so
let's try some "debugging" (actually printing)
[21:41:53 INFO]: [Named-Villagers] [STDOUT] Modifier: net.minecraft.world.inventory.Containers@35c148d
[21:41:53 INFO]: [Named-Villagers] [STDOUT] Modifier: empty[style={hoverEvent=d[action=<action show_entity>, value=net.minecraft.network.chat.ChatHoverable$b@a5a72d1d],insertion=e1941780-6807-4846-976b-dc97dacae5c3}, siblings=[literal{Toolsmith - Toolsmith - Null}]]
[21:41:53 INFO]: [Named-Villagers] [STDOUT] Structures: InternalStructure[handle=net.minecraft.world.inventory.Containers@35c148d (Containers)]
[21:41:53 INFO]: [Named-Villagers] [STDOUT] Structures: InternalStructure[handle=empty[style={hoverEvent=d[action=<action show_entity>, value=net.minecraft.network.chat.ChatHoverable$b@a5a72d1d],insertion=e1941780-6807-4846-976b-dc97dacae5c3}, siblings=[literal{Toolsmith - Toolsmith - Null}]] (IChatMutableComponent)]```
Interesting
siblings
yes
I think I can do the remnant
Thanks for reply
@Override
public void onEnable() {
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(this, PacketType.Play.Server.OPEN_WINDOW) {
@Override
public void onPacketSending(PacketEvent event) {
if (event.getPacketType() != PacketType.Play.Server.OPEN_WINDOW) {
return;
}
PacketContainer packet = event.getPacket();
packet.getChatComponents().write(0, WrappedChatComponent.fromText("Utter garbage"));
}
});
}
okay thanks
lol
#getEntityId?
in packets
Safe the id you use to spawn it in the first place
but how can I identify him then?
Wdym?
I need to retrieve the good entity in the list
You want to get a bukkit entity?
Your packet entity doesnt exist on the server, therefore you cant get it
Indexes start at 0
yeah I know but I forgot at this time lol
how can I get insertion?
(from packet.getModifier().read(2))
I've done a bad things with regex, if someone knows a better solution...
I am using multiverse core to generate and regenerate mining worlds but when I have it reset every x amount of hours it only takes a minute to generate but the server is using much of the server resources to create this world it makes players not able to move. Is there a way to have multiverse core take less of the server resources and make the world slower so players can still play like normal when the worlds are resetting?
Nope
Yeah worldgen is pain
I eventually just pregenned some worlds to use for resource worlds
Could do some trickery with a proxy and two servers with a shared inventory or some inventory funnel / bank system
Generate a large world and teleport players to different small world border areas?
Every hours sounds very frequent....
Surely weeks between worlds
Make regenerating resources hypixel skyblock style
The concept is the players go into this small pvp zone for resources and whatever then mine/collect there they can take out if they can get to the exit or lose if they die. They dont lose any of the items except what they gained while there. I like the idea of using the same world just different areas so I might look into that
Md5 coming here with the un-smooth brain ideas
how do i check if a string in my config is empty?
ok so
is the workflow for testing plugins is to make edits -> export -> restart server -> test?
is there an easier way or do I have to restart the server every time
you could research hotswapping
its possible to live reload certain code
but for example you cant hotswap new methods, editing method names
Empty or not set?
alright
Restarting is the best way
not set i think
whats the best way to store data about a player
simple stuff
like I just want to have a number 0,1,2 for their personal difficulty level
isSet is a merhod
?pdc
I was thinking scoreboard but maybe theres a better way
?
but i need it for a specific string tho
ohh alrigth
so if its set it should return true?
yup
so in datapacks you can't really make custom crafting recipes for custom items
you have to do some workarounds and it looks bad
can you do that in spigot?
Yes
you can do custom custom crafting recipies in spigot yes
on the spigot forums can i change my resources profile after i uploaded it
yes
where specifically i dont see it
righthand sidebar. But check you don't have a message telling you 2fa is required
same deal, edit resource icon in righthand bar
YAY
Tbf you can also do that in datapacks once 1.20.5 rolls around
yes please β€οΈ vast swaths of them seem to work fine.
Pretty much everything should work
As geyser is just a general protocol translator
As for whether the plugin is fully useable by bedrock players is another story
and this is the crux of it. some indication that it will work flawlessly with geyser would be great. i think way more people would dive into this realm of minecraft if they knew how easy it was to have a mildly modded minecraft experience with all their java and bedrock friends.\
Well
Anything that relies on something other than a left click in inventories wonβt work
Anything using display entities wonβt work
where can i post images? i screenshotted the list of 57 plugins i have
anything requiring use of console commands also seems to work fine
verify
https://wiki.geysermc.org/geyser/current-limitations/ any plugins that rely on stuff listed 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 you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
im sure ill get to 100 by the time ive finished fleshing it out.
nova and vane didn't seem to work.
i know i tried to fly too high even trying nova, but i was hopeful for vane trifles
currently having a problem where tp'ing a player away from world x to y causes a 'moved too fast' to trigger. putting the player back at their initial position.
usually this is not an issue, but in this case it's a duels arena they get stuck in. not all teleportation away from the arena is handled within my plugin and effectively blocking it seems unreasonable.
putting the tresholds up is not really an option, unless propely explained.
is there a way to force-tp the player in this specific case, even if that means bypassing the anti-cheat logic from the server.
running 1.12 (unfortunately...)
Anything resource pack based wonβt work directly
But you can make bedrock resource packs
how do i dive down that rabbit hole?
tbf that plugin is actually sick as hell
yeah aye it would be sick if it can be made to work with bedrock
nah screw bedrock
even parts of it. but there are plenty of individual mods to acheive some subset of its functionality
i have lots of console friends and every now and then one will buy a realm for a month and it fizzles. this consolidates all of us for free.
FTB with 300 mods is way cooler, theres no doubt about it.
Someone help.. My "TAB" is fucking, it's all narrow, and sometimes it refreshes and becomes wide again for 1 millisecond. I use TAB plugin by NEZNAM
Probably caused by that NPC
and there's not much you can do about it
anyways it's a question for #help-server
I think of creating a variation of a citybuild plugin. But i dont know how to it. i dont know how to develope what a specific player owns, how its saved and on what its based (easiest is like i think to make it based on chunks so the player can claim them or so. But Citybuild plugins dont use chunks, theyre independent of them) somebody knows some tutorial or so. I cant find anything and i also cant figure out how to finde such things as i need
Store AABBs and when interactions happen check if they're inside. If you want to improve performance use an R-tree
Also use the BoundingBox class
don't forget to check for the world (create a wrapper that extends the normal bounding box and has a world)
wait so java void cropBreak(BlockBreakEvent event) { System.out.println(1); if(!(event.getBlock() instanceof Ageable)) return;
Is this the correct way to check if it's an ageable block? Crop
You need to get the block data and then use that to check if it's ageable
is ther some way to see if some one stole something out of a chest.
And is ther a way to see some one ther inventory when ther not online?
there is no way for minecraft to know that they're stealing
so custom plugins will prob be your way
do you know any plugin where i can see someones inv when ther not on?
Sounds like a question for #help-server
whats the diff between help server and help dev?
they both can help me right?
Help development is for coding related questions
help dev is for people making plugins
ahh sorry
So unless you code the plugin yourself you should ask for plugins in help server
