#help-development

1 messages ยท Page 343 of 1

tender shard
#

sgizkd yiz zse a ClientboundAddPlayerPacket instead?

#

erm

#

wouldntt you use a ...

#

instead of AddEntityPacket?

eternal night
#

make sure to send the update packet first

sacred prairie
#

thanks :D it seems to work but i probably have to send the pose with a packet too

#

you have to do OnPlayerJoinEvent instead of PlayerJoinEvent because you register a listener and not call an event

haughty granite
#

omg

sacred prairie
#

?

haughty granite
#

it's because I renamed the file several times...

#

I am too stupid

#

thanks

sacred prairie
#

ye you have to pas in the class name

haughty granite
#

by emptying the usercache file, it allows me to reset the hasPlayedBefore() ?

sacred prairie
#

idk

tardy delta
#

afaik no

#

you need to remove files

#

in world folder

lethal knoll
#

Is there anyone aware of a bug with the Warden entity? I got a plugin that registers UUID of mobs being spawned during a certain period. Then later it uses the remove() on the LivingEntity. All mobs are despawned except for Wardens

lethal knoll
#

Is there anyone aware of a bug with the

drifting viper
#

should i use Plugin or JavaPlugin if i want to manage a Plugin

pseudo hazel
#

manage in what way

drifting viper
#

Disbale | Enable | Register Events should generelly use JavaPlugin over Plugin ir not ?

hazy parrot
drifting viper
#

are there other impl like KotlinPlugin ?

rotund ravine
rotund ravine
river oracle
#

KotlinPlugin lol that'd be funny asf

#

Minecraft Kotlin Edition

hazy parrot
#

It will be more or less same impl anyway lol

rotund ravine
#

It will be the exact same implementation

river oracle
#

Cuz the new keywords kotlin has

drifting viper
#

okay guys tanks

rotund ravine
drifting viper
#

maybe some day currently watching Better Call Saul

pseudo hazel
#

lol

frank kettle
#

is there a way to see if a block isn't a existing item? like POTATOES is a Material but it's not a real item, the real item is POTATO. same with carrots and so on. so is there a way to check this?

#

the item doesn't return null but if I tried to place it as an item on a inventory, it's like AIR ๐Ÿค” and i want to fix this

hazy parrot
#

isItem() maybe ?

frank kettle
#

๐Ÿ˜ฎ

#

didn't know that was a thing, thanks a lot, will try

#

it works

#

thank you again

hazy parrot
#

awesome !

onyx fjord
#

can i somehow move file sidebar in IJ to the right side and gradle and other to the left?

remote swallow
#

drag it

onyx fjord
#

oh siht

eternal night
glad prawn
#

lol

onyx fjord
#

but cant have gradle and project in the same sidebar split like in vsc

#

rip

pseudo hazel
#

you mean like visible at the same time?

#

idk

#

i use the new ui style but idk if there are any differences on that regard

remote swallow
#

anyone here thats ued github workflows know how i can fix this

eternal night
#

your file has incorrect permissions

#

usually because you checked it in incorrectly

onyx fjord
remote swallow
#

how would i fix it

onyx fjord
#

i also use new ui style btw

pseudo hazel
#

hmm yeah then idk srry

onyx fjord
eternal night
#

^

#

average windows user I presume

onyx fjord
#

thank god for the chmod

remote swallow
#

how would i actually do that on the repo

eternal night
#

prayHalo thank god for the chmod

#

its a local git commanmd

onyx fjord
eternal night
#

you commit it ^

remote swallow
#

ah

#

would i just make path gradlew

eternal night
#

yea ./gradlew

remote swallow
#

same error

onyx fjord
#

can u somehow throw exception with some additional message to it?

eternal night
#

exceptions take messages ?

onyx fjord
#

or i just log severe

#

shit ur right

#

based

remote swallow
#

is it possible to make it the workflow use 2 java versions to run buildtools

#

im guessing something with this

#

forget i asked

#

found it on google

eternal night
#

matrix

#

xD

shut field
#

Cannot open an inventory of type MERCHANT
How do you open a villager inventory for a playuer?

echo basalt
#

you gotta have an entity id and all

#

and then create an NMS inventory iirc

#

because events and all

shut field
#

I am doing Bukkit.createInvetory(player, InventoryType.MERCHANT)

echo basalt
#

yeah that won't do

shut field
#

so how do you make an inventor using NMS?

chrome beacon
#

Looks at how villagers open the inventory

echo basalt
#

It's a bit specific

#
Level nmsWorld = ...;
Player nmsPlayer = ...;

Villager villager = new Villager(EntityType.VILLAGER, nmsWorld);
villager.setVillagerData(new VillagerData(VillagerType.PLAINS, VillagerProfession.FARMER, 5));
villager.setOffers(new MerchantOffers());
villager.getOffers().add(new MerchantOffer(new ItemStack(Items.EMERALD, 1), new ItemStack(Items.DIAMOND, 1), 1, 1, 1));

villager.openTradingScreen(nmsPlayer, new TextComponent("Test"), 1);
#

remapped

shut field
#

interesting

#

thanks

quaint mantle
#

hmmm what does that mean?

#

ooh I cant send photos

#
int pageNum = 0;
         if (this.getConfig() != null) {
           for (String page :  this.getConfig().getConfigurationSection("book.pages").getKeys(false)) {
             List<String> lines = this.getConfig().getStringList("book.pages." + page);
             pageNum++;
             for (String line : lines) {
               if (meta.getPageCount() <= lines.size()) { 
                  meta.addPage(line);
                  continue;
               }
               if (lines.size() < meta.getPageCount()) meta.setPage(pageNum, lines.get(pageNum-1));
             }
           }
remote swallow
#

that is a bad way to add pages

#

just make the config section a string list

#

then add that string to a page

#

it auto formats it

quaint mantle
#

but I want to control the content in each page

remote swallow
#

you do

#

by 1 string

#

not 100's

quaint mantle
#

hmm

#

can I use \n then?

remote swallow
#

why would you need that

quaint mantle
#

new line

remote swallow
#

yeah but why

quaint mantle
#

Hi my name is 7wdev.

#

my age is 5555555.

#

ip: 77777777.

#

imagine all of that in one line*

quiet ice
#

Just split on \n if it need to be configurable

quaint mantle
#

using a single string should fix the nbt tag thing?

twilit roost
#

How to hide players from TABLisT?

dim bluff
#

Before and after of my code

quaint mantle
remote swallow
#

@eternal night would you happen to know why i get an error saying that GIT_TOKEN doesnt exist when i pass it in from the env as seen below

quaint mantle
#

is it a secret maybe

#

idk

remote swallow
#

yeah

quaint mantle
#

repo_token: "${{ secrets.TOKEN }}"

#

mine looks a lil differetnt

#

I have TOKEN as a repo secrcret

remote swallow
#

wheres the place that you use the secret

quaint mantle
#
  • uses: "marvinpinto/action-automatic-releases@latest"
    with:
    repo_token: "${{ secrets.TOKEN }}"
    automatic_release_tag: "latest"
    prerelease: true
    title: "Development Build"
    files: |
    build/libs/*.jar
#

not same thing but maybe try the ${{ }}

remote swallow
#

already has the ${{}}

quaint mantle
#

you could try putting it in "'s

remote swallow
#

trying now

dim bluff
#

pretty good indeed, too bad he donโ€™t have more videos

remote swallow
sterile token
remote swallow
#

no idea lol

sterile token
#

Atleast that is how maven works

remote swallow
#

ill test it out when the thing im trying now finishes

toxic haven
#

I have my build destination to my server's plugin folder but it doesn't build to that?

undone axleBOT
sterile token
#

your pom please

toxic haven
#

ughhh is it find that im using gradle as my project manager bcuz i just switched n don't know if it eve got a pom

remote swallow
#

paste your build.gradle then

toxic haven
remote swallow
#

easiest way you can build to another location is with gradle shadow

#

add id "com.github.johnrengelman.shadow" version "7.1.0" to the plugins and create a shadowJar section

#
shadowJar {
    destinationDirectory = file("path") 
}
buoyant viper
#

now send me the secret . AbsoluteHalal

remote swallow
#

ghp

buoyant viper
#

oh fuck that Idk

#

i looked at the page for it once and never looked again

remote swallow
#

i hate them too

#

i dont get it either

toxic haven
#

Hmm, how do people get texture packs to have a different texture if the item has some ID on it?

remote swallow
#

custom model data

#

Custom_Model_Data is an numeric NBT Tag in the JSON item models in Minecraft, we can use it to create multiple variations of the same item in one resource pack. We can therefor define a number to a new model, if said number is greater then or equal to the one before it, our new model [โ€ฆ]

mellow edge
#

for now I have made that whenever I click on the text, the command is executed, but is there anything I can do, so I can (on the player text click) run a callback or something, so I don't need to create external commands to run code on clicks

#

(for now I have: no.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/tpadeny"));)

peak depot
river oracle
#

PlayerInteractEvent provides an Action

#

Just use that

dim bluff
#

org.bukkit.persistence.PersistentDataContainer persist through UUID or through nicknames?

eternal night
#

uuid based

river oracle
#

UUID nothing internally uses name anymore

twilit roost
#

How can I know if World ( name = "arena-100" ) does filter under arena-*?

dim bluff
eternal night
#

as etermal as your inventory is

dim bluff
hazy parrot
eternal night
#

so yea, pretty much until the owner yeets your playerdata

dim bluff
#

so it's safe to put non-bought things to a persistent data container?

eternal night
#

I would highly highly recommand storing anything remotely connected to actual financial purchases into a proper database

dim bluff
eternal night
#

I mean, if you already store bought things in a DB

#

use the DB

#

but I guess otherwise it is fine

river oracle
#

I mean I wouldn't replace a db with PDC

eternal night
#

^

#

its nice for small flags

dim bluff
eternal night
#

especially things you don't need querying offline

#

etc

dim bluff
eternal night
#

yea, I use it for stuff like settings

#

worst case it is gone

#

redo the settings

dim bluff
#

okay

#

thanks

buoyant viper
peak depot
#

no it should be just an A not P+

buoyant viper
#

oh yeah

#

i can totally read ๐Ÿ‘

pseudo hazel
#

well how did you code it then

peak depot
sullen marlin
mellow edge
#

do all plugins function like that?

#

(creating an external command=

toxic haven
#

When making a command with a lot of args should you use else-ifs or a switch to manage all of those args?

sullen marlin
#

With click events being commands? Yes

mellow edge
#

ok

sullen marlin
#

Switch, map, whatever you feel like

river oracle
#

Cuz I'm fucking cool

buoyant viper
#

i create subcommand classes AbsoluteHalal

#

jk

#

i just switch() usually

mellow edge
toxic haven
#

When I use CommandExecutor it has online player's as the default tab auto-complete how can I disable it?

sullen marlin
#

implement TabExecutor

onyx fjord
#

can i somehow optimize packet sending to player? (to prevent packet spam)

#

they dont seem to like it when theres too many packets

chrome beacon
#

Send less packets?

dry yacht
onyx fjord
chrome beacon
#

Use less particles

onyx fjord
#

i kinda need the amount of particles im using

chrome beacon
#

Then there's nothing you can do

vivid skiff
#

How can i teleport a player at the center of a chunk?

drowsy helm
#

(chunkX - 1) * 16 + 8

vivid skiff
chrome beacon
#

Yeah same with z

#

For Y you probably want the highest block

vivid skiff
#

ok thanks

onyx fjord
serene sigil
#

yo can any 1 help me with something?

#

basically i set the spawn location of a custom world on startup

rotund ravine
#

yes?

#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

serene sigil
#

System.out.println(redWorld.setSpawnLocation(new Location(Bukkit.getWorld(REDWORLD), 0.5, redWorld.getHighestBlockYAt(0, 0)+1, 0.5)));

#

ignore the print

#

and then i have a command that tps me to the spawn location of that world, it works but it doesnt tp me on the block, instead it tps me to 0, 0

rotund ravine
#

I mean that's what you set?

serene sigil
#

i set 0.5

#

so it tps me on the block

rotund ravine
#

How are you teleporting

serene sigil
#

Player#teleport(Location)

rotund ravine
#

What location.

serene sigil
#

Bukkit.getWorld(BLUEWORLD).getSpawnLocation();

rotund ravine
#

But, that's blueworld not redworld

serene sigil
#

oh nvm ignore the world names, i have basically the same code for 2 worlds

#

but thats not the issue

rotund ravine
#

Okay, wahat does getSpawnLocatio nreturn.

serene sigil
#

a Location

rotund ravine
#

What does it hold

#

when you try to teleport

#

What is it actually, what is the object inside the location.

#

What is the object.

#

Not what class it is

serene sigil
#

the full code:

rotund ravine
#

Print out

#

spawnlocation

#

and

#

show me

serene sigil
#

i did

rotund ravine
#

the output

serene sigil
#

it is 0, 0

rotund ravine
#

Then you didn't set it properly.

serene sigil
#

wdym?

#

i set a new Location

#

with 0.5

rotund ravine
#

Set it properly.

serene sigil
#

wdym?

rotund ravine
#

How does you plugin.yml look?

serene sigil
rotund ravine
#

Yeah

#

When do you load the world?

serene sigil
#

startup but delayed by 1 tick

rotund ravine
#

Delay the spawn setting by another tick

serene sigil
#

so it loads

rotund ravine
#

try that

serene sigil
#

but the thing is that its correctly set, but i think its like casted to an int or sth

#

so it removed the .5

rotund ravine
#

Maybe, too lazy to look at the stash

serene sigil
#

lol

bold vessel
#

som1 know how to remove the placeholder from the essentials message in chat

rotund ravine
#

Why did you ask in two places?

toxic haven
buoyant viper
#

custom characters + resourcepack

#

iirc

toxic haven
#

event.getPlayer().getDisplayName() How do I get DisplayName using the maintained method?

serene sigil
rotund ravine
#

I was too lazy so i never opened it.

serene sigil
#

๐Ÿ˜ฆ

#

any 1 else?

toxic haven
#

ye

remote swallow
#

use spigot api

toxic haven
#

ahh aight

bold vessel
tawdry echo
#

someone has an idea for a slightly better system because I don't really like this one at the moment but it works (I think)

    @EventHandler(ignoreCancelled = true)
    void event(InventoryClickEvent event) {
        Player player = (Player) event.getWhoClicked();
        
        if (!event.getInventory().getType().equals(InventoryType.ANVIL))
            return;
        
        if (!Arrays.asList(InventoryAction.PICKUP_ALL, InventoryAction.PLACE_ALL).contains(event.getAction())) {
            event.setResult(Result.DENY);
            player.sendMessage("cancel action");
            return;
        }
            
        if (event.getRawSlot() > 2)
            return;
        
        ItemStack item = event.getCursor();
        if (!item.hasItemMeta())
            return;
        
        ItemMeta meta = item.getItemMeta();
        PersistentDataContainer data = meta.getPersistentDataContainer();
        String blockRepair = data.get(new NamespacedKey(main, "block-repair"), PersistentDataType.STRING);

        if (blockRepair != null) {
            event.setResult(Result.DENY);
            player.sendMessage("cancel");
            sendInfo(player, event);
        }
    }
#

ignore sendInfo method

dry yacht
# serene sigil any 1 else?

The world's spawn location is a block position, which always floors to an integer. Your floating point values won't persist. If you need floating point values, you gotta store and correlate them to a world externally.

wet breach
#

or condense down your if checks

#

null checks should always be first

toxic haven
tawdry echo
dry yacht
# tawdry echo someone has an idea for a slightly better system because I don't really like thi...

That Arrays#asList with it's contains call seems pretty wasteful for a simple check for two values, I'd most definitely get rid of that first. If it would be a long list, you should have it outside of your method to not re-generate it every time, but in this instance, a simple if (!(action == PICKUP_ALL || action == PLACE_ALL)) would suffice. You could also write if(action != PICKUP_ALL && action != PLACE_ALL) due to de-morgan, but that's just taste at this point.

dry yacht
# tawdry echo ignore sendInfo method

ItemStack#hasItemMeta internally just compares the return value against null, so I'd rather do that myself. Just get the meta and return if it's null, rather than to have to generate the meta twice.

toxic haven
#

๐Ÿง›โ€โ™‚๏ธ

tawdry echo
dry yacht
maiden thicket
#

its a maven issue

#

dont know why ur telling them to go to paper just because they have the api

wet breach
#

if switch is something new to you

#

then I recommend you do some research and reading and learn how to use it to understand it. However if your code works and you are happy with it, you don't need to change it

#

but do remember you did ask for opinions

dry yacht
tawdry echo
quaint mantle
#

How do I modifiy a packet using protocollib Im trying to modify the Display Name field

        protocolManager.addPacketListener(
            object : PacketAdapter(this, ListenerPriority.HIGHEST, PacketType.Play.Server.PLAYER_INFO) {
                override fun onPacketSending(event: PacketEvent?) {
                    val packet = event?.packet

                    // Change Display Name to UUID.randomUUID() and its the 6th field
                    packet?.playerActions?.write(5, UUID.randomUUID())
                }
            }
        )
#

I cannot figure out how to change a value ? I dont know how to get an instance of a TFIeld

onyx fjord
#

Good idea is to use wrappers

quaint mantle
#

Wdym

onyx fjord
#

Protocollib has a repo with wrappers for certain packets

#

To work with them easier

quaint mantle
#

do you know the repo

onyx fjord
#

Google protocollib packet wrappers

dry yacht
onyx fjord
#

Not using protocollib so no idea

dry yacht
#

Oh, lol

onyx fjord
#

To be honest I even prefer nms packets

dry yacht
#

Yeah, same, I appreciate nms classes in general. I still think that operating on the byte layer is optimal, but it requires way too much effort to build properly.

I just noticed that you - in some cases - cannot rely on the field order of getDeclaredFields, which even it's documentation warns about. So it would be funny if they completely rely on that. Seems to work tho.

quaint mantle
#

[15:15:12 ERROR]: [Test] Unhandled exception occured in onPacketSending(PacketEvent) for Test
java.lang.StackOverflowError: null

        protocolManager.addPacketListener(
            object : PacketAdapter(this, ListenerPriority.HIGHEST, PacketType.Play.Server.PLAYER_INFO) {
                override fun onPacketSending(event: PacketEvent?) {
                    event?.isCancelled = true
                    val packet = event?.packet

                    // Change Display Name to UUID.randomUUID() and its the 6th field
                    val wrapper = WrapperPlayServerPlayerInfo(packet)
                    wrapper.data = wrapper.data.map {
                        PlayerInfoData(
                            it.profile,
                            it.latency,
                            it.gameMode,
                            WrappedChatComponent.fromText(UUID.randomUUID().toString())
                        )
                    }

                    wrapper.sendPacket(event?.player)
                }
            }
        )
buoyant viper
#

Maven doesnt automagically know where your minecraft server is

#

i wish whygodwhy

toxic haven
#

I did it through IntelliJ as I followed a guide.

buoyant viper
#

Maven package and IntelliJ artifacts arent the same lelebCry

#

shouldnt mix the two either

toxic haven
#

ahh

buoyant viper
#

@toxic haven since it looks like ur using the mvn shade plugin, u should probably set outputDirectory in the shade goal configuration

dry yacht
#

Not really much info provided. What prevents you from iterating all blocks in 3D space between two coordinates and storing their block state either in a list or persistently somewhere else? You could then always call update on that state and revert to the block at the time of the snapshot.

#

Not really, at least not if you're operating on a plugin. You could modify the world region binary files directly, but I wouldn't advise such a low-level operation. Otherwise, there aren't really any other choices.

sterile token
bold vessel
#

alr mb

buoyant viper
#

idfk whygodwhy i just copy-paste it from target anyway

tender shard
#

doing it in the shade configuration would break many things, e.g. remapping

buoyant viper
#

just run shade last Evil_Rondo

haughty granite
#

surely something stupid, but how to have the autocomplete functions of spigot/bukkit on intellij?

#

I'm using maven and I thought it would automatically import the libraries

#

I don't even have the autocomplete to create an onCommand()...

hazy parrot
#

If you just start writing on Command(without public boolean), nothing shows up?

hazy parrot
#

Make sure to implement CommandExecutor too

#

It should, as intellij autocomplete functions which can be overriden

rotund ravine
#

Press ALT + Insert and Override methods

haughty granite
#

oh I just got it

#

I had to wait for the indexing that I had not seen

#

is it possible to change the meta (name, lore, enchant) of an item you hold in your hand?

rotund ravine
#

Ye

remote swallow
#

player.getInventory().getItemInMainHand().getItemMeta

rotund ravine
#

Obv need to set it back etc.

remote swallow
#

yeah

haughty granite
#

but I have to put it back in the inventory?

rotund ravine
#

You shouldn't need to.

remote swallow
#

just back on the item

haughty granite
#

just enough?

rotund ravine
#

Should be

remote swallow
#

should be

haughty granite
#

it is, thank you

#

how can I accept a sentence in a command to change the name of an item?

#

like /plugin set name "new name"

rotund ravine
#

If you do not use a command library, you would need to pass the arguments.

haughty granite
#

from argument X I concatenate them?

remote swallow
#

string builder and join them at a space

#

with the values of the String[]

haughty granite
#

ok I was going in the right direction

#

ty both

rotund ravine
# haughty granite from argument X I concatenate them?

If you want to cheat here is some spoonfed code that you won't understand:

if (parts.length >= 3 && parts[0].equals("set") && parts[1].equals("name")) {
    String nameInQuotes = parts[2].replaceAll("^\"|\"$", "");
}
return true;
#

Wait nvm that's broken

haughty granite
#

I did that?

rotund ravine
#

Remember indices start at 0

haughty granite
#

yes I have another arg before

rotund ravine
#

Something like this:

if (parts.length >= 3 && parts[0].equals("set") && parts[1].equals("name")) {
    StringBuilder sb = new StringBuilder();
    for (int i = 2; i < parts.length; i++) {
        if (parts[i].startsWith("\"")) {
            sb.append(parts[i].substring(1));
        } else if (parts[i].endsWith("\"")) {
            sb.append(" ").append(parts[i].substring(0, parts[i].length() - 1));
            break;
        } else {
            sb.append(" ").append(parts[i]);
        }
    }
    String nameInQuotes = sb.toString();
}
haughty granite
#

this is exactly the construction of my command lol

#

the code is very clean thank you very much

rotund ravine
#

Obv, you can also accept things not in quotes.

remote swallow
#

you can probably make < <= so it works for that 1 extra arg

haughty granite
#

I'm going to have to use it for every modification, might as well make it a utility, right?

rotund ravine
#

Yeah it's a bit too complex to copy and paste it a lot.

haughty granite
#

something to say?

rotund ravine
#

Yeah, looks fine. This i pulled out of my ass to both allow "/plugin set name xxxx" & "/plugim set name "xx xxx""

if (parts.length >= 3 && parts[0].equals("set") && parts[1].equals("name")) {
    String nameInQuotes = "";
    if (parts[2].startsWith("\"")) {
        StringBuilder sb = new StringBuilder();
        for (int i = 2; i < parts.length; i++) {
            if (parts[i].startsWith("\"")) {
                sb.append(parts[i].substring(1));
            } else if (parts[i].endsWith("\"")) {
                sb.append(" ").append(parts[i].substring(0, parts[i].length() - 1));
                break;
            } else {
                sb.append(" ").append(parts[i]);
            }
        }
        nameInQuotes = sb.toString();
    } else {
        nameInQuotes = parts[2];
    }
    // Do somethign with the name.
}
haughty granite
#

love your ass

#

it takes the last " but not the first

hazy parrot
#

me when StringJoiner

rotund ravine
#

Ah

haughty granite
#

๐Ÿ˜‚

rotund ravine
#

Just tinker with this line maybe - 2:

sb.append(" ").append(parts[i].substring(0, parts[i].length() - 1));
#

Oh wait

#

i see what happened

#

not that line

haughty granite
#

the game does not break the words on the lore of an item, I have no way to change the description via a command?

rotund ravine
#

Hm?

#
if (parts.length >= 3 && parts[0].equals("set") && parts[1].equals("name")) {
    StringBuilder nameBuilder = new StringBuilder();
    for (int i = 2; i < parts.length; i++) {
        nameBuilder.append(parts[i]);
        if (i < parts.length - 1) {
            nameBuilder.append(" ");
        }
    }
    String name = nameBuilder.toString();
    if (name.startsWith("\"") && name.endsWith("\"")) {
        name = name.substring(1, name.length() - 1);
    }
    return name
}
static ingot
#

Anybody know off-hand if ConfigurationSection#isDouble also returns true when ConfigurationSection#isInt is true?

rotund ravine
#

I pulled somethign else out of my ass.

rotund ravine
remote swallow
#

your ass has a lot of stuff in it

rotund ravine
haughty granite
#

give your ass

static ingot
#

o.o

haughty granite
remote swallow
#

jotututuck

rotund ravine
#

Yeah, you need to make a split.

haughty granite
#

yessssss

#

is there a character limit?

rotund ravine
#
String input = "123\\n123\\n";
String[] substrings = input.split("\\n");
List<String> result = Arrays.asList(substrings);
#

Probably.

haughty granite
#

from ur ass again?

rotund ravine
#

Yeah

remote swallow
#

discords formatting is a bit wack

haughty granite
#

well I'm going to go in your ass

rotund ravine
remote swallow
#

select it all and just drag ur mouse on and off the message

#

it breaks my selecting somehow

haughty granite
rotund ravine
#

The description can just be set as the lore.

#

Think that's what IJ is telling you too.

haughty granite
#

oh

#

the description does not apply

rotund ravine
#

Show full code.

haughty granite
#

?paste

undone axleBOT
haughty granite
rotund ravine
#

Well. Try doing player.setItemInMainHand(item) then

haughty granite
#

and this is literally your file ^^

haughty granite
rotund ravine
#

Ah

haughty granite
#

maybe the ParsingUtils.spliting(args) doesn't return what it should?

rotund ravine
#

ParsingUtils.spliting(ParsinUtils.parsing(args))

#

Oh ur already doing that

#

Are you using \n in your lore?

haughty granite
rotund ravine
#

That's the reason then.

#

do.

haughty granite
haughty granite
rotund ravine
#

Do smth like

#
List<String> result = null;
if (substrings.length() > 1) {
  result = Arrays.asList(substrings);
}
else {
  result = Array.asList(input);
}
return result;
rotund ravine
#

Sry it was just so you can put your own new lines in it.

#

Not based on words.

haughty granite
#

I should be the one apologizing, not you

#

description does not fulfill its role

#

splitting method does not split correctly in fact

rotund ravine
#

Rip

haughty granite
#

I have tried many things but nothing works bruh

hearty horizon
#

import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.Bukkit;

public class Elizadrop extends JavaPlugin implements Listener {

@Override
public void onEnable() {
    Bukkit.getServer().getPluginManager().registerEvents(this, this);
}

@EventHandler
public void onDeath(PlayerDeathEvent deathEvent) {
    Player p = deathEvent.getEntity();
    if (p.getName().equals("fioxu")) {
        p.getWorld().dropItemNaturally(p.getLocation(), new ItemStack(Material.ROTTEN_FLESH, 1));
    }
}

}

#

items after death are invisible only to player "fioxu"

#

what can i change to fix this...

haughty granite
#

?paste

undone axleBOT
remote swallow
hearty horizon
#

yes but items are invisible for fioxu (me)

remote swallow
#

any client side mods?

kind hatch
hearty horizon
haughty granite
remote swallow
haughty granite
#

print returns this to me

#

[03:15:56] [Server thread/INFO]: [yes\nwhy\n]

#

on result list

kind hatch
#

How are you splitting them? Also, are you not able to use a List<String>?

haughty granite
bold vessel
#

Som1 can help me for fixing this error

#

I import vault in my maven

#

And its not working

kind hatch
#

?paste large code blocks. PLEASE

undone axleBOT
bold vessel
bold vessel
remote swallow
#

if you are trying to use essentials api

#

you need essentials dep

bold vessel
#

Essentials as dep issouserious

haughty granite
bold vessel
#

vault est importรฉ dans mon pom.xml

haughty granite
#

et essentials ?

#

sheeesh

bold vessel
#

Essentials jai pas trouvรฉ comment dans le pom

#

Je pensais que vault suffisait

haughty granite
#

<dependency>
<groupId>net.essentialsx</groupId>
<artifactId>EssentialsX</artifactId>
<version>2.19.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
</exclusion>
</exclusions>
</dependency>

#

pour essentials

untold stirrup
#

salut

#

mdr

remote swallow
#

make sure to reload maven

bold vessel
bold vessel
untold stirrup
haughty granite
#

on est pas bcp

bold vessel
#

Stylรฉ

kind hatch
# haughty granite you may be able to understand better https://paste.md-5.net/unakohesoy.js

Something I want to clarify. I'm assuming that you have a config section that is just a normal string. Smth like

section: "My String that I need to\nput on multiple lines."

Is there any reason you can't make it a list?

section:
  - "My String that I need to"
  - "put on multiple lines."

It's fine if you can't or don't want to. I'm just trying to give suggestions here. Because if you did it the second way, you could just call FileConfiguration#getStringList("section") and it would give you your list.

haughty granite
#

excuse nous shakespear

bold vessel
#

espagnol allemagne ?

haughty granite
untold stirrup
kind hatch
#

Gotcha

bold vessel
#

Insane

#

L'arabe ca a l'air trop dure

bold vessel
#

J'essaie ca

kind hatch
#

How are you making the string in the command?

remote swallow
#

now

#

something doesnt add up

haughty granite
#

the description changes, but the split does not

remote swallow
#

ebibic

haughty granite
#

ebicepic

remote swallow
#

that might be me

haughty granite
#

do

remote swallow
#

do?

haughty granite
#

od

kind hatch
# haughty granite

You could just do a String#split("\n"). When you use String#split() it removes the characters you provide from the original string. So all you are left with is the sections you want. Then all you would have to do is iterate over the string array and put into a list. Or use Collections#addAll(). Your preference.

String[] message = args[2].split("\n");

List<String> itemDesc = new ArrayList<>();
Collections.addAll(itemDesc, message);
remote swallow
#

i was wondering what that 2nd \ was

kind hatch
#

Oh wait. You'd have to first collect all arguments as a string.

#

You should be able to do that with String#join()

untold stirrup
haughty granite
bold vessel
#

https://paste.md-5.net/iwanoqajuc.java

Do you know why this line doesnt work and by what can i change the getEconomy ?
com.earth2me.essentials.api.Economy econ = com.earth2me.essentials.api.Economy.getEconomy();

untold stirrup
bold vessel
haughty granite
#

regarde la vidรฉo รงa t'explique l'initialisation du plugin

bold vessel
#

Okk

haughty granite
#

comme รงa t'auras la bonne maniรจre de faire

#

tu pourras faire ce que tu veux faire aprรจs tqt

hazy parrot
#

atleast keep chat in english

haughty granite
#

yes sorry

bold vessel
#

yeah mb

#

he's using getBalance i try this

kind hatch
haughty granite
bold vessel
haughty granite
bold vessel
#

i have an error with getEconomy

#

but its imported

haughty granite
#

and then in your command

#

Economy economy = Main.getEconomy();

bold vessel
#

its my main.java

bold vessel
haughty granite
untold stirrup
#

hypixel using spigot software ?

bold vessel
bold vessel
untold stirrup
#

mdr

kind hatch
untold stirrup
bold vessel
#

hein

#

banquale l'anglais

haughty granite
bold vessel
#

Now i have this error with the line 26

untold stirrup
haughty granite
bold vessel
kind hatch
haughty granite
# bold vessel

you have to import your main class at the top of your file

bold vessel
#

okk

kind hatch
#

Yea. I iterated over the list though.

haughty granite
#

omg

bold vessel
haughty granite
#

i forget the for ayaaaaaaaa

bold vessel
#

still not working

haughty granite
#

mais non gros con

bold vessel
#

frere je fais quoi jcomprend pas ๐Ÿ’€

remote swallow
#

its case sensitive

haughty granite
kind hatch
# haughty granite i forget the for ayaaaaaaaa

Well, you shouldn't have to iterate over the list if you are applying it to an itemstack. You just have to provide it. The formattedMessage list should have the \n characters removed from the strings.

bold vessel
haughty granite
#

public buyTicket(WOLoto plugin)

bold vessel
#

bv mdrrr jsuis debile

kind hatch
bold vessel
glad prawn
#

Don't try to create a plugin if you don't know how to code. ๐Ÿ’€๐Ÿ™

river oracle
#

what the

kind hatch
#

That method is inside of another method.

#

Move it out.

river oracle
#

?learnjava!

undone axleBOT
river oracle
#

at minimum learn the basics

#

like making methods

#

and variables and classes

haughty granite
glad prawn
kind hatch
haughty granite
#

and it always returns the same: [04:06:50] [Server thread/INFO]: first line\nsecond line

worldly ingot
#

Likely because \n is actually a recognized pattern in RegEx (which #split() accepts, a RegEx pattern) so it's looking for the actual whitespace char rather than \n explicitly

#

You can fix that by either changing your split to be "\\\n", or just use | to split lines instead like most people do

#

Also, rather than StringBuilder in your parsing() method, you might find StringJoiner to be a bit nicer to use

StringJoiner joiner = new StringJoiner(" ");
for (int i = 2; i < args.length; i++) {
    joiner.add(args[i]);
}```
quaint mantle
#

Are there are good 1.17 libraries for plugin dev?

kind hatch
#

I can't say I've ever seen anyone use the pipe character to split lines.

haughty granite
#

but why does it work on Shadow and not on me?

worldly ingot
#

Literally Essentials does it KEKW

kind hatch
#

Tf? lmao

haughty granite
#

essentials ๐Ÿ˜ฆ

worldly ingot
#

It has a /lore command iirc that does use the pipe symbol

kind hatch
#

Lol, that's news to me. I've always used EpicRename if I wanted to set lore on things.

worldly ingot
#

That's the most Minecraft plugin-y name I've ever heard

remote swallow
#

i name all of my plugins EpicNAME normally

#

because Epic is my name

haughty granite
#

epicpicpic

glad prawn
#

EpicRareLegendary

worldly ingot
#

Sylfaen, I can also get it to work just with this small test snippet

String[] input = { "first", "line\nsecond", "line" };
String message = String.join(" ", input);

System.out.println(Arrays.toString(message.split("\n")));```
So I'm not sure why it's not working for you. Though I would still advise either using a pipe symbol or changing your split to be `"\\\n"` instead, because that also works and is probably a lot safer
#

It might even just be a platform-dependent thing

#

But \\\n will guarantee you that you're removing \n as a literal rather than the whitespace char

haughty granite
worldly ingot
haughty granite
#

[04:23:11] [Server thread/INFO]: [f, i, r, s, t, , l, i, n, e, |, s, e, c, o, n, d, , l, i, n, e]

glad prawn
#

Damn

haughty granite
#

uwu

worldly ingot
#

lol, pipe symbols are special in RegEx as well

#

\\|

haughty granite
#

it was for the joke hehe

#

indeed it works well with the pipe sylmbol

worldly ingot
#

Maybe you want to be special and allow both ๐Ÿ‘€ "[\\\n|\\|]"

haughty granite
#

thank you very much it was not won lol

glad prawn
#

no need to delete...

haughty granite
#

no need to explain...

haughty granite
worldly ingot
#

You're re-using ItemMeta

#

You should make a new ItemStack for each coupon. Move everything item-related into your loop

undone axleBOT
haughty granite
#

I guess there are cleaner ways than doing it this way, right?

remote swallow
#

.?learnjava has no gif ?learnjava**!** has a gif

#

i send that then see you in spigotcraft be like

glad prawn
#

?learnjava!

undone axleBOT
remote swallow
#

?learnjava

undone axleBOT
remote swallow
#

see

glad prawn
remote swallow
#

lmao

vagrant stratus
#

Is there a good util which converts seconds, minutes, etc to ticks and vise versa?
I'm like 99% sure I screwed up the conversion so I might as well use a util if one already exists lmao

frank kettle
#

Why do u need a util for that? Isn't it just 20 ticks per second?

#

(Minutes * 60 + seconds) * 20L?

#

๐Ÿค”

vagrant stratus
#

I fucked up the math majorly lmao

there was one that I used previously which also converted it to hh:mm:ss format, but I don't have that class anymore lol

frank kettle
#

I usually just make my own.

Like

Minutes = 0
Hours = 0
while (seconds > 60) {
  Minutes++;
  Seconds -= 60
}
While (minutes > 60) {
  Hours++;
  Minutes -= 60;
}
String time = hours + "h:" + minutes + "m:" + seconds "s"```
#

๐Ÿค”

drowsy helm
#

why while loop lol

#

wastes so many cycles

frank kettle
#

Well, u could make math for it but sometimes the time isn't enough for hours or minutes

river oracle
#

Do you even need loops I've achieved this same thing o(1)

frank kettle
#

Unless u want to check with a if

#

Idk, that's how I been doing and never gave problems ๐Ÿค”

drowsy helm
#

its not about problemse

#

its just inefficient

#

thats an o(n) solution

frank kettle
#

I'm lazy to fix things that don't need a fix

#

๐Ÿ—ฟ๐Ÿท

drowsy helm
#

fair

warm light
#

I am thinking about a problem for 2 days but no solution came in mind.

I have a plugin A and I have an Addonloader on plugin A
which use bukkit plugin loader(basically load spigot plugins as my plugin's addon from datafolder)

now one of my addon(named it** B**) need plugin C to run. but plugin C isn't in soft/depend list of plugin A. as a result, C load before A & Addon B don't work.

how can I fix it?

vagrant stratus
# drowsy helm wastes so many cycles

Yea, the one I used did all the math for converting back and forth, as well as converting it into a neat {0} hours, {0} minutes, {0} seconds format or something along those lines

frank kettle
frank kettle
drowsy helm
#

doesn't necessarily have to be a depend

frank kettle
#

Isn't this what you need?

#

Well, won't depend make it so your plugin loads after those in the list?

drowsy helm
#

he said C isnt a depend

#

wait why not make it a soft depend?

#

is there a reason

frank kettle
#

But why isn't it?

warm light
# frank kettle https://www.spigotmc.org/wiki/plugin-yml/

Don't want to add depend as it will not be a solution. plugin A & its addon B made by me. so I can easily add all depends on main plugin's depend list

but what if another developer create any addon of my plugin? he can't modify my plugin(A)

warm light
drowsy helm
#

oh

#

then your addon should depend A

#

then register through api

#

if thats the case

warm light
#

but A can still load before the depends

frank kettle
#

Any addon of a plugin should depend of the main plugin

drowsy helm
#

B should depend C & A

#

then it will load after all of it

frank kettle
warm light
#

here is the loader

frank kettle
#

I never needed to use depend but if something needs to depend on other things then depending has to be depended for it to depend, u feel me?

warm light
drowsy helm
#

I dont see the problem then?

#

plugin C can load at any time

#

if B is being loaded after the fact

frank kettle
#

He said C uses its main plugin and another plugin

#

Why not depend on both plugins if requires both?

drowsy helm
#

if A requires C then it should be a depend

#

or softdepend if not always used

frank kettle
#

What's the issue with depend, have you tried?

warm light
#

A = my plugin plugin (It don't need anything to run)
B = addon of A (it need A ofc. also C)
C = a random plugin

frank kettle
#

Then add depend for both A and C

drowsy helm
#

like i said B should depend A & C

warm light
frank kettle
#

What's the issue?

#

Why is your plugin A enabling others?

#

Plugin.yml will load the plugins correctly and with its own depends

#

If not, then you make your own code to check plugin.yml of your addons and check if they have any depend and load it's depends ๐Ÿ’€ idk how that works but sounds like a mess

#

Why are you even loading your addons on your plugin instead of letting it load by itself?

warm light
#

it register discord slash command on main plugin. so need to load with main plugin

drowsy helm
#

to look cool

frank kettle
#

Why don't you check after few seconds if addon is loaded and so register the slash command?

frank kettle
#

Can't you make a API on the main plugin to register slash commands and then on the addon use that to connect with the discord bot and register the commands? And use depend on the addon

#

It feels like you are connecting them already in some way anyways, why not make the addon itself register the command.

buoyant viper
#

?jd-s for me

undone axleBOT
wet breach
#

when create an addon loader, instead of the plugins depending on spigot API they depend on your loader plugin instead

#

the caveat of this, is that your addon loader needs to now re-expose spigot API as it can't be seen

torn shuttle
#

man working with shader code is wicked fun

green prism
#

How can I make a 1.8/1.19 compatible plug-in?

chrome beacon
#

Depend on 1.8

green prism
#

wdym

chrome beacon
#

Write your code for the 1.8 api

#

And set api version to 1.13 in plugin.yml

green prism
rough drift
#

yes

#

use

#

the

#

1.8 api

green prism
#

woah

rough drift
#

no need for reflection

green prism
#

Thank y'all

#

wait, what java version should I use?

chrome beacon
#

8

rough drift
#

java 8

#

ofc

green prism
#

you're amazing guys, thank you ๐Ÿ™‚

green prism
restive elm
#

Im making custom resourcepack that displays server's gold

.../textures/gui/gold.json

{
  "format_version": "1.14.0",
  "elements": [
    {
      "type": "icon",
      "x": 800,
      "y": 20,
      "width": 32,
      "height": 32,
      "icon": "textures/gui/icons/money_icon.png",
      "scale": 1
    },
    {
      "type": "label",
      "x": 836,
      "y": 20,
      "width": 64,
      "height": 32,
      "text": "${money_amount}",
      "scale": 1
    }
  ]
}

How do i update resourcepack every time gold change?
ChatGPT said i shuold use packet but i couldn't find way in 1.19

rough drift
#

why use a packet?!

restive elm
#

is there any way?

rough drift
#

What are you even doing

#

Just use a font character

#

and send that

#

search up on how to make custom font characters, then send that character

#

for example, if you bind the image to \uE000 if you just send players \uE000 trough a plugin and they have the res pack, they'll see the icon

#

Then it's up to you where you display it

hollow beacon
#

using this pom.xml:

<dependency>
            <groupId>net.coobird</groupId>
            <artifactId>thumbnailator</artifactId>
            <version>0.4.19</version>
            <exclusions>
                <exclusion>
                    <groupId>net.coobird</groupId>
                    <artifactId>javadoc</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

my exclusion doesn't work (screenshot coming)

#

anyone knows why not?

hazy parrot
#

You can't just exclude package like that

hollow beacon
#

how can I? ๐Ÿ˜„

#

interestingly the maven also compiles another plugin of mine with it

#

there is no trace of the plugin to be found

#

nvm its the decomiler

torn shuttle
#

anyone with experience handling enchanted books, am I wrong in believing that enchanted books are books which are actually enchanted with the enchantment they contain?

echo basalt
#

but yes they're enchanted

#

you can hit someone with a fire aspect book and they'll catch on fire

chrome beacon
rough drift
#

Given an arbitrary Listener class, can I "pre-process" the listener's events? (Such as changing data and the likes), or do I have to handle event registering on my own?

#

?stash

undone axleBOT
torn shuttle
echo basalt
#

I'd like to test my sharpness 15 knife

#

so sure

torn shuttle
#

what are you, british?

hollow beacon
echo basalt
torn shuttle
#

man I should've rewritten the enchantment system I made 5 years ago a long time ago

restive elm
#

but in AI's knowledge, it's stopped to 2021

#

and i couldn't search way in 1.19.3

chrome beacon
#

If so why would you even have loading screens in the first place

restive elm
#

i mean ai said use packet to give new data to player's resourcepack

chrome beacon
#

Which would cause a loading screen

#

Since it needs to reload all resources

hollow beacon
#

but the ai said so

restive elm
#

well

#
Here's a high-level overview of the steps involved in sending packets in Minecraft:

Obtain a reference to the player's connection.
Create a new packet object with the updated money amount.
Write the data for the packet to a ByteBuf using an appropriate protocol encoding.
Send the packet to the player's connection using the player's connection's sendPacket method.
restive elm
hollow beacon
#

yes we know but it will still load

restive elm
#

oh

#

then how the servers implement that?

rotund ravine
#

It wonโ€™t

restive elm
#

i can screenshare

#

(i tried putting screenshot here)

hollow beacon
#

i suppose they already have all textures loaded?

chrome beacon
restive elm
chrome beacon
restive elm
#

ohh i just found this

#

Then we don't need resourcepack?

#

since it's custom character

#

but if i wanna display a number, should i make each fonts for each numbers?

icy beacon
#

how do I move a player to the bottom of the tablist? is there an api method or a packet for it?

chrome beacon
#

Use teams

icy beacon
#

oh that could help yeah

#

with the name like "ZZZZZZ" or something?

#

for it to be the lsat

#

last*

chrome beacon
restive elm
#

ah also how do you display numbers next to that character(icon)?

#

1๏ธโƒฃ should i make each number's font?
2๏ธโƒฃ should i use action bar and create cusotm text for it?

green prism
#

How can I detect from the EntityDamageByEntityEvent, if the damage is going to cause the death?

icy beacon
#

check if damage is higher than entity health

eternal oxide
#

final damage

icy beacon
#

yep

#

raw damage does not account for modifiers like armor and potions afaik

green prism
vale ember
#

is listening to chunk load event, going through all entities and removing ones with PDC too performance heavy?

hollow beacon
#

shouldn't be

vale ember
#

ok thanks

eternal oxide
#

You may find entites at chunk load will not actually be loaded

sonic sparrow
#

Is it possible to use a custom jar with specialsource-maven-plugin? Build tools doesnt have the proper mappings that my jar has, how can i go about getting the proper mappings passed through the maven plugin

eternal oxide
#

?nms

warm light
#

is it possible to hide code but only allow to download Releases in github?

sonic sparrow
# eternal oxide ?nms

Sorry if my previous message is not clear, but I have a modified spigot that has mappings that build tools does not map for me. I have source for my spigot and would like to know how to make it use my custom jars mappings

#

Specifically want to know what I need to add to my local maven repo in order for my custom jar mappings to work with the maven plugin

hazy parrot
dry yacht
vocal cloud
#

The only way to really do that is use an authenticated API to reflect the classes in on runtime but not only is that still exploitable but it's a lot of work

vale ember
#

Why does it happen so that if i unload and then load again a chunk with certain entity that i have a field with, i am no longer able to teleport or remove it?

#

and how can i fix it?

wet breach
#

you need a private repo

#

and then if you want a place to distribute binaries easily could just store them in your github page repo

#

think that accomplishes what you are possibly asking?

icy monolith
#
        Player victim = event.getPlayer();
        Player killer = victim.getKiller();
        
        if (!(killer instanceof Player)) {
            return;
        }
        if (!(victim instanceof Player)) {
            return;
        }
        victim.setHealth(victim.getHealth() - 1);
        killer.setHealth(killer.getHealth() + 1);
    }
}```
Does any one know which one of these are more efficient
```java
        Player victim = event.getPlayer();
        Player killer = victim.getKiller();

        if (killer instanceof Player) {
            if (victim instanceof Player) {
                victim.setHealth(victim.getHealth() - 1);
                killer.setHealth(killer.getHealth() + 1);
            }
        }
    }```
#

which way of making my code would be more efficient/better

rotund ravine
#

Why?

#

You donโ€™t need that many nests tho.

icy monolith
#

&& ?

#
        Player victim = event.getPlayer();
        Player killer = victim.getKiller();

        if (!(killer instanceof Player) && !(victim instanceof Player)) {
            return;
        }
        victim.setHealth(victim.getHealth() - 1);
        killer.setHealth(killer.getHealth() + 1);
    }
}```
Like this ig
dry yacht
#

What? Why would you ever join two separate if statements? That's just not gonna add to readability nor efficiency.

quaint mantle
#

is there a way to uniquely identify a spigot server on the internet, like a value that you cant manipulate or clone and that is unique for every server ?

#

i read about server uuids but you can change the vlaue from settings.yml

hasty prawn
#

Why tho

quaint mantle
# hasty prawn Why tho

need to identify different instances because the servers are going to connect to an api and some sockets

#

and i need to know which one is which

hasty prawn
#

If you control the api/sockets and what the server sends, just give them a unique ID and have them send it

spice shoal
#

there is a method to play effect of totem with custom model data?

indigo sage
dry yacht
#

Have you ensured that your ServerMapRenderer is actually instantiated and rendering? Have you printed the map IDs of the item and the renderer? Are they the same?

quaint mantle
hasty prawn
#

Why would that matter at all

#

They could do that with any method you use

quaint mantle
echo basalt
#

those only delay the inevitable

quaint mantle
#

plugins are interfacing with an api that checks if they have a valid subscription

dry yacht
hasty prawn
#

You can't even put plugins like that on Spigot

quaint mantle
echo basalt
#

mac address + subnet?

hasty prawn
#

I know, I'm just saying.

echo basalt
#

actually no just heavily obfuscate some uuid provided by your server

quaint mantle
# echo basalt mac address + subnet?

the plugins call an express restful api so i dont think i can retrieve the mac adress from the request, probably only the ip and port, and even then they could use a reverse proxy or vpn to change it

dry yacht
# quaint mantle actually clever

You're gonna have to call some public IP API and check the socket's port yourself. You can still probably intercept networking and spoof these values.

dry yacht
quaint mantle
#

i thought of session-based authentication aswell, with each session being a socket connection and upon disconnection the server sends a fresh session id that will beused by the server to start up next time

#

upon disconnection the current session id is discarded and a fresh one is fetched

dry yacht
quaint mantle
#

req.connection.remoteAddress
req.connection.remotePort
req.connection.localAddress
req.connection.localPort

can i use this ? or is it spoofable

dry yacht
spice shoal
#

wdym?

remote swallow
#

you can probably create a totem, with the data, and damage them to cause it to play

quaint mantle
#

it is syntax for express.js

dry yacht
quaint mantle
#

like :

app.get('/', function (req, res) {
  res.send('hello world')
})```
#

res is the response object

spice shoal
quaint mantle
remote swallow
dry yacht
wet breach
#

there is literally nothing you can do about reverse engineering nor preventing false data from being sent by it

#

you can't even accurately tell from Java if something is actually spoofed or not from the host because if there is anything the application should do is trust the host, and well it can't do much if the host decides to give it false data

quaint mantle
# dry yacht Clientside what? You're not trying to host that express server in the plugin, ar...

the express server is an api i am hosting publicly for everybody, the clients need to perform certain calls to retrieve some data, but i want to know which server is requesting the data, because each server owner needs to have an account with a subscription (already handled all of the payment stuff and the authentication stuff). All i need now is a way of knowing who exactly is requesting the stuff

chrome beacon
#

Then just give each server an API key or smth?

wet breach
#

if you have a rest api, implement tokens, each server has their own unique token specific to them

quaint mantle
dry yacht
chrome beacon
quaint mantle
dry yacht
wet breach
#

what are you trying to do prevent piracy of your plugin?

#

if that is the case you simply can't

spice shoal
wet breach
#

your licensing doesn't address if I decide to host your plugin somewhere for people to download

quaint mantle
wet breach
#

it also doesn't address if I just privately give it to someone else

quaint mantle
remote swallow
#

wont do anything otherwise

quaint mantle
#

as my plugin only works if it can connect to this api and some sockets that make it actually work

dry yacht
wet breach
#

doubt it

#

you are telling me I couldn't fool your plugin?

#

into thinking it connected to where it thought it should

#

what stops me from using the plugin legitimately to pull the data it so call needs and save it for later?

quaint mantle
spice shoal
wet breach
#

it is impossible to make a plugin that can't accept spoofed data

quaint mantle
wet breach
#

especially with java

wet breach
#

and there is probably a reason you haven't

quaint mantle
wet breach
#

bad for you

#

stop thinking you have this fool proof method for java

#

you are not the first you know

#

and obviously not the last to go down this road

remote swallow
quaint mantle
quaint mantle
wet breach
#

Anyways good luck to your supposed fool proof method. I am sure if there was one, it would be used already ๐Ÿ˜›

quaint mantle
#

change your tone as you are speaking to someone that is being respectful towards you

river oracle
#

Are you adding drm

rotund ravine
#

@worldly ingot

quaint mantle
# wet breach no

then go speak to somebody else or perhaps a friend if you happen to have one

wet breach
river oracle
wet breach
#

yeah whatever DRM they come up with Java will be defeated in just a few seconds

river oracle
#

This reminds me I want to learn bytecode manipulation stuff

wet breach
#

remember that one kid?

#

that asked us to defeat their DRM XD

river oracle
#

Isn't there a whole spigot thread on that still

wet breach
#

think so

quaint mantle
#

the thing is that you guys know nothing about what project i have in mind but the ego in the developing community is insane

#

good lord yall need to speak with more people irl ๐Ÿ’€

river oracle
#

There's no ego its just going to be cracked

#

I mean I'm not being rude I'm just stating an eventuality

wet breach
quaint mantle
wet breach
#

but do let me know if you find some hidden setting in Java that would allow for an uncrackable DRM

wet breach
#

only other thing would be SaaS

#

which you are going to have to address a MITM

#

have fun with that one

quaint mantle
#

a man in the middle for a saas spigot plugin ?

spice shoal
wet breach
#

basically the middle person is the legitimate user requesting on behalf of those that want the data

river oracle
remote swallow
wet breach
#

I think a thing that would be closer in terms would be a proxy

quaint mantle
worldly ingot
#

If you're planning on using DRM on Spigot, stop trying lol

#

We'll insta-reject or insta-delete anything that gets reported