#help-development
1 messages · Page 849 of 1
my server is in 1.20.1 and I use via version. Could be via version?
if your server source is 1.20.1 this isn't an us problem
crucial information there....
contact ViaVersion first just contact ViaVersion
ookkk thx
If it works with a 1.20.1 server and 1.20.1 client, but not a 1.20.4 client, that's ViaVersion.
how do you put emojis in the scoreboard?
lmao thats hilarious
texturepack
oh
didnt know that i could do that
I know TAB can do some janky magic to make them all 0 yet still ordered
But yeah it’s easier to just use numbers
texture packs are eew
You can even remoe the numbers on the scoreboard
nah thats normal
some servers do them way to much
and your eyes get destroyed
i can do that with lunar client
No it isn't
Yeah you can't do it in vanilla
You need a texturepack
Which edits the shaders core
who in the earth still uses vanilla?
Me
A ton, lot of people lmao
i'd caution to say most individuals
WHY
All these custom clients are silly
^^
just use optifine or badlion
optifine sucks
And they shove cosmetics down your throat
optifine is technically vanilla
like legit ass
provides what vanilla should be providing lol
Fabirc mods have superseeded optifine at this point
it should be a relic of the past lo
bro 💀
still throw some performance fabric mods together and boom your good
I like the performance mods 🤷♂️
it makes it less fps droppy at times
granted I barely play the game anymore
I find minecraft fairly boring to play outside of Development, but who cares
roblox ftw
yeah my 3060 is on life support
oh wait nvm
minecraft doesn't use the GPU
i5-12600k
its on life support
vanilla works fine on my integrated 11 year old cpu
same
idk how you survive with integrated graphics lol
that would drive me mad
minecraft is boring to play
I have my old graphics cards on stand by incase things break
I still got my 1050ti 💪
I found the issue
when i built my first PC NVIDIA shipped me a broken Graphics card and refused to admit it was their fault
F
founders edition?
iirc yeah it was for the 1050ti
It's not an average of the last four values. It's a weighted average and is based on all the player's ping times since he joined the server.
isn't it like 75% new ping 25% last avg~?
If I remember correctly. Which means the first ping time still affects the average minutes later.
And if you have a single high ping because the server was doing something or your wifi hiccupped, the subsequent reported ping times will be high for quite a while.
yeah but impl details
It was sleep deprived when I saw it last week but it was somn like what I said
Which is why, 5 years ago, I wrote my own plugin which simply reports the most recent value.
welp
It's still an average over time
And not the past 4 pings
75% avg 25% new ping
So make a spreadsheet that starts with 500 followed by a bunch of 10's, and see how long it takes this weighted average to get down to 10.
I've got no clue what this convo is about I'm not against your line of thought
Anybody know why the latest dev build of ProtocolLib isn't triggering on KEEP_ALIVE packets with Spigot 1.20.4? It works with 1.20.1.
I created a ProtocolLib issue 4 days ago, but there's been no reply.
protocol change maybe?
Probably. Just asking here in case someone knows how to fix it or if (unlikely) it was a Spigot problem.
Yeah, just grasping at straws.
You'd need to uh
play with nms to come to a conclusion
if you can get a packet listener working in nms then it's protocollib's fault
if the packet no longer exists or has been reworked in nms then blame mojank
Hopefully dmulloy2 will appear in Github in the near future.
Guys
At what point should exceptions be handled
cause some libraries just catch all exceptions and throw runtimes
HELP
How can I upload a project to the spigot page?
You go to like resources
I think
And post your own
Also you can just Google that
there's 100% a tutorial
if you’re making a library please only handle exceptions you expect
generic catchalls tend to be poor design
Do you recommend NBT api or raw nms to set simple tag on some items
?pdc
I know for that... but since I am in a slightly older version that doesnt exist yet
NBT-API ideally
Lol I've checked their website and every review is 5 stars
solid chance
how would i implement the fawe api into a 1.8.8 plugin
add the fawe to your dependency and add "depend" or "softdepend" to your plugin.yml
would it be possible in java 8?
if not does windspigot work as a java 17 1.8 server?
uh I don't think java 8 would be a problem here
as long as both the plugins support java 8 you should be fine
cause i see this
The API requires using Java 17 at development time. Make sure to point your toolchain to Java 17.
on the wesbite
does this mean to use the normal worldedit api?
FAWE maintains API compatibility with WorldEdit so you can use the normal WorldEdit API async.
first time using scoreboards, do I always use dummy criteria for custom text?
you need to use the appropriate plugin version that supports 1.8.8
this is the disadvantage of using outdated software
how can I activate these in intellij:
2024-01-06 09:20:23,630 ServerMain WARN Advanced terminal features are not available in this environment
its used to mark warnings red etc right?
why when I try to save an enum type in itemStack and return it back, I get an error that I am converting a string to an enum of the wrong type
- https://paste.md-5.net/ropazinozo.java - some reason plugin convert type from RarityLevel class in ArtifactType class
can you show the enum as well?
ArtifactType does not have a GREEN constant
yes it is but why does it convert it from another enum class
i have 3 impl PDC classes
SimpleUtil.setItemPDC(plugin.getPluginKey(),new ArtifactTypePDC(),artifactType,itemStack);
SimpleUtil.setItemPDC(plugin.getPluginKey(),new PowerTypePDC(),artifactKey.getPowerType(),itemStack); - this is how i add
SimpleUtil.setItemPDC(plugin.getPluginKey(),new RarityLevelPDC(),artifactKey.getRarityLevel(),itemStack);
the issue is in how you read it
you're trying to read probably a RarityLevel with the ArtifactType PDT
i know but why plugin try read so
because you're passing in the wrong PDT?
show that PDC#get call in the stacktrace
not the stacktrace, the code where you call PDC#get
ah wait, you're saving to and reading from the same key
yes but this not the same classes
it doesn't matter
???
you're saving to one key, so only the last call is what you see
you're writing RarityLevel last, so you see RarityLevel
you need to have different keys for different data
how they can be same if they not the same classes? Because converting code this same?
they are all stored as just bytes in the PDC
the PDT you pass in knows how to handle those bytes and make the appropriate type from them
I thought if I can save different PDT types into the same key, then it will work with different classes too
do I really need to use some team stuff if I want to have a sidebar with custom text and without the score number?
is grass considered solid or not
it is
bruh
there’s only 3 states in physics
gas, liquid and solid
is grass a gas?
there's actually more than htat
e
isn't "solid" in spigot
basically a block where u can't pass through
something like that
yea
so ig the solid thing in spigot is related irl
bukkit has Api
To check
if a block is solid
isSolid()
off the top of my head it should be block.getType().isSolid()
ye ik
tho i want a way to check if the block is
a grass/flower/torch/redstone
because those blocks are the blocks where u can go through
turn enum into string and check for the grass or flower
or maybe type
now i think that is a bad idea
just make a list of elements
grass blocks yes, normal grass no, tall grass yes
no
im trying to find a way to improve my mobspawn algorithm
cuz it wont spawn on those types of blocks
What is this error? Someone attacking server probably?
update, or install grimac, also #help-server
sorry, thanks
xd
btw if anyone wonders if a block is solid, occluding etc, I created a list: https://github.com/mfnalex/Bukkit-Material-List/blob/main/1.20.4.MD
Why
because sometimes you wonder e.g. "hmm is grass solid?" and don't know what it returns
._.
Can you make one translating potion effects and enchantments to minecraft names?
sure
what is "occluding"?
is it that we can see another block through?
is it not possible in kotlin to declare a "narrower" return type for an overriding method?
okay thanks
can someone help me with setting the biome to snowy around the player in a radius of 16 chunks. https://paste.gg/p/anonymous/ae86f5c94a154c4b9d02b365c415c5c6 - the method I use to get chunks around the player. https://paste.gg/p/anonymous/ed9c666422a44762b4866c1db55c4f15 - the method for setting the biome. https://paste.gg/p/anonymous/4040c7da784e4c0881826d4f0c1a63c5 - A method for updating the biome for players
the super method returns Unit, essentially void
same thing happens when I declare the super method to return Object
tried Any?
Kotlin sounds like a pain
thx that works
ask on paper if you're using paper API
it definitely requires getting used to
How is that narrower return type?
Saves me a lot of time & typing 🙂
Smh I was scrolled again
Overall more satisfying imo
Tldr unit is Void
yes
is there any way to avoid having to override "create" in every subclass and somehow do it in the abstract superclass? all subclasses have the same constructor signature btw
Just declare fun as open and have empty body?
Or you don't want that
i can edit "YOU DIED"? With NMS
what?
open fun create(...) {}
That way you can override it, but don't have to
With abstract, it must be overriden, same as in java
Or am I somehow misunderstanding u
i want to have a list of classes and then create an instance of any of those for a given material
guess I'll just use reflection and call the constructor
can someone tell me what causes a no access error when compiling the plugin? I guess no access but how do i change that, as I didnt clarify the class as private or something.
you're using an older JDK than the classes you're trying to access, most likely
it just says no access to package name
uh
what about an interface
you can do somn like this in java
oh how would i change the jdk of my project?
File -> Project Structure -> JDK
Map<Class<? extends ...>, Function<Material, ...>>
?paste
there just one line
but interfaces can only declare instance methods
or just have a list of Function<Material, ...>
not necessarily
at least in java you can do stuff like
No there is not
Function<Material, MyWhatever> whatever = MyWhatever::new
Your IDE only tells us one line though
oh i fouind the full error, wait lemme copy
Give us some images etc
?paste
Ehh @echo basalt maven
Basically the way I do it is like
public interface MyObjectProvider {
MyObject provide(Whatever whatever); // whatever your usual constructor is
}
public class MyFancyObject extends MyObject {
public MyFancyObject(Whatever whatever) {
super(whatever)
}
...
}
public class MyObjectFactory {
private final Map<String, MyObjectProvider> providers = new ConcurrentHashMap<>();
public MyObject provide(String provider, Whatever arg) {
if(provider == null || arg == null) {
return null;
}
MyObjectProvider registeredProvider = this.providers.get(provider);
if(registeredProvider == null) {
return null;
}
return registeredProvider.provide(arg);
}
public void register(String key, MyObjectProvider provider) {
this.providers.put(key, provider);
}
public void registerDefaults() {
this.register("my-fancy-object", MyFancyObject::new);
}
}
@tender shard
what makes you think I'm the maven god
alex is
I legit use gradle exclusively and I suck at it
so maven bad gradle good?
50/50
Allows me to easily write my own tasks etc
brb putting wings in the air fryer
jan do you know why maven does this to me?
which JDK are you using?
?paste pom
yeah but that's way too much work for this thing. tbh I'm currently just doing this, which works fine
run mvn clean package -X then send the full log
where's the console, i can only find the read only one?
?paste
that's not the full log
it's super long tho
how can I add 150 items to inventory? should I use a for loop? I just don’t see the quantity in the arguments to addItem()
i cant save it's it throws an error on the paste website
then send it as text file here
itemstacks already have an amount
isn't 64 the maximum?
or can I set 150 to the item?
or when adding there will be a lot of them
use a for loop if u want to add 150 items.
If you want to set an unsafe stacksize you have to use reflection i believe
But their are useful apis such as ItemBuilder, you can find it online its one class. All you have to call is
myItem = new ItemBuilder(Material.EGG)
unsafeStackSize(true).
amount(#yourStackSize)
Very useful, i use it my plugin for my survival games to allow potions to be stacked!
try updating maven-compiler-plugin to 3.11.1, then run mvn clean package and send paste again (without -X this time)
okay
Is kotlin goofy
ah it's gotta be MutableList<Column> instead of MutableList<out Column>
Solution: Use Java
in java it'd have been the same, ? extends vs ? super
Why does kotlin look like typescript with a bit more oop
Bro kotlin looks mad confusing
yeah I think so too
I should try writing a plugin in kotlin
Gotta translate my libraries ExamplePlugin to kotlin lel
how can i check in bungeecord the data of the Plugin Messaging ?
why do you use Kotlin just wondering?
What are you trying to do
i'm doing when i interact on an item in a gui send Plugin Messaging to the bungecord in that way the bungeecord send the player to the server
just to learn it a bit better
So make a method sendPlayer() and call it in your eventhandler where u check for player interaction.
Their is info online ab what you will need to do, its a bit more complicated compared to using something like Redis which is notorious for Pub/sub
got it working like this now https://github.com/mfnalex/Bukkit-Material-List/tree/main/src/main/kotlin/com/jeff_media/bukkitmateriallist
Im pretty sure bungeecord has a specific category for connecting players to servers. You can read that online
that is how i send the message:
this.main.getServer().sendPluginMessage(this.main, "events:channel", "Sumo".getBytes());
now i have to make a check on the bungeecord for theck if it's "Sumo" or something else
because the wiki say SubChannel https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/
But i used that https://www.spigotmc.org/threads/yet-another-plugin-messaging-tutorial.523693/ and i didn't understand how can i check my X item
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Well
I'd probably avoid the bungee messaging channel
because while it's neat it's incredibly flawed
ByteArrayDataOutput out = ByteStreams.newDataOutput();
You are literally getting the bytes of a Raw string itself in your code.
And given you're making custom events you should have enough knowledge to dabble in making your own communication platform
You need to use out.toByteArray()
I should write a forum thread about sending data between servers
i need only to do like a "Server selector" for teleport the player who done the command in the other server nothing more in the Bungeecord part
yeah in that sense it's simple
sending a player to a bungee server is a good use-case scenario
I wouldn't use it for anything else
infact i need only like that and like some check if a server is empty etc but it's easy
caut un developer roman cineva interesat?
the only part i'm having problem now it's the check of a SubChannel in the bungeecord
This is not the place to look for romanian developers
ok
√π
?services for general development services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
I'd look for a niche romanian dev community or a service team
I have one he is best
I will.
only romanian dev I can vouch for is masecla22 but I doubt you can afford him
lol i was gonna say same but ill let him jus find out
My guy is expensive
Is he that expensive
Lol
I understand a solid 30% of the words
I understand a solid nothing
why nothing appen if i make the way for send and for get the data
Spigot:
public void onInventoryClick(InventoryClickEvent event) {
Player p = (Player) event.getWhoClicked();
if (event.getSlot() == 11 && event.getInventory().getName().equals(ChatColor.DARK_PURPLE + "Host Command")) {
this.main.getServer().sendPluginMessage(this.main, "custom:mytestchannel", "sumo".getBytes());
}
}```
Bungee:
``` @EventHandler
public void onPluginMessageReceived(byte[] message, PluginMessageEvent event) {
ByteArrayDataInput in = ByteStreams.newDataInput(message);
String subchannel = in.readUTF();
if (subchannel.equals("sumo")) {
ServerInfo sumo = ProxyServer.getInstance().getServerInfo("sumo");
ProxiedPlayer p = (ProxiedPlayer) event.getSender();
p.connect(sumo);
}
}```
you don;t need a custom channel to send a player to a server
there is a built in method for it
public static boolean IsInOwnRegion(Player p) {
Location loc = p.getLocation();
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
container.get(BukkitAdapter.adapt(p.getWorld()));
RegionQuery query = container.createQuery();
ApplicableRegionSet set = query.getApplicableRegions(BukkitAdapter.adapt(loc));
Iterator var6 = set.iterator();
ProtectedRegion region;
do {
if (!var6.hasNext()) {
return false;
}
region = (ProtectedRegion)var6.next();
} while(!region.getOwners().contains(p.getUniqueId()));
return true;
}```
This function should check if players is in region which he is a owner, but every time this return false. In my another plugin this worked without any problems.
then how can i do it?
it's literally explained there
you send "Connect" to the bungee channel, and then the server name
oh shoot thx XD
and there is a way for check if there is someone in the server ? like in the server where the player is going to connect
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
How do I set a head and keep the head on the wall if it was on the wall before interacting? spigot api 1.8.8
Don't set it to air? Or cancel the BlockBreakEvent, if you are trying to do that
String server = in.readUTF(); // Name of server, as given in the arguments what argument?
what? I want it to disappear and then appear when interacting with the head, to give the impression of respawn. But when it appears, the head respawns incorrectly.
Oh, you can obtain the BlockState using Block#getBlockState before setting it to air and then re-apply it when the scheduler gets called using state.update(true, false)
this getter does not exist in spigot 1.8.8
I mean getState()
String server = in.readUTF(); // Name of server, as given in the arguments what argument?
Fixed, thanks
out.writeUTF("PlayerCount");
out.writeUTF("pvp");
The second argument "pvp", which represents the name of the server
oh ok thx
why is the zombie that i spawned loses its helmet after some time
how can i track an entity with compass
wait helmets takes damage from the sun?
They do on mobs that burn in the sun
how do i disable that
make it unbreakable
how?
itemMeta#setUnbreakable iirc
i have a client problem
event cancelling working but doesnt good work in client side
someone have idea ?
aight ty
Hi, what event is called when a bell is rung?
declaration: package: org.bukkit.event.block, class: BellRingEvent
searching the javadocs is pretty useful 
searched for "spigot event that fires when bell rings" and nothing found
1 sec (trying to verify)
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
Super noob Java question, what am I doing wrong?
I even got frustrated so I import these:
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
Problematic code:
Map<Material, Material> signPlaceOnBlock = Map.ofEntries(
Map.entry(Material.OAK_SIGN, Material.OAK_PLANKS),
Map.entry(Material.OAK_WALL_SIGN, Material.OAK_PLANKS),
Map.entry(Material.SPRUCE_SIGN, Material.SPRUCE_PLANKS),
Map.entry(Material.SPRUCE_WALL_SIGN, Material.SPRUCE_PLANKS)
);
presumably source level 8 or something ?
I recommend just using map of
Can only take 10 items ):
can you share your pom.xml/build.gradle.kts
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>chunktycoon</groupId>
<artifactId>chunktycoon</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Chunktycoon</name>
<description></description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<outputFile>out/artifacts/Chunktycoon_jar/Chunktycoon.jar</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<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.20.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
yeah but you're not using more than 10 items
I will be, very shortly
Why java 8 with spigot 1.20 o.O
Here's the thing I don't understand, I tried 1.20 (which I think is what I have installed) and it wouldn't work
Java 9+
its just 20 I think
declaration: module: java.base, package: java.util, interface: Map
So Java 8 is 1.8, but 21 is just 21, ahhhhh
<properties>
<maven.compiler.release>17</maven.compiler.release>
</properties>
says baeldung
Okay, I'll give that a go, thanks!
That's gross, I've been compiling with version 8 this whole time 🤮
I mean, do you have java 21 installed ?
hmm maybe maven compiler plugin weirdness
That's the reason it was set to 1.8, I couldn't get anything else working
I re-installed maven recently ):
oh? then you might just have the project set to Java 8
Should be in project settings
and language level?
Whats ur maven compiler version in ur pom?
ah wait I just noticed
Ah, 3.1.0
also compiler plugin should be changed to 3.12.1
It doesn't like 3.5.1
Did you reload your pom
Yes
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
It says "Update Maven indicies", but that button seemingly does nothing ):
Ah
<properties>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Is that okay ^
It says that's the latest version: https://maven.apache.org/plugins/maven-compiler-plugin/usage.html
Yeah, strange
can you try running the mvn version command in Intellij
just to make sure it's not using the bundled one
That seems to have worked, so my IDE is setup wrong is seems
so it was still using the bundled version?
Well, the build was a success, so I assume so?
IJ should come with maven 3.9.5. otherwise you can specify the path to an installed maven version
the ByteArrayDataInput in = ByteStreams.newDataInput(message); Need a Message what i have to input how message if i'm using it in a InventoryClickEvent?
Okay, @chrome beacon
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
So it still doesn't like 3.5.1 for the maven shade plugin
Any recommendations to what to set it to?
I mean, it builds, but my IDE shows it as a glaring red number
might need to smack the reload button in the maven tab
the ByteArrayDataInput in = ByteStreams.newDataInput(message); Need a Message what i have to input how message if i'm using it in a InventoryClickEvent?
soooooo, i tried to use nms and everything broke lol
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT.
Searched in the following locations:```
Ive run build tools and its all installed but it doesnt look for local packages?
Did you build 1.20.2
also you need to tell gradle to look in the local repo
and you'll need to find a 3rd party plugin to handle mojang mappings
I did yes
How in the world does one do that
Ive never worked with local files in JAVA
only Python
mavenLocal() in repositories iirc
All of my code is just red now ;-;
Im the biggest brain to exist. Completely forgot that JAVA you need to manually reload.
Its all working now :I
Also is it allowed to import both bukkit and bukkit-api? or will they fight each other
useless to import the api when you just import bukkit
Well importing the NMS included Bukkit killed some chat functions
specifically event.(whatever you want to access)
It's more of the IDE than Java but yes
Ah i guess thats right
(event.getAction().isRightClick()
For instance the 'isRightClick()' is errored
and event.deathMessage is broke as well
most event stuff
in which event?
to Spigot*
Im just gonna import paper and act like nothing happened
Finnnneeee, Spigot
If you want Paper then you should use Paper Userdev for Gradle
also do keep in mind your plugin will not run on Spigot
and therefor cannot be published on Spigotmc
Not sure if I'm using this event wrong or what, but I want to do some manipulation to console commands executed by other plugins, is this the right event? ServerCommandEvent No matter what I do it doesn't seem to want to fire. (yes my listener is registered)
public void on(ServerCommandEvent e) {
plugin.info("#console executed " + e.getCommand());
}```
Its private so thats not a big deal
Im just replacing paper dependencies with spigot capable ones. They arent that complex to change.
nvm I gues... https://github.com/PaperMC/Paper/issues/9644
This may sound like a dumb question, but how would I go about adding NBT data to entitys spawned by using world.spawnEntity(Location, EntityType)?
use the spawn method that accepts a consumer if you plan on modifying the entity
also what nbt do you want to change
I'll do a text display, so it's the text of it, billboard, scale and background
declaration: package: org.bukkit.entity, interface: TextDisplay
i see, thx
You're not using the mappings
im pretty sure that broke recently
I told you two ways of doing that
?switchmappings
They're using gradle
that just explains on how to "read" the mappings
so they can lookup what chunk #a does
ah
This is like a treasure hunt rn
i think ive broken something
Just use the mappings with Paperweight
because this does not add up
also head over to the Paper discord if you need any help
I removed the paper and swapped pretty much everything over already
since id like not to be locked to paper in the future
Use paperweight then
?whereami
(i had to)
how do i learn math, I want to animate particles with bukkitrunnables. help pls
how to math tutorial
hey guys i need help im using chatGPT and trying to compile with Maven (InteliJ Idea) and using mc version 1.19
getting this error: Could not find artifact org.bukkit:bukkit:jar:1.19-R0.1-SNAPSHOT in spigot-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)
pls teach me how to math
im just dumb and i have basic understanding of java
First you go to school
if anyone can help ty
Don't depend on bukkit
i dont understnad cos tan
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
This is Spigot
what do i cahnge in my code
.
how can i make a bungeecord alert by an action on spigot? (I don't want the code done i want where i can find it in the wiki)
What
Can you explain more clearly
When editing the ItemMeta of an ItemStack in a player's inventory, it doesn't update right after setting the itemmeta? Because if I don't have the commented line, the itemmeta is set for the first time and the lore updates, but if I set the itemmeta again, the lore no longer updates, but if I uncomment the print line, the lore always updates like the expected.
getItemStack will probably get you a copy of the itemstack, not a reference, but im unsure
i want like after a player clicked a slot in a gui it will send every 30 seconds a message in all the server within the bungeecord for like 3 times
Update inventory
my useless material list is done https://www.spigotmc.org/threads/list-of-materials-and-their-data.631970/
how can i make a bungeecord alert by an action on spigot? (I don't want the code done i want where i can find it in the wiki)
Like after a player clicked a slot in a gui and it will send a message every 30 seconds in all the server within the bungeecord for like 3 times
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I think we sent this 23 times meanwhile lol
not works
not is a copy
fixed
can I somehow get all blocks that have BlockPDC when a chunk is loaded?
given blockpdc isn't a native thing, check whatever API you are using for it
are you talking about CustomBlockData?
yes
declaration: package: com.jeff_media.customblockdata, class: CustomBlockData
hmm
hmm?
I'll see if that works, thanks
Someone knows a server where i can get support for deprecated version?
1.7.10 in this case
Im backporting to 1.7.10 development cause im helping on a 1.7.10 cauldron server, obs: im developing on SpigotAPI, not CauldronAPI
?whereami
But
I shall take this elsewhere
it's almost the same thing
MiniMessage.miniMessage().
And you can see all the methods there
Instead of java strings you represent them with a Component
Yeah
What were u confused abt?
CommandSender#sendMessage(String) is now marked obsolete and ChatColor is deprecated, what should I use in order to send messages then? Making a new component for each message seems a bit inconvenient
This is Paper API stuff tho
I'll take it to their Discord
Paper api = paper server
I tried to do stuff with it, but everything i found online on how to actually create the super was outdated (or using something for CraftBukkit which i don't understand) :/
Like, I didn't find anything explaining it well, only the bare bones which isn't enough for me unfortunately
I just can't get it to work
What have you tried and what isn't working
?paste your code
I basically don't have much code:
```super(location.getWorld().getHandle())````getHandle doesn't exist
and everyone is using it
That's nms
oh
getHandle is what would grab the nms object of the World
You do not need to do that, just use the methods I told you about
hello, does somebody know a good tutorial on working with particle effects (how sin cos and tan works and stuff) ?
You want a math lesson?
Okay, but what is Consumer? There's no to little documentation about it
A consumer is a functional interface provided by the java api
Essentially what you do is pass that method a lambda function in which you modify the entity
This math video tutorial provides a basic introduction into trigonometry. It covers trigonometric ratios such as sine, cosine, and tangent. It explains how to evaluate it using right triangle trigonometry and SOHCAHTOA. In addition, it explains how to solve the missing sides of triangles and how to find the missing angles using inverse trig f...
and what would go into the lambda?
for example, if I'd like a zombie named 'Zombi' what would that lookj like?
Would I have to use like the classes of the entity, here EntityTypes.ZOMBIE?
The parameter is the entity being summoned
in the method body you place the code modifying said entity
Depends, it does give you a basic run down of the different functions
Once you understand how it works and you're able to visualise it, it shouldn't be to hard
i hope so, im currently going insane
If you need a longer video you can look at: https://www.youtube.com/watch?v=g8VCHoSk5_o
This video tutorial provides a basic intro into trigonometry. It explains how to evaluate trigonometric functions like sin, cos, and tan using soh cah toa and right triangle trigonometry. It explains how to use reference angles and coterminal angles to evaluate trig functions such as sec, csc, and cot.
Access Full-Length Premium Videos: ...
thank you
world.spawn(Zombie.class, zombie -> {
zombie.setCustomName("Zombi");
zombie.setCustomNameVisible(true);
});
going 100% of memory here, but you get the idea
It's slightly more advanced java
so it might be hard if you haven't encountered generic and functional programming before
I came here from Python and a bit of C# so yeaa haha
Started learning Java a few weeks ago and didn't really get into stuff like that a whole bunch
Yo
I wanna switch to like maven/gradle
Probably gradle
since I currently build it with artifact compiler
But too many libraries I'd want to use don't have a jar file
Maven is easier to learn
library that don't have a jar file ??
Well they all do if you know how to get them

But I'm currently building my plugin with a jarinjar
A compiled one
That I could download
Yeah that's what maven points to
well a pom and a jar
You can grab the jar from any maven url if you know the format
So how could I implement that to Gradle?
jar in jar dependency ?
You want to shade or bundle jar files?
usually you'd just shade yea
I will not wait 2+ minutes for my plugin to build
It's not that bad
Not quiet
But kinda
The jarinjar is my own plugin

And the main jar loads the jarinjar depending on server environment
I wouldn't say that maven is much slower than gradle when it comes to smaller projects plugins
So like Bukkit, Velocity etc
every gradle project I've ever had the misfortune of trying to compile has taken forever
so you have a bootstrap thing wrapping the different implementations
I heard the exact same thing about maven
But the opposite to gradle
No.
I wanted to type "heard"
Gradle is a pain every time I have to deal with it
tbf, pick whatever you'd like. Does not really matter
^^
if you start with gradle and it explodes in your face, switch to maven
Gradle it is
i did the opposite kekw
and well, including the entire jar file directly in the "wrapper" thing you have is a bit of work that I don't think gradle provides an inbuilt solution for
my shade plugin was out of date so i got a mis version error and swapped to gradle
I will not make a joke out of this
So you cannot load jarinjars in gradle?
load ?
Ye?
load or build ?
Well I guess build
Well not natively
Cuz if it builds it'll load
And I load the jarinjar
Not always 
If you can do it with artifacts you can do it with maven/gradle
Pretty sure artifacts use gradle
That's why my compilations takes about 2s
Well skipping that
Is there a way to create a virtual server?
Like the spigot server opens up
And I create a smaller virtual server?
But it's like a completly different server
That players could connect between
maybe bungeecord
does anyone know how would I be able to make a custom recipe craftable just once?
Cancel PreCraft event
And save the info
The point is that I want it to be on spigot
yeah ik but that was the closest thing that came to my mind

no, you cannot spin up a "virtual" server
whatever that means
Does anyone know of a working scoreboard api or just a good tutorial that can cover the creation of one? I've tried YT and google and can't find anything that works for 1.20
Never used it, but that's what I found
Is there any other examples for FastBoard because I just tried it and it didn't seem to work
most liekly I did something wrong if others can vouch for it but nothing popped up
after going through its example
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
?paste
whats wrong with the api?
I mean, I guess updateLines is a bit less verbose than creating and maintaining scores
I want to hook my plugin in other my plugin, where i can add it in intellij? i'm using maven
doesn't explain why packets are required
¯_(ツ)_/¯
edit maven pom.xml to add dependency
I mean, idk what the impl does
because S P E E D
✨ ASYNC PACKETS ✨
nothing wrong with the API I suppose its something wrong with how NMS represents scoreboards. When I made minigames a bit back I much prefer to run updateLines over maintaining the weird teams and objects nms requires
yes, but how to add it? because i have the source and the jar
Java is all about virtualization, so I thought it'd be possible
I mean yea, if you think of scoreboards only to the degree that they display text like that xD
I mean that's all I really care about when making mini games
what is the dependency
they are quite literally that
Yea
I've never used a scoreboard outside of that capacity
so obviously that has a leg up above a general purpose server api for scoreboards 
my another plugin, i already made the hook
the dependency will be a <dependency> section with the groupID/artifactId/version from the other plugin
assuming the other plugin also uses maven
post the pom.xml of both plugins
^ and use mvn install in the other project
to add it to your local maven repo
Btw, how does server engine version updating work?

Like mojangs updates their server software

yes I mean local because it is not in any repository
That's what I thought
you update like, Material enum, Tag, etc. in the API
But it needs to know which classes changed
and then well, you need to get all patches to apply
well, dunno what spigot does, paper you basically attempt to apply as many patches as possible.
If something in the decompiled server source changed, patch fails to apply
If patch doesn't apply cleanly, needs an update
But at Paper you need to wait for the spigot release to remain compatible, right?
indeed
Our team is a bit larger than spigots ?
I mean spigot included
Like 1.17 came out and changed a lot
so they have a lot of time
So he starts updating when snapshots are still coming out?
presumably ?
who knows, its not a public process 
but yea, given spigot update times when the releases come out, spigot is updated prior to the release.
We can ask the big boi himself
If that starts at pre-releases or snapshots, who knows
Maybe Paper and Spigot could unite and form like a SuperEngine
So that no unoptimized code is present

What?
I mean, that is paper I guess
can say the same about its forks
every fork has its reasons to be a fork
But it still relies on spigot
purpur relies on paper
like, what is the point xD
its stiff a different software with different goals
I have seen Purpur only be errorenous
was more of an example
Like, paper has a different vison for the server than spigot and purpur
so, three different projects it is
I didn't even notice you mentioned it
paper wouldn't include purpurs like WASD configuration option to ride random mobs
Pufferfish as well
spigot (probably) won't include papers entire deprecation of legacy text methods or hard removal of sand duping e.g.
What even is legacy?
sorry, legacy text
I never knew
legacy text ?
legacy in general means something that is beyond its support cycle
legacy materials (those identified by int ids and shit) are no longer a thing
they should not exist
but to keep old plugins running, spigot does some legacy support
Won't a simple HashMap do?
there is a lot of work going into supporting old plugins
spigot basically rewrites your plugins code
It does?
yea
How exactly?
Btw, are events created and called even if there are no listeners?
"EVIL"
I should start doing that type of naming

well it has a lot of work to do to support 1.8 developers 
I don't know what half of this means
Never have I rewritten a compiled class
Btw why does Paper only support the AsyncTabComplete?

From what I've seen the sync version isn't invoked
But like, there aren't other async events
of already existing sync ones on Paper
Note that due to client changes, if the sender is a Player, this event will only begin to fire once command arguments are specified, not commands themselves. Plugins wishing to remove commands from tab completion are advised to ensure the client does not have permission for the relevant commands, or use PlayerCommandSendEvent.
Like PlayerMoveEvent
But it works on spigot
open a bug report I guess ? ¯_(ツ)_/¯
The argument suggestion after command
I thought it was intentional
Or maybe it's a ViaVersion issue
Since the blindness effect didn't work as well
xD
paper would deprecate stuff if it does not work. Tho like, we generally maintain compat so even then it should still be called.
might very well be via
is there a ressource on how to create custom advancements?
But it didn't have any other visual effects
They linked their github code there
Btw
How is a buffer translated into a packet object?
it reads the type int
Is the id read, put into a map with constructors and constructed?
then instantiates a packet object
with a serializer retrieved by the type id
But with a native constructor call or with a generalized method?
packets have a constructor that takes a friendly bytebuf
i dont remember i think constructor taking in the buffer
yeah
its pretty simple then it just reads the data in order
it is not a switch statement tho xD
So do you have like a Map<Integer, Constructor<? extends Packet>>?
Whyyyyy
Oh yeah
Pretty much the same speed as a switch
Wdym?
probably even slower than just an array access only thing is reflection but its not too slow on newer java
its not even reflection
less flexible for modding, hardcoded everything
A switch statement is fast af
oh does it call a lmbda
yea
I don't know exactly but maybe even faster than array access
I mean, array access is worse than branch
w/o optimizations itll first branch then call the function
ig if its not cached
You mean likeeee
ig
Uhh
both of them are stupid fast
Ye
its w/e
true
Yeah, why does it do that?
But it fuckin unoptimizes
I never understood why
conceptually in a switch ur jumping to the appropriate code and then calling the constructor