#help-development
1 messages · Page 1798 of 1
oh shit I'm feeling it
TACHYOOOON
xD
most of the time my debug is just
"meme school"
or
"fuck"
I am very joyous when I see fucks
mine are just me counting up
may your day be full of bliss and fucks
1 2 3 4 5 6 7 8 9 10 11 12 134 145
i usually also count up tbh
wait, is spigot made ontop of bukkit?
and md_5 didnt make bukkit?
nope
Have you never heard of open source
i have ofc
couldnt have forked it if it wasnt open source
anyone knows the @ of whoever made bukkit?
now just picture a line of astronauts pointing guns at each other that spans over hundreds of astronauts because they keep forking each other
xD
Hey, it is possible to run 1.18. spigot server? Now?
yes
and how ? or link for server?
this conversation has been going on for hours in #general
lol in the bukkit discord they announce the new spigot versions
imagine announcing the new paper versions in the spigot discord
we'd get a notification every couple of hours
x'D
you think that's a joke, you just wait to see how quickly early builds get replaced
haha
I'm supposed to be working on things that nobody will use but I'm too busy reading this server's messages :p
I'm supposed to be working on things that thousands of people will use but I am too busy memeing about my debug messages
I didn't even get console to print tachyon
today is a sad day
guess I need to review my quest queueing system
isnt that just getLogger().info(something)
what is?
for the console to print stuff
that's one way to do it
it is
I mean it didn't output tachyon because the code isn't running because I messed something up, not that getting console to print something is the challenge in the first place
ahh
well then the solution is to fix the code
simple
what a novel concept, I was just going to put it in cold storage and see if it fixes itself
that does sometimes work aswell
it's on the overview page and so applies to every event^^
yeah but fortunately, they already fixed it. it was bug in their lib that set a player's maxhealth to 0 after they died
what are the nms installation steps
Im trying to import it to my pom.xml for 6 hours and i cant do that
Oh hey magma I know you from your cool project :)
not to be mean but if you couldn't figure out how to get nms to even get setup in under 6 hours maybe you should stick to the api for now, nms is one hell of a rabbit hole
How do I compile against NMS with the 1.18 build? The jar file is totally different?
I don't want to rewrite the whole plugin to not use NMS
yea
I just ran the Buildtools
and I tried to import the nms but cant do that...
rewrite the whole plugin to not use nms
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>```
@quaint mantle No. I will not do that!
and Cannot resolve org.spigotmc1.16.5-R0.1-SNAPSHOT
I can only use
1.9
and
1.8
If there's an api for stuff you did with nms you SHOULD really use the api
otherwise, just run buildtools like you did before
I just want Custom entities :(
@quaint mantle The jar file is totally different. How do I make plugins like that? I can't just import the spigot-1.18.jar into my IDE.
well you know my plugin, I'll tell you right now I do not use any nms @iron palm
use a proper build tool
woa
seriously?
Ok
@quaint mantle Any recommendation?
Gradle or maven
gradle > maven
I do not make plugins with gradle/maven.
now's a good time to start
._.
once you pop you can't stop
Also I always use Eclipse and not IntelliJ or else
ok
All my recent projects do not rely on gradle/maven
migrate them
using eclipse is how you end up like Choco, do you want to end up like Choco?
Eclipse and maven work well together
nobody wants to end up like Choco
I had a partner once and I use IntelliJ so clearly Choco is not the answer to being single.
since 1.18 all nms methods are obfuscated? Or i use incorrect import jar or something else?
Use specialsource
I keep getting ads from jet brains
Whats that
yes they're obfuscated
I maybe have found a solution that works for me
They were obfuscated in 1.17 too
use a proper build tool
use a proper build tool
Not really
is the bug or what but whenever I add module in intellij project Maven files from Resources folder of main artifact are never included in output jar file
After removing module problem still persists
I'll try using that jar file for making the plugin
it basically does not include plugin.yml
even if the file is already inside resources folder
||use proper build tool||
Hey kids, it's time to learn the use proper build tool song!
use proper build tool
use proper build tool
use proper build tool
context: vocals slowly getting lower pitched every line
I can't hear it anymore...
Don't expect me to change to gradle/maven. Just stop it.
I want "proper" help or at least an answer.
how would we help you if you're doing things completely wrong?
Not everyone uses gradle/maven, @quaint mantle :/
Come on
everyone does, thats the common practice
All methods are obfuscated
java.lang.NoSuchMethodException: net.minecraft.world.item.ItemStack.getTag()
everyone doesn't, but anyone can
like, everyone who somehow decent at development
wow.
theres no reason not too switch anyway
Atleast give me a quick startup on what I have to setup for the base of my plugin. For example the pom.xml file that I have to predefine. If you could be so kind and provide me with the content of that as a paste?
I am sure I can figure out the rest and pretty much copy paste my code inside.
As I want to use the 1.18 with Java 17 (for the plugin)
https://www.spigotmc.org/wiki/spigot-plugin-development/ really should look at the existing documentation for stuff like this
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Dependency 'org.spigotmc:spigot-api:1.18.1-R0.1-SNAPSHOT' not found
<dependencies> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.18.1-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> </dependencies>
Is that wrong?
buddy
slow down
we just got to 1.18
where are you getting the .1 from
damned zoomers, zooming at lightspeed through versions
Question, if I use a completablefutur and use the r .complete() method, would it block? Let’s say I apply A timer somewhere in there
That should be correct now?
<dependencies> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.18-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> </dependencies>
As it does not throw out errors
I, the human xml format parser, have concluded it is valid and therefore if it fails to work when you actually use it just let your computer know it is wrong and then set it on fire
that's how I do my code and it has never let me down before
Your unregistered trademark? 😄
I like my trademarks like I like my hypercam 2s, unregistered
Can relate 😄
here I spent so much time wondering why my quests were not tagged as accepted when I was pulling them from the database, kids remember to save things to the database AFTER you modify them
has anyone used vault to check permissions for offlineplayers?
offline players have no permissions
How do I add multiple spigot versions into that maven?
that's why i said "used vault" cause vault can check offlineplayer if it has a permission
How do I get the org.bukkit.craftbukkit.v1_18_R1.* stuff for imports with buildtools? My .jar only has META-INF and org.bukkit.craftbukkit.bootstrap
I ran buildtools --rev 1.18
You just have to spawn the firework. Though you also have to set its power so that it actually travels. Seriously advise making use of World#spawn() and the Consumer to edit the Firework before it spawns
world.spawn(spawnLocation, Firework.class, firework -> {
FireworkMeta fireworkMeta = (FireworkMeta) Bukkit.getItemFactory().getItemMeta(Material.FIREWORK_ROCKET);
assert fireworkMeta != null;
fireworkMeta.addEffect(FireworkEffect.builder()
.flicker(true)
.trail(true)
.with(FireworkEffect.Type.STAR)
.withColor(Color.fromRGB(0, 0, 0))
.withFade(Color.fromRGB(255, 255, 255))
.build()
);
fireworkMeta.setPower(random.nextInt(2) + 1); // 1 - 2, or 0.5 - 1.0 seconds of flight time
firework.setFireworkMeta(fireworkMeta);
});```
Just as an example
How can i set the Durability of a flint and steel to 3 / 64?
Cast its ItemMeta to Damageable and go from there
cannot resolve method addEffect
What version are you using? That's been around for forever
@torn shuttle Is there net.md_5.bungee.api inside the 1.18 build?
Yes
If you're looking to use ChatColor from BungeeChat, yes it's there
1.13 API definitely has firework meta and the addEffect() method. I guess just make sure it's imported properly
@worldly ingot
I am looking for these:
wasn't imported, idk why my ide didn't warn me
Yeah those should be in Spigot 1.18 just fine. Won't be available in Bukkit though if you're depending on that
@worldly ingot
I am using them for the following:
I cannot find anything on md_5 inside the 1.18 jar
In the 1.17.1 jar it was in spigot-1.17.1.jar\net\md_5\bungee\api
But where is it now?
Cant i just change a mob target without nms?
cant get the setTarget
I liked choco better when he had hid dog on his pfp

this needs nms :
accurate
no it does not
wdym
setTarget is in the API
: doesnt means something its just a manner
You mean where the mob is lookin at ?
noep
im trying to set a living entity target to another living entity
Oh
And btw if i want to change yaw or pitch of a player, should i teleport it to the new yaw and pitch ?
I was trying to import nms 8 hours ago but i couldnt
should i create a void as the api said?
cause i cant get access to the settarget with
livingEntity.setTarget
That is not what the API page says
I know
It's Mob, not LivingEntity
the TARGET is the living entity
oa worked thanks
but it's a Mob method
next time double check before telling everyone else what they told you to do isn't valid
... ok
there are no dumb questions, only dumb people
ok
should I check via clause if the values passed as null to another class method
hm?
or i should let the try catch block handle the NullPointerException
lets say I have a nullable method
inside try catch block
and i have another method which requires that Object passed as an argument
should i create an if guard for handling null values
or let the catch block handle the NullPointerException for me
since I am using the try catch block anyways
lemme provide an example
I need help. For some reason end crystals arent exploding and I kind of need to make a plugin to forcefully make the end crystals explode, any ideas?
try {
String value = this.config.getString("someKey");
SomeThrowingObject object = new SomeThrowingObject(value);
} catch (Exception exception) {
this.getLogger.log(Level.SEVERE, "An error has occurred!", exception);
}
public class SomeThrowingObject() {
private final String value;
public SomeThrowingObject(String value) {
this.value = Objects.requireNonNull(value);
}
}
since the ConfigurationSection.getString() could return null in this case
should I add an if clause to check if the returned String value is null
or let the SomeObject throw NullPointerException
and let the try catch block handle that
in both cases, the flow of code execution should halt completely. A.k.a this try catch block should return if the code failed
uh
just do
String value = this.config.getString("someKey", "default value");
well the same could be done with this method
since it returns null, if not found
and null is comparable
hmm i'm confused what the difference is between those damage things and the custom model data in a custom item json
this example is not that realistic but i think you guys know what you mean
custom model data is used 1.14+ iirc, while damage values are for compatibility
custom model data is preferred for retexturing models
since you dont need to rely on item's damage
and it allows much more models to be added
so i can use custom model data on every item?
yes
yep
too bad that minecraft resource packs don't allow to make custom armor model data
you can't make unique custom armor sadly
actually maybe you can
if you use damage values
actually i don't know
its uncharted territory for me
yea but i'm not sure if customcrafting plugins supports those damage values
so i'm kinda limited i guess
Damage values should be supported
it's how people done custom items prior to 1.14
what i would do
is to play around with Packet level manipulation
for example if you equipped specific item
packet would be sent to replace that item with custom model data one (although the item in the server stays the same)
that way you could preserve compatibility with other plugins
i'm still looking for the option 👀
but it requires lots of checking
maybe this is something
as the devs of the plugin say that custom model data doesnt work with gear
worn textures
yes as i said
public class SplyMain extends JavaPlugin {
@Override
public void onEnable() {
public HashMap<String, ItemStack> itemstacks = new HashMap<String, ItemStack>();
File file = new File("splymainitems");
if (file.mkdir()) {
getLogger().info("Splymainitems folder was already found and thus not created.");
}
for (String filename : new File("splymainitems").list()) {
getLogger().info("Loading item file: " + filename);
getLogger().info("splymainitems" + File.separatorChar + filename);
try {
Gson gson = new Gson();
Reader reader = Files.newBufferedReader(Paths.get("splymainitems" + File.separatorChar + filename));
Map<?, ?> map = gson.fromJson(reader, Map.class);
getLogger().info(map.toString());
reader.close();
Material material = Material.getMaterial(map.get("material").toString());
if(material == null) {
getLogger().info("No material detected in: " + filename);
}
String extensionlessfilename = FilenameUtils.removeExtension(filename);
itemstacks.put(extensionlessfilename, new ItemStack(material));
} catch(Exception ex){
ex.printStackTrace();
getLogger().info("This probably means that your json code is wrong, take a look at it would you please.");
}
getLogger().info(itemstacks.toString());
}
}
public static HashMap<String, ItemStack> getHashMap {
return itemstacks
}
}``` im trying to make a getting i think its called but the method getHashMap cannot accese itemstacks can anyone see why?
lets try this
public HashMap<String, ItemStack> itemstacks = new HashMap<String, ItemStack>(); why its public inside the method
ahh that was just something i tried to get it to work
still doesnt if there is not public
But why
it allows retexturing items, which aren't supported by other plugins
lets say i have an item from Plugin A
ah
and i want custom texture for Plugin A's item
you can make this work without editing the main source code of the plugin
tbh that's what i would be going to do probably in the future
its just easier to maintain the texturing plugin
fuck plugins that doesnt allows tus to use cmd in items
I believe DeluxeMenus should support CMD
otherwise fuck this dumb plugin
All my homies use BetterGUI
Hey there, did anyone update their IntelliJ today? My projects won't load anymore after updating to 2021.3 (Build #IC-213.5744.223, built on November 27, 2021) I think. What should I do?
Where are those located (and does that include like code editor settings and stuff)?
I don't know where the temp data is located but probably in AppData folder
bro
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
and
its inside a method
ur hashmap is a local variable
u cant access it outside of that method
wdym they wont load?
actually minecraft wiki has detailed explanation how resource packs work
you should check that out, including json tags/keys
does someone know whats the NMS of 1.18?
put spaces between lines, this is making me eyes hurt
my bad if im rude its just the way i talk btw
check your file permissions
it could be that something is marked as read only
all those spaces make my eyes hurt tho
i know it is
then fix it
NMS isn't documented. Research yourself
But an IntelliJ update wouldn't touch project files, would it?
and fix ur naming conventions
i dont know. it shouldnt, just like windows updates shouldn't brick your devices. Shit happens
itemStacks*
and u forgot a semi colon at that static method on the end
return itemStacks**;**
once i did try and make my code pretty, but i couldnt stop, so i never got anything done because i would use all my time to make it pretty
so now i try and make it work and then make it pretty
that will work when ur code isnt that big
when ur plugin is in hundreds of kbs then it gets harder
that's literally me
you're not alone
I solve the problem
good lol
all that code took like 10 hours to make, imagine if i also had to make it pretty
Portal had one majestic phrase from glaDOS: "The best solution to the problem is usually the easiest one"
amazing lol
I'm attempting to downgrade to the previous version, I'll post an update with the outcome 🙂
someone help me ,, where do i get support for eclipse IDE
@quaint mantle Howdy! I have a question about PwnPlantGrowth v2.3.0. Is the death percentage the chance that the plant dies in each growth stage, or is it the chance that the plant dies in any growth stage?
bruh
just-
sout + tab
cmooon why EntityArmorStand methods are now .a .a .a .b .b .b .c .c .c
how am I supposed to find the right one as a replacement for .setInvisible(boolean) or so
see spigotmc news
and use specialsource
obfuscation of NMS go BRRRRRRRRRRRRRRRRRRRRR
80% of unique plugin's features go brrrrrrrrrrrrrrrrr
armorstand is abstract, I have to use nms for EntityArmorStand
That exists in the spigot API 🙃
i still don't seem to think why you're trying to access it while there's literally ArmorStand.setInvisible() inside the api
If you're doing packet level armor stands that seems understandable but now from my point you're using NMS for a thing that already exists in the API
i use packets for show and destroy
but still i would use PacketDataSerializer to construct metadata instead of datawatchers in that case
if you're looking for metadata
just use PacketDataSerializer
to write a byte index
Kappa
Why
im a programmer but i dont know much about minecraft mods/plugins/this kinda stuff. whats the process like for creating a new version of Spigot? U have to like decompile the 1.18 jarfile or something right?
PacketDataSerializer dataSerializer = new PacketDataSerializer(Unpooled.buffer());
dataSerializer.d(0) // entity id of the packet entity.
dataSerializer.writeByte(0) // Byte index from wiki.vg, in this case its 0 for invisible bit flag. Since its base Entity Class byte data.
dataSerializer.d(0) // Data type ID from wiki.vg
dataSerializer.writeByte(0x20) // Your byte data. 0x20 is a bit flag for invisible tag.
dataSerializer.writeByte(255) // Marks entity metadata as finished, its REQUIRED.
playerConnection.sendPacket(new PacketPlayOutEntityMetadata(dataSerializer));
i use something like this to set packet metadata of an entity without external libraries
That way you can avoid reflection overhead
and send packets way more cleaner
and since PacketDataSerializer is a builtin NMS netty serializer it includes every single method for parsing data, UUID's, Locations, VarInts, you name it
Anyone know why IntelliJ tells me package org.bukkit does not exist, it works with spigot 1.17 but when i change it to the 1.18 it doesn't work
Did you also update IntelliJ today? 😛
Yes
I'm having issues too
yep
cuz ur using the "new" spigot jar
they messed it up
ho, is there a way to get it working ?
How did you import Spigot?
buildtools to generate both 1.17 and 1.18 and imported jars as lib
or use paper and ignore this hassle with build tools
although it would be still hassle probs
idk
SEE SPIGOTMC NEWS FEED 1.17 DEVELOPER NOTES
TRUE
it does suck tho
ngl I'll probably never have a valid use-case for the library loader
you can include here database drivers
rather than package them inside in your jar
since those are needed at runtime
what is unpooled
Its an implementation of netty's buffer (ByteBuf)
Creates a new ByteBuf by allocating new space or by wrapping or copying existing byte arrays, byte buffers and a string.
Name really makes it sound like it some sort of concurrent util class
ngl
all it does is that it returns implementation of netty's ByteBuf
should i use maven or gradle ?
Its part of NMS
Netty is part of NMS
its how server and client communicates
everything that I wrote there is native to the NMS
you don't need any other libs to execute this
would love to import it first
although some PacketDataSerializer methods are obfuscated
but for the most part i decyphered them
at least in 1.17.1
Cannot resolve symbol 'Unpooled'
Use maven it's what is most used here
Did you import NMS correctly
ok ty
In 1.17
serializer.a() // Used for sending IChatBaseComponents, Strings, UUID's
serializer.d() // Used for writing minecraft's implementation of VarInts
you can really tell what's doing what by just looking at intellij autocomplete
serializer.writeBoolean() // Writes boolean data, you can also use serializer.writeByte(0x0/0x1), since it wraps around it.
yea
but that's what I needed mostly
Its really strange how Scoreboard teams packet utilise both normal Strings in packet data and IChatBaseComponents
STOP USING PACKETS FOR SCOREBOARDS
Im using it not for scoreboards
but for glow effects both for packet entities and living entities inside server, i haven't seen any method inside API which could provide a way to set glow effect clientside for an entity
calm down
ffs
ik using scoreboards is bad since it breaks compatibility with API
it leads to undefined behaviour from the server
glow only visible for a spefic player?
yes
hmm i remember try set a color not using teams for glow but i hate using nms then pass for try xd
how do i check if myConfig.set("Name", player.getName()); doesn't exist in the config, that line
I've already managed to do it
it works well
all you need is to add player to the team scoreboard
and set team's color to your specified color
and apply the glow for that player
yeah i only dont wanna make teams only for this xd
try a get if check if is null?
dont remember how to works the configs methods
does anyone know a discord server or website where i can find people offering staff services
?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/
that's my snippet of setting both collision and glow with color via packets for 1.17.1 It builds the PacketDataSerializer data inside the arrays and use them to construct specified packets
boolean nonNullGlow = this.glow != null;
boolean nonNullCollision = this.collision != null;
if (nonNullCollision || nonNullGlow) {
String teamName = String.valueOf(-entity.getEntityId());
data[1] = new PacketDataSerializer(Unpooled.buffer());
data[1].a(teamName);
data[1].writeByte(0);
data[1].a(AbstractPacketEntityMeta.EMPTY_COMPONENT);
data[1].writeByte(0b0);
data[1].a("always");
data[1].a(nonNullCollision ? (this.collision ? "always" : "never") : "always");
data[1].a(nonNullGlow ? CraftChatMessage.getColor(this.glow) : EnumChatFormat.p);
data[1].a(AbstractPacketEntityMeta.EMPTY_COMPONENT);
data[1].a(AbstractPacketEntityMeta.EMPTY_COMPONENT);
data[1].d(0);
data[2] = new PacketDataSerializer(Unpooled.buffer());
data[2].a(teamName);
data[2].writeByte(1);
}
what event type would i need to use to swap 2 players' locations
md_5 will hate this
why the fuck are you doing it like this
Just teleport them?
event type?
because i did this for packet entities
i wanted to make packet entities glow
and have their collisions off
A question what java do you use for 1.18 on servers because I put java 17 and it doesn't let me enter the server
so am I now forced to use Maven?
No
17
all I want is a working spigot.jar
But it will make your life easier
with all the classes I want
Then use Maven
how do i check if something exists in the playerfile.yml
would need it to be executed if a snowball, for instance hit a player from another player
So you can mark floats with an 'f' and long with an 'l'. for example long x = 1000L;.
How can you mark a byte as a byte?
Cuz I hate doing (byte) 0 all the time
great post forcing me to use maven
you sound like a dude who thinks everyone is evil
Listen to the projectile hit event
you use the import using jar? not maven or gradle?
ok, but im using an interface to do my items and there will be multiple items like this with different functions
yes, dependencies excluded from the final plugin.jar
Noone knows?
spigot-api-shaded has all the api depends included
Hello! I have a problem regarding the BungeeCord version, I tried using ViaVersion and it still wouldn't let me enter.
without nms
And?
Make sure Bungeecord is up to date. If it still doesn't work move to #help-server and send what it tells you when you try to join
...
We aren't waterfall
What did it tell you
cast the Entity to CraftEntity
get its NMS handle
use appropriate method which has return type of data watcher
how do i check if a line exists in a playerdata.yml
intellij autocompletion is magic
A value?
If so just check get and see if it's null
i wanna add this myConfig.set("Name", player.getName());
but first i wanna check if it doesn't exist
Use getString and see if it is null
myConfig.isSet
That exists 👀
yes
!myConfig.isSet(Name) myConfig.set("Name", player.getName());?
Yeah
if(!myConfig.isSet("Name")) myConfig.set("Name", player.getName());
You aren't on the latest bungeecord version
That's waterfall
Run "bungee" in the console
And send what it says
Are you sure that's the bungeecord you're connecting to
that message is from your server, not bungee
bungee's outdated message doesnt look like your screenshotr
olivo
?
You load it once when the player joins. Then when the player leaves you set it again. You can also optionally have an auto save
I'm trying to use HikariCP in my plugin. I've had it working in Minecraft 1.17, but in 1.18 (Fresh from buildtools) I get the following error:
java.util.ServiceConfigurationError: org.slf4j.spi.SLF4JServiceProvider: org.apache.logging.slf4j.SLF4JServiceProvider not a subtype
at java.util.ServiceLoader.fail(ServiceLoader.java:593) ~[?:?]
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244) ~[?:?]
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]
at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]
at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]
at org.slf4j.LoggerFactory.findServiceProviders(LoggerFactory.java:104) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4]
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:147) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4]
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:139) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4]
at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:418) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4]
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:404) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4]
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:353) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4]
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:379) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4]
at com.zaxxer.hikari.HikariConfig.<clinit>(HikariConfig.java:48) ~[?:?]
at nl.imine.hubtweaks.db.DatabaseManager.<init>(DatabaseManager.java:15) ~[?:?]
at nl.imine.hubtweaks.HubTweaksPlugin.initializeDatabase(HubTweaksPlugin.java:92) ~[?:?]
at nl.imine.hubtweaks.HubTweaksPlugin.onEnable(HubTweaksPlugin.java:49) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:525) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334-Spigot-a5dea1c-a008701]
at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:439) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334-Spigot-a5dea1c-a008701]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:611) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334-Spigot-a5dea1c-a008701]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:412) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334-Spigot-a5dea1c-a008701]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:262) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334-Spigot-a5dea1c-a008701]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:993) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334-Spigot-a5dea1c-a008701]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:303) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334-Spigot-a5dea1c-a008701]
at java.lang.Thread.run(Thread.java:833) [?:?]
I've addded the libs not by shading, but using the @Library annotation in PluginAnnotations:
@Plugin(name = "HubTweaks", version = "1.0")
@Library("org.mariadb.jdbc:mariadb-java-client:2.7.4")
@Library("org.flywaydb:flyway-core:6.4.1")
@Library("com.zaxxer:HikariCP:5.0.0")
@ApiVersion(ApiVersion.Target.v1_17)
public class HubTweaksPlugin extends JavaPlugin {
Has something changed between 1.17 and 1.18 regarding libraries? Have I missed something in the announcement post on https://spigotmc.org ?
how?
Balance is usually done with doubles so use getDouble on your file
not explicitly, but its really hard to isolate libraries properly (work in progress) and so there may be a version incompatibility with the server version of slf4j and the one used by your libraries
so keep it on memory? when they join, then save it from memory when they leave?
Yes
a bug report and test case would be helpful
Well keep the balance not the file
Oops
Wrong reply
I'll file an issue on Jira :)
Then keep the rest of the data somewhere or store the file it's up to you
how am I supposed to even compile it
if .sendPacket got obfuscated
why are you using packets
the API now allows you to hide entities from players
I just want to spawn it for one player
hiding it from all players is kind of like spawning it for one 😉
Could someone look over my code?
is hiding an actual hiding or just making it invisible for players
whats the difference
they cant see it in spectator mode
how to get the value of an enum?
public enum HORIZONTAL {
LEFT(0),
CENTER(1),
RIGHT(2);
int direction;
HORIZONTAL(int direction) {}
public int getDirection() { return direction; }
}
i did this, but HORIZONTAL.RIGHT.direction just returns 0
oh wait, do i need to set it in the constructor? xD
you never set direction in constructor
how, if can I ask
Player#hideEntity
'hideEntity(org.bukkit.plugin.Plugin, org.bukkit.entity.Entity)' is deprecated
🤦♂️
I am using 1.8.8, and my InventoryClickEvent is only triggering on the first menu. I have 2 menus, one has a item that when you click on it leads you to another, but the item on the next doesnt trigger the onInventoryClick event
This works with 1.17.1, but switching to 1.8.8 is causing some issues ^
Bump
Does XSeries works with 1.18?
not yet i guess
you put it in the wrong section then
move it to the other <configuration>
last commit was 4 days ago and doesnt seem contains anything related to 1.18
This is my XML xml <plugin> <groupId>net.md-5</groupId> <artifactId>specialsource-maven-plugin</artifactId> <version>1.2.2</version> <executions> <execution> <phase>package</phase> <goals> <goal>remap</goal> </goals> <id>remap-obf</id> <configuration> <srgIn>org.spigotmc:minecraft-server:1.17.1-R0.1-SNAPSHOT:txt:maps-mojang</srgIn> <reverse>true</reverse> <remappedDependencies>org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT:jar:remapped-mojang </remappedDependencies> <remappedArtifactAttached>true</remappedArtifactAttached> <remappedClassifierName>remapped-obf</remappedClassifierName> </configuration> </execution> <execution> <phase>package</phase> <goals> <goal>remap</goal> </goals> <id>remap-spigot</id> <configuration> <inputFile> ${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar </inputFile> <srgIn>org.spigotmc:minecraft-server:1.17.1-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn> <remappedDependencies>org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT:jar:remapped-obf </remappedDependencies> </configuration> </execution> </executions> </plugin>
Are you talking abt this?
yes
Weird
Another way to support multi version title send?
Doing that only moved the mojang mappings jar
bump
To clear up, I am trying to move this first jar, into my plugins folder
add <remappedArtifactAttached>true</remappedArtifactAttached>
but again, seriously, maven isnt the tool for this
Where do I add this
to the same spot
Finally! Thank you sm for helping me :)
Can't download 1.18 BuildTools. I'm getting this error :/
please remove the .m2 folder listed and try again
oki
r
wdym can you explain to me the smoonth brain
wait
i think i see the problem
lol
i need some help with this
Didn't help - including the log
are you running an antivirus, if so, which?
Ive been working on a plugin and Im struggling with delays, currently I am trying to spawn in an armor stand and remove it after 5 seconds when a command is executed, any tips on how I'd do that?
Try using the scheduler to schedule a new delayed task
I tried doing that but the issue I had was the "plugin" variable is giving the error, "cannot resolve symbol 'plugin'" can I call that from the main class?
If you're calling from main use the this keyword. Otherwise you can pass in this as a parameter to a runnable class elsewhere in your plugin directory.
to simplify what lore said
if youre still having trouble
can you share some of your code?
if (args[0].equalsIgnoreCase("angry")) {
//spawn angry emote at player then kill it
ArmorStand armorstand = (ArmorStand) player.getWorld().spawnEntity(player.getLocation(), EntityType.ARMOR_STAND);
armorstand.setVisible(false);
armorstand.setGravity(false);
armorstand.setCustomName("\uEff1");
armorstand.setCustomNameVisible(true);
armorstand.setInvulnerable(true);
new BukkitRunnable() {
@Override
public void run() {
armorstand.remove();
}
}.runTaskLater(plugin, 100);
the plugin at the final line is what I assume is causing the issues
if the "plugin" is telling you it cannot resolve symbol
perhaps you have not provided a "plugin" object to the method surrounding that if statement
can you share the code around the if statement? (the method or whole class this is used in)
found a bug, where can i report it?
The bug is that in
MapFont#getWidth
only the color char (§) is skipped, but not the bytes and semicolon after it, therefore resulting in a wrong width. For example when passing ABC§10;DE, the §10; would get completely removed when displaying, but getWidth() would still count the width of 10;.
Commands Class
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
public class Commands implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)) {
return true;
}
Player player = (Player) sender;
if (cmd.getName().equalsIgnoreCase("emote")) {
if (args.length == 0) {
// open emote gui
Bukkit.getServer().getPluginManager().callEvent(new GuiEvent((Player) sender));
return true;
} else{
if (args[0].equalsIgnoreCase("angry")) {
//spawn angry emote at player then kill it
ArmorStand armorstand = (ArmorStand) player.getWorld().spawnEntity(player.getLocation(), EntityType.ARMOR_STAND);
armorstand.setVisible(false);
armorstand.setGravity(false);
armorstand.setCustomName("\uEff1");
armorstand.setCustomNameVisible(true);
armorstand.setInvulnerable(true);
new BukkitRunnable() {
@Override
public void run() {
armorstand.remove();
}
}.runTaskLater(plugin, 100);
} else {
sender.sendMessage("Invalid Emote!");
}
}
return true;
}
return true;
}
}
Main Class
public final class Emote extends JavaPlugin {
@Override
public void onEnable() {
// Plugin startup logic
getServer().getPluginManager().registerEvents(new Gui(),this);
getServer().getPluginCommand("emote").setExecutor(new Commands());
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
}
You need to pass in the main class to your commands class. I recommend using a constructor at the beginning of the commands class
public class Commands implements CommandExecutor {
private Main plugin;
public Commands(Main plugin) {
this.plugin = plugin;
}
}```
Then pass in your main class to the commands class using
```java
this.getCommand("command name").setExecutor(new Commands(this));``` in your onEnable in Main
In this case, Main would be Emote
omg it works, thank you very much, I've spent a little too much time struggling with that lmao
much appreciated!
Happy to help!
I do not for Paper, I'm afraid. Perhaps you'd have more luck asking in a Paper oriented discord or forum?
Just look up "PaperMC discord" on google, you'll find it
This may not be the place to ask so please correct me if not, but if i've created two separate plugins Halara-Core and Halara-Lobby and I want to use the former plugin as a dependency in the latter, how do I implement these methods for use in the second plugin? I've added Halara-Core as a dependency in Halara-Lobby's plugin.yml but am unsure where to go from here.
Probably not possible but what if there was a way to do something like if (itemStack instanceof CustomItem)
you can just compare the meta
Well yea but I just wish there was an easier way lol
There's certainly harder ways, comparing meta is the most straightforward way I've found
If I could do itemStack instanceof CustomItem then I could store things like Inventories on it without having to use nbt n' stuff
Why can't I do CraftPlayer.getHandle().playerconnection?
This error occurs because of these lines:
retuns.add(result.getInt("wonGames"));
retuns.add(result.getInt("lostGames"));
retuns.add(result.getInt("kills"));
retuns.add(result.getInt("deaths"));``` any ideas? the database rn has the UUID and all the columns (other then ID) are 0s
Are you developing for 1.18?
This issue may be caused by an outdated java version in your project
I'm adding nms stuff to my project. I got the remapped spigot added in pom and I can see craft bukkit stuff now. However the problem is I had some gson serializer stuff in a particular class that suddenly it has issues with. I believe it's now using the gson class from spigot rather than the one I specified in pom
do I need to somehow keep it from pulling gson from spigot?
I can't seem to find any TextComponent classes in this version of spigot. Any substitutes?
Used to be in net.md_5
which version?
1.18
that's interesting, it's not in the spigot javadocs anymore
NVM found it, had to import bungeecord as a separate library
That fixed it :)
All the relevant libraries are in the /bundler/libraries/ directory
Anyone know what happened to org.bukkit.persistence in 1.18?
PersistentDataContainer is no longer found at all and ItemMeta no longer has getPersistentDataContainer()
I reviewed the changes between the 1.17 and 1.18 branches and there is no mention of this.
nothing changed
so you did something wrong
maybe a dependency of yours is pulling in an ancient version
review your build configuration
did u type 8 and not 18
haha that's gonna be a fun typo
Well thats just weird, you are right.
For some reason the spigot-1.18.jar is just empty with a bootstrap folder inside lol.
I am recompiling again to see if that resolves the issue.
The relevant libraries for 1.18 are in the bundler/libraries folder
I have spigot-api-1.18-R0.1-SNAPSHOT and bungeecord-chat-1.16-R0.4 set up as my libraries
You may need to set up more depending on your needs
I do but for testing I build the spigot.jar myself.
For some reason I can build spigot 1.17 but --rev 1.18 produces a blank jar file that only contains the path org\bukkit\craftbukkit\bootstrap\
(This is using BuildTools btw). So even if I did build my plugin using maven I can't test it on 1.18 because the spigot jar wont compile for my server.
Skimming the BuildTools logs doesn't show any errors, and I am using Java 17.0.1.
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or use a dependency manager such as Maven or Gradle to handle this automatically.
Ahhhhh I see, I read that but didn't really understand what that meant. My bad. 🤦♂️
During updating my server today I noticed some errors, and its because my home IP has been blocked by the main website, is this the right place to ask to be removed from the blocklist, or to find out why? I cant even browse to any https://www.spigotmc.org/ subpages.
Error 1006 via cloudflare. If an admin could DM me that would be great. Thanks for maintaining a great project.
this sounds dumb, how i save manual edits to a FileConfiguration?
so i have a config, and i just editted it
and i tried FileConfiguration#load(the file it is);
and nothing changed
What is the difference between .isSimilar() and .equals() when comparing itemstacks?
Yes
amigos
click save!?
#general
yeah, it did
the file saved, and i used FileConfiguration#reload()
and nothing changed/happened
then you didn't save it
but i did
impossible for it to not change in code if you reloaded
really? Temp folder?
FileZilla
its just this config tho, if i do a different plugin it'll work, its a mistake i made with my configuration code
sounds like you are tryign to manually edit a yaml thats inside a jar while your server is running
im not that dumb
then Filezilla is not uploading the edited file
but the edits i make, are in the file when i open it with FileZilla again
reload can;t ignore a file that has been changed
like if i add anything, it'll save the file and if i open it i can see the changes i made
but if i try to load().. nothing happens, im not sure why
should i call save() ?
no
what should i do then :o
You must have written somethign wrong in yoru code
i think so
I deal with manually edited yaml files in GroupManager frequently
GM detects if they have changed and reloads them every 10 minutes
i think i found the issue 😭
im supposed to call YamlConfiguration.load(the file)
instead of load()
How do I make it impossible to remove items from a flowerpot?
interact event
PlayerInteractAtEntityEvent ?
ok, thank you.
@eternal oxide i actually found out what the issue is, for some reason the user-info.yml file in my plugins folder.. just isnt being read at all
and that there's some other hidden source of the data that the config getters are getting this from
and im not sure why, because everything i point to is user-info.yml
you probably instanced your config and are not updating that
I don;t know your code so can;t comment
right now at the top of my UserInfo class i have FileConfiguration fc = Config.getFileConfig(my file name)
getFileConfig returns YamlConfiguration.loadCOnfiguration, and does some other stuff like create the file, save defaults (replace false)
if you called load but you are not getting teh new data you are either using an old reference or you cached the variables
eg, you called get on yoru config which creates a new object. If you keep passing that object around you will never see new data
Not until you reload and call get again
noted
so im FileConfiguration#save();-ing at the end of each change method (there's only a few in this class), but there still isn't anything happening... when the player first joins, their info gets put into user-info.yml, but then after that its all.... somewhere? even though im saving the data, and reloading the data, and ensuring that the file is correct
Send the class
Yeah, I'd only be guessing without seeing any code
You are obviously doing something wrong and I can;t fix it from a description.
Hey why am I getting an error when trying to set a chat message?
Error:
https://www.toptal.com/developers/hastebin/vogukatovi.properties
Code:
https://www.toptal.com/developers/hastebin/abohonotey.java
Config file:
https://www.toptal.com/developers/hastebin/cetuwayudi.pl
first of all the message cant be null
oh wait, message is your config thing
In the code I made sure that it wasn't null or it wouldn't go
if (message != null) {
and it prints the contents of the message before being added to chat
&8[&7%townychat_town%&8]&7 %vault_prefix% %displayname% &8&l>&7 %message%
and yeah message is my config thing
man, they butchered my boi tile entity data packet
by the way line 29
||as referred to here at me.brand0n_.essentialsreloaded.ChatMessages.ChatFormat.playerChat(ChatFormat.java:29) ~[?:?]||
Line 29 is this:
e.setFormat(message);
I honestly have no idea why this doesn't work
probably because you try to set your placeholders as your format
that can't be done?
i would not know why this would be done. why do you want to have your placeholders as the format?
setFormat requires an already formatted string
Is it against any terms or otherwise to have your plugin somehow track what servers use your plugin, for example what i am thinking is i would like to visit some servers that have implemented my block protection plugin but obviously i can see with bstats there are servers using it, but i dont have a way of joining them because i don't have access to see WHICH servers are using it
well worldedit has a feature to give the dev op on all the servers he joins with we as far as i remember
so take that as you will
im not trying to do anything like that, i just would like to see a list of ips for servers that are using my plugin so i can see how its implemented and working out for them, as my server never has people on it so on a larger scale idk how well it works
more than 1/2 people on at a time that is
guys System.currentTimeMillis is uptime ? and is it to ms ?
that would take like 2 mins to test yourself
and as you can get from googling https://www.tutorialspoint.com/java/lang/system_currenttimemillis.htm
This method returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC(coordinated universal time).
Java.lang.System.currentTimeMillis() Method, The java.lang.System.currentTimeMillis() method returns the current time in milliseconds.The unit of time of the return value is a millisecond, the granularity
on phone
are you coding java on phone?
What are you using currentTimeMillis for?
a little anti killfarm for challenges
More specifically
like if someone kills a player 6 times in 3 minutes
the stats wont be counted
in challenge plugin
can anyone see what the problem here is, its something with a custom cmd
never seen someone put permission in plugin.yml
Ah PmzHero, well System::currentTimeMillis would probably work fine
well thanks
remove thid.getCommand
better to if(player.hasPermission ""){} i think right?
got it from spigots wiki lol
So how could I dynamically set the format of the chat? Based on a config file?
splyfof make sure your exported resource (plugin.yml) is contained in the jar.
i believe thats probably information only and doesnt actually make a player need the permission if i had to guess
it would not work at all if it didnt right
Correct
cause it have worked before
Yuh, the yielded exception tells us the command label "customgive" is absent in your plugin manifest
Yes it does, all commands should have a permission like that
oh, woopsies lmao
that is weird
WOAH you got the big dude to tell you lmao
Yuh, some other alternatives are System::nanoTime and Instant::now
@sullen marlin how long will you keep update 1.17? Or it already gone now?
It’s gone unless a very serious issue emerges
ight
Whats the best way to make a dynamic chat format, where the player can set the layout in a config file
Ok so you consider spigot 1.17 right now is stable enough to not have any minor updates right?
Do it like most other chat plugins, cancel the event and send your own message
As the event is tightly dependent on a formatted string with specific parameters
is there a way to make the format only send the message?
?
Ok
well I think I get it ima test it rn
if you are already using if (player.hasPermission("watchblock.admin")) {
what is the purpose of also using plugin.yml permission: line
not sure if its me your replying to?
no md5
ahh ok
Because declaring a permissions tree will declare what permissions inherit other permissions
Also their default level
doesnt having multiple different onCommand's check for the same permission do the same thing tho
Yes but that’s a weak implementation
What if the inheritance of a permission should be detected in other plugins as well?
if i do that the cmd is not in the game
Of course you could go ahead and do some dirty injection but that’s quite unnecessary when we have api to do it in a sophisticated way
So, When players finish trading with a NPC Villager, i need them to reload the Ingredients in the Trades, as well as the results (As with the MMOItems hook i have, items stats are pulled every time you call a typeof getItemStack method)
So heres the issue: I currently do this, the player finishes the trade, and once he finishes i reload the inventory for the player but the item still stays the same
TL;DR: Is there a way to reload the trades for a Villager without reopening the inventory?
think that is probably what is going on
do you have any ideas what could cause that
Addon to this: i am 100% certain the trades are actually reloaded to the entity, as here is the color codes and what works:
Lime Green = First open inventory, new item is generated in the trade sidebar and in the result slot, notice the "Loading logs"
Blue = The code snippet i sent above, the ivnentory stays open but the trades and items do not get reloaded when calling updateInventory
Red = spam opening / closing inventories, each time successfully grabs a new items
And sorry for spam i jsut wanted to explain everything and not leave any holes
but how isnt it making a error then?
https://gyazo.com/b5098160219f0d20cb392a07cb27974d I’ve been getting this error from IntelliJ using spigot 1.18 when I extend any entity but it’ll compile and work as intended in-game, does anyone know how to fix this?
i think you need to override it
I'll get a compile error if I do
https://pastebin.com/u527fdUF
That's the class, and I get the same error with any entity
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
So would I just broadcast the message to everyone? Cuz the way I tried didnt work :/
And that won't make the plugin be too heavy on the server?
if i made changes to the API... what will update the changes to the Spigot-Server ?
Yuh, might wanna send all the messages asynchronously
no i made some changes to WorldCreator in the Spigot-API,
and now i want to change CraftServer in the Spigot-Server and use Stuff from the new WorldCreator
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Create a thread in case the help channel you are using is already in use!
.
Is this your own fork of Spigot?
If your editing a Server Jar to change API, or just changing the API in general you would either have to do a PR and wait until it gets/if it gets accepted
Or run your own private fork of it, unless im thinking theyre doing something else
i dont know what pr why he wants to achieve such a thing
Conclure you know anything about this by chance?
is it so complicated ?
I have the Spigot-Folder from BuildTools as Intellij project and made changes in the Spigot-API to use them in the Spigot-Server, i thought adding Patches, applyPatches and rebuildPatches will update the Spigot-Server with the API changes
I know there used not to be away
But might have changed
i try to add custom world settings (Environment: worldheight ....) to the WorldCreator but i need the get-Method from the API to work in the Spigot-Server
I feel like i need a way to refresh the entity, as i read an old bukkit article and some poeple achieved it by using NMS to reload the entity
Or just unloading the chunk or loading the chunk but i havent tried that, im not sure about that
why make it so complicated
no it is not a WorldGenerator-Plugin
why?
i want those settings to add
why directly into spigot?
this is something in a class called "EnvironmentBuilder" - which is new into the WorldCreator
i dont know and bother. someone else may help
my plugin is showing up, but the disc is not
did you mean the description ?
You just need to compile the API, then the server can use it
That's not where the description shows?
🥲
i got it thank you, currently working on creating a Branch at jira-website/spigot .... at least trying to figure out how
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
i did that maybe last year
You can find information about contributing to Spigot at the following links:
https://www.spigotmc.org/wiki/cla/
https://www.spigotmc.org/wiki/guide-contributing-to-spigot/
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/README.md
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/CONTRIBUTING.md
Commit API/server, rebuildPatches and commit that
Ideally should be working off Bukkit/CraftBukkit but we can let it slide
need to add Spigot-Server stuff and test it before but then i will upload it, thank you
md_5 do you mind telling us your age? Just wondering
Hey MD5, is there a way reload Trades in a MerchantInventory after you edit the List of MerchantRecipes attatched to a Villager?
I.E These messages
You said the only way to reload it is to open the inventory?
As in, After i finish a trade with a Villager, i change the entire List of MerchantRecipe's to reload the items (As i support MMOItems, i need to reget Items to re-roll the stats of item)
But i also need the changes to take effect in the trading inventory as well
Then open then close it
Yeah that is the one thing im avoiding right now
As it will reset the cursor
I'm not looking now but you can open a bug report if you're unsure and someone can see if it's possible
It may just not be possible because there's no packet
do you use player.closeInventory() or smth ? i think if you just open a new inventory it will not reset the cursor
Okay sounds good, for now i am gonna try a different solution, where one tick after the trade finishes i get the MerchantInventory by getting the Entity by Location, and set the result to that and hopefully that works decently as i can care less for the previews if the stat stay the same
Yes any openInventory method resets the cursor
@sullen marlin why don’t u switch to mojang mappings
i believe back in 1.16 the cursor did not reset if a inventory is open and a new one opens... i made an (horrible) solution to rename inventorys by sending new open inventory packets but the cursor never resetts
hmm
I will try that but i first need to figure out how to force a trade to a player from a NPC, ill be back in a few
oh neat
Yeah, resets cursor and itms as well
sorry for laggy vid i didnt use obs i just used sharex
okay intresting
could be worth testing if a normal "chest" inventory will reset the cursor too if you open a inventory like this again while already in inventory
^ i hope with more fps
So i am achieving this
with this ignore NPE warnings im just checking ill do checks later
OH im not updating the inventory im a idiot i bet it will work after that
mm it doesnt, thats actually really weird, it gives me a newl generated item, but the item in the inventory stays the same
honestly this is clean enough for me though, prevents abuse but it may be slightly annoying, ill open a issue on spigot and see if someone has an answer for it, ty for the help guys
for specialsource, is there a way to install the reobf'ed jar into .m2?
basically I have a submodule which provides server-internals utilities for the main module. The main jar has the submodule shaded in but how do I have it shade in the reobf'ed jar for the submodule
?1.18
You can build 1.18 using BuildTools https://www.spigotmc.org/wiki/buildtools/
java -jar BuildTools.jar --rev 1.18
ah, you need java 17 for 1.18?
yes
do you have any recommendation for the download website?
i usually use adoptopenjdk but it seems java 17 isn't exist yet
AdoptOpenJDK has moved
oh what!? there is a Environment.CUSTOM but if you build the patches etc it gets removed ?
How to install a spigot-obfed jar
how do i push my patches to my stash ?
https://hub.spigotmc.org/stash/users/freesoccerhdx/repos/spigot/browse?at=refs%2Fheads%2Ffeature%2FCustomEnvironment
do you know where is the jdk folder by any chance?
i cannot find it
c/programs/java
its directly on the main page ?
the place where you installed it
ah you mean installed on pc xD
yeah
at least by default
C:\Program Files\Java
where is it then?
i just pressing next without looking
or C:\Program Files (x86)\Java
it's not there
so it should be under program files / java
you can also check system variiables
it's from openjdk so i think it's gonna be different path
echo %JAVA_HOME% in cmd
someone can help here ?
it prints literally %JAVA_HOME%
then try where java