#dev-general
1 messages · Page 620 of 1
fluent?
functional
but stuff like builders, streams, etc are fluent APIs
oh I just think of streams and functional
it's sick
can do similar things with python, just not as nice
i been implementing those a little bit in my work
return format.parts().stream()
.map(part -> PlaceholderAPI.setPlaceholders(player, part))
.map(part -> PlaceholderAPI.setRelationalPlaceholders(player, recipient, part))
.map(part -> replaceRecipientPlaceholder(recipient, part))
.map(part -> MessageUtils.parseToMiniMessage(part,
Placeholder.component("message", !player.hasPermission(URL_PERMISSION)
? message
: message.asComponent().replaceText(URL_REPLACER_CONFIG))))
.collect(Component.toComponent());```
look at this shit
i love it
also wtf is list.get(), I don't like .get calls, they're always up to bad things 🥲
aghhh that ternary operator
!player.hasPermission(URL_PERMISSION)
? message
: message.asComponent().replaceText(URL_REPLACER_CONFIG)
surely this can be calculated only once before the entire stream
yes to both lol
yeah i didn't know either
🥲
Does anybody have any ideas for ChatChat's cross server messaging? The way it's designed now from my POV it doesn't look like it's easily hookable with networking software considering objects that would need to be sent across aren't exactly serializable because they extend adventure audiences
The only thing I can think of is using a middle-man (redis or bungee proxy) to store who's currently subscribed to a channel and redesign the audience + channel part to align with that
I’m working on a pr
We’re first planning to extract a common/shared module, then a pr for velocity respectively bungeecord is planned, by default just plugin messaging will be used, although I am considering adding support for mqs like active, rabbit, kafka and redis, perhaps even just a duct taped server socket
mmm message queues
Yeye good stuff
im a rabbitmq addict myself

Joey ʳᵇ 𓆩♡𓆪 •̩̩͙*˚#6969 is soooooo hot and he blocked me tell him to un block me
Joey ʳᵇ 𓆩♡𓆪 •̩̩͙*˚#6969 is soooooo hot and he blocked me tell him to un block me
How dare he block you!
he is sooooooo hot
we use rabbitmq at work it’s pretty sick
How would you address the actual issue of channel adventure audiences over the network?
nerds
I mean we might not even use the audience abstraction for the mq layer
But perhaps some sort adapter which adapts to it if necessary
hurrah!
Is there any documentation of adventure translatables?
are those the vanilla translatable values?
Guys does anyone of you know a solution / a plugin to disable swimming with armor?
if(Player.isSwimming()) {
dont();
}
Lol jk, check player toggle swim event and cancel it.
imagine how good it would be if there was a dont method
id love to work that into a class one day
is there a way to automatically build gradle projects (in this case a plugin) with different dependency versions?
I want to specify different paper versions and see if there are any issues when building them upon it.
Is that the github ide thing?
that looks like vsc
but the Idea icon
🥴
Github's web editor is pretty much vsc
Has anyone used fleet yet
isn't it still in closed preview?
it is
A bit of arithmetical question….how do we calculate average block mined by a player a day?
blocks mined / time played? idk
Time played would be weird for that 😅
Well, is it based on the player's time or the server? I presume server?
Add total blocks and divide by total days
I would say server…we are planning to do the data reset every day
Let me think of that approach
Well that’s the actual equation
Yep…gotcha
Well if it's reset everyday simply just count the amount for that day.
There's no real equation for it.
Yeah…same as what MasteroftheFish said…i might go for that
If you had multiple days between the resets use @sweet cipher's approach to find it across multiple days.
They said the average though
They said "we are planning to do the data reset every day" though.
There's no point to divide it by /1
Don’t they want the average amount of blocks per day?
They mentioned **I would say server…we are planning to do the data reset every day
**
I presume they have a table of the blocks counted, and they are just resetting it every 24h instead of just letting it increase and divide it by x days the server is running.
It wouldn’t make sense to get the average of a single data point
That would be odd
It isn’t… what i meant is the data of player mined blocks to be resetted everyday
Anyway i got an idea, whats to be done thank u @dawn island @sweet cipher
Also i might switch to player prespective too..like instead of servers… no of days a player played
I designed a solution to ChatChat's abstraction problem with channels/audiences which would work
have u tested it?
It's not testable it's just a design
It uses the actor/adapter/backend paradigm which isn't real but it's a combination
ok nice
that's not really how chatchat is designed to work but interesting
How is it designed to work?
In its current state, there isn't a clean way to send data like channel messages over networks
from what I understand many, many things will change from "its current state" until it's released
I wouldn't take anything for granted 🤷
It's WIP for a reason
In addition to what Emily said it was also stated that bungee support is planned.
that's exactly why im presenting some ideas
it supports bungee/velocity/any networking solution
Only if you hook into some service that provides pigeons for a reasonable price
but anyways, if that's not 'how its designed to work' then how is it designed to work?
my solution doesn't make it work or not work, it's just an idea
the response was that my idea doesn't fit how ChatChat is designed to work
It's something we're still looking into. As mentioned before, everything is still up in the air as we continue to get further into the development process. I'm open to ideas from anyone.
great, and since it's open source i'm interested in helping
👍
is stackoverflow on drugs for you guys too?
Get with the times man, filters are all the rage now 🔥🔥🔥🔥
I was just trying to get some help and got flashbanged...
FILTERS FOR STACKOVERFLOW POG
They aren’t for selfies any more!!🫡🫡
Here is a list of the most valuable NFTs that Silent Program has!
Total Claimed: 19 - Total Value: 520,053.84 
Just wanted to share a little update with you all. While we are still obviously in Alpha and not ready for beta testing yet, one of the things you will be able to beta test is a converter we've been working on to help you transition over to ChatChat from Del... ``` [Jump to message]([#deluxechat message](/guild/164280494874165248/channel/587475621555339264/))
**Added placeholders:**
```css
%essentials_baltop_balance_fixed_<position>%
%essentials_baltop_balance_formatted_<position>%
%essentia... ``` [Jump to message]([#placeholder-api message](/guild/164280494874165248/channel/573429521554866178/))
> - It's a compiler hack - the Java compiler isn't designed to modify code, so it can cause difficult to debug errors, or worse
> - It requires an IDE plugin, so unless you've properly configured Maven, Gradle and your IDE, you'll get hundreds of compilation errors. This proc... ``` [Jump to message]([#development message](/guild/164280494874165248/channel/165129131770511360/))
Here is a list of top NFT traders based on total portfolio worth.
• Total Value: 22,226,076.82 HelpCoins - Total Claimed: 667 NFTs
• Total Value: 3,323,786.78 HelpCoins - Total Claimed: 70 NFTs
• Total Value: 1,044,185.22 HelpCoins - Total Claimed: 34 NFTs
• Total Value: 684,341.00 HelpCoins - Total Claimed: 10 NFTs
• Total Value: 520,053.84 HelpCoins - Total Claimed: 19 NFTs
Is anyone here familiar with modifying server jars? There's this bug with Bukkit that effects Sprinting and it doesn't happen with Vanilla
as in craftbukkit?
why are you using craftbukkit lmao
I'm not, it was just to test the bug
use paper, it fixes a lot of quirks in cb/spigot
It happens with Paper and Spigot etc
oh
It was just to find where it originated from lol
might wanna report that on the spigot issue tracker
sus
it was an easy target i suppose
i wonder if this has actually helped nfts
considering interest in them was rapidly declining earlier this year
How do i start with java
Because i want to make few simple plugins for my server
Intellij gave me cancer again lol
?learn-java
Online Courses:
Online courses are also great for learning java. Some websites that offer them are:
- Coursera - Free unless you want a certificate
- PluralSight - Great courses from what I've seen. Mostly Paid
- Udemy - Never used them myself but they seem to all or at least most be paid.
My first ever course was one from Coursera. - I can say it was pretty good at introducing me to the programming world as a whole not just java.
Oracle Docs:
Oracle docs can help a lot at learning and understanding java:
- Start with this,
- Breeze through this (skipping stuff that doesn't seem relevant like bitwise operators),
- Hit this.
They're the first three from this larger thing which you should definitely go through overall. But those three should be enough for slightly better understanding of what is happening here without feeling like a huge time sink.
That one is a small part of this larger site wherein "Essential Java Classes" and "Collections" also have good useful stuff
Other services:
Some other cool services that will help you learn java are:
As you can see there are plenty of good ways to learn as long as you're willing to invest the time. Have fun learning!
Ermm
This feels so wrong
a
Anyone got any ideas for plugins?
b
Make your own plugin idea generator tada.
i like that idea
machine learning chat filter
already exists
ok and?
there are a trillion chat plugins, half a dozen permission plugins, dozens of "core" plugins
hundreds of trillions of private mines plugins
🥲 🥲 🥲 🥲
r u sure there's a trillion
that number seems a little bit high idk though
yes I counted them all
does that include chatchat
petabytes of storage worth of chat plugins
not yet, it's not released
where does a plugin have to be released to fit the criteria for a "chat plugin"
your yearly questions quota ran out, sorry
when does the next year roll around
you can ask cube for a free question coupon
Liar
it's almost 5
oh
It is 8:50 am actually
emily ur flag is on r/place
also next to hermitcraft
;o
and a bunch of mc heads
but I think hermitcraft is responsible for those
meanwhile the union jack is a bit too complicated for r/australia
oh my god is that supposed to be Vegemite?
yes
top right is the aboriginal flag
kinda nice honestly
with the non centered doot
vegemite?
the flag lol
ah
isnt vegemite ripoff marmite
yes
Granted
a
tbh there is tons of public mine plugins but not that many working private mines ones
Does anyone know if you can edit the chat achievements messages is some plugin, essentials or can you do it by spigot itself?
There should be an option in the spigot.yml to not announce them but I don’t think they’re normally editable
the text is took from client's lang file
{
// ...
"chat.type.advancement.task": "%s has made the advancement %s",
"chat.type.advancement.challenge": "%s has completed the challenge %s",
"chat.type.advancement.goal": "%s has reached the goal %s",
// ...
"advancements.story.form_obsidian.title": "Ice Bucket Challenge",
"advancements.story.form_obsidian.description": "Obtain a block of obsidian",
"advancements.story.iron_tools.title": "Isn't It Iron Pick",
"advancements.story.iron_tools.description": "Upgrade your pickaxe",
"advancements.story.lava_bucket.title": "Hot Stuff",
"advancements.story.lava_bucket.description": "Fill a bucket with lava",
"advancements.story.mine_diamond.title": "Diamonds!",
"advancements.story.mine_diamond.description": "Acquire diamonds",
// ...
}```
There’s definitely a plugin that intercepts it and changes the messages
yeah. maybe
uhm anyone has a numbered chest slots texture pack?
(ya know, it displays the slot number inside mc)
https://wiki.vg/Inventory has some images with the slot #s
hi
does anyone have code to randomly assign teams and balance the number of players on each team
for example if i am to divide 100 players into 6 regions evenly and randomly, how would i go about that
you can try this: ```java
List<Player> players = ...; // player list
Collections.shuffle(players); // shuffle player list
List<Region> regions = ...; // region list
Collections.shuffle(regions); // shuffle region list
int i = 0; // which region to choose (index)
for (Player player : players) {
regions.get(i).addPlayer(player); // not sure how your region player storing method is, but this is an example
i++; // move to next region
if (i == regions.size) {
i = 0; // i has to be between 0 -> regions.size - 1, so reset this to 0 once i is equal to regions.size
}
}
(btw next time plz ask in #development 🙂)
please help do you maybe know how to solv this?
[14:50:45] [Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH ---
[14:50:45] [Watchdog Thread/ERROR]: ------------------------------
[14:50:48] [User Authenticator #3/INFO]: UUID of player kapacittx is 6935545e-76ad-3864-8bf2-9039f9bea753
[14:50:50] [Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH - git-Purpur-1596 (MC: 1.18.2) ---
[14:50:50] [Watchdog Thread/ERROR]: The server has not responded for 15 seconds! Creating thread dump
[14:50:50] [Watchdog Thread/ERROR]: ------------------------------
[14:50:50] [Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Purpur!):
[14:50:50] [Watchdog Thread/ERROR]: Ticking entity: minecraft:player, entity class: net.minecraft.server.level.EntityPlayer
[14:50:50] [Watchdog Thread/ERROR]: Entity status: removed: false, valid: true, alive: true, is passenger: false
[14:50:50] [Watchdog Thread/ERROR]: Entity UUID: 8d91357f-66d3-3552-922d-1d058b848892
[14:50:50] [Watchdog Thread/ERROR]: Position: world: 'world' at location (199.8984291743339, -5.0, 210.4084435660178)
[14:50:50] [Watchdog Thread/ERROR]: Velocity: (0.0, -0.0784000015258789, 0.0) (in blocks per tick)
[14:50:50] [Watchdog Thread/ERROR]: Entity AABB: AABB[199.59842916241297, -5.0, 210.10844355409688] -> [200.19842918625483, -3.200000047683716, 210.70844357793874]
[14:50:50] [Watchdog Thread/ERROR]: Total packets processed on the main thread for all players: 6849
[14:50:50] [Watchdog Thread/ERROR]: ------------------------------
[14:50:50] [Watchdog Thread/ERROR]: Current Thread: Server thread
[14:50:50] [Watchdog Thread/ERROR]: PID: 24 | Suspended: false | Native: false | State: RUNNABLE
[14:50:50] [Watchdog Thread/ERROR]: Stack:
[14:50:50] ... (zbývá 328 KB)```
#minecraft and what happened when it crashed? and might want to send more of the error in https://paste.helpch.at
@oak rose
👀
Link
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
incase wiki.vg doesnt have all inventories
if the filters still exist for whatever reason there was a bar at the bottom that let you disable them
Yeah, not sure why it was on for me by default
I've debugged PlaceholderAPI and it looks like it's coloring my input (& -> §) when I set placeholders. The methods to choose if you want to colorize or not are deprecated. What should I do?
I'm using PlaceholderAPI v2.11.1 (latest)
Its removed in the latest version afaik
My dependency and jar are the latest
Might not have been released officially, try compiling from the repo
That means it can't be deployed anywhere
For now, I guess
I guess I need to make a hacky workaround to uncolor them
Try an alternate color code character
It's not there I'm pretty sure
Works now with
map(part -> part.replace('\u00A7', '&')) // hacky workaround
okay copilot isnt helping me here
anyone know a method to convert a format like 1d 2h 3m 4s into milliseconds
or something to split a number from a string
Here's a example of how I got GitHub copilot to do it although it's only made to support days.
Code: https://paste.helpch.at/duhohiyedi.cs (moved to paste)
It could obviously be improved, or reduced, by implementing more detailed wording so that the AI can understand.
How do we build splash potions on 1.8.8 api?
for eg: i want to create a splash potion of Harming, how to do so?
@primal crystal I believe 1.8.8, you would use the Potion object class to create it, set it to splash and convert it to a item.
Potion potion = new Potion(PotionType.HARMING, 2);
potion.setSplash(true); // there likely is a boolean in the constructor for this.
player.getInventory().addItem(potion.toItemStack(1));
Not sure if the potion type is correct, as I can't test this in a IDE rn.
Thank you..., i will give it a try
Quick question, how impolite is it to tell someone that their code is wack spaghetti and you can't be fucked working on it?
Might even be one of the worst premium plugins code I've ever seen
If you dont tell it that way, it should be good
What would be a nicer way of saying their code wack?
I saw better
is it for a client
or for the developer of said plugin
if the first tell them that the plugin is in such poor condition that the only way you could work on it is by restarting it entirely, then say you don't have the time to do that
if it's the latter
tell them exactly what you said
you need to be at least tier 1
aww
Tier 1 as in chat level?
you're tier 1 now
Wait
you should be able to
What plugin was it?
Wouldn't you like to know weatherboy
Wouldn't you like to know
Yes
weatherboy
We got a memer
Where are your parents?
in my basement
lmao thats gangster
I saw that
where are your parents
Gey ready for a spaking
uhm how could I make a system that basically highlights the name above the player:
- Red if it's from an enemy clan
- Yellow if it's neutral
- Blue if it's allied
- Green from the same clan
I thought on just using PAPI and TAB but then I remembered it needs to be adaptive to every player since players are in different clans and see different things
I would probably have to use packets for this I suppose?
papi has a thing called RelationPlaceholders
I will give you a chance to beat him, where can I find documentation for it? 😉
ty
^^
also
@brittle leaf gl
I keep looking at the clock and checking how much time i got before work
and realizing the time I have is fs not enough 😂
@shell mesa #959324360102019102 are for requests, not services you offer...
#959324358084526150 is the channel you are searching for
@pastel imp This channel is actually for Development General, not #959324360102019102 support
#off-topic is the channel you're looking for
good point. 
Ah fair, you got me 
when you are going to make a game and you decide that you are too cool for engines
and frameworks
lmao
have fun suffering
hi
no u
uh if I am making a generator plugin, and each generator has it's own speed to drop items, how would I do it? Would I create a scheduler for each one of them or what?
trying to understand how I could do this
yeah
lol
Is there no other way to make it more efficient?
besides creating maybe hundreds or thousands of schedulers?
Couldn't I create a global scheduler and make every machine have a counter, that scheduler runs every 1s, and it moves the counter of each machine? If that makes any sense
I can't imagine like hundreds or thousands of schedulers running tbh
also, any specific reason why?
My guess would be to have one scheduler per lets say 10 or 20 gens
could you elaborate?
So from my understanding you have multiple generators and want to tick them all
Then just tick this part in one scheduler and the other one in anoter scheduler
wdym with "this part"
the idea is to make generators upgradable, aka the time to drop items will lower
If you have 20 gens
Tick 10 in one scheduler
You wont have too many waiting on each other and you wont have to many schedulers
What I do is only activate generators with players near them / in loaded chunks, otherwise I calculate what should have been generated once they are "activated"
what if I made a scheduler for each level of generator?
but they also need to drop every X time no?
That led to an issue on hypixel skyblock
You can just drop them all at once when they are activated
What issue?
need help, on friend server (yes he bought plugin) however i cant seem to get placeholders to work after i put it as extention in placeholder O.o whats placeholders for ezrankuppro
pointless
Ok
what is the idea behind that optimisation
but the idea of generators is to drop items every X time bruh
just schedule a task for each generator
Wild guess
the idea that that is somehow expensive is just baseless
care to elaborate?
Yeah but what's the point if there is nobody around to collect them
I would check if the chunks are loaded obviously, but it still drops every x time
i'm asking you to elaborate
i'm asking for a reason why you think you need to optimise this
Also that ^
Oops didn't mean to reply
oh, well in my mind it's just like have 200 (example) stopwatches working, or having 200 tabs opened that refresh every x time in your browser
and how you think you're optimising this
well you're wrong there
Just have one scheduler loop generators in chunks that are loaded
Even thousands is not very much
a task is not a tab
you can schedule a million tasks without any impact on memory
and when they run you do the same amount of work you would do with just one
fair.
What if I remove the dropping items part, and instead the item stores the "amount of items dropped", (it would still run with unloaded chunks BUT only if the player is online)
i've pretty much done exactly this before
You don't even need to calculate until the player interacts with the generator if you do this
except that players had to click/mine the blocks to collect the stored items
So you don't need to tick it
so I could technically just store the last time the player opened it, and calculate the amount of items it would've dropped?
But honestly this seems like unnecessary optimizing, unless you've already run tests and had lag
Yeah, just store the last time the generator generated something
That's what I do at least
hmm, thx, will have a look into it!
that's also an option if it's lazy
And thanks for knowledge
you aren't running any schedulers for that, so I suppose it actually is
yeah, but it's only possible if it doesn't do anything automatically
The one I was working on actually had different types of generators, some that work by breaking, some that drop items, etc.
I only had the scheduler loop the generators that spawned items / mobs, and I only had generators loaded if the chunks were loaded.
dumb question but
if you have a ChildComponent
is the plural ChildrenComponents or ChildComponents 
i would use the latter
Yeah latter sounds better
daily dose of:
nerds
I need help for Placeholder API
Does anyone know if there is an event or way to tell when a player has successfully loaded a resource pack?
The idea is to play a sound when a player is fully loaded in with the resource pack.
Similarly, is it possible to check if a player has their game sounds turn on?
I guess, it’s fully player-side
Hmm, okay
https://wiki.vg/Protocol#Client_Settings thats pretty much all the settings you can access
@quiet depot have you ever setup cloudflare ssl for a domain?
I tried to but it kept saying this 🤣
I setup letsencrypt to auth ssl through cloudflare

yes I have done cloudflare before ssl
so you purchased or transferred a domain to cloudflare @distant sun?
i use the certbot cloudflare ploogin
and is it better than creating a certificate on cloudflare and all that?
I can't imagine it makes much of a difference
I moved that domain to cloudflare, but I don't think it is important kgm
hmm, I see
I will try to do that then
Is there any api for paste.helpch.at?
Don't think so, as it shouldn't be used for bulk pastes.
it is just hastebin - send a POST request to /documents and you will receive a response with the key for your paste
but ye, as kgm said, you should not abuse it
It's more of a simple way that helpch.at can allow server owners to easily create logs, or pastes to not spam the chat, as they do have a discord slash command /paste.
you're more than welcome to use paste.helpch.at's api
our max doc size is much larger than other hastebins and it's permanent
🍆
I presume there are set rate limits in place for prevention of abuse?
permanent unless we run out of space in which case we will delete shit
how much memory does it use rn?
none that are manually imposed
most pastes are a few kbs though
we don't really advertise it, it's just a thing where if people want to, we're not going to stop them
it's all through cloudflare so I assume that'd handle some of the botting issues?
not sure
probably will tell you do in a captcha if it's enabled in the account's domain settings.
is it? did glare not set the limit to 1k line or something? or maybe when he did that, it was an accident?
no I fixed that
he didn't set it to 1k lines, he set it to like 10kb
he assumed the unit was kb
was bytes
ah lmao
1b is ok
@quiet depot
yeah. I say it is enough for most things
71MB
talking about hastebin, any idea if there's a way to tell if a website uses hastebin or not?
our hastebin uses 71MB
that's pretty nice, I believe it was create in like 2020, right?
3.6GB of?
3.5GB of pastes
3.6GB or 71MB 🤣
71MB memory
ram?
wonderful
not that bad ig
it's a default file in hastebin
ah ah
I meant programmatically but I guess that also works
well you can try using the hastebin api
idk if there's like a ping you can do that says "yes this is hastebin"
you can make a post request to /documents, hmm
that doesn't confirm the software running is hastebin
it just means it's an api that resembles that of hastebin's
if you know what hastebin's source code looks like, and it has most of the same css classes, I would guess you could see they are the same.
as you wouldn't do word for word exact css files with the same comments unless it uses the same libraries.
hmm, okay
I think I saw some of the earliest posts in mid 2019 or late 2018.
That should be the last version before we get 1.7 previews
says you
And you are?
I'm Dr. Samuel Hayden, I'm the head of this facility
Who?
Dr. Samuel Hayden
is actinium cloud a good host?
never heard of them
Hello,
I'm fairly new to DC developing but i can't seem to get my config to work.
I've been trying for some time now and was guided to this discord for help 😅
?not-discord (If you have a specific question you can ask but its mainly minecraft development.)
?not-discord
their prices seem alarmingly low and i can't find any kind of reviews
Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.
uhm
im fairly certain theyre referring to deluxechat
🤦 probs xD
i presume you mean deluxechat?
in which case head to #spigot-linking to get your purchase verified
discord
my bad i should've just written the word down 😅
Ok so I was right lol
that being said, some of us are quite familiar with discord dev so we can still help
okey, so i can't seem to get the config for my bot to work.
the code is corect but it gives me this error:
java: no suitable method found for toString(java.io.InputStream,java.nio.charset.Charset)
method org.apache.commons.io.IOUtils.toString(java.io.InputStream,java.lang.String) is not applicable
(argument mismatch; java.nio.charset.Charset cannot be converted to java.lang.String)
method org.apache.commons.io.IOUtils.toString(byte[],java.lang.String) is not applicable
(argument mismatch; java.io.InputStream cannot be converted to byte[])
package com.DigitalPixel.bot.config;
import com.DigitalPixel.bot.Main;
import org.apache.commons.io.IOUtils;
import java.io.*;
import java.nio.charset.StandardCharsets;
public class Config {
public static void loadConfig() {
String filename = "Config.yml";
ClassLoader classLoader = Main.class.getClassLoader();
try (InputStream inputStream = classLoader.getResourceAsStream(filename)) {
String result = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
System.out.println(result);
File file = new File(filename);
if(file.exists()) {
file.createNewFile();
BufferedWriter bufferedWriter = new BufferedWriter((new FileWriter(filename)));
bufferedWriter.write(result);
bufferedWriter.close();
}
} catch (IOException exception) {
exception.printStackTrace();
}
}
}
what version of apache commons are you using
most recent one i guess, since i started today?
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
that is not version 2.9
i can see that
latest is 2.11.0
so i should cahnge the 2.6 to that?
does anyone have an idea how I can generate a world with only islands?
so
it is a ocean, infinitely, and have islands in the ocean.
Anyone know how to rotate a world edit clipboard around itself 90 degrees, 180 degrees, etc?
Well rotation happens around the clipboard origin (see https://worldedit.enginehub.org/en/latest/usage/clipboard/#rotating), you would need to rotate and displace in the x/z (assuming you're rotating around y) half the amount of the clipboard's width/length
half the amount of the clipboard's width/length
errr.... not entirely true either
"it depends"
I was just hoping for an easy way that WorldEdit provides lol
I'm pretty sure I can figure out rotating it myself, I'm lazy though
yeah I mean there is somewhere a rotate function, see the //rotate cmd src on how it's used
Oh I also want to get the blocks individually, from what I can tell the command just rotates and pastes all at once
but "rotate around its center but displaced from the origin" is kinda uh.. more than just rotating
uh no, //rotate only affects the clipboard, it does not touch the world
Oh
I'll check one sec
https://github.com/EngineHub/WorldEdit/blob/d905ad47c8b57335e25e32fcee1abb65a5c22e9c/worldedit-core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java#L213
This gives a ClipboardHolder, but you can't get the clipboard with the applied transform from it
well, you apply the transformation to the holder's "current" transformation which in turn affects how the clipboard is read (so you can stack transformations, kinda like calling a function and then call another one with the previous one's result)
/**
* Get the clipboard.
*
* <p>
* If there is a transformation applied, the returned clipboard will
* not contain its effect.
* </p>
*
* @return the clipboard
*/
public Clipboard getClipboard() {
return clipboard;
}
This is what it says in ClipboardHolder
EditSession doesn't have a method to set a transformation / get the clipboard
It doesn't seem to have an option to rotate anything though, that's all in clipboard holder
And there is no way to get a block from LocalSession
holder.setTransform(holder.getTransform().combine(transform));
Are you talking about this?
you create an AffineTransform and pass the relevant rotation.. info, angles whatever
and set the transform of the holder to the AffineTransform you just created
Yes but then I have no way of getting the blocks from that
At least from what I can tell
ClipboardHolder only has the option to create a paste
* If there is a transformation applied, the returned clipboard will
* not contain its effect.
you can pass in your own Extent to that method, an Extent is basically what you use to get/set block data
there's a uh
ForwardingExtent? or something like that? which is likely what you should use
let me see
BlockTransformExtent This?
This is what I tried with before
why do you need to get the individual blocks?
So I can paste them one at a time / a couple at a time
Or new ForwardExtentCopy
Oh wait actually that one doesn't have a method to get blocks
tbh this is sort of uncharted territory for me, I suggest asking them in the api channel
Oh yeah good idea lol
I am fairly certain it's something to do with FEC
Thanks for all your help though
I'll ask tomorrow, I'm going to sleep now
This was supposed to be a fun personal project to relax lol
lol
Oh well
Anyone know any good Inventory/GUI Api or Util class compatible with 1.16?
?mf
Looking for useful libraries/frameworks?
Here are some which have been deemed useful by the community and are used daily.
-> Menus: https://mf.mattstudios.me/mf-gui/gui
-> Commands: https://mf.mattstudios.me/mf/mf-1/getting-started
-> Messages: https://mf.mattstudios.me/message/mf-msg
-> Config: COMING SOON™️
Is it possible to remove the
"minecraft:itemname"
"NBT: 2 tag(s)"
from an item in the gui?
And how can I add multiple line lores with the mf-gui Arrays.asList won't work
Aaah yep got it thanks man
You ever using the gui api from
?mf
Looking for useful libraries/frameworks?
Here are some which have been deemed useful by the community and are used daily.
-> Menus: https://mf.mattstudios.me/mf-gui/gui
-> Commands: https://mf.mattstudios.me/mf/mf-1/getting-started
-> Messages: https://mf.mattstudios.me/message/mf-msg
-> Config: COMING SOON™️
you ever used*
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait
might start using webstorm a bit, is there some "life changing" plugins you guys might want to recommend for it?
File changing?
Oh Life
Lmao
Yes give me a sec
@static zealot
already got it. like you can't even open Webstorm without having it
you'd literally die
file changing lol
Shush
yes. I want file changing stuff
mostly themes tbh
it looks kinda ugly out of the box imo
yeah idk what theme to use. I don't think matt's will work here.
Why not?
well I've tried importing it and idk if its the same or not. for some reason it looks more dead
'cause he said so
It's just reskinned intellij, all the plugins should work in the same way
themes work a bit different in the different IJ IDEs
but that's because "element" names are different
I don't think this is the default tho. it might actually be matt's one that is used here
but idk. it does look a bit to dead
there are quirks with how intellij formats individual languages that means themes need to be adapted to them
mine was a pain to do
ouch
my eyes
whats a sunlight
anyway where is like most of the ide
I am going to throw a molotov cocktail at your house
copilot created the most ungodly line ever
wth
xdd what
average minecraft plugin
sometimes I wish this was a joke 
Is there any reason why java decided that prepared statement arguments indexing should start from 1 instead of 0 like EVERYTHING else? Is funny that internally, it subtracts one from the index when using setX(index, value)
looks like this was just inherited by java
I see
@hoary fox Second ping and yes my account is not gone
I was messing with someone; my account is not gone 😅
rewrite ^/mcm/resources$ https://www.mc-market.org/resources/authors/100752/ permanent;
rewrite ^/mcm$ https://www.mc-market.org/members/100752/ permanent;```
Any idea why `/mcm/resources` redirects to <https://www.mc-market.org/members/100752/>?
what other args?
$ matches the end of the string
I'm looking at porting this view bobbing mod from fabric to forge. Anyone know what the applicable forge methods might be
it's a very simple mod. this is the only class
can't you just... turn the setting off?
Turning view bobbing off in settings removes the screen shake but it also makes it so your held item doesnt bob up and down
This is similar to the "model bobbing only" setting in badlion client
How would I go about creating a world generator that only generates islands in a ocean?
I need all the latest biomes and caves
but it has to be automatically generated with a plugin. Thanks in advance!
ok so i listen to PlayerCommandSendEvent event, and i want to remove every command which contains "X"
how can i do it?
i am trying with next:
public class TabSuggestionListener implements Listener {
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onSuggest(final PlayerCommandSendEvent event) {
Player player = event.getPlayer();
if (config.getBoolean("remove-if-contains-something", true)) {
event.getCommands().remove(event.getCommands().contains("test"));
}
}
}
however at event.getCommands().contains("test")
i am getting Unlikely argument type boolean for remove(Object) on a Collection<String>
contains() return a boolean, and commands is a Collection<String>
i came up with next:
if (config.getBoolean("remove-if-contains-something", true)) {
List <String> cmds = (List<String>) event.getCommands();
event.getCommands().removeIf(cmd -> cmds.contains("test"));
}
event.getCommands().remove("test"); is what you are looking for
using this?
or this
uh guys where do i get support for the "Guilds" plugin?
but i want to remove command only if it contains specific char/acters
This is the guy who scammed lol
I remember him
when you get that cloudflare email
not bad
slazem se
nazalost tako je ispalo
tvoj plugin ni ne koristim
@sturdy magnet Talk in english..
ok
I mean it could have been worse, it was only 1 hour plugin, not a big deal
Hey can anyone help me with this, I am trying to run the "restart" command. But this kinda defeats the purpose of a restart command
Hey, im trying to save a config (yml) file from the resources folder to the directory that the program is running in. I have tried a million diffrent things, but its never able to find the source file. Right now im using InputStream resource = this.getClass().getResourceAsStream("messages.yml");. Thanks!
Not spigot btw, just java general
add a / at the beginning of the string
or use getClass().getClassLoader().getResourceAsStream(...)
either works so long as the file is in the "root" of the jar file
it's in resources while you're developing
if you build a jar file and send it to someone in Vietnam it won't be in their resources folder
when you build a jar file, everything in resources will be copied into the jar file as-is
oh ok
ok, so now im getting an access denied exception, asuming thats my dest firectory?
Path destination = Paths.get("/messages.yml");
assert source != null;
Files.copy(source, destination);```
this should copy the file from my jar to the directory that my jar is running in right?
if so, how would i fix the exception, im on windows and i think it has the file perms it needs
Paths.get("/whatever") will be on the very root of the hard drive
oh, how do i get the working dir
if you want that to be relative to "here" that's just Paths.get("whatevs")
working dir is .
ok, so drop the /
ya
I suppose either works

ok, now im having this error when trying to read the file yml:
Can't construct a java object for tag:yaml.org,2002:java.lang.module.Configuration; exception=java.lang.reflect.InaccessibleObjectException: Unable to make private java.lang.module.Configuration() accessible: module java.base does not "opens java.lang.module" to unnamed module @59cfc33b
its valid yml
o wait i think i see
or no
idk
uh what are you trying to do exactly?
code-wise and also the stack trace is always of help
Just want to do the same thing Bukkit does, but in a diffrent Java plugin
Where I can getString etc
yeah that doesn't really tell me what the code is trying to do lol
Oh, well right now my code to copy the default is working, but I want to load the Config from the file into some object, and then getString(path) just like Bukkit does. I’m using some random thing from stack overflow rn to load the file with snake yml. Not at my pc so can’t show anything but yea
Clearly that’s not the right thing to do
Yeah something in there is going not so well
can't really diagnose a patient without seeing them :^)
What would be the correct approach to do what I want, like I don’t think I’m googling the right terms
Is there a library or something I can use, because idek where to start
I would have thought something as simple as Config files would be all over the internet
But I’m prolly just not searching the right thing
personally I suggest Configurate (gh.com/SpongePowered/Configurate), it's pretty neat and supports more than just yaml if you want that too
@violet creek out of curiousity why didn’t you use an off-the-shelf lib like mineflayer that already supports physics?
@junior walrus Running the whole mineflayer project on a mobile device with limited resources regarding bandwith, cpu & ram is asking for problems. (I have tried it). Now I'm just using some parts of the project like 'prismarinejs/minecraft-data', 'prismarinejs/chunks' & 'prismarinejs/physics' and connecting my native code to that.
what code did you write then?
Well, everything you need to join a minecraft server. I'm now just passing some chunk data and other stuff to the nodejs backend in the app and that responds with new player positions
I also had to implement a way to run node with the flutter framework, since that hasn't really been done before
which took me a couple of days
you realize you will eventually rewrite mineflayer for full compat lol
webpack?
I don't think so tbh,
currently it does everything I need. I can send messages, receive messages and now all the physics stuff. I don't have that much other stuff planned
I'm just making an app like Minechat
I understand that, but if you are saying mineflayer is lagging you may have just had to profile it and fix one or two things
I've bundled everything using webpack, but implemented https://code.janeasystems.com/nodejs-mobile in flutter
Run Node.js on Android and iOS. Plugins available for React Native and Cordova.
I've been working on this project for over eighth months now. It's a choice I had to make.
Currently the packets are sent and received using the native code because this seemed to be the only way to keep a connection alive when the app is closed or the phone is in sleep mode
when the app is closed or the phone is in sleep mode
This feature is very important for me, shown here #showcase message
why would you want to keep the connection alive when the app is closed or the phone is sleeping?
It allows users to open other apps and stay connected. A lot of players are leaving their pc on the whole night to afk on some server. The app solves that because users can just join the server with the app, and charge their phone.
wouldn’t it be bad to keep an app on all night, especially something this heavy?
It's a requested feature with other similar existing apps
Well, sure but not as much as leaving a laptop or pc open just for that one task. The app doesn't do any rendering or stuff like that
Or imagine you're connected with the app and chatting with some friends on your SMP server. If someone would call you, or you get bored and want to do something else on your phone, other apps instantly kick you for leaving the app and let's be honest that's not ideal.
has anyone had a crack at abstracting placeholder api, to support other platforms?
ye i saw the tracker issue, just curious if anyone has tried at all or if theres any concerns/things to know before trying
So I have 2 DIVs something like this:
<div class="outer">
<div class="inner">
TEXT
</div>
</div>```.
I've made the outer have a specific width and height. how would I Make the text inside the inner have the font size percent of the outer size?
if I Just use font-size: 150% for example, idk where it actually takes it from but doesn't really look good on mobiles
Isnt there something like inherit?
idk. I Forgot all the html/css I've ever done lmao
I Don't want it to inherit the font size. but rather have percentage of the entire size of the outer div.
yeah me neither
basically I have this: (fast krita work lmao don't hate me) an I want it to look ok on widescreen and mobile as well. now the box itslef is sized like this:
width: 100vw;
height: 25vh;``` and then inside that box I have a div that contains the text and I'm trying to make the text look the same on all screens I guess.
I'm basically trying to make it look just as big in relation with the box on all screen sizes. instead of changing the box based on the text
and yeah on a phone screen currently I can get it to look like this
rem?
is that like a size unit?
interesting. there's so many units I forgot all of them
what is it relative to?
well 1 rem is the font size of the root element
if you really want things to work on all sizes, you're gonna need media queries or a framework
is it possible to even code (for example using protocollib) something that will (if you have ViaVersion plugins installed) for example:
- your server is 1.8 or up to 1.12 !
- client joins with 1.13 (keep in mind on MC < 1.12 there is no
PlayerCommandSendevent for tab suggestioning)
is it possible to make that we can customize what suggestions will come to a player which is on > 1.13 client (on < 1.12 server)
for pre-1.13 servers (regardless of client) I think the basic TabCompleteEvent covers that
hm?
i am 99% sure that you either can tab-complete any command ever if the server is 1.8-1.12 and client is > 1.13
you can't filter them
like i negate libsdigsuises.* on my default, but adding libsdisguises.* to a rank with a higher priority doesn't allow anything
Well it kinda depends on the exact setup
It's predictable behavior but non-obvious at first
what is the difference between TabCompleteEvent and AsyncTabCompleteEvent, i really don't understand however much time i spend looking and reading forums/docs
and PlayerCommandSendEvent too
I presumed it was based on specificity?
Just is weird to me that they work like that, I imagine a glob of negation just being every permission negated in essence, and setting those same list of permissions to true would override no matter what
Well yes, or no, again it depends on the overall setup
Uh... one is async and the other isn't? Not sure what else to answer
ok that is quite understandable like you will use async one when you can, and non async one only when you really need to
what about PlayerCommandSendEvent (only present in MC 1.13+)? is that those suggestion things
the thing is that you can't control PlayerCommandSendEvent which is required for 1.13+ client to do auto-completion stuff
so you are stuck with all suggested commands or nothing
Star I was typing a super cool explanation and my keyboard just died lmao uh
Have you actually tried seeing if the TabCompleteEvent covers those or are you speculating it doesn't?
that event didn't exist back then because everything was tab complete
Weight isn't all there is to perm calculation, weight determines horizontal visiting order and inheritance determines vertical
https://upload.wikimedia.org/wikipedia/commons/7/7f/Depth-First-Search.gif
There is no rule for "false perms override true perms" because you can't have the same perm with different values in the same group, but for those two rules above it adds these:
* Specific permissions are queried first through the whole tree (e.g. some.cool.permission)
* If not then it queries for regex and shorthand permissions (I don't know the exact order of these two)
* If not, then it queries from the "most specific" wildcard (some.cool.*) to the "least specific wildcard" (*)
Then to all this you also add contexts... permissions with more specific applicable context have priority over permissions with less specific applicable contexts (or over global perms)
And temporary permission also have priority over normal ones
And the transient map has priority over stored permissions
Hence why "it depends"
Like yes it's predictable but I can't tell you how it will behave without seeing it
Uuh not sure? /lp tree . <player> could be nice but if you ask me then /lp user <user> permission check <perm> shows some really damn useful data
or like just have a big brain and visualize it yourself 
hmm okay
it's very new to me the concept of like inheritance being a tree
in my mind, it was just a copy paste of permissions to the rank
the numbers in that gif is nothing to do with the weight really and it's confusing if you think they are, but that's just the visiting order
but yeah it's a graph and each node is a permission holder (user/group) (which btw you can also change what algorithm is used to traverse the tree but in like 99.9999% of the use cases the default one is the one you actually want)
oh my god lp tree exists
dude luckperms is so fucking good
i can't believe it has all this stuff to help you figure things out
i had no idea
the best part about developing for a server is that you see messages like this, nice for my kinda shitty coding skills are appreciated.
Agreed
so in general, what would be a good way to stop tab completion for things? Because a lot of plugins do tab completion by default unless the permissions is explicitly negated. Right now, I do a negation of each group of perms with a wildcard, so like -libsdisguises.* in the default group. But this has some issues. Is there a better way to organize this?
I just offended Frosty 😦
okay because many people think that that is how you do it lol
yeah PeX leaves bad habits lol
command suggestion is kinda between the plugin and the server (which for the most part, it's not a server issue), like the Command object needs to have it (via Command#setPermission), and setting the wildcard to false would cover those. setPerm is done by bukkit if you declare the command in plugin.yml (with a perm field for the command) or the command framework you use if it's any good lol
But for example, in WorldEdit not all commands even have a permission whatsoever, so even if you don't have anything at all or everything set to false it will still show those commands, because there is no perm in them to check
Hmmm
so you're saying to get a clean slate I would need to change all the plugin.yml files to not have default perms, and modify some source code to add permissions to stuff
#development
I may have offended all devs in this discord lol
Ye, you should only care about those things in Enterprise level of stuff like backends etc, where you want the best performance and lightweight product possible
they don't do the same thing lmao Gradle can do far more than Maven out of the box
If you know how to code properly, doesn't matter the language, you will be fine.
for very basic usage sure it's okay, but if you want to do anything mildly complex then maven won't cut it
(just not skript, please don't)
does maven even have a minimize() function? lol
the shade plugin yes
oof ok
if the plugin registers commands in the plugin.yml rather than using a command lib then for you to "control" access to it, the command should have the permission field set
If it uses a command lib then it's kinda up to the lib to do the setPermission thing (or override testPermissionSilent)
The mc and most dev comunities are just shit, arrogance everywhere
actual facts
I will burn every kotlin developer in sulphuric acid
(doesn't matt use kotlin?) 👀
for his sake I hope not
Yes, even at work, and we're doing really awesome things, but hey what do I know, santa mittens is the man
uhmm i cant change my nick on this server, my name is maven on most servers
yes exactly I'm always right
it was good knowing you! Rest in peace soldier!
i probably shouldve clarified as that message can be taken out of context here.
people using the best options is a bad thing?
I recently joined Cortex Dev. Discord server and it's quite a good place tbh, haven't seen any toxicity in there yet
Not exactly latest and greatest but what is popular or trendy, or influenced by a specific community
If you don't use Haskell, you're bad
I got told I was shit because I used svelte
instead of vue or react
(when svelte is obviously superior
)
PHP isn't bad because it's old, it's bad because it's bad
"if everything starts with a dollar sign then why does anything start with a dollar sign?"
bruh
hellish language
yeah PHP is just kinda dog
I now understand you charlie
noo
none of us are saying you're a bad developer for using it, we're just saying PHP is shit
Problem with PHP for me is the syntax, but hey if people like using it
yeah like I understand Laravel is a super cool trendsetting framework, but I lament the language
Only thing I don't tolerate is skript "devs"
I LOVE dynamic typing and inconsistent standard library behaviour and naming
Shows how lacking php is by itself 
Even Skript is fine if you use it for what it was meant to be used, the issue is the people writting extremely complex things on it that are really bad performance wize
Overall it's nice that it gives some people that don't know how to code the option to at least do some things
variable defining is hellish tho
Yeah unironically skript ain't even that bad for simple stuff
I think there's also a project working on compiling Skript which improves performance, but also kinda cursed
Someone on Paper discord was talking about what they did and basically a JVM compiler for Skript that fixes a lot of it's performance issues, which is nice
Very cursed yeah
i remember playing on a prison server that was half made in skript, you could pull barrier blocks out of the inventories and everything, it was hell. i talked with thee admin of that server and they complained constantly about how the backend was shit cause of skript
There was a page somewhere that had an actual language specification for Skript
which is uh
something
ive looked at the docs for skript, just wow.
isnt it extremely context dependent
I'm surprised you can actually make a specification
why are they running Skript if they're the ones complaining 
It's like trying to write a brand new c++ compiler or standard
But yeah, use the language you like, or the one you need to use, personally I am very happy that I use my fav laguage at work, not many have the chance to use what they love
the admin wasnt the owner, they didnt write the server.
tbh as a technical thing it's actually quite impressive that the skript parser even works
i think the owner bought the prison setup from another server and just renamed a few things
I have something to show y'all but it's quite cursed soo....
Show us
ah yes, that
That's the one i was talking about
the admin was an unpaid staff and wasnt gunna rewrite stuff if they werent getting paid.
elara will replace skript in a few decades anyway
There's also uh, skript-parser? unsure how the status is. https://github.com/SkriptLang/skript-parser
Dunno what you're complaining about
The best programming language ever
Right, when PAPI3, Hangar, and DChat hex are out
Problem?
dchat was abandoned and papi3 is lowkey abandoned
it will be done when it will be done
major md_5 flashbacks
what should papi3 do better?
why you saying papi3 is abandoned?
its coming 2023
plus i heard talks of bungee support?
idk i dont work here
it will have placeholders and an api
I'm not even sure if that's happening in papi 3 lmao. that was just a thing he was testing
and placeholders i think i forgot to mention that bit
papi 3 will use adventure and components I'm pretty sure
wow!
papi 3 😌
If It didnt... 


papi 3 isn’t abandoned
just on hold till 2023 (when it should also release) cuz i needed to waste last year, and the rest of this year
When is Papi 4 out
nevermorow
PAPI 5 will allow you to see placeholders irl as holograms
papi 9 + papi 10
What about papi 11
Papi 11 allows you to run minecraft in your brain
And you see placeholders tagged on your body
do you guys really think papi 4 will happen? papi 3 is the end. after that we delete everything, helpchat, spigot, the internet and then the planet and maybe after that the universe
no, papi 21
Y'all so distracted with the PAPI thing that you didn't event see what I did there
I got it.
yes nitro. we're not that dumb. I know I Personally am very dumb but I recognise a vine joke
Speaking of vine... I've noticed a few youtubers from vine reposting their vines as shorts. Why? lol
why?
bcz shorts are currently the meta
they get you loads of views which means viewers aka potential subscribers which mean more views which mean .... etc .... you get the idea
I personally disabled shorts on my youtube app
well the ones showing on the main page.
I can still find shorts videos and watch them
Yeah I hate shorts lol. If I wanted to watch short videos I would go watch vines again lol (vine is still open but its archived)
nah man. shorts used to take so much of my time for absolutely nothing.


