#help-development

1 messages · Page 894 of 1

eternal night
#

Yea, how are you going to represent two different listeners listening to the same "topic"

inner mulch
eternal night
#

aha. I have no idea what you mean but ye, gl 👍

inner mulch
eternal night
#

Yea so exactly what miles suggested

#

lol

slender elbow
#

who said Set<topic> as key 🤔

inner mulch
slender elbow
#

the map has a key set, yes

#

it's all the available keys in the map, it's a set

inner mulch
#

no :( the key would be a set

slender elbow
#

huh

#

i

#

sure

inner mulch
#

5 minutes ago it would have been

#

BUT NOW

#

im smarter 🤓

zealous osprey
#

I need someone smart

inner mulch
zealous osprey
#

Yey.
Can you help me prove that the vectorspace of the complex numbers is isomorph to that of the 2 dimensional vectorspace of the real numbers using the inverse identity matrix?

inner mulch
#

sure

#

hold on

zealous osprey
#

I'm actually not sure if that is even possible...

zealous osprey
#

But who am I to judge, you are smart

inner mulch
#

have fun, idk what this, i guess you do?

zealous osprey
# inner mulch

There were two mistakes in there and didn't use the identity matrix, but I'm impressed that GPT actually knew how to prove linearity

inner mulch
#

:)

wispy plume
#

When shading dependencies for a bungeecord plugin, should I relocate them all? (e.g. apache commons io, jakarta.mail)
Wondering what's the good practice in bungee development

kindred valley
#

how can i constantly spam an item on the groun

#

d

kindred valley
#

how to spam item on a loc i mean

elder harness
#

Is there a way to get the localized name of an enchantment? Currently I just get the namespaced key, but that is always in English of course

inner mulch
kindred valley
inner mulch
#

A bukkitRunmable if i understand corrctly

kindred valley
#

what

inner mulch
#

BukkitRunnable?

young knoll
#

World.dropItem iirc

inner mulch
#

he wanted it to constantly spawn

kindred valley
#

do you know capture the wool

inner mulch
#

no sadly not

young knoll
#

Then yeah just spawn it with a runnable

quaint mantle
proud badge
#

is Bukkit.broadcastMessage fine async?

#

Since it doesnt modify anything in the world

warm mica
river oracle
warm mica
#

If I remember correctly, players are a part of a CopyOnWriteArrayList, but spigot has decided to throw exceptions nonetheless recently

#

At least with sounds. So i wouldn't be surprised

proud badge
#

So this returns the full domain that the player used right?

#

Because I'm making a plugin where players can create referrals in the form of subdomains

hazy parrot
#

I remember I had some problems with it

#

Give it a try

#

Should be easy to test

proud badge
#

Also is .hasJoinedBefore safe to run in the PlayerLoginEvent?

#

Says some methods on the player shouldnt be run as they havent fully logged on yet

#

.hasJoinedBefore() is a method from the extension OfflinePlayer so it should be fine maybe

trim quest
#

this is my project structure and this doesnt work for me

proud badge
#

Why Eclipse

#

Use IntellIJ, way better

#

Or wait is this not a minecraft plugin?

eternal oxide
#

cough

proud badge
#

Also what do you mean by "doesnt work"

trim quest
trim quest
proud badge
#

This minecraft version is not supported by the plugin

eternal oxide
#

show yoru NMSHandler implementation in V1_20_R3

trim quest
remote swallow
#

iirc r4 doesnt exist

trim quest
#

i guess naming issue

remote swallow
#

its r3 still

#

also your packages are wrong

trim quest
#

1.20.4 is R3

remote swallow
#

you need to have the nms version in the package bc otherwise it just has 1 of ur nmshandlers

eternal oxide
#

so you named your package V1_20_R3 but expect to find an nms_1_20_4

#

you need to go back and look at alex code again

remote swallow
#

show your packages

trim quest
remote swallow
#

you didnt add the version to the package

trim quest
#

im foolish

remote swallow
#

they didnt add versioned packages

trim quest
#

NOW I CAN CHOOSE.

#

ok

#

thanks guys

#

now it works.

warm mica
trim quest
warm mica
#

Use whatever you want to use

fallow gyro
#

Hi! I'm using custom heads within my plugin.

When I create a head, I use a generic player profile uuid (my own), and then set the textures to something different.

Now, though, I need to be able to get the texture from a head, in the form of an ItemStack.

For some reason, meta.getOwnerProfile() returns null, though. I know this is a bit of shitty question, so let me know if I need to provide some more info. The method where I am trying to this is attached as a screenshot.

In short, I have an enum with things like "RED_BUTTON", which I can then use to get the URL for that specific player head texture. What I need to do now is get the enum from a player head, which first requires me getting the textures for that head.

#

The error logging is just for debugging purposes so I can see where the method returns null. Currently it's logging "2", which indicates that getting the player profile is returning null

tall dragon
#

does any1 know if Damageable#damage fires an EntityDamageByEntityEvent?

rapid rock
#

Hey guys
I want to break any block which i touch with my pickaxe(in the sense left click)
even if its bedrock or barrier
im just not able to get it right

i tried getting location of block in BlockBreakEvent and replace it with air
any suggestions?

sullen marlin
proud badge
#

Also, do you know is PlayerLoginEvent.getHostname() is inaccurate? People here have said it is

sullen marlin
sullen marlin
spare mason
#

how can i setup hotswap?

proud badge
spare mason
dry hazel
#

just put those before the -jar argument

hazy parrot
proud badge
#

ok

meager wolf
#

I want to use a feature from a mod (Cobblemon) and a plugin (PlaceHolderAPI) and i am so confused and i just want to know if thats possible

tame wolf
#

Not supported

meager wolf
#

How do u use luckperms in mods ?

#

I mean

#

Not how in the way of how to add the repo

#

But how does it work

slender elbow
#

luckperms has forge and fabric versions

meager wolf
#

Aaah

#

Damn

tender shard
#

yo which one looks better? the short version or the longer one?

#

(I mean in general, not for this specific option)

rough drift
#

it's clearer

tender shard
#

yeah me too. I'm just a bit worried it's a bit overkill to have 9 lines of comments for such a simple thing lol

rough drift
#

Better more comments than less

tender shard
#

true

rough drift
#

it's also easier to read because of the spaces

wide coyote
#

first one is better imo

rough ibex
#

Besides, you're only adding 5 or so bytes for each comment line

#

So it's not a big sacrifice at all

tardy delta
#

5 bytes for a line?

rough drift
#

4 bytes*

tender shard
#

it's not about the bytes lol. more about how many stuff can fit onto the screen

rough drift
#

one for the # and one for the \n

tender shard
#

the plugin is already at 3.5mb anyway lol

rough drift
#

LOL

tardy delta
#

# is ascii so id guess utf8 treats it as one byte too lol (if you wanna get nerdy)

#

tf is discord doing

#

ah stupid markup

rough drift
#

markdown

tender shard
#

is ascii!!!!!!111

rough ibex
meager wolf
#

how bad is the idea of putting a plugin jar inside a mod and making the mod copy that jar and put it in the plugins directory

tender shard
#

Inside a mod?

meager wolf
#

ye as a resource

tender shard
#

Like forge/fabric or what do you mean with mod

meager wolf
#

ye

#

forge

tender shard
#

What‘s the purpose, forge doesnt run spigot plugins - and all those hybrid forks are quite bad

meager wolf
#

i will have a pre-built plugin inside the mod's resource, and when a condition is met, it will be copied into the plugins folder and it will be used just normally

tender shard
#

Well ofc you can do that

#

Just be careful if you use gradle‘s shadow plugin

#

It can‘t handle jar in jar

trim quest
#

anyone used maven-assembly-plugin here ?

quiet ice
#

I think everyone that ever used maven used that plugin

#

I'd call it quite essential even

trim quest
#

then why everyone uses shaded plugin.

quiet ice
#

the maven-shade-plugin runs after the maven-assembly-plugin FYI

trim quest
#

im trying to improving multi-module stuff. No one uses root project.

#

Everyone producing jars in sub jar modules.

quiet ice
#

maven-assembly-plugin generates the original "slim" jar, while the maven-shade-plugin uses that jar and adds the runtime dependencies into it

#

Actually, I think I'm confusing maven-assembly-plugin with maven-jar-plugin now that I think of it. Oh well, there is just too much garbage preconfigured under maven

trim quest
#

but you can make more configurations on descriptor files. with maven-assembly-plugin

#

sorry for my english tho. its my second lang.

#

i can make mistakes.

quiet ice
#

Honestly I don't quite see the reason to actually use the plugin directly

trim quest
#

i dont wanna use it. i will try to improve.

quiet ice
#

If you are familiar with it - sure, knock yourself out. Otherwise uh, I am not entirely sure what it offers that jar or shade does not

#

Anyways, I realized that I am making a severe error by staying up for any longer. Farewell!

tender shard
#

ofc you can use the assembly plugin and configure it manually

#

or you use the shade plugin that does everything automatically

trim quest
#

👍

wet breach
lament maple
#

Can someone tell me whats wrong?

#

wdym

slender elbow
#

you set the score of §c at the beginning, and then you change it to something else at the end

#

same with §c:

lament maple
#

yt video is the image

slender elbow
#

^

#

he is using a different text per line

#

you are trying to repeat §c twice, but it will correspond to a single entry

lament maple
#

well sometimes i gotta use the same color

#

how to fix

#

wdym by diff utf chars

minor junco
#

something i used that you can copy if you want:

    /**
     * Creates a new sequence of colors based off of previous generated colors, to enable
     * duplicate-like lines to exist within a scoreboard. This color ID is used as the prefix 
     * to enable duplicates.
     *
     * @return the next color prefix (will affect successive identifiers)
     */
    @CheckReturnValue
    public String generateNextUniqueColorPrefix() {
      StringBuilder builder = new StringBuilder();
      int repeat = 1 + (colorCodeGenerationCursor / colors.length);
      for (int i = 0; i < repeat; ++i)
        builder.append(colors[(colorCodeGenerationCursor++) % colors.length]);
      builder.append(ChatColor.RESET);
      return builder.toString();
    }

^ above generates a new color each time you append a line to a scoreboard

tender shard
#

§1§a
§2§a
§3§a
§4§a

minor junco
#

and use the result of this method invocation as the prefix of your scoreboard line

#

colors is an array of all colors using ChatColor.values() <- note the auxillary space here is O(n) due to arraycopy

#

due to the context of what it was written in

#

it's a content builder

#

for example I have this method:

    @CanIgnoreReturnValue
    public ScoreboardContentBuilder appendEmpty(int repeat) {
      while (--repeat >= 0)
        lines.add(generateNextUniqueColorId());
      return this;
    }
young knoll
#

Scoreboards are pain

minor junco
#

yeah

quaint mantle
#

Use fastboards

echo basalt
#

sumn like this

young knoll
#

It’s all fun and games until you want per player scoreboards but global teams

quaint mantle
#

Why not

#

??

#

okay...

#

I mean all you do is shade it into your plugin

#
FastBoard board = new FastBoard(player);

// Set the title
board.updateTitle(ChatColor.GOLD + "FastBoard");

// Change the lines
board.updateLines(
        "", // Empty line
        "One line",
        "",
        "Second line"
);

look how easy the api is

#

nice

raven pond
#

any

#

can help me

#

how to use config file

raven pond
#

i can't understand that ;-;

quaint mantle
raven pond
quaint mantle
raven pond
quaint mantle
#

The creation of the configuration file:

plugin.saveDefaultConfig();

saveDefaultConfig() will write the config.yml file from your plugin's jar file to the plugin's data folder. (If that folder doesn't exist it will be created) It will not overwrite an existing config file.

From that link

#

so

#

do you see your resources folder?

#

probably src/main/resources/

raven pond
#

ye i see

quaint mantle
#

make a new file in there like this "config.yml"

quaint mantle
#

That is your default configuration

#

then to save your default config you can use saveDefaultConfig() in your main plugin class

raven pond
#

enable: true
banned-word:

  • Dick
  • lon
  • cc
  • con cac
    =)))
#

then?

raven pond
#

ok

#

then? @quaint mantle

raven pond
hazy parrot
#

where ever you want

wet breach
#

It fails silently if the config is already there. However you can put it where ever you want as long as it is called at some point.

raven pond
#

oh

#

thank

lament maple
#

how can i access openNavigatorInv from another class

hazy parrot
wet breach
buoyant viper
#

maybe a utility class may be a better choice depending on ur uses

lament maple
#

so i can open the inventory from any class

drowsy helm
#

have a reference to the PlayerConnectionListener class and use PlayerConnectionListener#openNavigatorInv

lament maple
#

wdym with #

drowsy helm
#

it means its a instance method of the class

wet breach
#

^

buoyant viper
#

having an instance of the listener just felt weird

drowsy helm
#

Well that method shouldn't be in that class in the first place

#

breaks SRP principle

lament maple
#

I get a null pointer exeption in line 48

drowsy helm
#

two separate things

#

the error is for BlockListener line 48

drowsy helm
#

and your class naming is incorrect

buoyant viper
#

thats why i had suggested like a utility instead

drowsy helm
#

yeah

lament maple
drowsy helm
#

class names begin with uppercase

#

so should be OpenNavigatorUtil

lament maple
#

Is there a problem with starting with lower case

#

does it cause bugs?

drowsy helm
#

its just not to the naming convention

#

typically lowerCamelCase is reserved for variables

#

so it could be misinterpreted as a variable instead of a class

lament maple
#

i can change that later on but why do i get nullpointerexpection

drowsy helm
#

whats on like 48 of BlockListener

lament maple
drowsy helm
#

inside onBlockInteract

#

either openNavigatorInvUtil is null or event is null

lament maple
#

do you want me to show u the class of the opennavigatorinvutil

drowsy helm
#

but see thats where your naming convention is confusing is openNavigatorInvUtil in that context a static reference or a variable?

lament maple
#

thats the class of openNavigatorInvUtil

drowsy helm
#

thet class itself isnt the issue

lament maple
#

do you mean the reference to it?

lament maple
drowsy helm
#

fix the class name first

lament maple
#

ok

#

done

drowsy helm
#

im guessing openNavigatorInvUtil is null

lament maple
#

so what now

drowsy helm
#

just do
OpenNavigatorInvUtil openNavigatorInvUtil = new OpenNavigatorInvUtil ();

#

instead

lament maple
#

testing

#

sec

drowsy helm
#

I'd really recommend watching a few java tutorials before hopping straight into spigot dev, it'll help a lot

river oracle
#

Any kotlang users here know how I should go about shading the stdlib into my plugin

lament maple
#

still null pointer exepection @drowsy helm

drowsy helm
#

then your event or player is null

#

debug it, itll take you 2 seconds with a print statement

lament maple
#

like this or what, sorry im very confused

drowsy helm
#

no print out the value of openNavigatorInvUtil and event.getPlayer() itself

#

and see if its null

grave vigil
#

Should I create an entire abstract menu class for only 2 different GUI screens?

drowsy helm
#

can always reuse in other projects

grave vigil
#

true

lament maple
#

testing

#

it opens now-

#

lemme remove the debug

#

and thanks

#

def gotta lern java basics

buoyant viper
#

?learnjava!!

#

dang

#

?learnjava!

undone axleBOT
buoyant viper
#

baeldung is love, baeldung is life

young knoll
#

The regular one is fancier

#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

buoyant viper
#

when did that one get updated

river oracle
#

How can you disable the experimental API warning in intellij I just want to supress it with @SupressWarnings

orchid brook
#

Hi i want to create an item with level. Do i need to store them all in database and load them at server startup or is it better to store level in nbt tag of the item ?

river oracle
#

?pdc

river oracle
#

if you are pre 1.14 kekw cry

orchid brook
#

i think i will go for pdc

drowsy helm
#

if its for blocks its a different story

#

not every block has nbt data

orchid brook
#

for now im only developping the items

#

but for all block, i think i will go for database

#

item level -> pdc
block where u can put the item -> database and load all block at server startup.
This should be great right ?

drowsy helm
#

no

river oracle
#

blocks could be mapped to NBT using chunk data

drowsy helm
#

that would be extremely laggy

#

you would have to do it on a per chunk basis

#

imagine loading a million data points on startup

river oracle
#

more realistically its a couple thousand :P, but yes best practice is to load per chunk

#

you should never have something loaded from an unloaded chunk

drowsy helm
#

It's the principle

orchid brook
#

On every chunk load, i check if the chunk containt custom block, and if yes, then load it ?

drowsy helm
#

each chunk should have an array of data, cache it if its needed

orchid brook
drowsy helm
#

don't think per block is a good idea either

drowsy helm
river oracle
#

and when you unload chunk it should be cached for up to 30 or so seconds afterwords I'd say

#

that way you aren't doing unecessary DB calls

orchid brook
drowsy helm
#

also 'store all blocks in a map' is loading from db

#

It really depends how much players or world interact you expect on getting

#

if you don't plan on a huge playerbase then you don't really need to do it super efficiently

#

but once you suprass a few thousand blocks, it will start using excess memory

river oracle
#

if you are making a plugin for others it should generally use best practices

#

because you never know their situation fully

rare rover
#

erm, im having to do CompletableFuture.get(), isn't that hella slow. I mean this system is WAY faster than before went from 30ms -> 1.4ms but im wondering if i could make this faster

drowsy helm
#

correct, I'm assuming this is for a private server

river oracle
#

though if you're running get() I'd generally advise you run it asynchronously

#

anyways as long as get() isn't blocking the main thread which in this case it isn't, you'll be doing just fine

rare rover
#

just do thenAcceptAsync?

#

like i ain't worried about the timings but like i'd rather it not block the main thread:

river oracle
rare rover
#

oh ye ofc

river oracle
#

but yeah that should be fine there really isn't much more you can do to optimize a DB call

#

mostly because you're at the mercy of your DB communication speed

rare rover
river oracle
#

nice name :P

rare rover
#

great name ik

#

i was just using a thread for async at first without CompletableFuture's but this system is way faster

#

just more code to write for the user

river oracle
#

I'd say my number one issue with this project is AINT NO FUCKING WAY I'm importing MunchDatabase bro someone might get the wrong idea eyes_zoom

orchid brook
river oracle
rare rover
#

thats why you gotta do MunchConnection.create() 🙂

#

lmao

#

since MunchDatabase's constructor is internal aka protected

river oracle
#

ahhh I see

drowsy helm
#

and chunk compression

river oracle
#

you can get even more optimized than that too :P

orchid brook
rough ibex
orchid brook
#

and what about NMS ?

rough ibex
orchid brook
drowsy helm
#

keep it simple, for every chunk have an array for each block

#

you can do per block but indexing it would be a bitch

orchid brook
#

I will try thank, anyways i think i will also help me with the wildchest plugin source code

wet breach
#

In fact with the improvements to java and more modern systems it actually may be faster now as the numbers i am quoting was from a test about 10 years ago lol

orchid brook
#

I will do something like this i think i will try:

private final List<Material> gettedBlocks = new ArrayList<>();

private void loadChunk(Chunk chunk, int[][][] paletteIndices) {
    for (int x = 0; x < 16; x++) {
        for (int y = 0; y < 256; y++) {
            for (int z = 0; z < 16; z++) {
                int paletteIndex = paletteIndices[x][y][z];
                Material blockMaterial = paletteData[paletteIndex];

         
                gettedBlocks.add(chunk.getBlock(x, y, z).getType());
            }
        }
    }
}
wet breach
#

Wouldnt make it static

wet breach
#

It doesnt factor negatives

orchid brook
#

Oh yes, thank you. I had forgotten that now, with the update of caves, there are negative Y values. x)

rough ibex
#

good KISS approach

quaint mantle
#

Does anyone know a mc client that can tell me how delayed my packets are

wet breach
quaint mantle
#

Nah my internet is so inconsistent

#

I just wanna see the latency of some packets

wet breach
#

Optionally you could make a command to show this as a number. Also i think F3 shows latency as well

echo basalt
#

Interesting paper on 1.20.4 didn't remap bossbars to use components apparently?

#

I wanted to use minimsg for the font stuff

young knoll
#

I know adventure has a bossbar class

#

Because my damn ide keeps trying to import it

echo basalt
#

interesting

#

I'm trying to use the bukkit one tho

remote swallow
#

okay so they modify it

#

they dont use the bukkit class at all i think

#

they use there own

#

check the boss bar viewer class out

#

prob an interface

echo basalt
#

yipee ok

#

this api is so weird

candid pawn
#

I run a small Minecraft event server with around 600 members. I need people to help modify existing plugins/develop new plugins for events. Would anyone be interested in helping out? There's no pay or anything, this is purely voluntary work.

echo basalt
#

lol no

drowsy helm
#

600 members and no donors?

quaint mantle
river oracle
#

600 players and broke as hell pepe_laugh

drowsy helm
#

you can pay the dev in exposure pog

river oracle
candid pawn
#

I pay $48 for server power

drowsy helm
#

so not 600 active members

candid pawn
#

600 poor members

remote swallow
#

somehow i think a server with 600 active members would have way more income than that

candid pawn
drowsy helm
#

whats your average concurrent player base

candid pawn
#

We usually get around 100 players

#

sometimes

#

it depends

drowsy helm
#

you need to sell stuff better

candid pawn
#

But, I got a partnership from a server host, so I can get rid of our server expenses in 5 months

#

We also just released a Patreon

drowsy helm
#

but bottom line, no good developer will work for free

river oracle
#

I

#

will work for free

candid pawn
river oracle
#

for 20 dollars an hour

candid pawn
#

thats crazy

river oracle
#

no that's reasonable lol

#

who the fuck are you hiring

candid pawn
#

nah, i mean thats crazy for free but for $20

remote swallow
#

for a good developer, that is reasonable

candid pawn
#

yeah, ik, nvm I regret coming here devs are toxic

river oracle
#

lol

young knoll
#

Best I can do I tree fiddy

river oracle
river oracle
drowsy helm
#

$20/hr is low for a dev

river oracle
#

I'm in HighSchool so its plenty for me :P

young knoll
#

ChatGPT will do it for free!

river oracle
#

better pay than a grocery store and good enough to make my mom shut up

remote swallow
#

kek this is funny

#

theres 600 people in the discord and its dead as anything

echo basalt
#

Sounds like a cracked network

#

I'm being paid 1k+ to make a single minigame in like a week, no way you're getting that for free

stoic sedge
#

can anyone help me?
plugin not loading. I realized that if i extract the jar file and make it jar again, they stop working. any idea on what this could be? I needed to change the "depend" of 1 plugin to make it load only after another plugin

remote swallow
#

recompile the plugin from source or get the stuff it needs to load after to modify their plugin.yml to loadbefore: [Towny]

river oracle
#

you can probablly just unzip the jar than rezip it idk if you even need any special utils for that

#

could be wrong

wet breach
stoic sedge
#

cuz i think it's something in my pc idk, every jar i edit dont work

slender elbow
#

lol

stoic sedge
#

its true, it never works. i tested and even if i just extract jar file and then make jar again it stops working

orchid brook
#

@drowsy helm After examining the source code of WildChest, they store all chests in a map during server startup, called "unloadChest," using a database. Then, with the chunk load event, they check if the chunk has "unloadChest." If yes, they move the chest to a new map called "loadChest." When the chunk unloads, they remove it.

If I understand correctly, it's better not to store all "unloadChest" because this would consume a lot of memory unnecessarily. Using the block palette is too challenging for me. Therefore, I will simply loop through all blocks of the chunk when it is loaded, check if my block is in that chunk, and then load the block if it is.

wet breach
#

Then put file back in the jar

stoic sedge
wet breach
#

Drag and drop?

stoic sedge
#

wdym? how do i only extract "plugin.yml" from a jar file?

#

what app do u use

slender elbow
#

any that lets you inspect zip files

wet breach
#

Change it to zip, open it. Drag the file to desktop or whatever. Edit file. Drag it back into the archive. If it asks if you want to overwrite file click yes. Change extension back to jar. Alternatively get winrar

rough ibex
#

All .jars are .zips

#

that's the secret sauce

stoic sedge
#

it worked 🙂 tysm guys

#

im kinda noob with this stuff 😭

rough ibex
#

no worry

grave vigil
#

What information should/shouldn't be stored in a custom yaml configuration? I am trying to check for alt accounts using ips and I don't want to put anyone's data at risk if there's something unsecure about it

slender elbow
#

"by playing on our server you accept our privacy policy"

#

runs

grave vigil
rough ibex
#

IPs are just numbers

#

ultimately storing data innately puts it at risk

#

since you, the dev, are not in control of other people's setups

quaint mantle
#

just write them down on a piece of paper

grave vigil
#

I'll do that. I'll update the piece of paper live any time someone changes something and check it any time they try to do an action

lament maple
rough ibex
#

small caps

lament maple
#

wdym

rough ibex
#

thats the name

#

of those characters

#

it's not a font

rare rover
#

i mean i use this sometimes:
(ugly ik)

val small_caps = mapOf(
    "a" to "ᴀ",
    "b" to "ʙ",
    "c" to "ᴄ",
    "d" to "ᴅ",
    "e" to "ᴇ",
    "f" to "ꜰ",
    "g" to "ɢ",
    "h" to "ʜ",
    "i" to "ɪ",
    "j" to "ᴊ",
    "k" to "ᴋ",
    "l" to "ʟ",
    "m" to "ᴍ",
    "n" to "ɴ",
    "o" to "ᴏ",
    "p" to "ᴘ",
    "q" to "ǫ",
    "r" to "ʀ",
    "s" to "ꜱ",
    "t" to "ᴛ",
    "u" to "ᴜ",
    "v" to "ᴠ",
    "w" to "ᴡ",
    "x" to "x",
    "y" to "ʏ",
    "z" to "ᴢ"
)

// Convert text to small letters (small caps)
fun toSmallCaps() = text.map { small_caps[it.toString().lowercase()] ?: it }.joinToString("")``` or just <https://lingojam.com/FancyTextGenerator>
rough ibex
#

doesn't look too ugly

#

simple, easy, readable.

lament maple
#

looks weird for me

rough ibex
#

that is not small caps

#

I don't know what that is...?

lament maple
#

oop

#

i used some generator online#

rough ibex
#

try lingojam

lament maple
#

uhm

#

what one is the... small caps one

#

@rough ibex

rough ibex
#

I don't know

#

just try examples from the kotlin code above

lament maple
#

tried it and its exactly the same

rough ibex
#

are you using any other resource packs

lament maple
#

nope

#

minecraft standard

rough ibex
#

paste what you have

lament maple
#

§6§lʟᴇɢɪᴛᴘʟᴀʏ

rough ibex
#

yeah that's right

lament maple
#

weird

rough ibex
#

what MC version

lament maple
#

1.8

#

might be that

rough ibex
#

...

lament maple
#

but anyway

rough ibex
#

Yes.

#

you are using a 7+ year old version

#

yes it is missing a lot of stuff

lament maple
#

do you know how to let me show the luckperms placeholder in my scoreboard?

rough ibex
#

what scoreboard plugin

lament maple
#

coded

rough ibex
#

also 1.8 is going to be outdated for a lot of stuff

#

then hook into placeholderapi

lament maple
#

how sorry never did that

rough ibex
#

look it up

lament maple
#

hook placeholder api into my plugin?

remote swallow
#

yup

lament maple
#

its being red marked

rough ibex
#

did you reload maven changes?

lament maple
#

hold up

#

yea now works

#

So.. what i did is put it in my pom with no red marks. Then i rebuilded the plugin and put it in plugins but its still not working

drowsy helm
#

did you implement the code

#

or you just added a dependency

lament maple
#

do i only need to add the on enable thing

drowsy helm
#

you have to translate any message you want with placeholders

lament maple
#

uhm wha-

#

how do i

drowsy helm
#

read the guide

lament maple
#

oof ok

#

Thanks it works, could you tell me how i can translate & to § so its actually a color

drowsy helm
#

you dont

remote swallow
#

ChatColor.translateAlternateColorCodes

drowsy helm
#

use ChatColor.translateAlternateColorCodes

lament maple
#

where should i put it

remote swallow
#

use the return value of it

lament maple
#

never used it uh

remote swallow
#

use the return value

#

it takes a string and returns a string

drowsy helm
#

String myString = "blak blah blah"
myString = ChatColor.translateAlternateColorCodes('&', myString);

#

dont use § in your code

lament maple
#

ah

#

ty

#

yall are life saving xd

#

I use this but it still shows with &4 yk

#

@drowsy helm

carmine mica
#

strings are immutable

drowsy helm
#

youre not re assigning it

lament maple
#

huh

#

OH

#

OH

#

OH

#

stupid me

#

thank you

#

random question but any idea how i can make the scoreboard more pretty xD?

drowsy helm
#

lmao

#

maybe more spacing?

#

im not good with making things look good

lament maple
#

hm alralr

#

let me see what i can do

drowsy helm
#

as in horizontal spacing

agile anvil
#

Also use more lighter colors ?

buoyant viper
#

what event is triggered when someone hits a projectile (ie. hitting a fireball back at a ghast)? EntityDamageByEntityEvent?

lost matrix
#

Nvm thats just for right clicks i guess?

#

EntityDamageByEntityEvent seems like a decent guess

buoyant viper
#

tested, it is in fact EntityDamageByEntityEvent

teal venture
#

Is it smarter to store player data in JSON or YAML Files, for example I am creating a teams plugin and wanting to Store their team data.

eternal oxide
#

depends if you want it easily readable/editable

#

If you do then YAML. If you don;t care, then YAML 😛

#

However, why persist teams data?

teal venture
eternal oxide
#

are you wanting to manually edit the data in file?

dry hazel
#

just use a proper database

tender shard
#

best way is to just give the admin an option so they can choose from (at least)

  • json / yaml
  • sqlite (or h2)
  • mysql
#

there's other fancy things like postgres and mongodb but 99% of people won't have access to any such things

rough drift
#

Configuration option

save-type: JSON / YAML / SQLITE / H2 / MYSQL and then you have a section for credentials (probably should have a convenient way of setting it up)

glossy venture
#

like on their servers

#

with an account

rough drift
#

Do I use .jar, -remapped.jar or -remapped-obf.jar

eternal oxide
#

shortest name

rough drift
#

ty

minor junco
#

It's free tier is really good

heavy void
#

Hey guys, i made a database system which i manipulate everything in memory and i just send it to the database when the plugin is shutting down.

This is recommended?

rotund ravine
#

Sure

#

Some periodic saves or smth is also great

#

Saving on write if it’s small things are great too

heavy void
#

In case of crash?

rotund ravine
#

Ye

ivory sleet
#

if you're ambitiuous you may wanna do optimistic saving

#

but well, otherwise jantucks advice is 100% on top

heavy void
#

Ty guys

lean pumice
#

my intellij in bugged, i dont get the suggestions when i write a code, how i can fix it?

river oracle
#

File > invalidate caches

#

Select the top 3 checkboxes and press invalidate

lean pumice
ivory sleet
#

thats fine unless you wanna really scale things drastically, in which contention can become high

river oracle
#

Ypu gotta look that one up tho

#

?google

undone axleBOT
next plume
#

I'm still trying to wrap my head around the NMS obfuscated, Mojang, and Spigot mappings in 1.20.4.
When I reference a class in a plugin, I use the Spigot mappings?
And then does Spigot remap that to the obfuscated mapping to use when running the server?

young knoll
#

When you refrence it you use mojang mappings

chrome beacon
#

^^ well if you've set that up correctly

young knoll
#

And then specialsource remaps it to obfuscated when you build

next plume
#

In this case, I'm using TinyProtocol, which is using reflection.

#

It works with the Spigot name, not the Mojang name.

young knoll
#

oof

#

Yeah reflection doesn't get remapped

next plume
#

So how does it work with reflection where I specify the Spigot name in the plugin, but the server is running with the obfuscated names?

chrome beacon
#

Does Spigot still use Spigot mapped classes with obfuscated methods/fields

#

haven't checked in a while

young knoll
#

Don't ask me what's going on in there

#

It's a mess

remote swallow
#

i think so

#

isnt it like a mixture of everything that was spigot mapped before retains that name with obsfucated internals but new stuff is just full obf

chrome beacon
#

I think they just map the class names

#

I'll check

next plume
#

Or is it that Spigot uses the Mojang names now?

chrome beacon
#

Not during runtime

remote swallow
#

@young knoll when are you converting spigot and craftbukkit to mojmaps

young knoll
#

If I knew how :p

remote swallow
#

patch all the patches

chrome beacon
#

alright so I did a quick look, the class names are mapped (with Spigot mappings), the fields/methods are not

next plume
#

So what does Spigot remap and when does that remapping happen?

chrome beacon
#

It remaps the obfuscated class names

#

and it happens when you run BuildTools

cursive falcon
next plume
#

I mean for a plugin.

remote swallow
#

for plugin you use the special source maven plugin

chrome beacon
#

If you want to remap from Mojang mappings you use the special source maven plugin

#

and it remaps during packaging of the jar

next plume
#

The plugin jar, right?

chrome beacon
#

yes

next plume
#

Remaps to ofuscated?

chrome beacon
#

yes

next plume
#

Now with the reflection TinyProtocol is doing, there's no Spigot remapping. Anything has to be part of the TinyProtocol code, right?

chrome beacon
#

well as I said the class names are mapped

#

fields/methods are obfuscated

next plume
#

I'm not using specialsaucesource

remote swallow
#

gotta use spigot/obsfucated maps then

chrome beacon
#

^^

next plume
#

So the code is like this, with a Spigot name:
private Class<?> OUT_KEEP_ALIVE_PACKET = Reflection.getClass("net.minecraft.network.protocol.common.ClientboundKeepAlivePacket");

#

ClientboundKeepAlivePacket is Spigot mapping.

remote swallow
#

for 1.20.4 they have identical package and name

next plume
#

So if the Spigot jar uses obfuscated names, how does the above code get the right class?

chrome beacon
#

It doesn't use obfuscated names for classes

#

I've said this so many times now??

young knoll
chrome beacon
#

only fields and methods

next plume
#

Oh, Buildtools remaps to the Spigot names, but it keeps them in the final Spigot jar? I thought that remapping was just for the specialsource stuff.

chrome beacon
#

hm is spigot actually just using Mojang class names

remote swallow
#

its a jank thing

chrome beacon
#

does look like it

next plume
#

Since 1.20.2 they use Mojang's

#

I think

remote swallow
#

iirc someone said its like older classes are spigot mappings, while the newer or changed classes use mojmaps

chrome beacon
#

alr

next plume
#

For that class above, the Spigot name changed from 1.20.1 to 1.20.2

next plume
#

But once Buildtools creates the Spigot (now the same as Mojang) class names, those class names stay in the final Spigot jar?

chrome beacon
#

yes

next plume
#

OK, I think it's starting to make sense.

#

But I thought those mappings were "only for development purposes" and can't be used in production. Or does that not apply to class names?

river oracle
#

Everything is put down to obfuscated mappings

chrome beacon
#

Not class names

#

They're still mapped

river oracle
#

Ahhh well ig ^

#

So weird :P

young knoll
#

I wonder if you could run special source on cb with it set to remap from spigot to mojmap

remote swallow
#

@worldly ingot you have loads of free time, fix it. Make cb and spigot use mojmaps for patches then convert every single spigot mapped class name to be the actual mojmap

worldly ingot
#

Where the hell did you get the idea that I have loads of free time? KEKW

remote swallow
#

you just do

#

hypixel only takes 9 minutes a week

remote swallow
river oracle
#

Then figure that shit out

next plume
#

So with specialsource, you can use the Spigot/Mojang method names, even though they're not in the final Spigot jar file?

next plume
#

OK, I think I have it stright now.

#

Now to figure out what new shit Paper is doing with some other version/remapping stuff they've cooked up.

remote swallow
next plume
river oracle
remote swallow
#

what

#

i swear thery do

river oracle
#

Nope

dry hazel
#

no they don't

river oracle
#

Parchment does

chrome beacon
#

^^

river oracle
#

But that's third party

chrome beacon
#

They map fields and methods

#

not variables

remote swallow
#

i can brain, i mean class fields

dry hazel
#

they don't map local vars and parameter names

river oracle
#

Still confused why we relocate CB

remote swallow
#

who knows

#

probably something old

river oracle
#

@worldly ingot so epic told me you got a lot of free time ✨️ pepeLaugh

worldly ingot
#

iirc it was for two purposes. To ensure that people using server internals kept checking that their code was functional on newer versions, and to dissuade them from even using internals to begin with

#

At least that's what I've gathered over the years

young knoll
#

But it leads to bad design

#

They said so!

river oracle
#

^^^^

#

:P

worldly ingot
#

It should have led people TO DESIGN AND CONTRIBUTE API PES_HyperReee

young knoll
#

Okay but you'll never have full api coverage :p

river oracle
remote swallow
river oracle
#

E.g. when designing inventory api for my own lib I through that together in like 10 minutes work s great but for bukkit it's a pain in the ass

chrome beacon
#

I've always found the bukkit inventory api to be a pain to deal with

river oracle
chrome beacon
#

Yeah I know

worldly ingot
#

It probably used to

chrome beacon
#

I've made mods with custom inventories, so much easier

worldly ingot
#

Just like how Material.WATCH for clocks was accurate at the time as well

river oracle
#

I don't even know if I agree with being able to create inventories but we are kinda stuck with the weird patches I've done

river oracle
#

It's 10 billion times nicer in a few cases

chrome beacon
#

Open source? uwu

river oracle
chrome beacon
#

link?

river oracle
#

On phone gimme a minute

remote swallow
#

pineapple?!?

river oracle
#

💀

remote swallow
#

its on 1.0.0 prep

river oracle
#

No it's not

#

Somehow

remote swallow
#

i see it

river oracle
#

I don't wtf

remote swallow
river oracle
remote swallow
#

oh

river oracle
#

My nms stuff is gone 💀

remote swallow
#

someone reverted it

river oracle
#

I think I have a backup somewhere

remote swallow
river oracle
#

Oh shit

#

I need to revert that revert lol

#

Well that is later me problem

#

Thank god for git

#

Otherwise it'd be gone lol

#

@chrome beacon I'll ping you once I fix this shit lol gonna have to wait till after class unfortunately

remote swallow
#

review my pr when you do

river oracle
#

Good that

river oracle
remote swallow
#

sus

fathom oak
#

who could help me with placeholders deluxemenus and toprichest top hoursplayed?
i have the code, i dont know whats wrong 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!

proud badge
#

Yall whats an arithmetic exception, chatgpt seems to crash whenever I send it the stacktrace

icy beacon
#

Hey, I am planning on making the backend of my rest api open source. Is there anything wrong with the fact that I will be exposing my password hashing method and database queries?

worldly ingot
#

Usually just divide by 0

proud badge
#

Hmm

#

Ok thanks I see

worldly ingot
chrome beacon
#

Don't expect ChatGPT to understand your stacktrace

worldly ingot
#

I guess it depends on your table structure. If it's a password table especially, might expose how you store passwords which is also another vulnerability

icy beacon
#

How do I go about it then? Do I gitignore my queries and password hashing?

worldly ingot
#

If it's just standard data though then it's probably not a huge deal. Depends on how secretive you want your table structure to be :p

#

I would maybe throw it behind another library or something

icy beacon
#

Yeah that'd work

slender elbow
#

bcrypt 🙏

icy beacon
#

Though I don't actually see why exposing password hashing would be bad

slender elbow
#

also always salt

rotund ravine
#

Use some magic salt env variable 👌🏻

worldly ingot
#

Well if your passwords are leaked, it's pretty easy to brute force reverse if you have the hashing algorithm

icy beacon
#

Argon for example gives a prefix that identifies that it's argon

#

So if a bad actor gets access to the database they already know

worldly ingot
#

If you give me aheuilfawbcawjkl;ehjcawlke, I can now just try standard passwords, run it through your hasher and figure out if it matches

icy beacon
worldly ingot
#

If I find a match, ez, I know what the password is now

#

A salt would help though yes lol

icy beacon
#

Well in my case I use argon

slender elbow
icy beacon
#

And an argon string is like $argon$something

#

So I don't see how hiding the method would help if it's already evident

rotund ravine
slender elbow
#

so even if they have the same password the hash result is different

icy beacon
slender elbow
#

if you have a "global" salt then the hashes would be the same

#

and you can infer that they have the same password

worldly ingot
#

OR to let them know that user x has the same password as you

#

As any responsible front-end developer should do

#

(/s)

icy beacon
#

"This password is already taken by user391094. Please create a different one"

slender elbow
#

you can certainly make the algorithm itself public but not the configuration, e.g. how you apply the salt or the algorithm parameters

icy beacon
#

Isn't allat also included in an argon string?\

slender elbow
#

like "yeah we use xyz algo" but without the specific details of how you apply it, basically dictionary attacks are rendered useless

icy beacon
#

Example: $argon2i$v=19$m=16,t=2,p=1$ZGVidWdQVFIxMjM0$ux0G0NjPzf+UDMEThlnT3w

#

Work factor, memory, parallelism, something else idk

#

Is it still safer to just librarize this?

slender elbow
#

i only know so much, so

#

"i don't know" :^)

icy beacon
#

That's fair, thx irregardless

#

I'll just apply choco's idea

shadow night
#

Δ

river oracle
#

here is the API and implementation feel free to use we are under Apache 2

#

thanks @remote swallow is the genius behind the name

remote swallow
#

was i?

wet breach
river oracle
wet breach
#

I checked and I don't see any businesses using the name

#

just a movie of course, but movies and businesses can't infringe on each others names as they are not in the same categories 🙂

#

so its all good

river oracle
#
        return !equals(other) && (this.major > other.major) || (this.major == other.major && this.minor > other.minor) || (this.major == other.major && this.minor == other.minor && this.patch > other.patch) || (this.major == other.major && this.minor == other.minor && this.patch == other.patch && this.modifier >= other.modifier);
``` any ideas on how I could simplify this boolean expression I've never been a boolean algebra savant.

Basically just needs to check if one version is older or newer than the other
#

e.g. 1.0.0-SNAPSHOT is newer than 0.5.9-SNAPSHOT

#

or 1.0.0-RELEASE is newer than 1.0.0-SNAPSHOT

#

you can ignore the strings at the end they are actually collapsed into bytes

#
    private static final BiMap<Byte, String> MODIFIER_LABEL = ImmutableBiMap.of(
            (byte) 0b100, "release",
            (byte) 0b11, "hotfix",
            (byte) 0b10, "snapshot",
            (byte) 0b01, "beta",
            (byte) 0b00, "alpha"
    );
#

there is :P

#

I just wanted to see if I could simplify the boolean expression

#

e.g. reduction of term comparissons

#

using boolean algebra

wet breach
#

now you only have to do a single check

river oracle
#

didn't think about that easy solution

#

that'll probably be easiest here

wet breach
#

then your expression turns into number >= number

river oracle
wet breach
#

you don't add the numbers together

#

all you are doing is removing the dots

#

so it makes a complete number

river oracle
#

ahhh shocked_thinking genius lol that was a stupid question

wet breach
#

so, something like 1.20.4 becomes 1204

river oracle
#

hmhm yeah smart

#

in my case 1.0.0-SNAPSHOT collapses into 1003 and 1.0.0-RELEASE 1004 so it works perfectly

#

I just did a string format idc about speed that much here

#

its done like once or twice

#

and its cached

wet breach
#

.replace(char,"") is the way to do it

#

lol

wet breach
orchid trout
#

difference between enterprise and normie code?

wet breach
#

IE, you shouldn't have a 1.0.0-snapshot

#

it would be 1.1.0-snapshot or 1.0.1-snapshot

#

this way you can't have a snapshot and release at the same version number

remote swallow
#

wouldnt you get 1.0.0-snapshot which is testing, demo stuff and checking new stuff then you have -release which is the full version

wet breach
#

you can setup the profiles to be appropriate versions

orchid trout
#

so if i open a compnay i can call my code enterprise

wet breach
#

normal code isn't designed this way typically

wet breach
orchid trout
#

when you say scaling youre telling me to imagine a server with 8 quadridicilion players using my plugin?

wet breach
#

there is horizontal scaling and vertical scaling

#

horizontal scaling is where you design your application to run on multiple machines

wet breach
#

where you add more power

orchid trout
#

so if i have hardcoded connection to mongodb its not horizontal scaling and i should retire

#

what do i do when i add like 5 features to my plugin and i get lost in the sauce

wet breach
#

well, when you use multiple machines, the purpose is to have all those machines either perform the same work but different pieces to complete it faster, or you use it like load balancing. Duplicating your application to do the exact same work isn't really scaling not in the traditional sense anyways

bleak eagle
#

https://paste.rs/XjqII.java
and the plugin errors out wiiith...

org.bukkit.plugin.IllegalPluginAccessException: Unable to find handler list for event org.bukkit.event.player.PlayerEvent. Static getHandlerList method required!```
i completely understand _why_ this error occurs - i should not use generic `PlayerEvents` and `EntityEvents` but rather specific ones like `PlayerMoveEvent`, `AsyncPlayerChatEvent`, `EntityDamageEvent`, etc, etc...
but that gets really messy really fast, and i just want to prevent players from doing ANYTHING at all before they've logged in. handling these generic events by checking their type and casting them to whatever i need them to be seems like a really clean solution, and i just wish this worked.
any suggestions on how to do this in a nice fashion?
wet breach
#

?verify

#

!verify

undone axleBOT
#

Usage: !verify <forums username>

bleak eagle
#

!verify brunoooooooo

undone axleBOT
#

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

wet breach
bleak eagle
#

not anymore i guess xD

#

it said something about rate limits

rotund ravine
#

Guess u gotta wait a bit

bleak eagle
#

didn't get a message though

#

they are indeed enabled

wet breach
#

might take a minute or so for it to show up

#

there you go 🙂

bleak eagle
#

got it

wet breach
#

enjoy now uwu

bleak eagle
#

whoops

#

there we go

wet breach
#

probably better to just use the paste site lol

bleak eagle
#

oh well

wet breach
#

oh nvm its not as large as I thought

bleak eagle
#

yeah no it's pretty small

#

any ideas either way? i don't want to @EventHandler @EventHandler @EventHandler @EventHandler @EventHandler @EventHandler - but is it really the only way?

wet breach
#

don't think your generic event is going to work

wet breach
bleak eagle
#

it doesn't.. it doesn't implement the required getHandlerList

neat wolf
#

Hi I have a problem with custom entities on my Minecraft server, as soon as I pathfinder of my custom entity finds me and starts following me, if I move away from the mob by more than about 16 blocks it disappears. And I have an error in the console. If you need more information please do not hesitate and thank you for your help.

wet breach
#

also, how far away before an entity ai stuff stops, and chunks unloading etc

neat wolf
bleak eagle
#

elaborate

wet breach
#

the ideal way to solve it if its a public plugin would be to not let the entity get further then 16 blocks away

rotund ravine
neat wolf
wet breach
#

if its not a public plugin and on a server you control, just modify your server settings

wet breach
#

like if the chunk unloads, so does the mob

#

and it basically dies

#

but temporarily

#

also, custom mobs don't come back as being custom either

neat wolf
#

but why would there be an error as if minecraft had not expected the mob to unload?

wet breach
#

so you have to track where your custom mobs get unloaded so that when they come back, you can ensure to kill the fake one and replace it with the real mob 😉

neat wolf
#

OK thanks

#

I'm going to spend my evening debugging

wet breach
#

well its an MC error, but one you are creating by invoking a method

neat wolf
#

yeah but it's strange the error is not reported to any plugin line

wet breach
#

well you are using paper

#

its does funny things sometimes

neat wolf
#

i will try with spigot :D

bleak eagle
obsidian drift
#

Shouldn't this be true by default?

wet breach
#

Generic events typically don't work except for a couple because they are not implemented themselves or called rather extended from

bleak eagle
#

ok so to get it straight, there is no cleaner way than defining a million handlers for every player event i can think of?

obsidian drift
wet breach
bleak eagle
#

ahh the well known PlayerArmorStandManipulateEvent

#

anyways thanks for the help xD

wet breach
bleak eagle
#

oooh that's actually a great idea

#

spectator + PlayerMoveEvent and PlayerChatEvent cancelled

wet breach
#

then from here its a matter of just keeping them in place and chat 😉

#

there you go

bleak eagle
#

what about the teleport feature in spectator?

#

guess that's caught by moveevent too

wet breach
#

spectators can teleport?

wet breach
bleak eagle
#

yeah, if you press a hotbar number on the keyboard a little menu shows up

#

i don't know how it behaves for non-ops though

wet breach
#

time to test it, it seems 😉

bleak eagle
#

i'll also have to handle commandpreprocessevent to only allow the /register and /login commands

wet breach
#

or just use permissions?

bleak eagle
#

it's in case someone gets into an op account and runs commands they shouldn't be able to run, before logging in

wet breach
#

remove ops

bleak eagle
#

small private SMP server

#

it's just inconvenient

wet breach
#

worldguard has a setting where if ops leave they are de-opped and require being re-opped

bleak eagle
#

but i don't have ops atm anyways, it was a general example

wet breach
#

to re-op you have to manually run the command

#

so in this manner you can relegate it behind a permission that can only be added to the player object once they authenticate

#

server commands have permissions too

bleak eagle
#

as in vanilla commands?

wet breach
#

yes

bleak eagle
#

K neato

wet breach
#

bukkit.commands.op

#

I think is what it is

rotund ravine
wet breach
#

vanilla never had permissions o.O

#

as far as I am aware the default permission for stock server commands should still exist

rotund ravine
#

Idk someone should try