#help-development
1 messages · Page 518 of 1
Yeah, why would it not be?
just making sure, alr ty ty :)
Is there a way to make a player break blocks normally while in water in 1.16.5?
Its client side, so no
But yes if you do it with packets right
I don't think so
nope
give them a helmet with aqua affinity
can you gimme an example?
cant do that
uhh no, its not easy. you need to rewrite mining basically, send the break packets, destroy it when done
maybe there is an easier way but thats what I think of
conduit power also allows it for an easy way
@fossil lily you can also cancel the block break progress, so that you can then edit it server side to make it look normal
ok thanks
yea thats what im sayin
i may make it so if its 50% just break it naturally
but i cannot find any events for "block break progress"
should i use interact or something?
oh blockdamageevent
yea
It wont look correct, but essentially it is
If you want it to be perfect override the break events and send your own break packets
well BlockDamageEvent only fires when i first touch it. so i'll just drop it
there is a BlockDamageEvent and a BlockDamageAbortEvent
start on teh blockDamage event and stop if you get an abort
which version is this? I cant see it on my editor
it seems to be valid javadocs 1.19.4 but
Hi is possible to inizialize something from a static, i need this so i can make a code for my dependency Manager
can you explain?
i have a problem with this code https://paste.md-5.net/moputurigi.java i have errors like "Method does not override method from its superclass" "Class 'Chatnike' is never used" and "Method 'onPlayerJoin(org.bukkit.entity.Player)' is never used" what i do wrong>
because thats not a valid event listener, the class chatnike can be ignored, and the onPlayerJoin loops back to explanation 1
soo what i need to do
follow that
TaskItem: https://pastebin.com/euhBmJWj
GUI: https://pastebin.com/me4qdYYi
InvUI: https://xenondevs.xyz/docs/invui/
Im using InvUI and return all the tasks from the config with my function the only issue I'm having is getting it shown in the GUI.
No implements Listener
that is player object not event
plus you need
getServer().getPluginManager().registerEvents(this, this) in enable
?spoon smh
Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.
🥄
check the methods the gui var you now have has, most likely has an open or a view method
how
😂
well circles are easy too - usually
circles are ez, spheres not
Displaying spheres is tricky - yes. But everything else is easy
well do you want to build a 3d cone with a sphere on top
but could you make a hexatriacontagon
footbol
dodecahaedron
sh...
this word is even longer Dodecahedron-Icosahedron
stellation of icosidodecahedron
💀
hexatriacontahedron
Why not just call it Polygon?
fun
this is what i used as inputs
generateDodecahedron(World world, Location center, int width, int height, int depth, Material material, double rotationY, double rotationZ) {} ```
but chatgpt can't do shet right
again i have a problem lol (sorry) https://paste.md-5.net/owobayiyaj.java
errors:
Variable 'fadeIn' is never used
Variable 'stay' is never used
Variable 'fadeOut' is never used
'sendTitle(java.lang.String, java.lang.String)' is deprecated```
those arent errors just warnings, first 4 are self expanatory, the 5th means you shouldnt use it
so it won't change anything and I can use the plugin normally?
you can, but i would recommend fixing the deprecation
you should use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#sendTitle(java.lang.String,java.lang.String,int,int,int)
declaration: package: org.bukkit.entity, interface: Player
Warnings mean not being recommended to use certain solutions. But it not means that your plugin not gonna work.
How can I make players keep their levels on death but not inventory
declaration: package: org.bukkit.event.entity, class: PlayerDeathEvent
oh i didnt know that method existed
is markdown trademarked? or copyrighted
I got this server shop plugin and because my shops contains near a double chest per group, I just created a batch file that combines all these files to one yml file. But my goal now, is to find a way to load all these files so I can delete the batch file. "dir *.yml /b" example. Is there something in bukkit api that I can use for this or its only pure java?
I am not even sure who would own markdown
pure java to find the files and bukkit api to load them how you would be used to
I know I need to use bukkit to load them. I just asking a way to "dir *.yml /b" but in java. Thanks, I can just do a simple search for the code if that is the case. I asking here as there might be someone that did this before
Is there a way to disguise mobs as player models without using libs disguise?
i dont need code right now i just need to know, im learning java 1st
You learning Java?
ye
like this? https://paste.md-5.net/defogatife.java
my minecraft coding skills are hot trash so im actually learning about java 1st
I have a playlist I watched for learning Java, its old but it will work
oh i use a website
no, change the sendTitle("", powitanie ) to sendTitle("", powitanie, fadeIn, stay, fadeOut) or sendTitle("", powitanie, 10, 70, 20)
You can use a website, I used these videos and websites like W3Schools to learn HTML, CSS and other langs in over 10 years. Please watch this, https://www.youtube.com/watch?v=Hl-zzrqQoSE&list=PLFE2CE09D83EE3E28
i use codeacademy
and yea sure
Just to tell you, I been learning Java more while programming plugins but please see how Java works or you be thinking "What the f*** am I looking at?!
mmh
i learn quickly so it looks fine for me rn
although
bungeecord
public class Raaa {
public static void main(String[] args){
}
]
you just create a tmux "instance" or whatever and just start the server like normal, if you want you should use a panel like ptero or crafty
never understood that
thats a main method
out of spigot thats how java apps start
yea but like
public static void main(String[] args){
}
mainly this mb if not specified
yeah thats the main method
might want to figure out what all of those words mean
i used to work in python and javascript so this confuses me
when you start a jar that gets called
basically a function right
yes
yeah
whats void for btw
oo
oh man coming from a untyped lang
lol
python has types too but ig you didnt write them
wait wait wait
so i can use main() everywhere in my code?
as its a function
public boolean isSomeThingTrue() {
return true;
}
// boolean return type
public String getString() {
return string;
// OR
return "epic cool string";
}
// String return type
``` for example
'sendTitle(java.lang.String, java.lang.String)' in 'org.bukkit.entity.Player' cannot be applied to '(java.lang.String, java.lang.String, int, int, int)'
'sendTitle(java.lang.String, java.lang.String)' in 'org.bukkit.entity.Player' cannot be applied to '(java.lang.String, java.lang.String, int, int, int)'```
not in java
yes but thats not what you should do cuz that starts your program, kinda weird to do that twice no
oo
is there a way to do that tho
why would you
yeah, its constructors
but for like all files in a folder or smth
?paste your code
i know a method of making a circle generator that saves up location
forming a circle
you use new ClassName() to initate that class
cool
hold on
this then creates an isntance of that class and you can now use the non static methods and also gets you a lesson in static abuse
can u example code
m confose
give me a few moments
alr
add the semi colon and check if you still get the error
want a spigot example or a normal java example
both if they are alot different, else if they arent java would be nice
they use the same concept just starting them is how its different
ig the java example
maybe once ill learn more into java ill find a way for spigot
i still have
show code
public class Main {
public static void main(String[] args) {
System.out.println("My Java Application started");
new ExampleClass();
new ExampleClassConstructor("Example");
ExampleClassMethods exampleClassMethod = new ExampleClassMethods();
exampleClassMethod.example();
new StaticClassExample();
}
}
public class ExampleClass {
public ExampleClass() {
System.out.println("Example constructor ran");
}
}
public class ExampleClassConstructor{
public ExampleClassConstructor(String message) {
System.out.println("Example constructor ran with string: " + message);
}
}
public class ExampleClassMethods {
public void example() {
System.out.println("example method ran!");
}
}
public class StaticClassExample {
public static void exampleStatic() {
System.out.println("Example static method");
}
}
``` each of those gets its own file, theres a lot for you to learn about this too, abstract classes, interfaces, enums , when to and not to use static
lol dw
note these classes would be in different files
^^
since you cannot have more than 1 public class per .java file
it's complicated
you don't need to know why yet
it just is
java is quirky like that hehe
and also for when you get into spigot never call the main class Main, call it what your plugin is called and the public static void main String args wont work
hold on imma try the code
Ooo alr
i added a ";" but it didnt changed anything
what version are you on
version of?
spigot api
1.8.8
so like this yes? https://paste.md-5.net/otojudavey.java
if you want it in chat yeah
but i dont want XD
use the player.sendTitle("", powitanie); again
powitanie whut
is polish
im from poland if u ask what is "powitanie" XD
lol ok
it is something like a welcome
yeah I already googled haha
hey we're trying to make a plugin that places a block in a random location in a area when a player is standing on a certain block. How can we get that blocks x y and z so we can add the random number to it
my last name is polish too iirc but I got no clue what it means lol
what name is it
player.sendTitle(powitanie, subtitle); so just this
?
do you want the message big or small
do you want a subtitle
I think I need to remove the subtitle
noo
correct then
You can use ```
Location loc = player.getLocation();
int randomx = ur random x;
int randomy = ur random y;
int randomz = ur random z;
Block random = loc.add(randomx, randomy, randomz);
random.setType(Type.OAK_PLANKS);
you can use vectors for that
thx bro i appreaciate it
yea
i dont like vectors
but if he wants to use em he will have to ask u 😄
'sendTitle(java.lang.String, java.lang.String)' in 'org.bukkit.entity.Player' cannot be applied to '(java.lang.String)' 🥲 🔫
I get this error when trying this
lul
lemme open up a ide
add getBlock() to the end
i wrote that in discord xD
A location is not a block
declaration: package: org.bukkit, class: Location
no shit shrelock
^^
Yeah so get the block
its @quaint mantle fault
ey
xD

?paste
@analog snow
when i join server messages are sending only in chat
either I'm smooth brain or my IDE's playing a prank on me
It likes doing that i certain conditions if it doesnt have more context
what does your code look like
I'm just trying to decode ps3 roms 😭
xD
thank you habibi
'sendTitle(java.lang.String, java.lang.String)' is deprecated
Unused import statement
but when i join the server nothing shows up
Whats a good way to 'trim' a list?
check console for errors
server console
'
`[INFO] [chatnike] Enabling chatnike v1.0-SNAPSHOT
[INFO] [chatnike] Chatnike plugin has been enabled.
[INFO] Server permissions file permissions.yml is empty, ignoring it
[INFO] Done (2.937s)! For help, type "help" or "?"
[INFO] Starting GS4 status listener
[INFO] Query running on 0.0.0.0:41866
[INFO] Witaj na serwerze gildii Nike!`
bump
Loop every block, check type, set to air
you dont join the server here
How does spigot handle Async events? For example AsyncPlayerChatEvent would it be okay to run a database call on this event without worrying about stalling the rest of chat or would this affect all chat flow
Optionally add Chunk#contains for efficiency
choco said earlier thats not always async, do the db calls in a cf async anyway
some async chat events are fired sync 🤔
hoi
hm alr
@sullen marlin Btw about the forums i wanted to create a wiki page, how do i get it approved?
Hi im making custom guis for my server using fonts, but will bedrock players joining through geyser be ablw to see the custom guis?
yes
There's no approval
no
check in your client
do i just create a new page then?
Yes
Oki thanks 😄
do you have atleast 5 posts
you open up mc, you join and see if theres a title
Whats a good way to 'trim' a list? I mean like take this {'a','b','c','d','e','f'} to this {'c','d','e'}
oh hell dont use that crap
if you cant do that i doubt you should be developing
It does that automatical
should i use aternos? xD
Its there advertising the only way they make money of otf the free versions
cant upload plugins theres supposedly
no, you cant upoad plugins there, localhost
ikik
no?
I wrote that after entering the server nothing is there
Facts
you want everything from debug results?
you add debug statements to see what happens
then you can figure out what the error is
Player#sendTabHeaderFooter
? how can i use that is there a doc?
?jds
i forgot link
declaration: package: org.bukkit.entity, interface: Player
cant seem to find it
Code working but I did not like how it changed the order of my shopWooden: Wooden.yml Stone: Stone.yml Redstone: Redstone.yml WoolCarpet: WoolCarpet.yml
its under scoreboard
.
How to do that bc im idiot and im learning java for First week XD
I'm struggling with the most basic task ever
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
(for @quaint mantle )
me with doing basic java tasks in c++
we're getting somewhere
I just had to look in a hex viewer for once
before realizing I was reading unsigned data
Changing my code again, how do I sort the list by a value (Order for example)?order: 3 name: §cRedstone icon: REDSTONE items: ...
list.sort(Integer::compare) or smth
or if your items are comparable, Collections.sort(list)
People in 2023 cant Ask and get answer XD
lol
Can you show a example please? Its not the items I want to sort, its the groups its self. You see one group with order value of 3 which should go on slot 3
what list do you have
What do you mean? I had the file names in a config.yml but I deleted it as I don't know how its going to work for my case
well figure out a way to get that order from the config
You mean the order value, I know how. I just need a sort function example
List<Whatever> list = ...
list.sort((item1, item2) -> Integer.compare(item1.getOrder(), item2.getOrder()));```
whats the thing to paste code again
?paste
or -compare to sort the other way around
You was quicker than me
Is that for getting the order value? Or are these just item instances?
Thanks
I will test it
its basic stuff you would know if you learnt java, im not spoonfeeding you everything
The sort function works, they showing at the right slots
Does smone know why my IntelliJ isnt giving me suggestions, that is a public var that exists as i reference it on top and it works
it should like autocomplete with hasPapi
I meaning to get a portable app of that, thanks for reminding me but I don't know. Never used it before. I use Eclipse
it should work, but i just installed intellij on my laptop and imported my proyect from my pc and it doesnt work
theres red at your files, did you mark the folder as sources root?
Oh yeah i think i dont have java installed on my laptop
i think when i exported it
it told me to install a java and i click smth and changed smth to java 20 or smth like that
and since then i cant autocomplete
I don't have java installed but I still can program plugins due to portable java. It should ask you to install SDK somewhere. It did on my end
Yeah and i installed it, but i think i did smth wrong :/
If i did i dont know tbh how can i check?
rightclick on the java dir and mark as > sources root
or build the project and it will probably work
yeah right click the java package, near the bottom him mark directory as, then choose sources root
where do u mean?
this java one
oh boy that’s set up wrong
your entire project isn’t right
make sure the base folder is correct in structure
it has this
Show modules tab
i am sorry but where is that 😦
Double click on simples at the top left, anything in there?
uh
thats fine
k
add a sources route probably
is the no content root thing?
yea
Add your content route to be the folder named java I think
eh?
here it had the proyect sdk, shoudnt it be the openjdk 20?
it’s fine
add a content root
change the module source
both java 20 shouldn’t matter
😬
was it like this?
Try src instead of java
still everything red
press ok then reload maven
yippee
wee woo
1 more thing
on my pc i had like every file
now i just can see some on the proyect tab
glass beach make banger songs, change my mind
on the file viewer top right, you should see three dots, check those tabs to see if it hides git ignored files
oh nvm i just opened the entire plugins as a proyect so i can see cause idk why the target folder wasnt appearing
that is gonna also explain the no java intellisense
nvm that didnt work but re opening the proyect did lol
Hi. I have a very simple script to modify piglin drops. Plugin works fine but I get constant ConcurrentModificationExceptions in my logs. I'd be really glad if you've helped me understand why. ```java
@EventHandler
public void onEntityDeath(EntityDeathEvent event){
for(ItemStack item: event.getDrops()){
if(item.getType().equals(Material.GOLD_NUGGET)){
int amount = item.getAmount();
event.getDrops().remove(item);
Random rand = new Random();
int randomInt = rand.nextInt(9);
if(randomInt < amount){
event.getDrops().add(new ItemStack(Material.GOLD_INGOT));
}
}
}
}```
You are changing the getDrops list while you're looping on it
This is illegal 🫨
Just create new lists on top where you input what you want to delete and add
Then you could do it after looping over your current list
Just replace your for loop with for(ItemStack item: new ArrayList<>(event.getDrops())) {
This is a possible easier method 🥲
cant you clone lists
iirc the arraylist constructor copy the list, otherwise yes it's possible but maybe too much just for that
Thank you guys for the explanation and for the quick fix. You're the best!
I'd personally use lambdas for that, this is pretty clean imo
oh also @rare ether dont use #equals for enums, use ==
DONT
Those will not be enums for very long
Actually they will remain singletons so I guess it is safe?
But still it'd be confusing
they should still be =='able
Oh and you can move your random variable outside of the loop too
Isn't equals method used when ==ing objects ?
no clue
not at all
The wonderful IF_ACMPEQ opcode is used for ==
String is special
Didn't actually know it
They won't be enums but they will still be referentially comparable
It's still fine and is the preferred means of comparing materials (or in 1.20, ItemTypes)
so i bought src code from someone and tried fixing it up, its a custom block that opens a custom inventory, its a brewing stand, the problem is, when breaking the custom item, it drops 1 normal brewing stand and 1 custom brewing stand, how do i make it so that it deletes the normal one but not the custom one?
do you listen to a block drop item event and a block break event
Is hasmap limited?
in what sense?
tasks:
751ab970-45cb-480d-ba74-5955b488f1ee:
name: I was testing
by: Avoo_
1215552d-f4a1-475a-8d11-89ff0f7df342:
name: I was testing
by: Avoo_
e9625a48-e025-45d5-be6e-e7e783540207:
name: I was testing
by: Avoo_
a549ddc8-9c13-4041-8bb1-e90bb101c30d:
name: I was testing
by: Avoo_
f789fc43-413e-4734-9707-f8f67118d411:
name: I was testing
by: Avoo_
2c683c96-77a0-4e4e-b46f-120dd90fc08f:
name: I was testing
by: Avoo_
ee5b0fc6-481c-4ee8-b145-fb1c54e4ef59:
name: I was testing
by: Avoo_
2c06f4dd-d607-4cd5-9d00-2a4d3a4c1401:
name: I was testing
by: Avoo_
60c3d31b-3145-4cc2-8c71-e6c654055e1e:
name: I was testing
by: Avoo_
ab83e100-0db4-48db-8055-08c929d5f1e9:
name: I was testing
by: Avoo_
4b243d91-1af7-4eeb-b770-654e82c95da7:
name: I was testing
by: Avoo_
uuid: !!java.util.UUID '4b243d91-1af7-4eeb-b770-654e82c95da7'
I get this uuid: java issue
seems like a serialisation/deserialisation issue rather than a Hashmap issue
The issue I'm having is. I have a method that getPlayerTasks and I need to save the uuid name and who its by.
Because I have a gui and creates a new item for each input on tasks.
show how you save it
The moment you're waiting to fix a satisfying issue, and you're just waiting for the code but you can't finally fix it because it's already fixed. Feeling like someone who told you "I have to tell you something" and just after "Nevermind"
Yeah.
yeah thanks, i just wanted to make sure
Hmm i have it now like an event on the main class called loadtab, and i call it when the player joins, and i pass that player, and when the config reloads. is there a way to load the placeholders regularry or should i do it like each 5m or idk as rn the time in the picture is still and not changing
Runs a loop and do it every few seconds
Or every second
Not every tick
wont that lag a bit like every second?
Hello guys, i'm a need show sidebar in right with title test but this doesn't work who some help?
WrapperTestPacket2 packet = new WrapperTestPacket2(); // SCOREBOARD_DISPLAY_OBJECTIVE
packet.setSlot(1);
packet.setObjectiveName("test");
packet.sendPacket(args.getPlayer());
WrapperTestPacket objective = new WrapperTestPacket(); // SCOREBOARD_OBJECTIVE
objective.setObjectiveName("test");
objective.setMethod(0);
objective.setDisplayName(WrappedChatComponent.fromText("test"));
objective.setRenderType(RenderType.INTEGER);
objective.sendPacket(args.getPlayer());
Why packets
I'm a need packets
Yes why
Presumably they’re trying to do it with packets for a reason
K thanks
for packet..
But what is that reason
@royal hawk why are you trying to use packets instead of the spigot api
Well I was referring to this lol
If there’s a reason they need to use packets then that won’t help
I need use packet, because use animated oldest my api
Well that’s why I asked first 
it work only with packets
What?
You don’t need packets for that
u can help me with packets?
You don’t need packets to do that
declaration: package: org.bukkit.scoreboard, interface: Scoreboard
I understand what you're saying that I don't need to use this but I'll repeat myself can you help me with the packets?
in here
code
im use version 1.19.2
Lol
pog
We would also need to see inside your WrapperTestPacket and WrapperTestPacket2 classes to help you anyway
?paste huge code blocks
This looks a lot like copy pasted code
For one thing, slot is supposed to be a byte not an integer
So that’s already wrong
lmao
The man has spoken
https://paste.md-5.net/ivumakifon.java # WrapperTestPacket2
https://paste.md-5.net/voxolilefi.java # WrapperTestPacket
the discussion code block is over
new rule dropping
this is all invalid html
banning anyone using packets for something that has api
okey
👎
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
you ping choco
knew it was 1.20
damnit
we keep getting an exeption because the players uuid is not on the list yet. When we add the player manually it works just fine. How can we fix this? we tried with try catch but that doesnt seem to work either
Too old! (Click the link to get the exact time)
that uuid stuff hurts
a lot
save it as a string
then UUID.fromStringit
and use getInt
if anything add sysouts to the config stuff
- show how you add the player to the list
inside the catch thingy
the list you spoke about in the message, that isnt in the trycatch
addDefault(uuid, 1)?
that's some wonky code
i know
if we try to set a uuid thats not in the list yet this happens
what list
the jumptemp.yml
yeah you dont set a list there
ikik
thats just literally what it is
the file is just uuids
with numbers
each uuid has number
a*
wasnt talking about a list in java
just literally
a list
thats what it is
a list of uuids
not the term from java
just
english
sorry if i was confusing
im confused lol
thats what the config file looks like
now that makes moer sense
when we set a players score that is already in the file it works just fine
but when we want to add someone new
we get errors
i have a hunch, its a 1.8 issue
and we dont know how to add them other then adding them manually
see if it still happens if you do
set("data." + uudString, int)
okay
we got it working now thx for helping
Do you know how to put a cooldown with Cluescrolls plugin?
Like when you take it you have maximum 24 hours to complet these task?
Someone asked me yesterday if it was possible to write plugins in HTML
They called themselves a good developer
at a glance jackson is like bukkit, it doesnt know how to save your class
PlayerInteractEvent gets triggered when you open a door with a item right?
wdym?
you have a class you want to save right
No, I'm trying to save the object in the yml, the class is the thing that contains the getter and setter for the object
yes, the objectis a class instance, it doesnt know how to save it
How do we add the background to text on latest versions of Minecraft
Like white text over a pink background
If you mean floating text in world the I believe this is it.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/TextDisplay.html
I think he means text like in chat or on signs
I do mean in chat
Like, giving text a background color like this
Yep
Then this is possibly only with custom font and negative spaces in a resourcepack I think
how would i hide a specific player's sprinting particles?
appreciate it, that's what I was thinking too
But I'm more of a 1.8 guy so I wasn't entirely sure
If you need help setting that up then the Minecraft Commands discord server should be able to help.
cancel their sprint event, or do not send their sprinting start/stop packets to other playerse
PlayerToggleSprintEvent right?
but cancelling their sprint event would stop them from sprinting
i want the particles to be hidden when they have a specific item in their inventory
I'm relatively certain these particles are entirely client-side?
yes i think they are
It wouldn't stop them from sprinting, it would make the server think they are not sprinting but the client still sprints
i tried creating a packet listener and it only picked them up randomly
would cancelling the event and simply increasing their speed when they toggle sprint on work?
No
I'm trying to tell you that if you cancel the event it won't stop them from sprinting
would some anticheat plugins not pick that up?
It'll just make the server think they're not sprinting when they Really are (no particles sent to other players)
If it's a bad anticheat then yeah
If it's a good anticheat then no
you were wrong
What did you find out
it stops you from sprinting
and still displays the particles
even when you're not sprinting which it doesnt when you vanilla walk
that's funny
That's what I was saying
You'll only ever be able to stop the particles from playing on other people's clients
not your own
other people is what i want
Are you sure that cancelling sprint stops you from running?
Thank you for sharing I did not think that was possible
I didn't think the server can just send a packet that stops your sprint
Maybe if we know what you're trying to accomplish we might find a different solution ?
He would like to have it so that other players cannot see your sprinting particles
Aka ensure the server does not send the sprint packet to other players
its a bit further up in teh chat
I know that, I am just saying that if there is more to it then there might be something else he could do
basically if a player has an item in their inventory you can't see their sprint particles
thats all
i dont have a person to test with either
You need to do the packet listener method if canceling sprint doesn't work sorry
since the particles may be only for me
i did that but it works in a funny way
how i did it was
create a packet listener for particle effects spawning
find a player in 0.6 blocks proximity of that particle
and if that player has the item i set the particle to null
sprint particles aren't serverside though they're client side so idk how that works
ALL particles are client side
What I'm referring to is the fact that the server is not explicitly creating these particles
The client creates them on any entity that is set to sprinting
theres an nms method called Entity#canSpawnSprintParticle() but i dont wanna modify it
public boolean canSpawnSprintParticle() {
return this.isSprinting() && !this.isInWater() && !this.isSpectator() && !this.isCrouching() && !this.isInLava() && this.isAlive();
}```
I don't think you can override player anyways
it gets run on the tick method for the player
yeah
If the server spawns these then that would be news to me
I really think it's the client that does it
protected void spawnSprintParticle() {
int i = Mth.floor(this.getX());
int j = Mth.floor(this.getY() - 0.20000000298023224D);
int k = Mth.floor(this.getZ());
BlockPos blockposition = new BlockPos(i, j, k);
BlockState iblockdata = this.level.getBlockState(blockposition);
if (iblockdata.getRenderShape() != RenderShape.INVISIBLE) {
Vec3 vec3d = this.getDeltaMovement();
this.level.addParticle(new BlockParticleOption(ParticleTypes.BLOCK, iblockdata), this.getX() + (this.random.nextDouble() - 0.5D) * (double)this.dimensions.width, this.getY() + 0.1D, this.getZ() + (this.random.nextDouble() - 0.5D) * (double)this.dimensions.width, vec3d.x * -4.0D, 1.5D, vec3d.z * -4.0D);
}
}```
in the entity nms class
When you cancelled the particle packets did the sprinting particles stop?
no
Then ignore this method
hold on
why "i, j , k" instead of "x, y, z"
That's not his code, that is obfuscated
oh damn ok that explains it
nah jk he actually did make htat
lmao wtf now
he likes to get specific with his floats "0.20000000298023224D"
then why did you not call it x, y, z lol
because i hate myself and everyone who reads my code
relatable
why's it all crammed together like that too
cuz its nms
I will just go back to #general and listen to weird 80's music, have a nice day everyone lol
I don't know many things about particles, but feel free to ping me if you got a question about maven
based
yeah
yes
I am the angelchest guy
but you can also DM me if you need to do your tax returns or if you wanna hear a bad joke
I'm quite good in telling bad jokes
ok so I just told the pudding jokes to someone in DMs and that dude rekd it uuugh
he instantly guessed the punch line, this has never happened before
sorry T_T
it's all good as long as you pass on the story to your friend
Guys i try use Color code In My Code like &6 &a and Taht Stuff But it just send it not color the text in player.sendMessage("You Got Launched!");
player.sendMessage(ChatColor.YELLOW + "You Got Launched!");
:o
& are not the color code character
It is used because you are not allowed to type the actual character §
Plugins usually take that one and replace it with §
I See-
use ChatColor# or translateAlterateColorCodes
Thank you Anyway!
What if I don't have any?
How can I check the packet size per user? (checking bandwidth per user)
You have to listen to packets, and for each packets count the size in bit
then you install protocollib and ViaVersion and hope you now get any
No I meant what if I don't have any friends
I don't think that is gonna work out
I never was in this situation, I got many friends even thugh (or maybe because of) I'm such a weirdo
Simply force people to be your friend
🔫 always works
Nice, gotta try
that's my boy
Friends in 1.8 are not reliable
from my experience, the weirdest and most uncommon online friends you got are the most reliable
for example, my best internet friend is some random dude from turkey and I dont even remember how I even met him but I always know, he's there for me, whatever happens
cazcez I love you 😗
Such a cute meeting
I think I'm way too a troll for being able to find internet friends
Let's go 🤣
I was surprise by my plugin community: they all agreed on abandoning versions under 1.19.4
dude, same
guys this like making the command public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { but i want add more things not just like /hello no i want /hello 1 something
and i make like list that in it "Something, Hello, He, Me, Lol" that show in mc
It's happening
That's why there is a parameter "args"
:0
This is a string array
check the args or use a proper command framework like ACF
Containing all the arguments of the command
wait so can you guys give me example
check out ACF! thank me later
Sorry But i want try _Rolyn Method Frist
ok
or it's the same?
1.8 is mostly dominated by the big servers like hypixel
the general idea is that you parse the args manually
int someNumber = Integer.valueOf(args[0]);
String someName = args[1];
then do your stuff. ofc you gotta check the length of args, first
Most other servers use latest because survival is 10x better in 1.19 than 1.8
I See-
But now i want make it like list
a list of what?
*parseInt 
Ah I see. But you already got the "args" array, why not just use that
I don't understand
my bad, I'm a bit drunk and only on the phone in the bathtub
Hm 1 sec i will try give you example
wait i can't send photos??
Be careful, bath are meant to be filled with water, not alcohol
?img
Not verified? Upload screenshots here: https://prnt.sc/
you need to get verified to send pics
!verify
Usage: !verify <forums username>
like this https://prnt.sc/uDafUtO7gy2n
Oh you mean that you want the tab complete ?
You just need to implement TabCompleter and return a list of strings
it just help people understand what you can do with that command
ACF for one command is silly
no
hm
I think it's great to begin raw, without lib or api
Sorry Sir But Can You help Me with That or Send a Link To Understand more about ACF
Just to feel the system
they are a beginner remember?
eh
Throwback to “Raw dogging the NMS”
wrong ping, stupid discord
Rip
so you were trying to make a tabcompletion?
Yes Sir, Something like that!
that is ACF ^
well first of all let your command class implement TabCompletor
(it already implement CommandExecutor, so you can do TabExecutor instead of those two (just a wrapper of those two))
Damn
eh
oh man
implementing TabCompleter is the general idea, ACF is basically like an improved version.
no StringUtils.copyPartialMAtches :(
ok let me see ACF
Boo shading
ACF is really eas to use, you can e.g. do stuff like this:
public void onWhateverCommand(CommandSender theDudeWhoEnteredThisCommand, int someNumber, String... allTheOtherArgs)
Well I guess we have the libraries feature but still
let them know how it works without libs \💀
:0
hm
Just discovered that chatgpt totally knows how to use Command API of Spigot
I Still Begginer in Java
Not Supported in Egypt For Some Reason
I'm not on PC it's quite hard to help you rn
in that case, do NOT use ACF but try understand how it actually works
Ok!
and please explain again what your current issue is - why can you not just use the args[] array that's passed by onCommand method?
Is there any special trick I need to employ to be able to use snapshot artifacts from my local maven repo in gradle?
If I drop the "-SNAPSHOT" bit it works, but resolves a different version
check your local repo to see what its called
It is a correct snapshot release
I'll try to see whether it works by just forcefully setting the maven local as a file://-repo
show your build.gradle file pls
https://gist.github.com/Geolykt/e0af8b4b807f126d7a595d0d17f3f069. Don't think it matters too much though
which of those dependencies is not working?
I see you're adding the actual discrimanator after the SNAPSHOT stuff, you are usually not supposed to do that
compileOnlyApi "de.geolykt:starloader-api:2.0.0-SNAPSHOT"
what exactly do you mean there?
Hello guys, I want to whitelist everyone who is online in the server at a particular time
So lets say there are 30 people at one time i run a command where it whitelists everyone online and enbale whitelist
It should be said that de.geolykt.starloader:micromixin-annotations:0.0.1-SNAPSHOT resolves fine - the only large difference is that the former (the one I have problems with) is released via gradle while the latter is released via maven
OfflinePlayer#setWhiteListed and Bukkit#setWhitelistEnforced
I guess it could be because maven uses maven-local-metadata.xml while gradle uses maven-metadata.xml?
Let me check whether using ./gradlew publishToMavenLocal instead of ./gradlew publish helps
Okay publishToMavenLocal doesn't seem to do what it should.
Friggn gradle always being a dick
👀
Sadly gradle is the best build tool for what I am doing right now by a long shot - so I cannot just switch build systems
Gradle > Maven
debatable and also not very helpful
what's the output of ./gradlew build --debug?
that should tell us what the issue is
I can be an idiot sometimes. Ran that command on the wrong project. Still doesn't work though even though a maven-style metadata format is used
just to get back on this. gradle obviously has many issues, one of those being that it's so hard to debug issues with it.
maven also has many issues, but "not working" is none of them
maven, while being slower, at least properly works
im not actually that serious, I just prefer gradle
yeah that's fine ofc
neither maven nor gradle is perfect, I use both and I think that gradle is sooo hard to debug sometimes
but maven takes ages for multi module projects 🥲
oh yea lol
in a perfect world there'd be a working build tool that's easy to use and is fast, but there's no perfect world haha 🥲
According to it it resolves it.
is the issue that gradle won't compile, or just an IDE issue?
That is when I'm running ./gradlew dependencies (even though the dependency graph says FAILED next to it) - when using ./gradlew build it doesn't bother to resolve it but I think that is because I have no actual source files yet
ok that should not happen. please ?paste the whole log, otherwise nobody's able to help
https://gist.github.com/Geolykt/b0d62a6021836c3d3fa849de6c08f281 would be the entire log
?img
Not verified? Upload screenshots here: https://prnt.sc/
https://prnt.sc/tfGfiPAS37I7
Does anyone about know about this error?
My server try to save the world already unloaded (deleted)
OH I SEE
It's because gradle discards my dependency because it is compiled for another java version
This is dumb default behaviour
to be honest, I have no idea what the issue is and I cannot help at all
but maybe somebody else knows
instead of? 8 or 17
are you not using toolchains?
Instead of 8 (building with JDK 17 though)
ok that is weird. I would be fine if you'd say "in 8 it doesnt work but in 11 it does work" but you're literally downgrading to make it work, that's not supposed to happen lol
That being said I'd still like to compile to Java 8 .... but I guess I now know the bottleneck
Well It's because gradle uploads additional metadata that says which java version the dependency was compiled for (in this case java 11)
that is normal, yeah. that's one of the reasons why I hate gradle
but you should have received a proper error message if this was actually the issue, earlier
probably was because I wasn't actually attempting to compile anything
if i want to do daily rewards which resetting every day at 8am i need to do task and check using by Calendar class yes? or is any better way for do this
https://xenondevs.xyz/docs/invui/items/
Anybody know how to use InvUI and getItemMeta. Trying to create an item that can add skull meta data.
You can also use timertask ig
SUS LINk
dw I can cure sus links
https://www.youtube.com/watch?v=3XhpKEqg4cg just click here instead
LALALALALLALALALALALALALALALALLALALAAL
SUUUUUUMMMMMMM SUMMMMMM
210-230 Bpm
Remix:
https://www.youtube.com/watch?v=I1Ns-nVULzA
Pls Follow me here:
Links:
https://www.instagram.com/dark_jochen/
https://darkjochen.bandcamp.com/releases
https://www.facebook.com/jochen.sebas...
ikr
someone knows about github pages? i cant setup mine :(
what's the issue?
ask the question plz
^
Someone knows how to deny a player who jumps on spigot 1.9.4
he said jump lol
Sadly detecting a jump ain't that easy. If you don't wanna transport them up by any other means you can just compare their y. Otherwise you'll have to deal with velocity - Paper has a playerjumpevent. You could check how they detect it
stealing code
Isn't their a trick like giving jump boost infinite to the player ?
You sure they meant literally jump tho?
(I thought that initially also)
how can I get a protected/private constructor using reflections? Class's getConstructor throws an exception even if I pass in the correct parameters
Make sure you do "setAccessible(true)"
getConstructor throws the exception and i can't make it accessible unless i get it first
getConstructor is only for "public" constructors.
getDeclaredConstructor is for "all" constructors.
Almost
I added the html file and made it with the tutorial in pages.github.com
and well