#help-development

1 messages · Page 117 of 1

drifting halo
#

the compiler plugin

quaint mantle
drifting halo
#

try 3.9.0

quaint mantle
#

as java version?

#

oh

#

im dumb

#

one sec

#

same erropr

#

unsupported class file major

drifting halo
#

i remember having it too but i forgot how i fixed it

quaint mantle
#

yeah im looking at that rn

#

nope

#

:/

#

bro this is dumb

#

why isn't this working

drifting halo
#

probably PEBKAC

tall dragon
#

@quaint mantle did you try actually editing the module sdk

desert frigate
#
    public static boolean isLocationInArea(Location location, Location pos1, Location pos2) {
        if(location == null || pos1 == null || pos2 == null) return false;
        double locationX = location.getX();
        double locationY = location.getY();
        double locationZ = location.getZ();
        double pos1X = pos1.getX();
        double pos1Y = pos1.getY();
        double pos1Z = pos1.getZ();
        double pos2X = pos2.getX();
        double pos2Y = pos2.getY();
        double pos2Z = pos2.getZ();
        return locationX >= pos1X && locationX <= pos2X && locationY >= pos1Y && locationY <= pos2Y && locationZ >= pos1Z && locationZ <= pos2Z;
    }``` what am i doing wrong? im just trying to check if a player is inside of a area but it keeps returning false.
tall dragon
#

e.g double pos1X = Math.min(pos1.getX(), pos2.getX());

desert frigate
# tall dragon u need to get the min and max values for the 2 positions
double locationX = location.getX();
        double locationY = location.getY();
        double locationZ = location.getZ();
        double pos1X = Math.min(pos1.getX(), pos2.getX());
        double pos1Y = Math.min(pos1.getY(), pos2.getY());
        double pos1Z = Math.min(pos1.getZ(), pos2.getZ());
        double pos2X = Math.max(pos2.getX(), pos1.getX());
        double pos2Y = Math.max(pos2.getY(),pos1.getY());
        double pos2Z = Math.max(pos2.getZ(),pos1.getZ());```
like this?
gray merlin
#

What should I use instead of SetDurability?

upper vale
#

i think its setdamage

quaint mantle
#

Thoughts in my timer ( aka cooldown ) api. This is a simple command cooldown

      @Override
      public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {

        if (!(sender instanceof Player)) return true;
        Player plr = (Player) sender;

        Timer timer = TimeAPI.getTimer(plr.getUniqueId().toString());
        if (timer != null) {
            AutoTimer autoTimer = TimeAPI.getAutoTimer(timer);
            Other.sendMiniMessage(plr, "<gray>Timer Testing: <color:#5de37a>" + autoTimer.getFormattedTimeLeft());
        } else {
            timer = new Timer(plr, plr.getUniqueId().toString());
            timer.setTime(TimeAPI.addToTimespan(timer, 0L, Timer.Time.MINUTES, 1));
            timer.create();
            new AutoTimer()
                    .setTimer(timer)
                    .setUpdateTimer(20L)
                    .removeTimePerUpdate(Timer.Time.SECONDS, 1)
                    .createAutoTimer();
        }
        return true;
    }
boreal python
#

can setMetadata() be used to give an item tags?

golden turret
#

how to use the PacketPlayOutMultiBlockChange? What are these values

dusk flicker
golden turret
#

yea but I mean in the NMS

#

how to generate these values

dusk flicker
#

who knows ¯_(ツ)_/¯

golden turret
#

I dont

#

that is why I am here

#

(╯°□°)╯︵ ┻━┻

echo basalt
#

check around here

#

@golden turret

golden turret
#

alright

#

basically I want to send to the client a massive block update

echo basalt
#

uhh

golden turret
#

should I use the PacketPlayOutMultiBlockChange?

echo basalt
#

if you're making fake blocks I already have code for most of that

candid merlin
#

How do you enable mmocore abilities/skills to damage players

echo basalt
#

including pasting schematics and having anti-disappear functionality

golden turret
#

Lets say I want to fill that with stone

echo basalt
#

I mean

#

if they are meant to be real blocks, them maybe send the packet and update nms hella fast?

golden turret
#

they will be fake blocks

echo basalt
#

port it to nms

#

idfk

candid merlin
#

@worldly ingot or other staff or peeps How do you enable mmocore abilities/skills to damage players

echo basalt
#

but basically

EditSession session = new EditSession(tracker, topLeft, bottomRight, player);
session.setType(Material.STONE)
session.apply();

would fill that area yeah

#

you can just port the protocollib -> nms packet stuff

golden turret
#

cries on obfuscated

echo basalt
#

use a ShortSet instead of a short[]

#

use nms blockdata instead of protocollib's wrappedblockdata

#

ffs this is not hard at all

quaint mantle
#

How would i make a thing like this in my api

testing.CodeToRun({
         // Code here
})```
echo basalt
#

runnable

quaint mantle
echo basalt
#

just look into functional interfaces

quaint mantle
#

Alt

#

Alr

lost wolf
#

I'm trying to use the method

sendMessage(@NotNull
ChatMessageType position,
@Nullable
UUID sender,
@NotNull
BaseComponent component)

in Player.Spigot, but it doesn't seem to exist on the 1.9.2-R0.1-SNAPSHOT version

#

Although the javadoc says it does

lost matrix
#

This method is part of Player.Spigot. Not Player.

worldly ingot
#

It most certainly exists ;p How are you calling it?

worldly ingot
#

So if it's not there, you're likely depending on an earlier version of the API

#

Oh, 1.9.2, not 1.19.2

#

Yeah, no, that only existed recently. You don't need an associated sender

lost wolf
#

Oh my god

#

Sorry, my bad

#

Seems I was hungry, cuz I ate the 1

worldly ingot
#

;p

quaint mantle
#

?Scheduler

#

Bruh

#

Scam

lost matrix
#

Wait i thought 1.9.2 must be a typo. Nobody would use that version...

worldly ingot
#

Waiting for Minecraft 2.0 so we don't get confused with 1.(1)x.x anymore

lost matrix
#

Ah it was

worldly ingot
#

welp

#

Can't say I didn't try

hazy parrot
#

?scheduling

undone axleBOT
worldly ingot
#

I was close

hazy parrot
#

What is "custom" ender pearl

warm light
#

is there anyway to short this ?

like automatically get the number from perm?

eternal oxide
#

getEffectivePermissions

kind hatch
#

You could just check the Item's material or make a new ItemStack from the base material and compare with #isSimilar()

warm light
hazy parrot
#

So just filter it with your perm

#

And parse int after the.

#

If you want to put it into var

warm light
#

oh. got it i guess. Let me test

eternal oxide
kind hatch
#

Also, to add onto this, you should really use the PDC to check for custom items that you make. It's far more effective and helps prevent unintentional bugs with item names.

lost wolf
#

How can I convert from a legacy colored text to a BaseComponent?

golden turret
#

i think there is a static method on TextComponent

lost wolf
#

Thanks

thin delta
#

I'm trying to open eclipse, but I don't want to upgrade my java version... I am doing development for version 1.16.5

#

I just updated my eclipse, how do I revert?

lost matrix
#

(Latest)

#

And always keep your IDE up to date. Dont "revert" updates. That would be unwise.

drowsy helm
#

if String != STring

lost matrix
#

Yes. Check if they are not equal... lol

young knoll
#

if (!string.equals(otherString))

thin delta
drowsy helm
#

sorry yeah use equals

drowsy helm
#

1.16.5 supports up to java 16 iirc

#

just use intelliJ 😉

young knoll
#

Pretty sure you can bypass it with a flag

thin delta
#

Yeah, I think I'm going to just switch to intelliJ. I screwed up my eclipse IDE

lost matrix
#

Also: You can have as many java versions installed as you want and then use specific ones for each application

drowsy helm
#

I moved from Eclipse to IntelliJ like 2 years ago

#

never looked back

eternal oxide
#

-jar -DIReallyKnowWhatIAmDoingISwear spigot.jar

#

ah sorry, was only half reading

river oracle
#

Reminds me now that my monitor doesn't have a shit aspect ratio I can try intellij again without the side bars taking 55% of the screen

upper vale
#

You can adjust the sidebars tho

river oracle
#

Removing all the tools bars is less than helpful though

lost matrix
#

You got a 4:3 monitor from 1998?

river oracle
boreal python
#
    @EventHandler
    public void inventoryReplace(InventoryEvent event) {
        if (event.getInventory().contains(Material.RED_WOOL)) {
            ItemStack[] inv = event.getInventory().getContents();
            for (ItemStack i : inv) {
                if (i.getType() == Material.RED_WOOL) {

                }
            }
        }
    }```
Anyone know why I cant use i.setlore() in the if statement?
Any alternatives to clearing the selected items lore?
river oracle
#

Get the item meta

lost matrix
#

^

river oracle
#

Note item meta is immutable

thin delta
river oracle
#

Maven moment

eternal oxide
#

You can export from Eclipse. Why are you usign an old version? You can build for any java target

river oracle
#

Use maven felloe developer

#

It works with eclipse intellij and even the Shit show that is vscode

thin delta
#

I tried to use the M2E plugin, but It literally disappeared from my eclipse IDE... Something was messed up. I'm uninstalling and re-installing

eternal oxide
#

maven is built in to Eclipse these days

river oracle
#

Using vscode is like taking drugs you know you should stop but you can't no matter how hard you try

young knoll
#

Can you even listen to InventoryEvent

#

Isn’t it abstract

floral drum
#

hi coll ❤️

young knoll
#

Yo

quaint mantle
#

Should I move from IntelliJ to VSCode?

#

I remember moving from Eclipse to IntelliJ 😢

thin delta
young knoll
#

Check the eclipse config

#

It may have a hardcoded java path

thin delta
eternal oxide
#

see if it has a -vm ... line. If not add one pointing to your Java 11 bin folder -vm P:/eclipse-multimodule/JDK/jdk-16.0.2+7/bin

eternal oxide
#

xonfig.ini

#

config

thin delta
#

I'm not sure this is the right file

#

Maybe you mean the eclipse.ini file?

eternal oxide
#

yes

thin delta
lost matrix
#

Intellij detects your jdks and also lets you download jdks just for programming usage

thin delta
#

Honestly I just want to try and get my eclipse working....

young knoll
#

Yeah so does eclipse for projects

#

Well, as far as autodetecting anyway

thin delta
#

I don't work in it enough to really care about Intellij being that much better. I just need to get it back working so I can finish this stupid plugin

lost matrix
#

This should be a really trivial problem.
Just install java 17 on your pc and run the server with an older java version

thin delta
#

No no, I'm trying to get eclipse to work again after installing the new version

lost matrix
#

Get the installer from openjdk (Temurin). It sets the installed java version in all the important places for you.

thin delta
#

Ok so

#

I'll just uninstall what I just installed so I can install it again

#

OR

#

I can just figure out where to redirect eclipse to point to the newer version of java

eternal oxide
#

then that path is not correct

thin delta
#

Never mind, I fixed it. I found this same problem. It needs to be added above the -vmargs line

haughty idol
#
            if (partyManager.findParty(e.getEntity().getUniqueId()) == partyManager.findParty(e.getDamager().getUniqueId())) {
                e.setCancelled(true);
            }
        }``` this code doesn't work in an EntityDamageByEntity event. I want it to disable all damage if the player is in a party, but it doesn't work
echo basalt
#

Refactor that a lil

#

Enforce DRY

haughty idol
echo basalt
#

Don't repeat yourself

haughty idol
#

okay

#
            if (partyManager.findParty(entityUUID) == partyManager.findParty(damagerUUID)) {
                e.setCancelled(true);
                return;
            }
        }```
#

is this better

#

?

#

i could just use an && statement actually

echo basalt
#

You can still take it one step further

haughty idol
#
            e.setCancelled(true);
            return;
        }```
#

oh i see what you mean

echo basalt
#

Assign the parties to variables too

#

And while you're at it, rename e to event

haughty idol
#

tf

#

i love using e.getDamager

echo basalt
#

And then do the same process for the rest of the project

haughty idol
#

nahhh

#

sorry but i'm half asleep and do not have the energy to do that lmfao

#

anyways

#
            e.setCancelled(true);
            return;
        }``` this isn't working
echo basalt
#

Maybe compare party ids or use equals

#

Either should do

haughty idol
#

it works everywhere i use it

#

like .equals()?

echo basalt
#

Yeh

haughty idol
#

the == works everywhere i use it

echo basalt
#

Are you sure that the code even gets to this stage tho

haughty idol
#

for party handling

#

hmm

#

i could use this

echo basalt
#

Did you register the listener

haughty idol
#

yes

#

i did

reef lagoon
#

d e b u g

haughty idol
#

i could use this handy dandy thing called sout

echo basalt
#

add a couple sout

#

sout("yes it reaches the stupid if")

#

Should do

haughty idol
#

pain need testers

#

time to beg my brother

echo basalt
#

Get an alt account

#

Or a friend, if you have those

young knoll
#

Offline mode for testing is acceptable

echo basalt
#

No

#

Pay 30 dollars for an account

sacred mountain
sacred mountain
#

🤧

sacred mountain
#

can join, plugins can use that, etc

split smelt
quaint mantle
#

I cannot find any article/tutorial for adding the adventure mode "can break" flag to my itemMeta

How do I do this?

I have my item stack (which is a pickaxe), and item meta

boreal seal
#

what are diffrence between adventure mode and survival mode

#

if u dont mind to give short explanation ;d

#

since maybe there alot easier soluation

#

then using an different game mode and changing events during player within in the game mode

#

please

#

do some research

#

i instatly found it

quaint mantle
#

Yes exactly that, but how would I do it with plugins?

boreal seal
#

u just add nbt tag

#

to the pickaxe

#

😎

#

i would suggest not to stick to adventure game mode

#

instead make the plugin take care of everything

#

would make it way easier

#

as well you cloud set block AIR on breakevent if it contains an lore in the tool

#

there many ways

quaint mantle
quaint mantle
boreal seal
#

❤️ . ❤️

#

u use bukkit colors

#

i dont think sticking to adventure game mode is really something u need

#

its really simple to remake the thing and break the limit the game mode adds

quaint mantle
boreal seal
#

what do you mean?

#

i never used it in the past or even know about it existance before u asked

kind hatch
quaint mantle
#

But it still breaks for a split second

boreal seal
#

it doesnt break

quaint mantle
#

And it would look much nicer if you just cant break it

boreal seal
#

its on client side

#

...

quaint mantle
kind hatch
quaint mantle
boreal seal
#

like was said in that website i guess

#

its not docs so not sure if worthy but go for trial and error

#

and find out

kind hatch
#

I don't believe that you can add NBT data using ItemMeta directly. (Excluding PDC, but it's a different case to begin with) You'll have to use NMS for it, but it shouldn't be that bad. I might be able to dig up something in my old projects.

quaint mantle
boreal seal
#

google it

boreal seal
#

like but slow digging 255

#

on interact

kind hatch
quaint mantle
# boreal seal google it

Ok yea I see the website you are talking about, but that is for vanilla commands, I'm trying to set nbt using Spigot

boreal seal
#

no only if the tool is not require tool

#

he does the check anyway

boreal seal
#

vodka :O?

quaint mantle
boreal seal
#

11

quaint mantle
boreal seal
quaint mantle
#

That adds more itemMeta options

kind hatch
#

Probably, might be the smarter move, but I did find an older method that I made for 1.16.5.

ItemStack item = new ItemStack(Material.WOODEN_PICKAXE);
net.minecraft.server.v1_16_R3.ItemStack customPickaxe = CraftItemStack.asNMSCopy(item);
NBTTagCompound customPickaxeTag = customPickaxe.getOrCreateTag();

NBTTagList list = new NBTTagList();
list.add(NBTTagString.a("minecraft:stone"));

customPickaxeTag.set("CanDestroy", list);
customPickaxe.setTag(customPickaxeTag);
item = CraftItemStack.asBukkitCopy(customPickaxe);
quaint mantle
#

So for the net.minecraft.server thing could I just use ItemStack?

#

Oh wait no I see now

kind hatch
#

No, as they are different ItemStack objects. (As denoted by the usage of the full path) This is the downside of NMS as it also restricts you to version specific code, but you could probably achieve the same result with some form of reflection.

Personally, I code version specific things, but that's just me.

boreal seal
#

block.getType() != Material.STAINED_GLASS && (block.getData() == (byte)5))

#

what i did wrong here

quaint mantle
#

Alright I'll try it out thank you :D

quaint mantle
#

There is only one option for ItemStack

kind hatch
#

Are you using maven?

quaint mantle
#

Yea

drowsy helm
#

not part of the spigot-api dependency iirc

kind hatch
#

You need to depend on spigot instead of spigot-api in your pom in order to use NMS.

quaint mantle
#

Oh ok

kind hatch
#

Also, what version are you developing for?

quaint mantle
#

For the artifactId right? And I'm making it for 1.19.2

kind hatch
#

Yes, for the artifactId. Alright, then let me find the name conversions for 1.19.2

#

You'll also want to use the mojang mappings.

quaint mantle
#

It's already set to spigot-api

kind hatch
quaint mantle
#

Ohh sorry read it wrong

kind hatch
#

Basically, the mojang mappings are the "sane" namings for the methods provided with NMS. Mojang obfuscates their code, so for the longest time, we would have to use methods like player.a.b.b.c to do things. The mappings deobfuscate those names into something much more readable.

The bottom of this post gives you the sections you would need to add to your pom.
https://www.spigotmc.org/threads/spigot-bungeecord-1-19.559742/#post-4422235

kind hatch
# quaint mantle ?

Alright, so it looks like these are the conversions when using the mappings.
NBTTagCompound ---> CompoundTag
NBTTagList ---> ListTag

scarlet creek
#

I’m trying to make a plugin that gives certain items new functions and I’m wondering which option would be better, to put items and their functionality together if they have the same event listeners? Or separate them in their into their own individual classes

kind hatch
#

Personally, I think you should group the functionality together. That way if you want/need to disable a certain item, you can also remove the listeners that go along with it.

quaint mantle
#

Hey guys, how to get nbt data on item?(already exist ) {version: 1.18}

boreal seal
#

its were getData still was used

quaint mantle
kind hatch
#

Pretty much. It would be hard to justify not using it. (If it's available)

quaint mantle
#

Alright

#

Also for changing the dependency to spigot instead of spigot-api everything just goes red

kind hatch
#

Reload your project.

quaint mantle
#

Ah ok

fading lake
#

or if that doesn't work, rescrape buildtools

chrome beacon
#

Also that's not mojmapped

#

You probably want that

quaint mantle
kind hatch
#

Yep

quaint mantle
#

Cool

chrome beacon
#

Don't forget the special source maven plugin

#

Or the plugin jar won't work

kind hatch
chrome beacon
#

or are you still working on saving the inventories?

quaint mantle
#

Saving inventory 🥲 And I think ItemStack#getAsString is only return the string data from nbt

chrome beacon
#

Use PDC like I told you

chrome beacon
#

If you need any help with that just ask

quaint mantle
#

Oh Ok I'll tryit

#

So I changed

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.19.2-R0.1-SNAPSHOT</version>
            <classifier>remapped-mojang</classifier>
            <scope>provided</scope>
        </dependency>
    </dependencies>

And added the special source maven plugin and reloaded the project, but the dependency is still red

kind hatch
#

Then you probably need to run BuildTools again.

#

Oh, you do regardless.

#

You need to run it with the --remapped flag.

#

That way you have those mappings in your local maven repos.

quaint mantle
#

Alright

steady rivet
#

I am working on a config system for a plugin I am making but I am coming across an issue.

How do I get it to not place the class location in the config for the object

Rewards: !!me.wtfblaze.mantlemc.battlepass.serializeobjects.RewardMain
  items: []
hazy parrot
#

Can you show your code

steady rivet
#

yeah one moment

chrome beacon
steady rivet
# hazy parrot Can you show your code
// Class Object
public class RewardItem
{
    public String Item_Name;
    public String[] Lore;
    public boolean PremiumLevel = false;
    public String[] Commands;
}

// Called from my Config Class
public static void Initialize()
    {
        configFile = new File(MantleMCBattlePass.Instance.getDataFolder(), "Rewards.yml");
        boolean createdConfig = false;
        if (!configFile.exists())
        {
            try
            {
                configFile.createNewFile();
                createdConfig = true;
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
        config = YamlConfiguration.loadConfiguration(configFile);

        if (createdConfig)
        {
            RewardItem example = new RewardItem();
            example.Item_Name = "&a&lLevel: 1";
            example.Lore = new String[] { "&7Reward: $500 & 1x Diamond", };
            example.PremiumLevel = false;
            example.Commands = new String[] { "eco give %player% 500" };

            config.set("Rewards", new RewardItem[] { example });

            try {
                config.save(configFile);
            }
            catch (Exception ex){
                ex.printStackTrace();
            }
        }
    }
chrome beacon
#

If you don't want that set each entry yourself instead of storing an object

steady rivet
#

Hmm.

#

alright I'll give it a shot

#

the goal I am trying to achieve with this config is to have a config similar to how ShopGUI+ does it where its a list of the items

kind hatch
steady rivet
#

hmm alright I could try doing that

manic furnace
#

How can I update the config?

kind hatch
#

Can you be a little more specific?

steady rivet
manic furnace
#

yeah to add more

#

if it was deleted by accident or after an update

kind hatch
#

Just add more sections with #set() after you check to see if the section exists.

manic furnace
#

ok thanks

boreal seal
#

is there a way

#

the docs told me to use getData

#

which seem to not work at all

#
getBlock().getData() == (byte)3)
#

so i try to get BlockData

#

not sure how to do it

manic furnace
#

Is there a way to create a wiki for my plugin in spigot?

drowsy helm
#

you can make a github wiki

#

pretty sure spigto wiki is reserved for the api though i might be wrong

manic furnace
#

ok thanks

shadow zinc
#

For anyone that has used adventure text, why is it so large, 2mb is very large

#

Is there any way to not have it so large?

#

(minimizing the jar isn't an option)

boreal seal
#

hm

#

KyTDK

#

dont complie the jar

#

its provided no?

kind hatch
#

It's not provided in spigot.

shadow zinc
#

regardless, I support 1.8-1.19 so I doubt adventure is in 1.8

boreal seal
#

adventure game mode?

boreal seal
#

its the size of it

#

that dogshit uses ton of libraries

#

i dont see a reason to use such a library in first place

#

i dont see a reason to use libraries at all... beside 3 rd plugins that require support..

#

from what i have seen the things this library do is nothing that is hard to achieve without a library

#

i would suggest re code without library if u dont like the size

#

u can either compromise the file using winrar

#

nothing else.

shadow zinc
#

Or alternatively I could upload it to my website as an external source, since the problem I have is spigot won't accept large jars

boreal seal
#

spigot do accept large jars

#

just depends who uploads it

#

is this a paid resource?

shadow zinc
#

no

shadow zinc
boreal seal
#

no its not about it

#

is this a paid resource?

shadow zinc
#

no

kind hatch
boreal seal
#

its like the thing with obsf

shadow zinc
#

no

boreal seal
#

only premium resources are allowed to do it

shadow zinc
#

adventure is 2mb

boreal seal
#

dont use shit libraries have less things to deal with ;/

kind hatch
boreal seal
#

i mean

#

wait actually

kind hatch
#

Well, there you go. 6 > 4

boreal seal
#

KyTDK make it download the libraries...

#

but nah he have 6mb

#

for real

shadow zinc
#

it has a lib folder

#

and I can't use plugin.yml libraries because I, again, support 1.8

boreal seal
#

i use 1.8 as well

#

...

#

and what u have done

#

wait what are u actually trying to do

#

cloud u write quick concept?

shadow zinc
#

I have lib called NeoUtils which has adventure embedded in it

#

this makes my NeoUtils 3mb

#

I have another plugin which uses neoutils

#

the size of this plugin stays around 3mb

#

This plugin is a config plugin which is also a lib

#

I use that plugin for my final plugin

#

so it goes above 4mb

kind hatch
#

If NeoUtils is a library that you depend on, why are you shading it into your plugin?

kind hatch
#

Instead of making it a standalone plugin library.

shadow zinc
#

make it a requirement?

boreal seal
#

stop usling libs

shadow zinc
#

bruh

#

its my lib

boreal seal
#

nah

shadow zinc
#

its fine

boreal seal
#

libraries arent soluation

#

at all

#

then dont compile it

shadow zinc
#

no one said they are solutions

#

they make life easier

boreal seal
#

wrong

#

you use libraries for really no reason

shadow zinc
#

?

boreal seal
#

now deal with the size

shadow zinc
#

are you trolling?

boreal seal
#

no im serious

#

i would understand if u use an library like HikariCP

#

but not what u do

#

💀

shadow zinc
#

adventure is great is you disregard the size

boreal seal
#

you use util plugin

#

and u use libraries in it

shadow zinc
#

my library is actually really useful

boreal seal
#

your library uses more 8 libraries

shadow zinc
#

instead of worrying about size and possibly takes an hour to fix it, I would still be writing the same code

boreal seal
#

you probably abuse static as well

#

;/

#

then make it download the libarries

#

instead of compiling the

shadow zinc
#

I don't actually, but thanks

boreal seal
#

and it has nothing to do with version

#

to make it download libraries

shadow zinc
#

and these are the 3 dependencies my library has

#

2 aren't even included

boreal seal
#

make it provided

#

and download them.

shadow zinc
#

yeah I was thinking about doing that

boreal seal
#

its pretty simple soluation

#

good luck

#

home work not gonna kill u

hazy parrot
#

I mean it will take space anyway ¯_(ツ)_/¯

boreal seal
#

yeah but he will be able to upload it to spigot

#

lol

#

Goksi i was wrong about abusing libraries is not healthy

#

??

#

like this guy

#

got 9 libraries

#

to make a util plugin

hazy parrot
#

Oh you can't upload large files to spigot?

boreal seal
#

you are limited yeah..

hazy parrot
#

"large"

kind hatch
#

4MB or less

boreal seal
#

4mb is huge..

shadow zinc
boreal seal
#

adventure uses 6

#

lol

#

and u use adventure + 2

#

or 3

#

not sure i dont remember

#

around 7-9 100%

shadow zinc
#

the only library I shade is adventure, nothing else

kind hatch
#

Bro, you gotta be trolling or smth. He only has adventure as a real dependency.

shadow zinc
#

thank you

boreal seal
#

so as i said

#

download it

#

solved.

shadow zinc
#

Have a nice day 🙂

boreal seal
#

¯_(ツ)_/¯

#

you reached File size limit using libraries

#

have a nice day 😎

dire marsh
#

adventure minimessage is not that big

boreal seal
#

nah man he can do it only with library

#

let him use the library that uses 6 different libraries

tender shard
#

just use minimessage through the library loader

#

then you dont need to shade it

#

and it automatically errors out for people on 1.16.4 or older, so you got another advantage

brave goblet
#
@EventHandler
    public void playerKillEvent(PlayerDeathEvent event){
        if(event.getEntity().getKiller() != null) {
            event.setKeepInventory(true);
            event.getEntity().dropItem(false);
        }
    }

This duplicates the players items when they die, it drops everything and they keep their inv how can I fix this?

tall dragon
brave goblet
tall dragon
quaint mantle
#

Hey Guys, can i ask 'bout how to use github?

tender shard
quaint mantle
#

I changed the email(github) to mine and then can't commit anymore
the error message is here

0 file committed, 1 file failed to commit: Commit by SkyExcel gpg: skipped "BuildTools <inseo0121@gmail.com>": No secret key gpg: signing failed: No secret key gpg failed to sign the data failed to write commit object
boreal seal
#

how to compare bytes?

#

like ==?

#

now its stupid question

#

i googled

#

but i just cant compare block.getdata to number

#

sounds funny i ever printed the block to see if it actually works

tall dragon
#

cast the number to a byte?

boreal seal
#

and yes it does get the data number

#

block.getData() != ((byte) 5)

#

Chat.PlayerSendMessage(player,block.getType().toString() + block.getData());

#

i either sent a message to verify if im gorrectly

#

yes i was it does return a number

#

why i cannot compare it?

boreal seal
#

or why the compremission dont work at all

#

the only soluation i get to my head is compare the output string

#

which is ew ;/

boreal seal
#

like if "Stone2" == blockstring ...

#

which is not really what i want

#

yeah its hacky way to get around

tender shard
#

you should almost never compare strings with ==

boreal seal
#

.equals

#

nah it was just for the example

#

i compare to bytes using ==

#

ill compare string for now

#

;-;

tall dragon
boreal seal
#

nah it doesnt

tall dragon
#

pretty sure ive also done it like this before

quaint mantle
boreal seal
#

idk i tried everything

boreal seal
#

ill just do block.getType().toString() + (number i decided which)

#

and ill compare

tall dragon
#

were going to need to see the whole error

boreal seal
#

k maing string and comparing it

#

worked fine

#

but for god sake isnt it a huge impact on performance comparing strings all time instead of comparing a byte?

tall dragon
#

tbh not sure why your byte comparing is not working

boreal seal
#

man i have no idea too its so bullshit

#

but i made a string out of it instead

#

and compared strings

#

and it worked

tall dragon
#

if you know its 5 and compare to 5, what does it do?

boreal seal
#

didnt try to compare them to each other

#

it will probably always return true

tall dragon
#

whats wrong with it then

boreal seal
#

i have no idea its why i asked how to compare bytes

#

because maybe there other way which is not ==

#

or < , >

#

...

#

comparing string eachtime is worse?

#

like it will be really heavy?

#

or not big deal sticking to what works?

#

i guess i was creative there lol

tall dragon
#

how often are you comparing

boreal seal
#

i would say it can reach up to 300 checks a second

#

or more

tall dragon
#

oh thats quite alot

drowsy helm
#

300 checks a second?

boreal seal
#

or more yeah.

drowsy helm
#

Is your pc from the 60s

boreal seal
#

no not really i have dedicated server with epyc 7502

drowsy helm
#

It was a joke

boreal seal
#

but i move in few days to something cheap from ovh

#

in general 300 is not alot?

#

i wont feel it even?

drowsy helm
#

Something like 10k a second is more reasonable

#

Cpus are fast

boreal seal
#

thanks for the answer! i see no reason then to use the byte thing

#

ill just stick to the alternative i thinked off

#

of

tall dragon
#

other plugins, server itself

drowsy helm
#

I thought we were purely talking about the comparison

tall dragon
#

pretty sure hes planning to use this in a plugin

boreal seal
#

its only 1 check will reach around 300+ per second

#

not talking about all the other things the plugin does

#

but the rest dont compare things like strings

#

so

#

😎

#

thanks guys

#

i just was thinking it will cause cpu go overheat

drowsy helm
#

You know theres Byte.compare

tall dragon
boreal seal
drowsy helm
#

Yeah comparing strings is far more costyle

boreal seal
#

nah it worked with the string thing

drowsy helm
#

Costly

#

It’s a static method

boreal seal
#

the compare?

drowsy helm
#

Byte.compare(byte1, byte2) == 0

boreal seal
#

so it will return 0,1,2

#

like when i compare timelapses probably

#

which says equals less or more

chrome beacon
#

-1 0 1

boreal seal
#

ill stick to it

#

if it will work better

#

i hope so

#

ill try rn

grizzled oasis
#

Hi a question about how I can check if the user is putting in his second hand a specific item and cancel the event

    @EventHandler
    public void onSwapItemInHand(PlayerSwapHandItemsEvent e) {
        if(e.getMainHandItem().getType() == Material.CARROT) {
            e.setCancelled(true);
        }
    }
boreal seal
#

wait 0 == equals?

#

BlockPlaceEvent

#

...

#

or interactevent

drowsy helm
#

Not second

grizzled oasis
#

not from second to main

drowsy helm
#

Yeah other way around

#

Switched

#

Not to be switched

grizzled oasis
#

what?

drowsy helm
#

You want to check what item they are attempting to put into their offhand

#

Right

grizzled oasis
drowsy helm
#

Yes thats what im saying

grizzled oasis
drowsy helm
#

So use getOffhandItem

grizzled oasis
#

is in main hand

drowsy helm
#

Read the image

#

I just sent

grizzled oasis
#

oh yeah lol

#

thanks

boreal seal
#

gus

#

guys

#

compareto

#

didnt work

#

as well

boreal seal
tall dragon
#

"it doesnt work" isnt alot of information

eternal night
#

wtf would one even get close to using Byte.compare for 🤔

drowsy helm
#

Actionbar

eternal night
#

action bar does not have a lifetime

#

if that is what you are asking

drowsy helm
#

Send it every tick

eternal night
#

you have to repeatedly send it again ^

drowsy helm
#

Runnable

#

Repeating task

tardy delta
#

keep sending while player is online

#

?scheduling

undone axleBOT
tardy delta
#

i'm having my own KingdomsPlayer class and when they quit i call KingdomPlayer::invalidate which resets their state and stops runnables etc

drowsy helm
#

What error

#

You are starting a nrw timer for each player

#

Just use one timer

#

I could spam join and start 100 timers

#

Also why is your method static

icy beacon
#

it's expecting two longs after the runnable iirc

boreal seal
#

the compare

#

i guess the issue ere when i write down the byte

drowsy helm
#

Is it not returninf the right value?

#

Have you tried debugging any of this

boreal seal
#

Byte.compare((byte) 5,blockdata) != 0

#

its what i tried

#

blockdata is basically the self block

icy beacon
#

please is github down for anybody else

#

i can't access shit with or without vpn

drowsy helm
#

Arent you checking if they are the same

boreal seal
#

oh yeah

#

i do

#

fuck

#

oh no

#

actually wait i got confused

drowsy helm
#

Read the docs

#

First value is delay, second is time between

boreal seal
#

why u use *

#

there

#

the owner of axtootlol client

boreal seal
#

for dealing with idiots like us

drowsy helm
#

Lol you’re not an idiot

timid jetty
#

what does projectile launch event include

#

just tridents or also arrows?

lost matrix
drowsy helm
#

Both

timid jetty
#

alright ty

drowsy helm
#

Enderpearls, eyes, tridents etc

timid jetty
#

beautiful ty

lost matrix
drowsy helm
#

Llamaspit is an actual entity

#

Damn

timid jetty
#

100% need to mess around with that lmao

boreal seal
#

no i did it correctly before

#

it was different check

#

if its not

#

it just doesnt work

lost matrix
boreal seal
#

7smile7 no one asked about your opinion

#

the topic is different here

eternal night
timid jetty
#

bruh

boreal seal
#

because i actually found a way to go without it

eternal night
#

Always clever to not listen to smile

#

He really doesn't know what he is doing kappa

boreal seal
#

im fine lynx

#

i have it working

#

but by comparing strings

#

which contain the output

#

which is really stupid

lost matrix
#

You literally asked for help. And im just stating that you should
not expect any help if you used outdated software from half a decade ago.

eternal night
#

Mate you are checking byte equality with Byte.compare

boreal seal
#

i dont need your help

eternal night
#

Idk how you are fine

boreal seal
#

well == didnt work

#

Lynx if u dont know what happend before please.

eternal night
#

I mean I asked what your end goal was

drowsy helm
#

Smile is like the smartest person on this discord

eternal night
#

Just never got a response

boreal seal
#

block.getData() != ((byte) 5)

#

because it what i done before

#

and it didnt work

lost matrix
#

lol yes. Go after lynx too. He has 0 knowledge about java and wont be able to help you anyways.
What even is a byte? I only know int.

eternal night
#

The JVM agrees with you

lost matrix
#

XD

boreal seal
#

anyway i have a way it works

#

its just will use too much resources

lost matrix
#

Noice. Then use it.

boreal seal
#

i will

eternal night
#

What is your goal then XD or are you fine with too many resources used

lost matrix
#

Oh yeah. Comparing bytes will probably lag out your server.

boreal seal
#

nah im just not sure

#

nah comparing strings

#

and around 1000 strings a second

#

is not really friendly

#

if i cloud compare 1000 bytes

#

it would be way less..

tardy delta
#

:/

eternal night
#

wHat iS uR eNdGoal

boreal seal
#

i just need to compare block

#

within the block data

#

which only exists in the old versions

#

so the thing is

#

dude get the fuck out you are a fucking bastard

#

anyway

eternal night
#

What ?

boreal seal
#

😎

eternal night
#

You are mental wtf

lost matrix
#

Forgot EventHandler annotation? Is the event registered with the PluginManager?

boreal seal
#

its like those codes

#

where find the problems

eternal night
#

Did you register it ?

#

You still have to register listeners in your main

boreal seal
#

20L,10L

#

wtf is *

drowsy helm
#

It takes 2numbers

eternal night
#

Ah you will have to provide an initial duration

#

Or wait period

lost matrix
#

Ah i see. It takes 2 longs. One for the initial delay and then one for the repeated one.

drowsy helm
#

Yeah we said that before

boreal seal
#

you are sick

#

20 * 10L

eternal night
#

^ what smile said

boreal seal
#

g oread docs

#

wtf this is

drowsy helm
#

I could crash your server if you gave me an hour with that code

eternal night
#

Honestly thank god for blocking

boreal seal
#

First value is delay, second is time between

eternal night
#

Just block them they are trolling for sure X's

lost matrix
drowsy helm
#

Chill

boreal seal
#

dude

#

i would help you

#

go learn java

#

we aint java teachers here

lost matrix
#

Get a BuildTools and compile your 1.7 docs or whatever outdated garbage you are using.

boreal seal
#

so your java teacher will throw a shoe on you

#

im fine with outdated garbage

#

your code is entirly wrong

drowsy helm
#

Give me a min, need to make popcorn

boreal seal
#

so please

lost matrix
boreal seal
#

i have around 3 resources for the newest game versions

#

see you in 10 minutes again

#

☠️

lost matrix
boreal seal
#

you really think i prefer to use old outdated API

#

versus the new API?

#

no not really

torn shuttle
#

you'd be surprised if you think that's something we can assume lol

boreal seal
#

weelcome back

#

i knew it

#

and

torn shuttle
#

then you have truly picked the perfect username

boreal seal
#

i think you just should go back to make roblox games using lua

#

or learn java

#

if you can understand a stacktrace

#

nah man for real

#

just at my case when i ask for help its because i got no stacktrace

drowsy helm
#

Are you ysing intellij

boreal seal
#

and shit 1.8

#

pushes it to the limits

torn shuttle
#

roblox uses lua?

boreal seal
torn shuttle
#

shocking that so many modding interfaces use lua

boreal seal
#

its a ugly script language like python

torn shuttle
#

yeah I know

#

I almost got into it for factorio

drowsy helm
#

Hover over the method and press ctrl b

#

It will show you the method sifnature

tardy delta
#

ctrl + click lol

boreal seal
#

nah man its lost case

lost matrix
boreal seal
#

he doesnt even know to code

#

why you clount google it

#

then

#

for god sake

#

sorry for begin so rude

torn shuttle
tardy delta
#

goddamn gandalf

drowsy helm
#

What does ctrl pndo

lost matrix
#

You can just ctrl and click it, no?

torn shuttle
#

shows all constructors of that method

drowsy helm
#

Oh cool

torn shuttle
#

I use it all the time because reading documentation is for dorks and support people and I'm cool 😎

lost matrix
#

They did

drowsy helm
#

Who needs docs when you have a monkey and typewriter

torn shuttle
#

docs are for people who can't get intellij to tell them what's wrong

lost matrix
#

For both approaches even

tardy delta
#

thats only one parameter

drowsy helm
#

You did the first one

lost matrix
#

Yes thats wrong. Look closer.

tardy delta
#

theres a comma in the screen

drowsy helm
#

Not he second

torn shuttle
#

oh lord he's modding skyblock

lost matrix
#

Writing a scalable skyblock plugin is a damn hard task. I actually had to fork in order to tackle the performance overhead that
comes with constantly loading/unloading worlds.
It does all the IO on a different thread now and returns a CompletableFuture<World>

torn shuttle
lost matrix
torn shuttle
#

bet you I could even make more money doing it

boreal seal
#

good luck man

#

with ur secret project

#

thats not roblox

#

maybe use existing plugins

#

they are made for people like u

torn shuttle
#

is the project meant to be secret? lol

boreal seal
#

i got a good point no guys?

boreal seal
lost matrix
torn shuttle
#

ripperoni

boreal seal
#

7smile7 this guy dont even try to learn basics

#

like java

#

like what is stacktrace

lost matrix
#

He'll get there

boreal seal
#

i would tottaly help a person

#

who is really lost

#

and tried his best

#

but he doesnt try

torn shuttle
#

I'm lost evan, will you hold my hand?

boreal seal
#

he think he can cook a cake with the ingredients without knowing to use the kitchen

#

so first learn how to use the kitchen

#

and later make a cake

#

.

#

and putting the ingredients together for him

#

not gonna help him

#

we are just his code slaves

#

at the moment

torn shuttle
#

he's making the mother of all skyblock omelets here, he can't worry about every egg

lost matrix
#

I didnt see syntactically or logically faulty java. Just someone not knowing the method specifications.
Which is a bit surprising because he literally read them, but still.

boreal seal
#

no no

#

he doesnt know

#

he make a static runnable

#

he have no idea what he is doing

#

again

#

30 *

#

do 600L

#

good luck

#

with your skyblock plugin

#

2 digit

lost matrix
#

You mean listener. And they can be static 🤷
You shouldnt do it but you technically can.

boreal seal
#

help development

#

?services

undone axleBOT
boreal seal
#

here u go

lost matrix
#

You are still using too few parameters. Slowly read what you need again and make a check after every parameter.

boreal seal
#

i dont think u made it

timid jetty
#

would I use setVelocity to change the projectile speed of a trident or is there a simpler way of doing it

torn shuttle
#

I would love to see what you made so far

boreal seal
#

but i love to see as well

#

speak as well

#

why

lost matrix
tender shard
#

why are you going into vc if you don't want to speak to anyone lol

#

yeah it's been like this since ages

quasi flint
#

and be ful muted

grim ice
#

lmaoo

torn shuttle
#

take a screenshot

grim ice
#

this chat is mental

quasi flint
#

So u can't even hear shit

grim ice
#

yall malding over a guy who messed up a method's parameters because of shitty documentation

torn shuttle
#

stream on twitch

lost matrix
quasi flint
#

Bruh

drowsy helm
#

facebook live

tardy delta
#

whats happening in general-1

timid jetty
#

also is there a way to alter the charge time of a trident?

drowsy helm
quasi flint
#

I am in uranus

boreal seal
#

Oil rig

#

i work in oil rig

torn shuttle
#

sure do that

boreal seal
#

sure

torn shuttle
#

you'll have at least 5 viewers

boreal seal
#

ill invite my friends

#

u will have around 10

#

@quaint mantle @quaint mantle @quaint mantle

#

we are waiting

boreal seal
timid jetty
#

how :)

torn shuttle
#

that's just your opinion

#

I'm even delaying lunch for this

boreal seal
#

either you cloud make a custom item that will work simillary to trident

#

and make cooldown

timid jetty
boreal seal
#

i think you can change bow shot

#

the load up will be on client side the same

#

stream

#

stream

#

stream

torn shuttle
#

don't think so

lost matrix
timid jetty
boreal seal
#

make a 3rd party resource pack

torn shuttle
#

yeah you can cheat around it using resource packs but probably not worth the hassle

timid jetty
#

probably not

boreal seal
#

that will have loaded and not loaded bow

#

and just switch each time

#

and use own cooldown between shots

#

think of a gun for example

timid jetty
#

yeah i see the idea behind that

torn shuttle
#

hey losers ping me when the stream starts, I'll be watching from mobile while having lunch

lost matrix
#

Or simply use predicates for a bow reskin. Not really viable to use multiple items.

boreal seal
#

where the stream

#

you promoised us

#

;c

ancient plank
#

@torn shuttle

torn shuttle
#

I am

drowsy helm
#

how are you loading config

#

?

boreal seal
#

i love it.

#

best live ever

torn shuttle
#

10/10 can't wait to see the next stream