#general
3141 messages ยท Page 283 of 4
@everyoneexceptgayducks
(I'm legally allowed to make that joke as I'm hispanic)
drops the n word
(i'm legally allowed to i'm white)

I'm going to go drink some juice.
Solid butter
In before 
http://www.solidbutter.com/ wtf xD
why is that a thing
some nub fashion thing
i wanted that domain ;n;
Load time is horribe on mobile, wtf is that website
I'm making a PollManager class which is in charge of creating Poll objects and keeping them in a list.
With the Poll objects, should I go further down the OO train and make the Option objects their own classes OR just save them as a hashmap with strings and integers with how many votes they have?
I'm feeling like Option objects would be nice as it's more explicit what they are, rather than just being strings.
What is the Option going to store? If it's just a String, it's not very useful creating another class for that imo.
A String, and the amount of votes it has.
Let me spit out some code, it's kind of a mess, I'm at a loss of how to do this best.
i guess you could make a class for that
I feel like OO can be taken too far sometimes.
probably cleaner than a tuple anyway
Making a class for eveeerrrything.
I don't want to fall into that trap because then it's harder to work with than not BUT I don't want to have a magic "tuple" list
well it also makes it a lot more modular
If you're going to have useful methods in the Option class that you'd otherwise have an ugly Util class for or something, then I'd do it, otherwise I'd just leave the map there.

Yeah.
Instead of having addVote() or setVotes() or getVotes() in the Poll class, I'll have it in the Option class.
https://i.imgur.com/RFqeK3j.png
do you remember this
wouldnt it be better to call it Vote then?
Exploding sheep?
So instead of addVote(String) where String is just the name of the option in the hashmap, it'll be
or VoteOption
No because
I mean I guess
VoteOption sure
but I'm not making a new VoteOption class for each vote
punching sheep before we could shear them?
wiz big doo doo ๐ฉ
why are you exploding sheeps 
yes .-.
im punching sheeps
ignore PollsManager.newPoll("MyPoll", new Option("ma m"))
i mean vs the actual shears tool
๐
I was just thinking about syntax.
which uh...didn't come til like beta 1.7 or 1.8 or something
could be
That's one issue with having an Option as a class, instead of being able to do newPoll("pollName", "option1", "option2")
you have to do
newPoll("pollName", new Option("option1"), new Option("option2");
You could still have what you have now, but just wrap that to an Option thing internally.
When sheep were only good for one set of wool then had to be purged
however I suppose I could handle that in the constructor..
great movie
Optional Development
Strange events sounds like a stranger things knock off
ah hek I have to deal with players too
I can't just let players add votes indefinitely
See, thefuck is too slow for day to day usage for me
so Option will have to store a list of players I guess?
But, if it wasn't...
Rewrite the thefuck in rust
I am going way too OO for this I think
//todo
because then I need to store votes COMBINED with player
so should I just make HashMap<CommandSender, int> of votes?
OR COULD I make a Vote object..
hmm
PollManager managing Polls which manage Options which manage Votes
now this is true OO
This is one part I think I'd like more about functional programming, is you don't have to deal with behavioral issues like this.
You just do whatever gets the job done.
Passing stuff around as raw data instead of objects containing objects containing objects dealing with objects seems nicer.
In some ways it ISN'T nicer, but in some ways like this, it makes it almost simpler to deal with.
ew dont store commandsender
daaamn lol, after seeing the new information released by swedish prosecutors, gonna say Rocky deserves some prison time.
@sturdy inlet I can't have people just adding votes
if I don't store commandsender (or player) then I won't be able to track the votes.
I mean
I guess I can store UUID
but I need to somehow track something that can be used to .. track, the players
You need a Poll interface with a PollImpl, with a Vote and VoteImpl and an Option and OptionImpl, then factories: PollFactory, VoteFactory and OptionFactory, all with managers, because why not: VoteManager, OptionManager and VoteManager and the factories can't just create the objects on their own, no, no, no, VoteFactoryImpl, PollFactoryImpl and OptionFactoryImpl. Now this. This is art.
if I don't then every time they do /vote <poll> <option> they'll add a new vote.
oh gosh
no no no stef
no nO NO NO
Need a ManagerFactory interface for each manager and a corresponding ManagerFactoryImpl too
๐
Oh, yes, of course. Can't just make those normal classes, everything needs to extend and implement something.
lol
Then you can switch the interface if needed, or override it.
It's like NOT EVERYTHING needs to have an interface. Unless it's an API or you're passing things around constantly and you need a "contract", UGH more work
For multi-platform plugins it's definitely useful to have interfaces with an impl per platform.
For everything else though... idk?
Somebody was saying how our moderation is pretty tolerant
I just clicked the pins
๐
Paper's moderation?
My plugin has a RegionFactory, Region and WorldEditRegion, btw because the class loader loads every class a class uses on load and it messes with the soft dependency ๐ฆ
When's the next pinned message gonna be?
Class loading in Java is cool but can be quite a headache
then that's a dependency
you shouldn't have to do any of that
It's a soft dependency that makes the plugin not work if you don't use it.
:weSmart:
Couldn't your soft dependency integrations be automatically enabled when it detects the dependency is enabled? Not sure what the issue is atm
I have a method in Region for saving it as a schematic. I use WE for that. but, if I have that method in my normal class and the dependency isn't there, then it fucks up.
pull it to another class
Saving schematics is a minor part and disabled when WE isn't there.
I did, hence WorldEditRegion.
My plugin has a RegionFactory, Region and WorldEditRegion, btw because the class loader loads every class a class uses on load and it messes with the soft dependency ๐ฆ
you should only need one class to interface with WE
Region is for when WE is absent and RegionFactory because I don't want to check every time which one to pick when creating a Region.
so it's a stub
also why dont my quotes work smh
oh, so your own region class
Yes, not WE's.
thought you were wrapping WE's region class
Should have specified that
If the classes a class uses were only loaded once that code is actually called, I could've just put it in the same class.
But apparently that isn't what happens.
Due to defineClass in Bukkit's class loader iirc.
Or whatever it was called. Was some native method.
No, defineClass is Java.
Yes
thought you mean like, in PluginClassLoader
that they were doing something non-standard
Nah, nothing non standard, I just didn't know it worked that way.
.wa cos(2^128-1)*32)
we even have docs on this for WG https://worldguard.enginehub.org/en/latest/developer/dependency/#classpath-woes-with-soft-dependencies
(DiscordBot) Exact result: -8 sqrt(2) (sqrt(3) - 1) - Decimal approximation: -8.28220944328066439516476280396954650717020484223777644204... - https://is.gd/9rKnve
huh
reminds me i need to write API docs for WE still
got pretty burned out after re-writing all the other docs in the space of a few afternoons
will do api some other time
ยฏ_(ใ)_/ยฏ
Docs should be written before the code because the code should reflect the documentation
But, yeah docs is annoying.
that sounds like a load of bs
That's a very useful thing, stef
There are some projects where that make sense and I can kind of see it
Sometimes I overengineer things or underengineer it but the end result is all that matters and sometimes you lose sight of it
APIs certain public facing libraries sure
Plenty of other stuff doesn't really make sense
Same with Minecraft mapmaking, you can overengineer stuff so much but sometimes people won't even notice it
I have written docs once before the impl and it was kinda nice, but that was only like one method. But the entire codebase, ehh.
yea you can't really plan ahead for a whole api like this tbh
imagine writing tests
a lot of the problem is also that java doesn't have internal
Imagine not having 100% coverage /s
Ah, the good old 100% coverage trap.
just let people report bugs so you can release updates and look smart
so either you fuck up your organization structure and don't use packages correctly, or everything shared is "public" if it's not supposed to be public facing API
"Hey I found a bug"
"Impossible, we have 100% coverage"
closes issue
You waste SO MUCH time trying to get that meaningless 2% coverage ๐
An internal keyword would be super useful.
But at least tests are a more functionally useful tool for designing API than pre-writing docs, IMO
I guess Java 9's modules kinda helped some of that, didn't it?
i havent even installed anything other than j8
Java 8 forever
+1
I think that if you have two modules they can't interact with each other even if public, unless you specify it explicitly.
Good thing it'll be supported for a while across various vendors ๐
But, haven't done too much with modules, so I'm not sure on that.
i have java11 installed somewhere, but yea i exclusively use java 8 still
thats italic poop
I use Java 11 for non api, Java 8 for api. Java 12 to run.
๐คข
i use J5 in class
you clearly aren't working on the same scope as some of us
I can hope it's not production at least ๐
Everything on my pc is testing
i wouldn't hear the end of it if worldedit couldn't be compiled without j11
Also I just push Java 11 on everyone. If they then don't want to use the plugin anymore, fine, not my problem.
well, idk what your plugin is but clearly ๐ฎ
๐ฆ
Paper runs fine on Java 11 so why not
Well, yes the code is ๐ฉ
lol
Wiz do you own a server?
i cant even find an JDK/JRE for j11
how can you not
adoptopenjdk
there are so many choices
AH beat me to it
Tbh I'm not gonna wait around until Java 20 to use Java 11 because people can't be bothered to update from Java 8.
if only they made it easier to update
Tekkit is legacy at this point
If you only have Java 11 and are wondering how Minecraft can work, it's because they bundle their own version in with it.
well, mojang can't be bothered to update either
Isn't tekkit still on 1.6.4?
remember that mojang bundles their own runtime with the client
they rather break stuff
Minecraft would probably mostly be fine with Java 11
Tekkit Launcher.
Technic Launcher sorry.
MC is not fine with J11 lol
Would it be hard to migrate a codebase from J8 to J11?
What differences are there from J8 to 11?
well, the DFU code aikar said he copied from decompiled MC sources wasn't
Paper had to make some minor changes for it, right?
read the changelog
Migrating a codebase from Java 8 for Java 11 was setting the compile target from 8 to 11 for me @austere ivy
possibly they changed it since then
But yeah otherwise no biggie
Paper had to make some changes because timings used an internal method
but simple things like LogManager.getLogger() don't work on java 11
whats the point then
you need to specify LogManager.getLogger(Whatever.class)
since Reflection#getCallingClass is F
can we get an F in the chat
No reason to?
lol wut
Because 8 works and they've already got years of QA on it?
Java 8 to Java 11 didn't change that much, main thing I use is the var keyword.
QA
As in it's battle-tested
did you mean the battle update?
not as in internal QA
Java 11 to Java 14 would have a nice switch expression thing though.

people using your product is a form of QA
Test 1/1 passed. GameStarts
Hey bit off topic but is anybody here any good at diagnosing problems with low server tps and timings reports?
lots of game developers use this type of QA these days tbh
just look at blizzard
:^)
small indie companies
#paper-help @slow rain
Unit Integration Community tests
post your timings there
or just post your timings here
and people will help you
it's not like a bit more spam would hurt #general
but #paper-help is usually more productive
It is already in #paper-help
silly
i want to work on my magic wands plugin but i hate doing math with particles lol
someone buy it off me ktnx
Is it a comission?
I'll fork you
i'll spoon you
There's a delete repo button in the settings somewhere
Make my own better magic wands plugin >:)
NOT BEFORE I GET MY HANDS ON IT
dadadadada
race to the fork
is your name nathan something
nathanwolf
Thanks for your help guys, apparently I have too many entities. Anybody know of a way to clear all server entities?
it's joshua
Capital in package smh
dududududududu
what?
tsk tsk tsk
Wait what's
Oh yeha, no caps in events.
Er..
No caps in packages, else it could be confused for a class.
gadle is bae
You should probably run now
Because people probably will hate you for hating on Gradle.
stop bullying me for my dissability
Why is the version STILL on 0.0.1
i will report you to the CIA
WHY IS YOUR PACKAGE
me.darkeyedragon.magicwands.Magicwands
CamelCase for class names, ALWAYS
:(
:(
You mean the FBI?
no
The CIA is in the business of overthrowing governments
CIA
my naming isnt every consistent
Discord has greentext now!? :D
:))
.
It's just the format.
Please be joking
sounds like orange book and red book
text isn't green tho?
smh
or quotes
quote
embeds
something something
I'm code reviewing for Josh now leave me alone for a moment >:(
Orange-Book-Standard (Az. KZR 39/06) is a decision issued on May 6, 2009 by the Federal Court of Justice of Germany (German: Bundesgerichtshof, BGH) on the interaction between patent law and technical standards, and more generally between intellectual property law and competi...
spacing?
Yeah dark is joking. Mfw I almost fell for the bait.
I already did the code review 6/10
greentext
not green
Stef want to do code review for me?
Sure, if you share the code
If it's on GitHub as private could add me to it. Or just show it in a DM.
Should that even be closed source?
I'd always go for open source, but it's your code.
Even if it's for my server?
i mean, lets be honest
"do I care if people take my code and use it on their server?"
who cares about your server
I mean you can answer that question yourself.
I mean I guess not.
Don't need us to
Some of the commit messages are silly though so just ignore those alright?
I started coding this when I didn't have any knowledge OF coding plugins so I never planned on it being bigger.
then you probably shouldnt ask him to review it lol
It's just the commit message, not that big of a deal imo.
It's nice if it makes sense, but the code itself is more important imo.
Go easy ;c
omfg worst plugin ever and i havent even seen it yet
IT'S GOING BACK TO PRIVATE
how many players do you have?
I've been doing a complete recode of it.
doesn't look that bad
Barely any, just me my friends and some other random people, it's still in development.
Not I HAVE been doing a complete recode, but I have been CONSIDERING.
i've seen garbage that is 100x worse than this (that is to say, this isn't necessarily garbage, it's alright)
but something like ASkyBlock is just, infinitely trashier lol
this is pretty good for something self-taught early on
god tier programming coming through
Seems readable, uses widely accepted code formatting, classes are small
small classes mean small pp
Not a big fan of statics out the ass, but it's your preference. You may find that outside of the Bukkit world though, it's very much frowned upon
I donโt like it.
Thatโs one thing I want to reduce is the amount of static I have going on.
Especially with the Util package.
util is generally static
In order to test statics, you have to do some insane hackery in Java with tools like PowerMock, which can't even fully test some static situations IIRC, but in Bukkit testing is very uncommon
I just find it hard to separate something so functional and method based (Bukkit) and turn that into something that works with classes.
Like am I supposed to replicate my server (in the form of say, PlayerData, that kinda stuff) in objects and then handle it that way?
sure, you can do that
It just seems hard to create objects of things, since everything you actually do is simply player.doThis(), doThat(); you know?
If you have data that is specific to a player in your plugin, you can create a PlayerData object or some other object to represent that state.
you can make a wrapper that takes a player object and add more fields
It's like having a special type of Player for your plugin
Like instead of PianoManager holding a list of players that have Piano enabled, I have PlayerData and then it has fields which say if they have Piano enabeld?
enabled?
yes, exactly
I can see that, that might be more OO and easier to work with perhaps.
Here's an issue though, how am I supposed to get the PlayerData instance from just an instance of Player?
Should I have a static PlayerData.getFromPlayer(Player player) kind of thing.. or..
UUID lookup?
I'm trying to stay away from databases as long as I can, because I tried implementing MongoDB but it was not very fun dealing with async stuff and databases and DatabaseManager and stuff.
MongoDB is particularly well-suited for most kinds of plugin data, actually.
That's why you'll notice I'm using statistics for the (barely implemented) Ontime instead of storing their ontime somewhere else.
relational db or riot
Notice how a lot of plugins store their data in document-fashion on disk, whether it's YAML or JSON?
This is such a common theme in plugins
And Mongo was designed for exactly that kind of data
sqlite 
Yeah. Huh okay.
Could have added the GameMode as paramatar, I think acf should understand that and work from there (reduces it down to one method for all three)(https://github.com/ItsTehBrian/TFCPlugin/blob/master/src/main/java/com/outlook/tehbrian/tfcplugin/commands/GamemodeCommand.java)
Can extract the millisPlayed here (https://github.com/ItsTehBrian/TFCPlugin/blob/master/src/main/java/com/outlook/tehbrian/tfcplugin/commands/OntimeCommand.java)
You can extract the code in here to one method and call it for each event. (https://github.com/ItsTehBrian/TFCPlugin/blob/master/src/main/java/com/outlook/tehbrian/tfcplugin/events/AntiBuildEvents.java)
Too much nesting here, try to return when a condition is false, instead of nest when it's true. (Can be done for some other stuff as well, but this is the worst one)(https://github.com/ItsTehBrian/TFCPlugin/blob/master/src/main/java/com/outlook/tehbrian/tfcplugin/events/BuildingEvents.java)
I don't really see the use of this, why not just use Bukkit's sound class? (https://github.com/ItsTehBrian/TFCPlugin/blob/master/src/main/java/com/outlook/tehbrian/tfcplugin/piano/PianoSound.java)
I'd avoid the boxed classes here and just set them to the standard by default .(https://github.com/ItsTehBrian/TFCPlugin/blob/master/src/main/java/com/outlook/tehbrian/tfcplugin/util/ItemBuilder.java)
But this is far better than you made it out to be though, so good job.
I've been tempted to store data in .yml, but I havne't done that.
๐
Damn this man, doing an essay lol
Let me read through your messages.
But yeah criticism is good
@cosmic raft will murderfy you
anyone want to do a code review 
so I didn't have to worry about collaborating
It's OK to commit .idea folder, btw
Don't listen to the haters
Not everything in .idea should be committed, though
commit .certs too btw
and .passwords
who was it that i installed that random certificate from?
or discord bot tokens 
was it you byte?
Personally I only commit .idea/codeStyles but there are other things you could commit that could be useful
Stef, for that first one, how would I do things like @CommandAlias("gms") for each one?
I'm going to quote something our developer has said, I am wondering if this is true and if so has this been fixed in paper? If not I would like to make a report on it to help out
I thought acf accepted the ones you specified, Brian, but if not, could maybe write your own thing for it?
I do not remember giving anyone a random certificate to install lol
I want people to do /gms, /gmc, /gma, IN ADDITION to being able to do /gamemode 0, /gamemode s, /gamemode survival.
Hm ok.
What do you mean by extract the millisPlayed here? Store it somewhere else?
No, just move it before the if/else
Ah okay, but then
I'm doing a different thing for each
How would I do that? It depends on whether it's targetting a different player or not?
I'd move the player above as well and just make one target player.
But then if you do /ontime for yourself it wouldn't work, right?
pretty sure it was this one
Or how should I do this
Player targetPlayer = target == null ? player : target.getPlayer()
Ooooh, gotcha, thanks that's a good idea.
nice token pigeonboy
I can use that in a LOT more places now that I realized that.
Not correct what I wrote, but you get the idea.
yeh wiz that was a sad day
did anyone abuse it?
abuse what
your mom
ur retarded
Stef, for the third thing, should I put that method in a util class or should I keep it in the AntiBuildEvents class?
the token u duckshit
I'd keep it in the same class.
nah because I instantly generated new one and the old one was invalidated
That makes more sense for me since it's closely related, but I'd imagine some people would say that's bad practice since it's not strictly an event.. or is it fine?
Anyone want nitro?
yes
then buy it
It still handles the event, so I'd say it's fine there.
It just isn't called by Bukkit's event stuff.
OK.
With nesting, I'd just like to say, I guess I kinda code in the way that I would speak to someone.
give me 7$ more so I can buy nitro
I wouldn't say "If a player isn't sneaking, go away. If a player isn't holding down a button, go away. Then, make the player fly up in the air." I'd say "If a player is sneaking, and the player is holding down a button, make the player fly up in the air."
But I guess for readability, you're right, it is kinda bad practice.
i dont think the server knows what button you're holding down
that'd be kinda messed up lol
Yes, mainly if you need something after one of the ending braces, it's hard to tell after which if you're actually doing that.
That makes sense.
"Am I after this if statement or this if statement", you wouldn't have that if you returned early.
So instead of..
if (player.isSneaking()) {
if (player.isPlaying()) {
if (player.isPotato() {
if (player.isNice() {
doStuff();
}
return "Yay!";
}
}
}
I'd just have..
if (!player.isSneaking()) {
return false;
}
if (!player.isPlaying()) {
return false;
}
if (player.isPotato() {
if (player.isNice() {
doStuff();
}
return "Yay!";
}
?
Yes
OK makes sense.
Ah, for your fifth one.
ACF's tab complete auto registers it if you have an Enum.
I don't want players to be able to play any sound (then they'd be able to play music discs and annoying stuff) so I limited to only the BLOCK_NOTE_ sounds.
Oh, you're using it for ACF. Then it's fine imo.
Is there a better way of doing that..?
For your last one, can you explain what you mean?
Boxed classes?
Boxed classes are Integer, Double, Boolean etc. instead of the normal primitives, int, double, boolean etc.
(they like using complicated names for simple stuff)
I would change it to the normal primitives and then set them to the default value by default. So you make amount an int and set it to 1, same for the others. That way you don't have to check for null and can directly apply them on the item stack.
Hey that makes a lot of sense!!
In ConfigUtil I had this bit, and for some reason my plugin is really disagreeing with default config values.
so I had to use item.isSet("amount") ? item.getInt("amount") : 1, instead of item.getInt("amount", 1)
so apparently discord has this interesting look for greentext
If you want I can link to the Discord messages on that whole debacle, but anyway, it's super annoying because I think ItemStacks should have an amount of 1 on default but hey now I realize why.
Thanks a bunch that's so silly why I didn't do that.
except it's not green
you're late
yes I am
greentext
OK let me change a bunch of stuff thank you so much for those criticisms it helps a lot.
I have seen those messages about the default values btw, don't know why it doesn't work correctly.
I thought it was an embed and that people were self-botting
I don't either, but I did do some experimenting and I think I found out the cause.
yes, everyone decided to start self botting today
private void setupConfig() {
getConfig().options().copyDefaults(true);
getConfig().options().copyHeader(true);
saveDefaultConfig();
}
I have that in my onEnable() and if I remove copyDefaults, it works just fine.
But you see in my ConfigParsers (I think I'll rename it to ConfigUtil) how I have the getPage method?
pages.getKeys(false).size() completely messes up if .options().copyDefaults() is set to false.
It only shows the size it's loaded almost.
So if you do (for example) /rules 1, it shows Rules | Page 1/1, then /rules 2, it shows Rules | Page 1/2, then you do /rules 1 again, it shows Rules | Page 1/2
It's really weird stuff.
Only loading in the keys when it's specifically asked for or something like that I'm guessing.
you really don't need those first two lines
So I just decided on keeping copyDefaults() and having the good pages.getKeys(false).size() functionality rather than having defaults working I suppose..
but it seems really hacky and messy and I'd like to get to the bottom of why it's acting so weird.
nice coverup
IRC never forgets
Oh yeah, with an open source plugin, how would I do MongoDB and not share the database code?
Get it from a yaml config that I keep separately?
The database code entirely, or just the password to the database?
Password to the database.
Oh, I'm trying to extract from AntiBuild. I'll have another method and pass through the event from there?
PlayerEvent, that is?
Yes
What about the things like EntityDamageEntity, should I cast to a player event?
Or should I, in the method, collect all events and cast to a player event there somehow?
ahg, PlayerEvent doesn't have setCancelled, it's specific per event.
Oh yeah Bukkit's event system is stupid. Ehm, use the lowest possible. If it doesn't work out, then I guess just keep it there.
So I guess I just kinda have to keep it the way it is?
I can't put the setCancelled in a more generic method, it's per event only..
A rare sight for New York, indeed lol
Only thing I could put in a method is the player.sendMessage() but that's kinda useless, I don't know.
What do you think I should do?
Helen carried the sandwiches on her lap throughout her flight from San Diego to JFK Airport, but after landing, she ran to catch a bus for home and ended up dropping one Double-Double on the road.
Keep it like it is now, I suppose.
(the confusion is that In-N-Out is almost strictly a California burger chain, you won't find it in New York or on the east coast anywhere)
@upper flicker if i rewrite paper downloader in C you better use it
Actually, you might be able to specify a <T extends PlayerEvent & Cancellable>, set T as parameter and work from there. Would have to try though, can't really tell you from the top of my head if this would work.
so..
void onAntiBuild<T extends PlayerEvent & Cancellable>(Event T)
?
Sorry I'm not very used to generics.
No, it would be along the lines of:
public <T extends PlayerEvent & Cancellable> void methodName(T event) {
}```
I think.
I remember back when I thought that turning off my wifi on my computer would stop a ddos attack
and that software ddos protection on windows would work
those were the days lol
So what we're doing is upcasting, right?
Making a more specific class into a less specific one?
Or is that downcasting.
I think that's upcasting, anyway, it's working!
You're downcasting cause the event class is more specific then the T is.
In your opinions, how many blocks big of a map would you have (world border) for a server that averages 50 people on at once and around 100 a day? 
Such as BlockBreakEvent..
That's kind of silly, if BlockBreakEvent has getPlayer() why doesn't it extend PlayerEvent, hm.
Because it extends BlockEvent already.
Yeah, what a shame you can't extend two classes. That'd be complicated to work with though.
you changed name again
That's one of the issues with the current event system imo, the PlayerEvent, BlockEvent etc. should've been interfaces.
Maybe if PlayerEvent was an interface, but anyway, what should I do with those, any ideas?
Could make another method and change it from PlayerEvent to BlockEvent, but it's only two methods that use BlockEvent in this case, so I understand it if you just keep them like they are now.
if you ever need, you can also make your own classe that extends an existing Event class
I'd leave the others like they are now though, iirc there's only one hanging event handler.
PlayerEvent is abstract, didnt need to be an interface
it contains the things that all inheriting events use, like the Player variable
Yes, but now you can't make an event both be a BlockEvent and a PlayerEvent.
(DiscordBot) Windows things : ProgrammerHumor - 0 comments, 1 point - kurdy, 6m ago
I see what you mean
Which is desirable in this case, since there are events that are both block and player related.
stupid question. i guess its not possible to run an ide through SSH in linux?
or well, properly interact with it
Because there are block events that now just have a getPlayer method without being a PlayerEvent. This complicates stuff, cause I can't downcast the event to a PlayerEvent, and thus can't easily get a player from all types of player related events (because not all player related events extend PlayerEvent).
do like everyone and listen to all events that you need?
I've listened to multiple block and player events for PlotMe back in the day and I understand your problems
Yes, but then you need multiple methods that essentially do the same, which leads to code duplication, reduces readability, etc.
yes
It's the best you can though at the moment, but it would have been nice if the event system was done using interfaces, not abstract classes to begin with.
Changing it now, after what 7 years might be too late :/
You could add interfaces wihtout breaking it tho mayhaps?
I still think that for 1.14, 1.13, 1.15, the bukkit API should be slightly rewritten.
It's been almost 10 years.
It's OK if a few breaking changes are made so that it better fits to the current state of Minecraft.
too bad paper can't diverge from spigot
Sponge is a great project, don't get me wrong, but I don't think that we need an entirely new API from Bukkit just to make a better one.
Hey did you know server folders are coming to discord
A few changes here and there, maybe ChatColor implemented a bit differently, would all be a very big help to plugin developers. Added to this, 1.13 had so many breaking changes already (Material enum for instance) that plugin developers needed to change their plugins anyway.
Sponge isn't aimed solely at fixing bukkit
Part of their goal is supporting mods, which would require a substantial redesign of bukkit if you wanted to pull it off
While we're changing ChatColor, please rename it as well, thanks.
Yeah, I agree.
There are so many changes I'd make to the API, I don't think any plugin would still work if I introduced them tbh. But I think if you slowly start deprecating some stuff, introduce better stuff, the API would become a whole lot better than it is currently.
Nossr๐ฆ can you please put a
reaction to stef's message so I can put one too?
someone should rename that disgusting translateAlternateColorCodes
Thanks.
I wonder why aliases to translateAlternateColorCodes haven't been introduced to Paper
aliases are just pointless fluff
Not entirely fond of some of the other dozen helper methods that have been added to the api, but stuff like that just breaks api compat with bukkit for no reason
fun String.translateColors(): @NonNull String {
return ChatColor.translateAlternateColorCodes('&', this)
}
Then again :3
Was there any new items intorduced in 1
14?
Ty
is that kotlin and why did you post that
Yeah that's Kotlin
poop
is it safe to replace region files live if the area is unloaded
Basically, "&3Test".translateColors()
Electronic how would you do that in regular Java?
that reminds me of Manifold
And does that compile to
You can't
translateColors("&3Test")
Basically, for the JVM, kotlin turns that into a static helper util type method
That's what I thought
public static String color(String string) {
return string == null ? null : ChatColor.translateAlternateColorCodes('&', string);
}
I have this lil thing.
I'd imagine it's doing something like that?
Why do you check if the string is null?
Because if I don't, it'll throw an exception.
I hate littering codebases with static, but kinda, no null check because we should never care about null
Why would it be null
liter ur code with method extensions instead? 
something.getInteger()
extention methods look nicer, imho
Can't liter your code if you aren't the one writing it
idk I really just like knowing if that's a method on the object or some bullshit helper u've used
and u can't tell :>
.eta
Anyone requesting an ETA will be fed to goblins.
ha got you to it
Notepad number 1
no problem
No errors
if chunks doesn't appear to have issues for the next week I'll start nagging people to begin reviewing it
[-d] [-w <who>] <when> <message...>
and that's begin reviewing it
it's a big patch so don't be surprised if that takes a week or more
given people's available time
.remind
[-d] [-w <who>] <when> <message...>
dont do it, havent you heard, his build breaks ur terminal
-remind -w @fallen oracle 6d Report issues
break ur terminal byte
.remind -w @Glรคre 6d Report issues
DiscordBot: Reminder set for 6 days from now.
OH I forgot
I set a lot of reminders for future me, I wonder if any of them have gone through
DiscordBot: Reminder set for 1 year from now.
I'm gonna search "reminder for"
DiscordBot: [Auto] We're now known as Paper.
DiscordBot: Reminder set for 3 years from now.
hold on
Lol
Also barty.
oof
Spotted: 3
Landis: 1
Wiz: 2
Jan: 1
Barty: 2
Not that many once you realize some are questions.
.remind 150y Have we merged into a singularity yet?
DiscordBot: Reminder set for 2 centuries from now.
I'm going to back to being productive and implementing those changes Stef suggested.
bot aboos
MATE
damn that's old, where have I seen that from
debian? xD
standrad Debian installer
ye lol
i wanna make some packages
don't
would i be allowed to make a package that downloads paper versions using its api? if thats even possible, should be right?
wdym
at the rate paper updates, distro packages are not ideal no
since ya'll nubs complaining about my installer being windows only
oh that
why so? it would just fetch the latest version?
make a cli
if it was like a paper version manager, that's more useful
well its more like a package you install that lets you run commands to update etc
im bad with linux terminology
sounds a bit like a version manager, but not sure
where's z
the API is there to be consumed
basically what paper downloader is, but for CLI
it's not the actual software, it's the software that manages downloads/updates of the actual software
Would be kinda pointless if we exposed an API for all this stuff and documented it and told people not to use it
might just not be its intended use ๐
a CLI tool that leverages the API to let people download whatever major release and keep it updated would be a packagable tool probably
https://github.com/electronicboy/parchment-docker/blob/master/bootstrap.sh#L15 | Do you like bash?
but realistically is it more than a simple shell script with some getopt arg handling? ๐
make cli to allow you to fetch specific version or commit and build it from paper's repo
isnt that pretty much what the api does?
the API exposes available downloads
doesn't api just let you download paperclip?
Yea
i mean, that's good enough
it also lets you know what versions are available
xD
electronic what does the text inside of your head say?
what downloads are available
It's 1s and 0s
i use the api already
oh.
just not sure how the backend of it works
Some company I was doing stuff for a good few years made it, so I just kinda kept it
looks like that was decades ago
probs 2013ish
Give or take 10 years
loool
whats so funny
electronic is that your face shape but like photoshopped to a shadow?
Yes
ur nose is weird

no that's actually Z's eye photoshopped into a head
*Z's
jah

server folders finally 
still just in canary aren't they?
why does it hate me so much xD
git gud
i mean, i'm literally using the password i gave in 10 mins ago
ยฏ_(ใ)_/ยฏ
fucking kek
ur not doing so gud with this whole linux thing are you ๐
well wtf do i do though, i cant become super user/root and i cant install sudo if i'm not root ๐ค
well, you have to su, and if the password is wrong, that's on you
i mean, its the same pass for root and my user
...
i had to confirm it, so its right for sure
Well this is something new https://m.imgur.com/r/Minecraft/ghiPmoG
oh ffs
inb4 password+confirmation was copy/pasted
oh you have a password that requires numlock? lol
Apparently you can see through these if you throw them down
numpad, even
It allows you to see through trapdoors and stuff
so i was right, it's ur fault ๐
Can i blame the hardware?
maybe like 10%
ive been trying to get it fixed in like forever
no, I just got them on android mainline
tries to install vmware tools REE U CANT DO THAT CUZ U DONT HAF FIL X KTNXBYE
loving the linux experience ๐
Why can't you install VMware tools?
i dont even know what half of that means
hi
Opening blender on windows = around 48 seconds? idk maybe more 60 idk, just a lot of time
Opening blender on linux = around 0.8 second, literally, blender opens under second
Case in point: Linux sucks because you don't have time to go make a drink while waiting for blender to start

:DD good point
say what you want but their default UI sucks, on all distros ๐
TIL that yaml supports aliases
aliases? huh?
creatures:
# Vanilla mobs, from https://minecraft.gamepedia.com/Data_values/Entity_IDs
Creeper: &creeper
aliases:
- c
- creep
- cataclysm
enable: true
enableCraftingSpawner: true
enableSpawnEggOverride: true
displayName: Creeper
creeper: *creeper
I have this little thing:
@Default
@CommandCompletion("@players")
public void onOntime(Player player, @Optional OnlinePlayer target) {
if (target == null) {
long millisPlayed = (player.getStatistic(Statistic.PLAY_ONE_TICK) / 20) * 1000;
player.sendMessage(new MsgBuilder().def("msg.ontime").replace(MiscUtils.fancifyTime(millisPlayed)).build());
} else {
Player targetPlayer = target.getPlayer();
long millisPlayed = (targetPlayer.getStatistic(Statistic.PLAY_ONE_TICK) / 20) * 1000;
player.sendMessage(new MsgBuilder().def("msg.ontime_other").replace(targetPlayer.getDisplayName(), MiscUtils.fancifyTime(millisPlayed)).build());
}
}
I'm trying to make it a tad less redundant.
(extracting it, per Stef's criticisms)
Could I perhaps do that along the lines of..
Player targetPlayer = target == null ? player : target.getPlayer();
long millisPlayed = (player.getStatistic(Statistic.PLAY_ONE_TICK) / 20) * 1000;
if (target == null) {
player.sendMessage(new MsgBuilder().def("msg.ontime").replace(MiscUtils.fancifyTime(millisPlayed)).build());
} else {
player.sendMessage(new MsgBuilder().def("msg.ontime_other").replace(targetPlayer.getDisplayName(), MiscUtils.fancifyTime(millisPlayed)).build());
}
Is that still too redundant or is it better?
I'm thinking the target == null in two places is a tad redundant, should I put that as a variable?
The main issue is that it sends a different message based on if it's selecting another person or not. Even though it's a minor cosmetic change, I still like it better and I prefer to put functionality and looks of the server above the looks of the code. (but I mean still trying to make the code look good wherever possible :P)
I guess the second way is better so that way if I change the way of getting statistics it's less error prone for me to forget to change the other? Somehow better I suppose.
interesting
Whatโs the No Table role?
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
oh no! who took your table
Barty you shoulda seen this one dude I played mc against (opposite sides of the great war of blasphemy) who was playing on one of those old ass 15 inch (or less?) CRTs where it couldnt display colors right and always had a heavy orange tint.
rest of his game room looked great, just the ancient computer and screen
.flags
Optimized & Recommended JVM Startup Flags: https://mcflags.emc.gs
I meant this discords FAQ, so i don't actually ask questions that were already answered
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.
Okay, where could someone take a look at my timings report and help me?
what is the /trigger command and should i be disabling access to it
This Minecraft tutorial explains how to use the /trigger command with screenshots and step-by-step instructions. You can use the /trigger command to create a trigger that sets or adds values to scoreboard objectives that trigger enabled in Minecraft.
im doing someshit with scoreboards so i should disable this right
Am I the only one who always writes accidently pex instead of lp?
this is epic
https://i.imgur.com/ePXTmdK.png /r/dontyouknowwhoiam
no who r u
wiz u just make exceptions
Cut them off
ive tried
I meant your toes
my toe joy is the fact that my nails "weak point" is behind the end of where the toe should be, so it's pretty easy to end up with the nail too short if I'm not careful
used to just use a pair of nail snips to ensure that it wasn't cutting into the skin \o/
ive been to the foot doctor so often
DIY woo
im hoping soon all my problems will be solved, last time he didn't even fix it
See, I had the surgery but it didn't work properly, and some level of "fuck that shit again"
so, apparently flying at 500 blocks a second is totally normal according to mojang https://bugs.mojang.com/browse/MC-131716
@golden gust my nails grow into the side of my toe where I can't get to it
Yeaaaa....




