#help-development
1 messages · Page 474 of 1
that code is a huge mess
Ugh finally. Works but i had to create a custom model.
why do you only have 3 college profiles but not a single university profile?
where's the staatsexamen profile?

WHERE IS THE STAATSEXAMEN PROFILE
Useless. We have anarchy. No need for filthy lawyers.
fair enough. give IP, I wanna send you some abmahnungen
This will be met with a unterlassungsklage
then oxford english dictionary will join and demand it to be changed to "an unterlassungsklage"
._.
oh shit this reminds me, I missed my meeting with sonatype
Its "a lawsuit" right?
no, but you know spigot's library loader feature, right?
funny dudes from paper's discord claimed it violates maven central's ToS
so I asked them whether it actually does
Huh?
and instead of just answering, they invited me to some zoom meeting
lol
which I forgot to attend
Oh no 😦
Dont put the spigot community in a bad light
When was it? Cant you just claim time zone fkery?
they called me and said "13 o clock german time"
they even put some "agenda" into the invitation
So nice of them
and now the best thing: I wrote the email like 3 weeks ago, then a few days ago, some random german mobile phone called me. and when I confirmed that I got time on the scheduled date, the dude was like "yo nice digga, dann trag ich das so ein"
XDD
it was indeed funny though, at first I thought they scammed me
i didnt even know it was from south park lol
how do I get the armor points of a entity that is not a player?
Hm. I think you need to get the armor and armor toughness attributes from the entity,
how do I do that?
LivingEntity#getAttribute(Attribute attribute)
cast it to Living Entity
lemme see if my code doesn't become red as it did the last 5 hours
wow it worked
no way
if your code becomes red, it either got a fever, or some STDs. in both cases, go see a doctor
or a doctress, if that's a word now
a what?
a female doctor
just say doctor
english is weird
if there's actor and actress, there should also be doctor & doctress

wait, how does minecraft calculate damage with armor and stuff whatever
can you maybe get a bit more precise lol
like, I have a certain amount damage and I need to get the armor value and calculate how much damage is left after applying the armor values.
what is that ._.
how can I make a chunk feature generation? right now i'm generating something every x chunks and i want to add some offset but the offset often ends up being in another chunk so i would need to know if the offset is in another chunk when the actual chunk generates
not sure if that's clear
This is the calculation for damage reduction based on defense points and armor roughness
okay, I'll try that
Create a noise map
open simplex noise is the best imo
i had thought of noise, but I need a single point rather than a map to sample from
i basically need to generate asteroids
Then use a noise map
of different sizes
the asteroids are set structures and i just need to choose the locations where i want them to generate
without them overlapping
exception.printStackTrace(); or Bukkit.getLogger().severe(exception.toString());
The former
Does EntityDamageEvent.getFinalDamage() get the damage that is going to be dealt including all values such as enchantments, armor, etc.?
Yes
I'm stupid af
someone send sqlite implementation that you think is very good thanks
Google your question before asking it:
https://www.google.com/
i did
then i do what the website says
and someone says that there is a better way of doing it
What do you mean by sqlite implementation?
like how to make a connection
You mean driver?
That should be googled
ok
whats the maximum amount that i can zoom a player's FOV using effects/attributes
because slowness isnt cutting it
i've seem a forum page saying set their base walk speed, i tried it in game with the attribute command, but im not sure if its the same because it actually removes the fov change and enables me to walk with slowness 255 which is a weird interaction
The effectiveness of potions starts looping after a certain amount of levels
yeah slowness 9 does it or smn
im testing now
seeing if walkspeed + slowness stacks or not
i found another thing: freezing adds fov but im not sure exactly if i use .setfreezeticks() itll trigger that.
spigot artifact (for NMS) makes intellij give this warning:
Provides transitive vulnerable dependency maven:commons-codec:commons-codec:1.11
Cxeb68d52e-5509 3.7 Exposure of Sensitive Information to an Unauthorized Actor vulnerability pending CVSS allocation
is it ok?
or should i be worried
It's fine
looks complicated i usually look at that and think hmm yes agreed
Exception in thread "main" java.lang.RuntimeException: Zip entry 'META-INF/plugin.xml' tries to escape target directory
at org.jetbrains.java.decompiler.struct.StructContext.addArchive(StructContext.java:143)
at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:86)
at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:64)
at org.jetbrains.java.decompiler.main.Fernflower.addSource(Fernflower.java:73)
at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.addSource(ConsoleDecompiler.java:111)
at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.main(ConsoleDecompiler.java:79)
just trynna use fernflower java -jar fernflower.jar e.jar e
trynna decompile this e.jar
and decompiled results in e
wtf is this
sounds like ai trying to escape
plugin.xml is going to take over my vomputer!!11!
i got this from my intellij install
its on your whole network already
Hi, a friend of mine is holding out on one aspect of the game. He tells me that it's impossible to modify an item like a leather chestlate to be lava resistant by changing an NBT attribute, is it true?
pretty sure u can give items tags in data packs
the tag Invulerable should also work on items
I tried making a plugin and having my other plugin be a dependency of the new plugin
I thought I had it working but I was wrong
it says missing symbols on the import statements when I build it
even though I dont get errors in intellij
does playerteleportevent also trigger when a player changes the world?
the code for my old plugin is local on my pc
probably not
you probably need to use PlayerChangedWorldEvent or w/e its called
did u try invalidating caches?
how do I do that?
ik but i need some way to cancel it
File -> invalidate caches
didnt change anything
it just says that the POM for teh old plugin is missing, no dependency information available
I thought adding a dependency block to the new pom would be enough
is there a way I can build the old plugin in the local repository?
I thought it was done automatically but i am unsure
omg im dumb
thanks it works now 😛
also why does my jetbrains annotations dependency keep dissapearing after I restart intellij
like my other plugin doesnt do that but I cant find any differences between the two dependency wise
because I wanna use NotNull since that waht intellij defaults to when generating code
any good lib for custom mobs?
custom stuff run when diff stuff is done with the mob
etc.
how should i remove the -dev prefix on jar with paperweight on gradle?
?whereami
how to disable entering a nether portal in a world?
Can't you disable the nether in server properties?
I think they want it for a specific world
yea
Hm
?
yes
👌
Is it possible to create worlds asynchronously? I get this exception when trying to do that.
java.lang.IllegalStateException: WorldInitEvent cannot be triggered asynchronously from another thread.
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:572) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.MinecraftServer.initWorld(MinecraftServer.java:606) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3735-Spigot-e4265cc-b421af7]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.createWorld(CraftServer.java:1133) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3735-Spigot-e4265cc-b421af7]
at org.bukkit.Bukkit.createWorld(Bukkit.java:672) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.WorldCreator.createWorld(WorldCreator.java:405) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at com.seailz.towerwars.game.Game.<init>(Game.java:51) ~[?:?]
at com.seailz.towerwars.queue.QueueManager.lambda$new$0(QueueManager.java:29) ~[?:?]
at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3735-Spigot-e4265cc-b421af7]
at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3735-Spigot-e4265cc-b421af7]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]```
No
You cannot interact with the world asynchronously in any way. Besides using ChunkSnapshots or editing the files directly
That's a pain.. thanks for letting me know.
I mean there would be a (quite tedious) workaround for this if you really want to save like 2 seconds.
You could let another server create the world, copy the files over and then only load the world on your server.
Loading the world is a synchronous operation tho. So you would only save the creation time.
It would however take longer than creating it on your server due to the http based transfer + you will run into issues if the other server is not reachable
?pdc for me
Someone knows how to import a dependency in automatic in every maven project on intellij?
I doubt there's a way since copying a pom is no effort at all.
You could create a huge project and create subprojects that take the dependency from the large projects parent pom. The larger the project gets the longer your intellij loading times will get tho
can do it with an intelliJ plugin
What plugin?
oh you want something already made
I can make it by myself even i didn’t tought about it
Is that really worth the effort? I said no because I doubt anybody made this already. There might be a slight chance to find something if you dig deep enough tho
Why does this not work (what should be the channel?) private void sendServer(Player player, String server) { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream); try { dataOutputStream.writeUTF("Connect"); dataOutputStream.writeUTF(server); } catch (IOException e) { e.printStackTrace(); } player.sendPluginMessage(PremiumLobby.getInstance(), "bungeecord:bungeecord", byteArrayOutputStream.toByteArray()); }
anyone nkow if theres a method to see if a player is currently using a spyglass
since there's the animation that other players see
of you holding it
so it's got to be somewhere
thi
There's probably a function in nms. Although the interact event would trigger for the zoom-in. You won't notice when the player stopped though
yeah but if the player is no longer using the spyglass
Unless it keeps triggering when holding rightclick, idk about that
the animation will stop for other players on the server so theres gotta be some sort of data
it doesn't
I've got a question:
If I want to send a player from one server to another, why do I need Bungeecord for it?
And I just want the player to connect to the server, don't want to send playerdata or so.
Well in that case you will have to dig into nms and find the right methods
right ok
before i waste my life away does anyone have methods for that
its client sided, without a mod its impossible to know they stopped
yeah but like all other players on the server see the animation
so...
But they send a packet, otherwise players would not recognize it
Because bungeecord holds all connected servers together and then you can move players in between
yeah
Without it there is no server-server connection
Do you have a resource where I could read up on some of the details of "holds" them together?
Bungeecord acts as a middleman between the server and player
The minecraft client doesn't allow servers to move you to another server
That's ehy I'm asking for a link or smth, before I go rumaging around. If you don't have one, that's fine.
The workaround is have a middleman between client and server, when the server wants to move the player to another server, it can tell the client thatt they're just changing worlds
The player always is connected to the bungee server, not the minecraft server
its just the use item packet
then how do players know when someone stops using a spyglass
And the packet for "unusing" the item?
because its sent again
Probably the same
at the very bottom of wiki.vg/Protocol
I have been struggling with my project for a while now. How do I use classes from another plugin that is required to start. I cannot access it in any way, and it is starting to annoy me. Can anyone help?
This is what i'm trying to do:
- Parent
- Plugin A
- Plugin B
- Plugin C
From plugin B, I want to be able to access plugin A, and from plugin A, I want to be able yo access plugin B. Same with with C and all the other plugins in my parent project.
I have already added the plugins as dependencies, but i'm pretty sure maven can't recognize them. In plugin A I have a function called format() that is attached to the String class. In plugin B I cannot access String.format(). Any ideas?
Are you using kotlin or how did you achieve the last part?
Extension functions have to be imported into other classes from the class that introduced it. You can't just expect kotlin to know that any class added an extension function to the String class
For the other part it should work by just adding your plugin as a dependency (mvn clean install and add it to pom)
yes I know. Maven can't recognize the dependency, because when I try to import, it does not recognize it.
So from parent project I should clean install so all of them do it?
Are they seperate projects or seperate modules?
separate modules.
Oh in that case I haven't done it yet.
I have two completely seperate projects and just added this to my other project:
<dependency>
<groupId>me.fabsi</groupId>
<artifactId>eventengine</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
so how does maven know where to find it..?
Maven always checks the .m2 folder first before checking online
yup that's exactly what the install-stage does
yes
Most likely
However you might run into conflicts for your first build since both depend on each other.
Therefore you should build one side without depending on the other side at first, then build the other side and then add the dependency and rebuild the first.
Dunno if maven is smart enough to resolve that by itself, it might be
You can't have a cyclic dependency
Built jar: https://i.imgur.com/thcZNM4.png
Project code: https://i.imgur.com/iLh4Mtg.png
i built a project with maven and the comments and documentation too, is possible to build with them?
For building i used install
no method but you can listen for a specific animation packet using protocollib
javadocs plugin
?
Im trying to delimitate a zone with a Hoe, how to get Right and Left click in a block?
Im trying with the BlockBreakEvent
but that only gets left
PlayerInteractEvent?
Lemme see
PlayerInteractEvent#getClickedBlock should work, thanks.
don't forget to check hasBlock()
and hand
?interactevent
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
PlayerInteract fires on left and right click (once per hand). And it fires for air and blocks
So basically you can ignore events that interact with air (hasBlock() = false) in your case
This only checks if its main hand or the other one?
Had an aneurysm making my tool listeners because of hand shenanigans
Yes because the event gets fired twice
k
hasdhjasjd lol
so now i could make my own logic, right?
I would implement it with guard clauses like in the example. But besides that, yes
I just want a normal functionality
Like world Edit
but for only delimitate a zone
Guard clauses don't change your logic, they just prevent deep nesting
Any example?
if(condition){
stuff
}
guard clause:
if(!condition){
return;
}
stuff
No guard clause
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() == EquipmentSlot.HAND) { // * if the hand used is the main hand:
// provide functionality
}
}
Guard clause
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
wasnt there a command for this?
This?
?if
gosh why isnt there a list of commands -,-
here we refer to it as early return
What if you do it in a loop with continue? Then it's not exactly a 'return'
I like to leave out the brackets for guard clauses aswell. So basically
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) return;
if (!event.hasBlock()) return;
// logic
}
?interactevent
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
just put both of those on the same line
That's personal preference but I prefer it this way
@EventHandler public void onPlayerInteract(PlayerInteractEvent event) { if (event.getHand() != EquipmentSlot.HAND) return; if (!event.hasBlock()) return;
// logic
}```
i usually code like this
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if ((event.getHand() != EquipmentSlot.HAND) || (!event.hasBlock())) return;
// logic
}
not enough comments
comments for what
needs at least a paragraph explaining the early return
true
We joking, for anyone listening, Please don;t listen to us
never use comments kids
its a bad addiction to start
if (!event.hasBlock()) return; // return if event has no block
The only right way
they are an invention of the human mind therefore they suck
no it should me more like "if the event does not has block, return"
Although it might not be detailed enough. Maybe more like
if (!event.hasBlock()) return; // return if event has no block. It might be that the interaction was triggered by air interact. We don't want to listen to that
I don't write comments unless I'm getting a headache and do something really stupid to bypass something equally stupid
Building a workaround to bypass issues that are there because you workarounded something earlier. Lovely - we need more technical debt.
well you also have to put a link to the docs explaining what hasBlock does
It's not something I made so it's not my fault
And additionally cite it in case the link no longer works. Just to be sure
To make the changes needed to fix that issue requires such a sweeping change that it's not worth the time fixing it
If you don't have 4 lines of comments for every line of code, are you even coding?
literally all of tech debt™️
I'd still put a
// TODO should be fixed by doing A
And then never touch it again
I always do
I have some 20 year old TODO's
public static FishingItem getFishingItemFromItemStack(ItemStack itemStack) {
String identifier = ItemUtil.getCustomTag(itemStack, "hooked_item");
if(identifier != null) {
return Hooked.getInstance().getRepository().findItem(identifier);
}
return null;
}
don't need comments if you embrace long names
well yes, you need to explain why you chose that name
Optional<String> :)
Is that a Bukkit ItemStack or a Mojang?
wasn;t clear enough
silence wench
if you dont provide an explanation for why you named it as such, it doesnt get compiled
How am I supposed to work with code of others when I can't trace back the exact thought of the developer coming up with the variable name?
thats why I work alone
I'm reading the github page for this file and noticed there's no space between two of my methods
my ocd
return ItemUtil.getCustomtag(item, "hookied_item").map(Hooked.getInstance().getRepo()::findItem).orElse(null);```:)
Block block = event.getBlock(); // the variable is named block because it holds a Block from the BlockBreakEvent
Spigot discords new #badpracticesunday
Also, where's the
// FIXME: Because why TODO when there's a longer option
gang?
I don;t use FIXME as it implies I did something wrong.
why is that a thing
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
even with this the javadoc is not displayed
the javadocs for what
check yoru build log to see if the javadoc built
same my todos are basically for stuff like i could improve it with more time, but why bother if it works
in the reply
it get build, and in one case gave an error
would the correct way of getting my core plugin be this
public ScorchCore getCore() {
return (ScorchCore) getServer().getPluginManager().getPlugin("ScorchCore")
}```
That's one way, yes
is that the best way, though?
But getPlugin might return null
if the plugin is installed it won't though.
As long as it is enabled, yes
okay, thanks!
@Getter
private UUID uuid;
@Getter
@Setter
private int kills;
@Getter
@Setter
private int deaths;
@Getter
@Setter
private int gems;``` would it be proper usage to make them static?
in my user class
Why would you want them to be static? They are not the same for all users
Why are you in a static context in the first place?
you need an object instance
so java User user = new User(uuid); user.setKills(5);
yeah
Hey,
I have a problem. I want to prevent the player from moving before a minigame start. I tried Canceling the move event and settings the to location to the from location, which starts teleporting the player around on his block. Teleporting the player back does also do nothing, not even resetting the player.
I think the event triggeres itself when setting the to position to the from position and then it is in a loop. But checking if the event is already cancelled is not working. Even giving the player a custom Metadata while he gets teleported back and then checking if the player doesn't have the tag set before teleporting him in the event does also not work.
Anyone any Idea, because this is really frustrating?
try setting the to position to the from position
give the player jump boost 255 and slowness 255
you only need to cancel the move event
not make any changes
only cancel if x,y,x change
I did try this before. Did also not work
ignore pitch/yaw
it works
The player will attempt to move but the server will foce him back to his spot
You can't prevent the client predicting the movement
but the server will correct it
paper api totally sucks
starting from the weird naming naming for the things: Player (Spigot), Source (Paper), also paper dont name getters methods as getMethodName()
This is not working, the player can't move around well, but after moving once, the player gets teleported in a loop between the start location an d the position he first moved to
then you are doing that
what?
Spigot will not do that unless you are doing it
?paste your move event and your teleport event
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at cirosanchezb.tengucore.commands.main.TenguCoreCommand.onCommand(TenguCoreCommand.java:31) ~[TenguCore-1.0.jar:?]
Code: ```java
private ArrayList<SubCommand>subCommands = new ArrayList<>();
public TenguCoreCommand() {
subCommands.add(new Help());
subCommands.add(new Terrain());
}
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (sender instanceof Player){
Player player = (Player) sender;
if (args.length > 0){
for (int i = 0; i < subCommands.size(); i++){
if (args[i].equalsIgnoreCase(getSubCommands().get(i).getName())){
getSubCommands().get(i).perform(player, args);
}
}
} else if (args.length == 0) {
player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&6&lTengu Core &eVersion: 1.0"));
player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&eUse &f/tengucore help &efor a list."));
}
} else {
Bukkit.getConsoleSender().sendMessage(ChatColor.GOLD+"[TenguCore] "+ChatColor.RED+"You can't execute this command");
}
return true;
}
It cant be a out of bounds
literally im looping on the list
what is line 31
if (event.isCancelled())
return;
if (!player.hasMetadata("cancelMove") && gm.getGameState().equals(GameState.DEATHMATCHPREPORATION) && (event.getTo().getBlockX() != event.getFrom().getBlockX() || event.getTo().getBlockZ() != event.getFrom().getBlockZ())){
player.setMetadata("cancelMove", new FixedMetadataValue(main, true));
event.setCancelled(true);
//event.setTo(event.getFrom());
player.removeMetadata("cancelMove", main);
return;
}
This is all
if (args[i].equalsIgnoreCase(getSubCommands().get(i).getName())){
If you only pass 1 arg to the command, args[1] will not exist
so you are doing args[1] at some point
where you have only 1 arg
you are iterating over array list
not args array
OMG
Hum... Hello sorry i don't know where i can post my problem but i have trouble in spigot-api 1.19.2
the AdvancementDisplayType doesn't exist but it's present in documentation i don't know how it wrong
i use gradle in java 17
yap
you are allowing them to move a full block and removing teh meta you just set
/foo bar have only 1 arg which is bar
so next check they have no meta
so only args[0] would exist
I thought it is a better user experience when they can move on the one block
but does this not work?
well your setting/removing meta is pointless
you literally add it then instantly remove it
yes, I forgot to remove it. It was fo then teleporting the player or setting the TO
or does it event then not function?
no it's just pointless code
for a task timer, if I have a period of 0, does that mean every tick?
or is every tick a period of 1
your current code allows them to move around in a single block
ok
IF that code is actually in the PlayerMoveEvent
I want that, but they get teleported around
it is
they will only get "teleported" back a block if they move off that one block
OR you are doing some teleporting yourself
Have seen this error previously when you trying to use spigot api ?
sorry my english is very bad
man speaking google translate
i didn't use it because it's not good practice to understand how to speak it
Are you using either Mongo or Gradle?
gradle
okay sorry man i can help
Pacient all people are here for free thats the sence of a community
i'm aware
lol rude
just making sure my question doesn't get lost in the mess
no problem ^^
that why threads exists
yes. Minimal instant delay is next tick (0 or 1) and for repeated delays its once a tick(also 0 or 1)
and hopefully someone will answer it eventually
my question is a yes or no question
You already got your answer
I'm waiting
why are we actually arguing about this
right here @wise mesa
thank you so much
appreciate it
thanks
idk just make mad because people are not pacient. Its really disturbing that
the motd for the Cubecraft server is making use of some non standard minecraft font to display text, how is this done and can you also use it in game?
Remove this directory and run BuildTools for your version.
This is a weird error
dawg I've been in this discord for 3 years I understand that
go look through the "ascii table" mojang uses - it's probably a subset of the regular UTF-8 table
alright adios
Ping the server and print out the response
i need to remove all of the local buildtools ok i'm trying
Some utf8 chars
how do I print a ping response
they're simply using unicode characters
can you elaborate?
for sure not ascii, but i think thats what alex meant
unicode table has some spacing chars
https://www.spigotmc.org/threads/free-code-sending-perfectly-centered-chat-message.95872/
You basically need to find out the pixel width of every character that you want to use and then
create a prefix to your message in order to center it.
▶▸◀◂ ✦
these should? be the characters
those are small caps
how can I get those
In typography, small caps (short for "small capitals") are characters typeset with glyphs that resemble uppercase letters (capitals) but reduced in height and weight close to the surrounding lowercase letters or text figures. This is technically not a case-transformation, but a substitution of glyphs, although the effect is often approximated by...
copy
I think you aimed this at the wrong person 😛
or do you mean I can make my plugin generate text in a similar way using small caps?
you can make a function that translates simple latin text to small caps
yes I get that
7smile7 i reinstall buildtools 1.19.2 doesn't change and i 'm trying to see if is my jdk version 17
no i'm using gradle
my issue :
bad class file: C:\Users\Georgio\.m2\repository\org\spigotmc\spigot-api\1.19.2-R0.1-SNAPSHOT\spigot-api-1.19.2-R0.1-SNAPSHOT.jar(/org/bukkit/advancement/AdvancementDisplayType.class)
class file is invalid for class org.bukkit.advancement.AdvancementDisplayType
Please remove or make sure it appears in the correct subdirectory of the classpath.
and this class of spigot-api dependencie not found ?
but i verify in my computer and i it's
i have on it
paper ?
Cleaning up code with the reformat should remove unused imports
you're missing the spigot repo in your file
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
oh !
What even is that path?
This guy doesnt use gradle or maven
Is he trying to fork spigot?
i don't know what i'm trying xD
i read the documentation but i didn't see that previously
I'm verry sorry for that
i think i'm bad because i don't understand what wrong again when i use exactly the same following gradle
Could not find io.netty:netty-transport-native-epoll:4.1.77.Final.
Searched in the following locations:
- https://oss.sonatype.org/content/repositories/snapshots/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final.pom
- https://oss.sonatype.org/content/repositories/central/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final.pom
- file:/C:/Users/Georgio/.m2/repository/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final.pom
Required by:
project : > org.spigotmc:spigot:1.19.2-R0.1-SNAPSHOT
Question: why are you trying to use gradle with Spigot?
Stop whatever you are doing right now.
Read this if you want to use maven:
https://www.spigotmc.org/wiki/creating-a-plugin-with-maven-using-intellij-idea/
Read this if you want to use gradle:
https://www.spigotmc.org/wiki/build-you-spigot-plugin-with-gradle-groovy/
I recommend maven because you will find the most help for that online and here.
?maven
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
ok thank you i read it thank you for your time ^^
magically my problem fixed itself after i came back to it after a week
i changed nothing
yo i dont get this error code can anyone please tell me what is wrong?
error: https://paste.md-5.net/ilitudaheb.bash
main (nmsNew): https://paste.md-5.net/ixoduxorew.java
npcManager: https://paste.md-5.net/yogohikasi.java
there's a statistics plugin you can install. Or you use a regex search (that way you can also remove single char and whitespace lines)
i have retry on maven and i have the same error
and i have good pom.xml
i see the same on doc
<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
i didn't fail again is correct, no ?
whats your error
same cannot access org.bukkit.advancement.AdvancementDisplayType
and i have on other class
im using 1.8.8 api so yeah
when i run package
idk sorry
no problem
Did you manually add a jar to your project?
no i change outpath of package jarfile in my server/plugins automatically
do i put the remapped obf jar into the server or the normal jar
when using mappings
The normal jar. The special sources plugin reopfuscates your plugin so that it works with the normal jar.
ah ok
Did you create a clean, new project?
yes really yes i starting new clean project
Remove any jars that you added to the project
ok it's removed
You should never add jars to your project
When using maven or gradle
Now compile again
https://sourceb.in/fF5mSBItAv trying shading my own api inside a plugin, and when i build the plugin with install the shade doesn't get applied
Im 90% sure that you still have the spigot jar added to your project.
Remove the project and create a new one. Just follow the maven steps and dont do anything else.
Do you have the <scope>provided</scope> set for your api?
ok i trying again
the scope is system
Compile your API using mvn install and remove the scope.
Dont manually shade another jar in.
<dependency>
<groupId>net.rosamei</groupId>
<artifactId>AlixAPI</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${user.home}/IdeaProjects/AlixApi/target/AlixAPI.jar</systemPath>
</dependency>
Yeah dont do that
install the jar with maven 10000% times easier
remove scope and systemPath.
Then go into your API and compile using mvn install
This will install your jar in the local maven repo and every
maven project will find it.
question is a databse in a yml file just a thingy u need to make a virtual storage system or do u need to link it to some website
wat
thx you, sorry i need to sleep it's late, and i have most tests tomorrow (3) in noSQL xD
do me.CyfiWolfie.main.Main
This is a reference to negativitys source code
Database:
# Enable database
isActive: false
# Info is stored by player ID, not username.
# This plugin doesn't edit the database.
# The database credentials and IP are never accessable by us.
url: "example/mydb"
user: "root"
password: "example"
type: "mysql
``` do you need to link the database to some website or something?
oh
A database is stored on disk in the end
thats not what im asking
When I start my server it is giving me an error. How can I fix it? Can anyone help?
error: https://paste.md-5.net/ucikowelug.bash
nmsNew (main class): https://paste.md-5.net/ibocuboyuh.java
npcManager: https://paste.md-5.net/azewodihiw.java
You cant "link a database to a website"
url is the adress isnt it
What is "it" referring to?
well im just confused like how does it work-
where does it store the data... how do i get to it with the url
It's probably referred to jdbc as url
Are you using the special sources plugin to reobfuscate your code?
would you be able to explain that in monkey terms please?
You need to start a database on your server.
Then you can use the IP address of your server
as well as the port which is used by the database
to connect to it.
Surely this will help?
https://www.youtube.com/watch?v=MbsI0bNxDEc
?nms
?nms
I was slow
To connect to a database you need:
- The IP address of the DB
- The port which is used
- A username which is registered on this DB
- A password for that user
yeah but would that video help at all
And the server needs a started DB ofc
How do you need a fking hour to explain how to connect to a database?
You need 10 mins max for each
- Create table
- Insert query
- Get query
But yeah this video looks ok
Im already triggered
calm down 💀
annoying no space. as annoying as { on a new line
Yup
How hard is it to press ctrl alt l. No way someone is preferring no space
if(true)
{
}
or
if( true )
{
}
just do whatever autocomplete does for you
More cursed
basically bungeecord code
and buildtools
I joined this server called TubNet and im wondering how is the custom message that forces you to use the server resourcepack made ? any ideas ?
no clue what that is
whats custom about that?
how is it made ?
Why that random link
its a screenshot
Cant see that image. Garbage website
ive done that myself but i forgot the event name 💀
xd
xd
YES
boolean isTrue = !false;
while (isTrue) {
isTrue = (isTrue ? false : true);
}
how to make it ?
What version do you need this for?
its some event.setWhatever
but i forgot the event
and i cant seem to find it in the docs
latest
no shit xdd
theres a texture for the gui of the demo screen without the text, is it possible to trigger that overlay without the demo writing coming up:
or even better write whatever i want on it
isnt demo screen client side?
you can put it on any players screen but i think the text might be
i remember having a util in my packets class
for a demo screen
i just used it to annoy my friends
its just Player#showDemoScreen or smth
really? damn
mustve been a while back then
Servers can modify the text on this screen using a resource pack.
mmm
is that the This demo will last 5 in-game days (about 1 hour and 40 minutes of real time). Check the advancements for hints! Have fun! message?
yeah think so
override that with a resourcepack
same message probably
Note that you can't change what the buttons do
how did the server make it then ???
its client-side
i get it, but i want to know how did they make it
code
Pretty much
you guys so useless fr
What server are you even talking about
-,-
TubNet
Okay
try it for urself
What did they make
connect and see
Is it this
it is
That's just the forced resource pack screen
but when i try to force it, when player clicks no, he doesnt get kicked, and if he did, he would get the screen when he connects second time
im blanking rn how do i set a items metadata
ItemStack#setItemMeta(); ?
pds ?
You get the metadata from the itemstack, change it and set it back on the itemStack
what
yes
what
he didnt ask for that
yea but
it doesent like whn i try to accualy put in the data
show then
@young knoll did you try it ?
I read it all and did everything and it still doesnt work
https://paste.md-5.net/oyawetikok.cs
Coll wasn't talking to you
send code
i wasnt talking to you
Well then I'll just not help you
happy ending
You're depending on the wrong version of Protocollib. (Doesn't causes your issue though)
what is the latest version
Could you try without outputting directly to the plugins folder
you probably forgot to add the command to the plugin.yml
5.0.0-SNAPSHOT supports 1.19.3
i did not
thanks
name: NmsNew
version: '${project.version}'
main: me.danko.nmsnew.NmsNew
api-version: 1.19
depend:
- ProtocolLib
commands:
dankonpc:
The error is probably caused by a remapping problem
what is remmapirng
The server code is obfuscated
i am not the Plugins folder is a folder on my desktop not the server plugins folder
So we apply mojang mappings to make the method names make sense
Remapping changes things back to obfuscated names
why would building into the output directory be the issue
I wanted to see if the shade plugin would output the jar before remapping
ok
it still gives this
java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/Player
even when i change the entire code
What version is the server running
where is the code which sends the packet to client about the item change in
PlayerInventory#setItem()```
1.19.3
Double check that with the version command
middle clicking leads to this code
public void setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item);```
[21:05:05] [Server thread/INFO]: This server is running CraftBukkit version 3670-Spigot-454acb7-bd29f41 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT)
[21:05:05] [Server thread/INFO]: Checking version, please wait...
[21:05:06] [Thread-11/INFO]: You are 32 version(s) behind
What are you trying to do?
Send the packet yourself?
I want to do something when the client receives the packet. I am making a fabric client side mod
so I want to know what packet is being sent
ask chatGpt
There no real reason to listen to the packet then
Bad idea
but I need to
Why?
for science?
let chatgpt cook
You can interact just fine with the invetory without messing with packets
Doubt that you really need it
.
ook
Not sure what's wrong
do you know what every person with a pink name would say
Make sure you're not running an old jar
what spigot version?
I've seen that happen before
1.19.3
1.19.3 it's probably EntityHuman
definitely
but i dont get what is giving the error
net.minecraft.world.entity.player.Player is never defiened
because you are not remapping
.4
the md5?
.2 should still work as far as I'm aware
Yeah
I'll check
yep it compiles on .2
what are you using net.minecraft.world.entity.player.Player for?
nothing
give better answers if you want help
should i drop every class?
drop?
QuestNPCCommand ?
ah nm, got it
ok thats startup stacktrace does not match the code you have shown
Tbh I still think this could be the issue
did you run clean package?
is there any way to see the code of this method PlayerInventory#setItem() which sends the packet to the client
?stash
is as much code as Spigot has
is this a reply to my question? ;-;
if you want NMS internals add a --generate-source to buildtools
get used to it
yes
i did
[21:27:19] [Server thread/ERROR]: Error occurred while enabling NmsNew v1.0 (Is it up to date?)
java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/Player
at me.danko.nmsnew.NmsNew.onEnable(NmsNew.java:15) ~[?:?]
throw your jar in here
deobfuscating will land you to JAIL
It's true
I once injected a single deobfusication and now I am serving life without parole
i still have some confusion so i will ask this question again tomorrow. im going to bed now 🥱
i put it in 1 class and it still gives me this
class: https://paste.md-5.net/iwovuhekuv.java
error: https://paste.md-5.net/neqacejuga.sql
good night then
Yeah I'm stumped by this one
?nms
oh no I found it
if you use gradle, only god can help you
yeah?
are you using maven @tawny remnant ?
yes
?nms
^
They've already done that
they didnt
Why are you importing but not using?
not using what
your ide should be complaining about an unused import
net.minecraft.world.entity.player.Player
I still think this is an old jar
its the one he just gave me
if they would have actually used mojang maps properly, this error wouldnt show up
I believe it's actually a remapping failure. The import is never used so it seems to be ignored
never remapped
bro what
its not there
is that the latest link i sent?
.
clearly has import net.minecraft.world.entity.player.Player;
in NPCManager
in this jar there is no NPCManager there is only 1 class
yes ther eis
that jar you just dropped is exactly the same
decompile this jar
I just did
what
no way
download it yourself
The jar is 2kb smaller though
drop it into jd-GUI
spigot drama keeps me awake
how did you compile it?
yep, it seems if you don;t close jd-GUI between decompiles it caches
did you use File -> export to jar (or similar)?
exactly, that's the issue. they are not reobfuscating
are you here to help or to type ?nms
yep, it's still there as an import
He was never here
never
just delete the import, you never use it
imports don't get compiled "into" the .class file though @eternal oxide
They've already shown their pom
they get inlined though
they did, but they don't compile using maven
ooh good point
they compile through their normal IJ method
yep using artifacts
yes
never ran maven
I assumed they were using maven since they had a custon output folder set
Its been so long since we saw anyone do that I'd forgotten
excuse me?
How do you compile? @tawny remnant
yes
i guess
don't guess
^
you must know this
I told you to remove that
is it
where did you take this from
So long ago
the outputDirectory part does NOT belong into the shade plugin
it belongs into the jar plugin
I don#t get it, why does everyone use the wrong plugin to change the output dir lol
someone posts a bad pom and everyone copies
its just like everyone calling defaults on teh config
which returns a boolean and does nothing
seems like it, I still ahven't found the place where they got it from haha
yes
Once a bad practice starts it spreads
but you also have to remove the other stuff from the maven-shade-plugin
Elgar or Oli already told you
I wonder if any of those plugin tutorial YouTubers have unleashed various plagues on coding
This one I see used all the time https://hub.spigotmc.org/javadocs/spigot/org/bukkit/configuration/ConfigurationOptions.html#copyDefaults()
they probably make money from it. Gibe bad advice, then people come back to watch the video again
they just call that with no logic around it at all
Yeah I told them it could be an issue
olivo good boy
I remember when I was learning way back in the Stone Age
They made a countdown by scheduling a bunch of delayed tasks with 20 ticks longer delay for each
doing things wrong is totally fine, everyoe did things wrong. the skill is to realize you do things wront, after people told you on discord 20 times, then adjusting it
my most popular plugin got over 130k dowloads and the code is total shit lol. if I#d were to rewrite it, I'd to it totally different
yeah lol
And that TF2 leak with the developers losing their sanity
what's TF2?
Minecraft spragetti code hahaha
GM has a lot of TERRIBLE code in it. Can't rewrite it though as it would break so many plugins
It makes me feel better about myself when I learn a popular thing is powered by spaghetti
Team fortress 2
||| code courtesy of the tf source leak |||
Music: Hall of the Mountain King
channel discord --- https://discord.gg/8TYgJhwA7S
channel patreon --- https://www.patreon.com/shounic
channel tracker --- https://trello.com/b/L3B65jUX
[ todo list / current progress on upcoming videos / channel roadmap ]
feedback --- https://forms.gle/bkuGF6attQrRPc6o...
True fact
and I was like "wtf this looks like I myself wrote this 3 years ago)
which is not a good sign
Looking back at your old code can be embarrassing or just sometimes you look and are amazed at how good it is.
there are 2 rules in coding:
- whenever someone else coded sth X years ago, it always looks like shit
- If you are the person who coded it X years ago, it looks like X*2 shit
very often
if youre still happy with your code from 3 years earlier, you're either great, or hasn't improved
bro how do i change a Itemstack name
depends which name

