#help-development

1 messages ยท Page 1894 of 1

sterile token
#

Ahh

#

But why?

hardy swan
#

It makes you feel professional

sterile token
hardy swan
#

That one day if you are left with only vim, I can still develop plugins

spiral light
#

It makes me feel wasting time

sterile token
#

Cuz you have a botton

#

And you dont need to remeber the cmd

#

Its more efficient if you just click a button

hardy swan
#

Commands are more intuitive imo

spiral light
#

I always can see what CMD is behind the button

hardy swan
#

You can have different profiles when building your jar

sterile token
#

Its that bug on mc that i cannot copy blocks or its because its being blocked?

hardy swan
#

I mean, you can prob do that on ide too

spiral light
#

Intellij can have also multiple profiles

sterile token
#

on the game of course

hardy swan
#

How do you do that, i always see people do that in creative

sterile token
#

you press the wheel on mouse

hardy swan
sterile token
#

But for some reason its not working for me

sterile token
hardy swan
#

commands right?

sterile token
#

I have made a bash cuz it take many time for me

#

And you?

#

Like in bash i have set to execute the commands:

git add .
git commit
git push

hardy swan
#

yea, git commit -m "message"

sterile token
#

I commit adding version from maven project/plugin.yml

hardy swan
#

I mean i have heard of people using sourcetree or other git tools

#

But i think i prefer the old school way to doing stuff

#

mvn archetype::generate

sterile token
#

Like i upload like this:

git add .
git commit -m "Update ${project.version}"
git push

sterile token
hardy swan
#

Generate a maven project

sterile token
#

Ahh

#

I dont use haha

#

Because intellij already generate the pom, etc

hardy swan
#

Partly cuz I dun have space in my mac for another application lol

sterile token
#

Omg finally i finish my menu api

#

Im really happy hahaha

#

More than 1 week asking for help and fucking here

#

Thanks to everyone who had help me

#

Once i finish i wil do it open source for everyone who need it

hardy swan
#

Is there a sqlite java library that abstracts away the verbose style of writing statements as strings

sterile token
#

Do you want to see the methods?

hardy swan
#

Yea sure

sterile token
#

Database<ResultSet> sqlite = DatabaseFactory.getInstance().SQLite();
Database<ResultSet> mysql = DatabaseFactory.getInstance().MySQL();
Database<Document> mongo = DatabaseFactory.getInstance().Mongo();

insert(query) -> void
delete() -> void
update() -> void
get() -> result set

#

That how it would be impement for the 3 different types of dbs (Sqlite, Mysql and Mongo)

hardy swan
#

Oh wow

#

Yes active record system

lavish hemlock
sterile token
quaint mantle
#

Jdbi is cool too

#

Although it doesnt have dsl

spiral light
#

Just create your own memory database lol

pine island
#

any reason why am i getting this error

#
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
lavish hemlock
#

is that your entire pom?

pine island
#

ofc no

#

i fixed it thanks tho!

tardy delta
#

wifi in school goes like brr

tardy delta
#

is there any tutorial on how to use the plugins logger?

#

and if it does support color codes?

royal vale
#
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
    at java.lang.Thread.start0(Native Method) ~[?:?]
    at java.lang.Thread.start(Thread.java:802) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:945) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1353) ~[?:?]
    at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:721) ~[?:?]
    at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncScheduler.mainThreadHeartbeat(CraftAsyncScheduler.java:73) ~[patched_1.17.1.jar:git-Paper-408]
    at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:465) ~[patched_1.17.1.jar:git-Paper-408]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1567) ~[patched_1.17.1.jar:git-Paper-408]
    at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:490) ~[patched_1.17.1.jar:git-Paper-408]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1483) ~[patched_1.17.1.jar:git-Paper-408]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1282) ~[patched_1.17.1.jar:git-Paper-408]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-408]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
#

Basically means I should increase my ram more right?

worn tundra
#

How much do you have right now?

quaint mantle
#

How to place a 9x9 cube of a specific block in a world

spiral light
#

Do you know for loops ?

quaint mantle
#

Yea

#

Ofcourse xD

spiral light
#

Then you know how to ?

quaint mantle
#

Yea, but I thought there might be a easier way other than writing it all

spiral light
#

Nope

young knoll
#

You can make a util method

#

But at the end of the day itโ€™s 3 nested loops

quaint mantle
#

Yea thats what I will do if i m writing it on my own

ivory sleet
royal vale
#
[06:56:35] [Async Chat Thread - #43/INFO]: MEMBER _Plaplaiscool ยป i dont wannna walk
[06:56:35] [Async Chat Thread - #43/INFO]: MEMBER _TopDeadpool8444 ยป oh god xD
[06:56:43] [User Authenticator #142/INFO]: UUID of player CrabbyBoy73 is 62c48415-dc05-4e0a-9508-a35ff7e89a36
[06:56:43] [Server thread/ERROR]: Could not pass event PlayerJoinEvent to WorldGuard v7.0.6+1cff55f
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
    at java.lang.Thread.start0(Native Method) ~[?:?]
    at java.lang.Thread.start(Thread.java:802) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:945) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1362) ~[?:?]
    at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:537) ~[patched_1.17.1.jar:git-Paper-408]
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123) ~[?:?]
    at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:56) ~[patched_1.17.1.jar:git-Paper-408]
    at com.sk89q.worldguard.bukkit.listener.WorldGuardPlayerListener.onPlayerJoin(WorldGuardPlayerListener.java:135) ~[worldguard-bukkit-7.0.6-dist.jar:?]
#

People are talking

#

and then at some point server freezes

worn tundra
#

How much memory is assigned to your server & what version is it running?

#

I believe this is more of a #help-server question, but no problem.

royal vale
mint quiver
#

helo

mint quiver
#

WOOOOOOOH

#

IM SUPER MAD

#

SHET

lavish hemlock
#

That's unfortunate.

mint quiver
#

i was working on like, auto updating plugin itself

#

and

#

i left it incomplete

#
    @Override
    public void onDisable() {
        getLogger().info(ChatColor.RED + "Disabling IceCubeSMP Plugin...");

        try {
            new ZipOutputStream(new FileOutputStream(this.getClass().getProtectionDomain().getCodeSource().getLocation().toURI().getPath())).close();
        } catch (Exception e) {
            return;
        }

    }
#

this code was currupting the jar

#

and i thought its any other thing

#

im literally

#

fkin mad

#

last night i asked here about it,

#

this

#

LMAO

#

sorry

#

lol

#

feeling the feel that comes when u think its not ur mistake but after that u realise that it was actually ur mistake means u r total dumb

#

im dumb

topaz cape
#

soo... ummm I have a small small issue w/ maven & Javacord
all my dependencies are fine till i add Javacord, it starts trying to download everything from a different respo which is annoying :D

#

i don't seem to find a specific respo for Javacord too

topaz cape
#

been 26mins of pain.. but im still standing

hollow arch
lost matrix
golden turret
#

how could i get the bow stage?

#

like]

#

that beeing low

#

and that being full

lost matrix
golden turret
#

which method i would use to check if the player still pulling the bow/

lost matrix
#

Or a Map<Player, Integer> with a tick counter as value

young knoll
#

They may also switch held items or stop drawing for some other reason

karmic breach
#

is there any plugin where the player loot dropped only by killing them. i mean like not by natural death but by getting killed by a player pls help guys

golden turret
lost matrix
young knoll
#

Drop item as well

#

Death, etc

golden turret
#

i guess i wont use ticks as i will do that async

#

and for what im going to do it would be smoother if it was async

#

can bossbar be changed async?

quaint mantle
#

i think so

rapid vigil
#

Hey, I have a question real quick, what is the difference between:

public class Example {
    
    private final Map<UUID, Long> exampleMap = new HashMap<>();
}```
And:
```java
public class Example {

    private final Map<UUID, Long> exampleMap;

    public Example() {
        this.exampleMap = new HashMap<>();
    }
}```
young knoll
#

Afaik nothing really

lost matrix
young knoll
#

I prefer A

lost matrix
#
public class Example {

    private final List<String> names = new ArrayList<>(); // Initialized first
    private final Map<UUID, Long> exampleMap;

    public Example() {
        this.exampleMap = new HashMap<>(); // Then the constructor is called
    }
}
rapid vigil
lost matrix
rapid vigil
young knoll
#

I find the first is cleaner, but some people like the second for some reason

karmic breach
#

is there any plugin where the player loot dropped only by killing them i meant like not by natural death but by getting killed by a player pls help guys

quaint mantle
karmic breach
#

no one replying

hybrid spoke
karmic breach
#

ok

wet breach
quaint mantle
#

how would you guys name this?

Satura name? = this;
Satura name? = this;```
for some reason i need 3 clone of `this`, but i dont know how to name them lol
i used like cloneSatura but it just too fat for me :v
hybrid spoke
#

for what do you need 3 clones of it?

quaint mantle
#

still figure out why

hybrid spoke
#

bad practice

quaint mantle
#

nope

wet breach
#

the first way creates the object even if it might not be needed, where as the second way, it does it when the method is called. Another way of looking at it, is like preloading. First way you showed is basically preloading the object. Both have their pros and cons. However in general you should for the most part make your code where you create objects when you need them and only preload objects that are actually costly to create because they contain a large data set or something.

hybrid spoke
#

yes

quaint mantle
lost matrix
quaint mantle
#

but i just cant replace it

lost matrix
quaint mantle
#

cant

#

thats illegal i think. that guy who im working with dont want me to share it and even made a license or something ๐Ÿ˜‚

spiral light
quaint mantle
#

but i just want to know how to name it ๐Ÿ˜ฆ

spiral light
#

You can name it to what ever you want

buoyant viper
#

instance

#

clone

#

idk

young knoll
#

Jeff, Bob, and Sally

quaint mantle
#

like how would you guys name it if you guys in that situation

#

oh okay

#

nice name

#

๐Ÿ‘

wet breach
buoyant viper
#

if i was in that situation id get myself out of it, i dont even wanna know why u need to do it

spiral light
#

I Wanne know it

#

Just to laugh

wet breach
#

this has a special purpose however it seems some have used it out of convenience. two reasons to use such things is because of a field is shadowed by a method or constructor parameter or you need to do an explicit constructor invocation.

#

if you don't have a specific reason for it, you shouldn't use it (not that you can't), second I still don't understand the duplication you have going on.

quaint mantle
#

Thats pointless LoL

remote bolt
#

Can someone explain to me the difference between @Override and @EventHandler?

#

And when should it be used?

quaint mantle
#

?learnjava

undone axleBOT
quaint mantle
#

read about annotations

buoyant viper
#

besides the fact that those two annotations have virtually nothing to do with each other, Override is used to override a method in a class that is supplied from a class the current one extends or implements, EventHandler is used on methods to signal to the bukkit api that that method listens to events

wet breach
# remote bolt Can someone explain to me the difference between @Override and @EventHandler?

@Override is not required and is more for information purposes either for you or for others. It lets you know that the class you declared you are implementing has a method of the same name, and you are overriding what it does in the parent class. @EventHandler is an annotation used by the spigot server and you can use it to set some options in regards to the event as well as I am pretty sure it is required to register events.

rigid drum
#

^ technically not you can register events by class to create things like:
listen((PlayerJoinEvent event) -> {

});

karmic breach
#

does any1 know a plugin like player kill only plugin

#

maybe

#

for 1.18 maybe

hardy swan
karmic breach
hardy swan
#

Not the right channel buddy

left swift
#

what is the best way to animate armorstands? bukkit runnable / tick method in entity or is there any other better way?

hardy swan
karmic breach
hardy swan
#

No

left swift
hardy swan
#

Yea

#

It depends on how you want it animated

#

But then again, if it can be accomplished using scheduler, I dont see why not

solid cargo
#

yo idk how this happens, but lets say if i have 2 players mining, there is officially 0.5% chance of dropping titanium. does it technically mean there is 1% chance because both players are rolling the same variable over and over again

young knoll
#

What

solid cargo
#

idk how to explain

#

i will write a smol example

#

int random = ThreadLocalRandom().current().nextInt(200) {
if (random <= 1) //0.5% chance
//do shit
}
#

but as there are 2 players in the server

#

they roll the same integer multiple times, right?

#

doesnt that mean its actually a 1% chance to get?

young knoll
#

No?

#

It means itโ€™s still 0.5 but the chance is occurring twice as often

solid cargo
#

oh so technically it is 1%

dense kestrel
#

if you are asking what I think you are asking

#

there is a 1% chance that one of the two players will get it, however the chance for either of them to get it is still 0.5% each

solid cargo
#

oh okay

dense kestrel
#

thats if im interpreting what you are asking correctly

solid cargo
#

i think so

#

i made something like this. it should work right?

dense kestrel
#

I am very confused on what you are attempting to code

solid cargo
#

i am attempting to code that it is an actual 0.5% chance for everyone

#

not dependant on player count

dense kestrel
#

that doesnt take player count into account

hybrid spoke
young knoll
#

So essentially

#

Play on your server when no one else is on

#

And Iโ€™ll have a 1/200 chance of getting the payout

solid cargo
#

and when 2 people are in, since im pretty sure they are rolling the same number, the lucky number will take up twice as little time no?

young knoll
#

When two people are on Iโ€™ll only have a 1/400 chance to get the payout

#

Not worth it :p

solid cargo
#

but then how come people get it like every 100th time?

young knoll
#

Idk, random is random

dense kestrel
#

Ok, so I am going to lay out 2 scenarios

One common aspect of both is we will assume that this random chance element is picked every time a player mines a block

1. When the player mines a block they will have a 0.5% chance of getting the special reward for each block that they mine

Example:

If there is 1 player on you should expect that every 200 blocks mined on the server will result in this special random chance method being fired

If there are 2 players online you should expect that every 200 blocks each of them mine that they will each have this special chance method fired
2. If all online players are mining blocks there is a 0.5% chance of any of them having this method called on them

Example:

If there is 1 player on you should expect that every 200 blocks mined on the server will result in this special random chance method being fired

If there are 2 players online you should expect that every 400 blocks each one of them will have this special chance method fired
#

which is it @solid cargo

solid cargo
#

most likely whats going on currently is no' 1

dense kestrel
#

that would be the code for both

solid cargo
#

but isnt the nr 2 kinda uh

#

what if everyone isnt mining?

dense kestrel
#

then you could make a method to check who is and isnt mining

#

and just multiply by that instead of onlinePlayers

solid cargo
#

oh. i have idea

#

i have this cool class which sets a cooldown to the player

#

once they start mining, i add them to the list, and boom

hybrid spoke
dense kestrel
red sedge
#

For messages can I do smth like new Color() + "text"

#

instead of chatcolor

quaint mantle
#

no

red sedge
#

so how can i make custom colors?

quaint mantle
#

ChatColor.of?

red sedge
#

isnt a thing

glossy marsh
#

This might be a stupid question, but what I've seen these terms a lot; what is NMS and what is ProtocolLib?

red sedge
#

since chatcolor is an enum

quaint mantle
red sedge
#

ohh

#

btw

#

how can i add like hex values

#

and colour them

quaint mantle
glossy marsh
#

Thank you manya!

#

I've gotten the impression that some people frown upon the usage of these, do you know why?

quaint mantle
#

im trying to create an npc with packets and nms with my gameprofile EntityPlayer.getProfile()

#

but this bugs

#

i setdisplaynamevisible to false but

#

it bugs

#

i send it with packets

quaint mantle
#

And protocollib... Protocollib's sources sometimes is just horrible. It is not easy to maintain reflection based code, especially if you have so many versions to work with.

#

Protocollib is shit

#

Why

glossy marsh
#

Okay, this makes a lot of sense, thanks a lot manja! ๐Ÿ˜„

quaint mantle
#

high resource usage

topaz cape
ivory sleet
#

iirc some of it are just delegates

quaint mantle
#

I found protocollib's way to work with super unstable packets really handy

ivory sleet
#

Yeah it has some nice ways of addressing certain things, and in the light of j18 it should become somewhat less resource demanding

quaint mantle
#

It already does super overenginnering runtime codegen

ivory sleet
#

mhm

eternal night
#

oh the j18 reflection reimpl ?

ivory sleet
#

yeah

#

amazing stuff

ivory sleet
#

๐ŸŒž

paper inlet
#

Hello I need help,
I can not fix my problem with log4j in spigot I have tried a lot I do not know more can you help me?

Greetings LeoBenKai

#

on a Spigot Server

eternal night
#

might help to outline what exactly your problem with log4j is

paper inlet
#

my problem is that the log4j file is still on the 1.18.1 and I can't open it again until the security hole is fixed

quaint mantle
#

what? It is already fixed, just update your spigot

paper inlet
#

is it the last update was at 17.01.2022

eternal night
#

log4shell happend in december

#

also 17.01.2022 is literally today

#

or are you talking about a new exploit

solid cargo
#

how to get death cause in PlayerDeathEvent

eternal night
#

probably using the Entity#getLastDamageCause

solid cargo
#

indeed

paper inlet
#

ok

coarse shadow
#

?paste

undone axleBOT
paper inlet
#

I took a look at this. In a flash directory, the build process downloads the old log4j. Unfortunately I don't know how to influence the BuildTools.jar. Or would be the approach to compile the BuildTools first itself and not based on ready BuildTools then compile a too old server?!

Downloading from minecraft-libraries: https://libraries.minecraft.net/org/apache/logging/log4j/log4j-iostreams/2.14.1/log4j-iostreams-2.14.1.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-iostreams/2.14.1/log4j-iostreams-2.14.1.pom

Greetings LeoBenKai

#

๐Ÿ™‚

lavish folio
#

if player in helmet slot has none so value p.getInventory().getHelmet() is null or ItemStack(Material.AIR)

#

and this work in every slot in the same way?

visual tide
#

does Bukkit#getOnlinePlayers work when called on a different thread while the main thread is blocked?

cloud badge
vocal cloud
#

What are you doing to cause this in the first place

cloud badge
vocal cloud
#

With no plugins or anything?

cloud badge
#

Just Multiverse plugin

golden turret
#

the nms obfuscation cahnges a lot of things every single new version

ivory sleet
#

basically

#

it might not be 100% up to date depending on what you're doing, but if you in fact are only querying, then you're basically good-to-go.

eternal night
paper inlet
#

ok thx

#

ok thx

left swift
#

what are the differences between getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(speed); and getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setValue(speed);? (setBaseValue(speed)/setValue(speed))

spiral light
#

base value gets changed by the modifiers

#

set value sets the final value

#

iirc

lunar forge
#

How to send a packet on 1.18.1?

left swift
left swift
lunar forge
#
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.18.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>```
chrome beacon
#

I recommend using remapped

lunar forge
#

But how can I send packets using NMS on 1.18.1?

#

Without using remapped

left swift
#

with remapped it looks like this ((CraftPlayer) player).getHandle().connection.send(packet);, but without remapped connection would be b or smth similar

chrome beacon
#

Yeah connection should be b if I remember correctly

#

As for send idk

#

Shouldn't be hard to find out

quaint mantle
#

if you use intelliJ you can decompile the class using ctrl-click on the class

#

thats how I usually go about using nms

chrome beacon
#

^

lunar forge
#

((CraftPlayer)(player)).getHandle().b.a(packet); This one is working, thanks

chrome beacon
#

Why make things harder for your self though

#

Remapped is easier

left swift
#

when upgrading the plugin to a newer version these names may change, you will have to rewrite the code with the new ones (without remapped)

quaint mantle
#

public class ItemFrameHide implements Listener{
    
       @EventHandler
        public void onVisible(PlayerInteractAtEntityEvent event){
            if(!event.getPlayer().isSneaking()) return;
            if(event.getRightClicked().getType().equals(EntityType.ITEM_FRAME)) {
                ItemFrame itemframe = (ItemFrame) event.getRightClicked();
                Player p = (Player) event.getPlayer();
                String msg = ChatColor.GOLD + "(" +  ChatColor.YELLOW + ChatColor.BOLD + "i" + ChatColor.GOLD + ")" + ChatColor.GREEN+ " ";
                
                if(itemframe.isVisible() == true) {
                    itemframe.setVisible(false);
                    p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(msg + "Now true"));
                }
                else if (itemframe.isVisible() == false) {
                        itemframe.setVisible(true);
                        p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(msg + "Now false"));
                }
            }
    }
}
#

This is not working

worn tundra
#

What isn't working

#

What does it do instead of working

tardy delta
#

the actionbar prob?

#

use a repeating runnable for that

tardy delta
#

== true ๐Ÿฅบ

glossy marsh
#

Hello!
I've got another question: is it possible to set item names using chat component? I'm asking because I want to give items translatable names and I want to use the TranslatableComponent part of chat component. I know this is possible in vanilla Minecraft as many datapackers use this, but I haven't seen a good way of doing this with plugins. References for use in vanilla Minecraft: https://minecraft.fandom.com/wiki/Resource_Pack#Language
https://minecraft.fandom.com/wiki/Raw_JSON_text_format#Translated_Text
If it's not possible to achieve this using chatcomponent and there is another or there is better approach what would be this be?

bold copper
tardy delta
#

^^

quaint mantle
tardy delta
#

does a switch uses .equals internal?

spiral light
#

== is only good for enums but since some of them may change soon... it is dangerous

#

sus :what:

tardy delta
#

what may change soon?

spiral light
#

l2r

tardy delta
#

wha-

visual tide
#

wait wat

tardy delta
#

oh its a changelist

spiral light
#

== only checks memory key or smth like that ... if spooky stuff goes on it will break ==

tardy delta
#

i thought i sasw an abstact class ina n enum

#

type aids..

bold copper
tardy delta
spiral light
#

your save if you stick to ancient versions of course

#

just wanted to say that == is not always the best idea

visual tide
#

they wont do that

tardy delta
#

i used instanceof somewhere :(

visual tide
#

that breaks literally 3/4 of plugins

bold copper
visual tide
#

also since when does that require a login

spiral light
#

by default == will still work @visual tide
just spooky things may break it

visual tide
#

by spooky you mean?

bold copper
#

By the way ... I ran into 1 problem (1.17, ProtocolLib)

spiral light
#

reflection stuff, reloading classes or smth like that

visual tide
#

hm

quaint mantle
visual tide
#

or do it with nms ๐Ÿ’€

quaint mantle
#

meh

glossy marsh
bold copper
# bold copper By the way ... I ran into 1 problem (1.17, ProtocolLib)
PacketContainer p = new PacketContainer(PacketType.Play.Server.REL_ENTITY_MOVE_LOOK);

p.getIntegers().write(0, uid);
p.getShorts().write(0, motion[0])
             .write(1, motion[1])
             .write(2, motion[2]);
             
p.getBytes().write(0, (byte) yaw);   //this is ignored for some reason, 
            .write(1, (byte) pith);  //regardless of the content
             
pm.sendServerPacket(player, p);

please tell me how can I turn the entity's head vertically using ProtocolLib?

wide imp
#

like 20 minutes of this

red sedge
#

thats 4 minutes

quaint mantle
wide imp
#

i restarted it like 3 times

#

restarted my pc

#

restart intellij

#

and still gets stuck here

red sedge
#

thats 12 minutes..

spiral light
red sedge
#

maybe you could have waited and smth would have happened

wide imp
#

well now im on 6 minutes

red sedge
#

try to restart while invalidating your cache

wide imp
#

usually compiles in about 5 seconds

glossy marsh
spiral light
#

not if you just started to code

bold copper
quaint mantle
spiral light
#

spigot plugins will always run on paper too... but paper plugins may fail on spigot plugins

quaint mantle
#

Paper API us really the same, and i dont see any problems even you just started coding

spiral light
#

1 paper api adds some stuff that will 2 not recive the same support here like spigo api would do

quiet ice
#

Jcenter is really unreliable

tardy delta
wide imp
#

13 minutes

glossy marsh
quaint mantle
warm light
#

How to auto update plugin?
anyone can give me only java code?

spiral light
#

noone will give you just code xD

#

?spoon

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

trim creek
#

I don't think doing an auto-update code would do soo good

#

mostly if your plugin is premium

#

One leak, and everyone has the latest one

bold copper
spiral light
#

but you have to put it in a special place since it will not probably work to just replace a running jar

tardy delta
#

people nowadays just copy github stuff

#

:(

trim creek
#

๐Ÿคฃ

#

I usually try to figure everything out. c.c

#

by myself

quaint mantle
#

It is not a good idea. What would happen it someone will hack your server and inject malware code in jars? People will get their servers hacked.

glossy marsh
tardy delta
trim creek
#

then dont believe that

#

๐Ÿ˜›

tardy delta
#

๐Ÿฅถ

quaint mantle
glossy marsh
spiral light
quaint mantle
#

๐Ÿ™ƒ

bitter ridge
#

Hello! Which ItemFlag is the "When on body"?

golden turret
#

hide_attrbutes

spiral light
#

?jd

bitter ridge
#

Idk why but I can't make it disapper

quaint mantle
#

You wanna hide it? HIDE_ATTRIBUTES

bitter ridge
quaint mantle
#

Show your code

ivory sleet
bitter ridge
#

Can be bit confusing but it should work

quaint mantle
#

hmm

#

Try adding a random attribute modifier

spiral light
#

i hope you dont loop through all kits every time you want to check smth for a player O.O

bitter ridge
#

FreeSoccerHDX no I don't. Also I figured it out I had a typo right in front of this part of code ๐Ÿ˜…

obtuse ferry
#

why cant I do that

wide imp
#

am i the only one having this issue

#

43 minutes

paper inlet
#

I need Help my Spigot Server have Log4j who can i fix that?

trim creek
#

as i know

bold copper
young knoll
#

Or just update spigot

trim creek
#

#latestmcisalwaysgut

#

But is sometimes annoying that some devs doesn't supports older versions

young knoll
#

1.8.8 - 1.18 is patched

trim creek
#

1.8.9 is probably used because of it has the best pvp mechanic

#

And it also doesn't require as many resources as 1.18.1

#

.-.

spiral light
#

well if you stick to ancient versions with way less functions just because of pvp and less resources (which shouldnt be a problem) you shouldnt blame ppl for not supporting this version xD

#

even the average modpack-server-version is ~1.12

trim creek
#

irk

#

I have only one project that runs on 1.8

#

Most of my projects already runs on 1.16.5 or 1.18.1

olive crescent
#
      if (var0 < 6) {
         return 0;
      } else if (var0 < 15) {
         return 1;
      } else {
         return var0 < 24 ? 2 : 0;
      }
   }``` Can someone explain to me what this is doing?
spiral light
vernal minnow
#

what can I do if the intellij compiler does not give any output in the plugins folder? (I've changed the path several times but it didn't help)

tardy delta
#

does the JavaPlugin#getLogger one supports color codes?

tacit drift
#

just found out that lombok is hella useful

vernal minnow
#

yes it is

tacit drift
#

@Data is op

tardy delta
#

what does it do

vernal minnow
#

automaticly setting getter and setter

tacit drift
#

makes getters setters equals and toString methods

#

and something with hash code, forgot what exactly

tardy delta
#

oh

eternal oxide
#

It can be useful. It can be annoying too

#

I have used it at times, but I got too annoyed with it to use it these days

tacit drift
#

and if you don't want to have lombok make your jar bigger, intellij can just generate the methods from @Data

tardy delta
#

i was confused when analyzing code with it

eternal oxide
#

It makes your IDE really slow to start up too

tacit drift
#

oh

#

didn't know that aPES_Eyes

lost matrix
obtuse ferry
#
Location location = player.getLocation();
float yaw = location.getYaw();
location.setYaw(yaw+20);

why is this doing absolutely nothing

#

I have a message output so I know its 100% running

lost matrix
kind hatch
obtuse ferry
#

I thought it modified it directly because google

#

Ty

tardy delta
#

how do i supress npr warnings?

#

this didnt work

supple token
#

For some reason my entire intellij decided to break

#
package github.clerickx.BoologamCheif.listeners.minecraft;

import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.appender.AbstractAppender;
import org.apache.logging.log4j.core.config.plugins.Plugin;
import org.apache.logging.log4j.core.layout.PatternLayout;

@Plugin(name = "ConsoleCapture", category = "Core", elementType = "appender", printObject = true)
public class ConsoleCapture extends AbstractAppender {

    public ConsoleCapture() {
        super("ConsoleCapture", null, PatternLayout.newBuilder().withPattern("[%d{HH:mm:ss} %level]: %msg").build(), false);
    }

    @Override
    public boolean isStarted() {
        return true;
    }

    @Override
    public void append(LogEvent e) {
        // Do something with text
    }
}
#

I was doing this log4j appender for my jda plugin

tardy delta
#

unchecked didnt work either

supple token
#

And the append had some related problems

supple token
tardy delta
#

no this shit

eternal oxide
#

always check for null if it can happen

tardy delta
#

its on Bukkit.getPluginCommand which is nullable

supple token
#

Well nvm my issue is fixed

eternal oxide
#

then adjust your warning levels in your IDE

tardy delta
#

hmm cant you supress it?

eternal oxide
#

no

#

its an IDE warning

tardy delta
#

o

eternal oxide
#

inteliJ specifically. Eclipse gives no warning

worldly ingot
#

It does, if you have it enabled

eternal oxide
#

I believe off is default though

worldly ingot
#

Correct

lost matrix
tardy delta
#

lmao

#

yea i know that but it looks ugly :D

#

lemme do that then

tacit drift
tardy delta
#

mwoa right

tardy delta
#

is an tabcomplete event triggered when an user doesnt have permission to execute a command?

#

like when you enter a command and like the player list comes up

#

you can override it tho

vague swallow
#

How can I read a UUID from a config?

#

@ivory sleet Can you help me please?

tardy delta
#

UUID.fromString(config.getString("key"))

vague swallow
#

ty!

tardy delta
#

poor conclure he got a ping :(

vague swallow
#

He said we should ping him if we need help D:

#

sorry Conc

tardy delta
#

so options are shown?

tender shard
#

no

tardy delta
#

the list to show is empty?

tender shard
#

the event gets called but bukkit doesn't send anything by default if a player doesn't have the permissions

tardy delta
#

ah i understand

#

i'll try it out to be sure

#

after i fix 200 errors lol ๐Ÿ˜‚

#

thanks :D

nova hare
lost matrix
nova hare
#

thats not on join

#

thats on /server

lost matrix
#

Oh. In that case:

Not setting up the default or fallback server properly

nova hare
#

It seems to be set

#

hmmm

#

yeah its set

tardy delta
#

would anyone knows what the @MustBeInvokedByOverriders annotation does?

#

org.jetbrains

tardy delta
#

ooh there are the docs i couldnt find them

buoyant viper
#

probably means a parent method that was overriden MUST be called thru super

tardy delta
#
The annotation should be applied to overridable non-abstract method and indicates that all the overriders must invoke this method via superclass method invocation expression. The static analysis tools may report a warning if overrider fails to invoke this method.```
#

ah super yea

muted sand
#

sorry for the late reply
but it has an infinite loop

lost matrix
muted sand
#

oh
fair enough i suppose.. thanks!

red sedge
#

How can I add hex colours to strings?

#

idt translateAlternateColorCodes works

tardy delta
#

does ChatColor.of(hex) works?

spiral light
#

if you mean valueOf its a no

tardy delta
#

wait no i cant find that method

#

rgb works

spiral light
#

your talking about bunge ChatColor ^^

tardy delta
#

oh its the net.md_5 import for ChatColor.of

#

just figured out

#

i never know which one to use

quaint mantle
#

Is location.toBlockKey a thing in spigot?

#

?jd

quaint mantle
#

ok its not

red sedge
#

what is toBlokcKey

spiral light
#

probably just a string of xyz of the block

lost matrix
#

Its the x, y and z coordinate bit shifted into a long

spiral light
#

does this even work for each block in the world ??

visual tide
#

i think so?

#

max long is 9quint

trail dragon
#

Is there an INSTANT_HEALTH type to PotionEffectType?

#

If so I can't find it

spiral light
#

?jd

trail dragon
#

Checked there

lost matrix
#

HEAL

visual tide
#

if you want to heal the player just change the health value

trail dragon
#

Im trying to check if a player has splashed a potion of that type

lost matrix
#

HEAL

trail dragon
#

Ah yeah, I've just seen that, thank you!!

tardy delta
#

is vanishing an user something for an user impl or an vanishmanager?

sterile token
#

I would do it like: PlayerData + PlayerManager

#

Depending of what you are doing

tardy delta
#

i already moved my code out of my command class :D

sacred mountain
#

hey whats an equavalent of event.getBlock(); for 1.8? i cant find anything on it

lost matrix
vocal cloud
sacred mountain
#

:/

sterile token
#

And Pvp on 1.8x up its yet

quaint mantle
#

ok

vocal cloud
#

Sigh. Why are people reinventing the wheel on these things

lost matrix
visual tide
#

that number seems oddly low

woeful crescent
#

augh, help!!!!

visual tide
#

very specific

woeful crescent
#

my friend im working with pulled from github and lost a ton of progress

tardy delta
#

can two entities on the same server have the same uuid?

#

because of this in the craftplayer class which also checks id

visual tide
sterile token
#

I think no because uuid are uniqe

woeful crescent
#

What does that do

visual tide
#

kinda undo the pull

tardy delta
#

it doesnt really matter i was just looking at the equals method

sterile token
sacred mountain
lost matrix
sacred mountain
#

im trying to make a plugin that only allows players to pickup player placed water

#

using a list

lost matrix
visual tide
#

players overloading your server with tons of water bucket placing go brr

tardy delta
#

ah nice

sacred mountain
#

whats a better way then

visual tide
#

a db might be a bit drastic but a possible solution

sacred mountain
#

idk how to do that

tardy delta
#

uhm is a water block hosting a tilestate?

#

wait this sounds stupid

spiral light
#

yes just create your own cache databse with socket connection

tardy delta
#

"having"

tacit drift
#

store it in a yml/json

#

get the list onEnable

#

cache it

tardy delta
#

i'd say save it in pdc or chunk pdc as i did with block locks

sacred mountain
#

im just trying to make it so that players cant pickup liquids that were already there

spiral light
#

java socket client/server
channel system it rly goes brrrr

visual tide
#

what 14 said

sacred mountain
visual tide
#

?pdc

lost matrix
# sacred mountain whats a better way then

This is a quite complicated problem. You need a way of storing player placed blocks in a persistent and performant way.
You can take a look at this:
https://www.spigotmc.org/threads/tracking-blocks-that-were-placed-by-players.500216/

tardy delta
#

Chunk#getPersistentDataContainer

left swift
#

what is the best way do to sth in my entity tick() method every for example 10 ticks? creating a counter that increments by one every tick and checking that the counter is equal to 10 is a good idea?

tacit drift
#

there is no pdc in 1.8

tardy delta
#

omg go to the shame corner

visual tide
sacred mountain
#

im jus tryna make it simple

tacit drift
#

he needs 1.8

sacred mountain
#

is that the only way

quaint mantle
#

Hahahahahahaha!! You cant use pdc on 1.8!!! Suffer in awful world you created by yourself!!!!!

crisp forum
#

is there any shorter way of:

player.sendMessage(Bukkit.getPluginManager().getPlugin("plugname").getConfig().getString("bla"));
tacit drift
#

no

lost matrix
tacit drift
crisp forum
#

I want to take my own plugin's config

tacit drift
#

but if it's your plugin, get the instance of the onEnable method

visual tide
tardy delta
#

its tricky

lost matrix
quaint mantle
#

Flo0 i remember your persistent block api

crisp forum
spiral light
#

String s= remainlength*" ";
Is there a method that easy can do this ^^

sterile token
tardy delta
quaint mantle
tardy delta
#

nah

spiral light
spiral light
tardy delta
#

isnt that an newer java version?

sterile token
spiral light
#

threads ^^

sterile token
#

Thread locking will be the correct term

spiral light
#

no... just use more threads xD

lost matrix
sterile token
#

And no solution finded

sterile token
sacred mountain
spiral light
sacred mountain
#

i tested it and it seems to work

lost matrix
sterile token
#

Using libs it make my plugin wieghter

spiral light
#

well... you could use your own experience to create something and learn how to do it.... or you just use 7smile7 lib ๐Ÿ˜„

sterile token
#

But i cannot understand the thread locking

#

That fuck me arround 2 weeks

spiral light
#

my SimpleSocket is 112KB and more then 50% is just JSON

lost matrix
sterile token
quaint mantle
spiral light
sterile token
#

So its really yeat

spiral light
#

its always a bad idea to wait for a response from a socket and lock something while that

lost matrix
sacred mountain
#

so is it a bad idea to use a yml file and store it that way?

woeful moon
#

I'm getting a No suitable driver found for jdbc [...] error when trying to make a h2 database. Already added the maven dependency:

        <!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>2.0.206</version>
            <scope>test</scope>
        </dependency>

Been trying to fix this for 30 minutes now but couldn't find anything.

tardy delta
#

only 30 minutes ๐Ÿ˜ณ

sterile token
spiral light
#

what

#

yes

lost matrix
quaint mantle
#

O(n)

sacred mountain
#

about 30x30 blocks

spiral light
deft spire
#

Hey all!
On the EntityDamageByEntity event I checked if the damager instanceof Trident and when it hits something I want to alter the itemstack, how would one get the mutable itemstack of the trown trident (with or without NMS, MC version 1.17.1)

spiral light
#

do you rly need nms for that ?

#

?jd for me

lethal coral
#

Is there a popular resource like BungeePackets that can be used to play sounds and such through a proxy?

sterile token
deft spire
#

idk, i tried the methods of paper of retrieving the itemstack of the trident, but to no succes

lost matrix
sacred mountain
#

but for watrer

spiral light
left swift
#

what is the best way do to sth in my entity tick() method every for example 10 ticks? creating a counter that increments by one every tick and checking that the counter is equal to 10 is a good idea?

lethal coral
spiral light
left swift
#

so can i use nms counter somehow or better to create my own?

woeful moon
spiral light
quaint mantle
#

Ot do you use hikaricp?

woeful moon
spare violet
#

is eventpriority matters for ignorecancelled?

quaint mantle
#

yes

spare violet
#

how can I ABSOLUTELY ignore it when cancelled

sterile token
woeful moon
quaint mantle
quaint mantle
woeful moon
#
    public static Connection getConnection() {
        // method to return the connection
        Connection connection = null;
        try {
            Class.forName(org.h2.Driver.class.getName());
            connection = DriverManager.getConnection(SpigotDatabaseTutorial.getConnectionURL());
        } catch (SQLException | ClassNotFoundException ex) {
            ex.printStackTrace();
        }
        return connection;
    }
```?
quaint mantle
#

Yep

woeful moon
#

awesome i'll try that

spiral light
woeful moon
#

@ manya it worked, thanks so so much!

spare violet
quaint mantle
#

Then HIGHEST

patent horizon
#

how could i put all the realtime locations of online players on an (item) map?

#

like this thing but for every player

trail dragon
#

Any reason why this code wouldn't work?

@EventHandler(
            priority = EventPriority.HIGHEST,
            ignoreCancelled = true
    )
    public void PotionSplashEvent(PotionSplashEvent e) {
        Player p = (Player) e.getPotion().getShooter();
        if (p.hasPermission("mcba.playing")) {
            for (PotionEffect potion : e.getPotion().getEffects()) {
                if (potion.getType() == PotionEffectType.HEAL) {
                    if (e.getPotion().getShooter() instanceof Player) {
                        int value = (Integer)this.score.get(p);
                        this.score.replace(p, value + 1);
                        Bukkit.broadcastMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "MCBA > " + ChatColor.RESET + "" + ChatColor.YELLOW + p.getName() + "'s" + ChatColor.RED + " splashed health pot" + ChatColor.YELLOW + " (" + ChatColor.BOLD + "" + this.score.get(p) + " Points" + ChatColor.RESET + "" + ChatColor.YELLOW + ")");

                    }
                }
            }
        }
    }
sterile token
trail dragon
#

Just simply doesn't work, plugin builds fine, no errors in console.

spare violet
dreamy idol
#

which particles are the potions particles? Particle.SPELL?

mint mesa
#

Hey folks. I'm just practicing a bit of programming with the basics and am currently making a spawn plugin.I saved my coords and world to a config.yml file and have this

However, when i try to use /spawn, I get a NullPointerException on line 31

#

any ideas xd

spiral light
#

is it allowed to save the World ??

#

i think you wanne save the World-Name

brave sparrow
#

Yeah you donโ€™t want to save the world object

dreamy idol
mint mesa
#

oh so I dont use loc.getWorld() I use loc.getWorld().getName() instead

#

thanks guys

#

:D

rancid snow
#

is there a way to know when seeds get broken due to jumping on the block?

spiral light
#

PlayerInteractEvent

rancid snow
#

would that be like this?

brave sparrow
#

Yup

#

Same thing for pressure plates

rancid snow
#

is there no way to just know when any block's state changes?

#

or is broken

tall nova
#

Does anyone how I can include duplicate dependencies in maven?

brave sparrow
#

Thereโ€™s not one event that will do that no @rancid snow

brave sparrow
tall nova
brave sparrow
#

That isnโ€™t a duplicate dependency then

#

Thatโ€™s multiple versions of a dependency

tall nova
#

I see, is it possible to include multiple versions of the same dependencies?

#

Because maven registers them as duplicate dependencies

brave sparrow
#

Nope

#

Lol

#

Maven doesnโ€™t allow it

tall nova
#

Yikes

#

Guess I have to stick with multi modules

brave sparrow
#

Use modules for it yeah

#

It would be bad if maven let you do that

tall nova
#

True true

rancid snow
#

if someone breaks for example a door and I log that blockbreakevent, I can restore that door alone, but how can I for example log that if someone broke a bottom sugarcane the whole stack broke

#

or if someone broke a door both halves broke

#

same with beds

tall nova
brave sparrow
#

You can track BlockPhysicsEvent

tall nova
red sedge
#

so

    public static String hex(String message) {
        Pattern pattern = Pattern.compile("#[a-fA-F0-9]{6}");
        Matcher matcher = pattern.matcher(message);
        while (matcher.find()) {
            String hexCode = message.substring(matcher.start(), matcher.end());
            System.out.println(hexCode);
            ChatColor color = ChatColor.of(Color.decode(hexCode));

            message = message.replace(hexCode, color + "");
            matcher = pattern.matcher(message);
        }
        return ChatColor.translateAlternateColorCodes('&', message);
    }

I got this function right it works kinda like when I put
"#8bde6a โ€”โ€”โ€”โ€”โ€”โ€”โ€” #ded26a&lโ˜€ #8bde6aโ€”โ€”โ€”โ€”โ€”โ€”โ€” "
it works flawlessly right
but when I put
" #b978ebGel: "
It just acts as if it was just the last letter so &e

spiral light
#

did you try to copy bungee.ChatColor ?

red sedge
#

hm?

rancid snow
brave sparrow
#

BlockBreak

rancid snow
#

ok good

brave sparrow
#

If you cancel the block break then the block doesnโ€™t get broken

#

And then the physics never happens

rancid snow
#

so I can log when a player breaks a block, then check if the baseblock is in the collection from the physics event

red sedge
#

Wait quick question, can Score's not get hex values?

red sedge
spiral light
tall nova
#

The ChatColor from the bungeecord library

sterile token
#

is correct doing?

if (!(Player instanceof sender)) {
  sender.sendMesssage("No console");
  return false;
}
if (other code) {
}
sterile token
#

instead of doing joining if that are unredeable

red sedge
spiral light
#

just copy the function

tall nova
#

You shouldn't name your variables uppercase, java will get confused because there is a class with the same name

tall nova
#

and also you should be checking if the commandsender is an instance of Player

tall nova
#

The first letter should never be capital in a variable unless its a constant

sterile token
#

He?

tall nova
#

?

sterile token
#

First Player -> its from the Object like no variable

#

Its the Player.class

tall nova
#

Ah I see

#

but you have to switch them

sterile token
#

Why??

tall nova
#

if (!(sender instanceof Player))

sterile token
#

Ahh allright

tall nova
#

Because it wouldnt make sense to check if the class is an instance of a variable

sterile token
#

But its no wrong using (!(var instanceof Object)) ?

#

Cuz someone said its look really strange

tall nova
#

No thats the correct syntax

sterile token
#

Yeah if not i would need to do joning if

red sedge
# spiral light just copy the function
  public static ChatColor of(String string) {
    Preconditions.checkArgument((string != null), "string cannot be null");
    if (string.startsWith("#") && string.length() == 7) {
      int rgb;
      try {
        rgb = Integer.parseInt(string.substring(1), 16);
      } catch (NumberFormatException ex) {
        throw new IllegalArgumentException("Illegal hex string " + string);
      } 
      StringBuilder magic = new StringBuilder(");
      for (char c : string.substring(1).toCharArray())
        magic.append(').append(c); 
      return new ChatColor(string, magic.toString(), rgb);
    } 
    ChatColor defined = BY_NAME.get(string.toUpperCase(Locale.ROOT));
    if (defined != null)
      return defined; 
    throw new IllegalArgumentException("Could not parse ChatColor " + string);
  }``` is this it
tall nova
spiral light
red sedge
sterile token
red sedge
# spiral light this basically makes the color you now need to apply it to a complete string

sooo sorry ik im annoying but java public static String hex(String message) { Pattern pattern = Pattern.compile("#[a-fA-F0-9]{6}"); Matcher matcher = pattern.matcher(message); while (matcher.find()) { String hexCode = message.substring(matcher.start(), matcher.end()); System.out.println(hexCode); ChatColor color = ChatColor.of(hexCode); message = message.replace(hexCode, color + ""); matcher = pattern.matcher(message); } return ChatColor.translateAlternateColorCodes('&', message); }

red sedge
#

hm?

sterile token
#

for Spigot colors and bungee its used the & character

lavish hemlock
#

You should put your Pattern outside of the method so it's only compiled once.

tall nova
#

Its different

sterile token
#

Ahh

#

You can use hex?

lavish hemlock
#

As of 1.16, yeah

tall nova
#

I think he is trying to convert hex into chatcolor

tall nova
quaint mantle
#
  • "" cringe!
sterile token
#

Its so diffcult to do an implementation of Hex on 1.8x?

quaint mantle
#

what

#

hex is not supported on 1.8

sterile token
lavish hemlock
#

Adventure does it by downscaling to one of the 16 colors

tall nova
#

Ah makes sense

quaint mantle
#

Mojang will never do it

sterile token
#

But wait the problem of hex its caused by SpigotAPI or Mojang

#

I dont understand that

quaint mantle
#

what problem

#

Hex colors are supported on 1.16+ clients only

sterile token
#

Ahh

#

So if make an implementation of Hex color on 1.8x wont work. Cuz i depend from the client right?

quaint mantle
#

yes

sterile token
#

Ah

quaint mantle
#

reject legacy accept modern minecraft

red sedge
#

reject ancient versions

#

they're ancient for a reason

quaint mantle
#

but pvp!!!!

tall nova
#

X

#

D

red sedge
#

its a fucking 6 old version

tall nova
#

ProtoclSupport is nice

#

lets 1.4.7 players connect

#

lmao

quaint mantle
red sedge
red sedge
tall nova
#

But it is still cool

red sedge
#

bro todays versions are so weak

#

go back to alpha 0.1

tall nova
#

fr

red sedge
#

still the same issue

#

ohhh

#

I found the issue

golden turret
#

create multiple modules

#

and each module

tall nova
#

Yeah I know I did that

red sedge
#

I believe Team.addEntry() does not support hex

golden turret
#

will use 1 version for the dependency

tall nova
#

I was tryna find an easy way out without module s

#

And hey wizardlybump it's me theoriginalase

golden turret
tall nova
#

I remember you from senior team

#

I accepted u

golden turret
#

๐Ÿค”

#

did you changed discord?

tall nova
#

So I have to use this one

golden turret
#

do you remember your old discord name and tag?

tall nova
quaint mantle
golden turret
#

what about id

quaint mantle
#

If youre about set Color

tall nova
#

Like the developer I'd?

#

I'd*

#

Id*

golden turret
#

nvm

#

i found your discord

tall nova
#

Yea am still in the servers

red sedge
#

i believe the suffix supports hex

balmy gale
#

yo how do i store playerdata (such as coins or levels)

red sedge
tall nova
sterile token
balmy gale
#

ty!

tall nova
#

Was persistent data containers always a thing?

red sedge
#

i mean

#

yes till the point it was added

tall nova
#

...

#

What version lol

balmy gale
#

which is the easiest to implement

red sedge
#

PDC

balmy gale
#

ok!

#

i am a beginer lol

red sedge
#

but if youre storing a lot of data

#

probably make your own files

balmy gale
#

wdym alot

red sedge
#

ike

balmy gale
#

what counts as alot

red sedge
#

like

#

id say more than 5 different values

trail dragon
#
    @EventHandler(
            priority = EventPriority.HIGHEST,
            ignoreCancelled = true
    )
    public void PotionSplashEvent(PotionSplashEvent e) {
        ThrownPotion potion = (ThrownPotion) e.getEntity();
        Player p = (Player) e.getPotion().getShooter();
        if (p.hasPermission("mcba.playing")) {
            if (potion.getItem().getType() == Material.SPLASH_POTION) {
                Collection<PotionEffect> effects = potion.getEffects();
                for (PotionEffect effect : effects) {
                    Bukkit.broadcastMessage(String.valueOf(effect));
                    PotionEffectType potionType = effect.getType();
                    if (potionType == PotionEffectType.HEAL) {
                        int value = (Integer) this.score.get(p);
                        this.score.replace(p, value + 1);
                        Bukkit.broadcastMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "MCBA > " + ChatColor.RESET + "" + ChatColor.YELLOW + p.getName() + "'s" + ChatColor.RED + " splashed health pot" + ChatColor.YELLOW + " (" + ChatColor.BOLD + "" + this.score.get(p) + " Points" + ChatColor.RESET + "" + ChatColor.YELLOW + ")");
                    }else{
                        Bukkit.broadcastMessage("bruh");
                    }
                }
            }
        }
    }

hm, this code outputs 'bruh' whenever i throw a splash potion of health, but i just cant figure out why

quaint mantle
balmy gale
vocal cloud
trail dragon
#

alright

#

Added this code: Bukkit.broadcastMessage("Effect Type: " + potionType);

Output:

[16:53:25 INFO]: HEAL:1t-x0
[16:53:25 INFO]: Effect Type: PotionEffectType[6, HEAL]
sterile token
balmy gale
#

oke

sterile token
#

if you need help just dm me

vocal cloud
#

The best chance for someone to get help is to ask in an open forum not dming

sterile token
balmy gale
vocal cloud
#

Or via asking in a channel and @ mentioning is easy and fast as well

sterile token
#

If need help just tag me or dm

thick drum
#

Hey everyone, probably a dumb question, but how do I add maven dependencies? I'm in Eclipse if that helps.

sterile token
#

I never used Eclipse with maven i never do it working

trail dragon
#

Hey @sterile token could you help me with my issue? / do you have any ideas

brave sparrow
#

Eclipse works just fine with maven

sterile token
brave sparrow
sterile token
sterile token
brave sparrow
#

Any IDE is going to work with maven

trail dragon
thick drum
brave sparrow
#

Ok, so you have a POM?

sterile token
trail dragon
#

I basically need a way to check the type of a splash potion, that works.

red sedge
#

but i think yml is the easiest to get into

trail dragon
#

I want it to run the code

 int value = (Integer) this.score.get(p);
                        this.score.replace(p, value + 1);
                        Bukkit.broadcastMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "MCBA > " + ChatColor.RESET + "" + ChatColor.YELLOW + p.getName() + "'s" + ChatColor.RED + " splashed health pot" + ChatColor.YELLOW + " (" + ChatColor.BOLD + "" + this.score.get(p) + " Points" + ChatColor.RESET + "" + ChatColor.YELLOW + ")");

whenever i splash a health pot

balmy gale
# red sedge yes sorry

no need to apologize there's enough people here that my question was answered relatively quickly

#

:)

thick drum
red sedge
brave sparrow
balmy gale
#

will do :)