#help-development

1 messages · Page 801 of 1

mortal hare
#

tho?

opaque scarab
#

I thought I remembered sending a sound to a player through packets for some reason (IDK why LOL) then stopping it using stopSound. Maybe the server sends a packet that contains an ID of the sound. For example “minecraft:entity.pig.snort”

young knoll
#

I mean yeah you can play sounds to a player

#

And stop them

#

Doesn’t mean all sounds are played that way

mortal hare
#

i dont get why such system even exists, i guess its due to jukeboxes and noteblocks

#

but they could've got around that with more primitive system

opaque scarab
#

My original goal here is to change the breaking/mining/walking sounds of a specific noteblock. Any ideas on how to do this?

young knoll
#

I mean you can try seeing if a packet is sent

#

Or if stopSound works

mortal hare
#

download worldedit on your test server (not FAWE one) set ridiculous amount of blocks

#

try to block break

#

walk, dig noteblock

#

if you stil lhear the sounds, you cant do it

slender elbow
#

mfw resource packs

mortal hare
#

afaik

quaint mantle
#

am i trippin

young knoll
#

Plugins can send resource packs

mortal hare
#

😄

quaint mantle
#

bro

#

ive never had this error ever

young knoll
#

In fact in 1.20.3 plugins can send multiple resource packs

slender elbow
#

.3 looking lit

young knoll
#

Indeed

mortal hare
slender elbow
#

finally able to tell which resource pack was applied/denied from the server

weak meteor
#

my bug is amazing, i love when there's no bug, but there's not any action of the code

young knoll
#

Because you might have more than one plugin with a resource pack?

weak meteor
#

my favourite part of coding

mortal hare
quaint mantle
#

nah

mortal hare
#

but from vanilla side

quaint mantle
#

im done

mortal hare
#

it doesnt

quaint mantle
#

wtf is this

#

how is this

mortal hare
quaint mantle
#

not a json object

young knoll
#

Well sure but Mojang knows 90% of the game isn’t vanilla these days

mortal hare
young knoll
#

:p

quaint mantle
weak meteor
#

oh fuck

#

im gay asf

mortal hare
#

we know that Ciro

#

🙂

young knoll
#

Doesn’t this technically mean there is no size limit anymore

#

Since you can just send multiple packs

weak meteor
quaint mantle
#

same error

weak meteor
#

:)

quaint mantle
#

gson is buggin

weak meteor
#

is it difficult to develop a HTTP Server for java?

#

no, like in Java

young knoll
#

Shouldn’t be that hard

#

I’ve seen plugins do it to distribute resource packs

slender elbow
#

jdk provides an http server module already lol

weak meteor
#

Well, is a REST-Api, i'll use HikariCP and stuff

young knoll
#

Granted that’s a very simple server

slender elbow
#

mind it's very bare bones but yeah

weak meteor
#

but thats 0 abstraction

#

and i need it fast

#

someone knows any libary?

slender elbow
#

any library will be fast

young knoll
#

I’ve heard of okhttp before

slender elbow
#

javalin is pretty nice imo

young knoll
#

I think

#

Shoutout to Mojang, I don’t need to make a fancy runtime pack merger anymore

weak meteor
#

i developed plugins in main class for 6 months

#

until i found OOP

#

oop is the love of my life, after Java

weak meteor
slender elbow
#

you mean fast to learn or fast performance?

#

cuz I meant the latter

weak meteor
#

fast to learn

#

fast performance isnt needed

young knoll
#

Alright time to make http skript

weak meteor
#

like, people doesnt start hundred times a plugin per second

young knoll
#

Actually I bet that exists

weak meteor
weak meteor
opaque scarab
#

Alright, so when NOT using stopSound, is there any way to change the break sound of a custom block?

weak meteor
#

what's your opinion abt Kotlin @young knoll?

#

okhttp is for clients

#

:(

#

seemed so abstract

young knoll
#

Never used Kotlin

young knoll
#

Don’t really have an opinion

weak meteor
hazy parrot
#

seems i was scrolled, emily mentioned it already

#

there is also spark, see which you like more

#

but i think javalin is superior

weak meteor
#

okay

#

i'll check both

#

why examples on kotlin

#

kotlin isnt beautiful enough like java

#

:(

#

yo, if i got a domain can i setup a email by myself?

#

lol

hazy parrot
#

you need mail server

slender elbow
#

you can do that yes

#

it is a world of suffering and pain and despair

hazy parrot
weak meteor
#

i guess

weak meteor
#

but

#

its too simple

#

idk

#

and i dont wanna use ai's anymore

hazy parrot
#

yes screw simple

weak meteor
#

isnt a good way

#

to learn

hazy parrot
#

why would u use ai for learning

weak meteor
#

i used it when chatgpt was released like on september last year

#

i learnt good stuff

#

but only how to use it

#

not why neither how it works

#

is this the spark im looking for right?

hazy parrot
#

i would assume it is because of static import

weak meteor
#

YO

#

CLASSES CAN BE STATIC?

hazy parrot
#

its just static method

weak meteor
#

or its just a stupid implementation in c#

hazy parrot
#
import me.Bar;
public class Foo {
  public void a() {
      Bar.doSomething();
  }
}
#
import static me.Bar.doSomething;
public class Foo {
  public void a() {
      doSomething();
  }
}
weak meteor
#

hmm

#

thats curious

#

didnt how you could import methods

#

time to import org.bukkit.Bukkit.createInventory;

hazy parrot
#

only time i really used it is for JUnit

weak meteor
#

whats JUnit?

hazy parrot
#

unit testing framework

weak meteor
#

oh

#

okay

quaint mantle
junior geyser
#

Is there any spigot method for this? EnchantmentHelper.getDamageBonus(

#

You pass in an item stack and a mob, and it returns a float

dark arrow
#

i get this error

Could not find artifact org.spigotmc:spigot:pom:1.19.4-R0.1-SNAPSHOT in spigotmc-repo

i followed the ?nms tutorial but still get this error when i try changing spigot api to spigot

wet breach
#

Enum for example is one that is static without needing to implicitly declare it as such

#

So on top of classes being able to be static. You have methods and variables that can be static. Constants are static too

#

The downside of statics for a class or anything static is the jvm initializes them the moment they are loaded onto the classpath and they can never be gc'ed so they are always loaded. This is one of the few major reasons to not abuse statics

#

Well i suppose they could be gc'ed if you nuke the class loader. Never really tested this lol

exotic obsidian
#
    
    public static void selectRandomPlayer() {
        Player[] onlinePlayers = Bukkit.getOnlinePlayers().toArray(new Player[0]);
        Arrays.sort(onlinePlayers, Comparator.comparing(Player::getName));
        Random random = new Random();
        int randomIndex = random.nextInt(onlinePlayers.length);
        Player randomPlayer = onlinePlayers[randomIndex];
        target.put(randomPlayer, randomPlayer.getName());
        if(target.containsKey(randomPlayer)) {
            Bukkit.broadcastMessage(Main.Color(Main.prefix + "&7Kill " + target.get(randomPlayer) + "&7and earn &2$500"));
        } else {
            
        }
    }```
#

OnEnable (Main Class)

           
           @Override
           public void run() {
               if(Bukkit.getOnlinePlayers().size() >= 2) {    
               Target.selectRandomPlayer();
               } else {
                   Bukkit.broadcastMessage(Main.Color(Main.prefix + "&7The Target event has been cancelled"));
               }
           }
       }.runTaskTimer(this, 500, 700);```
#

guys i have problem here

#

now if someone kills the target will get a reward

#

But I also want if the target survives to get a reward

#

my question is how to check if the player is survives or not after time finished?

wet breach
#

As well as possibly that method too

exotic obsidian
#

so, can u give me another way?

wet breach
#

?di

undone axleBOT
wet breach
#

Now for your issue

#

There is events you can listen for. For entity or player deaths

exotic obsidian
#

yup i know the deathevent

#

and i make a conditon to check if the target player died by someone or not

wet breach
#

As for the surviving bit, you will have a scheduler that checks after your set time and see if they are alive. From the death event ideally you would cancel your task instead

#

So if the task runs that means they didnt die otherwise it would have been cancelled if they did uwu

#

Nothing too difficult other then restructuring your code to be more appropriate

exotic obsidian
#

okay i will try 👍

#

ty

dark arrow
#

?nms

dark arrow
#

where can i find documentation of nms mojang mappings

mortal hare
#

?mappings

undone axleBOT
mortal hare
dark arrow
mortal hare
#

probs you chose wrong nms method

dark arrow
mortal hare
#

maybe it takes not bukkit's itemstack but mojang one

warped shell
#

Player#getFirstPlayed is seconds right? not ms?

mortal hare
#

😄

warped shell
#

lol

dark arrow
#

if i use it without mojan mappings will it be any different cuz most tutorials that i find uses it without mojang mappings

river oracle
#

you're on your own

mortal hare
river oracle
#

doubtful most people here can even help you

mortal hare
#

there's tools like to paperweight for paper that converts mojang mappings to spigot ones

#

but if you use lets say reflections

#

there could be some issues still

river oracle
#

if you have any Inventory/Container questions related I can answer that

mortal hare
#

Mojang mappings didnt exist in public until 1.16 I believe, Mojang went generous at that time and shared the deobfuscation mappings for modders to use

river oracle
mortal hare
#

Minecraft coders pack also existed long time ago, i believe but that was incomplete and not enough for modders to use

#

i believe it was maintained by dinnerbone

#

but im not quite sure

river oracle
dark arrow
#

i am able to compile the mapings but i cant compile it in my plugin folder directly i get this error
java: cannot access java.util.stream.Stream
class file for java.util.stream.Stream not found

river oracle
#

how does one even get that error

mortal hare
#

im as surprised as Y2K

rotund ravine
#

Did u build with maven or gradle?

river oracle
exotic obsidian
river oracle
#

Bruh did not just reply for that unrelated tangent

quaint mantle
rotund ravine
# exotic obsidian How can i check if a scheduler is running or not?

You want to know how to start a scheduler, right? Well, there are many ways to do that, but I have a challenge for you. I want you to show me the code that you use to launch your scheduler. Don’t be shy, I won’t judge you. I’m just curious to see how you do it. Whatever it is, I want to see it. Show me the code, and I’ll show you mine. Deal? 😜

exotic obsidian
#

ok np

#
        taskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(Main.getInstance(), new Runnable() {
            
            @Override
            public void run() {
                Player[] onlinePlayers = Bukkit.getOnlinePlayers().toArray(new Player[0]);
                Arrays.sort(onlinePlayers, Comparator.comparing(Player::getName));
                Random random = new Random();
                int randomIndex = random.nextInt(onlinePlayers.length);
                Player randomPlayer = onlinePlayers[randomIndex];
                target.put(randomPlayer, randomPlayer.getName());
                if(target.containsKey(randomPlayer)) {
                    Bukkit.broadcastMessage(Main.Color(Main.prefix + "&7Kill " + target.get(randomPlayer) + "&7and earn &2$500"));
                }
                
            }
        }, 20L, 500L);
    }```
rotund ravine
#

Use your taskid

#

?scheduler

#

?scheduling

undone axleBOT
rotund ravine
#

And

#

?jd-s

undone axleBOT
quaint mantle
#

isCurrentlyRunning(int taskId)

Javadocs

hollow oxide
#

hello,

i want to use the anvilGUI and it won't work.

link: https://github.com/WesJD/AnvilGUI

i got this error:

    at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:160) ~[bukkit-1.20.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:112) ~[bukkit-1.20.2-R0.1-SNAPSHOT.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    ... 18 more

i think it's my pom.xml so if anyone can look at it, it would be great.

(to big i'll put it in thread)

GitHub

Capture user input in Minecraft through an anvil GUI in under 20 lines of code - GitHub - WesJD/AnvilGUI: Capture user input in Minecraft through an anvil GUI in under 20 lines of code

dark arrow
#

how to use this.goalSelector.removeAllGoals(Predicate<goal> var1); i want to remove all the target goals from zombie so i can modify it from its base

dark arrow
#

mojang rempping

rotund ravine
#

So nms?

dark arrow
#

yah

dry hazel
quaint mantle
#

Does anyone know how to hide the holograms from DecentHolograms from the view when behind a wall?

dry hazel
#

they were backported a little bit

short pilot
#

what's the best event to use to constantly check if a player is in a chunk owned by a faction, which then applies negative potion effects?

#

i was thinking some sort of tick event but would that be bad performance wise?

#

or would you use a scheduler for this?

quaint mantle
#

How can I make decentholograms update itself x amount of time. I'm looking online but cant find anything

quaint mantle
#

Bros should use timer task instead imo

short pilot
#

yeah i think timer is better after reading up a bit

blazing stream
#

can iget help please

eternal oxide
wet breach
rotund ravine
wet breach
#

Its not expensive o.O

#

But they could misuse it as you said. But that is up to them lol

inner mulch
#

What does .runTask do on a Bukkitrunnable, isnt it then just running it like normal code without the runnable?

minor junco
#

It adds it to the underlying task queue if I recall correctly

inner mulch
#

What does this mean?

minor junco
#

It is executed the next time the queue is iterated upon, which is the current/next server tick depending on when you call it

inner mulch
#

Ok

#

But it doesn’t get cslled every tick, rgiht?

#

Only next tick once i call it

hazy parrot
#

It schedules next tick, it also synchronizes code to main thread

inner mulch
#

Okay

minor junco
valid burrow
ivory sleet
inner mulch
#

okay thanks :)

smoky oak
#

is there a vector method to calculate the right hand angle of a vector pair in a plane?

lost matrix
smoky oak
#

given a normal vector for the plane lol

#

i need to know this to calculate the amount of iterations for the rotation

lost matrix
#

?

smoky oak
#

'angle' just spits out the minimal angle, but i might want to generate > 180° of a segment

lost matrix
#

If you have a fixed projection, then its always gonna be 90°

smoky oak
#

i have three vectors, plane normal vector and the two vectors that created it over cross product. I need a way to figure out a relative angle between those span vectors

#

if i generate 270° i dont want the 90° angle im trying explicitly NOT to generate

lost matrix
#

Then... just use the Vector#angle(Vector) method

smoky oak
#

that doesnt take a plane for the angle

#

it will give me the 90° angle

lost matrix
#

Do you want the angle between a vector and a plane?

smoky oak
#

no that one'll be 0° cuz the vectors are in a plane

#

qq if you swap the vectors in the cross product the resulting planar identifying vector will be inverted, correct?

lost matrix
#

That is the normal on your plane then

smoky oak
#

i meant is a x b = -1 * b x a

lost matrix
#

Lets start from the beginning. Define your coordinate system, and each of your vectors with their role in this system.

smoky oak
#

im using deltas so my vectors are from 0 to some point. I have 2 vectors, one for the start and one for the end of the circle segment.
What i want to do is generate a circle segment with 0 as the circle's center between the two span vectors, but I'm having trouble figuring out how to iterate over a span larger than 180°

#

are 2 vectors not enough information to infer rotational direction?

lost matrix
#

So you want to lerp the rotation between two vectors? This can be quite tricky

#

Wait a moment ill write an example

smoky oak
#

i have the interpolation math, its just the circle stuff

#

the problem is calculating the cutoff point

#

@lost matrix

lost matrix
#

Its literally just the angle between the two vectors you want to interpolate between...

smoky oak
#

the angle method, again, returns the small angle, because it has no argument for the direction i want to measure the angle in

#

the angle 90° is measured in the other direction 270°

lost matrix
#

I dont quite get the problem with that...

#

You could just brute this

#
    boolean isClockwise = startNorm.crossProduct(endNorm).getY() > 0;
    if(!isClockwise) {
      angle %= 180;
    }
smoky oak
#

i mean i could by asking for the values directly but the idea here is to make it simple to use, aka leave all the weird math to the generation method

#

huh

#

yea that'd probably do it

#

ill try it out

#

though it'd probs be angle += 180

lost matrix
#

Really depends if you use the isClockwise variable to change rotational direction

smoky oak
#

i mean ideally i want to swap the rotation direction by switching the order of the input vectors

#

which probably just amounts to inverting the norm vector if it's y is < 0

lost matrix
#

Hm, still working on an actuially usable slerp method... Thats really not easy

tulip kiln
#

Hello.
I have a problem with grass. As shown in the photo, if I place tallgrass on top of the leaves, they will disappear after a few seconds. Does anyone know what kind of event causes this?
I'm sorry for my bad English.... Thank you.

lost matrix
tulip kiln
#

Thank you for your reply.
I've already tried that, of course, but I can't use it because it affects crop growth and snow accumulation... :^(

lost matrix
tulip kiln
quaint mantle
#

I want to make TextDisplay with line changes but I don't know what to write in text.
display.setText(Component.Serializer.fromJson("{text:{\"text\":\"Test1\\\\nTest2\"}}"));
Shouldn't I make it like this?

odd adder
#

Hi , does anyone know how to convert org.bukkit,entity.Player to ServerPlayer?

quaint mantle
#

((CraftPlayer)player).getHandle()

#

how do you get a player's actual velocity?

lost matrix
lost matrix
tender shard
quaint mantle
#

well that returns always 0, -0.08, 0

eternal night
#

they changed it

lost matrix
#

Wait they changed their message

tender shard
#

well I only saw this

lost matrix
lost matrix
quaint mantle
tender shard
#

only jerks edit their messages :angry noises:

tender shard
quaint mantle
#

(0.0, -0.0784000015258789, 0.0)

lost matrix
#

Why use json in the first place?

#

And raw json at that

quaint mantle
# lost matrix Doesnt the line break work? I feel like it should
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 3 path $.

...

Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 3 path $.
        at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1657) ~[gson-2.10.jar:?]
        at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1463) ~[gson-2.10.jar:?]
        at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:517) ~[gson-2.10.jar:?]
        at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:422) ~[gson-2.10.jar:?]
        at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:779) ~[gson-2.10.jar:?]
        at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725) ~[gson-2.10.jar:?]
        at com.google.gson.internal.Streams.parse(Streams.java:49) ~[gson-2.10.jar:?]
        ... 29 more```
#

An exception occurs, but I don't know why.

lost matrix
#

It tells you why 🙂

#

Your json is broken

tender shard
#

yeah it's simply invalid json

quaint mantle
#

I'll fix it myself

#

thanks

lost matrix
#

How about not using json? smileybolb

quaint mantle
#

Component.Serializer only has the json method, is there any other way?

lost matrix
#

Is that an nms class?

quaint mantle
#

yes

pseudo hazel
#

usnt text just a string?

quaint mantle
#

I intend to mount the TextDisplay and print several lines of text over the player's head

#

I looked it up and I think I can use CraftChatMessage.fromStringOrNull(string)

lost matrix
quaint mantle
#

I'm sorry, I was thinking about it for a few hours and I was taking it for granted that it was nms.

#

Why doesn't it line up even if I type "Test1\nTest2"?

#

Is escape character supported only on json?

tender shard
#

wdym with "line up"? \\n works fine for me

#

{text:'{"text":"first line\\nsecond"}'}

odd adder
#

I am using nms way to open AnvilInventory, but there is a error occurred.

ServerPlayer serverPlayer = ((CraftPlayer)player).getHandle();
            System.out.println("test");
            serverPlayer.openMenu(new SimpleMenuProvider((syncId, playerInventory, playerEntity) -> new AnvilMenu(syncId, playerInventory), Component.literal("Anvil")));```
upper hazel
#

how detect interact with inventory - shift + mouse click

tender shard
lost matrix
remote swallow
river oracle
#

Don't use the menu provider

#

Just use AnvilMenu and open it with Bukkit api

#

One sec I'll give code

odd adder
#

I am trying to open AnvilInventory , and item in slot 1 and 2 , and take result.
It doesn't output any result.

#

so i am trying to use nms way.

river oracle
#
CraftPlayer player;
ServerPlayer splayer = player.getHandle();
AnvilMenu menu = new AnivlMenu(splayer.nextContainerCounter(), splayer.getInventory(), ContainerAccess.create(splayer.level(), splayer.blockPosition()));
menu.setTitle(Component.literal("thing");
player.openInventory(menu.getBukkitView());

This is much easier than what you're doing

young knoll
#

I can provide my overriden anvil inventory

#

:P

river oracle
#

generally its okay to just use the players location for this since we're spoofing it

young knoll
#

Can't ya just set checkAccessible false

river oracle
young knoll
#

I see

river oracle
#

but we have the player there's not really a much easier way to make a ContainerAccess

young knoll
#

How did I do it

#

ah

quaint mantle
# tender shard wdym with "line up"? `\\n` works fine for me

I corrected it correctly, the second line is not visible, but only "Test1".
: CraftChatMessage.fromStringOrNull("Test1\nTest2")

How do I type that into json in the plugin?
display.setText(CraftChatMessage.fromJSON("{text:'{\"text\":\"first line\nsecond\"}'}"));
It works well with the summon command, but I don't know why it doesn't work

young knoll
#

ContainerLevelAccess.create(player.level(), new BlockPos(0, 0, 0))

tender shard
river oracle
#

you're bound to have issues doing it like this

#

craftbukkit's deserializers do all the hard work for you if you already have the BaseComponent

quaint mantle
#

I didn't know because it just came up as a higher version! i'll try that

river oracle
#
    /**
     * Translates the given base component into a json string
     *
     * @param component the component to translate
     * @return the string
     */
    public static String toJsonString(@NotNull final BaseComponent... component) {
        return ComponentSerializer.toString(component);
    }

    /**
     * Translates the base component into a minecraft component
     *
     * @param components the component to translate
     * @return the minecraft component
     */
    public static Component toMinecraftChat(@NotNull final BaseComponent... components) {
        return CraftChatMessage.fromJSON(ComponentSerializer.toString(components));
    }

Does the job juust and and you don't need to worry about weird JSON errors

river oracle
river oracle
young knoll
#

True

#

Wonder which is more version safe

river oracle
young knoll
#

Yes but which is more version safe

#

Aka which will be less likley to change obfuscated names

river oracle
#

oh no clue I don't bother with that problem 💪 moojang maps ftw

young knoll
#

Well yeah

#

But that gets reobfuscated when you compile

river oracle
young knoll
#

Currently I have to remake my custom anvil class for each version anyway

#

Dang you craftbukkit relocation

river oracle
young knoll
#

Is the tool called disabling it

#

:p

river oracle
#

No

#

Unfortunately

young knoll
#

lame

river oracle
#

Need to remake a lot of spigots tooling tbh

#

Mostly since it's not public and I want to start doing some weird stuff

young knoll
#

Oh yeah Mojang also changed setItemName from void to boolean in 1.20

river oracle
#

E.g. snapshot support

young knoll
#

Clearly just to annoy me

river oracle
#

And keeping my PRs up to date in snapshots

young knoll
#

What are we fabric

river oracle
#

Ig I am md isn't tho

young knoll
#

Are you modmuss

river oracle
young knoll
#

John Fabric

river oracle
#

Oh no I'm not

#

We still need to switch to mojmaps but idk where I'd start if I made that pr

young knoll
#

Probably by switching things to mojmap

#

kek

odd adder
#
ServerPlayer splayer = ((CraftPlayer)player).getHandle();
int nCC = splayer.nextContainerCounter();
Inventory inv = splayer.getInventory(); <-----
ContainerLevelAccess containerAccess =  ContainerLevelAccess.create(splayer.level(), splayer.blockPosition());
java.lang.NoSuchMethodError: 'net.minecraft.world.entity.player.PlayerInventory net.minecraft.server.level.EntityPlayer.fN()'
    at org.MEGeyserSupport.MEGeyserSupport.onEnable(MEGeyserSupport.java:76) ~[?:?]```
seems remapping gets something wrong?
river oracle
young knoll
#

Just uhh

#

Find and replace in files with notepad++

#

kek

river oracle
#

xD yeah nah

lost matrix
river oracle
#

^ nms is only 1 version supported

young knoll
#

*Kinda

odd adder
#

it's 1.20.2-R0.1-SNAPSHOT
and server is 1.20.2

tender shard
#

how does your remapping config look like?

odd adder
#

oh , nvm , i see that i forget to update the <plugin> section, i just update the dependency scope.

upper hazel
#

nothing will happen if I do this? private static final BarrelMarketX instance;
static {
instance = new BarrelMarketX();
}

odd adder
#
InventoryView view = new AnvilMenu(nCC, inv, containerAccess).getBukkitView(); <-- Line 78
view.setTitle("Anvil");
java.lang.IllegalStateException: Title not set
    at com.google.common.base.Preconditions.checkState(Preconditions.java:512) ~[guava-32.1.2-jre.jar:?]
    at net.minecraft.world.inventory.Container.getTitle(Container.java:92) ~[spigot-1.20.2-R0.1-SNAPSHOT.jar:3940-Spigot-7de1049-eeb7dfc]
    at org.bukkit.craftbukkit.v1_20_R2.inventory.CraftInventoryView.<init>(CraftInventoryView.java:30) ~[spigot-1.20.2-R0.1-SNAPSHOT.jar:3940-Spigot-7de1049-eeb7dfc]
    at net.minecraft.world.inventory.ContainerAnvil.getBukkitView(ContainerAnvil.java:357) ~[spigot-1.20.2-R0.1-SNAPSHOT.jar:3940-Spigot-7de1049-eeb7dfc]
    at org.MEGeyserSupport.MEGeyserSupport.onEnable(MEGeyserSupport.java:78) ~[?:?]

How can i set title before AnvilMenu.getBukkitView?

river oracle
#

I edited it and pinged you about it

river oracle
river oracle
#

Set the instance in your onEnable

upper hazel
#

this is why onEnable need hah

river oracle
#

The static final doesn't need to be final for those

upper hazel
#

i was want use constructor

river oracle
#

Just make it private static

upper hazel
#

i mean why not

river oracle
#

Cuz then you need to use the constructor

#

And then things will break

upper hazel
#

ok

hazy parrot
#

you can use final if variable is assigned in static block

odd adder
river oracle
rotund ravine
#

Oh, no i just didn’t pay any more attention to it

hazy parrot
#

if BarrelMarketX is class that extends javaplugin, it will break

odd adder
#

@river oracle but the anvil inventory closed quickly , how can i keep it open?

upper hazel
#

i see

river oracle
odd adder
#

maybe it's ViaBackward's fault?

#

client 1.19.2 server 1.20.2

river oracle
#

Yeah

#

Probably

odd adder
#

ok , i'll run at 1.20.2 and try again

shadow night
#

I remember I had skinsrestorer on my server because of a cracked friend and it somehow fucked up potion effects, like, it was the last plugin I suspected to be the bad one

odd adder
river oracle
#

Do you have code that closes it? It should stay open

odd adder
# river oracle Do you have code that closes it? It should stay open

no,
this is whole enable function

    @Override
    public void onEnable() {
        for (Player player : Bukkit.getOnlinePlayers()) {
                ServerPlayer splayer = ((CraftPlayer)player).getHandle();
                int nCC = splayer.nextContainerCounter();
                Inventory inv = splayer.getInventory();
                ContainerLevelAccess containerAccess =  ContainerLevelAccess.create(splayer.level(), splayer.blockPosition());
                AnvilMenu menu = new AnvilMenu(nCC, inv, containerAccess);
                menu.setTitle(Component.literal("Anvil"));
                InventoryView view = menu.getBukkitView();
                player.openInventory(view);
        }
            Bukkit.getServer().getPluginManager().registerEvents(new Events(), this);
    }```
river oracle
young knoll
#

inb4 you do need this.checkReachable = false;

river oracle
#

Lol that might be true

river oracle
odd adder
#

ok~

river oracle
#

Before you open

river oracle
odd adder
#

oh yeah , succeed ~

young knoll
#

Im so smart

river oracle
#

Yes you are

#

Miles thought that was in inventory view:<

#

But alas

#

Miles forgot his pr does that

young knoll
#

lol

#

Do you happen to know if ContainerLevelAccess.create loads the target chunk?

quaint mantle
#

is there a way to put alot of text into a text display without server crashing

rotund ravine
#

Why

river oracle
upper hazel
#

Is it possible to change @s to the player's name while writing a command in chat or in the command block?

young knoll
#

I notice my anvil menu takes a brief second to open the first time

#

Trying to figure out why

quaint mantle
upper hazel
#

specifically at the time of writing and not after

river oracle
river oracle
#

Becuase then it'd already be loaded

young knoll
quaint mantle
#

like 100k chars

#

or over

rotund ravine
#

Why

quaint mantle
#

i want 100x lorem ipsum

river oracle
#

Why

river oracle
quaint mantle
#

yes beside that

river oracle
#

you don't

quaint mantle
#

why don

#

do*

river oracle
#

because it'd crash the server

rotund ravine
#

Too many entities will too

quaint mantle
#

why would it crash the server

rotund ravine
#

Cause

#

It will

river oracle
#

so it doesn't matter what you do

#

its gonna lag

young knoll
#

Time for science

shadow night
#

Yo guys, when I was making a plugin for b1.7.3 I needed to make an inventory, but in that version bukkit had no inventory stuff yet so I used nms and made my own class extending a nms class. Rn I'm wondering, would it be possible to do the exact same thing in the latest version?

shadow night
shadow night
river oracle
#

if not things have changed a decent bit

scenic onyx
#

how i can get all Word Loaded in SlimeWordManager?

shadow night
odd adder
#

AnvilMenu.java

    public void setItem(int i, int j, ItemStack itemstack) {
        this.getSlot(i).set(itemstack);
        this.stateId = j;
    }```
What is argument j for?
river oracle
lost matrix
shadow night
river oracle
#

you don't need to even touch those NMS methods

shadow night
young knoll
#

Which ones

odd adder
#

I tried spigot api , when i set item , then the result is not updating.

young knoll
#

The ones with all the static constants?

shadow night
river oracle
young knoll
#

Nope they still there

river oracle
#

view#getTopInventory()*

river oracle
young knoll
#

This is why I disabled the vanilla anvil output code :p

shadow night
# young knoll Nope they still there

Well, do they still work in the same shitty way? Where blocks had an array of 256 elememts and only like 90 of that were used and all of the blocks were also added to the 32000 long array in the items class and items were added only after the 256 index

young knoll
#

no

#

They are just constants

#

They point to a registry entry

shadow night
#

Oh thanks

#

No more of these fucking arrays

river oracle
#

its been like that since 1.13 right?

#

I don't think this is particularly new thing

young knoll
#

I think even before that

shadow night
#

And luckily b1.7.3 doesn't have the thing were you had one block and like 20 others under the same id but different idk what's it called

slender elbow
#

it's called joseph

shadow night
#

Joseph?

slender elbow
#

(you are meant to laugh)

shadow night
odd adder
river oracle
#

maybe the setItem is bugged

odd adder
#

but the feauture i am coding , need directly set item into.

river oracle
shadow night
#

Yes

young knoll
#

yes

odd adder
#

.w.

shadow night
young knoll
#

Looks good to me

shadow night
#

What a classic

#

Next time use my api for generating "random pronouncable strings"

young knoll
#

Sadly not 100k characters

#

It's only 26k

shadow night
#

More no workey?

quaint mantle
shadow night
#

Lmao

young knoll
quaint mantle
#

how many chars?

river oracle
#

26k

glacial narwhal
#

?help

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

selfrole Add or remove a selfrole from yourself.

__**Cleanup:**__

cleanup Base command for deleting messages.

__**Core:**__

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

__**Downloader:**__

findcog Find which cog a command comes from.

__**Mod:**__

names Show previous usernames, global display names, and server...
userinfo Show information about a member.

__**ModLog:**__

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

__**Permissions:**__

permissions Command permission management tools.

glacial narwhal
#

wrong channel my bad

young knoll
#

Lets see how 100k goes

shadow night
#

Can you make the bible in one page

young knoll
#

Well I timed out

#

Doh the watchdog said no

#

I thought I disabled that

dark arrow
#

i tries coping zombie registergoals and addBehavious function , ovverrided a pig class and pasted it there(nms) and it ended up breaking its ai , now the pig does not move , it just startes at players


public class badPig extends Pig {
    badPig(Location location){
        super(EntityType.PIG,((CraftWorld) location.getWorld()).getHandle());
        this.setPosRaw(location.getX(),location.getY(),location.getZ());
        this.persist = true;
        this.registerGoals();
        ((CraftWorld) location.getWorld()).getHandle().addFreshEntity(this);


    }
    @Override
    protected void registerGoals() {

this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F));
        this.goalSelector.addGoal(8, new RandomLookAroundGoal(this));

        this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers(new Class[]{ZombifiedPiglin.class}));
        this.targetSelector.addGoal(2, new NearestAttackableTargetGoal(this, Player.class, true));
        if (this.level.spigotConfig.zombieAggressiveTowardsVillager) {
            this.targetSelector.addGoal(3, new NearestAttackableTargetGoal(this, AbstractVillager.class, false));
        }

        this.goalSelector.addGoal(0, new FloatGoal(this));
        this.goalSelector.addGoal(3, new BreedGoal(this, 1.0));
        this.goalSelector.addGoal(4, new TemptGoal(this, 1.2, Ingredient.of(new ItemLike[]{Items.CARROT_ON_A_STICK}), false));
        this.goalSelector.addGoal(6, new WaterAvoidingRandomStrollGoal(this, 1.0));
        this.goalSelector.addGoal(7, new LookAtPlayerGoal(this, Player.class, 6.0F));
        this.goalSelector.addGoal(8, new RandomLookAroundGoal(this));

    }


}

i tried to use it directly aand also by ovverridding the registerGoals but the pig just does not move

odd adder
# river oracle you don't need to even touch those NMS methods

If i use full of spigot api, then it still not updating even added player.updateInventory()

for (Player player : Bukkit.getOnlinePlayers()) {

    Inventory inv = Bukkit.createInventory(player, InventoryType.ANVIL);


    ItemStack is = new ItemStack(Material.ENCHANTED_BOOK, 1);
    ItemMeta itemMeta = is.getItemMeta();
    EnchantmentStorageMeta enchantmentStorageMeta = (EnchantmentStorageMeta) itemMeta;
    enchantmentStorageMeta.addStoredEnchant(Enchantment.MENDING, 1, true);
    is.setItemMeta(enchantmentStorageMeta);

    player.openInventory(inv);
    inv.setItem(0, new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
    inv.setItem(1, is);
    player.updateInventory();
}```
#

but after using AnvilEvent , it solved.

#

i've check the slot this time , chestplate is first , enchanted book is second

glacial narwhal
young knoll
#

debug it?

#

Print out what it's supposed to be matching

glacial narwhal
#

@young knoll

river oracle
glacial narwhal
river oracle
#

oh can't help with legacy then

glacial narwhal
#

Anyone got any idea's

young knoll
odd adder
#

Btw , when i developing non-nms plugin , i can set artifact->build->directly to plugin folder.
When i developing nms plugin , it will not remap the code.
Do you guys know how to setup artifact with remapping?

#

this thing:

river oracle
#

?nms

river oracle
#

you need to use maven

#

or rather you should* use maven

#

I'm sure theirs some jank ass you can do to remap with artifacts

odd adder
#

yes , i am using maven

#

when package

#

but i need debug realtime

river oracle
#

I forget people use debuggers 🤷‍♂️ idk how you'd even use a debugger with minecraft so sorry not sure

odd adder
#

or can maven set the jar output directory?

young knoll
#

It can

odd adder
#

where should i add it ?
in build section?

odd adder
#

ty

storm crystal
#

Why do people use 1.8 so much

#

Like literally upgrade it and bam ur problems gone

orchid gazelle
#

Bc PvP

storm crystal
#

Wouldnt it be easier to revert those pvp changes with plugins

orchid gazelle
#

It does not feel authentic then

#

And does not have several gameplay-deciding bugs like kb reducing

storm crystal
#

Make it a mechanic then

orchid gazelle
#

Does not work

#

It's bugs in client code too

storm crystal
#

Then cope with new system

#

Life is everchanging

#

Or something

#

Old pvp was boring either way, who spams more wins

dusky prawn
#

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

public class GodCommand implements CommandExecutor {

    @Override
    public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) {


        if (sender instanceof Player){

            Player p = (Player) sender;

        }



        return true;
    }
}

Hi. Im following a toturial, and he does this. But my "sender"s is red? It says, that i have to create a local variable, but what? Cody Simpsons does not do that :(

eternal oxide
#

watch the tutorial better

dusky prawn
#

??? Im writing here to get help, not to look on smart-ass comments like yours.

storm crystal
dusky prawn
#

Both places?

storm crystal
#

You can either rename sender to commandSender

dusky prawn
#

Oh, i understand now.

storm crystal
#

Or rename commandSender at top to sender

#

Its like a variable

dusky prawn
#

Its because there stands "commandSender" in the top

#

Oh, thanks!

austere cove
#

@NotNull CommandSender commandSender you named it commandSender. If you don't want smart-ass comments learn some basics so these questions can be avoided. can't blame the guy

storm crystal
dusky prawn
#

Im trying to learn basics ffs..

eternal oxide
#

My answer was completely accurate. You tried to blame cody for the mistake when it was you not watching attentively.

#

literally watch the video closer and you'd have learnt from your mistake.

dusky prawn
#

Yea. I know its my bad. But instead of being a smart-ass, then just tell me that? Tell me what i did wrong - Didnt even know what that line did?

storm crystal
#

It would also be nice if you didnt word yourself as if you were being smart-ass even though you werent

eternal oxide
#

I guess I could have been more patient.

#

You can thank DuskTaler for the smart-ass comments as he's been in here winding people up for weeks on java basics. Kinda got annoyed at him and ended up giving basic responses to basic questions.

glacial narwhal
storm crystal
eternal oxide
#

best to compare inventory instances not titles

glacial narwhal
eternal oxide
#

Your String title must exactly match if you want to compare Strings.

#

It's not a good way to compare inventories as a player could rename an inventory and fake yours

#

Instead use if (e.getInventory() == yourRolesInventory)

meager wolf
#

is it possible to make custom bar(like the hp bar, hunger bar, armor bar) ?

pseudo hazel
#

maybe with the action bar or scoreboard

#

or maybe something with resourcepacks

undone axleBOT
glacial narwhal
eternal oxide
#

it will work if your code is correct. show code

#

== is comparing instances (memory location) so you have to check against the same inventory you created when you opened it.

glacial narwhal
#

?paste

undone axleBOT
eternal oxide
#

you are creating a new inventory every time

#

it has to be the same instance you created when you opened the inventory for the player

#

you are also still checking by name

glacial narwhal
eternal oxide
#

you are comparing String names

glacial narwhal
eternal oxide
#

you can;t create a NEW inventory and compare against it

#

it has to be the same inventory you opened for the player

glacial narwhal
eternal oxide
#

where do you create the inventory?

#

oh ok

#

you don;t need a holder, but you should make it a field so it's created when the class is instanced

glacial narwhal
eternal oxide
glacial narwhal
#

?

eternal oxide
#

I moved the inventory creation to a Field

#

not in the event

glacial narwhal
eternal oxide
#

that will work

glacial narwhal
#

you want a screen share ?

eternal oxide
#

it will be an empty inventory as it's only been created

glacial narwhal
#

Yeah, but it just doesn't work

eternal oxide
#

you shoudl also not close nor open inventories in the click event

glacial narwhal
#

Man it just doesn't work i copyed your code

eternal oxide
#

yes you can;t open/close in the click event

#

you need to delay it

glacial narwhal
#

Yeah my bad for this, but it still doesn't work

eternal oxide
#

This code will not work in the click event

glacial narwhal
eternal oxide
#

just runTask will do

#

that will run on the next tick

#

no need to close at all, just open the soloInventory

cinder abyss
#

Hello, what is the event for when an entity place a block?

slow light
#

@remote swallow

#

im back

#

u there?

remote swallow
#

ye

slow light
#

aight

#

some of the imports worked.

#

some didnt

#

but all are towny api

remote swallow
#

did you reload gradle

slow light
#

ja

#

yes

remote swallow
#

invalidate caches then

#

file > invalid caches

slow light
#

and how do i do that

#

oh damn

#

waitin for it

#

to

#

its indexing

remote swallow
#

just wait for that to finish

slow light
#

its done

#

should i run jar?

#

its working

#

shit

remote swallow
#

do all the imports work now?

slow light
#

nope

remote swallow
#

oh that has the wrong import it seems

#

com.palmergames.bukkit.towny.TownyUniverse

slow light
#

uhm

#

what about the ones

#

not being picked up

remote swallow
#

the gray ones arent used

slow light
#

oh right

#

am dumb

#

uhm

#

theres still more errors

remote swallow
#

?paste the class

undone axleBOT
slow light
#

also

#

my friend helped me

#

with code with me

#

he told me what things do lol

#

i have no idea what to do

#

i just had a idea

remote swallow
#

permissions doesnt exist so its not adding anything and the other errors are just saying those methods dont exist

slow light
#

k

remote swallow
#

the ranks are probably under perms

slow light
#

aha

#

so do i just delete it?

remote swallow
#

update the code to use correct methods to make it work

slow light
#

i fixed

#

all the errors

#

but

#

i have 1 left

#

@remote swallow

remote swallow
#

you probably have an extra curly brace

slow light
#

BRO

#

@remote swallow u know how to add

#

ranks?

remote swallow
#

no idea

slow light
#

fuck

#

Ugh

#

i hate that i have to do

#

this

#

ILL use chatgpt

remote swallow
#

i would advise against just copying chatgpt code

eternal oxide
#

ranks are in TownyPerms not the permission provider

slow light
slow light
#

but the plugin lets players create their own ranks

remote swallow
#

ranks are in the TownyPerms instance of a town

kindred sentinel
#

How to remove field from FileConfigurationSection?

slender elbow
#

set to null

eternal oxide
#

a field can be null

#

set the section without the field

#

you set a Section to null to remove it

#

but a field you have to set teh section excluding the field

#

basically delete it from teh map before setting the section

slender elbow
#

the value being set to null will remove it from the config

eternal oxide
#

it won't

slender elbow
#

it will

eternal oxide
#

a value can be null

#

only setting a Section to null will remove the section

vapid thorn
#

hey I am working on a custom model data texture for a custom item in hand that utilizes the poppy, but I noticed when I do this even though the new texture works for the custom item, the poppy default texture breaks. are flowers handled differently in texture packs by chance?

EDIT: Nevermind it was block/poppy not item/poppy

slender elbow
#

and setting the value in the section will remove it from the section

eternal oxide
#

no, a value can be null

slender elbow
#

set the entire section to null to remove the entire section

#

there is no "remove"

eternal oxide
#

no there is no remove

quaint mantle
#

hey protocolLib only allows me to do a whitelist of which packets i want to receive but how can i receive every packets?

    @Override
    public ListeningWhitelist getReceivingWhitelist() {
        return ListeningWhitelist.newBuilder().types(PacketType.Play.Client.GROUND).build();
    }
eternal oxide
#

a value can be null

quaint mantle
#

because

eternal oxide
#

you have to remove the key/value from teh Map/MemorySection

rotund ravine
#

Gotta agree with emily on this

eternal oxide
slender elbow
#

it can be a field

#

set("foo", 123)

#

is not a section, it's just an int mapping

eternal oxide
#

um

#

I believe you may be correct

rotund ravine
#

Elgar is on shrooms

eternal oxide
#

lists can contain null not values

slender elbow
#

share

#

null not values :thonk:

eternal night
eternal oxide
#

yep I was thinking of Lists in sections not fields

slender elbow
#

yeah lists probably, they're just lists, no special mapping

kindred sentinel
glossy venture
#

?mappings

undone axleBOT
glossy venture
#

for myself

pulsar wing
#

Im quite new to making plugins, and one thing i was trying to do is make a block placed above a block that the user placed, the block above the placed block cannot be broken unless the place block is broken

pulsar wing
# pulsar wing Im quite new to making plugins, and one thing i was trying to do is make a block...

I forgot to give the code:

    public void onBlockBreak(BlockBreakEvent event) {
        for (Location i : Locations) {
            Location blockLocation = i.subtract(0, 1, 0);
            Block DestroyedBlock = event.getBlock();
            
            World world = DestroyedBlock.getWorld();

            if (DestroyedBlock.getLocation().equals(i)) {
                event.setCancelled(true);
                return;
            } else if (DestroyedBlock.getLocation().equals(blockLocation)) {
                world.getBlockAt(blockLocation).setType(Material.AIR);
                world.getBlockAt(i).setType(Material.AIR);
                Locations.remove(i);
            }
        }
    }

(Locations is a list full of locations on where the user placed the block + 0,1,0)
whats the problem? since theres no errors

lost matrix
# pulsar wing I forgot to give the code: ```java public void onBlockBreak(BlockBreakEvent...
  @EventHandler
  public void onBreak(BlockBreakEvent event) {
    Block broken = event.getBlock();

    if (isCustomBlock(broken)) {
      event.setCancelled(true);
      return;
    }

    Block above = broken.getRelative(BlockFace.UP);
    if (isCustomBlock(above)) {
      ItemStack mainHandItem = event.getPlayer().getInventory().getItemInMainHand();
      above.breakNaturally(mainHandItem);
    }
  }

The locations of custom blocks can be saved in a HashSet of Locations, which would result in the following isCustomBlock method.

  private final Set<Location> customBlockLocations = new HashSet<>();

  private boolean isCustomBlock(Block block) {
    return customBlockLocations.contains(block.getLocation());
  }

  public void tagAsCustom(Block block) {
    customBlockLocations.add(block.getLocation());
  }

HashSet is much faster for contains as it doesnt need to iterate through all elements like ArrayList would.

scenic onyx
#

wtf?

#

how i can resolve?

#

absdygdyyasgdyasudgygasdgyasgd igay gdasydgyasg idgas dig asygdy gasdgyasgdias

#

spigotmc, ok?

tall dragon
#

doesnt seem like a spigotmc question

lost matrix
scenic onyx
lost matrix
scenic onyx
#
 public SlimeWorld loadDefSkyBlock(String name) throws IOException, CorruptedWorldException, NewerFormatException, WorldInUseException, UnknownWorldException {
        try {
            return slimePlugin.createEmptyWorld(slimeLoader, name, false, slimePropertiesSkyBlock);
        } catch (WorldAlreadyExistsException e) {
            //e.printStackTrace();
        }
        return slimePlugin.loadWorld(slimeLoader, name, false, slimePropertiesSkyBlock);
    }
lost matrix
grim hound
#

Peak programming right here

scenic onyx
# lost matrix ?

What code makes it so that if it doesn't exist it creates it and then if it exists it executes it.

grim hound
#

Makes sense

#

I was too hasty with my conclusions

lost matrix
#

How about you handle those?

grim hound
#

They probably already are

lost matrix
scenic onyx
lost matrix
scenic onyx
remote swallow
#

okay?

lost matrix
#

So where do you handle those?

remote swallow
#

how do you handle them when calling loadDefSkyblock

scenic onyx
tall dragon
#

swm version?

scenic onyx
tall dragon
#

1.8 ?

scenic onyx
remote swallow
#

this can be changed to CREATE TABLE IF NOT EXISTS

lost matrix
#

How does "behaving bad" manifest? Ah there is an exception attached.

remote swallow
#

removing the fact you dont print an exception in the loadDefSkyBlock method

scenic onyx
remote swallow
#

is this line still commented out

scenic onyx
remote swallow
#

Exceptions are a wonderful thing. They can let your code recover from unexpected situations in a nice and clean way, if you use them properly. That does not mean that you should always rely on them though. For example, imagine this: Most highways have guardrails in the middle to avoid cars going into oncoming traffic....

#

somewhere in your code you are most likely throwing an error and not handling it anywhere so you arent seeing the actual issue

dusky prawn
#

Hi! I have my /eat command, and i wanna make a cooldown on like 20 minutes. Is it possible? If yes, how?

slow light
#

bro

#

Anyone here fimmiliar with towny?

#

api

remote swallow
#

elgarl probably

slow light
remote swallow
#

@eternal oxide

storm crystal
#

But I forgor which video was it

#

D:

slow light
#

hi elgar

#

uhm

eternal oxide
#

Me, I wrote it, but it's be years since.

dusky prawn
#

Oh - I'll find it, thanks :D

slow light
storm crystal
#

You type in value in miliseconds

slow light
#

this is really basic function

#

i need

#

so you probobly will know it

storm crystal
#

Which would be 1200000 for 20 mins

undone axleBOT
slow light
#

how on earth do i create a rank from the plugin

#

like im making a plugin

#

addon for towny

#

that lets people

#

create their own town specific

#

ranks

remote swallow
slow light
#

like mayors

eternal oxide
#

When I wrote teh API you could not create a rank yourself

lost matrix
#

To me this looks like a connection leak of some sort...

slow light
eternal oxide
#

It may have changed, but ranks are server wide not town specific

slow light
#

you have to do permission nodes

#

and permission files

slow light
storm crystal
slow light
#

i am making a plugin

remote swallow
slow light
#

that lets town mayors

#

make ranks

#

for their specific town

#

i actually made it kinda work

#

but i need to know

#

how do i create a rank?

#

using

#

the

#

thing

remote swallow
slow light
#

like mayors will specify rank name

#

and permission nodes

#

but i dont know how to create it

eternal oxide
#

you can't

slow light
#

welp

eternal oxide
#

as any rank created by any mayor would become available to all mayors of all towns

slow light
#

is there a workaround or nah

eternal oxide
#

no workaround as it's a global system

slow light
#

hm

#

what if i redo towny and make my own ver of it

remote swallow
#

have fun

slow light
#

and then make it a local system

eternal oxide
#

that would be a rather HUGE task

#

you'd have to instance TownyPerms per town

slow light
#

yeah

#

im guessing that will cause

#

preformance issues

#

too

remote swallow
#

probably not that high just a hell of a lot of work to make it work properly

slow light
#

on big servers

eternal oxide
#

not really a performance issue, but it would be a pain to save data

remote swallow
#

especially so you can have per town perms plus global config specified ones

eternal oxide
#

you would need to add save functionality as TownyPerms has no save currentrly

lost matrix
#

I would start by dramatically reducing your connection timeout and leak detection threshold. 120s and 300s is way too much.

slow light
#

to make it work.

eternal oxide
#

Its never needed a save as it's across all towns

#

yes

#

it would be a HUGE change

slow light
#

damn.

#

imagine if i pull it off

#

how big is towny anyway

#

ive never cheked

#

checked

lost matrix
#

If a query takes more than 30s then you are way beyond anything reasonable already.

remote swallow
eternal oxide
remote swallow
#

id say at your current skill level trying to pull it off would take forever

slow light
slow light
#

i like how in css this is actually doable unless the library is in a ancient version

proud badge
#

whats the method to make a player say a message in chat

#

chatGPT doesnt know

remote swallow
#

Player#chat

proud badge
#

ok

proud badge
#

thanks

slow light
#

anyways

rotund ravine
slow light
#

towny is insanely good

lost matrix
#

And do some testing. There are tools which can create minecraft clients and connect/disconnect constantly.
Then check for frozen and timed out connections-

slow light
rotund ravine
#

Yeah it knew just fine

proud badge
# rotund ravine

rip cant upload images but it said sendMessage and broadcastMessage to me

proud badge
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

slow light
#

spigot

#

forums username

proud badge
#

uh i frogor

slow light
proud badge
#

!verify
nedlolmanwoo

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

proud badge
#

ok where specifically

#

nvm

remote swallow
slow light
#

me listing my failed projects

proud badge
remote swallow
#

the works this link is a hyper link

tall dragon
# scenic onyx yes

pretty sure swm in 1.8 has a bug where it just doesnt add the world to its list

#

like it creates the world just fine

#

but doesnt create its settings in config

proud badge
#

I clicked on every word in that message

#

but nothing

remote swallow
#

its probably something with ur browser

#

either an extension or just outdated browser

proud badge
#

I use Brave

remote swallow
#

try a different browser eg chrome/firefox