Tail

Log for #paper-dev on EsperNet - 2021/10/26

Topic -- Topic: Paper plugin/server development channel | Source: https://github.com/PaperMC/Paper/ | Maven: https://papermc.io/repo/repository/maven-public/ | Download: https://papermc.io/downloads
Topic -- Topic set on November 7, 2020 11:20:23 pm by kashike
00:01:32 DiscordBot <a​sp​wi​l> This? https://github.com/aikar/commands
00:06:51 DiscordBot <a​sp​wi​l> Welp ill try just doing it manualy and if i cant ill switch alough i will have to rerwite some of the commands.
00:09:45 DiscordBot <a​sp​wi​l> Cause right now ijust have all the commands handdled under the onCommand call
00:10:36 DiscordBot Reply to "phoenix616: also calling an update on the block behind the button might work"
00:10:38 DiscordBot <b​an​tu​er​fe​i> haha this is what I did with my nms solution
00:10:52 DiscordBot Reply to "gecko10000: question is, do you want the button to press itself, or do you want to force a player to ..."
00:10:53 DiscordBot <b​an​tu​er​fe​i> press itself, it doesn't really matter to be honest
00:11:09 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> What was the one that was an API on top of brigadier but for Spigot/Paper/etc still did execution through the normal API?
00:11:13 DiscordBot Reply to "b​an​tu​er​fe​i: haha this is what I did with my nms solution"
00:11:14 DiscordBot <b​an​tu​er​fe​i> I just didn't think it was that valid, seemed kinda scuffed yk? or nah?
00:11:57 DiscordBot Reply to "Amaranth (he/him): What was the one that was an API on top of brigadier but for Spigot/Paper/etc still did e..."
00:11:58 DiscordBot <j​mp​> you're probably thinking of cloud
00:12:01 DiscordBot <j​mp​> acf can technically do that too though
00:12:07 DiscordBot <j​mp​> it's brig integration is just much more primitive
00:13:00 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> acf seems much more generic than that, it probably does everything itself and then tries to integrate later
00:13:11 DiscordBot <j​mp​> cloud does too
00:13:19 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> Hmm, probably not cloud then?
00:13:22 DiscordBot <j​mp​> it's just much better integrated
00:13:38 DiscordBot <j​mp​> on bukkit/spigot it'll work as you described
00:13:53 DiscordBot <j​mp​> on velocity/fabric it parses with brig and then with cloud
00:13:59 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> One of these things I got the impression it was mostly just a brig helper library but for compatibility moved execution to the Bukkit API when running outside of Forge/Fabric/etc
00:14:24 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> I guess it might have been cloud
00:14:29 DiscordBot <j​mp​> I haven't seen anything doing that
00:14:37 DiscordBot <j​mp​> most of the "brig wrappers" for bukkit are just internals hacks
00:14:50 DiscordBot <j​mp​> they shove your commands on the vanilla dispatcher and give you a minecraft: namespace
00:16:57 DiscordBot <j​mp​> It is something you could do though
00:17:06 DiscordBot Reply to "bantuerfei: press itself, it doesn't really matter to be honest"
00:17:08 DiscordBot <g​ec​ko​10​00​0> looks like ButtonBlock has a press method
00:19:10 DiscordBot <g​ec​ko​10​00​0> and it extends FaceAttachedHorizontalDirectionalBlock which extends HorizontalDirectionalBlock which extends Block
00:21:07 DiscordBot Reply to "gecko10000: looks like ButtonBlock has a press method"
00:21:08 DiscordBot <b​an​tu​er​fe​i> :O I think I saw that too, but didn't know how to call it, I'll try using the path you said, ty
00:25:12 DiscordBot <c​hu​ck​yc​he​es​e> @Spottedleaf (🌯 x128) thanks for the region file chunk recalculate, you really saved my ass lol
00:36:40 DiscordBot <b​ra​yj​am​in​> Hello
00:37:23 DiscordBot <b​ra​yj​am​in​> In my application I have to fetch a UUID from Mojang's API
00:37:37 DiscordBot <b​ra​yj​am​in​> But the UUID is in its shortened format
00:38:19 DiscordBot <b​ra​yj​am​in​> In order to get the player, I can use getOfflinePlayer(string shortUuid)
00:38:26 DiscordBot <b​ra​yj​am​in​> however it's slow af
00:38:54 DiscordBot <b​ra​yj​am​in​> It would be a lot faster if I could just UUID.fromString(shortUuid), but it only accepts the "long uuid"
00:39:33 DiscordBot <b​ra​yj​am​in​> should i just use some string manipulation or is there a better method?
01:00:58 DiscordBot <g​ec​ko​10​00​0> how do you shorten it?
01:01:30 DiscordBot <g​ec​ko​10​00​0> remove the dashes?
01:01:36 DiscordBot <S​he​vc​h> Probably a dashless string. Just insert the dashes where needed.
01:02:34 DiscordBot <b​ra​yj​am​in​> yeah
01:02:38 DiscordBot <b​ra​yj​am​in​> i just used substring
01:03:00 DiscordBot <g​ec​ko​10​00​0> (why)
01:04:23 DiscordBot <b​an​tu​er​fe​i> ggnore
01:18:31 DiscordBot <I​nv​in​ci​bl​e> Guys why can't i do this? https://media.discordapp.net/attachments/555462289851940864/902365545880502322/unknown.png
01:18:39 DiscordBot <I​nv​in​ci​bl​e> I installed java 16 already
01:21:30 DiscordBot <M​ac​hi​ne​ M​ak​er​> It doesn’t look like it’s on your PATH
01:22:39 DiscordBot Reply to "Machine Maker: It doesn’t look like it’s on your PATH"
01:22:40 DiscordBot <I​nv​in​ci​bl​e> uhh what? path in environent variable?
01:27:14 DiscordBot <M​ac​hi​ne​ M​ak​er​> Yeah. jar comes with the sdk by default, so it should be on your PATH
01:36:00 DiscordBot Reply to "Machine Maker: Yeah. jar comes with the sdk by default, so it should be on your PATH"
01:36:01 DiscordBot <I​nv​in​ci​bl​e> i reinstalled java 16 but it still not working?
01:43:40 DiscordBot <a​sp​wi​l> its not to bad im now organising the arraylits to be output for tab compleateion with this: java pri... https://paste.gg/p/anonymous/64d10605b084467eb0ec5deb21a84f28
01:45:28 DiscordBot <g​ec​ko​10​00​0> no need to create a new one
01:45:36 DiscordBot <g​ec​ko​10​00​0> can return matchingObjects directly
01:46:06 DiscordBot <a​sp​wi​l> that exists?
01:46:46 DiscordBot <a​sp​wi​l> wait a second
01:47:59 DiscordBot <a​sp​wi​l> it wasnt me to do that cause im using a direct list object list<> instead of an arraylsit
01:48:16 DiscordBot <a​sp​wi​l> hold on let me rework my code
01:51:01 DiscordBot <a​sp​wi​l> yeah im dumb thanks
01:52:06 DiscordBot <g​ec​ko​10​00​0> don't have to return an ArrayList either yea
01:52:38 DiscordBot <a​sp​wi​l> yep lol
02:20:06 DiscordBot Reply to "Machine Maker: Yeah. jar comes with the sdk by default, so it should be on your PATH"
02:20:08 DiscordBot <I​nv​in​ci​bl​e> Why isn't it working i installed maven and git already...
02:20:44 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> you're missing the jar command from your path
02:20:55 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> No idea how you managed to have javac on the path and not the jar command
02:21:41 DiscordBot Reply to "electroniccat[no-ping]: No idea how you managed to have javac on the path and not the jar command"
02:21:42 DiscordBot <I​nv​in​ci​bl​e> what do you mean?
02:21:43 DiscordBot <I​nv​in​ci​bl​e> both of the directory in the path has java? https://media.discordapp.net/attachments/555462289851940864/902381439532822618/unknown.png
02:21:55 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> don't mention
02:21:57 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> Looking for javac and jar, not java
02:22:01 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> I didn't say java, I said jar
02:22:05 DiscordBot <I​nv​in​ci​bl​e> heh
02:22:15 DiscordBot Reply to "electroniccat[no-ping]: don't mention"
02:22:16 DiscordBot <I​nv​in​ci​bl​e> oh sorry.
02:23:29 DiscordBot <M​ac​hi​ne​ M​ak​er​> you are missing quite a few executables
02:23:34 DiscordBot <M​ac​hi​ne​ M​ak​er​> how are you installing java 16?
02:24:04 DiscordBot Reply to "Machine Maker: how are you installing java 16?"
02:24:05 DiscordBot <I​nv​in​ci​bl​e> Directly from oracle?
02:24:56 DiscordBot Forwarded command from M​ac​hi​ne​ M​ak​er​
02:24:58 DiscordBot .java16
02:25:13 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> Looks like you didn't get the JDK
02:25:42 DiscordBot <M​ac​hi​ne​ M​ak​er​> oh does that only show how to get the JRE?
02:26:20 DiscordBot <s​ul​u> it varries by which section
02:26:53 DiscordBot <I​nv​in​ci​bl​e> ok guys
02:26:54 DiscordBot <I​nv​in​ci​bl​e> i just
02:26:55 DiscordBot <M​ac​hi​ne​ M​ak​er​> well either way, you are not installing java for development correctly
02:27:00 DiscordBot <I​nv​in​ci​bl​e> put the bin folder
02:27:01 DiscordBot <I​nv​in​ci​bl​e> in the path
02:27:02 DiscordBot <I​nv​in​ci​bl​e> and work
02:27:14 DiscordBot <M​ac​hi​ne​ M​ak​er​> what folder did you just post screenshots of?
02:27:15 DiscordBot <I​nv​in​ci​bl​e> sometimes i do something randomly and it works 😂
02:27:18 DiscordBot Reply to "Machine Maker: what folder did you just post screenshots of?"
02:27:20 DiscordBot <I​nv​in​ci​bl​e> that is
02:27:21 DiscordBot <I​nv​in​ci​bl​e> idk
02:27:25 DiscordBot <I​nv​in​ci​bl​e> i saw it in the path
02:27:44 DiscordBot <I​nv​in​ci​bl​e> here
02:27:50 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> I think the jshell one is JRE8 and the other is JRE16?
02:27:54 DiscordBot <I​nv​in​ci​bl​e> now then i just add this https://media.discordapp.net/attachments/555462289851940864/902383003685253270/unknown.png
02:27:57 DiscordBot <I​nv​in​ci​bl​e> and work.
02:27:58 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> Still weird the JDK binaries aren't there...
02:28:06 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> Oh, you apparently have 3 java installs
02:28:11 DiscordBot Reply to "Amaranth (he/him): Oh, you apparently have 3 java installs"
02:28:12 DiscordBot <I​nv​in​ci​bl​e> 2
02:28:27 DiscordBot <I​nv​in​ci​bl​e> but ok anyways thanks guy for helping me
02:28:29 DiscordBot <M​ac​hi​ne​ M​ak​er​> well I think 3 based on those last 2 pictures
02:28:44 DiscordBot <A​ma​ra​nt​h ​(h​e/​hi​m)​> Does the JRE install 2 copies of itself, one for x86 and one for amd64?
02:28:45 DiscordBot Reply to "Machine Maker: well I think 3 based on those last 2 pictures"
02:28:46 DiscordBot <I​nv​in​ci​bl​e> nope, or maybe let me check it
02:28:53 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> javapath is the thin wrapper craps for the jre/jdk
02:29:00 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> the windows installer fucks that shit up all the time
02:29:55 DiscordBot <I​nv​in​ci​bl​e> there is another 2 java which isn't a public program for others but a private java for a app, so i dont think it count, the app's dev already said it isn't avaible to other app.
02:30:19 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> you have at least the common junk from a 32 bit java install sitting around
02:37:22 DiscordBot <I​nv​in​ci​bl​e> just ask, do we need to run a buildtools first to run the git bash in the paper folder?
02:38:12 DiscordBot <I​nv​in​ci​bl​e> da hek why this doesnt contain the git file the readme already stated that it should work? https://media.discordapp.net/attachments/555462289851940864/902385596700446770/unknown.png
02:46:04 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> the first step is to clone the repo
02:56:00 DiscordBot <a​sp​wi​l> Now that im home i can test the tab compleater
02:59:08 DiscordBot <a​sp​wi​l> And see how horibly i failed at making it work
03:24:21 DiscordBot <I​nv​in​ci​bl​e> weirdo
03:48:27 DiscordBot <A​rb​ee​ K​lo​n> Is there an easy way to add the enchantment glint to ANY item without enchanting it?
03:50:53 DiscordBot <M​ac​hi​ne​ M​ak​er​> No.
03:51:26 DiscordBot <M​ac​hi​ne​ M​ak​er​> The client only applies the glint if the item’s enchantments nbt tag isn’t empty.
03:51:54 DiscordBot <M​ac​hi​ne​ M​ak​er​> It can just be an empty compound tag with no enchants in it, and it’ll apply the glint, but there’s no API way to do that
03:52:31 DiscordBot <A​rb​ee​ K​lo​n> But it would be possible if Id do the work and write my own method for it?
03:52:56 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> You'd basically add a fake empty nbt compound into the enchantments list
03:53:36 DiscordBot <M​ac​hi​ne​ M​ak​er​> Which is doable, I forget how that interacts with other things, craftbukkit might remove that when it creates an item meta and the re-applies that meta
03:53:47 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> the Unsafe modifyItemstack should let you do it from the API, you'd just need to sus what the mojangson is for it
03:54:07 DiscordBot <A​rb​ee​ K​lo​n> Hmmm... Im thinking that there might be an easier way by just hiding the enchants... But all I found about that was for 1.8 and I dont think that works anymore, does it?
03:54:47 DiscordBot <M​al​fr​ad​or​> look at the ItemFlags, you can hide them with that
03:56:17 DiscordBot <A​rb​ee​ K​lo​n> Do I use the addEnchantment method of the item or the addEnchant of the itemMeta to add it?
03:57:12 DiscordBot <g​ec​ko​10​00​0> the first just calls the second
03:57:20 DiscordBot <A​rb​ee​ K​lo​n> Oh lol
03:58:28 DiscordBot <A​rb​ee​ K​lo​n> Hmm... The item doesnt glint and I dont get any errors o.O
04:25:42 DiscordBot <A​rb​ee​ K​lo​n> Oh... Am stupid lol
04:41:29 DiscordBot <i​tx​fr​os​ty​> Hello guys! I'm having an issue with connecting to a SQL database. The error: https://pastebin.com/XzxAMstH, it say's Caused by: java.net.UnknownHostException: null but the host is not null. This same exact code is working on spigot but not paper. https://pastebin.com/3ZJVNPFJ
04:42:14 DiscordBot <i​tx​fr​os​ty​> Line 76 is 7
04:43:44 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> print the host field
04:43:50 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> sounds like a null got in there
04:44:49 DiscordBot <i​tx​fr​os​ty​> Ok
04:46:16 DiscordBot <i​tx​fr​os​ty​> Fixed the null issue, I'm back to the same issue I had yesterday.
04:46:20 DiscordBot <i​tx​fr​os​ty​> Caused by: java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
04:46:48 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> print out the full jdbc string
04:47:02 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> https://stackoverflow.com/questions/15105357/address-is-invalid-on-local-machine-on-windows-8-only
04:47:10 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> er, maybe test that?
04:47:18 DiscordBot <i​tx​fr​os​ty​> I will try taht
04:53:31 DiscordBot <i​tx​fr​os​ty​> Wow found the issue. For whatever reason, They were all null.
04:54:10 DiscordBot <T​he​Am​az​in​gZ​ot​e> Anyone know a good way of knowing the right side of any entity? Thank you
05:02:21 <-- Spottedleaf (Spottedleaf!~Spottedle@node-1w7jr9qsskta8jrddtzc42bnn.ipv6.telus.net) has quit (Ping timeout: 192 seconds)
05:07:47 DiscordBot <T​he​Sh​er​ma​nT​an​ke​r> what d'ya mean by right side?
05:07:55 DiscordBot <T​he​Sh​er​ma​nT​an​ke​r> the block to the right of the entity?
05:10:44 DiscordBot <T​he​Am​az​in​gZ​ot​e> Yeah, exactly
05:13:51 DiscordBot <T​he​Am​az​in​gZ​ot​e> I guess I can hardcode it :thonk: https://cdn.discordapp.com/emojis/463842968097521675.png
05:29:58 DiscordBot <a​sp​wi​l> Is it possible,to add soctom enchats to items? Lime in the actual enchant nbt data section? And have it be rendederd into the lore automaticaly
05:30:25 DiscordBot <a​sp​wi​l> Or does the nbt enchant section only accept valid vanilla envhants
05:43:56 DiscordBot <a​sp​wi​l> anyone know what could be causing this? https://media.discordapp.net/attachments/555462289851940864/902432336598159391/unknown.png
05:44:57 DiscordBot <a​sp​wi​l> public static void main(String args[]){ for(Enchantment e : Enchantment.values()){ ... https://paste.gg/p/anonymous/50806071773b4f6b93e6461ae4b21993
05:45:23 DiscordBot <l​yn​xp​la​y> I mean, running your plugin as a standalone java application would require your plugin to contain the spigot classes
05:46:07 DiscordBot <l​yn​xp​la​y> Which it doesn't hopefully as you define spigot as provided/compileOnly
05:46:58 DiscordBot <a​sp​wi​l> im just trying to print out the internal names of all the enchantments.
05:47:06 DiscordBot Reply to "aspwil: Is it possible,to add soctom enchats to items? Lime in the actual enchant nbt data sectio..."
05:47:08 DiscordBot <m​an​ya​> Well, enchantmens in nbt are just strings, however you'd have to render those enchants on lore manually
05:47:30 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> > just
05:47:43 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> You'd need to create a run task which includes all of the provided classpath, etc
05:48:06 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> But, I mean, shit like that, just slap it in onEnable of your plugin or some skimpy test plugin you use for the 2 second cruds like that
05:48:26 DiscordBot <a​sp​wi​l> like just as a one off thing? do i need to build a plugin just to print the names?
05:48:45 DiscordBot <a​sp​wi​l> im just trying to get the raw data
05:48:48 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> I mean, easiest method to deal with all of the bootstrapping, etc
05:48:53 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> You keep using that word
05:48:55 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> > just
05:49:23 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> as said, you'll need to run your thing making sure that it includes the api in the classpath
05:49:39 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> but, as I said, "just" is not a simple concept with how a lot of stuff actually works in the server software
05:50:33 DiscordBot <e​le​ct​ro​ni​cc​at​[n​o-​pi​ng​]> Like, many things rely on data in the server bootstrapping itself, this might not be one of those cases, no idea, but, I mean, having a little test plugin project to shove all the stupid stuff in there you might wanna test over time, just as like a plugin scratchpad more or less
05:51:28 DiscordBot <a​sp​wi​l> welp guess thats what ill be doing lol
05:54:22 DiscordBot <a​sp​wi​l> ... well then [Enchantment[minecraft:fire_protection, PROTECTION_FIRE], Enchantment[minecraft:sharp... https://paste.gg/p/anonymous/a995d274117a4e15811701e8863bed8d