#help-development

1 messages · Page 168 of 1

echo basalt
#
int xSpan = maxX - minX;
int ySpan = maxY - minY;
int zSpan = maxZ - minZ;

[xSpan/2 + minX, ySpan/2 + minY, zSpan/2 + minZ]
worldly ingot
#

I'd personally use x and dx, but it's a matter of preference

#

At least in math notation

echo basalt
#

you can switch Span with Delta

#

generally go for full variable names that indicate their function

#

var0, var1, var2 are useless compared to minX, minY, minZ

quiet ice
#

I just inlined it for the sake of inlining

echo basalt
#

x0 -> minX
x1 -> maxX, for example

#

sure you can inline it all but even x0 and x1 take longer to understand than minX and maxX

quiet ice
#

Well a cube is basically just two points in 3d space

#

So x0/x1 naming scheme makes sense - although one would say x1/x2 would make more sense, but this is programming world

echo basalt
#

if you're not validating your inputs at least abs(num1 - num2)

#

it should be bigger-smaller, not the other way around

#

unless you want negative nums

sterile token
sterile token
#

🤔

echo basalt
#

you might be abs'ing it

worldly ingot
#

Yeah, you want max-min, not min-max

quiet ice
echo basalt
#

num1 - num2 & num1<num2 -> negative result

sterile token
echo basalt
#

5 - 10 = -5

#

10 - 5 = 5

quiet ice
#

no need for an ABS

sterile token
#

SORRY FOR CAPS

quiet ice
sterile token
#

THE CAPS KEY IS NOT RESPONDIA SHIT

echo basalt
sterile token
#

So this is should be okay right?

echo basalt
#

uhhhhhhh

worldly ingot
#

You have two options.

  1. ((max - min) / 2) + min
  2. ((min - max) / 2) + max
#

anything else is wrong

echo basalt
#

yeh

quiet ice
echo basalt
#

refer to choco's answer

#

I'd say option 1 is much easier to understand

quiet ice
#

Like I said (x1 - x0) / 2 + x0 is correct

echo basalt
#

as you're exclusively working within the [min, max] range

quiet ice
#

Even if x0 or x1 is greater than the other

quiet ice
#

invert min and max and you get the same thing

echo basalt
#

sure the result is the same but the thought process difers slightly

#

I'm not gonna argue any further

quiet ice
#

It is my firm belief that it is stupid to make arbitrary constraints that do not serve a purpose in the model

sterile token
#

Indeed how would i apply this formula? A = 6a² to getting the area for a square

echo basalt
#

A = 6*pow(a, 2)

sterile token
#

wait where a and 2 come from?

quiet ice
#

A in this case is (x0 - x1) * (x0 - x1) * 6

sterile token
quiet ice
#

(x0 - x1) and (y0 - y1) and (z0 - z1) should all have the same value - at least value-wise (the sign could differ, idk)

#

Since you are multiplying it with itself the sign is irrelevant though

#

In essence your A = 6 a² formula is A = 2a² + 2b² + 2c²

#

But since a = b = c you can say A = 6 a²

#

For a cuboid that cannot be applied however - only for cubes

#

You need to iterate over all entries of the hashmap then

#

It might be better to just keep another hashmap that does the reverse

vocal cloud
sterile token
vocal cloud
#

Also why not just prevent players from doing queuing in the first place?

quiet ice
#
List<Player> duplicateQueuedPlayers = new ArrayList<>();
Set<QueueTypes> queueTypes = new HashSet<>();
Set<QueueTypes> dupQueues = new HashSet<>();
myMap.values().forEach((queueType) -> {
  if (!queueTypes.add(queueType)) {
    dupQueues.add(queueType);
  }
});
myMap.forEach((player, queueType) -> {
  if (dupQueues.contains(queueType)) {
    duplicateQueuedPlayers.add(player);
  }
});
quiet ice
sterile token
#

what what

#

What is he trying to do?

quiet ice
hybrid spoke
#

for performance use a second map, otherwise do it this way

fluid river
#

what are you doin

quiet ice
fluid river
#

cool

quiet ice
#

Also, there is 0 reason to sort a hashset

fluid river
#

sort hashSet

#

NOW

sterile token
#

I wouldnt complicate my self haha, just put a boolean called queued the game and look if it enabled/disable and do action/s

#

🤔

quiet ice
#

Yeah

hybrid spoke
vocal cloud
#

So if the QueueType is unique why not use it as the key?

quiet ice
#

Do beware that this assumes that hashcode and equals have been implemented correctly

hybrid spoke
#

oh i read "HOW"

vocal cloud
#

Wait so if the queue is unique why is the player the key if you're checking for the queue?

hybrid spoke
#

then use QT as the key and a iterable of players(uuid) as the value

#

or wait if its an enum you can even use a enummap

sterile token
#
public class Queue {
  
  private final QueueType type;
  private final List<Player> players;
 
  // constructor here

  // getters here


  public static enum QueueType {
    Archer, NoDebugg, etc;
  }
}

List<Queue> queues = new ArrayList<>();
Player player = this.queues.stream().map(Queue::getPlayers).map(List::contains).first();
vocal cloud
#

Bro don't spoonfeed lmfao

#

Also that stream should be completely unnecessary

hybrid spoke
#

all of that is most likely unnecessary

sterile token
hybrid spoke
#

i dont

young knoll
#

🥄

sterile token
#

I hate that type of people that said its better and better my way and critice another helping, so just spoonfeed your fucked code LMFAO

quiet ice
#

Don't use streams for the sake of using streams...

sterile token
#

😂

quiet ice
#

Yes, but you can't actually do what they want with streams

echo basalt
#

🤡

quiet ice
#

At least not that way

echo basalt
#

Streams are bad

#

for loop wrappers

sterile token
fossil lily
#

yea

quiet ice
#

LinkedList and ArrayList are identical

#

At least for most purposes

fossil lily
#

linkedlist has easier methods

sterile token
fossil lily
#

its just easier to deal with

sterile token
quiet ice
#

At the cost of not being random-access-capable

hybrid spoke
quiet ice
#

Just use ArrayDequeue at that point

#

Ideally you'd have

Map<QueueType, List<Player>> backwardRef = new HashMap<>();
Map<Player, QueueType> mainRef = new HashMap<>();

public void link(QueueType q, Player p) {
  backwardRef.computeIfAbsent(q, (ignore) -> new ArrayList<>());
  backwardRef.get(q).add(p);
  mainRef.put(p, q);
}

The rest should be easy to inferr

#
public void unlink(QueueType q, Player p) {
  backwardRef.computeIfAbsent(q, (ignore) -> new ArrayList<>()); // Can be discarded if wanted
  backwardRef.get(q).remove(p);
  mainRef.remove(p);
}
public List<Player> getPlayers(QueueType q) {
  backwardRef.computeIfAbsent(q, (ignore) -> new ArrayList<>()); // Can be discarded if wanted
  return backwardRef.get(q);
}

Being the two other methods that I can think of that @gritty pebble might need

#

Anyways, I should really go to bed.

#

It should really be a Set of UUIDs, but for the sake of simplicity I am working with Lists of players

torn oyster
#

how do I detect when an entity moves

#

i just started changing all my code and i realised that entitymoveevent doesn't exist

#

i'm trying to make a second layer without passengers or teleporting (teleporting is too slow, and passengers just won't work in my situation)

hoary quartz
#

why sometimes I cant import the bukkit stuff?

#

I tried to import the configuration from bukkit

#

but when I try, the bukkit gets red

#

it's a new project

#

worked

#

thanks bro

torn shuttle
#

here's a hilarious bug I just found

#

you can't stop music from playing

river oracle
#

Lol

#

Wat

torn shuttle
#

yeah

#

so the stopSound method?

river oracle
#

Start 1000 music discs at one time and make the person suffer

torn shuttle
#

if you do that to something tagged as music it doesn't stop it, it just attenuates it a lot

vocal cloud
#

Yeah it doesn't work in vanilla either I believe

torn shuttle
#

so I can't tag my ost to be music

#

because that fucks phase switching real hard

river oracle
#

Magma OST 🔥 🔥 🔥

#

😳

torn shuttle
#

an artist is composing music for my boss fights

#

it's pretty sweet

remote swallow
#

gives me ghost buster vibes

west scarab
#

what exactly am i doing wrong here?

    private static final Pattern conversion = Pattern.compile("<[a-fA-F]{1,100}>");

    public static String configCompiler(String text) {
        Matcher match = conversion.matcher(text);
        while (match.find()) {
            Bukkit.broadcastMessage("TESTING");
            String matched = text.substring(match.start(), match.end());
            text = text.replace(matched, MobGens.getPlugin(MobGens.class).getConfig().getString(text));
            match = conversion.matcher(text);
        }
        text = color(text);
        return text;
    }```
untold jewel
#

U could start by telling whats happening? Is there something not working, any errors in console

west scarab
#

sorry

untold jewel
#

what is it supposed to do

west scarab
#

no console errors, it just wont detect the string

river oracle
west scarab
river oracle
#

?di

undone axleBOT
west scarab
remote swallow
untold jewel
#

getConfig().getString("prefix");

west scarab
#

i wanna be able to do <prefix> and it'll grab it

untold jewel
#

PlaceHolders

west scarab
#

i tried to do it via patterns but its not working for whatever reason.

untold jewel
#

PAPI

#

btw I usally make something like this

#
public class DataManager {

    private final Mainclass plugin;

    public DataManager(Mainclass plugin) {
        this.plugin = plugin;
    }

    private File dataFile;
    private FileConfiguration dataConfig;

    public FileConfiguration getDataConfig() {
        return this.dataConfig;
    }

    public File getDataFile() {
        return dataFile;
    }


    public void createDataConfig() {
        dataFile = new File(plugin.getDataFolder(), "data.yml");
        if (!dataFile.exists()) {
            dataFile.getParentFile().mkdirs();
            plugin.saveResource("data.yml", false);
        }

        dataConfig = new YamlConfiguration();
        try {
            dataConfig.load(dataFile);
        } catch (IOException | InvalidConfigurationException exception) {
            exception.printStackTrace();
        }
    }
west scarab
untold jewel
#

I dont know why you are doing all that stuff

#

Just use placeholders if you want to get the string %prefix%

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

full forge
#

if you declare the type of one thing as a map, you can change it to something else, like a linkedhashmap, easier than declaring it as a hashmap

#

functionally there's no difference i dont think

#

would it be easier to just store the games as a list, and loop through them and see if the uuids stored in there equals the uuids you're removing

#

if that makes sense

#

because thats the people playing the game

#

:what:

#

no, theyre trying to get the game from the players' uuids

full forge
#

something like

for (Game g : gameList){
  if (game.getUUIDS() == uuidArray) {
    game.destroy();
    break;
  }
}```
#

lol nice

rapid vigil
#

Hey, how do you damage an entity, just out of no where. Something like Entity#damageEntity

#

There isn't a damage method

echo basalt
#

Hey, what's the nms Registry class for 1.12?

#

Trying to fetch internal entity id

#

There are no mappings 😔

rapid vigil
#
        for(Entity entity : Bukkit.getWorld("world").getEntities()) {
            
        }``` I wanna damage them all
#

There is no

#

There is no damage method

#

Ohh, living has that method thanks. And yeah I'll take care of that Item part :D

echo basalt
fresh timber
#

How do I check what server an online player is connected to in a bungeecord plugin?

#

I just started making bungeecord plugins

desert vigil
#

How would I write a BungeeCord plugin that connects players to different servers with BungeeGuard? It seems to be blocking it, and I assume I have to pass the token. How do I do that?

fluid river
#

btw what's the point for making fields a, b, c, d

#

same as methods w(), xy(), a() and so on

#

some kind of obfuscation?

delicate lynx
#

yes

fluid river
#

who made this

#

mojang in their server jar

#

or craftbukkit devs

#

or spigot devs

#

or maybe some other guys

#

@vocal cloud

#

@hazy parrot

vocal cloud
#

?

fluid river
#

question above

#

maybe you do know that

vocal cloud
#

That's obfuscation yes

#

You can thank Mojang for it

fluid river
#

So they basically obfuscated NMS?

vocal cloud
#

Yup

fluid river
#

for which versions tho

vocal cloud
#

Until 1.17 where mojmaps came around

fluid river
#

so below 1.17 there were no problems with NMS

#

?

vocal cloud
#

Nope it was all done by hand

worldly ingot
#

All versions of Minecraft are obfuscated

fluid river
#

i see

#

but what's the point for these <>mojang-mappings<> thing

worldly ingot
#

We maintain our own set of mappings for methods and fields we use in CraftBukkit, though since then we've just made use of Mojang's obfuscation mappings in development

fluid river
#

i never used that so idk

worldly ingot
#

It's basically a reverse engineering tool

#

For those that are technically knowledgeable to apply it

vocal cloud
#

It makes the jar a lot smaller by removing a lot of long variable names.

worldly ingot
#

^ this is the reason they still obfuscate

fluid river
#

so basically if you use spigot as dependency you have no troubles with using NMS or what

vocal cloud
#

Some even have optimizations although I've never seen them in action

desert vigil
#

How would I write a BungeeCord plugin

fresh timber
#

In a LoginEvent for bungeecord plugins, how do I get the player that logged in?

worldly ingot
#

NMS is going to be obfuscated at runtime beyond 1.17. Pre-1.17, some fields and methods are mapped

fresh timber
#

...

#

just get?

fluid river
#

there should be getPlayer or getConnection

fresh timber
#

there is getconnection

fluid river
#

that's basically the player information

fresh timber
#

does that return their uuid/name?

fluid river
#

as far as i remember

fresh timber
#

mk

fluid river
#

connection.getUniqueId()

#

should be

fresh timber
#

mk

#

yep thx

#

how do I check what server the player is in

fluid river
#

in 1.19

#

for example

worldly ingot
#

You've a few options, though I personally advise use of a Mojang mapped jar that's remapped at compile time

fluid river
#

entity pathfinder goals

fluid river
#

thanks gonna read that

worldly ingot
#

Nuker

fresh timber
#

mk

fluid river
#

built with buildtools

#

with a flag

worldly ingot
#

BuildTools to get the server jar as normal, but while developing, use the stuff I linked above. It remaps NMS in your development environment, then obfuscates it when you build

fluid river
#

hmm

#

sounds cringe

fresh timber
#

how do I check the server the player is?

#

in bungeecord plugins

fluid river
#

what does this do

worldly ingot
#

It's how pretty much all build tools do things. If you've ever worked with Fabric or Forge dev environments, they do exactly that ;p

fluid river
#

basically builds spigot.jar

worldly ingot
#

That will build a remapped 1.18.2 jar

fluid river
#

so there are now two different spigot versions

#

one with mojang mappings

#

one without

#

which you can build with or without a flag on buildtools

vocal cloud
#

In that sense yes. However, when building for production you do not want to use mapped

#

Since it can cause uhoh licensing issues

fluid river
#

mojang...

vocal cloud
#

Who else but Mojang

#

More Microsoft though now

fluid river
#

true

#

so basically you need to develop with normal names

fresh timber
# fluid river event.get

how would I teleport the player with this? It does not let me use event.getConnection.teleport(location)

fluid river
#

but after that you need to change names to a b c d

#

and so on

#

so this thing runs on not-remapped server jars

#

am i right?

fluid river
fresh timber
#

oh

#

uh

#

so

#

how do I teleport them

#

is it not possible to make a plugin that works on all servers to teleport someone?

fluid river
#

you need to send plugin message to spigot server

fresh timber
#

huh

fluid river
#

and have a plugin on spigot server which receives plugin messages

fresh timber
#

oh

fluid river
#

and when received teleports player

fresh timber
#

dunno how to do that

fluid river
#

Umm i can help you in dms

#

later

fresh timber
#

can you tell me or show me website that'll tell me

fluid river
fresh timber
#

ok

fluid river
#

basically you need two plugins

fresh timber
#

ig ima just do this on spigot and get to the server directly

fluid river
#

one for spigot one for bungee

fresh timber
#

I was makin a bungeecord so I could run everything on 1 plugin for my server

#

thx tho

fluid river
#

well bungee doesn't have spigot methods and classes

fresh timber
#

yea

#

ik that

fluid river
#

everything is for proxy

fresh timber
#

just thought they would have some mc things to do

#

yea

#

I thought I could still use minecraft events for it

#

like just different syntax

vocal cloud
#

You can do some things through the proxy like open inventories and such. I've seen it before.

fresh timber
#

cool

fresh timber
#

ima stick to spigot cus i already know a lot of stuff abt it

#

i mean

#

a little

#

more than bungeecord

vocal cloud
#

You have to use packets through and through

fluid river
#

use PostLoginEvent

#

so you can get ProxiedPlayer

#

and from ProxiedPlayer you can use this methods

#

but not teleport tho

desert vigil
#

How would I write a BungeeCord plugin that connects players to different servers with BungeeGuard? It seems to be blocking it, and I assume I have to pass the token. How do I do that?

fluid river
#

what is bungeeguard

desert vigil
#

It's a plugin that patches certain vulnerabilities in BungeeCord, and it needs a token to be able to connect

#

Where can I pass that in?

fluid river
#

Does it have API/Wiki?

desert vigil
#

It doesn't seem like it

fluid river
#

what is your current code

#

for connection to another server

desert vigil
#
p.connect(getInstance().getProxy().getServerInfo(get_config().getString("fallback-server")));
fluid river
#

do you do that in PostLoginEvent

#

?

desert vigil
#

No, ServerDisconnectEvent

fluid river
#

So when player disconnects you want him to get to fallback-server

desert vigil
#

Yes

fluid river
#

doesn't this happen by default or smth

desert vigil
#

Bypassing BungeeGuard

#

Nope

fluid river
#

well what's the error

desert vigil
#

It kicks the player with "Proxy Disconnected"

fluid river
#

Is server disconnect event called when player leaves or something

desert vigil
#

I might've missed that

fluid river
#

isn't it getting called when player leaves

desert vigil
#

Or when a server crashes

fluid river
#

hmm

desert vigil
#

Wait a minute

#

It actually seems it was a ServerKickEvent firing

#

It's still the same connecting code, though

fluid river
#

so with ServerKickEvent it doesn't work too

desert vigil
#

Well, it did just work

#

But it wasn't earlier

fluid river
#

bro

#

i just fixed your code with my brain

desert vigil
#

Yes

#

Let's see if I can break it again

fluid river
#

telepathy

#

my secret weapon

desert vigil
#

Because it isn't working on the server I wrote it for, just on my test server

#

I have no idea why

fluid river
#

is the fallback-server same

#

maybe has different name or smth

grizzled plover
#

Hey guys I was wondering if any one had a tutorial on how to set up a bungee cord server on two computers?

fluid river
#

wdym

#

one for proxy one for spigot servers?

shut field
#

how do I wait until a Bukkit Task is done before returning from a method

fluid river
#

umm basically you can't

#

you can do Thread.sleep() tho

shut field
fluid river
#

but that's trash

#

yeah

#

why do you need that tho

shut field
#

I'm trying to wait for 20 ticks inside a method but I don't want the method to just exit before the 20 ticks have been waited

#

stuff with an action bar and making the letters appear 1 by 1

fluid river
#

you know you can just put the rest of the code inside bukkit runnable

#

or use a TaskTimer

#

With some external booleans of integers for counting or checking for some conditions

#

which would stop the timer in the end

#

basically run a task timer and store it's id in a map with player as a key

#

and when player changes slot then cancel the timer

shut field
#

breh, I already have a similar system

#

I wanted to make a better one

fluid river
#

umm

#

Then no, you basically cant

#

unless you move the entire thing to separate thread

#

and call it's sleep()

#

would be non-precise tho

#

bad solution

shut field
#

I tried to thread.sleep and outside it thread.join

#

to wait for the thread to finish before continuing but it still paused the MC server

fluid river
#

you can send full code, maybe we can just suggest some improvements here

#

i'm not the only one guy alive rn

hazy parrot
#

or am i misunderstanding

fluid river
#

don't think that's what he really needs

#

haven't seen his code tho

#

this way he can just put the rest of the code inside the runnable

#

anyways gonna be executed in 20 ticks

shut field
#
for(char aChar : message.toCharArray()){
          Thread thread = new Thread(){
              public void run(){
                  try {
                      sleep(20);
                  } catch (InterruptedException e) {
                      e.printStackTrace();
                  }
                  oneByOne[0] = oneByOne[0] + aChar;
                  TextComponent textComponent = new TextComponent(TextComponent.fromLegacyText(oneByOne[0]));
                  textComponent.setColor(net.md_5.bungee.api.ChatColor.GRAY);
                  player.spigot().sendMessage(ChatMessageType.ACTION_BAR, textComponent);
              }
          };
          try {
              thread.join();
          } catch (InterruptedException e) {
              e.printStackTrace();
          }
      }
    }
#

oh that doesn't have the thread.sleep in it

fluid river
#

who knows

shut field
#

I am trying to repeat for each char, adding one to the full message each "tick" (20 milliseconds)

echo basalt
#

random thought: What if we made a yml -> html converter so we can write websites in yml like based people

shut field
#

and then joining it after sending the action bar?

echo basalt
echo basalt
#

Never Thread#sleep on your server

fluid river
#

❤️

echo basalt
#

it crashes stuff

shut field
echo basalt
echo basalt
#

You can sleep inside completablefutures

#

and to thenRun()

fluid river
#

for new java only as far as i remember

torn shuttle
#

oops github down

fluid river
#

wdym

echo basalt
#

yeah github seems to be down

torn shuttle
echo basalt
#

o nvm

#

it spiked a bit

fluid river
#

oh

echo basalt
#

but

fluid river
#

for you

torn shuttle
#

it's very slow

echo basalt
#

it seems to be back

torn shuttle
#

can't update my wiki page

fluid river
#

works smooth for me

echo basalt
#

might be our dns honestly

fluid river
echo basalt
#

works fine for me but it's kinda slow sometimes

torn shuttle
#

the finest dns a technician paid in bacalhau can afford

echo basalt
#

dns went on a smoke break

fluid river
#

died of insult

echo basalt
#

github slower than magma's code what is this

remote swallow
boreal python
#
                        loc = player.getLocation().add(0,10,0);
                        player.getWorld().spawn(loc, Fireball.class);

Few questions about this:

  1. How do I make the fireball always travel downwards and not wherver the player is looking
  2. How do I add a publicbukkitvalue to the fireball? (this case: "bedwars:screaming-bedwars-hidden-api")
#

no clue

#

but when I use /data the fireball comes up with that value

#

🤷‍♂️

#

same values as the f3 menu displays?

#

player.getWorld().spawn(loc, Fireball.class).setRotation(0, 90); ?

hazy parrot
#

all pdc is stored inside of "BukkitValues" array inside of nbt

boreal python
#

alrighty will do that then

#

actually

#

only lets me set direction

#

and that doesn't use my ints

mossy gazelle
#

When I run start.bat the normal spigot 1.19.2 starts too, anyone know why?

hazy parrot
#

what

mossy gazelle
#

Oh sorry

boreal python
#

any way to increase the strength of the fireball?

mossy gazelle
#

Anyone has any ideas for a project?

halcyon mica
#

Question about brew time in brewing stands

#

What is the tick amount the progress bar compares to for progress?

#

Because it only allows you to set the time remaining

hoary quartz
#

I wanted to make an if statement but in the isHoldingOwnLetter needs to get the player name, but when I try to put in the if (Player player), says that I can't instantiate

drowsy helm
#

what

#

wdym if (Player player)?

hoary quartz
#

the isHoldingOwnLetter code

drowsy helm
#

yeahy i get that bit

#

what are you having trouble with though

hoary quartz
#

like, I just wanted to check the item in the player hands when he joins, so if it's his own Letter, just remove this from this inventory/hand

drowsy helm
#

yeah i know

#

why cant you just pass the player variable?

hoary quartz
#

like

#

this

#

shows this error

drowsy helm
#

it doesn't work like that

#
public void onPlayerJoin(PlayerJoinEvent event){
  Player player = event.getPlayer();
}```
#

check out the docs it will give you all the information on what methods spigot classes have

hoary quartz
#

I am just starting sorry

drowsy helm
#

ur g

halcyon mica
#

OK, so default brewing time is 400

hoary quartz
#

it's on the spigot website?

halcyon mica
#

And this apperantly also determines the brewing animation

#

So is there a way to update the progress arrow without causing the bubble animation to speed up as well

hoary quartz
#

thanks, I will check that

#

already bookmarked

#

thanks dude

hoary quartz
echo basalt
#

it compares memory reference

#

strict is not the exact word

#

2 different objects with the same values might still return false

#

only reason why it might work with strings is because strings are pooled

#

equals, on the other hand, does some things

hoary quartz
#

I put the line, but when I try it doesn't work

#

its like that

echo basalt
#

Memory reference matches? (a == b) -> No? Are both objects of the same class type? -> Do the hashcodes match? -> Are the values the same?

#

grr

#

Betta you do realize that they're comparing an ItemStack to a boolean right

#

smh my head

#

how do you not see it

#

it's right there

#

olk

hoary quartz
#

without the event. in the beginning

#

?

#

still the same

undone axleBOT
hollow pelican
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.
userinfo Show information about a member.

**__ModLog:__**

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

hollow pelican
#

Oh interesting

#

I never knew what commands this had

#

Sorry btw

#

(if I interrupted anything)

hoary quartz
#

thanks, sorry to bother you, I am really starting with coding and I just wanted to do that, but I will try here

hollow pelican
#

This place is pretty good for development questions

#

You can make a boolean to check for a certain condition relating to an itemstack but you can't compare it directly.

hoary quartz
#

That make sense

#

Okay, gonna try here

#

Sorry to bother you again

#

Thanks

hollow pelican
#

I haven't used much PDC personally, I keep using NMS with NBT tags but that's just my personal preference so I can use vanilla item tags with my plugin.

echo basalt
#

Nms is easy

#

Few hours ain't much

#

Remapped nms is basically raw spigot

#

You get rid of the wall that's hiding all the cogs

river oracle
#

Mapped NMS is fun and easy for all ages

#

❤️

hollow pelican
#

True.

#

Remapping is a lot easier nowadays at least.

quick zenith
echo granite
#

How to fix this once I enter my server?

eternal oxide
echo granite
#

nope

#

just that message

eternal oxide
#

then add more memory

echo granite
#

but it never happened to me before

#

and I did nothing new

eternal oxide
#

The message says it ran out of memory

echo granite
#

is there a way to get a more detailed description about what exactly filled the memory?

#

I attached the crash file above

eternal oxide
#

what is yoru server startup flags?

echo granite
#

my run.bat?

eternal oxide
#

yes, the line that starts your server

echo granite
#
PAUSE

#

nothing crazy

eternal oxide
#

give it more

river oracle
#

1 gig is barely enough for 1.19.2 man

#

no wonder your running out

echo granite
#

I know 1GB is not a lot, but that never happened to me before and I wanna know what went wrong

eternal oxide
#

it ran out of memory attempting to generate a chunk

river oracle
#

your plugin / plugins are probably using too much memory now or too much chunk data has been loaded

echo granite
#

oh really?

#

generating a chunk? 😮

river oracle
#

easiest way to fix this without increasing ram is to delete everything and than repeat every single time you get this error

eternal oxide
#

give it more memory and see if it fixes it. else you have a corrupt chunk/bad plugin

echo granite
#

how much should I give it if it's just a testing server for my plugins?

eternal oxide
#

just testing "shoudl" be fine on 1 gig

boreal python
eternal oxide
#

increase it and see if the error goes away

river oracle
#

I give my testing servers 3 gigs per instance and my proxies 512mb

boreal python
#

methods originally suggested didn't work

river oracle
#

and subtract y to send it downwards

eternal oxide
#

set a vector to teh entity

river oracle
#

^

boreal python
#

on it boss

eternal oxide
#

new Vector(0,-1,0)

quaint mantle
#

anyone have any suggestions?

#
    public static HashMap<OfflinePlayer, Double> sortVariables(String var_name) {
        List<Double> doubles = new ArrayList<>();
        HashMap<OfflinePlayer, Double> doubleHashMap = new HashMap<>();
        List<Player> list = new ArrayList<>();

        json.singleLayerKeySet("storage").stream().map(s -> s.split("::")).forEach(strings -> {
            if (strings[1].equalsIgnoreCase(var_name)) {
                String normal = strings[0] + "::" + strings[1];
                doubles.add(json.getDouble("storage." + normal));
                list.add(Bukkit.getPlayer(UUID.fromString(strings[0])));
            }
        });

        Collections.sort(doubles);
        Collections.reverse(doubles);

        for (int i = 0; i < doubles.size(); i++) {
            doubleHashMap.put(Bukkit.getOfflinePlayer(list.get(i).getUniqueId()), doubles.get(i));
        }
        return doubleHashMap;
    }```
#

there has to be a better way of doing this

hollow pelican
#

I have no idea personally.

#

Are you using a .json file to store data from a HashMap?

quaint mantle
#

i mean, it works fine.

quaint mantle
#

which everytime the player logs off it'll unload their variables

#

which is why im looping the json

hollow pelican
#

Like how Skript stores data with variables?

quaint mantle
#

yeah

#

but better

#

because skript doesn't unload variables, so it can cause memory leaks and high ram usage

hollow pelican
#

True.

#

Are you trying to figure out a more efficient method?

quaint mantle
#

yeah, and trying to make it faster

#

because i feel like this isn't that fast

#

and i can't test it because uuids

#

i mean, i could

#

but im lazy

hollow pelican
#

I can't really help with that, sorry.

quaint mantle
#

no worries

boreal python
# eternal oxide new Vector(0,-1,0)

okay so this works BUT it also doesnt iygm?
https://imgur.com/a/k3PyKI3
white is the player
blue is where they are looking
and orange is the path of the fireball with that vector you mentioned
do you think the issue is that loc is the location of the player and therefore the direction they are looking? and that is also influencing the path of the fireball?

eternal oxide
#

show code

boreal python
#

gimme 2 seconds rq

#

oh my god intellij is not responding

hollow pelican
#

That's the worst when that happens.

boreal python
#
                        loc = player.getLocation().add(0,10,0);
                        player.getWorld().spawn(loc, Fireball.class).setVelocity(new Vector(0, -1, 0));```
boreal python
eternal oxide
#

looks fine

boreal python
#

no clue why that weird motion is happening then

hollow pelican
#

What exactly are you trying to do?

boreal python
#

tryna summon a fireball 10 blocks above the player that falls onto them

hollow pelican
#

It is possible since location returns values such as pitch and yaw iirc.

boreal python
#

anyway to fix that?

hollow pelican
#

Have you tried just getting the position from the location?

#

Location contains XYZ, Pitch & Yaw so have you tried just getting the XYZ values and storing them in a new vector and using that instead of player.getLocation()?

eternal oxide
#

Setting the velocity should be fine. it would overwrite any vector on the original spawn location

boreal python
#

ima see if it gets the same effects if I just summon it right ontop of the player, if so, I'm fine with loosing the whole falling from above effect

#

oh my god

#

yes it does

#

okay

#

you can disregard my question. as of now I found a way around it

#

sorry about that guys

quaint mantle
#

is there a way to return something in a septate thread

#

if even possible

eternal oxide
#

Describe better

quaint mantle
#

like this

#

if even possible

#

it would increase the performance tremendously

eternal oxide
#

no, you can run things async then run code sync but to return somethign you would have to lock up the main calling thread

quaint mantle
#

dont mind the static abuse

eternal oxide
#

Look up Futures

eternal oxide
quaint mantle
#

ty

spice shoal
#

Mechanics: clickActions: - conditions: - '#player.hasPermission("test.permission")' actions: - '[console] say hello <player>!'

Hi!
I am looking for a person to help me understand how to put in the ''conditions'' section a condition ( have 30 levels of exp).
Who can help me :D?

It work with JavaDoc

quaint mantle
#

Anyone here

#

I have some problem

#

How to use armor stand to find rail and teleport minecart to armor stand

molten hearth
warm light
#

I mean how to save like that? just save the inv on pdc or how?

quaint mantle
#

But need java docs attributes/ conditions

dusty estuary
torn oyster
#
        ProtocolManager manager = ProtocolLibrary.getProtocolManager();
        manager.addPacketListener(new PacketAdapter(MinigameLib.getPluginInstance(), ListenerPriority.NORMAL, PacketType.Play.Server.REL_ENTITY_MOVE) {
            public void onPacketSending(PacketEvent e) {
                int entityId = e.getPacket().getIntegers().read(0);
                if (nameTags.keySet().stream().anyMatch(en -> en.getEntityId() == entityId)) {
                    LivingEntity entity = nameTags.keySet().stream().filter(en -> en.getEntityId() == entityId).findFirst().orElse(null);
                    new BukkitRunnable() {
                        @Override
                        public void run() {
                            nameTags.get(entity).teleport(entity.getLocation().clone().add(0, 1.8, 0));
                        }
                    }.runTaskLater(MinigameLib.getPluginInstance(), 0L);
                }
            }
        });```
not work
#

it lags behind

#

how do i make sure it doesn't lag behind (it's a nametag invisible entity)

#

without making it a passenger

hybrid spoke
#

why dont you want to make it a passenger?

torn oyster
lilac dagger
#

I have a project where I shade some smaller stuff into it and then i have a module that has it as a dependency, how to I make it so the module sees the bits as shaded?

#

i get the imports from before the shading

#

it's not what i want

tall dragon
near valve
#

Hello, does anyone know how I can restore variables saved in mysql back to a .csv file? Because mysql stopped writing them.

torn oyster
#

all good

#

fixed

echo basalt
#

check if the entityId matches event.getPlayer and then do stuff

#

seems flawed

torn oyster
#

not players

echo basalt
#

eh stil

torn oyster
#

and it's one listener for a manager

#

that listens for all registered entitiers

#

not one listener per registered entitity

sullen wharf
#

hey @torn shuttle , why doesn't this work?

earnest forum
#

?learnjava

undone axleBOT
sullen wharf
#

Live the life of a thug - until the day I die
Live the life of a boss player
All eyes on me
All eyes on me

#

yada, you're not magmaguy

#

so you're not the correct person to answer

earnest forum
#

yeah but you don't know java

#

u are in a help channel

#

i can answer if i like

sullen wharf
#

don't you understand that im jk?

#

chill

#

lol

echo basalt
#

let the guy wear his white make-up

#

chill

sullen wharf
#

me rn: 🤡

quaint mantle
#

Mechanics: clickActions: - conditions: - '#player.hasPermission("test.permission")' actions: - '[console] say hello <player>!'

Hi!
I am looking for a person to help me understand how to put in the ''conditions'' section a condition ( have 30 levels of exp).
Who can help me :D?

It work with JavaDoc

tall dragon
#

unless im misunderstanding and you made the plugin using that configuration yourself

near valve
tall dragon
#

you want to export your mysql data to a csv file?

near valve
#

Yes, I do not know how to do this.

tall dragon
#

you would need to connect to your mysql database and run some query's

tender shard
near valve
#

Unfortunately, it doesn't work like that, because after converting, it sets these variables somehow and the server doesn't read it.

tender shard
#

i don't really understand what you're talking about

near valve
sullen wharf
#

How can i synchronize two different GUI instances between each other?
i'm making a "trading" GUI in which both players put items on the left and the other player's items appear on the right.
how could i go about making this two GUIs work together?

tender shard
tender shard
# sullen wharf How can i synchronize two different GUI instances between each other? i'm makin...

I'd create a "TradingInventory" class, that has two ItemStack[] fields. One for the first player's trades, one for the second player's trades.

Then create two inventories out of that, so both players have their items e.g. on the left side, and the other player's items on the right side. Then listen to the InventoryClickEvent and InventoryDragEvent. Whenever people change something on their side, also change the contents in your TradingInventory, and propagate the changes to the other player's open inventory.

echo basalt
#

or just decompile a trading plugin and steal half the src

sullen wharf
#

🤔

hazy parrot
tender shard
#

I wrote a library ( ^^^ ) that adds an ItemStack PDC datatype and also allows you to use lists, maps, arrays, etc

#

so you can just save the Inventory#getContents as PDC

#
myPdc.set(someKey, DataType.asArray(new ItemStack[0], DataType.ITEM_STACK), myInventory.getContents());
#

or just directly use DataType.ITEM_STACK_ARRAY

#

I forgot that this exists too

torn oyster
#
e.addPotionEffect(new PotionEffect(PotionEffectType.GLOWING, Integer.MAX_VALUE, 0, false, false, Color.RED));```
#

i saw this on the forums

#

to add a colored glow

#

but it doesn't seem to exist anymore

tender shard
torn oyster
#

dang it choco

#

anyways i'll try that

tender shard
#

IIRC, the color parameter was only for the color of the bottle or something

#

not sure though

#

or the particle's color

#

sth like that

warm light
#

a plugin is using this method.

private static MyPlugin plugin;
public static MyPlugin getInstance() {
        return plugin;
    }

I am trying to get the instance of that plugin by MyPlugin.getInstance() and it returns plugin is null

so how can I get the instance?

tender shard
#

you never assign any value

#
private static MyPlugin plugin;

{
  plugin = this;
}

public static MyPlugin getInstance() {
        return plugin;
}
#

do it like this

warm light
#

plugin = this; seted onEnable

crimson terrace
#

does the
{
plugin = this;
}

get called for every new object? never seen it used

tender shard
#

Its called the „init block“

#

Its like a „universal constructor“

crimson terrace
#

only ever seen the static one

#

so its like a lazy initializer on a budget?

tender shard
#

It basically gets added after every normal constructor

warm light
tender shard
#

So you can put stuff there that all constructors share

crimson terrace
#

understood 🙂 thanks

tender shard
# warm light

That works too but i prefer the init block since it runs before onLoad

warm light
#

Still can't access the instance from other plugins

tender shard
#

Then you seem to access it before your plugin instance got created

#

Add your MyPlugin as depend in your other plugins plugin.yml

warm light
#

Added and my main plugin load first

#

still same

tender shard
#

Send your latest.log pls

warm light
tender shard
#

getConfiguration() is null, NOT getInstance()

torn oyster
#

is there a way to show hardcore hearts

#

when a player is in the game

#

and remove/add them at any time

warm light
#

and my main plugin load before the 2nd one

tender shard
#

what's your other plugin's code?

warm light
#

just get some string

#

from main plugin's config

#

but it try to get the value from main plugin's config onEnable

#

idk is that the problem

tender shard
#

as said, if I was you, I'd set those values in the init block.

private static MyPlugin instance;
private static MyConfiguration config;

{
  instance = this;
  config = new MyConfiguration("filename.yml", this);
}

onLoad might be too late if you access it before onLoad gets called

warm light
#

umm, alright. let me try

#

Still same 🤦

tender shard
#

does YamlDocument.create() maybe return null?

#

do System.out.println(config) after you called YamlDocument.create()

#

see what it prints

#

if it doesnt print null, but still returns null from the other plugin, then it seems like you're accidentally shading your main plugin into the other one

warm light
#

My bad. I forgot to set scope provided 🤦
btw, thanks for help :)

tender shard
#

np!

#

accidentally shading the other plugin is probably the most common mistake people do lol

#

it's Imajin now

#

or using build artifacts and then wonder why they get ClassNotFound

molten hearth
#

me using shadow knows by accident and wondering why my jar didnt change

tender shard
#

real chads just copy paste .class files into their .jar instead of shading

molten hearth
#

that was me as a kid 'compiling' my code by renaming .java to .class

#

and just pasting it into jars

#

praying it worked

#

(it didnt)

hollow pelican
#

Is there a way to get the recipient of a packet?

#

ie. Get the receiver of a ClientboundPlayerChatPacket

#

I basically just want to get who the packet is being sent to

tender shard
#

ugh where did you get the packet object from?

#

usually you create the object and then directly send it

hollow pelican
#

I'm intercepting packets in-order to log them but I need to know who the packet is being sent to.

tender shard
#

so you do have a PacketListener right?

hollow pelican
#

I have a system to listen to packets, yes.

tender shard
#

PacketListener has a method getConnection(), which has a public field "spoofedUUID" which should yield you the UUID of that player

hollow pelican
#

Alright, I'll try that.

tender shard
#

the UUID could be wrong in certain cases though, e.g. when a cracked player tries to join in the PreLoginEvent or whats it called

#

but on online servers, after they actually joined, it should always be correct ofc

hollow pelican
#

If it's incorrect, the person would just be breaking their own experience at that rate.

molten hearth
#

i think the issue is other players breaking other player's experiences by spoofing their uuid

tender shard
#

I think the issue is people running offline mode servers 😛

hollow pelican
#

The only time I ever use offline mode is for multiplayer testing on my own PC. (Local basically)

#

Just because I don't own two accounts so..

molten hearth
#

I am planning on running one once I finish coding it

hollow pelican
#

If you don't mind me asking, why offline mode?

molten hearth
#

well you see

#

why online mode

hollow pelican
#

Fair enough lol

untold jewel
molten hearth
#

I dont really care about whether they bought the game or not if they want to play they can

#

but I will definitely force them to first solve a captcha through a website first

tender shard
pearl zephyr
#
player.sendMessage(boat.getVelocity())```

anyone know why this doesnt return anything?
crimson terrace
untold jewel
#

I'm talking about dis shit

pearl zephyr
#

fun

tender shard
tender shard
#

how else would they get their plugin instance from another plugin?

untold jewel
#

From another plugin?

tender shard
#

yes, they have two plugins, and one accesses the other

untold jewel
#

Ahhh

#

I see

#

Thought he was just using a singleton instance for his plugin

#

:D

tender shard
#

the problem why it didnt work was because they shaded "MainPlugin" into "otherPlugin" so "MainPlugin.getInstance()" was always null 🙂

untold jewel
#

u have a good Gui API

#

@tender shard

molten hearth
#

does he doe

#

because I cant find it lol

tender shard
#

well I have

#

but its not public lol

#

it's only part of AngelChest Plus

molten hearth
#

damn it I have either covid or bronchitis and I dont know yet because its too early wait dis da wrong channel

hollow pelican
#

It says that spoofedUUID is null for some reason.

molten hearth
tender shard
#

I also think so

#

DI is just a pain in the ass and doesn'T really provide any advantages for stuff like spigot plugins

#
public class MyListener implements Listener {
  private static final MyPlugin plugin = MyPlugin.getInstance();

using DI instead yields no advantage imho. MockBukkit exists 🙂

hollow pelican
echo basalt
tender shard
echo basalt
#

I honestly hate seeing the static keyword outside of constants and utility classes

hollow pelican
tender shard
#

i dont know anything about offline mode

honest echo
#

How do i send a data via bungeecord message channel?
I just saw how to read those message but how do i send it via bungeecord plugin?

echo basalt
#

offline mode uses uuid v3 (name-based) uuids

#

less secure as you can just send any name and it will generate the same uuid

#

It also doesn't contact mojang's auth servers which allows for cracked players to join

hollow pelican
#

I'm using offline mode for local testing since I don't own a 2nd account.

echo basalt
#

you can just be based and have friends

hollow pelican
#

My server isn't public so..

echo basalt
#

have a 128gb dedicated machine with a ryzen 9 5950x dedicated for testing

#

and maybe dynamic instancing :)

tender shard
#

hetzner?

hollow pelican
#

Barbaric overkill dialled up to 11.

tender shard
echo basalt
#

it's like 120/mo

tender shard
#

yes

echo basalt
#

with the based 8tb nvme storage

hollow pelican
#

:jealous:

echo basalt
#

or 16tb I don't remember

tender shard
#

I got 2x3.84tb

echo basalt
#

pretty sure we're running the ax101 or something

#

got the test network and the dynamic instancing for live

#

All I need is the dynamic controller and the test network honestly

#

I can just get more dedis for instancing

#

Also has redis and mongodb pretty sure

honest echo
#

How do i send a data via bungeecord message channel?
I just saw how to read those message but how do i send it via bungeecord plugin?

echo basalt
#

player.sendPluginMessage(plugin, byte[], string)

#

or pretty sure there's like

#

ServerInfo#sendPluginmessage

glossy venture
tender shard
#

per months

glossy venture
#

month or months

tender shard
#

less if you can deduct taxes

#

the bad thing is that I also gotta pay for this D:

dense geyser
#

is there a packet to undo packet made block changes? or should I just send one of the same packets with what the server has at that position?

echo basalt
halcyon hemlock
#

how to damage an entity using entitydamageevent?

echo basalt
#

setDamage

#

setFinalDamage etc

#

love your name btw

halcyon hemlock
#

if i do that i cant damage the enderdragon

echo basalt
#

uh

#

you gotta check if it's an EnderDragonPart and get the dragon object itself

halcyon hemlock
#

:/

dense geyser
#

to create a sign with text on it using packets, would I send the PacketPlayOutBlockChange packet with the PacketPlayOutUpdateSign packet?

torn shuttle
#

watch out they say that if you ever start using imillusion's code before you know if your entire project is refactored into one massive enum class

molten hearth
#

enums are nice tho 😔

molten hearth
#

NOOO

#

I barely use enums but I find them nice

torn shuttle
#

last one out throw a molotov

molten hearth
#

you're lucky im not russian or I would've drank it

fluid river
#

no worries

#

i drank it

halcyon hemlock
#

how to make custom entitydamageevent to damage entity?

fluid river
#

??

halcyon hemlock
#

liek

fluid river
#

Events are reactions thrown when some action is taking place

#

event doesn't do anything itself when caught

#

You basically need Entity#damage(value);

halcyon hemlock
#

EntityDamageEvent damageevent = new EntityDamgeEvent(entity, DamageCause.Custom , damage);
Bukkit.getPluginManager().callEvent(damageevent);

#

something like that

#

i cant damage enderdragon if i do Entity.damage(value)

#

bcs no source i think

#

but if i add source then the damage that is demanded doesnt work

#

do i subtract health from the entity??

fluid river
#

if not try just setHealth(getHealth() - value)

halcyon hemlock
#

doesnt work

#

works for every other entity justs not enderdragon

fluid river
#

Hardcoded dragon 🙂

halcyon hemlock
#

:joesus:

halcyon hemlock
#

does enderdragon count as living entity still?

#

cause then i might be able to fix it

fluid river
#

try EnderDragon.getParts().get(0).damage(value)

halcyon hemlock
#

ok

#

u cant do EnderSDragon.getParts().get(0)

fluid river
#

EnderDragon.getParts().toArray()[0]

halcyon hemlock
#

u cant damage still

harsh totem
#

How would I be making a custom achievements? I tried to search and found only libraries and I'd prefer to only use spigot library if that's possible

echo basalt
#

Ender dragons are built out of parts

#

you can get the parent dragon from any part

torn shuttle
#

alright time to play everyone's favorite game, updating old configuration formats into new configuration formats

echo basalt
#

haha converter go brrt

torn shuttle
near valve
#

Hello, I run a server in minecraft. Skript is connected to the database in configu.sk and it crashes because it writes variables once not. And I mean, does anyone know how I can restore the variables from the database back to the .csv file as it was in the default config? Below I present you the bugs from the console

untold jewel
#

skript

hasty prawn
tardy delta
#

127b + 1 going to -128b 🤔

hasty prawn
#

yeah?

hasty prawn
untold jewel
#

or a reward

harsh totem
#

And also a message when unlocking it

harsh totem
stoic vigil
#

i mean this one:

#

anyone knows how to open a such book?

fluid river
#

give material.WRITABLE_BOOK or smth

iron glade
#

I think he means opening the "inventory"

torn shuttle
#

boys I have found the true meaning of life

#

the search is over

#

the meaning of life is finding excuses not to update old config formats into new config formats automatically

fluid river
#

the meaning of life is finding excuses

tardy delta
#

the meaning of life is starting a conversation with copilot

#

poor friend

fluid river
#

what is copilot tho

tardy delta
#

ai code help thing

fluid river
#

lol

tardy delta
#

worst explenation ever but whatever

torn shuttle
#

still have not used that

fluid river
tardy delta
midnight shore
#

how can i spawn a specific block break particle? For example bamboo breaking particle

fluid river
#

world.spawnParticle i guess

midnight shore
#

there's only BLOCK_BREAK particle

#

i guess some kind of data

untold jewel
#

if you need a better way of doing this lmk

sharp heart
#

not a great help

fluid river
#

if only particle was a class...

#

with ParticleType enum

torn shuttle
#
    private void updateOldStringFormat(List<String> oldList) {
        List<Map<String, Object>> parsedObjectives = new ArrayList<>();
        for (String questObjectiveEntry : oldList) {
            Map<String, Object> parsedEntry = new HashMap<>();
            String[] individualEntries = questObjectiveEntry.split(":");
            for (String keyAndValue : individualEntries) {
                String[] keyAndValueArray = keyAndValue.split("=");
                String key = keyAndValueArray[0];
                String value = keyAndValueArray[1];
            }
        }
    }

oh yeah this is a goooooood start

#

can you guys feel how much fun I'm about to have

fluid river
#

hey guys

#

what's the difference between mojang server.jar and craftbukkit version

#

can't you like code something for mojang servers directly

#

does mojang server support some kind of plug-ins

eternal night
#

Only datapacks

fluid river
#

or you need to rewrite the core itself

quiet ice
#

You can use java agents, but eh

fluid river
#

thanks

chrome beacon
#

Mixins 🙂

fluid river
#

Well

quiet ice
#

It all falls back onto using a modding framework

fluid river
#

So why mojang obfuscates NMS in their jars

#

If people can't code plugins for it

quiet ice
fluid river
#

aren't spigot and craftbukkit kinda illegal then?

quiet ice
#

Or better said if you set precedence of something not being enforced

fluid river
#

?

eternal night
#

That's the reason why build tools exists XD

#

So you build the server on your own

quiet ice
fluid river
#

I mean doesn't craftbukkit basically use Mojang server's code

quiet ice
#

Spigot also has the same commits on their repos

fluid river
#

so they are allowed to copy paste mojangs code

#

but not publish it

#

am i right

quiet ice
#

That is true

#

CB would never have gotten DMCA'd by mojang because mojang owned bukkit

eternal night
#

What

quiet ice
#

Hence cb was legal, the rest is gray area

#

depends on the jurisdiction