#help-development

1 messages · Page 1408 of 1

sage swift
#

that'll only give you a max of 80...

eternal oxide
#

No your thread continues after scheduling the async task

torn oyster
#

oh lmao

#

o wait it is 25

viscid oasis
torn oyster
#

would * 12.5 work

eternal oxide
torn oyster
#

@sage swift which multiplier would make the max 20

sage swift
#

what

torn oyster
#

i wanna make animals max 20

viscid oasis
torn oyster
#

and monsters max 80

#

and bosses automatically 100

sage swift
#

so multiply to 20

#

...

wanton cipher
#

any1 know how to make somthing like this?

sage swift
#

deluxemenus, lol

eternal oxide
#

basically you are jumping back sync using the scheduler

torn oyster
#

level = (int) (Math.min(2, Math.abs(rand.nextGaussian())) * 5);

eternal oxide
#

scheduler.callSyncMehod

viscid oasis
eternal oxide
#

yes

viscid oasis
eternal oxide
#

There are other ways, like Futures, but thats the no frills

wraith rapids
#

just keep in mind that anything you schedule to happen on the main thread doesn't happen now

#

it happens at the start of the next tick

#

meaning that blocks of code that you want to run synchronously will run after the blocks of code below them, despite being higher up

viscid oasis
eternal oxide
#

yes

wraith rapids
#

Aikar iirc wrote something that is intended for this purpose called task chain

#

which is a more abstracted way of hopping off and back on the main thread

viscid oasis
#

I just dont want to hang the main thread with sql query for every player, when someone ejecting money from atm 😄

#

thanks for the help @eternal oxide btw, really appreciate it 🙂

wraith rapids
#

point is that the execution order of

public void runMeSync() {
    //do sync stuff here (1)
    Bukkit.getScheduler().runAsync(() -> {
        //do async stuff here (2)
        Bukkit.getScheduler().runSync(() -> {
            //do sync stuff here (3)
        })
        //do more async stuff here (4)
    })
    //do more sync stuff here (5)
)

is 1,5,3,4,2

#

so keep that in mind

viscid oasis
#

got it

#

thanks :¨)

#

🙂

wraith rapids
#

paper's async chunk api is an interesting entry point to doing stuff off the main thread

#

since their chunk futures are always completed on the main thread

wanton cipher
#

any1 can help to make something like this?

sage swift
#

holy shit i told you

#

use deluxemenus

paper viper
#

i think he is referring in code?

#

or did I not see the history

sage swift
#

and im telling him he doesnt need to

paper viper
#

..

sage swift
#

he's looking for a way to sell ranks for in-game money

wraith rapids
#

lol

paper viper
#

"we do a little bit of trolling in this discord"

ivory sleet
#
Bukkit.getPlayer("PulseBeat_02").openInventory(((Supplier<Inventory>)()->{
  Inventory inv = Bukkit.createInventory(null,"Ranks",9);
  for (int i = 0; i < 5; i++) {
    inv.setItem(i+2,new ItemStack(Material.NAMETAG));
  }
  return inv;
}).get());

@wanton cipher yw for the worst code to exist 😄

wraith rapids
#

because i fucked up the order

#

indents are hard

#

1,5,2,4,3

sage swift
#

why did the chicken cross the road

wraith rapids
#

egg

quaint mantle
#

Does anyone have a Util for getting someones name for bungee.

sullen marlin
#

getName ?

crude lotus
#

will I get restricted from spigot if I edited my current resource to be premium, which is technically impossible and now it's waiting for approval?
it even has a external download link, which is also not possible with premium resources

#

I can show you how I did it if it's considered a bug

quaint mantle
#

No, Like for ProxyPlayer to be not null. The player need's to be in the server. I have the UUID stored in my database, I just need to use the UUID to get the name of the person.

wraith rapids
#

call mojang api

quaint mantle
#

Yeah Ik I was wondering if some one had one made?

eternal night
#

google has like 4

quaint mantle
#

Ight

chrome beacon
#

That one looks nice

kindred trellis
#

how can i remove just one item from inventory?

eternal oxide
#

find the item and reduce its stacksize by 1

wraith rapids
#

paper has nice utility methods like subtract and add on itemstacks

kindred trellis
#

bout how to code it 🤣 ?

eternal oxide
#

I suggest Java

wraith rapids
#

inv.set(i, inv.get(i).subtract())

kindred trellis
#

like i have my plugin but this is last thing i need to do

eternal oxide
wraith rapids
#

get rekt

eternal oxide
#

up ya bum 🙂

mortal hare
#

im still confused about L1, L2, L3 CPU cache. For example if i get the itemstack reference through the method in another thread, can it cache reference (pointer adress) in that cache or it would get it straight from L3 cache

#

so fucking confusing

wraith rapids
#

yeah it's basically rocket science

mortal hare
#

there's so much little information about it in technical depth

#

all i can find is simplified version of that shit

#

without explaining it in depth :/

vital ridge
#
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
        manager.addPacketListener(
                new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.WORLD_PARTICLES) {
                    @Override
                    public void onPacketSending(PacketEvent e) {

                        Player p = e.getPlayer();
                        WrapperPlayServerWorldParticles packet = new WrapperPlayServerWorldParticles(e.getPacket());
                        
                        if (packet.getParticle().getParticle() == (Particle.REDSTONE)) {
                            
                            Location particleLoc = new Location(p.getWorld(), packet.getX(), packet.getY(), packet.getZ());

                            if (p.getLocation().distance(particleLoc) >= 10) {
                                
                                System.out.println(particleLoc);

                                e.setCancelled(true);

                            }
                        }

                    }

                });

Yo can anyone help me and tell me why particleLoc is returning all 0 cords?

mortal hare
#

square root is expensive

#

that way its more optimised

#

idk why it returns like that

wispy monolith
#

I don't need to add an else statment to an if statment if I want it to do noting when it doesn't match the if rule, right?

eternal oxide
#

correct

wispy monolith
wraith rapids
#

that's called actionbar iirc

dusk flicker
#

ye

eternal oxide
#

ChatMessageType.ACTION_BAR

wispy monolith
novel hornet
#

Why is my plugin not showing up

eternal oxide
#

your servers latest.log will tell you

viscid oasis
#

Thanks @eternal oxide and @wraith rapids , the sync from async works flawlessly 🙂

obtuse basin
#

Is there a way removing config sections from yamlconfiguration? also like ```
fun delmember(world: String, uuid: String): Void? {
val ccfg: File = File("world//" + world + "//world.yml")
val cfg: YamlConfiguration = YamlConfiguration.loadConfiguration(ccfg)
cfg.remove("- ", uuid)
try {
cfg.save(ccfg)
} catch (e: IOException) {
e.printStackTrace()
}
return null
}

wispy monolith
#

What does website in plugin.yml do?

eternal night
#

simple metadata printed in timings and version command

unique spindle
#

hey, i am getting this error when I am trying to compile buildtools 1.8.8

        at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:585)
        at org.eclipse.jgit.api.Git.open(Git.java:93)
        at org.eclipse.jgit.api.Git.open(Git.java:73)
        at org.spigotmc.builder.Builder.main(Builder.java:303)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)```
I am using the command `java -jar BuildTools.jar --rev 1.8.8` in Git with the directory pointed to where `BuildTools.jar` is located.
eternal oxide
#

take the folder off your desktop to somewhere like c:\buildtools

#

put buildtools in that folder adn run it in a command prompt

unique spindle
#

alright

obtuse basin
sage swift
#

huh

#

setting it to null should remove the ConfigurationSection entirely

unique spindle
sage swift
#

what does this mean

#

we will never know

eternal oxide
unique spindle
#

Should I just install java 8 then?

obtuse basin
wraith rapids
#

no, it removes the configurationsection

#

keys with null values are not written to the file by the bukkit config api when saving

#

so anything that is null gets omitted entirely

eternal oxide
#

not quite

#

you can add a list containing nulls and it will be inserted

unique spindle
#

@eternal oxide now i have the spigot 1.8.8 jar, how would i import / add it into intellij?

unique spindle
#

yes

eternal oxide
#

then you don;t import it. You add the entries in your pom

unique spindle
#

alright, but i don't have to add it into the project?

eternal oxide
#

no

wraith rapids
#

a list is not a key

unique spindle
#

alright thanks

eternal oxide
sharp bough
#
  @EventHandler
    public void onInvClose(InventoryCloseEvent event){
        System.out.println("test");
        if(event.getView().getTitle().equals(getTitleName())){
            System.out.println("test1");
            Player player = (Player) event.getPlayer();
            new TeleportPlayerToDefaultLocation().TeleportPlayer(player);
        }
    }```
this returns null?
#

isint event.getPlayer the player?

stone sinew
sharp bough
#

thats not a thing

#

hahaa np

#

and event.getPlayer.getName doesnt work

#

cuz its a string

stone sinew
#

debug it. It should return the player.

#

Your TeleportPlayer method might be the one being null

sharp bough
#

i get CraftPlayer<name=Paradis120202>

#

Player player = (Player) event.getPlayer();
System.out.println("test2 " + player);

#

doing that

stone sinew
#

Line 20 of teleport player

sharp bough
#

Location loc = new Location(Bukkit.getWorld(getWorldRespawn(spawnLocation)), getXRespawnLocation(spawnLocation), getYRespawnLocation(spawnLocation), getZRespawnLocation(spawnLocation));

stone sinew
#

getWorld is null

sharp bough
stone sinew
#

Caused by: java.lang.IllegalArgumentException: Name cannot be null
at me.paradis.main.TeleportPlayerToDefaultLocation.TeleportPlayer(TeleportPlayerToDefaultLocation.java:20) ~[?:?]

sharp bough
#

yea name of the world

#

but thats fine right

#

i get the string

#

and then the world of the string

#

using Bukkit.getWorld(String)

paper viper
#

is the world loaded?

sharp bough
#

yea

#

respawnLocations:
'1':
world: world
X: -210
Y: 64
Z: 259
'2':
world: world
X: -210
Y: 64
Z: 254

stone sinew
#

Debug it. bukkit.getworld is saying the name is null.

is the world loaded?
Check for this to.

sharp bough
#

but its the normal world

#

its right next to me

#

i debuged the name of the world and i do get null for some reason

stone sinew
sharp bough
#

let me check

stone sinew
#

get() returns an object

sharp bough
#

is there a reason it could be running multiple times?

#

the inv close event

stone sinew
sharp bough
#

yea but i dont have a single loop

stone sinew
#

Can you show your code?

sharp bough
#

CloseInventoryEvent

#

TeleportPlayerToDefaultLocation

#

AddRespawnLocation

stone sinew
#

The only thing I can think of is maybe you registered the listener twice.

#

Like you used /reload

sharp bough
#

i didnt and even if i did that it would only run twice

stone sinew
#

I'm not seeing a reason it would run multiple times based off that code then sorry.

glossy scroll
#
    boolean equalsCommon(CraftMetaItem meta) {
        if (!super.equalsCommon(meta)) {
            return false;
        }
        if (meta instanceof CraftMetaSkull) {
            CraftMetaSkull that = (CraftMetaSkull) meta;

            // SPIGOT-5403: equals does not check properties
            return (this.profile != null ? that.profile != null && this.serializedProfile.equals(that.serializedProfile) : that.profile == null);
        }
        return true;
    }``` ???
#

running latest version

#

the only time that profile and serializedProfile are written to is here

#
        this.profile = profile;
        this.serializedProfile = (profile == null) ? null : GameProfileSerializer.serialize(new NBTTagCompound(), profile);
    }```
#

so idk why im getting the NPE

#

nevermind

#

reflection

#

used somewhere else

sharp bough
#

so i added this

#

if(spawnLocation == 0) spawnLocation =1;

#

and it broke my server lmao

#

thers a constant loop for some reason

#

until it brakes

#

is there some kind of bruteforce stop?

#

not return

#

if i add return on inv close event it says unnecessary

sage swift
#

you have a plugin named Main

#

why

summer scroll
#

How can I create an object that has unique ID everytime I create a new instance and also I want to save and load them on config.

sharp bough
#

save it and load it in the sql database

#

lol

sage swift
#

UUID should have a static method

summer scroll
#

i want it to save it to yml config

#

cuz it has location and it's easier there

sage swift
#

lucas, the reason it's looping (i think) is because the InventoryCloseEvent is called before the inventory is actually closed

#

so when you teleport the player with the inventory open, it closes the inventory and calls the InventoryCloseEvent again

#

to solve this, put it in a task

#

Bukkit.getScheduler().runTask(plugin, () -> player.teleport(location));

sharp bough
#

oh

#

you are right

#

i did add a player.closeInventory

#

but that calls the event

#

and the event closes the inventory

sage swift
#

delays the teleportation until the inventory is closed

sharp bough
#

adding arrows to coding feels like adding letters to math

#

lol

#

it works thanks

summer scroll
sage swift
#

well counterId will reset to 0 every time

#

if anything, store it in the yml file too

sharp bough
#

why dont you want to storage it in the yml file tho?

summer scroll
tranquil viper
#

is there a way to cancel jumps?

sharp bough
#

on jump event ?

#

nvm theres no such thing for some reason

dusty herald
#

There is with Paper API

tranquil viper
#

well im using spigot :/ is there a way to get that?

dusty herald
#

you'd have to do it the old fashioned way and I don't know how DogKek

#

i disabled jumping in my mc server /s

tranquil viper
#

xd

#

im trying to make a freeze plugin sorta thing and the simplest way I have found to do it under my circumstances is to give the player slowness infinite

sharp bough
#

i remember once i saw a guy doing something like player.setSpeed 0

#

you cant do anything

#

i think it was from some plugin

#

i have no idea i saw it years ago

#

but you could jump walk run anything

#

you could cancel the PlayerMoveEvent

#

i think that stops the jumps too

tranquil viper
glass pike
#

Any of y'all trying to help me do a school project for some cash?
It requires me to write Java code and I totally am blanking out rn, Need all the help I can get.... xD

tranquil viper
#

and it just bugs a lot

hollow river
#

hey so ive read up on NMS and i kinda want to use it because of the detailed mob customization but heard there were downsides too, should i use it and why?

#

im working on a custom mob arena with levels/waves etc and want to make bosses etc.

vernal basalt
#

how do i fix this

glossy scroll
#

and if you use obfuscated code you may have ot update it

#

so its not ideal for public plugins, unless you make a pretty good reflection utility (or use someone elses)

hollow river
#

i read stuff about methods being a.b(c,f) and stuff like that, is it readable?

glossy scroll
#

sometimes depending on what you want you have no choice to

#

this (for the most part) is accurate

hollow river
#

yeah i would love to experiment with spiders's ability to climb walls etc.

#

that looks pretty neat, i'll look into it and probably start using it and try it out!

glossy scroll
#

id say avoid it as much as you can

#

but yes there are very cool use cases

#

especially when it comes to pathfinding and mob behavior

hollow river
#

so i think the best way of using it is to use both spigot and nms where applicable then?

#

and so nms is basically the methods that spigot puts readable wrappers around and unlocks more options right?

young knoll
#

I mean

#

You are suppressing any null errors

candid galleon
#

catch (NullPointerException e) { return; } gotta love that

young knoll
tranquil viper
earnest junco
#

just try catch the entire plugin eZ bug free

young knoll
#

You may be able to just explicitly pass a negative int to the method

#

Never tried

candid galleon
#

that'll probably throw an invalid arg error

#

just my guess

young knoll
#

But > 128 will overflow to negative, which stops jumping

#

Gives me a good idea for a challenge to add to my plugin as well

crude charm
#

but ik its

#

dumb

#

idk why I did it

candid galleon
#

do you like knowing what's wrong with your code?

crude charm
#

no

#

I hide it

#

block it out

#

dont wanna hear it

limber dust
#

but when theres a error it means somethings wrong XD

#

so it should be fixed not hidden

#

XD

candid galleon
crude charm
#

😦

candid galleon
#

"why isn't this working" is synonymous with "what's wrong with this"

crude charm
#

guys why is my code not working

if player can fly

report player

else

do something idk what
end;
candid galleon
#

who here types fast

quaint mantle
#

you are missing indent

crude charm
#

hmm still not working

quaint mantle
#
if player can fly
    report player
else
    do something idk what
end!
novel hornet
#

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class Commandss implements CommandExecutor {
    
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        
        if (cmd.getName().equalsIgnoreCase(anotherString: "createPant")) {
        Player player = (Player) sender;
        player.getInventory().addItem(me.mrpiedot.PantsThatPoopTnt.items.items.TntPants);
            
        }
    }

}
for some reason I'm getting a error saying anotherString cannot be resolved in a variable```
crude charm
#

its not working

candid galleon
#

@novel hornet please use a paste site or ``` ``` to format the code

quaint mantle
#

even the scream at the end?

crude charm
#

i REMOVED IT

#

but no errors

#

im going to cry

candid galleon
#

anotherString you aren't declaring a variable named anotherString anywhere in your code

young knoll
#

anotherstring: “createPant”?

#

What is the anotherstring part about

#

Java doesn’t let you do that sadly

novel hornet
candid galleon
#

anotherString: is probably IntelliJ?

novel hornet
#

Oh

#

nvm

#

i use Eclipse so how would i do it on there

earnest junco
# crude charm code: https://paste.md-5.net/giwerulove.cs issue: https://gyazo.com/12f05057357...

if (!(event.getAction() == Action.RIGHT_CLICK_BLOCK) || !(event.getAction() == Action.RIGHT_CLICK_AIR)) return;
That needs to be && not ||, otherwise the statement will always be false
Also you want to use ... != ..., not !(... == ...).

if (player.getItemInHand().getType() == null) return;
This is complete nonsense. The type is an enum and can't be null.

if (!player.getItemInHand().getItemMeta().getDisplayName().equals(CC.GREEN + "Toggle players " + CC.GRAY + "(Right Click)")) return;
if (!player.getItemInHand().getItemMeta().getDisplayName().equals(CC.RED + "Toggle players " + CC.GRAY + "(Right Click)")) return;
Having these after each other is nonsense. The second part is basically unreachable.

crude charm
young knoll
#

I know your ide will tell you the name of the parameter

crude charm
#

or am trying to

novel hornet
young knoll
#

But it shouldn’t be inserting that name

candid galleon
#

remove that part @novel hornet

#

the anotherString:

young knoll
#

Java doesn’t have passing parameters by name

#

Because it doesn’t need it, but still

novel hornet
candid galleon
#

learning Java :D

#

knowledge

young knoll
#

Replace it with nothing

#

Just the string

sage swift
#

what is a strang??

#

stringer things?????

summer scroll
#

This line, player.teleport(project.getLocation());.

young knoll
#

The world in the location is null

#

May have been unloaded

summer scroll
#

oh

#

It's a world from multiverse core.

#

May need to depend on that

#

or softdepend at least

#

thanks

young knoll
#

Softdepend doesn’t change load order iirc

summer scroll
#

point 4

young knoll
#

Don’t remember who told me that ¯_(ツ)_/¯

quaint mantle
#

How do I use this? It's in different class than the main class.

fallow geode
#

what

quaint mantle
#

it say cannot resolve

young knoll
#

You learn about object oriented programming

fallow geode
#

create an instancee of your

#

yeah

young knoll
#

And pass an instance of your main class around

#

Or pass the config itself if that’s all you need

#

Don’t create a new instance of your main class

fallow geode
#

i dont even think youre allowed to

young knoll
#

Correct

woven spear
#

How do i get the dependency net.minecraft.server.v1_16_R3? I have a plugin that im trying to decompile, and im missing this dependency. I use Maven, so i have every other dependency added except for this one.

young knoll
#

Run buildtools for that version

#

switch spigot-api to spigot

quaint mantle
#

Demo main = new Demo();

#

like this?

#

main class name is Demo

#

ok it says
java.lang.IllegalArgumentException: Plugin already initialized!

sage swift
#

hmm yes create another instance of your plugin

#

what you want to do is something called a dependency injection, where you pass the main already existing class to other classes for use

quaint mantle
tranquil viper
#

Also why would you send the player the getConfig() method lol

quaint mantle
#

:? its a message in the config file

#

I wanted to send string in the config to player

tranquil viper
#

Ah

sullen dome
#

Try learning basic java before trying to do spigot plugins
am i at the spigot-forums? lol

tranquil viper
#

Ok that makes more sense lol

sullen dome
#

when having a problem at the forums, 90% of time, the answers are just learn java

#

so just a joke from me

tranquil viper
sullen dome
#

thank you

tranquil viper
#

Real kneeslapper

young knoll
#

I mean, I assume it’s often a fair answer

sullen dome
#

i mean...

#

most of time, people just dont know what to say, but they want to say something

tranquil viper
#

I feel like people say learn java but then never explain how

#

Like

#

I feel like it would be better if we told people HOW to learn java

young knoll
#

Use the internet

tranquil viper
#

Cause some ppl just don’t know

young knoll
#

It has more tutorials than I have brain cells

#

Although to be fair, 2 isn’t that many

tranquil viper
#

Lol

sullen dome
#

i mean yeah, there was this guy didn't knewing why his code was giving errors, while he didnt used semicolons
in this case he has to learn java, really... but...

#

that are 1% of the "problems"

tranquil viper
#

Debatable

#

If he knew about constructors and oop he wouldn’t have asked that question

#

Literally 99% of problems are basic lack of java knowledge

sullen dome
#

it's always easier to just ask, instead of reading hundreds of sites

#

i mean, i can't say anything, i wasn't better lol

quaint mantle
young knoll
#

You don’t

#

You pass the instance you already have

quaint mantle
#

but I don't have

young knoll
#

You do

#

In your main class you have this

grand magnet
#

Hey can somebody help me by that: java -Xmx1G -jar spigot.jar
Der Befehl "java" ist entweder falsch geschrieben oder
konnte nicht gefunden werden. (German)

young knoll
#

Do you have java installed

#

And is the JAVA_HOME environment variable set

sage swift
#

only java_work is set :(

quaint mantle
#

so I made a object in main class sDemo main = new Demo();
now how do I pass it in another class?

#

you could do it like that

torn oyster
#

how would i change the distance that an entity's customName would show

#

all livingentities are called [Lvl. Level] MobName

#

and i dont want to look down

#

and see nothing but nametags

#

underneath the ground

mortal hare
#
class TestClass {
    public Object object = new Object();
}

public class Test {
    private static TestClass test;


    public static void main(String[] args) throws InterruptedException {
        test = new TestClass();

        Thread readerThread = new Thread(() -> {
            while (true) {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(test.object);
            }
        });
        Thread writerThread = new Thread(() -> {
            while (true) {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                test.object = new Object();
            }
        });
        readerThread.start();
        writerThread.run();
    }
}

so i have this class for testing read writes of two threads

#

don't mind how bad this looks this is just a test

#

why these threads values, which are changed are not cached inside LM CPU cache?

#

output from reader thread which reads data asigned by writer thread:

java.lang.Object@b04089e
java.lang.Object@35b13d4b
java.lang.Object@1b45ade7
java.lang.Object@47bf623f
java.lang.Object@6c54d2ae
java.lang.Object@50b3f10a
java.lang.Object@662f446e
java.lang.Object@5a3d6c0e
quaint mantle
#

yes

#

i think it cant be bcz your trying to get like new class everytime @mortal hare

#

but there will be no method in another class

#

there will be proxyghost

#

just use in other class Demo.getInstance()

mortal hare
#

by default it should not sync the values

#

in threads but it does

#

i guess cache is fast?

quaint mantle
#

well yea ig the object is resetting everytime u do the TestClass test;

#

i dont wanna say stupid things idk

mortal hare
#

that's understandable, but the thing is threads act funky on memory. They do not share variables by default. If the code running on Core 1 and the other code on Core 2. They will have different values without volatile keyword

quaint mantle
#

oh yea

torn oyster
#

anyone have a better design idea

#

they all have green names

quaint mantle
#

you should ask in #general ig

#

bcz like this is "Serious Spigot and BungeeCord Programming/Development Help | Ask Questions Here" well idk

#

@quaint mantle java.lang.IllegalArgumentException: Plugin already initialized!

#

I used what you said but got this error

mortal hare
#

code?

quaint mantle
#
public final class Demo extends JavaPlugin implements Listener {
    private static Demo main;

    @Override
    public void onEnable() {
        main = this;
        Demo main = new Demo();
        getLogger().info("Starting a demo!");
        getConfig().options().copyDefaults();
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(new ItemDrop(), this);
        getCommand("feed").setExecutor(new Feed());
        getCommand("heal").setExecutor(new Heal());
    }

    public static Demo getInstance() {
        return main;
    }
}
#

this is main class

#

this is from another

#
player.sendMessage(Demo.getInstance().getConfig().getString("NoPermMessage"));
#

remove the Demo main

#

in your onENable

#

ah

#

how do I get color codes from config file?

mortal hare
#

ChatColor.translateAlternateColorCodes(#Char, #String);

quaint mantle
#

thanks

#
player.sendMessage(ChatColor.translateAlternateColorCodes(&, NoPermMessage);
quiet ice
#

'&' is anything

quaint mantle
#

?

#

is it correct?

quiet ice
#

Well, if it compiles it compiles, if it does not it does not

#

But I can say that javac will not accept stray ampersands

quaint mantle
#

how I am supposed to you this?

quiet ice
#

Ugh

mortal hare
#

'&'

quiet ice
#

'&' exists

mortal hare
#

' <- used for mark only one character

#

" <- used to mark the multicharacter text

quiet ice
#

Like "&" but with single quotes

#

Alternatively, use 38

quaint mantle
#

sorry my bad 😦

#

it still sends this

vast quest
#

put ' in ur config

#

like '&cmessage'

quaint mantle
#

it is there

vast quest
#

huh

#

weird

#

idk

quaint mantle
#

:/

quiet ice
#

idk what happened there, probably makes sense after it is resolved ¯_(ツ)_/¯

vast quest
#

how can I override a existing config file

#

like generating a new one

quaint mantle
#

its fine now

#

oh okay

#

it was problem with maven

#

so I have to run clean first and then package

#

okay

#

thanks

vast quest
#

is there anyway I can generate a yml?

#

if so how

#

its just filled with examples and stuff

quaint mantle
#

by generate u mean like create a blank yml or with smth?

vast quest
#

like yk how config is generated

#

I want to make a custom file generate like that

outer sorrel
#

How could i get an entity by its id?

eternal oxide
#

getEntities() getLivingEntities() getTileEntities()

vast quest
#

can I generate a yml?

eternal oxide
vital ridge
#
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
        manager.addPacketListener(
                new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.WORLD_PARTICLES) {
                    @Override
                    public void onPacketSending(PacketEvent e) {

                        Player p = e.getPlayer();
                        WrapperPlayServerWorldParticles packet = new WrapperPlayServerWorldParticles(e.getPacket());

                        if (packet.getParticle().getParticle() == (Particle.REDSTONE)) {

                            Location particleLoc = new Location(p.getWorld(), packet.getX(), packet.getY(),
                                    packet.getZ());

                            for (Location loc : ParticleTrail.overworldTrails) {

                                if (p.getLocation().distanceSquared(loc) >= 10) {

                                    e.setCancelled(true);

                                }
                            }
                        }

                    }

                });

Hey, I have this code. I have a trail plugin, which generates lots of particles aka a particle trail. The thing is, i want to achieve so you only render parictles less than 10 blocks away from you. But this code here checks if im 10 blocks away from any of the particles and then it completely stops rendering any of my particles. How could i optimise the code so it will check if its 10 blocks away from any particle and then stops rendering only the specific ones?

eternal oxide
#

It loops over ParticleTrail.overworldTrails and if any of them are out of range it cancels the event.

#

You need to check if the particle is in ParticleTrail.overworldTrails, if it is you need to check its distance from the player, then cancel IF its over 10 distance.

primal ledge
#

Hello, I know that this is not some kind of a development question, but in this channel there are more ppl that may have their own website and faced similar problem. Is there any SpigotMC branding to be used on websites? Thanks.

quaint mantle
#

wdym by SpigotMC branding

primal ledge
#

I mean logo

unreal quartz
#

i don’t think anybody cares really

daring sierra
#

why would you need a branding thing

primal ledge
#

Yes but image is better than a link only.

#

Nevermind

quiet ice
#

I don't think that you can use the spigotmc logo everywhere

young needle
#

how can I cancel that players can move items to the bottom inventory? They should be able to move items above. I canceled InventoryDrag and ClickEvent when

    if(event.getInventory() != event.getView().getBottomInventory())
        return;

or in the click event:

    if(event.getClickedInventory() != event.getView().getBottomInventory())
        return;

but the problem is that players can still hotkey the items in the bottom inventory and the players can sometimes move the items to the bottom inventory? It doesnt always happen but it sometimes does???

eternal oxide
#

a return is not cancelling the event

young needle
#

i cancel the event below

#

the return

#

sry forgot to add that

eternal oxide
#

your return comes first. it will never reach the cancel

quiet ice
#

!= not ==

#

he uses the right operators

young needle
#

yes

eternal oxide
#

You are comparing object instances you should be using .equals

young needle
#

okay but that probably wont fix the issue right?

quiet ice
#

You might want to look into using #equals though, I got some concerns using instance comparisions, though I think that won't matter here (though it would explain to why it works sometimes)

young needle
#

I mean I could change it but I dont think it will change anything

quiet ice
#

Well #equals is a lot more reliable than instance comparision

eternal oxide
#

== is for primitives and enums

sick ravine
#

Hey, how to add effects to my custom Enchant CustomEnchantment extends Enchantment?

quiet ice
#

As well as semi-singletons, such as threads

eternal oxide
#

yep

earnest junco
sick ravine
eternal oxide
young needle
#

Did not fix anything as I thought

sick ravine
eternal oxide
#

?paste

queen dragonBOT
quiet ice
#

Enums are semi-singletons (they will not be cloned arbitarily)

#

As such instance comparision can be made use of

young needle
sick ravine
#

primitive types have no methods

#

😳

quiet ice
#

It's not limited to enums, everything else that mimics on how on enums work (i. e. one instance per property set, never any duplicates) will behave as intended with instance comparisions

sick ravine
quaint mantle
#

i upload nlogin and when i restart the server he tell plss choose you favourite plugin plss jelp

quiet ice
#

I don't see what point you are trying to prove

quaint mantle
#

i upload nlogin and when i restart the server he tell plss choose you favourite plugin plss jelp

sick ravine
quiet ice
#

We weren't talking about primitives having methods before though . Meh, who cares ¯_(ツ)_/¯

quaint mantle
#

Can help me

sick ravine
#

?

quaint mantle
#

i upload nlogin and when i restart the server he tell plss choose you favourite plugin plss help

sick ravine
#

@quaint mantle nlogin have depends?

quaint mantle
#

Means

#

Idk

vast quest
#

how can I get the shooter of a ProjectileHit event

#

cant find it

young needle
#

Projectile#getShooter()

#

yes

vast quest
#

Cannot resolve method 'getShooter' in 'LivingEntity'

#

still the same error

stone sinew
#

One sec

#

Player player = (Player) event.getEntity().getShooter();

#

@vast quest ^^^

vast quest
#

k

#

seems like getShooter isnt a thing

#

Cannot resolve method 'getShooter' in 'LivingEntity'

stone sinew
vast quest
#

1.16

stone sinew
#

((Projectile) event.getEntity()).getShooter()

eternal oxide
#

getShooter is under Projectile

vast quest
#

Player player = (Player) ((Projectile) event.getEntity()).getShooter();

#

seems to not give errors

eternal oxide
#

test before casting to Player. It could be a mob or a dispenser

vast quest
#

ok

vast quest
quaint mantle
#

I need a anti grief plugin

eternal oxide
#

it will matter because you can;t cast a mob or a dispenser to a Player

vast quest
#

o

#

so uh

#

how can I get it then

#

Entity?

eternal oxide
#

it will throw a ClassCastException

quaint mantle
#

I need best anti grief plugi

vast quest
eternal oxide
#

no, getShooter() returns a ProjectileSource

#

you then instanceof to see if its a player

vast quest
#

Ok

#

so if (((Projectile) event.getEntity()).getShooter() instanceof Player) {

eternal oxide
#
ProjectileSource shooter = ((Projectile) event.getEntity()).getShooter();
if (shooter instanceof Player) {
  //code```
vast quest
#

ok

young needle
#

okay I found out that the inventoryclickevent is not called when i click in a inventory and quickly move the cursor away from the slot. The item will be set in the slot since the event will never get fired???

eternal oxide
#

I can;t get a click to fail

#

?paste

queen dragonBOT
eternal oxide
young needle
earnest junco
young needle
eternal oxide
#

how do you mean drag? when you hold a block over a slot and right click?

young needle
#

Yes and than quickly move the cursor aqay right at the click.

#

In the bottom inv

earnest junco
queen dragonBOT
supple marsh
#

Hello, I am trying to do something with a HashMap, I saved in a HashMap of <Player,Player> I saved 1 entry, but for some reason it gets removed when I use map.containsValue(player), any help?

eternal oxide
#

the drag event does not fire untill you release the mouse

vast quest
#

how can I make it so when you jump on a farmland

#

it doesnt break

summer scroll
glossy scroll
#

Had an issue on my server when the player was applied knockbac, it would send the jump packet and the server would calculate y velocity just fine. Player would launch into the air.

young knoll
#

Ah yeah I remember that

#

Hmm

#

I guess you could cancel velocity events with really high values

eternal oxide
eternal oxide
#

however event.getInventorySlots() returns a Set of affected slots which could be in the upper or lower inventory

earnest junco
#

which is literally what i said

rigid hazel
#

I have a big problem:

#
public List<Mail> getMails(Player player)
    {
        List<Mail> mails = new ArrayList<>();

        for(String uuid : this.plugin.getMySQLConnector().getColumns("mails", "uuid"))
        {
            if(uuid.equals(player.getUniqueId().toString()))
            {
                String identifier = (String) this.plugin.getMySQLConnector().getColumn("mails", "identifier", uuid, "uuid");
                String name = (String) this.plugin.getMySQLConnector().getColumn("mails", "name", uuid, "uuid");
                String sender = (String) this.plugin.getMySQLConnector().getColumn("mails", "sender", uuid, "uuid");
                String subject = (String) this.plugin.getMySQLConnector().getColumn("mails", "subject", uuid, "uuid");
                String message = (String) this.plugin.getMySQLConnector().getColumn("mails", "message", uuid, "uuid");
                String type = (String) this.plugin.getMySQLConnector().getColumn("mails", "type", uuid, "uuid");
                String date = (String) this.plugin.getMySQLConnector().getColumn("mails", "date", uuid, "uuid");

                mails.add(new Mail(identifier, uuid, name, sender, subject, message, type, date, this.plugin));
            }
        }

        return mails;
    }```
#

I have this. And....

#

uuid = 123

#

player.getUniqueId().toString() = 123

#

And. The list is empty after calling this

#

I dont know why

#

Please help

drowsy helm
#

uuid will never be 123?

#

thats not a valid uuid

rigid hazel
#

I know. Just an example

drowsy helm
#

have you debugged all the getColumns and ensured they are actually returning something

rigid hazel
#

Yes.

#

Every single column

#

But:

#

uuid.equals(player.getUniqueId().toString())

eternal oxide
rigid hazel
#

So.... No new Mail is created

earnest junco
rigid hazel
#

I dont know what you mean.

earnest junco
#

whats wrong with a good ol' select and iterating over the resultset

rigid hazel
#

Please dont evaluate my code

drowsy helm
#

lmao

rigid hazel
earnest junco
#

if u dont want help dont ask for it kek

drowsy helm
#

have you printed uuid and ensured its returning correct

rigid hazel
#

Just help me please. I promise you, that this isnt the issue

drowsy helm
#

you can't post in a help chat and not expect critique

rigid hazel
drowsy helm
#

but the if statement si satisfied

#

thats weird

wraith rapids
#

if i had the effort to scroll up i would criticize your ass to fucking uzbekistan

drowsy helm
#

means something isn't matching

rigid hazel
#

this.plugin.getMySQLConnector().getColumns("mails", "uuid")

#

I'm trying now to output this

#

Or the size

#

this.plugin.getMySQLConnector().getColumns("mails", "uuid").size() = 0

#

This is crazy

drowsy helm
#

there ya go

#

so you never debugged that line

rigid hazel
#

If you look on there

rigid hazel
drowsy helm
#

means your sql connector is bung

rigid hazel
#

But I have something in that line...

rigid hazel
#

But it always worked correct

#
public List<String> getColumns(String table, String column) {
        try {
            ResultSet resultSet = MySQL.query("SELECT " + column + " FROM " + table + ";");
            List<String> results = new ArrayList<String>();

            if (resultSet.next()) {
                while (resultSet.next()) {
                    results.add(resultSet.getString(1));
                }
            } else {
                this.plugin.getLogger().info("No results available!");
            }
            return results;
        }
        catch (SQLException ex) {
            this.plugin.getLogger().info("§cError.");
            return null;
        }
    }```
#

Isnt there something correct?

slim marsh
#

Is it possible to add a base64texture config option for guis in 1.12.2?

drowsy helm
#

im shit at SQL

#

but i think its

#

SELECT column FROM table WHERE uuid EQUALS ?

#

not sure tho

drowsy helm
rigid hazel
slim marsh
#

How does deluxe hub and deluxe menus etc do it then?

drowsy helm
#

would be a select * thing then

young knoll
#

You can use base64 skulls in 1.12

drowsy helm
rigid hazel
#

Oh:

#
                    results.add(resultSet.getString(1));
                }```
#

I think its this

#

I always getting the column index from 1

#

Not increasing it

#

@drowsy helm

vast phoenix
#

I'm testing some stuff of my plugins does anyone have an idea on what would be a good way to make my server tps to go down to like 16/17

drowsy helm
#

idk check

#

not necessary to ping lmao

rigid hazel
#

Sorry. I thought you are interested

drowsy helm
vast phoenix
#

Just loading data

drowsy helm
#

can we see code snippets

wispy monolith
#
List<Player> Players = new ArrayList(Arrays.asList(Bukkit.getServer().getOnlinePlayers().toArray()));

is this right?

rigid hazel
#

Send code.

wraith rapids
#

use a sampler or paper's timings to investigate what is using excessive tick time

drowsy helm
#

would help a lot more

vast phoenix
#

I don't have any issues with my plugin

wraith rapids
#

or a profiler

drowsy helm
#

jesus

#

what is with all that casting

vast phoenix
#

I never said my tps is going down

quaint mantle
#

Is it possible like I can have a separate class for a subcommand?

vast phoenix
#

I want to make my tps go down

rigid hazel
wraith rapids
#

then call Thread.sleep in a timer task that runs every tick

#

very easy

vast phoenix
#

I want to test how my plugin reacts with some lag

drowsy helm
#

Bukkit.getServeR().getOnlinePlayers() returns a list of players

vast phoenix
#

Okay

drowsy helm
#

ooh

#

you want to create lag

young knoll
#

It returns a collection actually

vast phoenix
#

yeah that timer task would work

drowsy helm
#

can cast to list

#

just do like a few hundred sqrt calcs on the main thread

wraith rapids
#

that's an impl detail though, iirc the return type is collection<player>

drowsy helm
#

or inverse square

#

something taxding

wispy monolith
#

can anyone tell me is this right?

List<Player> Players = new ArrayList(Arrays.asList(Bukkit.getServer().getOnlinePlayers().toArray()));
wraith rapids
#

a hundred square roots is literally nothing

#

the server does like a dozen for every entity every tick or some shit

drowsy helm
#

List<Player> Players = (List<Player>)Bukkit.getServer().getOnlinePlayers();

drowsy helm
#

was example lol

earnest junco
vast phoenix
#
        new Timer().schedule(new TimerTask() {
            @Override
            public void run() {
                try {
                    Thread.sleep(100L);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }, 0, 1); 
vast phoenix
#

I'll try this

earnest junco
drowsy helm
wraith rapids
#

casting that isn't technically safe

drowsy helm
#

which can be cast to a list

earnest junco
#

obviously you can have separate classes lol

wispy monolith
wraith rapids
#

that the returned object is s a list is an implementation detail

#

the return type is Collection

#

which may not be a list

drowsy helm
#

true

wraith rapids
#

it could be a set, it could be any arbitrary class that implements collection

drowsy helm
#

can put it in the constructor for arraylist

quaint mantle
drowsy helm
#

List<Player> Players = new ArrayList<>(Bukkit.getServer().getOnlinePlayers());

#

done

#

ezpz

wispy monolith
#

What does .sendRawMessage do?

drowsy helm
#

sends message without json parsing iirc

#

or colour

#

I think

#

have to test

young knoll
#

Probably says in the javadocs

drowsy helm
#

javadocs just says 'sends raw message'

eternal oxide
#

its part of the conversation API

earnest junco
#

sendMessage also calls sendRawMessage. sendMessage just respects the conversation API.

wraith rapids
#

the conversation api is cancer

earnest junco
#

its great honestly

#

just too few people know how to actually use it

eternal oxide
#

I've never used it myself

hybrid spoke
#

never found any use for it

wispy monolith
#

Why this isn't working .spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(message));

wraith rapids
#

define not working

wispy monolith
eternal oxide
#

it is a thing

wraith rapids
#

import net.md_5.bungee.api.ChatMessageType

wraith rapids
#

how are you depending on spigot

drowsy helm
#

probs spigot-api

wispy monolith
#

I have the 1.16.5 API

#

spigot api

wraith rapids
#

yes, but through maven or through your ide as an imported package

drowsy helm
#

change your dependency from spigot-api to spigot

wraith rapids
#

spigot-api should include the bungee shit

drowsy helm
#

ah thought that said nms lmao

#

yeah it should

wraith rapids
#

show your maven dependency tree

drowsy helm
#

waiting for the "what is maven" lol

wispy monolith
#

is this it?

drowsy helm
#

the pom.xml

#

the contents

wraith rapids
#

no, the pom is not the dependency tree

eternal oxide
#

You probably imported TextComponent from java.awt

hybrid spoke
quaint mantle
wraith rapids
#

run mvn dependency:tree in your ide console

worldly ingot
#

javadocs?

drowsy helm
#

eclipse moment

quaint mantle
worldly ingot
#

you're depending on the javadoc artifact

worldly ingot
#

which is just a bunch of HTML, CSS and JS files to display the Javadocs

quaint mantle
#

I am new. I don't understand

drowsy helm
#

use maven then you wont have as many issues someboodi2

quaint mantle
#

How do I use maven?

worldly ingot
#

one step at a time, please

#

depend on spigot-api-1.16.5-R0.1-20210424.223940-54.jar, not the one that ends in -javadocs

#

Also, that's a sus name

quaint mantle
worldly ingot
#

that's fine, you can use that, but you're depending on the wrong file

quaint mantle
quaint mantle
wispy monolith
worldly ingot
#

top = good, bottom = bad

quaint mantle
#

Where do I download it from?

worldly ingot
#

?bt

queen dragonBOT
quaint mantle
#

I don't know what to search

wraith rapids
#

day 2

#

or is it day 3

quaint mantle
#

@eternal oxide ❤️

eternal oxide
# wispy monolith So?

Your issue is you are tying to use the sendMessage from a CommandSender and not a player

quaint mantle
#

ElgarL can you help me too?

eternal oxide
#

((Player)whoClicked).spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("Test message"));

wraith rapids
#

that's not the only issue

#

if he can't import the class he won't be able to use the method that requires an object of that type as a parameter regardless

#

like i guess he could pass null but then bukkit explodes

eternal oxide
#

its in Spigot-API. He just needs to add the import is all

wraith rapids
#

that is an import

#

literally look at the image

eternal oxide
#

not using maven?

wraith rapids
#

he's using maven yeah

#

i've tried to get him to show his dependency tree but he's not responding

eternal oxide
#

IJ or Eclipse?

wraith rapids
#

ij

eternal oxide
#

he shoudl just invalidate caches

wraith rapids
#

worth a try I suppose

#

there's a maven sidebar on the right

#

expand it

#

click open the dependencies

eternal oxide
#

fixes most dependency issues

wraith rapids
#

then expand spigot-api

#

then send a screenshot

novel hornet
#

I have a problem "an internal error occurred while attempting to perform this command"
how would i fix this

wispy monolith
hybrid spoke
wraith rapids
#

that's, uh

#

are you importing it as a referenced library in your ide

#

or through maven

eternal oxide
#

thats a manual import in that image

wraith rapids
#

yeah

#

that won't include bungee shit

wispy monolith
#

yeah

wraith rapids
#

use maven

eternal oxide
#

remove all libraries. They shoudl all be provided through maven/your pom

wispy monolith
#

where is maven I can't see it

eternal oxide
wraith rapids
#

maven is your pom

#

pom.xml

wispy monolith
#

How to run?

wraith rapids
#

you're not using maven are you

quaint mantle
wraith rapids
#

follow this guide

vast phoenix
#

I compiled RedisBungee but when I start my Bungee server I keep getting this error

Caused by: java.net.UnknownHostException: 6e773f50-17da-40d4-b7b7-22344193287a: Name or service not known
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
    at java.net.InetAddress.getLocalHost(InetAddress.java:1501)
    ... 17 more
eternal oxide
# quaint mantle

You have the wrong library. you are using the javadoc not the api

hybrid spoke
# quaint mantle

choco already told you, that you are using the javadocs and not the api

wraith rapids
#

he's been at this for days

eternal oxide
#

He only comes here to see me. He's in love

wraith rapids
#

sounds kinda gay

vast phoenix
hybrid spoke
wraith rapids
#

you are trying to look up an uuid as if it were an ip address/hostname

quaint mantle
#

@eternal oxide @hybrid spoke where do I download the API?

vast phoenix
#

I'm not thats the thing

quaint mantle
#

I don't know what to search on Google

wraith rapids
#

well something is

hybrid spoke
#

?bt

queen dragonBOT
hybrid spoke
#

@quaint mantle ⬆️

eternal oxide
quaint mantle
#

It's not a tutorial

#

It's a normal website

wraith rapids
#

now he's going to download the buildtools jar and add it as a referenced library md_5

#

i'm calling it

vast phoenix
#

        final String redisServer = configuration.getString("redis-server", "localhost");

        System.out.println(redisServer);

        final int redisPort = configuration.getInt("redis-port", 6379);
        String redisPassword = configuration.getString("redis-password");
        String serverId = configuration.getString("server-id");

        if (redisPassword != null && (redisPassword.isEmpty() || redisPassword.equals("none"))) {
            redisPassword = null;
        }

        // Configuration sanity checks.
        if (serverId == null || serverId.isEmpty()) {
            throw new RuntimeException("server-id is not specified in the configuration or is empty");
        }

        if (redisServer != null && !redisServer.isEmpty()) {
            final String finalRedisPassword = redisPassword;
            FutureTask<JedisPool> task = new FutureTask<>(new Callable<JedisPool>() {
                @Override
                public JedisPool call() {
                    // Create the pool...
                    JedisPoolConfig config = new JedisPoolConfig();
                    config.setMaxTotal(configuration.getInt("max-redis-connections", 8));
                    return new JedisPool(config, redisServer, redisPort, 0, finalRedisPassword);
                }
            });
#

Getting the string of the host which is localhost in the config

quaint mantle
#

@hybrid spoke I'm stupid I don't know what to do

vast phoenix
#

and is put as default to "localhost"

hybrid spoke
wraith rapids
#

well is that set to an uuid

hybrid spoke
#

you just need to follow it

vast phoenix
#

and i'm using that variable in the constructor of JedisPool

quaint mantle
#

Where is it?

wraith rapids
#

lmao

hybrid spoke
#

?bt

queen dragonBOT
hybrid spoke
#

.. xD

eternal oxide
vast phoenix
#

I just don't get it it's not an minecraft uuid

eternal oxide
#

on that page he linked Prerequisite It assumes that you have the Spigot-API jar file (obtainable with BuildTools or on The Nexus) which we will use.

vast phoenix
#

and I'm not creating any uuids in this code

wraith rapids
#

imagine if there was like a dependency manager that'd let you just specify where the dependency is and what it's called and it downloads it for you automagically

#

unfortunately he doesn't seem to be capable of following a step-by-step maven guide with screenshots

#

someone will probably have to mail themselves to him with fedex and show it to him in person

quaint mantle
vast phoenix
#

You can even install the Minecraft plugin for IntelliJ

#

it will just create the whole maven project for you including dependecies

eternal oxide
wispy monolith
#

What should I do after I made a project using maven?

wraith rapids
#

then you write your code

#

and then you build it with maven

glossy scroll
wraith rapids
#

and it shits out you a jar you can load

vast phoenix
#

This is so weird

wraith rapids
#

i suppose you will have to add the spigot dependency information to your pom first

vast phoenix
#
14:52:52 [INFO] [RedisBungee] Successfully connected to Redis
wraith rapids
#

did you follow the guide I linked

vast phoenix
#

But it's still throwing that exception

wraith rapids
#

it tells you how to do that

wispy monolith
vast phoenix
#

anyway if it connects it connects

glossy scroll
#

No

wraith rapids
#

no

glossy scroll
#

Dont delete those lol

wraith rapids
#

main.java is where your code goes

#

main.resources is where your config.yml and other files like that go

#

you can telete the test directory if you want i guess, tests are gay

hybrid spoke
#

it will autorecreate anyway

wispy monolith
#

ok

glossy scroll
#

ok no

#

False

#

Tests arent bad

wraith rapids
#

are you implying gay is bad

#

are you a homophobe

glossy scroll
#

And i think maven will just regenerate that folder anyways

hybrid spoke
#

XD

wraith rapids
#

are you afraid of the homos

wispy monolith
#

So I put my package inside main.java?

glossy scroll
#

yea

wispy monolith
#

ok

wraith rapids
#

yeah, like the guide I linked says

glossy scroll
#

We should stop helping if he refuses to read the thing

hybrid spoke
#

we should stop trying to help

wraith rapids
#

we should stop trying

glossy scroll
#

we should stop

eternal oxide
#

Should we stop?

glossy scroll
#

what did i just say

eternal oxide
#

Just making sure

hybrid spoke
#

Martoph — heute um 14:55 Uhr
yea

#

i am so funny today

wraith rapids
#

hey elgar do you remember if the towny trie impl is self sourced or are you depending on some library for it

quaint mantle
eternal oxide
glossy scroll
#

Start over and use maven

hybrid spoke
#

remove the ".java" in your import

quaint mantle
#

How do I do that?

wraith rapids
#

with your keyboard

hybrid spoke
#

by... removing it...?

wraith rapids
#

there's a button over your enter key

quaint mantle
#

I'm stupid

wraith rapids
#

with an arrow to the left

#

press it 4 times

glossy scroll
#

5*

hybrid spoke
#

5*

wraith rapids
#

i guess that's true

hybrid spoke
#

stop being sonic @glossy scroll

quaint mantle
#

This?

glossy scroll
hybrid spoke
#

remove the javadoc dependency jar

quaint mantle
#

How do I use Maven?

glossy scroll
#

@wraith rapids guide

#

Plz

wraith rapids
#

you are already this far

glossy scroll
#

Link

quaint mantle
wraith rapids
#

we are not turning back now

glossy scroll
#

LOL

quaint mantle
#

@hybrid spoke

wraith rapids
#

it will take 5 more days if he needs to learn how to read and follow a guide

hybrid spoke
wraith rapids
#

or change some numbers in a pom

glossy scroll
quaint mantle
#

It doesn't work

#

I can't delete it

wraith rapids
#

have you considered giving up yet