#development

1 messages · Page 138 of 1

solemn ocean
#

Depends on how you want to, you could save on config like Players: PLAYERUUID: hidePlayers: 'true' and config methods to get and set it, on join just check or do the same thing with databases or you can do with PersistentDataContainers

terse violet
#

Or just have a list of uuid

#

Or set<uuid> toggled;

mystic gull
#

Ty guys

terse violet
#

It’s just a map

mystic gull
#

Oh ok

solemn ocean
#

I use those on items etcc

tight junco
#

PersistentDataContainer will save stuff into the items/chunks/entities itself

echo briar
#

https://paste.helpch.at/eniculilog.cs Anyone know how i can make it so that once a player swaps to a different slot the sword will deactivate? currently i have it as a left click action.

queen plank
#

I'm trying to make a 1.8 plugin, but keep getting Missing artifact net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT in my pom. Any idea how to fix it?

tight junco
#

probably not a valid import

queen plank
warm steppe
#

🤮

#

maven

dense drift
#

https://oss.sonatype.org/content/repositories/snapshots

queen plank
sharp hemlock
#

Does anyone know why World(WorldEdit wrapper object)#getBlock returns minecraft:air from WorldEdit if its an editied block and not a vanilla block?

sterile hinge
#

What version?

sharp hemlock
#

[20:55:13 INFO]: FastAsyncWorldEdit version 2.2.1-SNAPSHOT-184;d1f3ac8
[20:55:13 INFO]: Blazingly fast world manipulation for builders, large networks and developers.
[20:55:13 INFO]: Website: https://www.spigotmc.org/resources/13932/
[20:55:13 INFO]: Authors: Empire92, MattBDev, IronApollo, dordsor21 and NotMyFault

lyric gyro
#

huh?

sterile hinge
#

Where does the modded block come from?

sharp hemlock
#

i mean like an editied block (by worldedit)

#

or vanilla (generated/placed by a player)

echo briar
#

Anyone know how to setup a event that prevents players from moving a specific item in their inventory?

#

Ive tried all I know and nothing has been successful

sterile hinge
dusky harness
#

those two should cover everything

echo briar
dusky harness
#

d;spigot InventoryClickEvent#getCurrentItem

uneven lanternBOT
dusky harness
#

d;spigot InventoryClickEvent#getCursor

uneven lanternBOT
dusky harness
#

put those two in a variable

#

nullcheck them, then check if it's the specific item

sharp hemlock
#

Do you know how I could create a cross then?

Having the middle of the cross being where ever I wanna set it and then the the cross going outwards in a specific cuboid

errant coyote
#
    material: head (head-%player_name%)
    color: 255, 135, 0 #rgb
    slot: 4
    display_name: ' &8&l>>&a&l%player_name%&8&l<<'
    lore:
    - '&8Grades: %luckperms_prefix%'
    - '&8Money:  &e%vault_eco_balance%$' 
    - '&8Credits: &e%guiredeemmcmmo_credits% &6Gcoins'
    priority: 1```
#

Hello I have a small problem with deluxemenus The head does not want to appear While I did exactly the same thing as in the doc

lyric gyro
#

wrong channel

#

again

terse violet
#

i love @lyric gyro sas

sudden sand
#

how the actual fuck

#

can someone explain me ?

winged pebble
#

That's the scentific notation of a really small number

wheat carbon
#

answer: javascript

sudden sand
sudden sand
wheat carbon
#

java doesn't use scientific notation

halcyon ermine
#

Hi all. Does anyone have a tutorial or maybe someone knows how to add a new scale using a plugin and a resource pack? For example, the thirst scale, which can be controlled from the plugin.

dense drift
#

Nvm, I might think about js as well

viscid void
#

Hello

#

Why iridiumskyblock expansion not available?

dense drift
#

Nvm x2

dense drift
#

A scale?

halcyon ermine
#

New UI element

#

I know, how I can make this element, but how to arrange his, how on this photo, I don’t know

upper jasper
#

That would use the actionbar with icons inside the resourcepack

halcyon ermine
upper jasper
halcyon ermine
#

How can i do that?

upper jasper
#

Every screen resolution is different and mc has no real way to put stuff in the top corner

halcyon ermine
upper jasper
#

They will just be one ‘bossbar slot’ lower

halcyon ermine
#

Thanks

halcyon ermine
limber anvil
#

How do I add a permission to a player?

#

I tried adding Group Manager as an API & came all the way down to implementing a DataUnit and adding a permission that way but I can't create a new data unit bc its an abstract class & have no idea how I'd access that sort of thing

lyric gyro
#

bro use luckperms

limber anvil
#

ew

lyric gyro
#

"ew" using groupmanager in 2022

limber anvil
#

I'm old school xD

lyric gyro
#

you're outdated

limber anvil
#

it works

lyric gyro
#

that doesn't mean you shouldn't improve your system

broken elbow
#

lol

lyric gyro
#

I mean sure I can use Windows ME, "it works"

#

does that mean I should stay using it for no reason?

limber anvil
#

well I dislike any other one except for PEX and I don't remember if pex is still supported

halcyon ermine
#

How can I make an invisible boss bar?

broken elbow
limber anvil
#

I dislike that its used on a website

surreal lynx
#

Can be done in-game

lyric gyro
#

You don't have to use the web editor

broken elbow
brittle thunder
#

Who dislikes it?

limber anvil
#

me

brittle thunder
#

Thats a single person

#

What do you not like about it?

limber anvil
#

hey @broken elbow the permissible attatchment, I see no input fields for player or group

broken elbow
lyric gyro
#

Sure, but why not LP? What is there to dislike?

#

It's objectively better in every way

brittle thunder
#

object 🤮

#

functionally better >>>

broken elbow
#

we don't follow trends emily. we're the cool kids. we deprecate ourselves just to not be like every other person

#

:)))

limber anvil
#

oooh so like p.addAttachment(GroupManager, "perm", true or false to add or remove)?

lyric gyro
#

tf lol

#

my man avoiding the real questions

#

a true chad

limber anvil
#

I'm looking in my IDE wasn't looking at discord

limber anvil
brittle thunder
#

Also, why not use the vault api for permissions, that way you can have it working with multiple permission plugins

limber anvil
#

I'll use the vault api if thats the case then

brittle thunder
#

I dont really remember what exactly it allows you to do, but I do know vault has one, I assume it should have something to add permissions

limber anvil
#

I'll give it a look

brittle thunder
#

Alrighty

limber anvil
#

I learned how to make my first plugin like a week ago & understood every part of it.. today is my first official day of getting my hands wet in code & making a plugin that I rly need for my project

#

I've been programming for like 5 years now & on like yr 2 didn't understand anything about creating a plugin now I understand every aspect of it

#

its quite a nice feeling

brittle thunder
#

I see

#

Good luck

limber anvil
#

thx

halcyon ermine
limber anvil
#

OfflinePlayer's can still be used for players that exist online right?

limber anvil
halcyon ermine
limber anvil
brittle thunder
#

Whats the point of a boss bar that isnt visible?

limber anvil
#

do you mean nameless bossbar?

#

I'm assuming by that he means just the text at the top no bar that way it shows as like a subtitle.. I haven't seen it so I don't think it exists

brittle thunder
#

Could be possible via resource packs

limber anvil
limber anvil
#

ah good idea

#

ok so it didn't work

#

import net.milkbowl.vault.permission.Permission;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.bukkit.plugin.RegisteredServiceProvider;
import java.util.ArrayList;

    public void AddPerms(OfflinePlayer p, ArrayList<String> perms, GroupPermissions main){

        RegisteredServiceProvider<Permission> permissionProvider = main.getServer().getServicesManager().getRegistration(Permission.class);
        if (permissionProvider == null) {
            return;
        }
        Permission permission = permissionProvider.getProvider();
        for (String perm : perms) {
            permission.playerAddTransient(p, perm);
        }

    }```
#

there are no compiling errors

upper jasper
#

Bars.png

limber anvil
#

have you guys added permissions to players b4? it shouldn't be this hard 😒

lyric gyro
#

Yes but not with GM

#

Either Vault or Bukkit's PermissionAttachments generally work but ¯_(ツ)_/¯

high edge
#

GM best

limber anvil
high edge
#

It was a joke, in case you were not aware

limber anvil
#

its best idc what anyones says

#

its been with me for a good 7 years :)

#

I just need the code for this vault plugin & adding a permission because it requires a plugin reference & I have no idea how to pass the vault plugin as reference

#

unless I don't use the vault plugin

lyric gyro
limber anvil
#

well I've never created plugins until now

#

and besides I'm using vault not GM to solve this

#

but I have no idea how to figure it out

#

so there is the permissible method called addAttachment that takes a Plugin parameter, does that need to be the vault plugin or can I just write this?

#

I think I've been reading it wrong & I'm supposed to use the current plugin bc it says the one responsible for the attachment which should be the plugin I'm working inside of

#
public void AddPerms(Player p, ArrayList<String> perms, GroupPermissions main)
{
    for(String perm : perms) {
        p.addAttachment(main, perm, true);
    }
}```
#

why do I feel like it was that easy?

lyric gyro
limber anvil
#

welp

limber anvil
lyric gyro
#

Could you please explain to me why do you so religiously refuse to use an objectively better replacement?

#

I'm legitimately curious

limber anvil
#

old school is better 🙂

lyric gyro
#

Why is it shit?

limber anvil
#

GM is an oldie but a goodie

#

its like music these days

lyric gyro
#

You are avoiding my question

limber anvil
#

it was good until maybe 2015

high edge
#

It's shit

#

Always was shit, there's no denying it

#

Just cause there wasn't anything better, doesn't mean it was ever good

limber anvil
#

luckyperms is so different to every other permission plugin I refuse to use it

#

tbh its personal preference

high edge
#

Yet it is actually what a permissions plugin should be, professional and easy to use

#

But yea use whatever you want, just an opinion

limber anvil
#

its just that /mangaddp or /manuaddp is fried into my brain that ik what it is at any given time

#

its super easy to use

#

I remember first learning pex, it was a nightmare

#

now its second nature

lyric gyro
#

I mean yeah the first time you use anything it's gonna be hard

limber anvil
#

I just haven't gotten around to LP yet

#

does luck perms support older versions?

lyric gyro
#

yes

limber anvil
#

I remember something about not using LP bc of version control

#

like it was only for newer forks

lyric gyro
#

well it depends how old you mean with "older versions"

limber anvil
#

or was only tested like 1.16 up iirc

#

or whenever it came out

#

1.14 probably

lyric gyro
#

the regular bukkit build works on 1.8.8, there's a separate bukkit build for 1.7.10

limber anvil
#

now ik that anything using java 1.8 can support all the way up to 1.16

mystic gull
#
import static fr.revosia.moderation.utils.ListUtils.hiddenUsernames;

public class TabEvent implements Listener {

    final List<String> pluginCommand = Arrays.asList("?", "help", "bukkit:", "ver", "about");

    @EventHandler(priority = EventPriority.HIGHEST)
    public void onTabComplete(TabCompleteEvent ev) {
        if(ev.isCancelled()) {
            return;
        }

        String partialPlayerName = ev.getCursor().toLowerCase();

        int lastSpaceIndex = partialPlayerName.lastIndexOf(' ');
        if (lastSpaceIndex >= 0)
            partialPlayerName = partialPlayerName.substring(lastSpaceIndex + 1);

        pluginCommand.forEach(cmd -> {
            if(ev.getCursor().startsWith("/" + cmd)) {
                ev.getSuggestions().clear();
                ev.setCancelled(true);
            }
        });

        //Ajoute les joueurs du proxy au complete
        if(partialPlayerName.isEmpty()) {
            for (ProxiedPlayer p : ProxyServer.getInstance().getPlayers()) {
                ev.getSuggestions().add(p.getName());
            }
        } else {
            for (ProxiedPlayer p : ProxyServer.getInstance().getPlayers()) {
                if (p.getName().toLowerCase().startsWith(partialPlayerName)) {
                    if (!hiddenUsernames.contains(p.getUniqueId())) {
                        ev.getSuggestions().add(p.getName());
                    }
                }
            }
        }
    }
}
#

Hello i want to make a system that when i type /players <tab> it will show the list of all players currently connected on the proxy

#

Could some1 help me

#

The following code dont work

fiery pollen
#

implements TabCompleter <-----

limber anvil
# lyric gyro Why is it shit?

I figured out why I never used it.. So I have a world guard region where it gives the player speed, if the player is an operator, it neglects the speed entirely because they are an operator & its a bypass.. On Group Manager, the * perm doesn't make you an operator, it just gives you every permission. On LuckPerms, it makes you an operator which means it bypasses the speedway unlike group manager does. This way anybody with the * perm can't fully experience the game aka super admins.

sterile hinge
#

what

lyric gyro
#

It doesn't make you an operator and WG has a bypass permission

#

And I mean yeah using wildcard is not meant to be taken lightly lol

dense drift
#

im pretty sure that "super admins" aren't supposed to experience the game like a normal user anyways lol

high edge
#

You should never even give the * perm to anyone

#

That's just poor management

#

Not even your own user should have that

jovial kettle
#

What is the best way to make an custom gui? With an dependency? Manual with the Inventory Object?

hoary scarab
pine flax
broken elbow
#

a library can make stuff easier sometimes yeah

#

and matt's lib is pretty good

jovial kettle
halcyon folio
#

Hey

#

Did anyone ever made a fork or something for EzBlocks?
Would be cool to have an API to SET the blocks

lyric gyro
#

hey i need help

#

Anybody here?

#

Is anyone here

#

Helloooo

winged pebble
#

Just ask your question lol

grave thorn
#

!paste

neat pierBOT
sudden sand
#

I'm trying to set a higher note than 24 on noteblock (it's for making custom blocks), does any one have an idea about how to bypass the limit ?

topaz gust
#

You could make one

#

I’m not familiar with their being a fork for that

pine flax
#

What’s the accepted practice when “forking” free, closed source plugins from spigot?

wheat carbon
#

go for it

pine flax
#

Just do it and link credit back?

topaz gust
#

Permission from the author

#

And credit

wheat carbon
#

if you're reuploading somewhere then yeah credit, permission if you can get it (especially if the original is still active)

#

however legally you're in the clear

hoary scarab
icy shadow
#

Dunno how you'd fork a closed source plugin anyway

#

Apart from decompiled code which is probably a legal grey area

hoary scarab
wheat carbon
hoary scarab
#

If its not open source the code is not be used by others.

wheat carbon
#

sure that may be your personal opinion, but your personal opinion is not factored in the license all plugins are under

hoary scarab
#

All plugins are unlicensed until the author puts them under a certain license. (All rights reserved)

wheat carbon
#

no, all plugins are under gplv3

hoary scarab
icy shadow
#

Ehh I thought the GPL thing wasn't true?

hoary scarab
#

Can't GPL code that contains another license (countering the GPL licensing terms)

wheat carbon
#

it's not so much that it isn't true, it's more the case that it hasn't been tested in court

icy shadow
#

Ah I see

wheat carbon
#

the minecraft server is not the issue anyways

#

it's bukkit

icy shadow
hoary scarab
wheat carbon
#

how

icy shadow
#

How so?

wheat carbon
#

what about its licensing is invalid

hoary scarab
wheat carbon
#

bukkit does not contain any nms references

hoary scarab
icy shadow
#

Legally also I'm sure you could argue that decompiled code isn't licensed, since it's virtually unrecognisable from the source - change a few names and there is practically no way of linking them together

wheat carbon
#

here's the thing, bukkit's license isn't invalid

icy shadow
# hoary scarab

As piggy just said, bukkit does not contain any mojang licensed code

wheat carbon
#

bukkit is without a doubt gpl

#

craftbukkit on the other hand, its license (lgpl), is a bit more iffy

#

however plugins which do not depend on craftbukkit will be depending on bukkit, and therefore are under gplv3

#

i.e. 99.9% of plugins

icy shadow
#

the fact of the matter is even if you are breaking the license, I highly doubt anyone is actually going to take you to court over it

#

it's ambiguous enough that you'd struggle to make a strong case

#

And if it's free then it would be literally just burning money

hoary scarab
#

Lets use everyone elses example.
People claim that because plugins "link" to bukkits api they have to follow bukkits GPL (Which is invalid).
So since Bukkit "links" to code that contains a license that counteracts to the GPL terms it cannot be GPL and falls under the licensing of the minecraft server software.
Mojang authorizes the ability to use its code but not authorization to change its licensing.

wheat carbon
#

bukkit does not link to any code

#

bukkit is a standalone api with references only in other libraries that fit within bukkit's choice of license

#

craftbukkit, which is under lgpl, implements bukkit

#

it is craftbukkit's license which is invalid

icy shadow
#

yeah the bukkit license is perfectly sound

wheat carbon
#

regarding why plugins are under gplv3 because of bukkit, give me a moment, I'll link you to the official word of gnu

icy shadow
#

God bless Richard stallman

hoary scarab
wheat carbon
#

no

icy shadow
#

not at all lmao

wheat carbon
#

most plugins have no reference to craftbukkit

#

and bukkit also has no reference to craftbukkit

sudden sand
hoary scarab
#

Bukkit interfaces craftbukkits code xD

icy shadow
#

Other way around

wheat carbon
#

bukkit does not contain any reference to craftbukkit code

icy shadow
#

Craftbukkit implements bukkit, which is just a set of interfaces

hoary scarab
wheat carbon
#

I see no craftbukkit imports, reflective or explicit

icy shadow
#

Yeah where's the CB code there?

hoary scarab
#

"links"

icy shadow
#

wheres the link?

#

I don't see any

#

It's just an interface

hoary scarab
#

Ok, maybe I'm wrong about Bukkit.

Lets say spigot as thats what most people use. Spigot does "contain" and "link" to craftbukkit and the minecraft server code

wheat carbon
#

prove it

#

prove the spigot api links to craftbukkit (or spigot)

icy shadow
#

The short answer is that if they did, then the version agnosticism of the apis wouldn't work

dusty frost
wheat carbon
#

eh

hoary scarab
wheat carbon
#

maybe more servers run paper but I assure you more plugins exist out there right now that use the spigot api

icy shadow
#

That is the point

hoary scarab
wheat carbon
#

ok?

icy shadow
#

Ok so what?

#

Spigot is the equivalent of craftbukkit

lyric gyro
#

spigot is to spigot-api what CB is to bukkit

#

same deal

icy shadow
#

^

#

Doesn't matter

#

Because most plugins are not derivatives of spigot

wheat carbon
#

it's probably going to stay like that for... quite a long time

dusty frost
#

😔

wheat carbon
#

people didn't move to spigot from bukkit for ages

#

actually that's not a good comparison

#

people sorta had to

#

i'm stupid ignore my statement

icy shadow
#

yeah enough people still use spigot that targeting the paper API is a pain

pulsar ferry
#

Some still use the Bukkit website, like world edit

hoary scarab
#

Paper causes to many issues when I have used it in the past.
Also had an issue with entities and chunk loading/unloading on my minions plugin.
IDK if these issues are fixed just know me and others had them.

wheat carbon
#

it's probably going to be a few years before the number of new plugins built against paper will be larger than the number of new plugins against spigot

  • assuming paper's growth continues as is
hoary scarab
#

I remember it through velocity errors on my grappling hook plugin.

pulsar ferry
#

The plugins will only chance when hangar is released or spigot allows paper only

icy shadow
#

Neither of which are happening

pulsar ferry
#

Yup

dusty frost
#

😔

wheat carbon
#

is hangar dead or something?

#

haven't heard anything for a long ass time

hoary scarab
pulsar ferry
wheat carbon
#

matt are you a mod in paper or something?

broken elbow
#

no

#

he's an admin in paper

wheat carbon
#

oh lol

broken elbow
#

that was a joke

#

idk lol

dense drift
pulsar ferry
#

Nah i hardly talk on paper but I talk with people that are part of the team pretty often

broken elbow
lyric gyro
#

genocide

broken elbow
#

o

hoary scarab
#

Actually its probs in one of the discords I left xD

stuck hearth
#

Sponge team and paper are both working on hanger iirc

hoary scarab
#
craftPlayer = Class.forName("org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer");
Method getHandle = craftPlayer.getDeclaredMethod("getHandle");
Field playerConnection = getHandle.invoke(craftPlayer.cast(p)).getClass().getField("b");
ConsoleOutput.debug("ConnectionField: "+playerConnection.getType().getName());
Arrays.asList(playerConnection.getClass().getFields()).forEach(
        field -> ConsoleOutput.debug("Name: "+field.getName()+" Type: "+field.getType().getName()));
```Any ideas why this worked in every version but 1.18.2? (Of course with adjusted names)
In 1.18.2 it outputs ```
[DEBUG] PlayerConnection: net.minecraft.server.network.PlayerConnection
[DEBUG] Name: PUBLIC Type: int
[DEBUG] Name: DECLARED Type: int
dense drift
#

and what exactly is "this"?

hoary scarab
dense drift
#

what is that supposed to do lol

hoary scarab
dense drift
#

ok, and what doesn't work? It doesn't find any fields or what

hoary scarab
dense drift
#

d;jdk Class#getFields

uneven lanternBOT
#
public Field[] getFields()
throws SecurityException```
Description:

Returns an array containing Field objects reflecting all the accessible public fields of the class or interface represented by this Class object.

If this Class object represents a class or interface with no accessible public fields, then this method returns an array of length 0.

If this Class object represents a class, then this method returns the public fields of the class and of all its superclasses and superinterfaces.

If this Class object represents an interface, then this method returns the fields of the interface and of all its superinterfaces.

If this Class object represents an array type, a primitive type, or void, then this method returns an array of length 0.

The elements in the returned array are not sorted and are not in any particular order.

Since:

1.1

Throws:

SecurityException - If a security manager, s, is present and the caller's class loader is not the same as or an ancestor of the class loader for the current class and invocation of s.checkPackageAccess() denies access to the package of this class.

Returns:

the array of Field objects representing the public fields

dense drift
#

Returns an array containing Field objects reflecting all the accessible public fields of the class or interface represented by this Class object.
probably fields were made private

hoary scarab
#

No they're public

#

CraftPlayer.getHandle() returns EntityPlayer
EntityPlayer.b returns PlayerConnection

#

Any other ideas @dense drift ?

sterile hinge
sterile hinge
warm steppe
hoary scarab
#

The above code works on all versions except 1.18.2 as long as you change "b" and the version in the package.

sterile hinge
#

Your code still cannot produce the given output

hoary scarab
fiery pollen
#

Why can't i use a lambda parameters for methods like Material.getMaterial()?

#

nvm fixed it

#

Does anyone know a fix for this?

#

I can't delete a file for some reason

hoary scarab
#

It's probably opened by another program

shell moon
#

How would I spawn creepers in nether (like in overworld)

#

i mean, make it spawn "naturally"

lyric gyro
#

Oooooor, one hacky way to do it would be to replace some of the mobs that spawn in the nether with creepers

#

Listen to the spawn event, do some checks to see if its in the right spot, then have some sort of random (maybe configurable) chance to set the type to creeper

shell moon
#

that will prevent other entities to "spawn"

#

as they will be replaced

hoary scarab
#

Could spawn both or search with in a radius around the spawn location for another spawn location

shell moon
#

that means i'd need to check a safe location to spawn creeper

hoary scarab
#

You'd have to do that anyways

tight junco
#

is there any way to parse a papi placeholder inside another placeholder, The only way i can think of is in onRequest doing PlaceholderAPI#setPlaceholders on whatever is supposed to return

#

but i can see that going very badly

hushed badge
#

setBracketPlaceholders

vocal arch
#

How can I detect if a player is in a area and then the plugin do something without any repeating?

hoary scarab
#

Well... you could use PlayerMoveEvent and check if they enter a region. (Either calculate xyz or use BoundingBox)
Or have a timer checking if the player is in the region/boundingbox.

Then add them to a list if they are in it and remove players that arn't.

night ice
hoary scarab
#

I mean... it kinda depends. If you have like 50+ players I would go with the timer checking locations.

#

You could even switch between the two. When a player joins and its over 50 uninitialize the listener and start the timer (if not already running) and reverse.

#

50 might be a bit high so you'll need to adjust accordingly.

quasi wigeon
#

is there a way to open a writable book gui to a user?

broken elbow
viral moth
# night ice Which apparently would be better? This one is like a long grown question on my m...

I mean the player move event would lead to a cleaner end result however it will be more expensive, I would just do a simple xyz check with a min and max value, if you have multiple "regions" then maybe have a que type thing where a different thread runs the calculations instead of the main thread. that is overcomplicating it imo but if you have lots of regions and lots of players than that would prob lead to a better result

#

just throwing ideas out there

pine flax
#

I do that by depending on worldguard and making a PlayerRegionCrossBorderEvent

molten wagon
#

I have strange issue when load my custom menu from cache first time it take much longer time. the cache is made on plugin startup (so is always same instance and data is already loaded) and the menu is new instance every time you run the command. any ideas?

[20:23:40 INFO]: broken_arrow1 issued server command: /menu testCache Main_Menu
[20:23:40 INFO]: [inventoryTest 1.0-SNAPSHOT] Command /menu testCache Main_Menu took 466.47 ms
[20:23:43 INFO]: broken_arrow1 issued server command: /menu testCache Main_Menu
[20:23:43 INFO]: [inventoryTest 1.0-SNAPSHOT] Command /menu testCache Main_Menu took 10.36 ms
icy shadow
#

Show code

molten wagon
#

is only 1 item added to the inventory (no head or custom heads) and I know the menu is not a issue (it is the GetMenuButtonsData some add the load).

rustic belfry
winged pebble
#

The error tells you what you need to know

#

That class doesn't have a field of type EnumItemSlot, it is an int

#

Actually take that back, it's an int for the id of the Entity, and a List<Pair<EnumItemSlot, ItemStack>> for the equipment

#

For 1.18.2 at least

rustic belfry
#

thanks

west socket
#

Hey, when I try to put a player into Spectator mode using

player.setGamemode(Gamemode.SPECTATOR)```
It doesn't seem to work unless the player is op. Anyone know if this is something built into spigot or if another plugin is interfering?
reef delta
west socket
#

No

#

It’s likely something else interfering, I just wanted to double check that it wasn’t an intended feature

#

It’s probably essentials or something

lyric gyro
#

yeah that method definitely works fine regardless of anything "vanilla"

leaden sinew
#

I'm trying to do a "grid" on a JavaFX canvas, but when I draw the individual tiles, lines appear between them when resizing the canvas for some reason.
The width / height of the tiles are all constant, and they are just drawn as rectangles.

My code is basically this:

for (int i = 0; i < 10; i++) {
    (for int j = 0; j < 10; j++ {
       Point point = Point.at(i * width, j * width);
       drawRect(point.x, point.y, width, height);
    }
}
#

If anyone has any ideas about how to fix it please ping me, thanks.

lyric gyro
#

lines appear them when resizing?

#

what

leaden sinew
#

Sorry meant to say between them but left out a word

#

So basically it appears like a grid when it should be smooth

hoary scarab
#

So I am looking into the "look" packet and for some reason the xRot is limited from -90 to 90 but the yRot goes way passed 360. Anyone know why?

ServerboundMovePlayerPacket playerLook = (ServerboundMovePlayerPacket) packet;
Location loc = p.getLocation();
ConsoleOutput.debug("[ServerboundMovePlayerPacket] | XRotation: "+playerLook.xRot+" YRotation: "+playerLook.yRot);
ConsoleOutput.debug("PlayerPitch: "+loc.getPitch()+" PlayerYaw: "+loc.getYaw());``` 
> [DEBUG] [ServerboundMovePlayerPacket] | XRotation: 15.716471 YRotation: -2819.1729
> [DEBUG] PlayerPitch: 15.868381 PlayerYaw: 60.82715
high edge
#

Cause, why not

iron karma
#

how i can create a region?

hoary scarab
hoary scarab
high edge
#

Shitty design

iron karma
hoary scarab
iron karma
#

like java private Location point1, point2;?

hoary scarab
#

yeap

iron karma
#

and after that, what else xd

hoary scarab
#

Calculate min and max and if something is within the min and max its in the region.

high edge
#

Could use a BoundingBox

#

Does the calculation for you

#

Did not see you already said it, but mk

hoary scarab
#

Yeah I just assumed he wasn't using latest when he continued with the XYZ side lol

iron karma
#

I want to learn how to do it for myself, maybe that way I'll learn more :p

shut cloud
#

the result is still the same @hoary scarab

hoary scarab
#

Can you screen shot? Also add debug code and make sure the code is even running

#

And also send the updated code.

shut cloud
#

it works its just somehow called DataWatcher instead of EntityData

hoary scarab
shut cloud
#
#

thats what I added

hoary scarab
shut cloud
#

yup

hoary scarab
#

👍

iron karma
#

would you give me a challenge? something to do to learn more.

iron karma
#

eehmmm

hoary scarab
#

Not embedding...

iron karma
#

sry

hoary scarab
#

I got it.

iron karma
#

okay okay

hoary scarab
#

Well if you made reports, move to punishments.

#

Bans, warns, kicks, tempbans, mutes etc...

iron karma
#

is that I already did it, and I would like to learn things like particles, mysql and more things like that

hoary scarab
#

Well particles is pretty easy in the latest versions. Unless you want to do packets to send them to individual players, then it gets a bit more complicated.
If you're good with math though particle displays are pretty fun.

iron karma
#

I'm bad with math xd

hoary scarab
iron karma
#

and make a minigame? It is very difficult?

hoary scarab
#

Depends on the minigame

iron karma
#

which one is easy and would help me learn?

hoary scarab
#

I'm not the best teacher. My explanation skills are mediocre at best.

iron karma
#

but something is something xd

hoary scarab
#

What minigame? I'll try to simplify what the code would be

fiery pollen
#

What would be a good formula to calculate for an enchant to proc, x would be the level of the enchant

hoary scarab
# iron karma spleef?

Arena creation commands/game commands
Saving arena (Schematic or copied from another location) or you can make a list of broken blocks during the game.
Game states; queue, starting, running, stopping etc...
In game handle block breaking when shovel is right/left clicked (fire eggs if wanted)
Handle death
Handle spectating
End game
Reset arena (Depends how you saved the arena originally)
Teleport users out of arena
Handle rewards

Over simplification but this is what you would need to do.

iron karma
hoary scarab
iron karma
#

that would be very advanced I think xd

hoary scarab
#

🤷

#

You're basically just setting blocks form a list

iron karma
#

ill try the list of broken blocks xd

icy shadow
#

The broken blocks is very easy

#

Store the original BlockStates and then just call update() to reset

iron karma
#

at the moment i have this xd

#
public class MainCommand implements CommandExecutor {

    private KumaSpleef plugin;

    public MainCommand(KumaSpleef plugin){
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
        if (args.length == 0) {
            sender.sendMessage(color("&cError! Type &o/" + label + " help&c to get help."));
            return true;
        }
        switch (args[0].toLowerCase()){
            case "creategame":
                if (!(sender instanceof Player)) {
                    System.out.println("Only for players!");
                    return true;
                }
                Player player = (Player) sender;
                if (args.length < 2){
                    player.sendMessage(color("&cYou need to specify a name!"));
                    return true;
                }
                String arenaName = args[1];
                break;
        }
        return false;
    }
}```
#
package com.realxode.kumaspleef.arena;

import org.bukkit.Location;
import org.bukkit.entity.Player;

import java.util.List;
import java.util.UUID;

public class Arena {

    private Location spawnLoc;
    private List<UUID> playersIg;
    private int maxPlayers, minPlayers;

    public void join(Player player){
        if (playersIg.contains(player.getUniqueId())) return;
        if (isFull()) return;
        playersIg.add(player.getUniqueId());
        player.teleport(spawnLoc);
    }

    public void leave(Player player) {
        if (!playersIg.contains(player.getUniqueId())) return;
        playersIg.remove(player.getUniqueId());
    }

    public boolean isFull() {
        return playersIg.size() == maxPlayers;
    }

    public Location getSpawnLoc() {
        return spawnLoc;
    }

    public void setSpawnLoc(Location spawnLoc) {
        this.spawnLoc = spawnLoc;
    }
}
#

this works?

warm steppe
#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

iron karma
leaden sinew
grim oasis
#

I don't see pointX and pointY defined in that loop

leaden sinew
grim oasis
#

ohhhhhhhh

grim oasis
leaden sinew
#

I just set them to like 50

#

They are constant

grim oasis
#

maybe it's the way it was resized

#

those squares are 76x76 (if you include the orange) and 74x74 if you exclude it

#

so maybe if it was 75x75 it would look okay?

#

I'm just taking stabs in the dark fyi, I dunno

leaden sinew
#

Oh I should clarify, the squares aren't resized, just the canvas

#

It was even worse when I scaled the squares with the canvas

grim oasis
#

maybe you should post your class

#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

leaden sinew
#

I'm trying it keeps saying error adding document lol

grim oasis
#

paste service

leaden sinew
#

HelpChat

spiral prairie
grim oasis
#

click how to use if you need help

leaden sinew
neat pierBOT
#
📋 Paste Converted!
https://paste.helpch.at/undefined

A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!

grim oasis
#

good job barry

leaden sinew
#

Not good job lol

#

Look at it

grim oasis
#

ohhh I see you're saying helpchat paste is having problems

leaden sinew
#

Yeah

spiral prairie
#

yes

grim oasis
#

at least I can use skyslycer's

spiral prairie
#

xd yes

leaden sinew
#

It might be from when I convert it to a coordinate system of spacing of 1 to using the width of the tiles

grim oasis
#

also, your squares are 75x75

#

threw me off with the 50 earlier 😂

leaden sinew
#

That wouldn't really make a difference would it though?

#

Also I had it at 50 before lol

grim oasis
#

no, but threw me off

#

when you resize, do you mean resizing the window?

leaden sinew
#

Yeah

#

It appears like the grid lines appear when the window is bigger

grim oasis
#

so there is a point where it looks normal

#

hmmk

leaden sinew
#

Yeah in this picture you don't see any (The right is the background)

grim oasis
#

actually

#

there are grid lines

#

vertically

leaden sinew
#

Orange ones?

grim oasis
#

yep

#

zoom in

leaden sinew
#

Oh yeah there are

#

Good catch

grim oasis
#

not sure how to avoid it though

#

would setting the background to white help/work for you?

leaden sinew
#

Not really because the squares are different colors

grim oasis
#

what does it look like when you do it?

#

if you expand does it just end up showing white grid lines, ye?

leaden sinew
#

Yeah

burnt shard
#

Hey, is deluxemenus open source ?

grim oasis
#

no

burnt shard
#

Ow, and is there any way to make suggestions ?

grim oasis
halcyon ermine
#

Please tell me how to do something similar. Maybe someone has a guide or know?

winged pebble
#

Resource pack

leaden sinew
grim oasis
#

Ahh classic

#

So many methods

wintry grove
#

or custom inventories with bukkit

#

then do you need to do custom font characters for the inventory

#

thats pretty much on your own

dark garnet
#

is it possible to change the main world? trying to reset it and the easiest way to do it that i can think of is:

  1. create temporary world (world-temp)
  2. switch the main world from world-1 to world-temp
  3. unload/delete world-1
  4. create new world-1
  5. change main world to the new world-1
  6. unload/delete world-temp
    ping me if reply
lyric gyro
#

I mean, you ""can"" (just like you ""can"" do literally anything else ever), not in any supported way by any means, but you're going to break way more many things than solve

wintry grove
#

well

#

just troll the client and change the chunk data you send to it

stuck hearth
broken elbow
#

try returning the same prompt maybe. return this;.

#

or make a new prompt and return that one.

broken elbow
#

you create a new string prompt and return that when the input is invalid.

#

the getPromptText would return the message saying "the time you have inputted is wrong" and the acceptInput would basically do the same thing as your current prompt.

sudden sand
#

I'm using 1.18.2

dark garnet
# lyric gyro no

What if I edited the server properties file and then restarted the server?

dusky harness
#

At least that's what I think you meant by

trying to reset it

dark garnet
broken elbow
#

manually

dark garnet
#

I wanna do it with code

broken elbow
#

as emily mentioned, there's no supported way of doing it with code. well I'm fairly certain even manually resetting it can lead to some stuff breaking.

dark garnet
#

I think it just gives some warnings about player data iirc

#

But it usually just creates a new world on start

lyric gyro
#

Yeah that definitely will not unload the overworld, the server won't allow it

high edge
#

Use WE or CP to reset the terrain

sand arrow
#

Placeholders in my scoreboard doesn’t work

broken elbow
#

have you tested the placeholder with /papi parse first to make sure they work at all?

sand arrow
#

Oh the scoreboard one doesn’t

#

Tysm

cinder forum
#

confusion 🤔

icy shadow
#

the compiler doesn't know that taskID exists

#

consider ```java
int x = new Object() {
int get() {
return x;
}
}.get();

what's the value of x?
#

same thing

#

it doesnt make sense and the compiler isn't smart enough to know that the lambda will run later / async

cinder forum
#

oooh thx

dusky harness
wheat carbon
#

shutdown hook?

dusky harness
#

yes

#

🥲

#

iirc that's also how File#deleteOnExit works

#

but i dont know if deleteOnExit is a recursive delete

wheat carbon
#

d;file#deleteonexit

uneven lanternBOT
#
public void deleteOnExit()
throws SecurityException```
Description:

Requests that the file or directory denoted by this abstract pathname be deleted when the virtual machine terminates. Files (or directories) are deleted in the reverse order that they are registered. Invoking this method to delete a file or directory that is already registered for deletion has no effect. Deletion will be attempted only for normal termination of the virtual machine, as defined by the Java Language Specification.

Once deletion has been requested, it is not possible to cancel the request. This method should therefore be used with care.

Note: this method should not be used for file-locking, as the resulting protocol cannot be made to work reliably. The FileLock facility should be used instead.

Since:

1.2

Throws:

SecurityException - If a security manager exists and its SecurityManager.checkDelete(java.lang.String) method denies delete access to the file

dusky harness
#

oh

#

so it does work ig

#

Hm

#

although

#

it doesn't work for this guy

#

Or you can load your plugin before the world loads

#

and either delete the world in the constructor or onLoad

#

or onEnable

dusky harness
#

since default is POSTWORLD

dark garnet
#

imma try deleteonexit first

dusky harness
#

idk if apache commons IO is included in spigot, but if so: ```java
Runtime.getRuntime().addShutdownHook(new Thread(() -> FileUtils.deleteQuietly(new File(Bukkit.getWorldContainer(), "world"))));

and if not: ```java
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
    deleteDir(new File(Bukkit.getWorldContainer(), "world"));
}));

public void deleteDir(File dir) {
    File[] files = dir.listFiles();
    if(files != null) {
        for (final File file : files) {
            deleteDir(file);
        }
    }
    dir.delete();
}
muted trench
#

Hey! Any ideas on how to hide a player to themselves?

#

I am working on 1.8

dense drift
#

Maybe send then a packet as they are on gamemode 3, but without the ability to pass trough blocks and such

floral beacon
#

ok so i created ItemStack of diamond sword and i made it unbreakable
now i want to check on PlayerItemHeldEvent event if the item from player's hand isSimilar with the one created as itemstack BUT i want to ignore checking of unbreakable flag (i used setUnbreakable)

#

is this possible?

shut cloud
#

so you just want to check if the player is holding a diamond sword?

warm steppe
#

Mby Just check the type?

floral beacon
#

ok so basically i just want to check if player's sword DOES NOT (!) have unbreakable flag
i already have code that checks if he has diamond sword with specific name

warm steppe
#

Check item meta

shut cloud
iron karma
#

what does WordUtils.capitalize?

shut cloud
#

Capitalizes all the whitespace separated words in a String.

shell moon
#

How much time it takes to remove the getLastDamage() from an entity after it receives damage?

stuck hearth
#

I don't imagine it would get removed since it was damaged

#

d; spigot Entity

uneven lanternBOT
#
public interface Entity
extends Nameable, CommandSender, PersistentDataHolder, Metadatable```
Entity has 66 methods, 4 extensions, 6 super interfaces, and  154 sub interfaces.
Description:

Represents a base entity in the world

stuck hearth
#

Yeah looks like if an event was fired (and even cancelled) it would show there.

shell moon
#

so it doesnt remove after X time?

stuck hearth
#

If it does the Javadoc should specify that, but no I don't think so.

lyric gyro
#

I suppose it takes as much time as it takes the entity to be damaged again..?

shy lintel
#

Ew dont plugman reload

#

o.0

sudden sand
#

(Both are executed and after debugging it doesn't seems to set the blockdata to the block)

quasi wigeon
#

can I use the same attribute uuid for two similar items or should I generate a new one every time?

queen plank
#

Any maven pros that knows how to fix this java.lang.NoSuchMethodError: 'void org.apache.commons.io.FileUtils.copyToFile(java.io.InputStream, java.io.File)'? Here is my pom https://paste.md-5.net/sasavodane.xml

pulsar ferry
sterile hinge
#

Why would you use that method

queen plank
queen plank
#

Idk any better way so...

#

And this has worked fine for me before

#

I'm making a plugin for someone and they want it in 1.8

#

And now it does not work

#

:/

lyric gyro
#

Files.copy

queen plank
#

The method copy(InputStream, OutputStream) from the type Files is not visible?

queen plank
#

How do I fix the java.nio.file.AccessDeniedException when using Files.copy?

lyric gyro
#

"it depends"

#

you're basically saying "Hey guys this isn't printing anything System.out.println("Hi"), what do i do"

#

Share the whole stack trace, share contextual code

#

🔮

ember basin
#

Excuse me, do you know why i have this error ?

dense drift
#

you are shading papi

ember basin
#

i don't understand

#

sorry

dense drift
#

if you open your jar, you will see papi classes there. Use <scope>provided</scope> for maven or compileOnly for gradle

ember basin
#

oh i see

#

i'll try

obsidian abyss
pine flax
#

did you register it in your plugin.yml?

obsidian abyss
#

yep

grim oasis
#

send the EasyReports class

#

and the plugin.yml

obsidian abyss
grim oasis
#

that's the viewreports one erroring

obsidian abyss
obsidian abyss
pine flax
#

the s

grim oasis
#

viewreport is in plugin.yml

#

without the s

obsidian abyss
#

oh

#

it is still erroring

grim oasis
#

different reason now

#

Look at the error

#

Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.set(String, Object)" because the return value of "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" is null

#

and the stacktrace

#

at me.fozystyle.easyreports.commands.Report.onCommand(Report.java:51) ~[EasyReports-1.0.jar:?]

#

so go to Report class line 51

#

does Reports exist in your config?

obsidian abyss
#

yep

grim oasis
#

send it over

obsidian abyss
grim oasis
#

and does it exist in the config on the server? not just the one you package with the .jar

obsidian abyss
#

yep

grim oasis
#

there's no value

#

it's null

#

don't get it

#

just set it

#

plugin.getConfig().set("Reports."+finalTitle, finalReport);

#

try that

obsidian abyss
#

oh

grim oasis
#

use . to go layers deep into yml

obsidian abyss
#

Thanks

grim oasis
#
Reports:
  Title: 5
#

or whatever it will be

obsidian abyss
#

still erroring

#

nevermind

#

I know why

#

ok nevermind again

#

idk what is the problem

#

please @grim oasis

grim oasis
#

Are you sure you've used the correct .jar?

#

and restarted/reloaded?

#

the error still says it's doing getConfigurationSection

#

and it's not

obsidian abyss
#

nevermind I'm using minehut so reloading doesn't change anything

#

Just restarting

#

can I ask one more question

#

What does the last boolean "deep" means ?
plugin.getConfig().getConfigurationSection("Reports").getKeys(true)
I'm not sure

icy shadow
#

recursive

#

for nested sections

#

a.b

obsidian abyss
icy shadow
#

well if you want all the values use getValues

#

lol

obsidian abyss
#

fine

#

I'm not very familiar with coding java plugins

#

So I don't know everything yet

#

I'm very new to this topic

obsidian abyss
icy shadow
#

plugin.getConfig().getConfigurationSection("Reports").getValues(true)

obsidian abyss
#

thanks

icy shadow
#

np

fiery pollen
#

Is it possible for an subclass that extends a abstract class to not implement one of the methods?

#

For example i have a abstract class CustomEnchant and i have 4 events that can happen for enchants, onBlockBreak(), onHoldPickaxe(), onReleasePickaxe() and onDropPickaxe(). And i only want to import the onBlockBreak() for this enchant

icy shadow
#

short answer no

#

long answer just make the methods non-abstract

fiery pollen
#

and give them no body?

icy shadow
#

yeah

#

or whatever u want the default behaviour to be

#

longer answer, make 4 separate subclasses, each with 1 abstract method then you have to implement 1 and only 1

fiery pollen
#

Oh yeah, thats also possible

#

Thanks

leaden sinew
#

Or you could make the classes generic and accept a Event in the method

peak raft
#

Hello, anyone know if the Guilds API is publicly available?

hushed badge
#

yeah guilds is open source

peak raft
#

thank you 🙂

lyric gyro
#

getParent or smth

faint mural
#

and my question is, would the info on the link work for that purpose?

slow swallow
#

@grim oasis umm so yeah it doesnt really work as it should i guess

grim oasis
#

do you have the statistic expansion?

slow swallow
#

no i switched to killstats

#

and i downloaded

grim oasis
#

ok

slow swallow
#

expansion

#

just for scoreboard

#

probably

grim oasis
#

/papi parse me %placeholder%

#

just test it

#

make sure that's working

slow swallow
#

it does

#

sends

#

%placeholder%

grim oasis
#

send your class

#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

slow swallow
#

that would be a bit of problem

#

cuz it is main class

#

scoreboard is in on join event

#

i can send you on join event

#

so you have whole scoreboard class ?

grim oasis
#

sure?

#

idrc

#

paste tho

slow swallow
#

here it is

#

pastebin ?

neat pierBOT
#
📋 Your paste: charon
https://paste.helpch.at/wevosovaqe

A member of staff has requested I move your message to a paste,
Most likely because it contains a config/error/code snippet.

slow swallow
grim oasis
#

and it just isn't setting them?

slow swallow
#

yup

#

and i did /papi ecloud download KillStats

#

and /papi reload

grim oasis
#

and /papi parse me %killstats_kills% works

slow swallow
#

yup

grim oasis
#

are you sure?

#

I just realized you said it sends %placeholder%

slow swallow
#

yeah

#

yes

grim oasis
#

did you test with the actual placeholder?

slow swallow
#

because you wrote

grim oasis
#

and it returns the number?

slow swallow
#

%placeholder%

grim oasis
#

that's an example of how to use it, yes

slow swallow
#

no

#

no it doesnt

#

it return %placeholder%

#

and /papi parse me %killstats_kills%

#

returns %killstats_kills%

grim oasis
#

okay it's not working then

slow swallow
#

not sure why hahah

dark garnet
#

ok so i have String[] args, how can i get all of the args after args[0] (preferably into a String[])?

dense drift
#

Arrays,copyOfRange

dark garnet
dense drift
#

d;jdk Arrays#copyOfRange

uneven lanternBOT
#
public static T[] copyOfRange(T[] original, int from, int to)
throws IllegalArgumentException, NullPointerException, ArrayIndexOutOfBoundsException```
Description:

Copies the specified range of the specified array into a new array. The initial index of the range (from) must lie between zero and original.length, inclusive. The value at original[from] is placed into the initial element of the copy (unless from == original.length or from == to). Values from subsequent elements in the original array are placed into subsequent elements in the copy. The final index of the range (to), which must be greater than or equal to from, may be greater than original.length, in which case null is placed in all elements of the copy whose index is greater than or equal to original.length - from. The length of the returned array will be to - from.

The resulting array is of exactly the same class as the original array.

Since:

1.6

Parameters:

original - the array from which a range is to be copied
from - the initial index of the range to be copied, inclusive
to - the final index of the range to be copied, exclusive. (This index may lie outside the array.)

Throws:

IllegalArgumentException - if from > to
NullPointerException - if original is null
ArrayIndexOutOfBoundsException - if from < 0 or from > original.length

Returns:

a new array containing the specified range from the original array, truncated or padded with nulls to obtain the required length

dense drift
#

if you look at the method params, it accepts an array

dark garnet
#

nvm its just me facepalm

#

i dont have any dependencies so gradle is not building a jar, what do i do?

pure crater
#

Can you give us more information?

dark garnet
#

i dont need any dependencies for my project, so i dont have any set, and apparently the java gradle plugin requires one to build a jar, so how can i make it so that i dont need to define a dependency for the jar to still be built?

#
description = "Exhibit-Scorer"
version = "0.0.1"
group = "xyz.srnyx"

plugins {
    java
}

tasks {
    compileJava {
        options.encoding = "UTF-8"
    }
}```
pine flax
#

What if you make a dependency block but don’t put anything in it

dusky harness
#

since the plugins block has to be at the top

pure crater
#

^

dark garnet
pure crater
#

huh

dark garnet
#

and i have it like that in all my projects

dusky harness
#

and using IntelliJ 🤔

#

interesting

pure crater
#

thats your build.gradle.kts

#

correct?

dark garnet
#

yea

dusky harness
#

and also are you doing gradle build

dark garnet
#

yeah

pure crater
#

what command did you run?

#

yeah

dusky harness
#

since i dont get any errors either

#

thats quite interesting though

dark garnet
pure crater
#

oh groovy smh

#

lol

dusky harness
#

imagine using groovy 😌

dark garnet
#

fr

pure crater
#

then why is your file name build.gradle.kts

#

if its groovy

#

Lol

dark garnet
dusky harness
dark garnet
#

^

dusky harness
#

what error

#

are you getting

dark garnet
#

none it says build successful

pure crater
#

Oh nevermind im dumb i cant read lmao

#

Have you checked the libs folder?

dark garnet
#

omg

#

OMG

pure crater
#

and refreshed

dusky harness
#

build/libs?

dark garnet
#

why did intellij move the terminal to a completely different folder...

dusky harness
#

💀

#

terminal 💀

#

run configuration or double click ctrl = 😌

dark garnet
#

ok i moved it to where it should be and it worked 😔

dark garnet
dark garnet
#

wow this is all i need:

description = "Exhibit-Scorer"
version = "0.0.1"
group = "xyz.srnyx"```
dusky harness
#

and idk what description is used for

dark garnet
dusky harness
#

i think

#

unless description overrides it

dark garnet
#

hm

#

well removing version and/or group doesnt build jar

dusky harness
#

oh

dark garnet
#

uhhh

#

i dont think so FLOOSH

dusky harness
#

🥴 then i guess those are required

dark garnet
#

now no jar is building

#

what is happening

dusky harness
#

¯_(ツ)_/¯

dark garnet
#

ok java plugin is required

dusky harness
#

Oh

dark garnet
#

and ur right, thats all i need

#

is the java plugin

dusky harness
#

🥲

#

Trying to get the smallest build.gradle.kts?

#

🥴

dark garnet
#

plugins{java}

#

lmao

dusky harness
#

🥲

#

imagine not having a 211 line build.gradle

#

(older project back when I used groovy 🤢)

dark garnet
#

im not doing version control so i dont even a version in the name lol

dark garnet
dusky harness
dark garnet
dusky harness
#
plugins { java }
```🙃
pure crater
#

imagine not using 25 dependencies

dark garnet
dusky harness
#

:((

dark garnet
#

ok time to test for first time

#

lets hope it works first try

dark garnet
#

sadge no main manifest attribute, in Exhibit-Scorer.jar what

dark garnet
#

noooo 😭

dusky harness
#

🥲

dark garnet
#

whats the thing for it

#

like the task or whatever

dusky harness
dark garnet
dusky harness
#

try application.mainClass

#

idk if its only groovy

#

but

#

¯_(ツ)_/¯

dark garnet
#
plugins {
    java
    application
}

application.mainClass.set("xyz.srnyx.exhibit_scorer.Main")```
dusky harness
#
plugins{java;application}application.mainClass.set("xyz.srnyx.exhibit_scorer.Main")
```ez
dark garnet
#

ok it didnt work

dusky harness
dark garnet
#

yeah

dark garnet
dusky harness
#

try adding shadow plugin then and then gradle shadowJar 🤷 since I always use shadow

#

so

dark garnet
#

i dont think it'll do anything

#

cause no dependencies

#

lol

dusky harness
#

still worth a shot tho

dark garnet
#

ok

#

ok that worked

dusky harness
#

😤

#

🤩

dark garnet
#

but my code didnt :(

dusky harness
#

lol 💀

dark garnet
#
Score: 1
PASSED words: [whats, up, swag]
FAILED words: [whats, up, swag]```
#

it got the score right but not the passed/failed words

#

oh im so silly

peak raft
#

whats the API version for guilds

dusty frost
#

I mean it's in the name

#

universally unique identifier

#

unless it's exactly the same thing, I would have a different one

sharp cove
#

Someone that knows how to remove ''2 usages'' things in IDEA?

#

@ me pls

sterile hinge
sharp cove
#

Yes

#

Thank you : )

sharp cove
#

How can i add support for emoji's in my scoreboard?

fiery pollen
#

Whats the fasted way to find a memory leak inside of your plugin

icy shadow
#

profiler i guess

fiery pollen
#

this is a memory leak right, from the moment i reload my plugin, it goes down and then it keeps going up and never stops

icy shadow
#

does look a little sus

sterile hinge
#

heap dump and looking at that then

inner jolt
marble whale
#

I'm trying to add a potion effect while the player is crouching but i can't figure out what to use instead of a while loop.

public void onSneak(PlayerToggleSneakEvent event) {
                while(event.getPlayer().isSneaking()) {
                    event.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.SLOW_FALLING, 1, 1));
                }
    }
marble whale
#

i figured it out

lyric gyro
#

cool

lyric gyro
inner jolt
#

OH i see

echo briar
#

So im trying to make it so that a sword can be activated and deactivated, i currently have a countdown setup and everything works for the most part. my issue comes into line when two people activate at the same time. when players do this it breaks one players countdown and stops the other players countdown. https://paste.helpch.at/uxesubenoq.cs <--- here's the code that i have written for it.

#

Any help would be gladly accepted as i've been struggling to figure out whats wrong for some time now

grim oasis
#

it looks like you never use timeleft as far as I can see

#

you should be putting it back into cooldowns instead of storing it to timeleft ||also please make it timeLeft if you keep it||

echo briar
#

i removed it, totally forgot about that, Thank you. does anything else look out of place?

grim oasis
#

Can you send the class?

echo briar
#

Sure

grim oasis
#

it never looks like you remove the cooldown from what I see (not saying it breaks)

#

because it'll just return

echo briar