#help-development
1 messages ยท Page 1130 of 1
They do not properly support vault
CMI is a mess of a plugin
looks like
Imagine using vault ๐
reliable API
what should I use?๐คจ
Vault is still the standard economy provider plugin
vault
No, that just means your thing is incompatible with everything else
Vault is a long established API/plugin. Use it and avoid stupid plugins (like cmi) which do not properly implement it
thanks
If you HAVE to support cmi, write your own interface for it.
Don;t use custom (hacked) vault
most italian servers use cmi
then write yoru own interface for it
I use it for now because I am comfortable with it in my test server
detect cmi first, if not found fall back to vault
couldn't I just issue a warning in the console saying to use the injector?
you could
but you will get asked repeatedly as server owners are often kiddies who never read errors
thanks for the suggestion
Hey guys, I want to get all pasted Blocks befor or after pasting a schematic via worldedit. How i get them?
youre probably better off looking up worldedit's api
hey this is more of a java question rather than a spigot question but...
i want to create a web panel for my minecraft server so i need a RESTful api on the minecraft server and a client hosted in some other server (will probably be a NextJS app). so there are 2 options:
- make a single plugin that carries the api and the server interface
- make a plugin that has the server interface and a seperate api with javascript and make them talk through gRPC
which of the options is better and if its the first one, what framework should i use for the api?
Can u load files async?
yer
First, definitely more simple. For the library I would recommend javalin
Is there any scenario where I get player connect event, dont cancel it, and player doesnt join server
Also, is there like player disconnect event?
another plugin could cancel it ig
in the hit event cancel it if its an AS

?1.8
Too old! (Click the link to get the exact time)
less than 10% im pretty sure
bStats show 4.2%
if(! Tag.SHULKER_BOXES.isTagged(stack.getType())) return 0;
BlockStateMeta bMeta = (BlockStateMeta) stack.getItemMeta();
if(bMeta == null) return 0;
ShulkerBox box = (ShulkerBox) bMeta.getBlockState();
unrelated but does this provide a snapshot of the inventory of the shulker box item in question?
wouldnt i need to write the meta back?
box.update()
alr then
the meta might need to be wrote back, i dont remember how block state meta works for it all
hypixel is not 1.8.8
hypixel is a modified fork of 1.7.10 that wouldnt show on bstats
iirc theyre working on updating loads of stuff
the only thing that matters to them is being able to connect clients from like all versions
but they have people full time writing their server
?
if you have the experience and time to maintain a 1.7.10 fork for this long like hypixel did, you would not be in here asking questions
instead you would be making component pr 

wdym are you stupid. Hypixel devs literally drop in here and ask us how to do their jobs
yea choco is that stupid
yeah thats why choco works for them
he helped them so much he now gets people to help him
yea
he out-helped himself
thats why you never see him here anymore
hes asking for help in paper
ohhh
dude only has 4 messages in paper-help 
he's on his alt account
we all know paper has a secret #hypixel-legacy-1-7-10-heavily-modified-legacy-spigot-fork-hypixel-devs-only channel
how do you know about this
I have my information providers
time to look for the mole
gg
you'll never find him
it was @young knoll all along
he works at hypixel
time to ban owen
Sherlock "lynx" Holmes
sherlynx
it was a plan to get owen banned all along you fell right into my trap
lynxlock
don't mind it

gonna lynxlock him out his house
๐
๐ฅบ๐
guys what reflection method in java returns all fields (even from superclass including all private ones)
Class#getFields() doesn't return superclass ones
Class#getDeclaredFields() doesn't return private ones
correct me if im mistaken
erm
getDeclaredFields returns all fields defined in that class
getFields returns all non private fields iirc
pretty sure you need to do a loop over superclasses to get all fields
in 1.8 you would have to detect the hit in https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/ProjectileHitEvent.html and teleport it 1 block further along its Vector. Not sure what you can do to prevent the hit though
is there an event for when a player blocks an projectile with a shield yet? i want to make proper collisions for once but last time i tried i could only increase the coverage, not decrease it coz i couldnt allow projectiles through
I cannot find an event thatโs really even close, unless entityDamageByEntityEvent gets fired when that happens
nope
Not sure thereโs an event then, tbf not even sure how youโd make a custom event for this either
?ban @tardy garden ban evasion
Done. That felt good.
Con hi!
helu
why did he get banned ๐ค
-ban evasion
inapproprate behavior amongst other things @real ridge
and why delete ur message?
we log it anyway
because it didnt matter to me anyways :3
also, thought it was off topic to the channel
yea that's true, fairs
privacy in discord is horrendous tbh
mye sadly
you literally have to threaten discord with legal action to get ur shit removed
๐
What event gets called when playerconnectevent gets canceled?
there is no player connect event
I'm using the mythic mob api, and I'm using the MythicMobDeathEvent, but it's not triggered.
https://paste.md-5.net/onawarayag.java
Logs:
[17:00:35 INFO]: Named entity EntitySkeletonWither['Skeleton King'/294, uuid='732fcbee-0876-412f-99ab-25161c5b179f', l='ServerLevel[world]', x=-110.54, y=140.00, z=31.70, cpos=[-7, 1], tl=69, v=true] died: Skeleton King was slain by WorkWolf_2 using [Schiaffo educativo]
it should print "bru", but it does not work.
i'm debugging for hours now
I'm wondering if use EntityDeathEvent and get the mythicMob instance from the entity it's okay, but Idk
Gongas?
does PlayerQuitEvent get called when player quits server?
Yes sir
gradlew build
or mess with the buttons to the right if you're using intellij
ight, nice
A problem occurred starting process 'command 'git''
I guess run it with the --stacktrace or --debug flag
or try to build in eh
whats that git thingy windows has
Ah Spigot the notorious velocity help server
git bash?
Ye
Well just start the git bash thingy
and run ./gradlew build after cding into the velocity folder
also, just to make sure, but you cloned velocity right?
i love spigot the velocity help server
you didn't like download zip it
no git bash is a program
not a command
Welp
Well if it also failed to build, it cannot load the project setup from gradle
gg blaming the tools because you didn't read the docs
calling gradle shit because 1 project doesnt work doesnt add up
who else
what is a gongas
hey guys, i am trying to change the default riptide time and it works almost perfectly. I am able to change it but it looks like the client doesnt care about it very much. Is there a way for me to fix it? I am changing the time using packets and I want the player to be able to riptide anywhere he wants
Hi guys, I want to get all pasted blocks/locations from a pasted schematic
Thats my code but its returned the originial locations of the schematic
https://paste.gg/p/anonymous/f9255f20bbab42caac52fa10f6517bd4
Why do you want to do that
some guy whos making a shitty 1.8.3 cracked server and got banned on like 15 accounts here already
oh and probably like 12 yrs old
I want to get all the blocks to remove them later
EditSession has an undo method
yeah but idk when it should be removed. I want to paste some schematics
Thatโs dedication
You can just save the edit session session somewhere
yea con has not had fun wiht him
for some reason i can just always tell if it's him
if the font is ubuntu, language is portuguese, he's using gnome, termux, or any "twinsmc" is referenced, it's him
are you actually serious
ooh not a good path to be heading down
lmao this should be pinned to save us from future trouble
if you're not gay, why do you got "sperm" in your username
?ban @round pulsar Anti LGBT messages
Done. That felt good.
common coll W
Yeah thats great but I think I need to explane what I want to do
I want to remove the schematic when a Player breaks a block of this schematic and pasting it back some minutes later
Will a 10kx10k map cause lag on my server?
@cedar saffron
good
im downloading the backup rn to make sure its here
๐
good wishes to the gang rn
oh wait wrong channel
Chunks or blocks?
blocks
server specs? Number of players?
lots
16ram?
It does depend on the server
server, version etc
You can start with 16GB
my rule of thumb is for 1.13+ its 300mb/player but idk where i got that number
but depending on what the players are doing you might need more
CPU power and network bandwidth is most important for lots of entities and players
Does it matter if players won't use all the chunks on the map?
1gb easily is enough for 80 players or so if they're all in the same few chunks
.equals
does anyone by chance know since which version the function Mob#setTarget(LivingEntity) exists?
1.13
Older versions do have Creature#setTarget not sure if it does the same thing though
thank you very much
because I am in 1.8 they indeed have setTarget and it seems to work like it sounds
(Creature)
Spigot doesn't change effect time
Only if black hole appears
And once you are on the horizon you are done and time is slower for you
And then you get pulled in both directions like a gum and then you ๐
My spigot server runs in a black hole
The hardware is in mint condition it hasn't aged a second
XD
is it possible to have entire ItemStacks with all the meta in pdc?
if its not then how to save ItemStacks?
You can
oh
You can use BukkitObjectOutputStream to convert them to a byte array
Yes
When I upgraded to 1.21, I stumbled upon a problem. Namely, the following code seems to always print out false, when I'm in creative. When in survival, it prints out true. It makes no sense (logically), that it prints out false, since I'm holding a full stack of arrows. I found out the reason though. When I'm in creative, the arrow seems to have some key-value pair in its meta, with the key being unhandled and value being gibberish resembling a base64 encoded string. Does anyone know if it's some bug or an intended change?
@EventHandler
void onBowShoot(EntityShootBowEvent event) {
if (event.getEntity() instanceof Player player) {
System.out.println(player.getInventory().containsAtLeast(event.getConsumable(), 1));
}
}
Sounds odd
Could you send that string
Looking at the spigot source that unhandled tag appears to be what happens to certain nbt tags that spigot doesn't know how to handle
Does it happen with a new stack of arrows?
H4sIAAAAAAAA/+NiYOBikM/NzEtNLkpMK7HKzCtJzEvPTMpJjS8oys9KTS7JzEllYAAAzByQqycAAAA=
yea
i even went as far as to create a whole new server with a new empty plugin project
and only pasted in that event handler + registered it
then went in-game and gave myself a normal bow and a stack of arrows
(still happened)
wdym by that?
What's wrong with that site
the site you mentioned do not use that
they illegally distribute spigot
its often out of date and who knows what else they put in their
the only official source for installing spigot is BuildTools, which has a nice GUI and everything for you now too
the wiki page was even updated to be less confusing!!!
so please stop using the sites that illegally distribute spigot
Damn, didn't know that, it was the first result when I googled "download spigot"
minecraft:intangible_projectile: If set, this projectile item can't be picked up by a player when fired, except in creative mode
Looks like Spigot isn't aware of that tag in the version you're running
it should be supported
declaration: package: org.bukkit.entity, interface: AbstractArrow, enum: PickupStatus
That's for the entity
That tag is a new data component
and since data components were just added to minecraft it's most likely missing
from Spigot
Yeah if I'm reading the source correctly it's missing from Spigot
It looks like it's been overlooked
sounds like @young knoll or @river oracle have some work to do
since there is no Projectile item meta that would have that tag
how can a component be missing, it isn't something Spigot has to keep track of, is it?
its missing in api support
do u know if there is a plugin that uses ai to build stuff for version 1.12.2?
Wtf
He'll nawh
i doubt that exists for any version if free and update
Spigot adds unkown components to the nbt which is what the issue that started this was
if you want to use AI for plugins, then you're kinda out of luck, since most of the public models have scarce data about modded server platforms
#help-server this channel is for development
your best bet is probably a private model that reads the whole tree of dependencies and serves that as context
doubt at present using some kind of AI would be any better then doing it yourself
are u offering to build something from a book that has 540 floors and over 32,000 rooms?
you don't need AI for this
I mean, you can do that pretty fast with plugins/mods like Axiom
worldedit brushes too
I think coll made something that can build dungeon rooms dynamically
could probably also make a procedurely generating world generator
worldedit kinda falls flat in comparison if your build is going to be hella big
yeah
@young knoll didn't you make some dungeon room thing?
I'll let coll be to blame for the api getting worse
No thanks
coll is in the purple spigot
Maybe I will too after 10 more years
since when is rich prescence that specific to tell which gamemode you're currently playing
or is that some hypixel mod
mod
makes sense
just start helping people on jira, md will dm you and poof
There are also SkyBlock-specific mods for Fabric and whatnot
Skytilities I think is one?
Something like that
miles hows ur food
imagine your server becoming big enough that people make integration mods for it
is there anything for forge 1.12.2
Gross helping people on jira no thanks I rather dunk on people
just make a lot lot more prs then
and make them controversial and get them merged
we wouldn't know, this is a server platform community

All of my PRs are going to be controversial
I'm just a controversial guy
sadness.
just a white guy coolin' someone said once
I would PR for paper but they don't pay me enough for that
They only pay me enough to stop me from developing CabernetMC
My rates are quite steep too I doubt they could afford to be graced by my expertise
the only thing I can see on google is wine
did you make mc-branded wine
Yeah well it hasn't been developed
Because paper pays me a lot to not do it
I'd like some spigot-flavored wine tho
Stop lying
No it was me
What is cabernetmc again? I only remember that i suggested that name
No i did
Def not
It's a server software
I need the royalty
For the next generation
I know, I'm just joshing
I was even happy because cabernet and mc rhyme in german
breh stop you're blowing my cover
Whatโs our safe word?
As part of their "Maintenance" I receive 25% of all income from paper organization to keep it's development from progressing
The paper team is afraid of my genius. They've spent countless hours and dollars to try to prevent my inevitable rise.
makes sense, gotta enforce those monopoly rights
he is the hosting costs on here
Cmarco
I've ascended beyond what that fool could ever think up
DOJ vs Paper illegal monopoly when
i still love this
My money is given under the table
They don't want my name to get out
just hire yourself as "consultant"
The issue is I am not allowed to have status for then my word would collapse at the exposรฉ to my genius
Biblioklept
ok I'll write that down
sigh I was trying so hard to gaslight y2
Once is taking damage from being in a fire block
The other is damage from the burning damage over time effect
You've made my day
I forget do I need this extra set at the end?
if (!container.has(COLLECTOR_UPGRADES)) return
val upgrades = container.get(COLLECTOR_UPGRADES, PersistentDataType.TAG_CONTAINER)!!
for (key in upgrades.keys) {
val remapped = remapper[key.key] ?: continue
val currentLevel = upgrades.get(key, PersistentDataType.INTEGER)!!
upgrades.remove(key)
upgrades.set(remapped, PersistentDataType.INTEGER, currentLevel)
}
container.set(COLLECTOR_UPGRADES, PersistentDataType.TAG_CONTAINER, upgrades)
I don't think so
Did it print the text from onenable? Are your listener methods annotated?
you typed OnEnable
case matters
well because OnEnable could just be a regular method
for yourself
Damn i thought the person with the code sent this, telling us they already renamed onEnable lol
๐ค
did you? I am also curious about that except with the List types instead (don't know if these are paper specific or not)
You need to call set again, yes
welp, figured as much but I had hoped that wasn't the case
it's probably better to make a List wrapper that exposes a commit method or something, same for the tag container type
its not a list type
I'm using a TAG_CONTAINER
I'm aware, however they are similar to list type
blame lynx that its a clone ๐
I mean, it being a clone can't be helped, it's recreated when deserialized after all
but unmodifiable? Damn you lynx
I just realized I pretty much just made my own DataFixerUpper lol
exactly kick him off the paper team
I'll use the power given to me by the council of CabernetMC to execute this task
I hold large amounts of powers I suppose I could get rid of him myself
I could simply threaten to develop CabernetMC
if you want to tag entities in a certain way, don't use the custom name but a PDC tag instead
?pdc
I'd prob rework this into "entity templates"
yeah, that doesn't say anything about entity PDC
||could just link to Paper's documentation about it
||
it shows you how to set PDC on an entity
that should really be all you need
Something thrown together looks a bit like
public interface EntityTemplate {
void applyTo(Entity entity);
}
public class SlimeZombieTemplate implements EntityTemplate {
@Override
public void applyTo(Entity entity) {
Zombie zombie = (Zombie) entity; // make sure to do safety checks
...
}
}
You can add a getId to entity template if you want to mess with those
Make a registry and store ids in a list in the entity's pdc
When the entity loads back, apply the template again

I'd argue that considering there's a huge bunch of plugin devs whose first experience in programming is in fact, plugin development, there's worth in teaching patterns like the one above
since they don't have the experience in order to know how to effectively apply these APIs into their plugins, however one can always make-do with an already existing structure
okay... i'm working with display entities to make a smooth axe throw. every rotation though, it does a little bump as if it hit something, reels back, and then keeps going as if nothing happened. https://paste.gg/p/anonymous/795d4e9a6a0d4d33ac7f2320cf75f91b what did i do wrong?
Could it be the fact that the axe texture isn't centered?
no... i don't think so
gif would be good as its a visual thing
you have no cap on angle
Hello! Is it possible to create a book and then open it for player without adding it to player?
Writable book no, written book yes (I am pretty sure)
So just create a book with text and then just show it for player, right?
Yeah I haven't done it in a long time but you can create an itemstack and then something like player.openBook();
Ok, thanks. I'll try
Yeah looks like the itemstack material needs to be WRITTEN_BOOK
Hello again! Don't understand how to do this text clickable so if player clicks on message it will suggest him website
My code:
https://paste.md-5.net/molekizufe.java
You can't just convert a component to a string like that
How can I do this?
You will need to use NMS or the Paper API
Spigot doesn't have great component support for it's api methods
Yes
oh it's under .spigot()
Mhm
Spigot function is related to spigot api only
Well that is dying soonโข๏ธ

Lynx youโre not being very skibidi right now
keep yapping
What the sigma
is there an easy way to make a mob not move but still abide by the physics system (so not noai) but not move (so not aware won't work) and doesn't rely on teleporting the mob to the same location for every tick
basically I want to clear every goal or brain feature for a short amount of time and then restore it
was hoping the api might have something for it
Why does not aware not work
aware still makes them move, no?
They can be pushed
or maybe it made them finish moving to where they thought they were going
But they shouldnโt move on their own
You could also set their move speed to zero
Though they will still turn
yeah can't have them turn either
need them to be absolutely still of their own volition
But still have gravity
yes
Mmm
and be able to be pushed by vectors
to be clear
this is for animations
and custom models with underlying entities
Yeah you can try aware I guess
Are the underlying entities not NMS based
not custom entity classes, all api
set move speed to 0
they would still turn
then cancel any movement that includes their yaw/pitch changing
how do I cancel movement via the spigot api for an entity
NoAI it or something
Implement the event yourself
for the specific entity you want to monitor
spigot doesn't have a EntityMoveEvent since it'd lag crazy
it wouldn't be cancellable then
Setting the follow range to 0 could disable them targeting players.
Disable movement by setting the movement speed attribute.
Use attributes
why would it not be
Specifically move speed and follow range
don't just steal my idea
lol
not without really moving outside of the spigot api which was the thing I was trying to avoid
Implement it in a way that makes it cancellable
again, they still turn
store the position from previous tick
then they wouldn't be affected by push vectors or physics
they would still turn
Remove their AI goals using NMS then ig
make a baby zombie ride it ?
don't they override the AI of the ridden mob ?
ok so the answer is no it can't be done via spigot then
guess I'll go wipe their brains
hey, I'm trying to workshop an idea here!
what happens if you setGravity after setting noai to true
they aren't affected by physics AND they still turn so the worst of both worlds
I'm almost tempted to build a mini game engine on top of mc to make it noai then implement my own physics
oh my god I am losing my mind with these multimodule maven-based remote repository piece of shit projects in intellij
if I made $10 every time they broke I could make a living off of this alone
unlike in eclipse, they usually always just work in intellij. or at least for me
good luck
remember there's no point in going to the gym if you're not actually planning out what you're eating
I've got some nutrition plans, a lot more fruits and veggies now
talk to a nutritionist
probably have to yeah I don't really know shit about it
Not good food for workgin out
it's like $60 and it will change your life plus extend your lifespan by 20 years
Less carbs, higher protein
false
I just want to eat healthier in general, my diet recently has consisted of basically just carbs and protein it's kinda bad
stop eating
Fruit converts too easily to sugar which only gives a quick energy boost, it does not promote muscle growth
talk to an actual nutritionist and make sure it's not some new age weirdo that plans your food based on your star chart or some shit like that
start sungazing
Fair enough kek
just chug water until you're not hungry anymore 
It's still good to have as a part of your diet which it really hasn't recently
lots of steak
And I've been feeling like shit
I did pretty much that this whole week
take advice from actual pros not random people on discord
I mean I'm just saying in general kek
i really have to eat some veggies and fruits too
i also wan to
but cant be bothered going to the market ;-;
Fruits are good, I just got a 5lb bucket of apples kek
nice
damn
Already had three today and I've been awake like 30 minutes
are those more apples than your duckies tho
I think with my current plan I'm just about under 500g a day of fruit
Yes actually
wow
There's like 40 apples in there lol
peppers are a good way to get vitamin c right?
that's only 2.2kg so that's like under 5 days of fruit
Well like you said magma, talk to a nutritionist, that being said I'm only 135lb so I feel like they are still gonna tell me I want a lot of protein
Protein overrated unless you tryna bulk
I think I am in a good spot to just build muscle, no need for me to lose any weight that'd be unhealthy kek
I'm pretty short too 5'6
6'1
I'm pretty sure this is considered healthy for our heights
I've also started leaving my house more than 2 times a week so that's also gotta be quite healthy lol
It's actually not
I'm bordering underweight lol
I max I've gotten to is 140 then I stopped working out
And fell back to where I was
Max weight I've ever been was like 160 and that was all fat, then I moved to georgia and just kinda stopped eating
(Not by choice lol we just had no damn food)
Off grid living, I survived off of spaghetti, eggs, and saltine crackers for a year lmao
183cm (around 6 foot) and 78 kilos (dunno how much that is in pounds)
yeah that's on the higher end of the normal spectrum
huh
google says thats 171lbs
i mean, most isnt really from fat or somethin
im kinda skinny tbh..
which concerned me for a whilr
then i gained 5 kilos
5 kilos can swing you from end to end
my autistic ass eats the same shit almost every day
My issue is just that since my brain injury I have no appetite anymore, I still get hunger pains but every time I eat no matter the amount I feel like I am gorging myself and it sucks
interesting
well ig i still got lots of time
everyone has until they die to change their eating and sport habits
im only 15 so yea, and i wanna eat more fruits and stuff because i really like fruits and veggies we just dont have that much at home...
just like you have the rest of your life to pull the ripcord on your parachute after you jump off an airplane
true
Starting at the gym in a week, and I started going disc golfing with my father about a month ago, involves a lot of walking so it's still some decent exercise
I think the last course we played, the app we use for the disc golf stuff said we walked about 6 miles lol
@worthy yarrow can vc now
Is your mic muted?
I would like to ask for an opinion. I'm creating a plugin that manages boss rooms, and I'm saving the boss kill as a statistic. In your opinion, should I save the statistics for the player who actually kills the boss or for everyone in the boss room?
is ur game coop
Dunno if it's possible with your boss plugin, but maybe save for those who are responsible for more than X% damage on the boss? Because otherwise it's a shame for the one who's doing all the work when someone else comes along and finishes off the boss in one hit...
basically there is no team/party system, so each player must enter the boss room alone
What percentage do you recommend?
It depends on how many players you have in the dungeon, maybe make a ratio. For example, if there are 20 players, 5%; if there are 5, 20%... But maybe the best thing to do is survey your players
in this case only the one who dealt most damage
if its not coop based
Good morning everybody,
I would like to ask for help setting up my Minecraft server. I need a solution that allows players using pirated launchers to join the server with pirated usernames, while blocking access for players with official usernames who use pirated versions of the game.
Can anyone guide me on how to implement this?
Are you saying you're making a server for cheaters only kek
Im guessing youโre best of if you write youโre own server software
Blocking premium accounts is literally impossible as soon as you turn on the server anyone can join with any username. Even the players who OWN their username
what you are asking for legitamently just isn't possible not to mention no one here will help you with such a task
well.....
Well I'm sure you [redacted] to find out who to throw away, but if you're on cracked why its literally the most braindead idea I've ever read
I have a small question about how to determine if the Mojang launcher is premium or pirated. I'm trying to create a system similar to the one shown in this link: https://www.spigotmc.org/resources/jpremium.27766/
yeah you are not getting help with that
figure it out yourself if you're doing cracked account management and don't know where to start I sure as hell wouldn't trust that your account storage system is actually safe
I am developing a Minecraft server, and in Brazil, most players use pirated accounts, whereas I have an original account. To avoid issues that may arise from allowing pirated accounts, I would like to implement a restriction that prevents players with nicknames that appear to be original from accessing the server unless they are using an official Minecraft account. I appreciate your help and understanding in advance.
I'm using google translate to chat, lol
then save up some money and buy that resouce
you could just keep your server in online mode and problem solved
we won't help you here
In fact, it would save a lot of time!!
and money and nerves and you woulnt break the rules
I'm still a beginner, I didn't know it was prohibited lol
you yourself spoke of "pirated accounts"
yes, if I remove online mode from my server, it becomes a mess, Brazilian is difficult
So I wanted to block their access with original nicknames, but it shouldn't even be worth the effort.
You can also just check if their UUID matches the actual premium one with mojang APIs iirc, but yes online mode only is best
Wouldn't work, if they use offline mode UUIDs are random
oh shit yeah I'm dumb
the UUID has a lot of bugs, I've already tried, it's better to leave it as it is and focus on the original players
correct
not entirely
Bukkit.getScheduler().runTask(LendaPVP.instance, () -> {
spectator.setGameMode(GameMode.SPECTATOR);
spectator.teleport(spectated);
});```
Spigot doesn't wanna set gamemode. Do I just need to wait more or what? (I'm using multiverse)
multiverse overwrites it
how do I overwrite it back
either wait long enough or fork it and disable it
had the same problem back then lol https://github.com/Multiverse/Multiverse-Core/commit/e8292b42c5b32160c94c01be33d5695b7c36d615
so you chose the fork option
i think it was 5 ticks but it looks really ugly
๐
yeah because otherwise it looks very laggy
ik :/
or maybe they have it already included, someone already PRed it to them and they said it will come with the next update
so maybe there is a config option to disable this gamemode shit when switching worlds
teleportintercept?
no i dont think thats it
but they call it one tick later, so 2 ticks later should do it
they call it one tick later too?
bro ๐
did they make it specifically to be more painful or something
why i cant buy the ItemAdder They say Uh-oh Payment have been temporarily
wrong server
Isn't there a player change world event or something
yeah i hate it
that's not the point
its dumb. there is a bypass permission, but a config option would be so much better
But can't you make the player change gamemode after that event gets run
multiverse overwrites it
yeah I've read about the bypass perm
overwrites what exactly
does runTaskLater with 1 tick run at the same time as runTask or 1 tick later?
โจ the gamemode โจ
its the same basically
runTaskLater with 1 tick is equal to runTask
does it do that pre world change event or post world change event
gotcha
Welllllll
technically not
post
nerd talk incoming
is it gonna be "one runs at the start of the ticket and the other at the end"
yesn't, no idea. whats the point?
runTaskLater is scheduled, runTask is just put into the queue
runTask will run the task at the next possible time.
If you are in a bukkit tasks execution context, e.g. you schedule a runTask inside another task, the scheduled tasks will be executed in the same tick
at the end of the day they are both run after one tick passed
jeez bruh
fair enough
In theory, you could add the player to some wait list, wait for the world change event and set the gamemode
lynx being the aktschually guy
I mean, it can become an actual problem if you basically while (true) yourself
fair enough
in practice, multiverse will still overwrite it because they do nothing else
that's the point, multiverse overrides it after world change event
at least that's what I understood
hmm
please read the convo before joining the convo
I never do that kek
bruh
thats why we had to reiterate 3 times
Also, I'm here since the start of it anyways
EventPriority.MONITOR bruh
whats mean wrong sever like and how i can buy ?
he cant count on it anyways since its still scheduled one tick later
so he has to either wait 2 ticks or disable the mv shit 
Multiverse bruh moment
this is not the server for these questions
true
?support
yeah i want to support but cant
you cant write an email?
Somebody pin this
Error:
Enabled plugin with unregistered ConfiguredPluginClassLoader Test v1
[18:33:10 INFO]: [JoinPlugin] Disabling Test v1
[18:33:10 INFO]: [JoinPlugin] Enabling Test v1
[18:33:10 WARN]: Enabled plugin with unregistered ConfiguredPluginClassLoader Test v1
[18:33:10 INFO]: [JoinPlugin] Disabling Test v1
[18:33:10 INFO]: [JoinPlugin] Enabling Test v1
[18:33:10 WARN]: Enabled plugin with unregistered ConfiguredPluginClassLoader Test v1
[18:33:10 INFO]: [JoinPlugin] Disabling Test v1
[18:33:10 INFO]: [JoinPlugin] Enabling Test v1
[18:33:10 WARN]: Enabled plugin with unregistered ConfiguredPluginClassLoader Test v1
[18:33:10 INFO]: [JoinPlugin] Disabling Test v1
Code:
if (!getVersion().contains(VERSION)) {
try {
Path targetPath = this.getFile().toPath();
URL url = new URL(getDownloadUrl);
getPluginManager().disablePlugin(this);
Files.copy(url.openStream(), targetPath, StandardCopyOption.REPLACE_EXISTING);
getPluginManager().enablePlugin(this);
return;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Why it is in a loop?
I want to update the plugin automaticly
I think your update fails
That are not news. I know. But how i make it working?
You just load the same plugin you just disabled which runs the onEnable method
You'd have to reload the plugin somehow and then enable the newly reloaded plugin.
I am not sure if you can do it like this.
And even if you could, reloading plugins is not supported and you probably should not be doing it.
your file replace does nothing in this case
How i can do it?
enablePlugin calls plugins onEnable, and it will recursively call
dude something is wrong
im trying to launch a server for the first time in a new laptop
it has java and git
i have the spigot 1.21.1 jar
i have the start.bat code
it just wont load
it crashes immediately upon starting
agree to eula
add a PAUSE at the end of the .bat
ill try that
java -jar whatever.jar
PAUSE
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
D:\TGC\Minecraft\Servers\test_server>PAUSE
Press any key to continue . . .```
the error it generated
damn
i think my java is the latest version
you're not running it with java21
wrong java version
how to fix it
Why is it saying Package not found, although its imported here?
I am using IntelliJ and imported it through the modules
yike
Update java
maven>?
how do i import it
run java -version on your cmd
are you building with maven?
ye
dude
then don;t manually import jars to your project, add them to your pom
no, like my project uses maven, i did nothing with maven though to import this jar file
how do i "manually" import it using the pom.xml
yes and thats why it can;t be found when you compile
When dealing with maven your dependencies have "scopes"
They can be things like provided, compile
If you set it to system you can then add a systemPath field indicating where to pull the file from
Now, maven also works with repositories
And you always have a local one (if you run mvn install the .jar gets added to it)
yeah, soo i add a dependency
Correct
and use system and systempath
what do i set the other values to
whatever you want
like this as an example
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.11</version>
<scope>provided</scope>
</dependency>
what do i replace it with
i set scope to system
and then?
<systemPath>H:\Private\Path\That\leads-to\target\LaserStaff-1.0.jar</systemPath>
is marked red
Try using / instead of \
ยฏ_(ใ)_/ยฏ
I rarely get to work with maven but I'm using this as reference
yeah its windows classic
backslash
now its not recognising any of the other dependencies ๐
okay
so I fixed my java version
but now its getting getsockopt
connection refused
@echo basalt
are you connecting to localhost or what
No need to ping him with every other message
Are you sure your server is running and you have entered the correct IP?
its localhost
And is your server running on port 25565?
Hello, everyTime i do like 2 sql queries, my server starts to lag for like 0.1sek, how do i fix it ?
do not access db on the main thread
ah, how does threading work in bukkit/spigot ?
i usually code in c#/js, so java is just for minecraft
so if i run it in a runnable, it shouldnt lag ?
so long as its async
alright, ill try - thanks!
neither
its nothing to do with damage, its just deciding IF they ignite or not
correct
declaration: package: org.bukkit.event.player, class: PlayerSpawnChangeEvent
hey fellas how can i make a database of my factions regularly update at set intervals?
as to not have to force a repository update every time a faction is changed, to prevent performance issues on the thread
Updating the database when a faction is created is fine
Just don't do so on the main thread
Ah
xd
Thanks
Do someone know why this could be happening?
Is everything called inside of AsyncPlayerPreLoginEvent run async?
yes, unless you really mess up and jump back to the main thread
You shoudl not really be accessing anything Bukkit while in that event
Like Bukkit.getScheduler().runTaskAsynchronously?
that wouldn't even do anything right?
thats fine
Elgar, could you help me? please
you can schedule in the async
but like
running a task in async through a scheduler and not through a scheduler doesn't make any difference
right?
everythign goes through the scheduler unles you use your own executor
my own executor? like what
you are not, so don't worry about it
fair enough
guys is there any numbers that match small caps font
You'd need an actual font for that
Small caps is not a font - just a set of characters
yeah I was looking for a similar looking characters
How do you:
- check if a plugin has a certain class "settings.java"
- get a final value from it
Thanks :)
?configs
See this wiki page on how to use custom configuration files: https://www.spigotmc.org/wiki/config-files/
?!!!
?di or if you insist on settings
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
Okay wth
I need to check in a whole plugins files which plugin has this specific class.
It sounds like you are doing somethign seriously wrong
Here is the idea: A sort of signature system between all plugin that i ever made so they can work with each other when they are in the same server
๐ญ
like plugin A: give his plugin name, version, and internal id idk and then they can see if they can work with each other. If they are incompatible they just stay appart
Or any other ways of knowing if a plugin has the compatibility feature?
you can check all that using JavaPlugin.getPlugin("pluginName").getDescription()...
It's just that i always use a same class and i though it was a good criteria
Oh
But can you get data?
Directly from inside the plugin
you cna read what is available in the plugin.yml
Idk i feel like for compatibility i need a permanent way to access each others. My dream is to litteraly run a function that is in an other plugin
if you want to access anothe plugins API you get the plugin instance and access it
can you edit that whenever you want?
I mean like a command to edit the plugin description
no
Yea i need an other way.
you can access the config and make changes, if you allow it
Bukkit.getPluginManager().getPlugin(name)
You can then cast that to the plugins main class
from teh main class you can access whatever the plugin permits
ohhh
that is nice
thanks guys
Wait one last question
you cast to main class but it probably wont be the same main class
you cast to the plugins main class, not yours
how do i get this main class? I'm confused sorry ;x
which is why you should not use main.java in all your plugins
i dont :)
Hello, hope you're all doing well!
I have a little question. I got this code:
plugin.getItemsManager().forEach((id, item) -> {
final ItemStack clone = item.clone();
final ItemMeta meta = clone.getItemMeta();
if (meta == null) {
return;
}
final PersistentDataContainer container = clone.getItemMeta().getPersistentDataContainer();
container.set(HCAnvilBlocker.ID_KEY, PersistentDataType.STRING, id);
final String test = container.get(HCAnvilBlocker.ID_KEY, PersistentDataType.STRING);
System.out.println("ID: " + test);
meta.setDisplayName(ChatColor.GOLD + id);
clone.setItemMeta(meta);
// test part
final PersistentDataContainer testContainer = clone.getItemMeta().getPersistentDataContainer();
final String testID = testContainer.get(HCAnvilBlocker.ID_KEY, PersistentDataType.STRING);
System.out.println("TEST ID: " + testID);
// end test part
inventory.addItem(clone);
});
Can anyone explain why on the first print the value is correct, but on the second I get null when theoretically it's the same object, as if the PDC didn't apply?
(I'm using 1.21 API)
Thank you so much!
getItemMeta returns a clone each time
you repeatedly use clone.getItemMeta() which returns a new copy
use teh meta you first got and work with it
then place back on the item when finished
You alkready fetched a clone of the meta so use it final ItemMeta meta = clone.getItemMeta();
In fact, this code is used to generate an inventory. I clone the item to be placed to add the key, but then I modify the clone's meta directly, no? The test part is a part that's used in another class, on an InventoryClickEvent, which is why I've put it as it is here, because it gives me the same result when I click to check whether the clicked item has the key to perform my action
Meta is ALWAYS a copy. you have to put it back on the item when finished
Isn't that what I'm doing with clone.setItemMeta(meta)?
you are calling clone.setItemMeta(meta) but thats not the instance you are modifying the PDC of
Oh, right, I just saw it and yes, it's incredibly stupid ๐ญ
Let's blame it on lack of sleep, shall we? Forget it... And thank you very much ๐
Arrow
the newest chatgpt version is pretty good
not anywhere near perfect obviously but I can see an improvement
funny thing is that I sort of had already built a very similar system myself to basically do what they're doing using their api
very slow but tends to give much better results
did you check if your listener is even registered, also you really shouldn't be identifying mobs by their display name
use pdc
?pdc
the 1-14 in that link stands for the minecraft version it was launched in
so no, not new
Collection<? extends LivingEntity> livingEntities = zoneBlueprint.getFilter() != null ? switch (zoneBlueprint.getFilter()) {
case PLAYER -> filterByPlayer(shape.getCenter());
case ELITE -> filterByElite(shape.getCenter());
case LIVING -> filterByLiving(shape.getCenter());
} : filterByLiving(shape.getCenter());
now that's what I call java
my only regret is that couldn't fit a second switch statement in my ternary operator
OMG Magma Guy!!!
that's some beautiful java you have written
Anyone know why this happens? I have the partySystem jar file in the external library too. However I can't compile
can you show the specific error
?nms
package me.crunchycars.partySystem.partySystem does not exist
show POM ?
o ok
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.crunchycars</groupId>
<artifactId>CustomEnchants</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>CustomEnchants</name>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
check if its in your .m2 folder
?nms
have u considered checking my fucking maven local, Maven?
nvm buildtools just auto upgraded the vers to 1.21.1
love that (hate)
I have .m2 open, where would it be? Im relatively new sorry!
Yea, its there. Its me -> crunchycars -> partysystem -> 1.0 snapshot -> then
Hmm i dont know why this is not working. project wont compile ๐ฆ
Can you use YamlConfiguration fully async?
I have the partySystem jar file in the external library too. However I can't compile
At this rate, I might just make the party system in there too ;-;
am I tripping or does it sort of feel like search engines are getting worse
Same as every other version?
seem to be getting packet being like wayyy too large on the client end
(its mod <-> server comms)
Meh they just spend all their time on the AI bits
i can read what the client is sending just fine, but sending anything back to client = client errors out and disconnects
