#help-development

1 messages · Page 846 of 1

rare rover
#

What are the best libraries to store lots of data in memory, aka caching. I've came across Caffeine but is there anything better?

atomic niche
#

My knowledge of gaps in smp tools is rather outdated; I haven't been involved in a large server project in quite a few years.
There's only one giant gap that I can think of, and I am kind of reserving that as a potential passion project for this year.
I can tell you of some past gaps though; not sure if they have been filled recently

rare rover
#

I'm looking to store quite a bit of locations

eternal night
#

guava literally tells you to use caffeine instead kekwhyper

atomic niche
#

Also, a few things.

You're basically aiming at medium sized smp servers.
Small ones don't really need tools to run efficiently
Large ones generally develop their own tools.

And, sadly, medium sized smp servers are very rare now, so I am not sure what your potential uptake would be like.

atomic niche
#

When coding things for yourself, just ask your staff what they think would be useful

#

That's the most important thing

orchid gazelle
#

I don't have staff lol

atomic niche
#

Then you probably don't need smp admin utility plugins

#

Off the shelf stuff is usually good enough

orchid gazelle
#

I just want to code cool things for my own smps

#

and im bored

atomic niche
#

like gameplay mechanics?

orchid gazelle
#

no

#

util stuff

#

config stuff

#

admin tools

#

I just like coding stuff by myself instead of using off-the-shelve stuff for every small detail

atomic niche
#

Tbh, as the scale you're at, it would probably be more fun coding gameplay stuff

#

Would make your server more appealing and help attract a playerbase

orchid gazelle
#

well it's aimed to be kinda near to vanilla

atomic niche
#

you can still expand vanilla gameplay

orchid gazelle
idle sparrow
#

Can't you just use spigot out of the box then lol

orchid gazelle
idle sparrow
#

Private, vanilla playerbase? Lol

#

What admin tools would you need

orchid gazelle
#

idk

atomic niche
#

I still think gameplay, vanilla-like mechanics, and expansions thereto is probably the most fulfiling thing you could do

#

either that or identify gaps or outdated implementations in other people's public stuff and make things for others

idle sparrow
orchid gazelle
#

for example I wrote cool stuff like manually locking/unlocking end, scripted system for the start of the server with timers and border stuff and so on, elytra spawn island stuff

orchid gazelle
#

thats the type of stuff

#

I want

pseudo hazel
#

does anyone know how I can create a functioning end world with the world creator? is environment THE_END enough? I dont think that will spawn the dragon etc..

idle sparrow
#

Can't you just do command blocks for simple stuff like that?

orchid gazelle
#

no

atomic niche
#

More accurately, shell scripts

orchid gazelle
atomic niche
#

Shell scripts can do anything if you try hard enough

bleak stream
#

Just use spigot for everything, why complicate it more?

orchid gazelle
#

live end event without having to restart the server

atomic niche
#

two things

  1. it's probably possible to do that with shell (it's possible to do everything with shell), but I digress
orchid gazelle
#

no it is not

atomic niche
#
  1. your server is tiny. resource usage probably doesn't matter. Just keep the end running and deny people permissions to enter it while it is "off".
eternal night
#

I mean, easiest to just, delete the target folder kekwhyper

orchid gazelle
orchid gazelle
idle sparrow
atomic niche
#

100 concurrent users isn't that big of a threshold (in my previous experience), but hardware costs add up

idle sparrow
#

Why

orchid gazelle
#

I do not trust the 100 people

#

school-server and so on

idle sparrow
#

Doesn't sound like a private server bro lol

atomic niche
#

100 users is not a private server

#

it's a semi-public server

knotty aspen
#

but the same boring SMP stuff for the 100th time? nah

idle sparrow
#

How you gonna get 100 even, lol

hollow oxide
#

gotta ask, what should I put in my start_server.sh

orchid gazelle
#

a private server for me is a server where only people from a chosen group of people can enter

atomic niche
#

100 with a school is easy

#

I did that in high school

orchid gazelle
#

lol

atomic niche
#

are you talking 100 concurrent?

orchid gazelle
atomic niche
#

I mean... that's probably at the point where some moderation / tools would make sense.
Although, hybrid moderation is much easier

#

Just tie it in to school accounts and school penalties

orchid gazelle
#

school penalties?

#

Im a student

idle sparrow
#

So go and write some stuff. What was the question? Lol

orchid gazelle
atomic niche
#

When I did it, we:

  1. Made a "club" and got official approval and support
  2. Made a custom launcher publicly accessible on a shared drive school wide.
  3. Made it so that that launcher would connect to the server with credentials from the school computer
  4. Gave teachers an interface to control hours that people could connect during and classrooms they could connect from.
idle sparrow
#

Pull up the API and just write some random things down

atomic niche
#

If we wanted to ban people we would ban people at a student account level

#

which would make it nearly impossible for them to rejoin.

idle sparrow
#

Stop the tp event for end portals

#

Have it be toggled

orchid gazelle
#

done that already

#

already implemented

atomic niche
#

Anyways, now that I know it's a school server

#

list of utils that could be useful:

idle sparrow
#

Okay, idk what to really recommend for a mostly vanilla server lol

knotty aspen
#

wait for 1.20.5, make everyone really tiny and then do something with that

orchid gazelle
#

got time on mass anyways

#

also, it should be in general, not only for the one server

knotty aspen
#

like growing with level ups or something lol

idle sparrow
#

I mean you're trying to make a club with irl people. I don't see why you would need too many crazy things bro

#

Other than utils for event things, what else would you need lol

orchid gazelle
#

idk

#

thats why im asking lmao

atomic niche
#
  1. Classroom and student account based connection and logging. Seriously, it's amazingly powerful.
  2. Extensions to whatever land claim plugins you are using, tweaks to permissions, etc..
  3. Stages of progression; unlock new regions and features as time goes on to increase excitement.
  4. Gameplay events... more to the point, gameplay that relies on a large amount of people, in a scheduled event
idle sparrow
#

I mean, that's pretty much the answer.

atomic niche
#

Also, chat controls, moderation stuff, etc.
Even within a school, 100 people without moderation is kinda dumb.

#

Especially if it is not synced to something you can use to control access

orchid gazelle
#

I already got multiple people that I trust that can moderate

#

thanks for the ideas

atomic niche
#

Then give them tools that work for school stuff

#

Make a club, do events through that club, do moderation through that club, do moderation linked to school stuff

orchid gazelle
#

I am not gonna link anything to school stuff tho

#

completely private

atomic niche
#

It's not private if your audiance is a substantial portion of the school at large

chrome beacon
#

How would you go about using school credentials?

atomic niche
#

simple

orchid gazelle
#

I don't even think that is possible through our account page

atomic niche
#
  1. Extract whatever information you can from the school computer.
    LDAP, hostname, everything.

Generally, most schools have shit security.
You can usually pull classroom numbers, computer IDs, usernames, first names, last names, student numbers, everything.

orchid gazelle
#

we got some random shit with 0 functionality that works lol

atomic niche
#
  1. Make a launcher that requires authentication with a server via that shit
orchid gazelle
#

I do not have one

atomic niche
#

wtf

#

Even in grade 1 we had student accounts

#

those were big crt computer labs back then though

orchid gazelle
#

I had a very special case where I moved from a lower type of school to the gymnasium

atomic niche
#

this was before portable electronics

orchid gazelle
#

so IT is (sadly) not in my schedule on the new school

chrome beacon
#

We had a bunch of old Apple PCs in Grade 1

atomic niche
#

we had windows

orchid gazelle
#

we had windows mini pcs

atomic niche
#

Specifially, windows 95

orchid gazelle
#

idk what they use now tbh lol, I think it's built into the tables

#

I have been in an IT room once

atomic niche
#

if you can't figure out what os it is, it is probably some weird education linux distro or chromeos

orchid gazelle
#

I know they use windows

#

but idk what hardware

atomic niche
#

meh, hardware really doesn't matter

#

if their hardware can't handle modern clients, just use older versions

#

if they can't handle older versions, the hardware is really, really, terrible, so just run classic games

chrome beacon
#

Ah iMac G3

#

That's what the name was

atomic niche
#

I really don't miss windows 95

orchid gazelle
#

I never used 95

#

oldest one for me was winXP

#

and vista in parallel

atomic niche
#

Anyways, we peaked at like 800 concurrent back then

orchid gazelle
#

damn thats a lot of players

atomic niche
#

school servers are definitely an interesting thing.

#

probably aren't as much of a thing now though.

orchid gazelle
#

we never had any special events or stuff like that sadly

chrome beacon
#

I'm running a server at uni but no one is joining 😦

orchid gazelle
#

as you can see, im trying to change that as I moved to this school 3 months ago

atomic niche
atomic niche
orchid gazelle
atomic niche
#

Not always

orchid gazelle
#

I am not forced ot obly to any stuff lol

#

and I can always blow it off

atomic niche
#

If you do it officially, you can do things like pa system announcements to the entire school about specific events at specific lunch breaks

orchid gazelle
#

server infrastructure is not the issue

atomic niche
#

not server infrastructure

#

social infrastructure

orchid gazelle
#

oh bro I got enough connections lmao

#

well I don't, but friends of friends of friends

atomic niche
#

unrelated note

#

the best thing about having an semi-official thing and logger

orchid gazelle
#

don't need social infrastructure

atomic niche
#

is we could do stuff like stats

#

and we could figure out things like several administrative staff and one vice principle playing in their office 😛

#

(this was in MC's heyday tbf)

orchid gazelle
#

lmao

atomic niche
#

anyways, that's enough remniscing... just do whatever you think your players would find fun, and if needed, what you think your staff would find useful

#

That's really the only goal that matters for small servers

#

and medium servers for that matter

#

(100 is bordering on medium)

orchid gazelle
#

I still find it funny you call 100 concurrent players small lmao

#

that is HUGE for me

atomic niche
#

the 800 concurrent was my school experience. I've had experience with bigger

orchid gazelle
#

we only got like 1-1.2k students on the school

atomic niche
#

For me, huge is hypixel tier

atomic niche
orchid gazelle
#

well maybe im underestimating everyone

#

maybe we'll also get multiple hundreds lmao

atomic niche
#

meh, it's probably a year problem

#

2023 < 2013 re: mc interest

orchid gazelle
#

yeah thats fair

atomic niche
#

anyways, going to loop back to my previous stupid project question

#

.

pseudo hazel
#

can I create worlds in separate folders?

#

like in the plugin folder for instance?

young knoll
#

Dont think so

pseudo hazel
#

oh wait

#

I fucked around and found out

#

you can

#
WorldCreator overworldCreator = new WorldCreator(plugin.getDataFolder().getPath().replace("\\", "/") + "/worlds/" + worldName);
Bukkit.createWorld(overworldCreator);``` its just kinda cursed though
#

but it actually works

pseudo hazel
#

I love surprise features

astral scroll
#

Any good TAB API out there? the literal plugin "TAB" api does not fully convince me

remote swallow
#

you want a tab api or an api for the plugin tab

spring stag
#

How would I go about extending from an enum to add a method?

young knoll
#

You can’t

#

Enums can’t be extended

spring stag
#

I'm trying something like this:

public class MaterialPlus {
    private Material material;

    public MaterialPlus(Material material) {
        this.material = material;
    }

    public Material getMaterial() {
        return material;
    }

    public boolean isTool() {
        switch (getMaterial()) {
            case NETHERITE_PICKAXE:
            case NETHERITE_SHOVEL:
            case NETHERITE_HOE:
            case NETHERITE_AXE:
            case NETHERITE_SWORD:
            case DIAMOND_PICKAXE:
            case DIAMOND_SHOVEL:
            case DIAMOND_HOE:
            case DIAMOND_AXE:
            case DIAMOND_SWORD:
            case IRON_PICKAXE:
            case IRON_SHOVEL:
            case IRON_HOE:
            case IRON_AXE:
            case IRON_SWORD:
            case STONE_PICKAXE:
            case STONE_SHOVEL:
            case STONE_HOE:
            case STONE_AXE:
            case STONE_SWORD:
            case WOODEN_PICKAXE:
            case WOODEN_HOE:
            case WOODEN_AXE:
            case WOODEN_SHOVEL:
            case WOODEN_SWORD:
            case GOLDEN_AXE:
            case GOLDEN_HOE:
            case GOLDEN_PICKAXE:
            case GOLDEN_SHOVEL:
            case GOLDEN_SWORD:
                return true;
            default:
                return false;
        }
    }
}
echo basalt
#

This is the exact scenario where you should use utility methods

pseudo hazel
#

until they add a new tool

young knoll
#

When was the last time that happened

pseudo hazel
#

idk 🤷

spring stag
spring stag
pseudo hazel
#

I mean yall are right, new tool types is more likely than new tools

young knoll
#

No?

pseudo hazel
#

thats just netherite

spring stag
#

oh new tool

pseudo hazel
#

in existing tools

spring stag
#

sorry

#

in a mental muddle atm

young knoll
#

The only problem with tags is datapacks can change em

#

All fun and games until I add waxed lightly weathered cut copper stairs to the sword tag

worldly ingot
#

Sure, but that sounds like a datapack problem

young knoll
#

Maybe

#

But try saying that to my stairs sword

#

See who has a problem then!

pseudo hazel
#

or make a config option with a list of tools and blame the server owner for not using the plugin correctly

#

which is only exponentially more work for you ofc

spring stag
#

Coll would you be able to help me out with utility methods? My plugin work is solely a case by case atm cuz trying to learn it all at once doesn't help lol

opaque scarab
#

My SMP server has a data pack (terralith) and I’m looking to add seasons to the server. The problem is, I need to get every custom biome. Should I iterate through an array of terralith biome names, and get the registry for each?

young knoll
#

Utility method basically means make a static method that takes a material and returns a Boolean

#

Have fun working with datapack biomes

#

Biome is still an enum :(

spring stag
pseudo hazel
#

similar but no enum extensions needed

opaque scarab
spring stag
#

I don't need the parameter for the constructor?

young knoll
#

Ah so you are using NMS

opaque scarab
young knoll
#

I just work with namespaced key

opaque scarab
young knoll
#

Yes

opaque scarab
#

It seems like it would

opaque scarab
spring stag
#

Like this?

public class MaterialPlus {

    public static boolean isTool(Material material) {
        switch (material) {
            case NETHERITE_PICKAXE:
            case NETHERITE_SHOVEL:
            case NETHERITE_HOE:
            case NETHERITE_AXE:
            case NETHERITE_SWORD:
                return true;
            default:
                return false;
        }
    }
}

    @EventHandler
    public static void itemPickupEvent(EntityPickupItemEvent event) {
        Player player = ((Player) event.getEntity()).getPlayer();
        PlayerInventory inventory = player.getInventory();
        if (event.getItem().getItemStack().isSimilar(ItemManager.abundanceDiamond)) {
            for (ItemStack item : inventory) {
                ItemMeta meta = item.getItemMeta();
                if (item.isSimilar(ItemManager.abundanceDiamond)) {

                } else if (item.containsEnchantment(Enchantment.LOOT_BONUS_BLOCKS) || item.containsEnchantment(Enchantment.LOOT_BONUS_MOBS)) {
//                    player.sendMessage("Enchantments have already been added");
                } else if (MaterialPlus.isTool(item.getType())) {
//                    player.sendMessage(item.getTranslationKey() + " is in your inventory.");
                    meta.addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3, true);
                    meta.addEnchant(Enchantment.LOOT_BONUS_MOBS, 3, true);
                    player.sendMessage(item.getTranslationKey() + " is now enchanted.");
                } else {
                    player.sendMessage(item.getTranslationKey() + " is in your inventory.");
                }
                item.setItemMeta(meta);
            }
        }
    }
#

cool

#

lol, any suggestions on cleaning it up?

hollow oxide
#

can someone help me with intelliJ?

i'm trying to have my plugin directly in the right dir for my local server, then reload/restart the server ||reload is better||

spring stag
#

This?

    @EventHandler
    public static void itemPickupEvent(EntityPickupItemEvent event) {
        if (!(event.getEntity() instanceof Player)) return;
        Player player = ((Player) event.getEntity()).getPlayer();
        PlayerInventory inventory = player.getInventory();
        if (event.getItem().getItemStack().isSimilar(ItemManager.abundanceDiamond)) ...
    }
#

ohhhhh

#

gotcha

#

sorry I was confused on why I was inverting the statement

#

gotchaaaa

#

So like how i updated it?

undone axleBOT
spring stag
#
    @EventHandler
    public static void itemPickupEvent(EntityPickupItemEvent event) {
        if (!(event.getEntity() instanceof Player)) return;
        Player player = ((Player) event.getEntity()).getPlayer();
        PlayerInventory inventory = player.getInventory();
        if (event.getItem().getItemStack().isSimilar(ItemManager.abundanceDiamond)) {
            for (ItemStack item : inventory) {
                ItemMeta meta = item.getItemMeta();
                if (item.isSimilar(ItemManager.abundanceDiamond)) {

                } else if (item.containsEnchantment(Enchantment.LOOT_BONUS_BLOCKS) || item.containsEnchantment(Enchantment.LOOT_BONUS_MOBS)) {
//                    player.sendMessage("Enchantments have already been added");
                } else if (MaterialPlus.isTool(item.getType())) {
//                    player.sendMessage(item.getTranslationKey() + " is in your inventory.");
                    meta.addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3, true);
                    meta.addEnchant(Enchantment.LOOT_BONUS_MOBS, 3, true);
                    player.sendMessage(item.getTranslationKey() + " is now enchanted.");
                } else {
                    player.sendMessage(item.getTranslationKey() + " is in your inventory.");
                }
                item.setItemMeta(meta);
            }
        }
    }
#

17

#

could you show an example? I want to figure it out but I got to see a stepping stone

icy hazel
#

Error:

java.lang.NoClassDefFoundError: net/md_5/bungee/api/chat/BaseComponent
Caused by: java.lang.ClassNotFoundException: net.md_5.bungee.api.chat.BaseComponent

if I commend this out it works:


TextComponent textComponent = new TextComponent(chatMessage);
textComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(hoverMessage)));

player.spigot().sendMessage(textComponent);

I think its a problem related to dependencys. but i dont get how to add the bungeeAPI

spring stag
#

sorry about this, i'm not in the best headspace and i thought coding would help

#

All good. I'll work on it some more

#

Thanks for the help though!

young knoll
#

Are you runing craftbukkit or something

icy hazel
#

im using bukkit yeah (if thats what u mean)

young knoll
#

Send output of /version

icy hazel
#

ingame?

#

This server is running CraftBukkit version 3670-Bukkit-bd29f41 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT)
Checking version, please wait...
You are 26 version(s) behind

young knoll
#

Use spigot

#

Not the craftbukkit jar

#

Idk where people even manage to get the craftbukkit jar

hollow oxide
#

Error occurred while enabling wamasterv3 v${project.version} (Is it up to date?)
java.lang.NoClassDefFoundError: net/minecraft/world/level/Level

got error while intelliJ is saying it's working, any idea?

young knoll
#

You need to reobfuscate with special source

icy hazel
young knoll
#

No you can just change the jar

icy hazel
#

oh oke, with this build tools stuff?

#

allrighty thank you both

young knoll
#

Does get[redacted] offer craftbukkit jars or something

young knoll
#

Smh my head

young knoll
young knoll
#

Although what you are doing looks doable with the api

hollow oxide
young knoll
#

Not at runtime

#

That’s what special source is for

#

?nms

hollow oxide
#

the link is telling me to use mojang mapping

young knoll
#

Yes

#

And shows you how to set up reobfuscating

hollow oxide
#

and i did set it up

young knoll
#

Well it appears to be looking for the Mojang mapped classes at runtime

hollow oxide
#

i went to this exact page multiple time today (it took me a long time to understand)

#

k got it

#

i think

spring stag
#

Is there a way to constantly check a players inventory for an item that isn't just picked up? Like if crafted and added to an inventory or transfered from a chest?

#

Or do I have to create an event for every event to check?

young knoll
#

You could check via runnable

#

Not the most efficient but it works

spring stag
#

Runnable?

young knoll
#

?scheduling

undone axleBOT
spring stag
#

ah so sorta like an event but not

#

this would consolidate a bunch of events, right?

hollow oxide
knotty aspen
#

entire package is obfuscated

quaint mantle
quaint mantle
# hollow oxide how do i do that?

If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is obviously written for 1.18.2. If you use another version, you of course have to replace every occurance of “1.18.2” with the version you actually use. What...

hollow oxide
quaint mantle
hollow oxide
#

1.20.4

rare rover
#

paperweight better fr

wraith dragon
hollow oxide
tender shard
#

also your remap config is incomplete

#

you're missing the remap-spigot configuration

#

you missed this part

#

you also have to set the scope of brigadier to provided

#

and then compile using mvn package

#

you also didnot follow the tutorial on how to change the output directory at all

icy beacon
#

Hey, so I've got a question. So I've never had to do this before, but I'm making an android app that is supposed to connect to a database and perform both read and write operations on it. I have no idea how to store the credentials in a way that won't make it easily accessible for anyone who would want to tamper with my database. What is the standard procedure for this? Maybe you could link some articles for me?

chrome beacon
#

a rest api for example

#

or gRPC if that fits your use case better

#

app -> server -> database

wet breach
#

restful api is to have the end points to connect to based on what needs to happen

#

and oauth to control the level of permissions the user has

hardy cairn
#

can someone help me, im trying to send 2 different messages on action bar but they are sending on same line like over lapping. is there any example which sends 2 different messages on action bar so i can study it and learn

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

hardy cairn
#

1 sec

wet breach
#

?paste

undone axleBOT
chrome beacon
hardy cairn
#

oh

wet breach
#

There is a way to do it, I just wanted to see what they had lol

#

basically you just remove the action bar and create a new one to show another different line

hardy cairn
#
        if (player != null) {
            int taskId = Bukkit.getScheduler().scheduleSyncRepeatingTask(BlissPluginRemake.getInstance(), () -> {
                if (player.isOnline()) {
                    if (isRightClick) {
                        long remainingRightClickCooldown = getRemainingCooldown(rightClickCooldowns, player.getUniqueId(), RIGHT_CLICK_COOLDOWN_SECONDS);
                        String rightClickMessage = ChatColor.GREEN + "" + ChatColor.BOLD + "ULTIMATE Ability " +
                                (remainingRightClickCooldown <= 0 ? "Ready!" : "Cooldown: " + Math.ceil((double) remainingRightClickCooldown / 1000) + "s");
                        sendActionBarMessage(player, rightClickMessage);
                    } else {
                        long remainingLeftClickCooldown = getRemainingCooldown(leftClickCooldowns, player.getUniqueId(), LEFT_CLICK_COOLDOWN_SECONDS);
                        String leftClickMessage = ChatColor.GREEN + "" + ChatColor.BOLD + "LEFT CLICK Ability " +
                                (remainingLeftClickCooldown <= 0 ? "Ready!" : "Cooldown: " + Math.ceil((double) remainingLeftClickCooldown / 1000) + "s");
                        sendActionBarMessage(player, leftClickMessage);
                    }
                } else {
                    Bukkit.getScheduler().cancelTask(hotbarTasks.get(player.getUniqueId()));
                    hotbarTasks.remove(player.getUniqueId());
                }
            }, 0L, 20L);

            hotbarTasks.put(player.getUniqueId(), taskId);
        }
    }``` im trying to send cooldowns for 2 different abilities
#

ik it is messy and not readable -_-

#

sorry

wet breach
#

Ok so I looked at the api, and easier method is actually to register 2 bars

hardy cairn
#

oh

wet breach
#

and then use a task to set one visible and the other invisible

#

and then you just alternate every so often

#

it should make it to where the bar doesn't dissappear but the text changes

hardy cairn
#

i want that they both show at same time but is that possible?

icy beacon
# chrome beacon app -> server -> database

Sorry, I'm still stuck. I do get the idea, but I do not really understand how I'd implement it, if that makes sense. So, for example, I want to have a database containing likes and dislikes and I want a user to be able to submit their like/dislike (given that they are authenticated with Google for example). Could you very briefly go over how I could do that?

wet breach
hardy cairn
#

resource pack? thanks i will try to make a resource pack and see if that wrks maybe

chrome beacon
smoky anchor
hardy cairn
#

can you please send me the server link i will be very gratefull

hardy cairn
#

thanks!

wet breach
#

you need the auth token so you can verify that they are legit, you don't need to save the auth token in the DB just fyi

#

once verification is done, you do whatever you need to do from the request and the DB 🙂

#

its really not all that difficult, and yeah may be wise to use something like google auth instead of straight making your own OAuth stuff lol

chrome beacon
#

^

icy beacon
#

Gotcha, ty 🙂

chrome beacon
#

If you're writing the backend in JavaScript you can use PassportJS to help with authentication

#

not sure if there's anything like it for other programming languages

wet breach
#

actually they probably could just straight do it with apache and mysql

#

without any backend language

chrome beacon
#

True but take a look at all the options Passport provides uwu

wet breach
#

I don't use javascript for backend purposes and never will lol

chrome beacon
wet breach
#

says not found

chrome beacon
#

guess someone messed up

wet breach
#

lol

chrome beacon
#

Click strategies on the side

wet breach
#

if they do use that

#

they need to ensure they use OAuth 2.0

#

I have no clue if OAuth 1.0 even still works with google

chrome beacon
#

Passport comes with working Google strategy

#

I believe it uses oauth2

wet breach
#

yeah I see that just it has both OAuth 1 and 2 for google

#

and was just saying I am not sure if 1 even still works XD

chrome beacon
#

ah yeah

chrome beacon
wet breach
#

Yeah I know, hence me mentioning it most likely won't work if you tried it 😛

#

by now google would have most likely migrated everything away from that end point

chrome beacon
#

I know that the strategy works so it must be using oauth2 by default

wet breach
#

it could be the default

#

would is good if it is

#

just really weird though they have kept in there for Compatibility but not sure how that works if the service simply won't accept it regardless XD

#

back in 2015, it was necessary but that is because as per the usual it takes a year or two for everything to migrate lol

chrome beacon
#

It was last updated in 2019

wet breach
#

or you can be like some other services and just immediately cut it off without warning >>

chrome beacon
#

Still working though uwu

wet breach
#

implement SQLite into your app, and then in the app have a scheduling service to clear it out every so often

icy beacon
#

Hmmm that's fair, I'll keep that in mind

wet breach
#

also android devices disconnect when you connect to wifi

#

when it decides to switch over too

#

another reason I mentioned it

icy beacon
#

Yeah I've noticed that, I don't think that will be a problem though? If the user is authenticated already, the token is stored locally for the duration of the session, right?

chrome beacon
#

The worst use of SQLite I've seen is the Swedish dictionary app. They store html as rows :c

wet breach
#

session resets if its a new connection from a different connection source

icy beacon
#

Hmm

#

Alright, I guess I'll have to tackle that haha

#

Thanks guys, I'll get started 🙂

wet breach
#

Spigot Discord, the unlikeliest places to receive help for random programming things

chrome beacon
chrome beacon
#

it's not raw

#

they use their own int ids for html tags

#

I had to reverse engineer their app to figure that one out

wet breach
#

at that point they might as well just save the html files as blobs

#

would be a lot faster then some random conversion thing they got going

chrome beacon
#

yeah

#

frostalf you don't happen to know how to get another apps additional content download

#

It seems to be a separate URL downloaded on first launch

wet breach
#

Depends how you are wanting to obtain it

chrome beacon
#

I skipped that part by rooting my emulator and grabbing the downloaded file

#

but I just want to automate fetching it so I don't have to do that

wet breach
#

are you trying to restore?

chrome beacon
#

I want to grab the SQLite database that it downloads

wet breach
#

oh that is easy then

chrome beacon
#

It's the only offline version I could find

wet breach
#

hmmm, not sure if you are able to do it the easy way or not

#

so, anyways, depending on your router you could just look at the router looks with the specific ip of your device

#

should show the URL

#

if you don't have that level of control with your router, then you could just turn your computer into a router

#

if your computer happens to have a wifi card

#

use wifi card as AP, let device connect there, then use wireshark on pc

#

and pull the url

#

or, since you are rooted just scour your device for the content 😛

chrome beacon
#

This app is actually so poorly coded

#

I wonder if they got a poor student to write it

wet breach
#

or the poor student runs everything

#

and thats who its been all along XD

topaz cape
#

can anybody order these events by the which is called first? PostLoginEvent, ServerConnectEvent, ServerConnectedEvent

#

those are bungeecord events if anybody is wondering

chrome beacon
#

PostLoginEvent ServerConnectEvent ServerConnectedEvent

topaz cape
#

oh i already had them ordered O:

chrome beacon
#

yeah

topaz cape
#

thanks for the confirmation

wet breach
boreal sparrow
#

Hey everyone, I'm working on a plugin to prevent my friend from using console, for peace of mind. I need to somehow hide the coordinates of a player when they join, like the console says "Player joined at x,y,z in {some_world}"

wet breach
#

the server events are independent of the player as bungee and mc server routinely communicate to make sure they are still connected

wet breach
chrome beacon
#

You can but just don't give them access to it in the first place

#

easier and safer

wet breach
boreal sparrow
chrome beacon
#

Then there's nothing you can do

boreal sparrow
#

i beg to differ

topaz cape
chrome beacon
#

If they have full access they can do whatever they want

#

your plugin isn't going to stop them

boreal sparrow
wet breach
boreal sparrow
wet breach
#

its just not always the case that its caused by a player if I recall correctly

boreal sparrow
#

What I have is:

@EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        console_clear();
        print(ChatColor.GOLD + "A player has joined, obfuscating console...");
        event.setJoinMessage(StringUtils.repeat("/n", 10000));
    }
topaz cape
#

shouldn't that be a job for ServerConnectedEvent and not ServerConnectEvent 👀

#

sure

boreal sparrow
boreal sparrow
#

wrong one

#

that was my goofy ass first attempt

wet breach
#

so it may clear the console screen but not the log

boreal sparrow
#

oh the LOG

#

wait, does the log keep track of who joins and leaves?

wet breach
#

indeed

topaz cape
#

everything

boreal sparrow
#

well shit

wet breach
#

log captures output before the console gets the output

boreal sparrow
#

yea then there is nothing I can do, does anyone know of a better way to prevent op abuse?

chrome beacon
#

So I found how the app downloads the database

#

It uses the AssetPackManager fetch method provided by Android

wet breach
boreal sparrow
#

Yep

wet breach
#

well they are the owner, its their's

chrome beacon
#

I can't find where that resolves to

boreal sparrow
#

Even if I make a server, is still cannot prove i did not cheat

wet breach
#

/data/data

#

if you have root, its a non-issue to fetch it

#

or you could use ADB

chrome beacon
#

Yeah I've already done that

#

as I said I already rooted my emulator and grabbed the file manually

#

I'd just like to avoid that part and download it from an url or smth

wet breach
#

yeah might be harder to do depending how they have the end point setup

#

that was why I was saying using wireshark or your router logs

#

because it should show urls 😛

chrome beacon
#

True but I've never used Wireshark before

wet breach
#

super easy, but the only way to use wireshark though for this is your pc needs to have both ethernet and wifi

#

you use the wifi card as an AP device

#

this lets your android device connect to it, and now your computer acts as a router

#

ethernet connection because well you need internet and we can't use wifi as that is now an AP

#

you would use wireshark to just monitor the AP/Wifi connection

#

well log that is

#

and then you have the app do its thing, once you have your log, you just go through it 🙂

quaint mantle
#

Monitoring packets☠️

wet breach
#

no

#

we don't need packets

#

we just need the log of connections

#

we don't care about the data in the connection

quaint mantle
#

Router software should have these.

#

192.168.1.1

wet breach
#

not everyone has a fancy router

#

and not everyone owns their router and its some low grade ISP thing

#

so it just depends, occasionally an ISP uses a somewhat decent router that is sufficient to use for this lol

shadow night
#

what

#

Is this about

wet breach
#

they want the url of a file that an app uses to pull a particular file

#

they have the file, they just want to be able to pull the updated file whenever they want

shadow night
#

ftp?

wet breach
#

no, it uses https

quaint mantle
#

More like socket

wet breach
#

using Androids Package Manager

shadow night
#

Androids package manager? Isn't that what installs apks??

wet breach
#

yes but it can be used to download other files too

shadow night
#

You guys are doing some crazy shit

#

What about you just do shit manually

wet breach
#

lol

chrome beacon
#

I did that

#

but I don't want to do it manually

wet breach
quaint mantle
#

Making craftbukkit thread safe

shadow night
#

Also, as it turns out, having enough bitrate to display all the pixels takes a lot of space, my biggest has been about 2gb

#

But I don't really have a lot of space

#

I also wanna make a video player using spigot that just uses blocks and then play a randomly generated video

chrome beacon
#

I'll put this on hold again idk how to use Wireshark

wet breach
#

lol

wet breach
chrome beacon
#

🤷‍♂️ I haven't tried Wireshark yet

wet breach
#

well, maybe you should try it so you can know how to use it

chrome beacon
#

yeah I'll try it someday when I have more time

icy beacon
#

Hey, I've been thinking, I want to have a hosting to store images and a MySQL database. Would it be fine to just get a VPS and run them on the same address but different port?

#

It probably is but I'm kind of overthinking

wet breach
#

you can just store the images as blobs in the DB

icy beacon
#

Oh

#

Actually yeah I can, especially given that my images are gonna be rather small

#

Is it better to look for a solution that provides me a database or do everything myself with a VPS?

wet breach
#

even if they weren't, it is still the better method since images are binary things anyways and blobs is for storing binary objects

icy beacon
#

Fair enough

wet breach
#

it doesn't need super good CPU specs either

#

just enough to run a small webserver, DB and voila

#

just need a bit of space to allow your DB room to grow if it needs to

hollow oxide
icy beacon
#

Thanks for the advice! One more question, is it ok to just create a user with read-only permissions and authenticate it in the app code? I do not need any authentication for accessing these images and they are basically the main purpose of the app, so I thought that having a read-only user is fine here, but I'm also afraid that somebody can take the credentials and send a bajillion requests to my database to make it inaccessible

wet breach
#

always use separate users for various things, and users should only be given as much perms as is necessary. In your case you just need read only. However you are going to still need to have a webserver component to help protect against the thing you stated, second you would have to create the user with a global host flag which you don't want to do and your don't want your DB being accessible directly by the public either

#

so you still need a webserver but the whole images thing greatly benefits from restful solutions

#

literally just a single script if not just 2 or 3 lmao

#

you don't even need a full blown apache webserver either

#

you could go with more slimmed down webservers

icy beacon
#

Oh, I see, so I would still send requests to my REST instead of going directly to the database, and then I could have something like a rate-limit on the REST?

wet breach
#

exactly

#

all the while the DB is not accessible to the public keeping it safe 🙂

#

literally they would need to have access to the terminal to get the required access

#

if they manage that, well might as well give them their reward because you have other problems other then worrying about your DB at that point

icy beacon
#

Yep, gotchu. Thanks a lot, I'm going to look into some affordable VPSs now 🙂

wet breach
#

slim http server won't take more then about 300-500mb of ram

#

allocate 2GB to mysql

icy beacon
#

Does the CPU matter much for this?

wet breach
#

not really, a simple quad core is good enough at 2-3ghz

#

doesn't really matter the model or anything

#

doesn't even have to be modern either

icy beacon
#

Cool, ty:)

wet breach
#

just fyi, the thing you are going to make, I can easily run off a router with a HDD connected to it

#

that is how little in terms of resources you need for this

proud badge
#

What order is mysql stored in, are newest at the top or the bottom?

icy beacon
#

Yeah, I imagine that not much is needed for this 😛

wet breach
#

first it depends on the storage driver

#

second, its not really relevant as it depends on your queries

#

that is, the queries give rise to order

#

there is default ordering based on the queries if you exclude explicit ordering

#

so lets say you have a primary key, ordering is based off that by default

#

otherwise ordering is alphanumeric of whatever is the first column

#

but the ordering only applies based on what is returned via query

#

so what you get from a query isn't necessarily how its exactly stored in the DB

#

but it also depends on the storage driver too, as the storage driver dictates how it stores stuff in the raw format XD

#

innodb for example records every transaction and stores the most recent at the end

willow flax
#

guys

#

i buyed itemsadder and says this:

#

[ItemsAdder] Enabling ItemsAdder v3.6.3-beta-5
[12:56:03] [Server thread/INFO]: [NBTAPI] Found Spigot: v1_16_R3! Trying to find NMS support
[12:56:03] [Server thread/INFO]: [NBTAPI] NMS support 'MC1_16_R3' loaded!
[12:56:03] [Server thread/ERROR]: Error occurred while enabling ItemsAdder v3.6.3-beta-5 (Is it up to date?)
java.lang.UnsupportedClassVersionError: ia/m/je has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 55.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:186) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at java.lang.ClassLoader.loadClass(ClassLoader.java:589) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:104) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
at ia.m.iK.a(SourceFile:170) ~[?:?]
at ia.m.iK.a(SourceFile:105) ~[?:?]
at ia.m.iK.a(SourceFile:42) ~[?:?]
at ia.m.iK.b(SourceFile:36) ~[?:?]
at ia.m.mn.<init>(SourceFile:26) ~[?:?]
at ia.m.mn.init(SourceFile:42) ~[?:?]
at dev.lone.itemsadder.Main.onEnable(SourceFile:219) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:492) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:406) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:554) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:257) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:928) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at java.lang.Thread.run(Thread.java:829) [?:?]

wet breach
#

we are not itemsadder support

willow flax
#

YES BUT WHY THIS S.HIT DOESNT HAVE DISCORD?

wet breach
#

ask them I guess, you can always contact the author on the forums

#

anyways, your problem is your java is outdated for the version of the plugin you are trying to use

#

update your java

icy beacon
#

Also this would probably go to #help-server but eh a bit ambigious

wet breach
#

yeah, but I figured I would just tell them that and hopefully they just be on their way

#

if it continued I was going to tell them to go there 😛

chrome beacon
proud badge
#

Usually what takes longer:
HTTP request to a website or
reading from a database?

tender shard
#

you have to use mvn package to compile, as I already said

hollow oxide
#

using this

tender shard
#

?paste your pom

undone axleBOT
hollow oxide
tender shard
#

your remapping config is still incomplete, as I already said earlier

#

you're still missing this execution part

#

or the other one, haven't checked

#

just copy paste the whole plugin section

hollow oxide
#

thank you so much, you really helped me on a lot of thing

#

it's working

tender shard
#

np

#

btw if you want to use ${project.version} in plugin.yml, you also need to add this directly inside <build>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
hollow oxide
#

thx

spare hazel
#
package com.amirparsa.iranskylobby.listeners;

import com.amirparsa.iranskylobby.IranSkyLobby;
import com.amirparsa.iranskylobby.items.structure.Clickable;
import com.amirparsa.iranskylobby.items.structure.CustomItem;
import com.amirparsa.iranskylobby.items.structure.CustomItemContainer;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.persistence.PersistentDataType;

public class PlayerInteractListener implements Listener {

    @EventHandler(ignoreCancelled = true)
    public void onPlayerInteract(PlayerInteractEvent e){
        IranSkyLobby.getPlugin().getLogger().info(e.getAction().name());
        if (e.getAction() != Action.RIGHT_CLICK_AIR && e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
        IranSkyLobby.getPlugin().getLogger().info("04");
        if (!e.getPlayer().getInventory().getItemInMainHand().hasItemMeta()) return;
        IranSkyLobby.getPlugin().getLogger().info("03");
        if (!e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer().has(IranSkyLobby.getPlugin().getItemKey(), PersistentDataType.INTEGER)) return;
        CustomItem item = CustomItemContainer.get(e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer().get(IranSkyLobby.getPlugin().getItemKey(), PersistentDataType.INTEGER));
        IranSkyLobby.getPlugin().getLogger().info("02");
        if (!(item instanceof Clickable)) return;

        if (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
            ((Clickable) item).onClick(e);
        }else{
            IranSkyLobby.getPlugin().getLogger().info("01");
        }
    }
}```

why is it not logging any right clicks?
#

im tryna right click a compass in air

tender shard
#

Does it print anything?

spare hazel
#

no

tender shard
#

did you register the listener?

spare hazel
#

yeah

tender shard
#

try setting ignoreCancelled to false

#

This event will fire as cancelled if the vanilla behavior is to do nothing (e.g interacting with air).

spare hazel
#

i should fix this quick im losing tons of players cause my internet speed is so quick that i cant move the files to a dev server

#

no way

#

it got fixedddd

#

thanks

hollow oxide
tender shard
#

yes

proud badge
#

Any way to simulate a right/left click from a player?

chrome beacon
#

as in animation?

eternal oxide
#

swingMainHand()

proud badge
#

but for hand simulations

chrome beacon
#

What is the goal here

young knoll
#

?xy

undone axleBOT
plucky skiff
#

has anyone here ever worked with display entities in spigot?

young knoll
#

yes

plucky skiff
#

Because I'm having a problem with it

chrome beacon
#

?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!

plucky skiff
#

ah alr

#

I was trying to spawn an item display entity, but it didn't really seem to work. Can I upload my code here or is that not allowed? Just wanna be sure

chrome beacon
#

?paste

undone axleBOT
chrome beacon
#

?notworking

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.

plucky skiff
plucky skiff
#

I thought I was going to be able to animate an item display in spigot because I already knew how item displays worked through commands and also the basics in spigot. But when I tried adding any type of animation to it, it just didn't work... Why?

This is my code rn: (it's really bad code, but it was just a proof of concept)
https://paste.md-5.net/alifuvekel.cs

young knoll
#

Can't do it right as you spawn it

#

Because mojank

#

you have to wait a tick

plucky skiff
#

so do I use a bukkitrunnable?

chrome beacon
#

Also use the spawn method that accepts a consumer if you plan on modifying an entity directly as it's spawned

#

That will ensure that the entity is spawned with the modifications instead of it spawning and then being modified

young knoll
plucky skiff
#

ty everyone!

slate tinsel
#

I have created a code that gives me about than vector per block that tells where the arrow is located.
But the goal is to create a code gives more vectors how do I do that?

Here is the code now:
https://paste.md-5.net/hipusiwohe.java

lost matrix
#

Are you trying to predict the trajectory of an arrow?

slate tinsel
#

My goal is to retrieve the trajectory from a "projectile", therefore I want to be able to retrieve a list of all the locations it will pass through

slate tinsel
hollow oxide
#
Bukkit.broadcastMessage("ee "+ 
Bukkit.getScoreboardManager().getMainScoreboard().getObjective("OpNum0").getScore("mommyplease_uwu").getScore());```
the line above gives me

ee  0

but it's supposed to give me 1000

[15:39:33 INFO]: MommyPlease_UwU issued server command: /scoreboard players get MommyPlease_UwU OpNum0
[15:39:49 INFO]: MommyPlease_UwU has 1000 [OpNum0]
proud badge
#

Is it possible to have multiple primary keys in MySQL?

quaint mantle
proud badge
#

rip

tender shard
#

but you can have multiple columns in the key

proud badge
#

I want to lookup something both by location and by player

tender shard
#

this e.g. does work

proud badge
#

wait I just realised

#

I cant have multiple rows with the same primary key 💀?

rare rover
#

anyone know how to set biomes using NMS?

#

i can only find 1 packet

#

but i dont know how to use it

rare rover
hollow oxide
chrome beacon
rare rover
#

uh well, yes and no. I'm just trying to make my thing faster but if i need to do it client side its whatever

#

rn im using bukkit unsafe

#

and its slow asf

chrome beacon
#

Packets won't make it save

rare rover
#

ye ik

chrome beacon
#

also you'll have to update it every time the area is loaded (comes in to view)

rare rover
#

hmm

#

is there a way to make it server side using nms?

#

async? if possible

#

people say its unsafe to set biomes using nms

#

just use bukkit unsafe

#

but its kinda slow imo, it takes like 3 seconds to set a 200x200 area

#

which makes sense but i want to improve it

hollow oxide
native ruin
#

how would i start going about filling everything inside a list of locations with particles

chrome beacon
#

Math

#

Are you specifically trying to fill a triangle or any polygon

native ruin
#

i've tried getting the center point, set the outside points closer and closer to the center point and creating new triangles,
just asking if there's a better way

upper hazel
#

someone has info obaut key from lootTable obj (all keys if possible to save time)?

native ruin
upper hazel
#

i can get this from obj?

chrome beacon
#

?

upper hazel
#

LootTable obj

chrome beacon
#

I have no idea what you're trying to say

upper hazel
#

can I get the type of an object from the object itself?

#

how get LootType from LootTable obj in event

chrome beacon
#

What's LootType

upper hazel
#

for item generation in chest

upper hazel
upper hazel
chrome beacon
#

??

glad prawn
#

tf

upper hazel
#

to generate an item in a chest, I need to get it from the event, but I also need to get what structure the chest belongs to, I take the key from the LootTable object

#

and to set up generation I create my enum to the structure for the config

#

but you showed a link to an existing enum

#

So I wanted to know if it is possible to get the type from the LootTable object itself

native ruin
#

don't many items overlap?

upper hazel
#

what?

native ruin
#

like different structure chests have the possibility to give the same items

upper hazel
#

as I understand it, the key depends on the structure

#

not items

upper hazel
upper hazel
quaint mantle
#

hosting an api on github packages, how can i authenticate to install it on my project ?

#

because maven says :

authentication failed for <url>, status: 401 Unauthorized

quaint mantle
chrome beacon
quaint mantle
chrome beacon
#

You should know where it's installed

quaint mantle
#

my IDE did it for me

chrome beacon
#

if you have bash you can use the where command

#

where mvn

#

ah that won't work with the IJ install

quaint mantle
chrome beacon
#

well then try using the .m2 repo as the guide tells you to

#

Never tried putting a settings file there but ig it'll work

quaint mantle
#

like this right ?

#

this is my m2 repo

#

i dont have any settings.xml file

chrome beacon
#

Create one where it tells you to

chrome beacon
proud badge
#

Ok, howd I make it so I can have multiple rows with the same key?

upper hazel
#

and i try depent this with my enum

#

becuse i not can get StructureType

remote swallow
upper hazel
#

but this really long so i was want find someone who was do same thing

proud badge
#

basically: I have a plugin that logs it to a database when a player throws an ender pearl, and I want to be able to lookup by uuid the database

glad prawn
remote swallow
proud badge
#

hmm ok

#

something like this then?

upper hazel
#

i try this get from event

#

not just like Enum.get

remote swallow
glad prawn
wraith dagger
#

hi is there anyway to make a spigot plugin send messenger to all player in bungeecord?

chrome beacon
native ruin
upper hazel
#

thenks

quaint mantle
#

trying to turn my core plugin into an api for my other projects, i set up a simple consumer for my api

public final class Fabledconsumerplugin extends JavaPlugin implements Listener {

    public static Core api;
    public static MongoWrapper db;

    @Override
    public void onEnable() {
        Plugin plugin = Bukkit.getPluginManager().getPlugin("Core");
        if (plugin != null) {
            msg.log("&#34deeb• &fHooked into the FabledRealmsAPI, &#34deeb" + plugin.getDescription().getVersion() + "&f!");
            api = (Core) plugin;
            db = api.getHelper().getMongoWrapperInstance();
            getServer().getPluginManager().registerEvents(this, this); // Register events
        } else {
            msg.log("&#eb4034• &fCouldn't find the FabledRealmsAPI, continuing without it");
        }
    }

    @Override
    public void onDisable() {
        msg.log("Bye bye from consumer");
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        CompletableFuture<Object> query = db.getFieldValue("players", player.getUniqueId().toString(), "type", "profile", "country");
        query.thenAccept(country -> {
            if (country != null && country instanceof String) {
                msg.send(player, "You are from " + country);
            } else {
                msg.send(player, "Error retrieving your country!");
            }
        });
    }
}```

But when i run it, this is what it says : https://pastebin.com/7abLBzuu

the msg class (used to log and send messages) is a static class from my api plugin, so as you can see it actually is logging to the console, but i cannot retrieve the Core api object ?
#

Core is basically my api plugin

#

db is apart of my api, its the database wrapper ive built around mongodb

chrome beacon
#

like in two different plugins

quaint mantle
#

which one ?

#

im not instancing anything in my consumer plugin

chrome beacon
#

You probably shaded it

quaint mantle
#

im not installing the shaded version from maven

chrome beacon
#

well you have two jars containing the same class

#

so it doesn't know what to do

quaint mantle
#

ohhh

#

mvn --batch-mode -DuseGitHubPackages=true deploy

#

the batch mode flag might be the cause of the issue right ?

chrome beacon
#

?

#

Why would it

quaint mantle
#

doesnt batch mode also include the shaded version ?

wraith dagger
#

hi is there anyway to make a spigot plugin send player to another server by bungeecord and teleport player to another player in the request?

chrome beacon
#

It doesn't affect the outcome

chrome beacon
#

Depending on how you want it to work you might need your own messaging channel and bungeecord plugin

#

but for a simple tpa you should be able to use a clickable message to avoid needing it

#

(a tpa accept command requires bungee plugin)

quaint mantle
chrome beacon
wraith dagger
quaint mantle
chrome beacon
chrome beacon
#

?paste

undone axleBOT
quaint mantle
chrome beacon
#

yeah you're shading it

#

set scope to provided

quaint mantle
#

doing it rn

chrome beacon
quaint mantle
#

thank you so much

tender shard
steel swan
#

hey, so ihave this code in this list, there is an item that looks like this, wich means he should be removed from the list, because of its lore. But, when idrop all the items of the list, its still drops. Do you know why?

vast ledge
#

Strip color codes

#

ChatColor.stripColorCodes(String)

#

or smth

steel swan
#

ur right, i forgot to put the ChatCOlor.BOLD

#

cuz its in bold

vast ledge
#

Yea xD

steel swan
#

yep it was the problem, thx !!!

tender shard
#

why not just use PDC to identify those items?

tender shard
#

or: Why you should NEVER use NBT tags again! Spigot 1.14.1 added the biggest improvement that (in my opinion) ever made it into the Bukkit API: The Persistent Data Container (PDC). It can be used to store custom data on Entities, TileEntities, and ItemStacks. Using a bit of math, it can also be used to...

#

you shouldnt use the lore to identify your items

vast ledge
#

Maybe you want to not have a String in the lore

#

Maybe you want it clean

#

And other items

#

could accidentally duplicate the lore

#

So a Item from another plugin could be picked up by your Event/Manager

steel swan
#

No, i want to have this in the lore, to represent its an item from the plugin

vast ledge
#

Why not do both, but identify the item via a PDC

inner mulch
#

Its much more secure, lore changes would destroy the functionality

steel swan
#

Ok i ll try

storm scaffold
#

Is it possible to increase someone's underwater mining speed without aqua affinity or conduit power?

storm scaffold
#

and it makes the hand movement faster, and breaks it after a certain point

tender shard
#

you could apply haste only when they're in water

storm scaffold
inner mulch
storm scaffold
#

alr

inner mulch
#

if you really want to fully customize

vast ledge
#

Why not use the conduit effect, you can set it as invisible

inner mulch
#

altough if you tell me what you want to achieve maybe there is an easier solution @storm scaffold

storm scaffold
inner mulch
#

what do you want to do exactly?

tender shard
#

they want to make mining underwater behave as if the player was out of water

sterile flicker
#

has anyone worked with mcpi python with rapsberry pi, I want to make the discord bot interact with minecraft server, but there is a problem that I have encountered, I constantly get the wrong coordinates?

storm scaffold
#

Is there a way to check if a block is clear? Like glass or water, stuff that light can pass through and burn mobs

waxen plinth
#

Material#isTransparent?

#

might be Block#isTransparent

valid burrow
#

if i want to cancel certain commands from all plugins during their event what event should i use and what priority

waxen plinth
#

or isOpaque I forget

#

I think it's isOpaque actually

#

no I guess it is Material#isTransparent

#

deprecated though :/

agile hollow
#

how can i convert 10000 - (System.currentTimeMillis() - cooldown.get(player.getUniqueId())) in seconds?

tender shard
#

1 second is 1000 milliseconds

agile hollow
clever lantern
#

is it going to work if i put random Y coordinate value to load a chunk?
new Location(playerLocation.getWorld(), sheepSpawnX, sheepSpawnZ, 100).getChunk().load()

#

i mean not random but always the same

quaint mantle
#

Yes

#

Y does not matter I guess

hollow oxide
#
Bukkit.broadcastMessage("ee "+ 
Bukkit.getScoreboardManager().getMainScoreboard().getObjective("OpNum0").getScore("MommyPlease_UwU").getScore());```
the line above gives me

ee  0

but it's supposed to give me 1000

[15:39:33 INFO]: MommyPlease_UwU issued server command: /scoreboard players get MommyPlease_UwU OpNum0
[15:39:49 INFO]: MommyPlease_UwU has 1000 [OpNum0]
valid burrow
#

why are you editing your scoreboard with ingame commands

hollow oxide
#

i'm not (i think)

#

i'm juste trying to acces the scorboard with my plugin

#

but it's giving me 0 instead of 1000 ||the last part is to prove that it's really supposed to be 1000||

quaint mantle
#

Created sb should have a name

#

Or something

hollow oxide
#

right, i'll check this

ivory sleet
#

Lol what a username

tender shard
#

yeah i love it

quaint mantle
#

MommyPlease_UwU

#

Prediction: Shes making RP minecraft server

hollow oxide
#

my friend is using command blocks and scoreboard to do that, and i'm assisting for some commands

hollow oxide
past barn
#

Hi, does anyone know how to reproduce this minecraft HUD pattern when you hover your cursor over the item (Name, enchants, damage) etc. But does this have to do with cursor hovering in chat, and does appearing also happen in inventory?

quaint mantle
quaint mantle
chrome beacon
#

Can also be done with the Bungee chat API

valid burrow
#

how to i get vault api to work

#

cause either my attempt is outdated or im stupid

#

but neither can be

#

cause i got it right of the githuv

#

github

#

?paste

undone axleBOT
valid burrow
true shuttle
#

Hey guys I'm trying to make a flashlight with light blocks that raytraces the block the player is looking at. I have it partially working right now, except it's like a paintbrush and replaces the block it raytraces to. How can I make it replace the block in front of the block it raytraces to? Like the next block towards the player

#

I tried subtracting the blocks location with the direction the player is facing but that didn't work

#

Any thoughts?

inner mulch
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

hollow oxide
hollow oxide
quaint mantle
#

?notworking

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.

hollow oxide
#

yup i'm sending you the code

#
public static int process(List<String> sub,Entity targetEntity){
        for (String e:sub){
            Bukkit.broadcastMessage(e);  
        }
        Bukkit.broadcastMessage(targetEntity.getName());
        if (sub.get(0).contains("scoreboard")){
            Scoreboard scoreboard = Bukkit.getScoreboardManager().getMainScoreboard();
            for (String i :scoreboard.getEntries()) {
                Bukkit.broadcastMessage( i);//sending my pseudo
            }
            Objective objective = scoreboard.getObjective(sub.get(2));
            Bukkit.broadcastMessage( objective.getDisplayName()); //sending the name of the scoreboard 
            if (objective == null) {
                return -1;
            }
            Score score = objective.getScore(targetEntity.getName()); //so i think it's this that does not work
            return score.getScore();
        }Bukkit.broadcastMessage("jcrois que ta commande $ existe pas");
        throw new IllegalArgumentException("Error: truc qui ne marche pas");
    }```
true shuttle
# inner mulch This should work

here's what i did:

Location playerLocation = player.getEyeLocation();
Vector direction = playerLocation.getDirection().normalize();
...
Location targetLocation = targetBlock.getLocation().subtract(direction);```
rare rover
#

how would i make client side blocks breakable? I can break them in creative but not survival

quaint mantle
hollow oxide
#

created with commands them inited with Bukkit.getScoreboardManager()

quaint mantle
#

Smh score does no exist

#

It gives default one

spare mason
#

how can i create a custom biome? (nms)

agile hollow
#

why the Explotion of the tnt didn't break the block in the list?

    private static final Set<Material> toDestroy = new HashSet<Material>();

    static {
        toDestroy.add(Material.OBSIDIAN);
    }

@EventHandler
    public void onEntityExplode(EntityExplodeEvent event) {
        if (event.getEntity().getType() == EntityType.PRIMED_TNT) {
            List destroyed = event.blockList();
            Iterator it = destroyed.iterator();
            while (it.hasNext()) {
                Block block = (Block) it.next();
                if (!(toDestroy.contains(block.getType()))) {
                    it.remove();
                }
            }
        }
    }```
quaint mantle
rare rover
#

fr

quaint mantle
spare mason
#

i haven't used one before

agile hollow
rare rover
quaint mantle
quaint mantle
agile hollow
quaint mantle
#

it tells you what to do etc

spare mason
#

okay

#

got it, now how i can interact with it's interface?

kindred trellis
#

how do i add protocollib to my plugin? i need it to use PacketPlayOutPlayerInfo

quaint mantle
spare mason
#

Thanks

quaint mantle
#

on the right are tabs

agile hollow
spare mason
#

i don't have to add anything to the server, right?

#

it's just a dependency when developing

rare rover
quaint mantle
#

you are using gradle?

rare rover
#

yeah, jitpack doesn't like gradle so i had to do some magic and i had to fix it

#

but never reuploaded 0.0.1

quaint mantle
#

implementation 'com.github.Outspending:BiomesAPI:0.0.1'

#

the tag is the version

quaint mantle
rare rover
#

that's 0.0.1 ^^

#

which is fixed but

quaint mantle
#

you created the plugin?

rare rover
#

ye

#

i'm outspending

#

🙂

quaint mantle
#

nice

quaint mantle
# rare rover

no BiomeGenerator (to define how blocks are placed)?

hardy cairn
#

hey

rare rover
#

haven't done a full on generator implementation yet

#

gotta use

quaint mantle
#

should probably be able to implement the biome in a chunkgenerator without the api tbh

rare rover
#

for setting biomes

hardy cairn
#

i wanted some help, i have created a sphere of particles around player and want to damage entities which are present in sphere. but the calculations are not coming to be accurate, some entities like 9-10 blocks outside sphere are still getting damaged

rare rover
#

uh, oh no. It seems i have forgotten a method 💀

hardy cairn
#

?pastebin

rare rover
#

gotta do it like this for now

#

since i've been reworking the api

opaque scarab
#

Is there any way to get a level.biome.Biome object from a level.chunk.LevelChunk ?

#

I would like to get the biome at specific coordinates within a chunk

spare mason
#

@Override public void onEnable() { NMSHandler.init(); } init is on red ._.

kindred trellis
#

how to use PacketPlayOutPlayerInfo? i have protocollib added to my project

rare rover
#

just use the images i sent

rare rover
agile hollow
#

why the Explotion of the tnt didn't break the block in the list?

    private static final Set<Material> toDestroy = new HashSet<Material>();

    static {
        toDestroy.add(Material.OBSIDIAN);
    }

@EventHandler
    public void onEntityExplode(EntityExplodeEvent event) {
        if (event.getEntity().getType() == EntityType.PRIMED_TNT) {
            List destroyed = event.blockList();
            Iterator it = destroyed.iterator();
            while (it.hasNext()) {
                Block block = (Block) it.next();
                if (!(toDestroy.contains(block.getType()))) {
                    it.remove();
                }
            }
        }
    }```
carmine mica
spare mason
#

or what's the method to start it?

rare rover
#

wdm by to start it?

#

like create a biome?

spare mason
#

i supose that something has to be done on onEnable

quiet ice
spare mason
#

i usually just put listener classes there

rare rover
#

use that to create a biome

spare mason
hardy cairn
#

i have created a sphere of particles around player and want to damage entities which are present inside sphere. but the calculations are not coming to be accurate, some entities like 9-10 blocks outside sphere are still getting damaged. here is my code: https://pastebin.com/aLazhZxM can someone help me out?

quaint mantle
spare mason
rare rover
#

if you'd like

spare mason
rare rover
#

ye

carmine mica
quaint mantle
#

@hardy cairn
return location.distanceSquared(center) <= radius;