#help-development

1 messages · Page 93 of 1

dim bronze
#

windows < mac < linux

tender shard
#

the best OS is the one you are familiar with, and that get shte job done

quiet ice
#

linux is neat, but really depends on your workflow and what you actually do

tender shard
#

yeah

#

I'd NEVER EVER wanna use linux as desktop OS

quiet ice
#

For graphics designers I'd advice not to use linux

hoary lance
#

Mac is irrelevant

dim bronze
#

I mean, yeah, it completely depends on workflow

#

but most people here are developers, and linux just makes everything so much more convenient

hoary lance
#

Fuck apple

lost matrix
#

Temple OS > everything else is just an esoteric useless OS

quiet ice
#

For java programmers linux is semi-neat, though for C/C++ windows might be nicer

dim bronze
#

but obviously for anything media related mac is better, gaming is the only reason i dual boot

hoary lance
#

Linux is cool bc Linus Torvalds was Finnish :catnod:

tender shard
#

Wanna be creative? Mac -> Windows -> Linux
Wanna calculate Pi to the 1241573th digit? Linux -> Mac -> Windows
Wanna play "Harry Potter Part 1"? Windows -> Linux -> Mac
Wanna play "The Sims"? Windows -> Mac -> Linux

chrome beacon
#

Some mac book models have a flaw that can kill your sdd

hoary lance
young knoll
#

It’s a feature

frail gale
chrome beacon
#

By sending too much power in to it

hoary lance
chrome beacon
#

That makes all data unrecoverable

tender shard
quiet ice
frail gale
tender shard
quiet ice
#

But solaris takes the crown 😉

dim bronze
#

I'd argue that linux is way more desirable for a c developer than a java devloper

lost matrix
hoary lance
frail gale
#

I'm also waiting for Jailbreak to drops on iOS 15 and then start to also program Tweaks on iPhones and I'm thinking on which OS to do it

hoary lance
#

Linux isn't bad for programming games tho windows might be a bit better

quiet ice
#

The issue is debugging

hoary lance
#

I use windows 💀

quiet ice
#

Noone will care if you do not debug on linux, but if you do not debug on windows your head is off

#

In server space it is a bit different tho

lost matrix
#

Linux is horrible for certain game engines. Almost unusable.

frail gale
tender shard
#

I really hate that people just compare stuff like this:

  1. My cheap laptop has 4.5 GHz with 6 cores and 16 GB of RAM
  2. The macbook only has 3.2 GHz with 4 cores and only 8 GB of RAM
    But they completely ignore that
  3. the macbook has an asio soundcard with only 2ms latency
  4. etc etc etc
#

numbers are numbers

young knoll
#

I mean

quiet ice
#

-.-

tender shard
#

you do you

young knoll
#

How many people need a asio soundcard with 2ms latency ?

tender shard
dim bronze
#

mac pro maybe

young knoll
#

Fair

dim bronze
#

not people that buy a mac

tender shard
#

but yeah

tender shard
#

for most users, it's unneeded @young knoll

#

you're right on that

lost matrix
#

If you buy an apple product for personal use then im instantly assuming that you have
little knowledge about hardware components and only want an easy to use, colorfull ui with round symbols.

frail gale
# hoary lance Ew I hate apple

I don't hate them but I hate how they are restricting everything on the iPhones like bro I bought this phone and I wanna be able to do whatever I want to do on it but I can't without a Jailbreak

tender shard
young knoll
#

I guess tbf the average computer user is using netflix, outlook, and microsoft office

young knoll
#

So they probably don;t need 16gb of RAM either

hoary lance
tender shard
quiet ice
hasty wasp
#

Razer Blade > Macbook Pro

tender shard
quiet ice
#

Weak point imo

echo basalt
tender shard
#

apple IS EXPENSIVE, not gonna deny that. but it also offers that you normally do not get in any other consumer hardware

lost matrix
#

There is nothing to agree on. You are paying a huge premium for the brand and apple
heavily aims on pulling more money out of your pocket with their customized IO

chrome beacon
echo basalt
#

I bought a crappy windows laptop like a year ago for 600$ and the screen is dogshit

#

battery is also kinda crappy

tender shard
hoary lance
frail gale
# hoary lance ??? Apple restricts everything

yeah I got lucky that my iPhone shipped with iOS 15.1 because this version is vulnerable to some exploits and right now there is some drama in the Jailbreak comunnity and so on but I hope we are gonna receive a Jailbreak to the end of the year

echo basalt
#

cooling was dogshit as well and the cooler's screws were stripped from the factory

tender shard
#

since m1, not so much anymore

echo basalt
#

that haven't been washed out 25 times

frail gale
echo basalt
#

I also only use my laptop for work

tender shard
#

I totally agree that apple stuff is very expensive. but. here's the thing: try to get a laptop with a 4k resolution that lasts for 8 hours and has ASIO support. Good luck in finding ANY.

echo basalt
#

But at least on my desktop I can look at intellij and say it has more than 1 shade of gray

hoary lance
lost matrix
#

I cant take a company seriously that wants thousands for a monitor stand. Absolute clown company.

echo basalt
#

Only reason why I haven't bought an m1 laptop is because MacOS is janky

quiet ice
tender shard
tender shard
frail gale
echo basalt
quiet ice
#

I have next to no knowledge about hardware

echo basalt
#

Sure it's locked down and overpriced and all but most macbook users actually get work done with their laptops

tender shard
quiet ice
#

For me a 4K monitor is just as good as a 720p monitor

tender shard
#

for you

#

yes

tender shard
#

but not everyone is you, I guess

hoary lance
tender shard
#

it isnt

#

it is expensive

#

but it also offers way more than other companies do

hoary lance
#

No

#

Apple literally restricts everything

tender shard
#

no, it doesnt

frail gale
tender shard
#

you get a full featured UNIX os with root permissions

echo basalt
#

The thing with apple is that they do one thing very good

frail gale
#

for iOS it's true

quiet ice
#

Our ancestors were completely fine with much less powerful hardware, so I really don't see why we can't live with similar stuff these days

echo basalt
#

For iphones, the camera quality is great

tender shard
#

yeah I agree with that

#

yes, iOS is extremely restricted

frail gale
#

in iOS you get root only when you're Jailbroken

echo basalt
#

For macbooks, you get a decent screen, decent cpu performance and decent battery life

frail gale
#

MacOS it's not that restricted

tender shard
#

but I thought we walkted about mac and not iphone

hoary lance
hoary lance
frail gale
tender shard
#

seems like people run out of arguments why macs are shitty so they go onto bashing iOS instead now

echo basalt
#

I have minimal respect for macs

tender shard
#

I fucking hate this company

echo basalt
#

iphones are for wannabe rich kids and camera addicts

hoary lance
#

App Store has dumb policies

tender shard
#

but mac computers are awesome

#

I fucking hate apple but macbooks etc are awesome

lost matrix
echo basalt
#

I feel like there's so much choice for windows and android

frail gale
# hoary lance They block half of apps

not only that they block customization like Animated Wallpapers, Many many themes, custom sounds like Ringtones and Notifications 3rd party app installing and many more things

echo basalt
#

that going with apple ensures a consistent experience

tender shard
hoary lance
chrome beacon
#

No one has mentioned that Apple stores user info in a datacenter owned by the chinese goverment. (Only chinese data as far as I'm aware) And then proceed to talk about privacy.

round finch
#

help has turned into general lolz

echo basalt
frail gale
tender shard
#

I liked apple until steve jobs died

#

steve jobs was a jerk but he had tgood ideas

frail gale
hoary lance
round finch
echo basalt
#

apple's target audience isn't for tinkerers

#

type deal

frail gale
echo basalt
#

I don't use animated wallpapers, or ringtones

round finch
#

innovation is key!!!!!!

echo basalt
#

neither do I install custom apps on my android phone because I simply don't need to

hoary lance
#

I have so many third party apps

opal juniper
frail gale
# hoary lance ?

you can install only 3 3rd party apps on iPhones with Sideloading and being able to use them only for 7 days after that you need to refresh them if you don't then they will just not gonna work

echo basalt
#

I literally just use my phone for like 3 things:

  • playing clash of clans
  • checking discord
  • calling my friends to threaten their life
opal juniper
#

COC!!

echo basalt
#

I don't think I need third-party apps for that

tender shard
#

and, I still stand my ground: you cannot just compare those two things:

  1. 8 cores, 3.6 GHz, 16 Gb RAM
  2. 8 cores, 2.9 GHz, 8 Gb RAM

But guess what? Number two has ASIO support, a superior operating system that won't drain your battery within 4 hours, and has 4 USB-C ports builtin instead of legacy connectors, etc etc

frail gale
opal juniper
#

what town hall

young knoll
#

I just run random third party stuff on bluestacks

grim ice
echo basalt
#

but I'm maxing everything

hoary lance
tender shard
#

people who just compare "ghz" and "ram" are kinda short minded imho

hoary lance
echo basalt
#

MacOS in theory uses less ram so 8gb is fine enough

tender shard
#

unless they really only care about pure RAM and GHz stuff but tbh

echo basalt
#

my windows laptop has 12gb ram but 2gb is dedicated to the gpu

echo basalt
hoary lance
hoary lance
#

I hate tencent

grim ice
#

the stuff u mentioned dont really look like disadvantages

tender shard
grim ice
#

theyre negligible

chrome beacon
hoary lance
opal juniper
#

in th 9 now

tender shard
hoary lance
#

And the Chinese government :troll:

young knoll
#

doesn't Tencent own a share in like

#

Fucking everything

grim ice
#

discord

#

41%

#

yes.

frail gale
chrome beacon
tender shard
#

I actually have a good explanation

hoary lance
tender shard
#

Mac vs "normal PC" is like Merceces vs Toyota

young knoll
#

Apple HQ is in the US

#

Manufacturing is not

hoary lance
frail gale
grim ice
#

why do u need a fast car

tender shard
#

both are cars. Both can drive. But the Merceces is 3x as expensive. However it comes with a seat heating system, double triplle airbag system, and stuff. While the Toyota also has an engine and 4 seats, but that's it

frail gale
grim ice
#

so ur telling me on my to work or school

lost matrix
grim ice
#

ill have to drive on 400 km/h?

tender shard
grim ice
#

that sounds like a very weird comparison

quiet ice
#

Mercedes is overpriced

grim ice
#

speed is really useless on cars imo, the ones intended for use that is

tender shard
quiet ice
#

Here, I said it

hoary lance
#

Apple is overpriced and has a shitty os

frail gale
hoary lance
#

Fuck macos and fuck ios

tender shard
lost matrix
frail gale
tender shard
#

Fuck Obsku. He's not smart and just writes something

quiet ice
hoary lance
#

But who tf jailbreaks

tender shard
#

is this a joke

#

because even old grandmas go way faster than 120

lost matrix
frail gale
tender shard
#

you can literally get stopped by police if you go SLOWER than 130 kmh

quiet ice
#

The fastest you can get on a german highway is 80 kmph without breaking traffic laws

hoary lance
young knoll
#

Highways are 100 here

tender shard
young knoll
#

Most go 120 tho

tender shard
#

in germany 130 is basically the "minimum limit"

quiet ice
hoary lance
frail gale
quiet ice
tender shard
grim ice
#

just use a tiguan

hoary lance
#

I've never been in Germany

frail gale
hoary lance
#

I want to visit Deutschland tho

tender shard
agile anvil
#

tbh, sometimes I go up to Germany to travel in the south, cause it's way faster to go 250kph than going straight at 130 😉

grim ice
#

tiguans here cost like $60,000

quiet ice
#

I have two parents that are very aware of traffic laws, never got stopped despite going 90 kmph (+ the car would disintegrate when going over 120 kmph)

tender shard
#

all I said is that police would think you're "sus" if you drive that slow

lost matrix
#

But ive been in the car with my dad (who liked to drive a bit on the faster side) on one of the faster roads at 240 kph and
we literally had an AUDI coming from behind, driving quite a bit faster, flashing us.

hoary lance
#

My dad got a fine for driving like 74kmh when the speed limit was 70 in Estonia 💀

young knoll
grim ice
#

i want a police officer to call me sus at least once in my life time

quiet ice
grim ice
#

or amogus, that would enlighten me

frail gale
young knoll
#

"Sir do you know why I pulled you over"

quiet ice
#

But I haven't recieved proper police training

young knoll
#

"I saw you vent"

lost matrix
grim ice
#

LMAO

tender shard
# quiet ice I don't really know why they would think that

dricing anything below 130 kmh on the autobahn is indeed sus. idk, i usually also dont drive much faster, but if i'd see someone going only 100kmh on the autobahn, I'd instantly think "damn that dude smoked a bit too much weed lol"

young knoll
#

Is there a minimum

tender shard
#

yes

#

60kmh

young knoll
#

60 it is

tender shard
#

well even trucks drive 80 (legally) or 90 ( in real life)

quiet ice
lost matrix
frail gale
tender shard
#

the limit of 60 kmh I just mentioned is a bit weird

#

it doesnt mean that you actually have to drive at least 60+

quiet ice
#

And even then it is kindof hard to find a route where you can go over 90 due to all the road/bridge maintainances here in germany

tender shard
#

it just means that your car / vehilce must be able to drive at least 60kmh

#

but in theory, you could also just drive 20 kmh on the autbobahn

#

e.g. if it's very snowy or sth

frail gale
tender shard
#

haha

#

yeah the actual legal limit is 80 for trucks

quiet ice
tender shard
#

but you can do 10+ without getting any fine

hoary lance
frail gale
#

idk

tender shard
#

because noone had any question

#

so it's fine 😄

frail gale
#

yeah

#

xD

tender shard
grim ice
#

here u go

#

i have a question

tender shard
#

here's a tiny video about the german autobahn

grim ice
#

ez

tender shard
frail gale
#

I like how we first was arguing about Apple and then we started arguing about Autobahns

tender shard
#

that's how it works here

frail gale
#

what was that

grim ice
#

nothing

chrome beacon
#

._.

grim ice
quiet ice
tender shard
#

you are probably referring to insurance stuff, I guess

quiet ice
#

I.e. the act of going 400 kmph might be fine, but there are limitations with what you can do while doing it

frail gale
tender shard
#

the same rules apply to people who go 50kmh as the rules for people who go 400lmh

lost matrix
tender shard
#

you ight be talking about the "Richtgeschwindigkeit" of 130kmh

tender shard
#

MOST autobahn parts do have a speed limit

quiet ice
tender shard
#

IIRC only like 40% or so of german autobahn are actually "go how fast you want"

young knoll
#

so on that 40% I can bring my rocket sled

tender shard
#

you know geol, it always depends on the situation

quiet ice
tender shard
#

for example, just imagine the following situation: you go 400kmh on the A43 where there simply is no speed limit

#

now someone just right in front of your car

#

and obv you kill them

#

not your fault, in this case

quiet ice
#

Uh it is

#

No matter the speed

#

They even could be at a standstill

#

Unless you prove that it was malicious or whatever

tender shard
#

another example: you go 400kmh overtaking other cars, and someone switches lanes. it's now "kinda" your fault because you are expected to know that people cannot "judge" your speed

tender shard
young knoll
#

Over here at least pedestrians always have the right of way

#

Granted

grim ice
#

mfnalex sounds like a person who overspeeds

#

kekw

young knoll
#

I don't think there are many pedestrians on the autobahn

tender shard
#

there is the "generelle Betriebsgefahr" that your car has, but you dont gotta prove that by just driving on the autobahn

lost matrix
#

Anyways here is a way to rename the inventory of a chest (Or any container really):

  public void renameBlockContainer(BlockState holder, Component title) {
    Preconditions.checkArgument(holder instanceof BlockInventoryHolder);
    Block block = holder.getBlock();
    BlockPos pos = new BlockPos(block.getX(), block.getY(), block.getZ());
    CraftBlockState craftBlockState = (CraftBlockState)((BlockInventoryHolder) holder).getBlock().getState();
    LevelAccessor levelAccessor = craftBlockState.getWorldHandle();
    BaseContainerBlockEntity blockEntity = (BaseContainerBlockEntity) levelAccessor.getBlockEntity(pos);
    Preconditions.checkArgument(blockEntity != null);
    blockEntity.name = PaperAdventure.asVanilla(title); // Replace this with some nms Component from Spigot
  }

Its actually just a field so not sure why this isnt exposed in the API

tender shard
#

because e.g. it's expected that for example, "fußgänger" are expected to kjnow that they shouldnt just walk around on the autobahn

young knoll
#

Does paper not have an API method to rename it?

#

Spigot does, with strings only ofc

quiet ice
# tender shard no...

All these insurance scams work due to such laws, and as such I am pretty sure that that is the case

lost matrix
young knoll
#

Lemme grab it

quiet ice
young knoll
tender shard
#

if you hit another car because the other car just hit the brakes, then obviously you didnt held the "security distance" / "Sicherheitsabstand", because otherwise it couldnt have happened o0

young knoll
#

Paper also has one

lost matrix
#

Why have i never seen this?

young knoll
#

For components

quiet ice
tender shard
#

of course you have to take of those things, yes

hoary lance
#

Gn I'll sleep 💀

quiet ice
#

So you can't just drive into the back of another car when going 400 kmph and be fine with that

tender shard
#

if you go that high speeds, the requirements between "Fahrlässigkeit" and "on purpose" are different, that's obvious, for sure

hoary lance
frail gale
#

does someone know why my ProtocolLib is spamming me some errors in the console

chrome beacon
#

What are the errors?

lost matrix
#

The new snapshots are rad

young knoll
#

Oh yeah isn't there like

#

A protocollib 5 in the works

frail gale
lost matrix
frail gale
lost matrix
quiet ice
#

then it is outdated

frail gale
quiet ice
#

unless you are on an older spigot ver that is

lost matrix
young knoll
#

What does it offer

frail gale
#

thanks I didn't saw that

wind tulip
#

Hey does anyone know a way to halt code for a few seconds without having to put it inside of a bukkit runnable?

#

Event-specific, so no thread.sleep

frail gale
#

what's the best way to use NBTTagCompounds?

#

right now I'm using them with Reflection

young knoll
#

Version?

frail gale
#

and in older version below 1.18 some of the names in the NBTTagCompound weren't obfuscated but right now all of them are obfuscated

young knoll
#

Correct

frail gale
young knoll
#

Use remapped

lost matrix
young knoll
#

Conveniently remapped is avalible for 1.17+

snow mauve
wind tulip
frail gale
wind tulip
#

It's uh

#

Okay I'll try and explain it

young knoll
#

Yes

#

But if you are using remapped why use reflection

#

Just have an implementation per supported version

frail gale
#

I'm doing all in one

young knoll
#

Ew

frail gale
#

also it have support for 1.16.X

young knoll
#

Reflection everywhere

#

At least it isn't uber slow as long as you cache everything

eternal oxide
#

?paste

undone axleBOT
frail gale
frail gale
young knoll
#

Is that for use with remapped?

lost matrix
#
  private final Timer timer = new Timer();

  @EventHandler
  public void onClose(InventoryCloseEvent event) {
    HumanEntity player = event.getPlayer();
    timer.schedule(new TimerTask() {
      @Override
      public void run() {
        player.sendMessage("Hi");
      }
    }, Duration.ofSeconds(3).toMillis());
  }

There is really no reason to not just use the BukkitScheduler but ok

grim ice
frail gale
young knoll
#

I assume it is since you only handle cb stuff, not NMS

wind tulip
#

I'm working on a tool to convert a custom block-based coding language from a server I play into spigot code (so that you can take your games off the server and onto your own). When generating the code, I store it as a bunch of nested arrays first, then format into text using a recursive function (this is in JS). The purpose of storing it in arrays is so that every code statement that extends into curly brackets will be easier to format (no awkward string manipulation). Example: https://pastebin.com/Tf58ttgq

So [parent, children] and children can be arrays if you're nesting those kinds of statements (sorry if this is confusing, but it's not directly related to my issue anyway so dw)

There is a particular scenario where I'd need to nest bukkit runnables, but since they have a dot notation at the end of the closing curly bracket (}.runTaskLater() as an example), it won't work with my current system and changing it on the JS side would be a little annoying to do so I'm just trying to look for an alternative

frail gale
wind tulip
#

you can view the source code for this on the website in my bio (not obf), however I really don't need to explain all this

eternal oxide
#

The one I posted works with remapped or not. it doesn;t care, it just returns an Object which you cast

wind tulip
#

I'm just looking for an alternative, but you asked for an explanation so 🤷

young knoll
#

Buti imagine it allows a single impl with remapped

eternal oxide
#

You keep all your NMS code in yoru class with its own imports, no CB stuff needed

young knoll
#

since only cb is versioned now

frail gale
#

it's good that I have the obfuscated method names from a site

young knoll
#
} catch (NoSuchMethodException | SecurityException | ClassNotFoundException e) {
            e.printStackTrace();
        }
#

ReflectiveOperationException :p

young knoll
#

Catching generic exception is smelly

#

no

#

Your ide will tab complete it anyway

#

Why does it matter

#

Eclipse can tab complete variables just fine

dim bronze
wind tulip
#

actually

dim bronze
#

I will say this method doesn't look ideal

wind tulip
young knoll
#

Machine generated code is always ugly

wind tulip
#

it's just not made for what I'm trying to expand upon atm

lost matrix
wind tulip
#

you're supposed to compile it yourself though

#

internally it's stored and manipulated as a bunch of arrays

#

the output is a string

#

although I'm pretty sure I just solved my problem

#

so it's fine

dim bronze
#

what's the problem with internally storing it as a single string?

wind tulip
#

I would have to manually indent everything based on context that can change as I generate the code

#

not only that but as it goes through the code thread (the one that it's trying to convert into spigot code), I'd have to insert stuff into a string

#

way harder and more awkward than a simple .push

dim bronze
#

why does indentation matter? is this intended to be read?

wind tulip
#

yes

#

the generated code is readable enough to where you can sort of modify it yourself

#

it's more of a design thing

#

it has been a priority ever since the beginning

lost matrix
#

Just create a one liner and use a beautifier

dim bronze
#

^^

wind tulip
#

I've been working on this for months and I can't tell you anything but I'm fine with how it is

#

you think it's a hassle to make it into arrays but I don't think that's so

dim bronze
#

🤷‍♂️ whatever works

wind tulip
#

even with a one-liner inserting code in between brackets is a lot more complicated than pushing it to an array

dim bronze
#

just hope it doesn't cause problems down the line

lost matrix
#

I would much rather use a tokenized approach...

wind tulip
#

in fact none at all

wary topaz
#

https://pastebin.com/qwHjgJew (CODE)
https://pastebin.com/CTK0JanK (MAIN)
So... I really am new to programming so don't make fun of me, 😄
I'm trying to make a fly command and if you enter /fly ingame, you fly (epic) but if you type a arg 1 and that arg 1 is a player, you fly that player. It's kinda simple and kind of not
I'm using intelligi.

#

I'm going to need a nerd to help me out 🙂

grim ice
#

So, what's the problem?

#

oh nevermind i already see it

wary topaz
#

🙂

#

alright

grim ice
#

the first 3 can be fixed

#

with intellij quick fix

#

and the last 2 same thing

#

the 4th one is because

#

when args.length == 0, that means the user simply ran the command

#

no other arguments

#

so like

#

if args.length is 0

#

it means the player ran

wary topaz
#

ohhhhh

grim ice
#

/<command>

#

if args.length is 1

#

then its /<command> <arg0>

wary topaz
#

Player target = Bukkit.getServer().getPlayer(args[0])
How come this is arg 1 than^?

grim ice
#

What?

young knoll
#

Indexes start at 0

wary topaz
#

I have that exact same function for my teleport command and it works.

grim ice
#

It does not

wary topaz
grim ice
#

🤦🏻

wary topaz
grim ice
#

and why do this?

                if (target.getAllowFlight()) {
                    target.setAllowFlight(false);
                    target.sendMessage(ChatColor.BOLD + "Flight is now " + ChatColor.RED + ChatColor.BOLD + "Disabled " + ChatColor.YELLOW + ChatColor.BOLD + "For " + args[0] + ".");
                    return true;
                } else {
                    target.setAllowFlight(true);
                    target.sendMessage(ChatColor.YELLOW + "" + ChatColor.BOLD + "Flight is now" + ChatColor.GREEN + ChatColor.BOLD + " Enabled. " + ChatColor.YELLOW + ChatColor.BOLD + "For " + args[0] + ".");
                    return true;
                }

just do this:

                    target.setAllowFlight(!target.getAllowFlight());
                    target.sendMessage(ChatColor.BOLD + "Flight is now " + ChatColor.BOLD + (target.getAllowFlight() ? ChatColor.GREEN + "Enabled " : ChatColor.RED + "Disabled ") + ChatColor.YELLOW + ChatColor.BOLD + "For " + args[0] + ".");
                    return true;
                ```
#

@wary topaz

wary topaz
#

😮

#

I never knew that was a thing!

#

Tyvm, i'll add that

grim ice
#

you use "!" to reverse booleans

#

so if its "true" itll become "false" and vice versa

#

and you use

#

the ternary operator

#

to shorten if statement that require return value

#

e.g

wary topaz
grim ice
#

public boolean isSteak(String food) {
return food.equalsIgnoreCase("Steak") ? true : false;
}

though in this case u dont need it, since equalsIgnoreCase returns a boolean anyways

#

oh u added an extra }

wary topaz
#

Look, this might be alot to ask for but can you fix the whole thing for me, I feel i'm going to mess it up again

#

I understand if you cant.

grim ice
#

i mean sure i guess

#

its pretty short anyways

wary topaz
#

:OOOO tysm!!!

#

You have no idea how much this means to me

grim ice
#

alright done

#

your package shouldnt have capital letters btw

#

and it should have a domain behind it

#

e.g

#

my website is dqmino.tk and my project is CuteSkins and the package is commands, ill have to do:

package tk.dqmino.cuteskins.commands;

#

if u dont have a website just do

#

me.<username>.<projectname>.<package>;

#

they should all be snake case

#
package Commands;
 
import net.md_5.bungee.api.ChatColor;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
 
public class Fly implements CommandExecutor {
 
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String [] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage("Only players can execute this command!");
            return true;
        }
 
        Player player = (Player) sender;
        Player target = player;
        String userName = target.getDisplayName();
 
        if (args.length == 1) {
            target = Bukkit.getServer().getPlayer(args[0]);
            userName = args[0];
            if (target == null) {
                player.sendMessage(ChatColor.BOLD + "" + ChatColor.RED + "Invalid Username, please check your spelling.");
                return true;
            }
        }
 
        target.setAllowFlight(!target.getAllowFlight());
        target.sendMessage(ChatColor.BOLD + "Flight is now " + (target.getAllowFlight() ? ChatColor.GREEN + "Enabled " : ChatColor.RED + "Disabled ") + ChatColor.YELLOW + "For " + userName + ".");
        return true;
    }
 
}
#

what the heck it keeps fucking up

ok i fixed it

young knoll
#

Yeah formatting do be like that

grim ice
#

mhm this is a lot shorter and cleaner now

wary topaz
#

😄

#

tysm @grim ice

grim ice
#

no problem

#

though you should learn more java when you finish ur plugin

#

would help you solve some issues too

wary topaz
#

👍

#

Are these errors optional?

grim ice
#

oh actually

#

lemme add something

#

mhm

#

copy it again

#

now it wont error

wary topaz
grim ice
#

if u misspell the username

wary topaz
#

That error happend on my teleport function and I dont know how to fix that

grim ice
#

ah

#

just add ""

wary topaz
#

Even looked it up and found nothing

grim ice
#

between the ChatColors

#

its when u have two chatcolors in front of each other

#

so u have to add + "" +

#

between them

wary topaz
#

😄 fixed

#

let me test da plugin 😄

grim ice
#

mhm

wary topaz
#

so far so good 😄

grim ice
#

send the error in console

wary topaz
grim ice
#

did u use what i sent u

wary topaz
#

Yep.

#

(Just updated that pastebin

grim ice
#

Ohhhhh

#

ah my bad i forgot something

quiet ice
#
    @NotNull
    private final IMappingProvider @NotNull[] children; // Line 154

Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.6.4:descriptor failed: syntax error @[154,36] in file:/home/Geolykt/applications/mods/sane-crab/gmt-maven-plugin/src/main/java/de/geolykt/gmt/deobf/remapping/MultiMappingProvider.java

I hate javac. I hate javac. I hate javac!

grim ice
#

aha fixed

wary topaz
#

Did you update the message?

wet breach
#

quite possible in how its doing it that could be causing issues

wary topaz
#

Oh wait shit wrong file

grim ice
#

lol

#

just do control+w

#

to undo ur paste

wary topaz
#

Alr

#

I do control z

#

Restarting the server.

grim ice
#

alright

#

u can also do /reload btw but its not recommended

wary topaz
#

wait error

grim ice
#

it sometimes bugs out plugins

grim ice
wary topaz
grim ice
#

dw about that

quiet ice
#

IJ moment

wary topaz
grim ice
#

its not intellij fault tbh

wary topaz
#

oh alr

grim ice
#

spigot fault if anything

wary topaz
#

when I import the plugin I dont do it right to the folder

young knoll
#

Eclipse doesn’t warn me about stuff like that

#

Could consider that a good thing or a bad thing

grim ice
quiet ice
#

How would you do it differently? Service providers?

wary topaz
#

I do it to a seperate folder and do this:
(start.bat)

:start
copy "C:\Users\ethga\IdeaProjects\BetterCommands\out\artifacts\BetterCommands_jar\BetterCommands.jar" "./plugins"
java -Xmx4096M -Xms4096M -jar paper.jar nogui
GOTO start```
grim ice
#

btw why is ur server having 4gb

#

wtf

quiet ice
#

"Class X is unused" is usually an unneeded warning

young knoll
#

Why not

grim ice
#

u dont need to use 4gb

young knoll
#

If you have the ram

grim ice
#

even 1gb is enough

wary topaz
#

wdym

#

I have alot of space idc

grim ice
#

its a test server

quiet ice
#

Note that there are many people these days that have 32+ Gb

young knoll
#

Mhm

grim ice
quiet ice
#

A Gb here or a Gb there isn't really the end of teh world

wary topaz
#

😄

grim ice
#

gg

wary topaz
#

tysm !!!

quiet ice
young knoll
#

Tbf

#

Ram is fairly cheap

grim ice
#

yeah except when u use a laptop

#

:(

quiet ice
#

It is pretty costly no matter the ram from what I find

grim ice
#

btw i wanna ask something

quiet ice
#

Much better than other PC parts though

grim ice
#

is having 2x 16gbs better than 4x 8gbs?

wary topaz
#

its like a usb, 4 is worse than 2

fringe hemlock
#

4x 16gbs

quiet ice
#

depends on the workloads ig

grim ice
#

theres something like dual thing

torn badge
grim ice
#

i see

wary topaz
#

its going to be slower for 4 times

quiet ice
#

but yeah, it is rarely going to make a difference

torn badge
#

If you already have 2x8, buy another 2x8

fringe hemlock
# grim ice i see

Basically what they are saying is, get 4x 16gbs snd@you’ll be ok :)

grim ice
#

yeah got it

#

not like i would ever get 32gbs

fringe hemlock
#

Yep 100%

grim ice
#

lmao

young knoll
#

2 vs 4 isn’t gonna make a big difference

grim ice
#

i would be fine with just 16gb

quiet ice
#

You'd only notice something different if you push it to teh system to the limits, at which point I believe the CPU might have a harder time managing everything

young knoll
#

But bigger single sticks tend to cost more

grim ice
#

or 24

fringe hemlock
#

4x 16gbs is 64 Gb LOL

grim ice
#

lmao imagine 64

#

thats literally a waste of money

torn badge
#

I got 32 because I wanted to run 3 instances of Minecraft, a server, chrome and IDEA lol

quiet ice
#

32 gb is very sufficent

wary topaz
#

alr ima try making the plugin do /gmc /gms etc 🙂

wary topaz
#

wish me luck

grim ice
#

u can do that with 12gb

#

lmao

fringe hemlock
#

I have 64 gbs of memory so I can finally have 1 chrome tab open

grim ice
#

bro spent that much on 32gb just to do that???

fringe hemlock
#

I have a 2x 32 gn

#

Gb

torn badge
#

*3 modded instances

quiet ice
#

I have 32 Gb so now I can run rimworld with 200 mods

#

Consumes around 30 Gb

young knoll
#

Tf

grim ice
#

intellij +2
mc +4 +4 +4
a server +2
chrome +2

grim ice
young knoll
#

I run fairly heavily modded rimworld with just 16

torn badge
#

MC 4+4+4

fringe hemlock
#

Chrome is 90% of that

waxen plinth
#

Swapfile

wary topaz
waxen plinth
grim ice
#

20gb

#

hm

waxen plinth
#

Fuck chrome

grim ice
#

well ii guess

#

but like

young knoll
#

Firefox > Chrome

grim ice
#

why not

#

shut down chrome when ur testing

#

it takes 1 millisecond to start up anyways? and it runs on the background with less resources

fringe hemlock
grim ice
#

or if ur testing a mod

wary topaz
#

use opera

grim ice
#

use gradle plugins to test with ur ide

waxen plinth
#

Use curl

grim ice
#

use ur mom ngl

#

best solution

young knoll
#

The best way to lower ram usage is to shut the computer off

wary topaz
#

epic browsers

grim ice
#

uuh u might wanna delete that

#

its spam kekw

fringe hemlock
#

I was reading that

wary topaz
#

mic should I dm it to u

fringe hemlock
#

Na imm@be fine

wary topaz
#

alr

young knoll
#

I use Netscape

fringe hemlock
#

Does anyone have the Microsoft global ban list

#

I wanna read it

young knoll
#

The words?

fringe hemlock
#

I wanna see who’s been banned

young knoll
#

Oh

#

I doubt anyone has that

wary topaz
#

Guys I got a question, like minecraft prefixes (&e) there are generators for easier use, is there generators for java development plugin prefixes?

fringe hemlock
#

Yea probably not as available as the Mojave server blacklist

#

Mojang

opal juniper
wary topaz
#

LOL

fringe hemlock
#

Yes I’ll email them for the list and probably get ignored

opal juniper
wary topaz
#

ty

opal juniper
#

but it’s normally only that chatcolours

wary topaz
#

wait how do I install plugins on intellij

#

i only have one and thats the spigiot

opal juniper
young knoll
#

I mean you can

#

Doesn’t mean you’ll succeed

wary topaz
#

nvm found it

#

where is it @opal juniper

hazy parrot
opal juniper
#

it’s the top one

#

you already have it

#

haha

wary topaz
#

no i'm talking about a way to make it easier

opal juniper
#

yeah, it normally has a colour picker or something

#

but, use chatcolor not the special character

wary topaz
#

yeah ik that

#

whatever nvm

#

Anybody know how to fix this error?

#

These errors*

young knoll
#

Those aren’t errors

#

They are warnings

#

First one is just how spigot be

#

Other 2 you can technically slap an Objects.requireNonNull on

#

But it doesn’t really matter

wary topaz
#

tf where do I put Objects.requireNonNull

young knoll
#

Clicking the warning will probably let you auto do it

fervent gate
#

How hard would it be to create a world for a dungeon each time a player (for now a single player) runs a command that they will be teleported to?

young knoll
#

Not hard

#

But they’ll probably be a noticeable lag spike

fervent gate
#

is there a better way to do that?

echo basalt
#

and pasting schematics slowly

#

or building all the chunk data async and load a .mca file maybe

fervent gate
#

Mk, I'll look into that

main dew
#

How I can disable sound from jukebox?

lethal coral
#

how can I get the amount of mobs that are acting towards the spawn limit

dusk flicker
#

I'm working on filtering player messages and I currently am using a AsyncPlayerChatEvent, is there a way (or another event) where I can set the message for each specific recipient?

young knoll
#

Not that I know of

#

You just have to cancel it and send them individually

#

Or use a packet listener

dusk flicker
#

Thanks Coll

mighty aurora
#

When I am using setItem for inventories(specifically a gui) will the index is that the item slot? and if so is it based on the top left slot being 0 or 1?

young knoll
#

Top left is 0

mighty aurora
#

ok thanks

wary topaz
#

How do I enable so when a player types in chat "&e EE" it replaces it with yellow, EE

#

Automatically*

#

In my plugin

young knoll
#

Use the chat event and run it through ChatColor.translateAlternateColorCodes

drowsy helm
lethal coral
#

persistent entities vs non persistent ones

#

like how you can do getMaxSpawnLimit for a world

young knoll
#

Probably NMS

#

Don’t think we have an api for that

drowsy helm
#

is there a quick way to replace a mob's sounds or do i have to use packet listeners

#

wait i could just make it silent then listen to events

lethal coral
#

that's true

#

you could also make a custom mob and modify its sounds 😂

#

with nms

worldly ingot
#

I mean the smarter thing to do at that point would just be to use ProtocolLib to change the sounds ;p

lethal coral
#

yeah

young knoll
#

You could also force your players to experience auditory hallucinations

drowsy helm
#

if were talking about efficiency, wouldnt making it silent + events be more efficient?

lethal coral
#

well probably not for walking sounds

#

or movement sounds

drowsy helm
#

yeah thats true

young knoll
#

can do the packet one async

#

So

drowsy helm
#

can pack listeners be async?

lethal coral
#

yes

young knoll
#

I assume a custom mob would technically be the most efficient

#

Yes

wary topaz
#

Yo anybody wanna help me with some code ;0?

drowsy helm
#

oh ez then

drowsy helm
wary topaz
#

how do I overlay default commands like /gamemode

drowsy helm
#

well tbh, my actual problem is silverfish arent properly spawning but im sort of avoiding the issue

#

commandpreprocess event iirc

young knoll
#

Overlay?

wary topaz
#

/gamemode is a basic command, I want a new output

young knoll
#

Override it with your own command

wary topaz
#

does it automatically do it?

young knoll
#

Yes

drowsy helm
#

for vanilla commands, yes

young knoll
#

And Bukkit commands

#

Afaik

#

Whatever is registered last gets priority, and plugins are obviously registering after vanilla and Bukkit

wary topaz
#

okay second question, i dont have any money so I can pay with the last of my robux from 2016 after I quit (500 I think), I need someone to make a QUICK code thing for me

drowsy helm
#

?services

undone axleBOT
drowsy helm
#

not here

wary topaz
#

Aight

worldly ingot
#

A thread probably will not be approved there if your payment is robux lol

young knoll
#

Damnit

#

There goes my plan for an offering thread where I take payment in Robux

drowsy helm
#

didnt think of they choco, hey

young knoll
#

You know what

#

If you make an officially recognized country

#

You’ve earned it

worldly ingot
#

lmao I agree

drowsy helm
#

every custom UI i try to make ends up looking like OR :/

#

messaged ben about it but he ignores me now

young knoll
#

Lol

#

I mean they use fairly vanilla looking UIs

drowsy helm
#

yeah thats my aim

young knoll
#

So of course they are gonna look similar

drowsy helm
#

im using a vanilla colour scheme and general aesthetic

#

just gdont want to impede on any IP

young knoll
#

This probably looks quite similar

#

Only so much room for innovation with the enchanting table UI

drowsy helm
#

yeah thats true

#

looks nice tho

young knoll
#

Idk I still want to mix it up more

#

I’m sure I’ll think of something

drowsy helm
#

is it a reskin of the actual ench table

#

or just a chest

young knoll
#

Chest

#

That does remind me, chests can be bigger than that

#

Idk what I could add with a bigger inv though

drowsy helm
#

just more enchants ig

#

does your system add any extra functionality on top of vanilla enchanting?

young knoll
#

Custom enchants

drowsy helm
#

so no extra bars or anything

#

hmm yeah thats sorta hard

young knoll
#

Now I'm curious what extra bars one would have

shadow zinc
#

this is going to take so long to build the spigot jars

vestal moat
#

when i use TerminalConsoleAppender in a standalone project, and use color codes in log messages, i am getting extra weird character in logs + doesn't color in intellij (im sure it supports it since [INFO] is colored)

fervent robin
#

Does the hello message send?

sacred mountain
#

I'm creating a moving gui, where the player can click an arrow to move it one slot to the left, and have a bigger grid not displayable that gets moved around, whats the best way to do it? the moving part and the creating of the inventory

#

id on't want players to be able to take items from the gui, like most plugins do

visual citrus
#

help

#

idk how to check entity moves

#

I want to use event

#

what can I do?

#

maybe you can use schedular

#

but I think it requires db

#

ty..?

#

is it event?

#

k

#

how can i use protocollibpackets to check movement

modest garnet
willow widget
drowsy helm
#

then check it

sharp flare
willow widget
#

yeah, that's what I want to avoid xd

drowsy helm
#

no?

valid sorrel
#

you can use java file api to save it

#

in the plugin folder

drowsy helm
#

you can create a file without it being in the jar

sharp flare
#

Well you can do FS methods to create a new yml file after load

#

Or during load

willow widget
valid sorrel
#

if you use the bukkit methods to get the plugin's folder

#

and save it to there

willow widget
sharp flare
#

Why avoid creation though, is it a big file

willow widget
#

you mean avoid creation in source?

valid sorrel
#

plugin.getDataFolder

willow widget
sharp flare
shadow zinc
#

any version after 1.17 doesn't use mojang remaps?

willow widget
sharp flare
#

I'd do a db for that

valid sorrel
#

maybe making it easier for users to read

willow widget
#

^

#

pretty much

sharp flare
#

Fair

#

Though commands exist

willow widget
#

I don't want to have my admins downloading something to read those logs + having to download the db each time to see it xd

valid sorrel
#

imagine reading 1000 lines of logs in a command

sharp flare
#

Pagination, etc

valid sorrel
#

it would be just easier to use your favorite editor

#

and read it from there

willow widget
# sharp flare Though commands exist

yeah but I also want it linked with discord and it is way easier to make logs for each day and send that file to discord instead of all the command hassle xd

sharp flare
#

Is it a yaml?

willow widget
#

yeah it will be handled like a config

sharp flare
#

My thoughts are off then since its for discord

#

Not the end user ingame

willow widget
#

yeah no, it is for admin only hehe

#

It was just quick research

valid sorrel
#

is it like en_us or en_US

#

confusing

willow widget
#

idk, test it out i guess

valid sorrel
#

The vanilla Minecraft client will use lowercase language / country pairs separated by an underscore but lowercase for all or only language

#

why tho xd

unkempt lava
#

Cannot cast object '{jedis_version=4.2.3, plugin_version=2.0.2, plugin_archive=husksync, javaVersion=16, snappy_version=1.1.8.4, grgit=null, org.gradle.daemon=true, mysql_driver_version=8.0.30, org.gradle.jvmargs='-Dfile.encoding=UTF-8', version=2.0.2+unknown}' with class 'java.util.HashMap' to class 'java.util.Hashtable' due to: java.lang.NullPointerException

#

anyone know what happened?

willow widget
unkempt lava
willow widget
valid sorrel
#

oh makes sense

willow widget
#

actually I might also need that xD

sharp flare
#

Trying to execute something with null values

unkempt lava
sharp flare
#

Or empty collection

unkempt lava
#

so its the plugins problem?

willow widget
willow widget
unkempt lava
#

thx

sharp flare
#

Report it to the developer

unkempt lava
#

Execution failed for task ':common:processResources'.

Could not copy file '/Users/fwfweff/Desktop/HuskSync-master/common/src/main/resources/database/mysql_schema.sql' to '/Users/dwedwedwe/Desktop/HuskSync-master/common/build/resources/main/database/mysql_schema.sql'.
Error - Invalid filter specification for org.apache.tools.ant.filters.ReplaceTokens

#

is this also the error of author?

#

casue he told me i got a wrong version of java

valid sorrel
#

and if you're not the author of the plugin #help-server would be more fitting

unkempt lava
#

moved to there

valid sorrel
#

getPotionEffect then .getAmplifier

#

if result of getPotionEffect is null they don't have that effect

#

yes

#

add a null check for getPotionEffect as well

#

since it will return null if player doesn't have effect

#

getAmplifier will get the amplifier of the effect

#

you compare it to an int

#

yes because you're just telling it to get an amplifier

#

that will return an int

#

of course

#

also what do you mean by "detect"

#

do you want to use the level of the effect somewhere else

#

or do you want to see if the level of the effect is equal to something

#
PotionEffect potionEffect = player.getPotionEffect();
if (potionEffect != null) {
  int amplifier = potionEffect.getAmplifier();
  // amplifier = level of effect
} else {
  // no effect
}
#

also amplifier to a totem?

#

what do you mean

#

oh

#
PotionEffect potionEffect = player.getPotionEffect();
if (potionEffect != null) {
  int amplifier = potionEffect.getAmplifier();
  player.setCooldown(Material.TOTEM_OF_UNDYING, 200 * (amplifier + 1));
}
foggy zephyr
#

hey i was wondering if there is any way of placing something like an image in the datafolder?

desert frigate
#
player.getWorld().spawnParticle(Particle.EXPLOSION_HUGE, player.getLocation(), 1);``` am i doing smth wrong? cause i see no particles
quaint mantle
#

are your particles off

desert frigate
#

oh imstupid

#

it is

foggy zephyr
#

lol

shadow zinc
#
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, /home/.local/share/Trash/files/BuildTools/apache-maven-3.6.0/bin/mvn, -Dbt.name=3553, -P, remapped, clean, install]
    at org.spigotmc.builder.Builder.runProcess0(Builder.java:973)
    at org.spigotmc.builder.Builder.runProcess(Builder.java:904)
    at org.spigotmc.builder.Builder.runMaven(Builder.java:873)
    at org.spigotmc.builder.Builder.main(Builder.java:709)
    at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)```I've been building all the spigot versions but when I got to 1.19 I got this error
#
java -jar BuildTools.jar --rev 1.19 --remapped```
valid sorrel
#

just says return code is not 0

#

not exactly helpful

#

Please check the wiki for FAQs. If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.

shadow zinc
#

why is remapped not a recognized option?

valid sorrel
#

oh

#

hm

sacred mountain
#

are bitwise operators good practise to use for a same line option

valid sorrel
#

no one can say anything to what you do

#

if it works it works

shadow zinc
#

I don't like how many mutual discord servers we got

desert frigate
#

if i set persistantData on a player, will it ever be deleted?

shadow zinc
#

otherwise it would be called volatile data

desert frigate
desert frigate
shadow zinc
#

Well I'm not sure about a name change, I would assume its linked to the UUID and not the username

worldly ingot
#

It's saved to the player's NBT, which is saved to their playerdata file

#

So no, a name change would not affect it. If their UUID changed (for whatever reason... offline mode or something), then their data would be lost. But so would everything else like their inventory, position, among other things

desert frigate
#

awesome

#

now i never have to use a database

sharp flare
#

A db though is if u want to store more info

visual citrus
#

is there event that can check entity move?

shadow zinc
#

I believe paper has something

#

Usually a bukkit runnable will suffice

sharp flare
visual citrus
shadow zinc
visual citrus
#

I want to make armor stand move and on ground, I want to spawn tnt

sharp flare
#

You can create a class that extends runnable, then instantiate

#

The params are up to you

visual citrus
#

I want to use event

#

and also, idk class

sharp flare
#

There is no specific event

visual citrus
#

I began making plugin 3days ago

sharp flare
#

Only player move event exist in spigot iirc

#

?scheduling

undone axleBOT
shadow zinc
#

anyone know how to get the key of a word for version v1_15_R1

young knoll
#

Key of a word?

shadow zinc
#

yeah the MinecraftKey

#

or whatever you call it

#

like when using /execute you need the key not the name