#help-development

1 messages · Page 314 of 1

eternal night
#

let me create the jar for you then, no plugin.yml needed right ?

wet breach
#

so if I do so I would be making it blindly

wet breach
eternal night
#

okay 👍 I'll even implement all the abstract methods

wet breach
#

yeah can just put generic stuff for that

tender shard
#

this whole discussion ahah

#

how owuld the server even know which is the PluginBase class without plugin.yml

eternal night
#

ssssh

tender shard
#

so let's go

#

paper is starting up

#

what a surprise

#

who would have guessed that

eternal night
#

that is crazy

hard ether
#

can i ask a 1.8.9 forgegradle question

eternal night
#

I have the same result

tender shard
eternal night
#

the server doesn#t load it

tender shard
#

lol

eternal night
#

yea for sure

#

fucking paper messing with this again upsidedown_cry

wet breach
tender shard
#

oh shit I actually did have a plugin.yml inside

#

haha yeah again

#

one sec

#

I forgot to mvn clean

#

here you go

wet breach
tender shard
#

lol

eternal night
#

LOOOOOOOOOOOOOOL

wet breach
#

now is still the same with spigot?

tender shard
#

dw i got spigot too

remote swallow
#

dont ask why im asking this, brain cells turned off. but am i correct in saying i could```java
String string = "cool string";
for (String key : Map) string.replace(key, map.get(key)

wet breach
#

I will have to ask md5 if he chaged it

eternal night
#

nah I think we obviously just never used it

wet breach
#

wouldn't surprise me, so few people used it anyways

hard ether
tender shard
#

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

hard ether
#

my 1.8.9 gradle process wont work.. ive tried clearing caches, reinstalling, restarting ide, force quiting java, and nothing works.


Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
tender shard
hard ether
#

ok

tender shard
#

using spigot @wet breach

hard ether
#

mb

eternal night
#

awww

#

must have been removed

wet breach
tender shard
#

shall I try craftbukkit too?

hard ether
eternal night
#

lets see the git history xD

tender shard
#

yes pls

hard ether
#

i just dont wanna be ignored and then not get the cue that yall cant answer my question

#

lol

wet breach
tender shard
#

I dont know how to search through git efficiently so pls you do it

wet breach
#

because extending pluginbase was a thing

tender shard
#

you must be confusing this with something else

wet breach
#

but as I said since hardly anyone used it doesn't surprise me if it was a removed functionality

wet breach
#

I have projects on a backup somewhere that use it

#

i will get them out when I get spigot stuff compiled after work tonight/tomorrow

wet breach
tender shard
#

this is the oldest version of Pluginbase I could find, from 2012:

wet breach
#

add a plugin.yml but don't add the main class thing

tender shard
#

here's the corresponding plugin interface

#

still, abstract class + interface

#

not psosible that this was ever able to get loaded in any way by spigot

wet breach
# tender shard

see the javadocs even say to extend it if its not a JavaPlugin

tender shard
#

yes, that would be possible if you also write your own custom PluginLoader or sth

#

but spigot/bukkit never had any other plugin loaders besides the JavaPluginLoader

remote swallow
#
String joinMessage = message;
            for (Map.Entry entry : BungeeCoreSpigot.validNameValues().entrySet()) joinMessage.replace((String) entry.getKey(), (String) entry.getValue());
``` what would be the correct way of doing that, my brain isnt braining
wet breach
#

could you add a plugin.yml to that test jar

#

just don't add the main class

remote swallow
#

im guessing i need a like += somewher

#

e

wet breach
tardy delta
#

replace is not going to do anything on its own

wet breach
#
String joinMessage = message;
    for (Map.Entry entry : BungeeCoreSpigot.validNameValues().entrySet()) {
        joinMessage.replace((String) entry.getKey(), (String) entry.getValue());
}
tender shard
#

epic, shall I continue my blog post about ACF, or continue the spigot-plugin-archetype?

tardy delta
#

joinmessage = joinmessage.replace ?

wet breach
#

you can't modify a string

tardy delta
#

i thought i was hallucinating

wet breach
#

So because you can't modify strings

#

you have to use another String object to hold what you modified

remote swallow
#

so probably acf

wet breach
#

@tender shard watch it be a bug with baseplugin

#

and it has been there because no one uses it all that much lmao

remote swallow
wet breach
remote swallow
#

ah'

wet breach
#

but fourteen answered it

tardy delta
#

not using {} 😠

remote swallow
#

i love my one liners

tardy delta
#

i never know whether only the line following directly is executed or what

remote swallow
#

thnaks

#

no other line can be

#

because it doesnt know that that is its line

tardy delta
#

i used to do else try {}

wet breach
tardy delta
#

ah

eternal night
#

at least by skimming at bit, there has not been a single different loader than the JavaPluginLoader out there.
In the commit that the PluginBase was introduced in, SimplePluginManager already checked for plugin.yml and JavaPluginLoader enforces JavaPlugin as a parent type

#

I'll see if it was added anywhere else

wet breach
#

Either it is a bug right now

#

or the functionality changed

#

in either case not like people really used it anyways

eternal night
tender shard
#

PluginBase obviously was an idea to introduce a way to create non-java plugins but nobody ever wrote any different plugin loaders

eternal night
#

that would be my guess yea

eternal night
#

that is an in memory plugin

wet breach
#

so I guess it does need a plugin.yml just doesn't require specifying the main

eternal night
#

wat

wet breach
#

I will find it, where it changed

tender shard
wet breach
#

or I will just wait for MD_5 later tonight

eternal night
#

okay 👍 it would have to be changed to and back

tender shard
#

basically the only reason why plugin.yml exists is to specify the main class

#

(yeah okay and name and version ofc)

eternal night
#

because the JavaPluginLoader required a JavaPlugin subtype

#

and that is the only loader, I don#t see what else would create the PluginClassLoader needed to attach a "lib jar" to the classpath

wet breach
#

no it being on the path as in in same directory

#

jars are on the path if they reside in the same directory as your application

#

due to how the JVM searches for it

eternal night
#

I-

tender shard
#

whut

eternal night
#

as I said, the server will complain about jars in the plugin directory if they are not valid plugins

#

you were talking about the plugin directory like, a few minutes ago

wet breach
#

I know

#

that hasn't changed

eternal night
#

Well, if you see md_5 down the line I guess ask them, I have no idea anymore what exactly you are talking about

remote swallow
#

@tender shard after almost 8 hours, join messages, chat formatting and it being mostly customizable is done. tomorrow i just have to add all the name varients and or their correct name or a hex for them

#

actually

#

8 hours

#

13 min

tender shard
#

will check it out later

#

today

#

is it on the server alr?

remote swallow
#

on the lobby atm

#

just pushed it to github, lmk of anything you want changing or i could add

#

i couldnt be bothered to add all colour names earlier so for now purple is replaced with a hex, darkblue for dark_blue

tender shard
remote swallow
#

ill add the rest when i wake up

tender shard
#

then next thing we need is to sync that PDC data (but only the simp/bungeecore tags) cross servers. either through mysql or redis

wet breach
# eternal night Well, if you see md_5 down the line I guess ask them, I have no idea anymore wha...

you don't need a classloader for a lib to be used by plugins in the plugin directory, therefore anything that was a PluginBase didn't need to be loaded by the server and were left alone without the server complaining that they were not valid plugins and all that fun stuff. Anyways obviously it seems that functionality has since broke, and who knows for how long since obviously barely anyone uses it, except I guess myself every once in a while

tender shard
#

the pluginclassloader is a URLClassLoader that only opens that one .jar file

wet breach
#

why would a lib need to be loaded by the server for plugins to use it?

eternal night
remote swallow
tender shard
#

where else would they come from, if not from the associated class loader?

humble tulip
#

maven shade plugin doesn't rename org.slf4j to my namespace

eternal night
#

i mean, I guess frost just used the fact that the classpath defaults to .

tender shard
#

the PluginClassLoader only checks in the plugin .jar file, or those loaded through the libraryclassloader associated to this plugin

wet breach
# tender shard where else would they come from, if not from the associated class loader?

classloader is just one way to tell the JVM where something might be at, its not the only way the JVM knows how to load a dependency you are asking for. If the classloader doesn't know, the JVM will do a quick search to see if its in 3-4 key directories one being where the application was started, then the libs directory for the JVM, and the other directories but also for the JVM can't remember their name

eternal night
#

and hence the JVM would allow you to access .jar files in folder you start the server in

#

but like, that logic has absolutely nothing to do with PluginBase

#

the server logic never knows anything about these files

#

there is 0 points in having a PluginBase

tender shard
wet breach
eternal night
#

if you are just shoving the jars into a dir that is on the classpath

#

what is the point of PluginBase then kekw

wet breach
#

does math require MC?

eternal night
#

no, but what is the point of PluginBase

wet breach
#

so the server didn't complain about it

eternal night
#

the server does not know about it

wet breach
#

also, you can implement your own PluginBase as well

eternal night
#

either you have it in the plugins folder and not the jvm classpath, then the server is responsible for loading it, which it uses the JavaPluginLoader for. This breaks for non JavaPlugin types even in the first commit PluginBase was added

#

or you have the jar on the classpath

#

at which point, the server will never complain about it

#

because it doesn't load it or interact with it

wet breach
eternal night
#

if you add it to the plugins directory, the server would have to load it which it cannot do unless you have a JavaPlugin as the JavaPluginLoader requires it

#

it does so rn and it does so back in the first commit

compact haven
#

how "configurationserializable" is ItemStack

eternal night
#

maybe in between it didn't for a bit and now it does again ?

#

seems off tho

compact haven
#

will it serialize enchants & other item meta like potion effects?

eternal night
#

Yea

wet breach
eternal night
#

okay 👍

wet breach
#

I wouldn't have brought this up otherwise

eternal night
#

looking forward to it

wet breach
# eternal night looking forward to it

you will however have to possibly wait till I am off work tomorrow or when its my day off, depends how much time I have to search and what not when I get off work as I work 10 hour shifts lol

#

but I am curious as to why this changed so I will look

eternal night
#

ah no worries

wet breach
#

day off starts Friday morning 🙂

#

so I have the weekends lol

#

monday - thursday nights is when I work, and since that is 4 days, I work 10 hour shifts to get my guaranteed 40 hours 😄

wooden hearth
#

Hey, dose anyone know how to setup Lilypad?

wet breach
#

it doesn't work anymore

#

you can only use it for 1.7 and below

river oracle
#

tf is Lilypad

wet breach
#

its a proxy

#

like bungee

river oracle
#

oh what xD

#

no wonder I wasn't around back in those days

wet breach
#

lilypad is a proxy written in GO

wooden hearth
wet breach
#

the author abandoned it when 1.8 came out

tender shard
wet breach
#

nice I guess?

tender shard
#

that means he's basically away from work since 2 months lol

tender shard
wet breach
#

if I call out sick I have to use my PTO if I want to get paid, but downside is I don't get my shift differential pay

humble tulip
# humble tulip

Used but slf4j still can't find any implementations to bind to. It works just fine when it's not relocated.

wet breach
#

lilypad required a plugin to be used as well on the server if I remember right

humble tulip
quaint mantle
#

hey is here i should ask for help or is it in help-server?

humble tulip
#

what ya need help with?

humble tulip
#

#help-server is for help with your server/plugin configuration

#

?paste

undone axleBOT
humble tulip
humble tulip
tender shard
humble tulip
#

i did

#

but when i relocate it i have issues

#

if i don't relocate it works fine

tender shard
#

just don't relocate it

#

are you using 1.16.5+?

tender shard
#

are you using 1.16.5+?

humble tulip
#

no

quaint mantle
# humble tulip what ya need help with?

i asked my friend he knew its bc i want to set the rest of my server up alone bc i wanna learn to setup servers and idunno how so i did not ask him until now

humble tulip
quaint mantle
tender shard
humble tulip
fair panther
#

Does anyone know the best way to setup bungeecord voting? I want rewards for each gamemode but when a player votes in a gamemode, it wont register in that server. Only the hub.

tender shard
# humble tulip yes

can't you somehow tell hikari to use spigot's log4j logger? that should definitely be possible - SOMEHOW lol

wet breach
tender shard
#

or tell it about your relocated slf4j, idk but this should also be possible somehow. BUt i have no clue how, righ tnow

humble tulip
#

used a transformer

#

and it does rename the file

molten hearth
#
[156 1 0 153 1 123 34 101 110 102 111 114 99 101 115 83 101 99 117 114 101 67 104 97 116 34 58 102 97 108 115 101 44 34 100 101 115 99 114 105 112 116 105 111 110 34 
58 123 34 116 101 120 116 34 58 34 65 32 77 105 110 101 99 114 97 102 116 32 83 101 114 118 101 114 34 125 44 34 112 108 97 121 101 114 115 34 58 123 34 109 97 120 34 58 50 48 44 34 111 110]``` does anyone know what the 156 and 1 mean? this is the response packet from a server, i thought the null byte would be on pos 0 but its on pos 2
humble tulip
#

um

#

wtf are u doing

#

convert to a byte[] and read it

molten hearth
#

?

#

why would I do that

humble tulip
#

what are u doing?

molten hearth
#

its already a []byte so

#

im just reading the response from a server

humble tulip
#

so you're imitating a client?

molten hearth
#

sure

humble tulip
#

or are you making a plugin and intercepting the packet?

molten hearth
#

im sending a request to a minecraft server to receive the server info

#

but I dont understand what the 156 1 are

humble tulip
#

like the motd etc?

tender shard
#

this is getting more and more cursed every day

molten hearth
#

the response is

#
�☺�☺{"enforcesSecureChat":false,"description":{"text":"A Minecraft Server"},"players":{"max":20,"on...```
humble tulip
#

so here's what u do

#
private static final int SEGMENT_BITS = 0x7F;
private static final int CONTINUE_BIT = 0x80;
public int readVarInt() {
    int value = 0;
    int position = 0;
    byte currentByte;

    while (true) {
        currentByte = readByte();
        value |= (currentByte & SEGMENT_BITS) << position;

        if ((currentByte & CONTINUE_BIT) == 0) break;

        position += 7;

        if (position >= 32) throw new RuntimeException("VarInt is too big");
    }

    return value;
}
#

and call readVarInt on your byte[]

molten hearth
#

oh right I forgot the varint stuff

humble tulip
#

that will give you the length of the response

#

yep

#

all strings are prefixed by a varint of it's length

molten hearth
#

I did read that but also its always confusing with the data types

wet breach
wet breach
humble tulip
wet breach
#

if you try to depend or impose a dependency that specifically targets a binding

hazy parrot
wet breach
#

it won't work and you can't have more then one binding on the class path

#

if you have 2 bindings on the classpath it will just result in not using one

#

that is what I read from the manual lol

humble tulip
#

can you explain what a "binding" is?

hazy parrot
#

binding to slf4j facade

#

and using your logger as implementation

humble tulip
#

i see

hazy parrot
#

or spigot logger in this case

molten hearth
#

oof the library I was using read the response and converted it to []bytes before I did other reading

wet breach
#

lol

humble tulip
#

how does slf4j find a logger?

wet breach
#

through the serviceloader

humble tulip
#

but won't that path change if i relocate it?

wet breach
#

or that way

hazy parrot
#

as frostalf said, you can have only one binding in class path

#

so if some other plugin do same thing, you will be in problem ig

wet breach
#

yeah, if you have 2 it simply won't choose one

#

and it will be as if there was none specified

humble tulip
#

but since the entire slf4j is relocated, won't it be considered separate?

hazy parrot
#

slf4j is just api

humble tulip
#

how will there be 2 bindings if i relocate it?

#

that's what i don't understand

hazy parrot
#

there wont be

#

if binding is not on org.slf4j.impl class path, it will not be used

#

you are relocating slf4j api if i saw right

#

have nothing to do with impl of facade

humble tulip
#

i think i understand

#

i'll just ignore this for now and work on the rest of my plugin in the meantime

wet breach
#

This is what the Devs of SLF4J have to say about bindings in libraries or frameworks

Basic rule Embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding/provider but only depend on slf4j-api. When a library declares a transitive dependency on a specific binding, that binding is imposed on the end-user negating the purpose of SLF4J. Note that declaring a non-transitive dependency on a binding, for example for testing, does not affect the end-user.
Embedded components such as libraries not only do not need to configure the underlying logging framework, they really should not do so. They should invoke SLF4J to log but should let the end-user configure the logging environment. When embedded components try to configure logging on their own, they often override the end-user's wishes. At the end of the day, it is the end-user who has to read the logs and process them. She should be the person to decide how she wants her logging configured. 
#

essentially you don't do it

hazy parrot
#

whoops

wet breach
#

So spigot should be the only application specifying the binding

#

everything else should abide by it

#

so, what you are trying to do is not impossible per-say

#

but also not supported as well lol

primal goblet
#

player#spigot#getHiddenPlayers is that will gives me when i use player#hidePlayer ?

sullen marlin
#

What do the docs say

#

But yes

primal goblet
#

i'll try it

final monolith
#

Gets a constraint violation using a maven compiled & shaded gson from different jars

tender shard
#

This is from the oracle docs about GridBagLayout. Do I have to worry about turning this into a constructor regarding this thread safety stuff, or does it matter whether something is in a constructor or method, regarding thread safety?

final monolith
#

Damn bro, i just wanna to add some libraries and do my plugins xD

atomic swift
#

i have this code and i get java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.meta.ItemMeta.hasDisplayName()" because the return value of "org.bukkit.inventory.ItemStack.getItemMeta()" is null even though that code isnt getting triggered and it will work if i have an item in my hand but if i dont nothing else will be parsed

            if (event.getPlayer().getEquipment().getItemInMainHand() !=null ||event.getPlayer().getEquipment().getItemInMainHand().getType() == Material.AIR) {
                ItemStack iteminhand = event.getPlayer().getEquipment().getItemInMainHand();
                msg=msg.replace("[item]", ChatColor.translateAlternateColorCodes('&', "&7[&6&l" + 
                        (iteminhand.getItemMeta().hasDisplayName() ? 
                                iteminhand.getItemMeta().getDisplayName() :
                                    iteminhand.getType().toString()) + " &8" + iteminhand.getAmount()
                                    + "x&7]"));
                }
tender shard
final monolith
atomic swift
#

and the item is null

#

or AIR

tender shard
#

the item is not null, otherwise getItemMeta() would throw NPE

atomic swift
#

i have no item

tender shard
#

why do you call getItemMeta() if you know that it's AIR? AIr can not have meta

#

just check if the item hasItemMeta()

atomic swift
tender shard
#

no

#

you do this:

#
if item is not null or if item is air:
  do sth
#

instead of || item == air,
you should do

#

&& item != air

final monolith
#

xD

tender shard
#

yeah lol

#

btw your IDE should actually shout at you for the if statement

atomic swift
tender shard
#

because the getType() == Material.AIR will NEVER be checked

atomic swift
#

the ide doesnt know that air is null

tender shard
tender shard
#

and if it's not null, then it would never check the second expression

tender shard
#

AIR is a material

atomic swift
#

ovi

final monolith
tender shard
#

what does ovi even mean lol

atomic swift
#

1.18.2

final monolith
#

dont forget the CAVE_AIR...

atomic swift
final monolith
atomic swift
#

ye

final monolith
#

🤔🤔🤔🤔🤔

#

🤷‍♂️

tender shard
#

as I already said, just check it the other way around

#
        ItemStack iteminhand = event.getPlayer().getEquipment().getItemInMainHand();
        if (iteminhand != null && iteminhand.getType() != Material.AIR) {
#

check if it's != null AND != air

#

instead of checking if it's != OR == air

final monolith
#
ItemStack iteminhand = event.getPlayer().getEquipment().getItemInMainHand();
if (iteminhand != null && !iteminhand.getType().isAir()) {
#

please

#

CAVE_AIR exists 😢

tender shard
#

yes but not in your inventory

final monolith
#

dude breaked my arguments

#

im gonna cry now.

atomic swift
tender shard
#

I'd just check if hasItemMeta

final monolith
tender shard
#
        ItemStack iteminhand = event.getPlayer().getEquipment().getItemInMainHand();
        if (iteminhand != null && iteminhand.hasItemMeta()) {
#

there's a thousand ways to properly check this

atomic swift
#

ye like i could use a while (true) loop

drowsy helm
#

No

final monolith
atomic swift
#

lol

drowsy helm
#

Please dont

atomic swift
#

i have before

final monolith
#

💀

final monolith
drowsy helm
#

Is this for a spigot plugin

#

You dont have to shade gson

#

For plugins

final monolith
#

i need the most updated gson version

drowsy helm
#

It’s in spigot runtime

#

Ah

#

Try a relocate

final monolith
#

already

drowsy helm
#

Oh I think it’s just a versioning issue

tender shard
#

this simple gui took me half an hour lol

drowsy helm
#

What feature do you need from latest?

drowsy helm
tender shard
undone axleBOT
humble tulip
tender shard
drowsy helm
#

Oh thats a bit better

#

Java ui libraries suck in general

humble tulip
#

wait is swing the jframe one?

tender shard
tender shard
#

y

humble tulip
#

oo looks sick

#

multimodule :)?

#

pls pls pls

tender shard
#

I could ofc add that too

humble tulip
#

i hate having to setup modules

#

pls do

tender shard
#

however that involves some nasty groovy scripts if I don't wanna create a second archetype for multi module

drowsy helm
#

Maven multimodule is easy

tender shard
#

still annoying to setup

drowsy helm
#

Still no clue how to use gradle

tender shard
#

same lol

humble tulip
#

is there an easier way to set maven stuff without actually typing out my pom?

tender shard
#

archetypes

#

as said

humble tulip
#

ah

#

ok

tender shard
#

I can now setup a new project for 1.18.1 remapped including ACF, ProtocolLib and WorldGuard within 4 seconds lol

humble tulip
#

ig u can have a multimodule archetype

humble tulip
#

i personally dont mind having 2 archetypes

tender shard
#

I just thought about it...

#

in 99.9% of cases, only the "core" module will need worldedit, worldguard, protocollib etc dependies right?

#

I mean, you wouldnt use worldedit in the version dependedant module

#

so the multi-module archetype could just use my existing one for the core module

#

with useNMS set to false

humble tulip
#

ye

tender shard
#

yeah easy

#

will do that tomorrow

#

first I'll finish this GUI thingy

#

if anyone has any ideas for useful dependencies i could add, please open an issue or PR

#

ir just tell me

#

whatever

humble tulip
#

how do i update intellij?

tender shard
#

using the jetbrains toolbox if you're on ultimate

humble tulip
#

and if not?

tender shard
#

otherwise it's in Help -> Check for updates I think

humble tulip
#

ty

final monolith
#

im getting a weird "error" now

#

maven shading sucks 💀

#

At the first jar

#

The same jar as a dependency

#

maybe if i use the same shadedPattern as pattern?

tender shard
#

ughm why do you do that

#

just dont add any relocation if you dont wanna relocate

final monolith
#

someone said me thats necessary for shading

tender shard
#

if you want to use gson in both things, then either shade it into the first one and use the shaded in the second one, or declare it as optional dependency

tender shard
final monolith
#

i will remove the relocations

#

and try

#

that seems to work

tender shard
final monolith
#

but how i can test if the plugin is using the library from my jar not the spigot's runtime library?

tender shard
#

however, to a DIFFERENT package name

#

e.g. com.google.gson -> my.package.shaded.com.google.gson

final monolith
#

oh ok 🙂 thanks

tender shard
#

np!

humble tulip
#

wtf is going on?

tender shard
#

show your interface

humble tulip
#

gonna invalidata caches and restart

#

its public

humble tulip
tender shard
#

weird IJ

#

yay the most important stuff is done, I can go to bed now

final monolith
#

show more about that Spigot Version

tender shard
#

you can enter any string there. if you accidentally use 1.19.0, it uses the correct 1.19. For everything above 1.17, it automatically uses mojang mappings and adds the remapping stuff.

final monolith
#

what about a select box?

#

with all versions

tender shard
#

this is also true for dependencies - if you add WorldEdit/WorldGuard, it uses latest version 7.x, if you're on 1.12 and below, it uses the latest version for those versions

tender shard
#

maybe I'll make a middle thing - it has some versions you can select, but you can also enter anything you like

final monolith
#

what about connecting it to a online server

#

with all these versions

tender shard
#

it's basically just a frontend for mvn archetype:generate

final monolith
#

i mean setResizable(false)?

tender shard
#

it's a GridBagLayout

final monolith
#

Amazing

#

im doing a new type of layout for my application that auto resizes all components to the frame's size

#

like...

100x100 frame contains 50x50 components
if i resize to 50x50 (the frame), components will be resized to 25x25

gleaming grove
rotund ravine
gleaming grove
river oracle
buoyant viper
#

what this

tender shard
#

gradle doesn't have archetypes

tender shard
buoyant viper
#

dam

buoyant viper
tender shard
#

that would not be very flexible lol

#

naaah gradle users chose the hard lives themselves

hexed falcon
#

what would i put as the teleport location?

tender shard
hexed falcon
#

well that would be 100 blocks in the direction i just raycasted but i don't have that location because the raycast hit nothing so therefore there's no block.

rotund ravine
#

Why are you raytracing twice

#

@hexed falcon

hexed falcon
rotund ravine
#

There’s these things

hexed falcon
#

thankyou

quaint mantle
#

?paste

undone axleBOT
quaint mantle
#

heres the code

#

any ideas?

rotund ravine
#

Also that code is useless

quaint mantle
#

right holdon

rotund ravine
#

DctrSpaceHelmCMD.spacehelm is null

tender shard
#

I don't think I'm using these futures right lol

rotund ravine
#

Looks fine

#

Have you checked out taskchain by aikar if it’s a plugin?

tender shard
#

no, but it's a standalone GUI app anyway

#

so I guess that won't help me 🥲

#

I think I'm using the futures wrong because e.g. when the extract fails in lines 50-57, then I throw an exception. Fine, but then it would still go the the next whenComplete in line 58. Ofc I could just check there if the "throwable" is null, but it seems kinda stupid to have to double-check this everytime. Isn't there something like "whenCompleteWithoutExceptionOrElsePropagateException(...)" or sth?

quaint mantle
#

oh

rotund ravine
tender shard
#

Me too, good night!

onyx blade
#

Hey, I was wondering if someone has an answer for me.

If I have the same spigot plugin running on separate servers and I am running bungeecord.

Can I send a forward message via sendPluginMessage and have a PluginMessageListener in the same plugin receive the message?

#

so Server A sends the message and Server B will receive it?

worldly ingot
#

thenAccept() accepts the result of the previous stage but only runs if no exception was thrown. Then at the end you can handle exceptionally(), which runs only if an exception was thrown and returns a new result

#
.startDownload().thenAccept(file -> {
    downloadDialog.setText("Extracting mvn.zip");
    logger.info("Downloaded Maven binary zip to " + file.getAbsolutePath() + ". Extracting...");

    try (ZipFile zipFile = new ZipFile(file)) {
        zipFile.extractAll(DATA_FOLDER.getAbsolutePath());
    } catch (IOException e) {
        throw new CompletionException("Could not extract Maven binary zip", e);
    }

    if (!file.delete()) {
        throw new IOException("Could not delete " + file.getAbsolutePath());
    }

    if (!new File()) { // Your maven thingy thing
        throw new IOException("Could not rename " /* etc. */);
    }

    downloadDialog.dispose();
    logger.info("Done");
});```
#

Then the caller can handle the exception if they want via .whenComplete() or .exceptionally(), but really Alex, all of your whenComplete() statements could be merged into just one statement

buoyant viper
worn tundra
#

😭

#

Are you fr

#

Oh no nvm its not

lavish hemlock
buoyant viper
#

o

lavish hemlock
#

I'd honestly recommend using NIO FileSystems for zip stuff, though

#

It's just more convenient since you can use Path as opposed to ZipEntry

#

The main issue is just that it's kind of hard to figure out how to get it to work?

topaz cape
#

bump

tawdry echo
#

How can i check if player connect using premium acoount

lofty laurel
#
if (!sign.getLine(3).equals("&5$6,000.00")) {
    event.getPlayer().sendMessage("test");
    return;
}``` have this for debugging and it sends test when i right click the sign. even tho the 4th line is set to that value
tawdry echo
#

You count from 0

#

3 is 4th line

lofty laurel
#

yes which is right

hybrid spoke
topaz cape
#

you too read the entire message

#

wait

#

i didn't understand the entire message

#

i did read just brain skill issue

hybrid spoke
#

no wait then you are right.

#

it shouldnt print test then, we are all blind

hybrid spoke
lofty laurel
#

yeah thats what im testing rn

topaz cape
#

that's what i meant first time

#

my brain

#

i forgot the § isn't & for a while there

lofty laurel
#

i always forget about the section sign since im so used to using the ampersand symbol lol

#

ah yes works now

#

ty

topaz cape
#

ChatColor#translateAlternativeColorCodes

topaz cape
tardy delta
#

you can always strip color

topaz cape
#

what does that have to do with anything smh

tardy delta
#

strip the colors and compare it with a normal string

humble tulip
#

@topaz cape print the channels after

#

To make sure yours is there

#

@topaz cape

#

Does the client time out after a while?

#

Sending the player a message means you send a packet which means you send a message which means you send a packet and on and on

#

Print to console instead

ashen quest
#

How do i place a schematic file from code?

humble tulip
ashen quest
#

O I need to use their api?

remote swallow
#

dont use fawe

#

use normal world edit

ashen quest
#

o

#

ty

humble tulip
remote swallow
#

all of us that dont want world exceptions

humble tulip
#

??

#

What are you talking abt?

ashen quest
#

what does fawe do differently from we

remote swallow
#

fawe = fast async world exception

#

fawe corruptes worlds

ashen quest
#

damn

#

ty

buoyant viper
#

they should call it FAWC

#

fast async world corruption

humble tulip
#

Why all the fawe hate?

remote swallow
#

but yes

#

that would be amazing

remote swallow
buoyant viper
#

it corrupts the soul 🧠 👁️

livid dove
#

2 questions:

-can you get a snapshot of a chunk without loading it

-whats the easiest way to find all tile entities in a snapshot as the method does not exist unfortunately

#

I am going to get the white whale that is "deleting every item of a certain type from the map from every chest" 😅

humble tulip
#

I'm pretty sure I said this before

#

Are you still trying to remove the items?

livid dove
#

You see you say thst but I've not seen one example of someone actually doing it

#

And yes

#

And I assume edit it,

#

Exactly

humble tulip
livid dove
#

Legend

humble tulip
#

Using those paired with a nbt viewer u shpuld be able to figure out how to delete your items

livid dove
#

My gosh this is gonna be a slog haha

This is what happens when people ruin the economy haha

Got over 30mil of gold blocks knocking around haha

remote swallow
#

why would you choose gold blocks lol

#

been as gold farms, duping, ect ect

livid dove
#

Gold ingots and the players are storing em as blocks.

We have an anti dupe system too

humble tulip
remote swallow
#

shat ap chicken dipper

livid dove
#

Hard

#

Difficult

humble tulip
#

Nt rly

livid dove
#

Difficult when ur on a deadline of this Friday haha

remote swallow
#

solid 4 days

#

thats enough time

humble tulip
#

You can get this done in 2-3 hrs

livid dove
#

Also have a big list of reworks to do lemme get the list lol

frank kettle
#

Did you expect a 5min answer?

#

For something you yourself said you never seen anyone doing

humble tulip
#

Get chunks

undone axleBOT
unkempt shuttle
#

can anyone assist I need help with setting the chat format on my plugin

humble tulip
#

Get nbt compoint

livid dove
#

-Operation OreRework / wipe
-Biome rework
-Portal implementation and Spawn rework to accommodate (Build Team + @RazielMartelus96 )
-XP rework (fishing, mining , furnaces) )

  • Work with Lore team to make an event for the release and wipe! (Lore team based , in progress / 80% done)
    -Upkeep Rework ( @RazielMartelus96 )
    -Finishing anti exploit / economy observation tool ( @RazielMartelus96 )
    -Find a cure for male pattern baldness (cause you know, im already pulling 5-10 miracles out of my ass, @RazielMartelus96 )
unkempt shuttle
#

when I set the format and send a message

humble tulip
#

Then get block_entities

unkempt shuttle
#

in console it appears with the message but not the format just the message

#

no username

humble tulip
#

Show code

unkempt shuttle
#

e.setFormat("%s:%s");

#

[16:44:27 INFO]: s

#

yes

#

ik

#

but the format in console does not appear

#
  • I don't think you should use event.getMessage() in that
#

because you can use %s %s

remote swallow
#

because the message would double up

topaz cape
remote swallow
#

yes

#

i was using it yesterday

humble tulip
#

Yes

unkempt shuttle
#

besides the point the format just doesn't exist in my console and no one else has this issue so idk what to do

remote swallow
#

use "%2$s" as the message

unkempt shuttle
#

Yes

remote swallow
#

yes

unkempt shuttle
#

yes

remote swallow
#

yes

humble tulip
#

If you set the format to include the msg and another plugin mdofies the msg

#

Wtf is gonna happem

#

:/

unkempt shuttle
#

and %1$s for player

humble tulip
#

Um

remote swallow
humble tulip
#

It's a format

unkempt shuttle
#

true

humble tulip
#

It's not supposed to include the message

unkempt shuttle
#

the default format works though like I can see my username in console without setting the format

#

but whenever I set the format to anything like e.setFormat("%s:%s"); it just wont appear it will only show the message

humble tulip
#

Yeah sure but when you create a chat filter plugin in the next 10 mnths and can't figure why it isn't censoring words you'll feel pretty stupid

remote swallow
#

inb4 you will

unkempt shuttle
#

you will

humble tulip
#

Ok smartass

unkempt shuttle
#

its been 2 hours

#

no

#

e.setFormat("%s:%s");

#

my laptop will go flat

undone axleBOT
unkempt shuttle
#

in a class

#

I know what pastebin is

#

or hastebin that makes your text disappear

remote swallow
#

thats md5bin KEKW (totally real)

livid dove
#

Oooo what about a cheat. Rather Rather mucking about with nbts.

Everytime a chunk is entered by a player it checks if the chunk has been given a "already been cleaned" tag (or some sort of list in a db or yml) if it hasn't, wipe it of the items and add the tag.

Should be a lot less demanding right?

unkempt shuttle
unkempt shuttle
#

where it wouldn't show the username in console while setting chat format

remote swallow
#

i had it show the name in console and no message

unkempt shuttle
#

hm

remote swallow
#

replacing my message placeholder with %2$s fixed it somehow

unkempt shuttle
#

weird anyway i'll have to debug it more later and my mind would go insane

remote swallow
#

thats why you parse stuff before you add itin

unkempt shuttle
#

yes the chat format works

remote swallow
#

and placeholder api only cares about %%

unkempt shuttle
#

in game

#

just not in console it only displays the message no username

humble tulip
#

Try

#

Ohh it works ingame

unkempt shuttle
#

yeah i did that

humble tulip
unkempt shuttle
#

ik its weird i'll setup a blank server and make a plugin for it see what happens

humble tulip
#

You can clean all the chunks while the server is offlime

unkempt shuttle
#

could be something interfering but if not i will

livid dove
humble tulip
#

It isn't hard to read nbt

#

But up to you ig

#

I can do it if u pay me 🙂

livid dove
# humble tulip It isn't hard to read nbt

Its having the confidence every single gold item in every single container of every single type (barrel, furnace , shulkers in chests etc) are all wiped clean of this item yknow?

#

Needs to be fool proof and absolute

humble tulip
#

Yep

#

Nbt is absolute

livid dove
#

But it's having the sanity check that it worked you get me?

humble tulip
#

You can do whatever you want

#

Directly modifying the mca files is the best way to go

livid dove
#

Aight cheers

humble tulip
#

?scheduling

undone axleBOT
humble tulip
azure gate
#

hey

#

pls help me

#

it is showing cannot cast the class

remote swallow
#

?stacktrace

undone axleBOT
tardy delta
#

?paste code then

undone axleBOT
tardy delta
#

im sorry im not awake lol

azure gate
#

i made 2 plugin with same code .

#

the forst plugin works

#

but same code doesnt work in 2nd plugin

remote swallow
#

you cant cast me.aman.epic.epiccore.EpicCore to su.nightexpress.excellentcrates.ExcellentCrateswhats sharekey.java line 27

hazy parrot
#

And I doubt that worked in another plugin

remote swallow
#

^^

tardy delta
#

class names should start with an uppercase character tho

hazy parrot
#

?conventions ig

azure gate
remote swallow
#

no it didnt

azure gate
remote swallow
#

is that a command?

azure gate
#

yes

remote swallow
#

what command do you type

#

with the args

azure gate
#

/sharekey <playername> <keyname> <amount>

#

and the keyname is the place were err arises

remote swallow
#

?paste the full method

undone axleBOT
azure gate
#

and i use tab autocomplete

remote swallow
#

paste the full onCommand method or class

remote swallow
#

well line 9 of that already wont work, args.length would be 3 for the command you just sent

azure gate
#

2nd plugin i get err althiugh same code

hazy parrot
#

So you are either using another version of your pl in the server or you didn't sent correct line

azure gate
#

there is no err in code

#

the same code works in another plugin

#

but when i made new plugin and started this err came

remote swallow
#

that error does not match up with the code you gave us, recompile the plugin, add it back to the server then find the error when it appears

quaint mantle
#

whats faster bukkit structures or FAWE/worldedit api?

tardy flame
#

None

remote swallow
tardy delta
#

once made the server crash with fawe

#

filling a 100 diameter sphere 💀

quaint mantle
#

maybe like 1-2m blocks ish?

remote swallow
#

well if its user provided you probably should use worldedit and their api, if its gonna be a set thing you can probably make bukkit structure for it

azure gate
#

now made simple

#

a event

#

now hope err can be identfied

#

a simple bucket empty event and it sends the data to us but it gives err

#

same err as previous

remote swallow
#

whats line 17 of Color.java

remote swallow
#

looks like an issue with excellent crates api

azure gate
buoyant viper
#

discord i just fucking opened this link 2 seconds ago?...

remote swallow
#

discord isnt smart

#
  • you are a disgrace
#

how could you use lightmode

azure gate
remote swallow
#

look at the code

eternal oxide
#

looks like he's trying to cast his main class to ExcellentCrates

azure gate
azure gate
eternal oxide
#

We need to see code

azure gate
#

ok

remote swallow
#

make the scope provided not pr

#

for excellent crates

azure gate
#

how. the same code works in m 2nd test plugin but when i made new plugin its not working

remote swallow
#

do you depend or softdepend on excellent crates

#

in plugin.yml

azure gate
#

how can this be done

remote swallow
#

add ExcellentCrates to the depend section in plugin.yml

#

if it isnt their create it

azure gate
#

ok trying

#

but my test plugin work without depend or softdepend

azure gate
remote swallow
#

?paste your plugin.yml

undone axleBOT
azure gate
remote swallow
#

your colon is in the wrong plaace

azure gate
#

trust e]me

#

meits not

remote swallow
#

no it isn

azure gate
#

dpend

remote swallow
#

that will not work

azure gate
#

my test plugin work without depend

remote swallow
#

move the colon to be at the end of the d

#

not a space between

azure gate
#

same err

remote swallow
#

is the plugin actually on your server

azure gate
#

yes it is

robust zenith
#

hey everybody, there is a way to move an entity and get it walks from point a to b? and when it reaches point b it does an action?

azure gate
buoyant viper
#

yeah i dont like how that redirects

unkempt peak
quaint mantle
#

Is there a way to set normal png skin to a player

#

Without needing mojangs database

#

?

#

I want to set a 128x128 skin

eternal night
#

concerning you don't have the signature needed to sign the skin texture I don't think you'll have much success

tender shard
tender shard
remote swallow
#

morning alex

#

its very early

tender shard
#

thenAccept is was what I was looking for, thanks!

tender shard
tender shard
remote swallow
#

oh god its 1pm already

hybrid spoke
#

2*

quaint mantle
#

Why???

tardy delta
#

hover over it

#

its String[] args not int[]

quaint mantle
#

thx <3

iron palm
#

why am i getting this error on maven reload ?

'java.util.Collection org.jetbrains.idea.maven.server.MavenServerEmbedder.resolveProject(java.util.Collection, java.util.Collection, java.util.Collection, org.jetbrains.idea.maven.server.security.MavenToken)'```
tender shard
#

why don't you send the full stacktrace

iron palm
remote swallow
#

doubt

tender shard
#

it's not

#

you just have to open the full log

undone axleBOT
remote swallow
#

whats chest manager

wet breach
#

if its a double chest don't you need only one side to set it open?

#

if I had to guess it would be left side for that

remote swallow
#

does markAsOpened just track what chests are open?

wet breach
#

sorry I read your question wrong

#

thought you were trying to set the chest as opened

#

XD

remote swallow
#

sysout the location, it might be that which is off

vale ember
#

but double chest class doesn't implement block state. how would instanceof check pass?

#

state instanceof DoubleChest doubleChest

tender shard
#

check if it's instanceof Chest. If yes, check if the Holder is instanceof DoubleChest

vale ember
#

cast it to chest, get block inventory and then holder ig

tender shard
#

obviously not, but on Container. Which Chest extends

#
if(blockState instanceof Chest chest) {
  if(chest.getHolder() instanceof DoubleChest doubleChest) {
    // it's a double chest
#

null check isn't needed btw

vale ember
#

there aint getHolder on chest

tender shard
#

oh yeah then you also have to get the inventory, then get the holder

wet breach
#

why are doing an instanceof on a block with blockstate?

tender shard
#

do NOT use getBLockInventory(), but just getInventory

wet breach
#

shouldn't it be if (block instanceof Chest chest)

tender shard
#
        if(blockState instanceof Chest chest) {
            if(chest.getInventory().getHolder() instanceof DoubleChest doubleChest) {
#

this should finally be correct lol

#

getBlockInventory() would only return the inventory of this single chest, while getInventory() should return the combined inv

#

from "Chest" interface

vale ember
#

should i use bukkit logger or console sender to print out update info?

tender shard
#

it's actually more or less the same

#

I use the logger if it's an automatic message. if the console / admin manually checks for updates, I use the command sender

#

in the console, both looks the same though

#

so I guess it doesnt matter

vale ember
#

k thx

primal goblet
#

i have 1vs1 (Duels) game, and i need to make a map system to generate the selected arena for the players what the best idea for this situation?
(without worldedit)

tender shard
#

I do use the ConsoleSender, and not the logger

#

huh whatever, it doesnt matter

primal goblet
primal goblet
#

is this will work with spigot 1.8.x?

tender shard
#

Ofc not

#

It was added when structure blocks got added

primal goblet
#

i have an idea but idk if this will kill the server memory..

#

i have an map contains all the arenas and this folder is made like a template
so when a player duels other player the map (template) copies the files to other directory with dummy name like asda_123213213
and load the world then teleport the players and when the game ends i delete the world
@tender shard do u think its a good solution?

vale ember
#

is using Plugin#getDescription#getVersion in async task thread-unsafe? ik it says that i shouldn't use any bukkit api in async tasks but this cases seems questionable

lethal knoll
#

Is there an interface for mobs being sizeable ?

vale ember
lethal knoll
#

Well, I would need a simple way to check if a mob can be resized

primal goblet
#

yeah thats will work normal but the players may play the same arena so i have to duplicate the arena many times, i tried but i don't found the best solution.. @last temple

lethal knoll
#

such as a giant, slime, magma cube, etc

remote swallow
#

giant is a different mob to a zombie

lethal knoll
#

Hmm

#

Phantom also has it it seems

vale ember
#

yeah indeed but all of those methods are declared directly in interfaces, so no

lethal knoll
#

Well yea, in that case, it's only 2 mobs, I can just type check it

#

That's unfortunate, but yea, for just 2 mobs it wouldn't make sense

#

Aight, thanks

remote swallow
#

collectiont thing?

hasty prawn
#

You're allowed to re-create anything afaik

#

As long as you're not straight up yoinking their exact code

hybrid spoke
#

the whole design is minecraft anyways

hasty prawn
#

I mean they probably could send you a cease and desist I suppose but Hypixel probably doesn't care lol

hybrid spoke
#

how could they

#

as long as they have no patent on that

#

which i doubt

#

you are gtg

remote swallow
#

unless they copyrighted or trademarked it they cant

hasty prawn
#

Who knows if they have though

#

It's a possibility PeepoShrug

remote swallow
#

check their website

hybrid spoke
#

just steal it, put a patent on it and sue tf out of them

remote swallow
#

they probably have to disclose it

hasty prawn
#

I mean that's usually the motive behind most copyright claims but it doesn't have to be

hybrid spoke
#

more like they would only care if you would earn money with it

slow arrow
#

whats the point of Enchantment.getStartLevel()?

#

don't all enchantments start at level 1?

remote swallow
#

custom enchants maybe

slow arrow
#

yea, im doing that right now
i just saw that and it confused me

#

I can't think of any use case for that lmao

remote swallow
#

if soem custom enchant starts at like level 234

slow arrow
#

ikr

hasty prawn
#

Someone must've just been bored when they added that lol

slow arrow
#

"ah, yes. Let's throw this versatility in there to confuse the developers"

keen mantle
#

Any good websites where you can learn java basics for free?

slow arrow
#

codecademy
w3schools
youtube tutorials

eternal oxide
#

?learnjava

undone axleBOT
slow arrow
#

oo fancy

undone axleBOT
slow arrow
#

i concede

remote swallow
#

?stacktrace i made imajin add this yesterday

undone axleBOT
keen mantle
keen mantle
#

yt tutorials be like: lets learn what is variable, after 5 hours, lets learn what is class

hybrid spoke
#

?gtfo

#

and this

keen mantle
#

w3 is good for revising instead

remote swallow
keen mantle
#

thnx to a dude who sent about codeacademy seems to be good learning website

keen mantle
#

fr

tender shard
#

I also love how they spend half an hour installing intelliJ

#

like fr, people who want to learn coding should at least know how to install a program

slow arrow
#

true

keen mantle
#

all stuff java basics yt tuts told me, is known by me like 5 years ago from school computer classes

hybrid spoke
#

lets make an official SpigotMC programming tutorial series

keen mantle
#

i think its better to learn java basics first than going into spigot api

hasty prawn
#

It is