#help-development
1 messages ยท Page 2175 of 1
just plug your mobo straight into mains power
Before, Unity required Mono
they have their own vs module
and unplug it on specific timings
now it uses straight native C# ๐
Are you sure about that one?
people who confused java with js ๐
sure
Yeah its like to kill them
Anyone know how to teleport a user to a specific world?
Okay, i have been all lifed "engaรฑado"
get a location object from that world
some kid at my school asked me to code a spigot plugin in js and when I said it's in java
"aren't they the same thing?"
smart
lmao
ty
If he pay i have comissions open :D
HHAA he was really interested on money
java is to javascript like car is to carpet
yea lol
shameless plug
or use google translate
what
16gb for intellij?
Yeah
just download more ram
I dont know how
lmao
haha you say it as something funny but people google it
paged ram
Who has menu library here? I need links
intellij wouldn't suck 16gb ram if you didn't open every single project you've ever made at once
I got 4 large projects open and it's only sucking in 500mb ram total
my intellij takes 1.8gb for a single open project
intellij using more ram than i have in total
haha
Even more i need to limit intellij process to consume only 16gb
If not it consume even more
rf are you doing
ehh I don't think that's a problem
Lof of plugins the way the IDE plugins
lmao only 8 for os?
My PC idles at 17
Lmao i didnt thought that return; will fuck my life
hi
Im literally saying return; on an event and the code still running
what
I have and if (!(conditon1 && contidon2)) return;
For some reason, its still running instead of stopping the code execution
I doubt java is wrong here
Let me send a cap
Both of these conditions have to be false for this to return
That means that your conditions aren't being met.
Just one has to be false
actually yes
Both have to be true for your code to execute
the && is the confusing part as in reality either being false will result in the whole being false
Honestly, boolean logic is confusing at times.
It can be replaced with if(!condition1 ||! condition2)
double ork
In memory i think is more fast to use !(contidtion && contidion)
As im not sure i dont say it
I realized what could be wrong
The difference is almost nothing
Allright thanks for saying it
To the point where the compiler might even swap it around to optimize it if one is faster, but it would pretty much never do anything in the first place
Java does have short circuiting so I think the way with && is actually faster for 2 reasons
Only 1 boolean negation instead of 2
Actually nevermind
Short circuiting is equally fast with || or && just in different scenarios
redempt why your menu system its weird?
So it's only faster because 1 less boolean negation which is nothing
What do you mean?
InventoryGUI?
its like its okay, but contains too much things that make things diff to understand
Yeah
It's not gonna matter because your code is probably orders of magnitude more inefficient somewhere else
I dont understand how you keep track of 2 diff menu types but only with a map
What do you mean
I never really need maps
I just create one class with a static getter for a GUI, one for each GUI I need
Because i keep track of Map<UUID, Menu> then when im parsing each menu interfce to the type i get CastEceptions
And they can send players to each other by just doing SomethingGUI.open(player)
What do you need to parse into a menu??
Cause if you have something like that then you're probably already using an advanced GUI framework
Let say im the map i track any menu type, for example InventoryMenu (normal) and PaginatedMenu (paged menu), in the interface commons methods which are implemented in the types. But PaginatedMenu contains extra methods
Which i think its causing the CastException
Im talking about my simple
That i get CastException
Sorry if i messed you with your library
Did you modify the code in it
If so then I can't really help you because I don't know what you changed, and even if I read it, I wouldn't necessarily understand all the implications
My library i code it manually
Then why did you ask me for help with my menu system if you wrote it
But i want to understand why i get cast exception
Just was asking because i see interest yur library But them i changed topic. My bad
You're casting an object to a class that it isn't
Hmn
Why if the menu types, implements menu interface
That the reason i dont understand the exception
If you're trying to cast between them that won't work
Because casting cannot change the type of an object
It can change the type of a primitive but it's deceptive for that reason
Casting is more or less just a compiler step that checks the type at that point and then allows you to access it as some more specific type than what you originally had it stored as
PaginatedMenu paged = menuMap.getMenu(uuid); // Which return a menu object, super interface of PaginatedMenu
You can't change an object into something it's not
You can only access it as a type it already is
Why?? If the PaginatedMenu access implement the methods?
๐ค
Sorry for being necious but i want to fully understand the why
Because that's not what casting is
Different types have different fields, java can't just arbitrarily mash up the memory trying to figure out how to fill them in when changing the type
If you want something converted you have to convert it yourself
If you want more abstract behavior to be represented without the need for a new class every single time, look into using lambdas to define behavior in your code
So lamda do what i need?
So how i can fix it? without making them checking instaceof on every code?
That my last question about the topic
And thanks for answering
Your questions are too vague to really answer specifically
Lambdas are one way to allow for wide ranges of behavior without needing a ton of subclasses
I don't know what you're trying to do so I can't say if they are the best tool for your situation
I still don't know what you're trying to cast or why, you shouldn't be needing to check instanceof on something every time, if you are then you're not designing your code well
Let say i have this:
class MenuHandler {
Map<UUID, Menu> menus = new HashMap<>();
Menu getMenu(UUID uuid) {
return this.menus.get(uuid);
}
}
interface Menu {
void open(Player player);
void close(Player player);
}
class InventoryMenu implements Menu {
void open(Player player) {}
void close(Player player) {}
}
class PaginatedMenu implements Menu {
void next();
void previous();
void open(Player player) {}
void close(Player player) {}
}
Do i explain with code?
If PaginatedMenu is an extension of the behavior of InventoryMenu
It should be PaginatedMenu extends InventoryMenu, not PaginatedMenu implements Menu
Okay
shouldnt next and previous also take player as an arg?
was just as an eample
oh ok
Not necessarily
Just to explain what i was trying to do
I could see good design being one inventory that serves as many players as needed and is shared between all of them
In which case next/back with no player would make sense
Because how looks now without chaging i need to check instanceof, if not i get a CastException
if u wanna show 1 player page1 and another page2
one inventory can still serve many players
Redempt, so the interface its not neccessary
And thanks!!
I was trying to fix this since 1 or 2 weeks
I want to make a levelling system in my plugin. I really just need to store uuid and exp count. Do I have to use a database?
depending on your needs you could feasibly do pdc
but for scalability you'll want a database
i wonder... what does Player#updateInventory actually do exactly? to me it seems like it does nothing... does it only update certain things?
well
it just throws the player a packet in principle
yk
trying to sync the server inventory with what the player got
sometimes the inventory object has stuff in it, that the player can't see. So occasionally you need to use that method to have the server send the player a packet about the inventory
usually need to do that when you remove stuff
but in simpler terms, what conclure said
to me it looks like it got undeprecated by spigot
/**
* Forces an update of the player's entire inventory.
*
*/
//@Deprecated // Spigot - undeprecate
public void updateInventory();```
weird
deprecated doesn't mean you can't use it
literally me
How do I make a WorldBorder slowly move? At the moment, the current WorldBorder I have just teleports to the position it's being updated to. The codeline I use is: overworldBorder.setCenter(pig.getLocation());
the setSize method has a parameter for the time which it will take to shrink/increase
dunno if theres one for the setCenter as well
I've seen moving ones before that are timed though
yea it's possible to do it manually
but it'd require manually moving the worldborder's center every tick ig
or every x ticks, depending on the speed
.java.lang.NoSuchMethodError: 'net.kyori.adventure.text.format.TextDecorationAndState net.kyori.adventure.text.format.TextDecoration.withState(boolean)'
I keep getting an error, I think I need to relocate something but I'm not sure can anyone please help, I've been stuck on this for 3 days :/
to me that looks like a question that you may ask in the paper discord
afaik net.kyori stuff is paper
How would I translate & color codes to adventure component texts
TextComponent.fromLegacyText() I think?
ah you need this https://docs.adventure.kyori.net/serializer/legacy.html
if you go to the bottom of this page, they have a section for the legacy text https://docs.adventure.kyori.net/migration/bungeecord-chat-api.html
nice that was in my IDE so i hope my server also has it without me needing to shadow it
What event checks to see if a specific item with no item meta is clicked in an inventory?
there is no specific event, check it yourself on inventory click
welp i think i need to relearn config get paths etc
Hey is it possible to hide the hearts displayed when hitting an entity ?
They only show when crit right?
Nop every time, when you make enough damage
aren't particles controlled completely by resourcepacks?
you can just upload a resourcepack to the server, and make the particles transparent i think
to me that sounds better than messing with packet modification
[1.18.2, ProtocolLib] How to properly create a RESPAWN packet?
I don't think so
hm
Are they
Nop
No, particles have their own system in place
I dont think :/
Yes that would be dum
I'll see if I can do something with the packets ty
Gl
idk that much about packets yet, but cant you just "cancel" receiving them?
You can with a packet interceptor
You can also search for particle remover plugins and maybe look what they offer inside
ProtocolLib has a really nice setup for stuff like that
Plib is friendly
Its wiki vg that scared me
i mostly mess with custom packet data anyway
My struggle is translating wiki.vg to protocollib code
Like the thread I created a second ago lol
well anyway, to me the resourcepack way would look like the easiest and most compatible way
Its additional loading screen
and if it only contains one texture, i don't think it'll take that much loading time
yea, resource reloading is like the weirdest thing in mc
funfact: on clientside logic, they mixed the splash screen together with resource loading, which means you cannot create an own splash screen without reinventing like everything apparently
The project I'm working on generates a resource pack on load and serves it through a http server built into the plugin, it was the best way to solve the problem I hit.
if you do so, the resources don't load lmfao
they reload the resources in the fucking render method i could die rn
Does anyone know any good libraries that make it easier for configuration with TOML and works with Maven? I tried "Night Config" and it was alright but I wanna see if anyone knows any good alternatives.
supported json, yaml, toml
How do I get all endermen in a world?
for(Entity e : world.getEntities()){
if(e.getType() == EntityType.ENDERMAN){
Enderman enderman = (Enderman) e;
//do whatever you like
}
}
discord font looks so much better on windows lol
Indeed
Thank you
im still using linux
linux ๐
which distro
i m on arch and its working sick as fuck
Light theme users๐ค
kde neon
short x = 4;
short y = 4;
short z = 3;
int pos = 0;
pos |= x << 12;
pos |= y << 8;
pos |= z;
x = (short) (pos >> 12);
y = (short) (pos >> 8);
z = (short) (pos);
System.out.println(x + " " + y + " " + z);
```Now I ain't great at maths, but the output should not be "4 68 17411"
why is it like that
(Basically: help I am bad at bit operations)
kde + arch ๐
Lol
same
imagine the lag if they were haha
particles are nothing
they are just a packet to the client "play some shitty particles here and there"
yep
an unanswerable question. Every plugin is different
if a noob made the plugin, the only proper way is to rewrite the whole plugin
Why does it work fine when I'm in lava but doesn't work when I'm in cauldron filled with lava?
public void DeadlyLavaKill(PlayerMoveEvent event){
Player player = event.getPlayer();
Location loc = player.getLocation();
Block locBlock = loc.getBlock();
Material block = locBlock.getType();
if (block == Material.LAVA || block == Material.LAVA_CAULDRON){
inLava.add(player.getUniqueId());
}
}```
print out the material and see what it really is
ok
a cauldron filled with lava I guess?
can you stand in a cauldron?
When I'm in the cauldron it prints LAVA_Cauldron
but it doesn't work
what exactly doesn't work
teh code is fine
oh wait
btw I wouldn't use the move event for this at all but rather a runnable
i think i know how to fix it
for example a player might be in a lava cauldron and then empties it with a bucket. now the player didn't move, and is not in lava anymore, but your plugin still thinks they are in lava
Iโm quite lazy and I left some garbage around, I thought to solve at the end of work with some code here and the but hmhmmh... There are about thirty classes
what would you suggest?
Are you moving away from the EntityDamageEvent you were using?
I have this:
public DeadlyLava (JavaPlugin plugin){
Bukkit.getScheduler().runTaskTimer(plugin, task -> {
inLava.removeIf(id -> {
Player player = Bukkit.getPlayer(id);
player.setNoDamageTicks(0);
player.damage(1);
if (player.getHealth() <= 0 || player.getLocation().getBlock().getType() != Material.LAVA || player.getLocation().getBlock().getRelative(BlockFace.UP).getType() != Material.LAVA || player.getLocation().getBlock().getType() != Material.LAVA_CAULDRON){
player.setNoDamageTicks(20);
return true;
}
return false;
});
}, 0, 5);
}
@EventHandler
public void DeadlyLavaKill(PlayerMoveEvent event){
Player player = event.getPlayer();
Location loc = player.getLocation();
Block locBlock = loc.getBlock();
Material block = locBlock.getType();
System.out.println(block);
if (block == Material.LAVA || block == Material.LAVA_CAULDRON){
inLava.add(player.getUniqueId());
}
}```
It's supposed to deal damage to the player when he's in lava and it does but it doesn't work when its lava cauldron
hey guys, how i can get a NMS ItemStack from a Bukkit ItemStack without cloning?
yes because it would just deal the damage 4 time every time I get damage from lava
is there a good way to get the build number of a spigot jar? not using the spigot API or anything
if (player.getHealth() <= 0 || player.getLocation().getBlock().getType() != Material.LAVA || player.getLocation().getBlock().getRelative(BlockFace.UP).getType() != Material.LAVA || player.getLocation().getBlock().getType() != Material.LAVA_CAULDRON)```
this logic will not work for a thre way of differing types
?
why not?
@eternal oxide The schedule does work correctly but when im in lava cauldron I only get the damage if I move in it
teh player is not going to be in both lava and a cauldron
I want it to deal damage even when i stand still
That's why I have ||
and not &&
oh it needs to be &&
wait
?paste
this
nope
wdym nope
changing that to an && isn;t going to fix it
you need to remove the player from being damaged IF his health is 0 or he's not in lava, not AND
The condition of the health is still ||
I havent changes it
only the other ones after it
if (player.getHealth() <= 0 || player.getLocation().getBlock().getType() != Material.LAVA && player.getLocation().getBlock().getRelative(BlockFace.UP).getType() != Material.LAVA && player.getLocation().getBlock().getType() != Material.LAVA_CAULDRON){
ok
yes thats ok
look at the change I posted
it does the same fix as yours, but also moves the damage Materials to an EnumSet, reduces the number of checks and makes it more readable
what is EnumSet
ok
however it has all the functionality of a Set
Not unless you manually fire a Damage event and modify the health yoruself
ok
makes sense lol, tbh i have no idea what i thought there haha
something you shouldn't use for materials
no pls don't do this!
Material (and many other enums) will soon(TM) be replaced with normal classes, so using an enumset will break your plugin in future versions
instead, use a normal HashSet
DO NOT use EnumSets for stuff like Materials
https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-2-release.534760/
oh
the changes will mostly be bytecode compatible, so you don't have to worry about it too much unless you explicitly refer to Materials as being Enums (EnumSet, switch/case, ...)
does anyone know how to create subcommands?
simply check the first given argument
if someone does /mycommand mysubcommand someparameter, then args[0] will be "mysubcommand"
or write a command manager, which will spare time in long terms
or use an existing library like ACF
but in general the answer is "simply check what the first given argument is"
or quit minecraft and play fortnite /j
uuugh
:^)
I would die 100thousand deaths for a day without fortnite
my friends once forced me too
it sucked so hard
and they were like "you only don't like because you're bad at it"
well then it's just another comic-style shooter
because that was always the thing which kept me away from fortnite
yeah it's so stupid lol
someone shooting at you? just randomly place some stairs lol
i'm not that much into hotkeying, that's the main issue
no thanks I'll play counter strike when I want to shoot people lol
i suck at bumping plates in warzone lmfao
or when I want to get shot
imagine me pressing 30 buttons in like 3 seconds when getting shot
when i want to get shot, i just visit usa
fixed
good to know
oh but that's so expensive
I've been there in 2008, 2010 and 2011. now I couldn't afford it anymore lol
i couldnt afford driving 5km into the main city probably lol
๐
also i'm getting panic attacks when running around outside at streets i dont know...
now imagine me beeing in a plane
or in america
also i'm getting panic attacks when running around outside at streets i dont know...
I know that feel lol
never noticed that
lmfao
back when I needed it, it wasn't there
i use that like 50 times per day
now I don't need it anymore and now it's there
to hang around in servers where people don't think i'm still on ๐ฅธ
for... reasons
ah yes, the good old... reasons
exactly
ffs, i need a fucking headphone jack adapter or smt
my cable is way too short
or i should put my pc onto my desk lol, tho i don't have enough space with my 3 monitors i think
office chairs and cables will never be friends
I have those phones since 15 years now and the cable looks like this since 10 years lol
lol
funny thing is actually, my headset is wireless
but when i use it in wl mode, it only plays sound on the left side due to something beeing broken right at the headphone jack on it
weird
so when i put in a cable, it sometimes works
sometimes (TM)
i finally bought a new mouse yesterday, it was overdue for years
it should arrive today unless the DHL guy throws a tantrum again
yoooooooooooooo
from 199โฌ down to 129โฌ
https://de.steelseries.com/gaming-headsets/arctis-pro
i think about getting this honestly
5XX bad gateway
just get verified ๐
can't
why not
didn't we talk about this a few days ago and you were like "I don't need to send screenshots hurbuduuur" lol
have you messaged tmp-support@spigotmc.org ?
Why were you looking to set a damage cause?
3 times
hm weird
2 times on the normal one
then idk
oh yeah well
and a broken phone
maybe ask if you're allowed to create a new account
i dont care that much honestly
how will you buy all my plugins without a spigot account though?
What happened to your backup codes ๐
https://steelseries.com/gaming-headsets/arctis-pro
maybe this one works
yeah that works
You shouldn't have it all on the same device
then it was bc of the de prefix
I have 2fa in the cloud lol
google authenticator sucks
^
I use a website for 2FA
and google authenticator as backup
and saved all backup codes in a nextcloud
guess I'll be fine
oh my fucking holy
tf?
the arctis pro costs 120โฌ
and the arctis pro wireless costs fucking 318โฌ
WTFH
do they have USB?
i suppose
there's also many... "klinkenstecker" headphones
Yo uh
can I invade your DMs for a minute?
depends what you wanna invade them for
just one short question
sure
[08:36:32 INFO]: [TestPlugin] Enabling TestPlugin v1.0
[08:36:33 INFO]: [TestPlugin] [STDOUT] Disabled due to no Vault dependency found!
[08:36:33 WARN]: Nag author(s): '[luckztoggled]' of 'TestPlugin' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[08:36:33 INFO]: [TestPlugin] Disabling TestPlugin v1.0
I keep gettin this error
Anyone know what's happening?
spigot
It's a warning, but all you have to do fix it is do what it says
And put Vault in depend
?paste your code to hook into vault
can someone at dev team PLEASE remove that shitty nag message? it's nothing but annoying
it's from paper
spigot doesn't do it
There you go
uhhh
that is not your code
aight, my bad
that's just the error message
np lol
can someone at THEIR dev team remove it? lol
well there's a good reason why they added it though ๐
?paste
edit: yes, all the steelseries headsets have usb except the normal arctis 1 and 3
nice! I don't like headsets without USB
which are both under 69โฌ
Want my maven code?
so makes sense i guess
can't hurt to send that too but the interesting part is how you hook into vault
yo everyone
today is international "non-smoking" day
tho i love how they lie about the mic quality probably
i know no single headset that has a mic that isn't total dogshit
the only way to really get awesome sound is a proper microphone and those alone cost 200โฌ+ :/
well not necessary
my mic was like 130 i think, and it's pretty fine
that looks good
oh yeah 200 was exxegarated
I got a cheap Rhode mic that's also fine but it's XLR only so yeah I need a proper soundcard
The shit still gets disabled tho
i thought about getting the sm7b, but i dont have an interface or smt, and they are 1: expensive, 2: too big for my desk
that's why I asked you 3 times to send your actual source code
focusrite has some cheap interfaces that are also quite small
https://focusrite.com/de/audio-interface/scarlett/scarlett-solo this for example
Is there a way to add custom tags to an item?
yes, PersistentDataContainer
ah ty
you can use PDC for entities (like dropped items), ItemMeta (on itemstacks), chunks, worlds, and tileentities
also I think I should celebrate that my covid test is (still) negative (it probably will be positive in a few days). so WHERE'S MY F'IN JรGERMEISTER
or the dt770, but idk if that'd be a good idea for gaming and shit
JรGERMEISTERRRRR
I don't know jack shit about gaming headsets
its not a headset
oh what is it
oh those look good. but I'd always buy stuff like that from thomann
but idk if they are okay at gaming shit, or suck completely
yea, was just a reference
why would they suck for gaming?
i dont buy on amazon ever
except that obviously they are only stereo and no 5.1 or so
because theyre made for music and shit
i have no idea what you talk about lol
okay so, certain headphones have different EQ characteristics
e.g. if they are made for music, they tend to not play the sound exactly as the PC sent it to them
they wanna make it sound "more bass" / "more crisp" whatever
alltho i wonder... can i even use those without some external devices?
studio phones are made to play the sound exactly as it was given to them
like are they as well some xlr external shit as well?
get them DT880
it seems like they have the "normal headphone jack" with an adapter for 6.35mm
so you should be able to use them fine with every device that has a normal headphone jack
I own the pro version of them and sonarworks which makes their frequency response flat, mainly for mixing and producing
tf is 6.35mm
the large connector
check my pic above
that's the 6.35mm jack
?paste
and the "small" is the ones that mobile phones used to have
dw it fits into the pc perfectly
6.35mm is the one that studios, amplifiers, electric guitars etc use
i see
the headphones you sent seem to have the "small" one builtin and they also ship an adapter to the 6.35mm variant
6.35 has been the industry standard for decades
i suppose i'll just stick to the arctis pro?
honestly I can't remember when the last time was that I used a headset, I'm going headphones + standalone mic for so long now
less mindfuck
yeah me too
but headphones keep annoying the hell out of me, I guess I just don't like having something on my head. Eventhogh the 880s are really comfortable
who knows the maven import for net.cubespace.Yamler?
but ever since I got my studio monitors I don't even use my headphones that often anymore haha
doesn't seem to be in any public repo. just clone the repo, do "mvn install" and then you have it in your local repo
Jitpack :)
jitpack is such a pain
Not really
Yeah I never got jitpack to work but I heard itโs quite nice once it works
well anyone try to get oraxen working from jitpack
never worked for me
if someone doesn't provide a proper repo, I just upload it to my private repo
Hey, I wondered if someone could take a look at my code:
https://paste.md-5.net/wilacudoxo.cs
What I wanted to do is that if a player has an item (a loaded crossbow in this case) in his inventory and it is not his handitem then it was supposed to be replaced with another item. But for some reason it's only working if the item is in the hotbar. It's not working for the rest of the inventory. No errors in the console.
if(invItem.getItemMeta().getDisplayName().equals("test")) {``` I always check if the itemmeta has a displayname first before doing that
Had some issues when I didn't do that somehow
Yeah it might be null
that is an absolute arrow if ive ever seen one, shoud look into avoiding the arrow-code pattern
true
But I didn't get null pointers and it was working but only for the hotbar
style ur code after what its for ofc
is it even possible to have a "charged" crossbow outside of the hotbar?
Believe so
yes
sounds dangerous
XD
imagine charging some crossbows, then tossing them into your backpack and start your day lol
?paste
Would be exploitable in MC I imagine lol
https://paste.md-5.net/raheweheku.xml
I tried so, loaded into the pom but did not recognize it within the project....
Does it have a repo?
i do if (item.hasItemMeta() && item.getItemMeta().blah)
Is there a way to check if a string contains color codes?
it returns null if there is no meta though
you can do ChatColor.stripColors and then check if the string is still the same
no then it creates a new itemmeta
I mean for the repo you linked I only see a repo for Yamler-Bungee
?
it only returns null if no meta is available for this material (AIR e.g.)
ah
getItemMeta either returns the existing meta, or creates a new meta if there isn't one yet, or returns null if this material cannot hav emeta at all
Curious what material can't have meta? Air?
YamlerBukkit, Core, Bungee
yes, and probably CAVE_AIR and VOID_AIR
Does this make sense? java String displayName = (input.equals(ChatColor.stripColor(input))) ? "&e" + input : input;
and maybe also items that aren't really obtainable like Material.POTATOES
yes
this adds &e if input has no colors
yes that's what I want to do
I'm looking at jitpack and I only see Bungee
So that's probably the only one. Try to see if Bungee works
looks fine
thanks, wasn't quite sure somehow
look at that mike
Remember just because they have a repo of something doesn't mean you can access it. If you look at where they import the core you'll see that they don't actually have a repo for it because it's a local repo.
<dependency>
<groupId>com.github.Cube-Space.Yamler</groupId>
<artifactId>Yamler-Core</artifactId>
<version>85c22fc913</version>
</dependency>
And this doesn't work?
Cause that works for me so 
what even is yamler
doesn't work... It doesn't show anything in the project
there's no package, nothing
also they have a "BaseConfig" and "ConfigBase" class in the same package lol, a bit confusing
Did you try the version I used? 85c22fc913
simply clone the repo, and install it locally mvn install
Silly question, but did you add the jitpack repo?
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>```
sure
worked
thanks
np, this always works if they don't provide proper repos themselves
however I saw that a very good developer used it in a proj... so, why dont give a try
as said, I have no idea what it does anyway
same
lol
LOL
package net.cubespace.Yamler.Config;
@Deprecated
public class ConfigBasic extends BaseConfig {
}
Ew
A readme is so important tho
Hello, I've been searching for a way to remap spigot NMS to mojang ones with gradle and I haven't found a way. I tried using java -jar buildtools.jar --rev 1.18.2 --remapped but methods are still named a, b, d...
spigot maps arent complete
thats how mojang names their methods, they never code without beeing high
i think its more to do with people stealing code than being high
to make sure people can't understand it
i can't understand mojangs code even if it's mapped tbh
yea lol
and i'd be surprised if anyone can either
Actually mojang names them with normal names, but they obfuscate them. It's pretty easy to do it with Paper, but I want to use Spigot
sometimes i feel like they have more spaghetticode than me
yeah thats what i mean
to make it hard to understand
I can understand some of it you just need to spend a lot of time deobing it
yea
god they really think i meant that for real?
spend hours going through that
no obviously
just starting conversations
there's a website with deobfuscated methods, like Obf spigot a stands for x for deobf spigot and y for deobf mojang. I can't remember it rn
renderFace(T p_228884_1_, Matrix4f p_228884_2_, IVertexBuilder p_228884_3_, float p_228884_4_, float p_228884_5_, float p_228884_6_, float p_228884_7_, float p_228884_8_, float p_228884_9_, float p_228884_10_, float p_228884_11_, float p_228884_12_, float p_228884_13_, float p_228884_14_, Direction p_228884_15_) Is my favorite
I have a List<String> "lore" and another List<String> "toRemove". For example, the original lore might be
First line
second line
I WANT
TO REMOVE THIS
fifth line
Obviously the "toRemove" list looks like this
I WANT
TO REMOVE THIS
I only want to remove the "toRemove" from the original lore if it's included in exactly the same order though. I could of course iterate over every line of the original lore, then once I found the first line of the toRemove lore, keep iterating and if all further lines are matching, I can note down from which line the toRemove lore started, if you get what I mean.
I wonder if there's an easier way?
a stands for x
i love it
b stands for boring
I mean obf a stands for deobf spigot Packet and deobf mojang PlayerOutPacket
yea, i'm just not funny lol

i never was tho
hahah
Mixins are neat
they still make my head burn
having said that, is there a way which doesn't need me to change back to maven or to use paper?
no idea
Or I have to translate the methods manually ๐
If you want to use gradle use the paper dependency
i never even tried understanding those a methods etc
It's the easiest way
good luck with that lmao
feel free to bring me to my grave when you're done
hahah thx
i remember i wanted to mess with packets
then i saw ```java
public void a(){
this.b();
}
public void b(){
this.c();
}
and kept using the messaging channel lol
Now we have mojmaps which are great
Before you had to look at what the methods were doing to figure out which one to use
Last time I saw this I literally switched to paper hahah and then my client had to switch to paper too and I was sad ;_;
i didn't switch to paper yet because i get a headache from all those TextComponent shit
I hate that too
Components are great
most people find it good, but i just find it absolutely annoying
How so?
uhhh
They have a good wiki, and MiniMessage makes it easy to put in configs
idk.. maybe because e.setJoinMessage("your join message"); is easier than e.setJoinMessage(Component.whatever("your join message")); and it can get really annoying when trying to chain multiple components
yea, apparently luckily you dont have to
It does
mhm
why? ahah
which means people tend to scream at you for using it
player.sendMessage(ChatColor.GREEN + "Hello" + ChatColor.GRAY + "Bye") turns into player.sendMessage(Component.text().append(Component.text("Hello",greenStyle)).append(Component.text("Bye",grayStyle));
Because Minecraft chat is mojangson not strings
i would use player.sendMessage("ยงaHello ยง7Bye"); anyway
That's legacy
Yea but when you want to use hex colors it's not possible
I had to use hex colors in a recent plugin and eugh, never again
I really dislike the components too
like, why would i have to use hex codes... i use colorcodes mainly for chat messages
Just use library like Minedown, it make things easier
and there, i always use green, blue, yellow, red, and grey
thats all
i have 90% of colorcodes in my head lmfao
People want to do this...
yea, i don't bother doing such thngs myself
Will take a look thanks
to me, net.kyori.adventure is more like net.kyori.nightmare
I'd prefer a single overlay component you could add to chat like `Player#sendMessage("Hi blah blah", new Overlay(start,end, json))
but preference ig
lmao
Does anyone have a tutorial on how to change the HUD with a plugin and a texture pack?
but yea, at least they didn't completely remove those methods. alltho that'd be impossible when trying to keep compatibility
upload a texturepack on mediafire (just example), paste the file link into your server.properties, and done
mediafire was like the only site i know that works for this, but there probably are a few more
they removed some with the deprecation, I had to change some methods even without they disappearing
tf?
i mean... afaik, they just made them deprecated, but still keep them
to make spigot plugins compatible ofc
ChatColor.of(hexCode) now returns a white ChatColor hahah
No, how do I add a new scale, such as a thirst scale, and manage it from the plugin
ahh i see
I know that I am talking too much about hex colors but they are my nightmare
i don't think that's possible. but idk 100%
about adding new textures
or rendering in particular, because i'm 99% sure it's limited by the client
But what about the Itemsadder?
what that
cant visit it because i dont have an account
for reasons i dont wanna explain a 3rd time
It's all made in vanilla.
Then open original image
Yeah that's resource pack stuff
https://nms.screamingsandals.org/1.18.2/ this is the website I was talking about
interesting
well, i personally never messed with stuff like custom textures, or even items, so i have no idea
i messed with editing a rarely-used font-bitmap to add custom characters to the server, but thats all
god i hate it, currently you can't pay like anywhere with credit card and shit, because all those devices are broken, now i have to go to some atm and pay a 10% fee to get money lmfao
Wack I've never seen a place that doesn't take credit
ยงxยงRยงRยงGยงGยงBยงB
that looks so scuffed
well thats the default one
hex is so weird change my mind
actually i use that all the time, just with& instead
how to fucking remember all those values
even then can you remember rgb :}
rgb isn't "remembering"
0=none, 255=full
red->green->blue
easy
just think
does hex have such a "system"?
Okay, like, I won the game
or is it just some random numbers and chars together
never
it's the same
ff = 255
it's just hexadecimal
uhhhhhhhhhhh
compileOnly 'org.spigotmc:spigot:1.18.2-R0.1-SNAPSHOT:remapped-mojang'
This is how you get NMS mapped to mojang
so it goes from what to what?
e.g. in decimal
1,2,3,4,5,6,7,8,9,10,11,12
in hex
1,2,3,4,5,6,7,8,9,a,b,c...
i see
from 0 to ff
yes, that means ff red, 00 green, 00 blue
yea
IU Knowledge Base article
okay... makes at least some sense
are you sick?
thats not your website you advertise there
just looka tht efirst two columns
something's wrong here
that website looks like some bytecode stuff
0 and 1 everywhere ahhhhhh my heaaaaaad
what would be the best way to disable commands for non-opped players?
if(player.isOp()){
//run command
}``` i guess
thanks but what event should I use? and what method to call to disable a command
thats not how commands work
in the commandExecutor's onCommand, just check if the player is op
did a covid test today, it was negative. but my bf tested positive today
F
I'll get him executed if he actually spread it in my apartment
@Override
public void run(Player p, String[] args) {
if (p.isOp()) {
if (args.length == 2) {
if (args[0].equalsIgnoreCase("confirm")) {
Main.getPlugin().shouldResetWorlds = true;
Bukkit.spigot().restart();
} else for (String s : getSyntax()) p.sendMessage(Constants.CHAT_PREFIX + "ยงe" + s);
} else for (String s : getSyntax()) p.sendMessage(Constants.CHAT_PREFIX + "ยงe" + s);
} else p.sendMessage(Constants.CHAT_PREFIX + "ยงcYou don't have Permission to use this command.");
}```
an example
hm ok i guess the player would still see the command but couldn't use it right?
i made myself a commandmanager, so it's a different method, but works the same
ya
you can't remove commands from tabbing from certain players
does anybody know how can I make the armor stand wear the armor with spigot
that's my issue ๐
You actually can ๐ค
even ones with no permissions?
There's an event for it:
CommandSendEvent
that doesn't remove it from the tab-completions
yea
he wants to only show specific commands to specific players on tab-completion
like vanilla does with /gamemode and /op
and afaik thats not possible due to vanilla limits
yea so even though a player could tab-complete the bukkit command /help he still can't use it
i mean you can use TabCompleters, but i dont think you can use them for commands themselfes, but only for arguments
but i don't want him to even see it
That event is player specific and you can remove tab completion of commands
Oh, wait
oh apparently it is indeed
/**
* This event is called when the list of available server commands is sent to
* the player.
* <br>
* Commands may be removed from display using this event, but implementations
* are not required to securely remove all traces of the command. If secure
* removal of commands is required, then the command should be assigned a
* permission which is not granted to the player.
*/
public class PlayerCommandSendEvent extends PlayerEvent {```
interesting
i thought it's called when a player run's a command, which imo the same suggests
kinda weird
how would i remove the bukkit.command.version permission for a player then?
assuming i am running my own server
removing permissions from players is.... uhhh
"tricky"
use a permissions api/plugin i guess
Reflection is man's best friend idk wym
gosh

reflection is only good in video games
UE5 
thanks a lot for helping ๐
my pc burning ๐ฅ
Flames per second
actually yesterday my fucking gpu had 3 blackscreens (probably due to overheating) because of genshin
i'm confused
i can play like every game for hours, even fucking demanding stuff
but some small games keep fucking my gpu
Star Citizen used to black screen my PC. UE5 on release did the same thing
But now it's fixed
like after playing for about 1 hour my pc just blackscreens
New AMD GPU?
warzone, no problem
cyberpunk, no problem
horizon, no problem
gta, no problem
minecraft, genshin? DEAD
old ass rx580
My 6800xt seems to be okay now but it randomly black screened a lot a few months ago
had to downclock it to 900mhz so it doesn't get too hot
which apparently fixed it
i mean, doesnt matter that much, as those games like genshin run on toasters, but still weird
someone may send over a new gpu? ๐
I had a 970 for the longest time. Never had an issue with it ever. Now my new card is like an IED in a hailstorm
Sure, as soon as I get 900โฌ
i would like something like a gtx1080 or smt, which is still a beast
i dont need rtx tbh
(Totally not overpriced)
thought about the 3060 before, but i don't think that it's that good aside from "working" with rtx
1080 is a bit faster but unless you get it used - more expensive
hello, player.setResourcePack() doesn't seem to do anything, the url and hash is all correct, but when its ran. It doesn't prompt the user to download anything and the texture isn't updated
i checked the log as well and there wasn't a resource pack receive log
Faster than what?
3060
Still wouldn't get the 1080
is there any way to load plugins/AthenaItems/language/<configfile> ?
Same but I'm not talking about me so 
Atm I wouldn't recommend buying a rtx 3000 gpu at all since new gpus coming the next few months
Few months ago I got a cheap gtx 1070 for like 200โฌ
now running them in SLI lol
What is the new name of initPathfinder
in Mojang Remapped NMS?
get the block under the player's location and set it to air or whatever?
Ok I try
I donโt have the gpu money anyway so doesnโt matter
Iโll probably stick to my old ass gpu in 10 years lmfao
you can give example code?
pseudocode:
void event:
Player p = e.getPlayer();
Block replace = p.getWorld().getBlockAt(p.getLocation.getX,p.getLocation.getY-1,p.getLocation.getZ)
replace.setType(Material.AIR)
yep
Ok
please?
i dont know
whats sorta pseudocode is that lel
pseudocode which contains only void event written in pseudo
rest is in normal code ๐
It works make sure you have a direct download link
yeah just found out about that
missed the http stuff
does somebody know how can I make a rainbow armor on a armor stand
Can I use Remapped NMS aswell with not remapped?
Same way you load any other config
i just got it, it turns to null before. but i just missing "!" on detecting the files. Thanks for answering.
Why don't just use java Block replace = p.getWorld().getBlockAt(p.getLocation().subtract(0, 1, 0));
player.getLocation().getBlock().getRelative(BlockFace.DOWN) might also work
^ and .setType(Material.AIR)
shoudl have turned ping off ๐ฆ
ah i dont mind xD
We need Skynet so it can correct my mistakes.
So I have like a trusted players system for each player, and I want the player to be able add/remove trusted players even though the player is offline, what data should I store?
uuid ?
I'm trying to find a way to get the OfflinePlayer object without getting it from mojang api or something.
UUID
Also why OfflinePlayer#getName is nullable.
damn discord refusing my messages now
I mean, you will have to talk to mojang servers
loop over your offline player objects to find a matching name
This is what I got
@Nullable
private OfflinePlayer getOfflinePlayer(String name) {
return Arrays.stream(Bukkit.getOfflinePlayers()).filter(
player -> player.getName().equalsIgnoreCase(name))
.findAny().orElse(null);
}
from that get the UUID and add it as a trusted
because not every UUID has a valid "real" player
Question is if that is more permanent than mojang api calls
There is also Bukkit#getOfflinePlayerIfCached
that is paper-api
not in Spigot
Well, not really usable for your usecase
even if the player has played before
but the server shutdown
it won't be in the cache after the restart
so, stick with looping all players data?