#help-archived

1 messages · Page 218 of 1

eager lagoon
#

or pre 1.13 trying to place a chest next to a double chest

final verge
#

when i is greater than or equal to j

undone narwhal
#

Spawnprotection or just normal minecraft behaviour

eager lagoon
#

ah ok

undone narwhal
#

Yes chest are an example

#

However I never used it. It should be thrown prior BlocPlaceEvent I think

marsh hawk
#

Where can i find GameSpy4 documentation?

eager lagoon
#

cool, doesn't sound very useful but it's there for a reason I guess :p

frigid ember
#

what do you mean or equal to?

#

It's just greater than?

lone fog
#

No

#

It runs while I is less than j

#

Once I is equal to j it will stop

potent crypt
#

Im using NoCheatplus in 1.16 but it's blocking crossbows how do I fix it or replace what to replace it with.
Can anyone help me or there is another server to help with this problem.

spring coyote
#

When using nms how can i make the second layer of the skin appear?

quick arch
#

Don't think you can 🤔

#

oh you can

frigid ember
#

yeh i gotchu

quick arch
#

Probably have to send a packet for each layer, so 7 packets

void hawk
#

im using redprotect but people still do not have permission to use buttons when i have them and redstone edit available

keen compass
#

probably just one packet @quick arch

#

it is an unsigned byte, and the bitmask can be sent as just a single byte containing all the options

quick arch
#

🤔

keen compass
#

that is the purpose of a bitmask

#

either it adds up all the bits or they are listed in order one of the two

#

since it is unsigned it has a range of 0-255

frigid ember
#
int i;
int sum = 0; 

for(1 = 1; i <= 5; sum += i++);

System.out.println("Sum is " + sum);
```Just wondering, why is the sum 15?
undone narwhal
#

Where is the i initialization?

opal heron
#

Any good plugin that can prevent hostile mobs from burning on daylight?

open herald
#

Can anyone see this?

patent monolith
#

has anybody seen redshirt anywhere? the guy seems awfully quiet...

#

also

opal heron
#

Hello Dio

patent monolith
#

my plugin have these wacky permissions:

permissions:
    locationsplugin.setlocation.self:
        children:
            locationsplugin.setlocation.other:
                children:
                    locationsplugin.setlocation.*:
                        children:
                            locationsplugin.*: true
    locationsplugin.getlocation.self:
        children:
            locationsplugin.getlocation.other:
                children:
                    locationsplugin.getlocation.*:
                        children:
                            locationsplugin.*: true
    locationsplugin.remlocation.self:
        children:
            locationsplugin.remlocation.other:
                children:
                    locationsplugin.remlocation.*:
                        children:
                            locationsplugin.*: true

The Spig0t wiki page for permissions says the following about children permissions:

Each child node must be set to either true or false.
A child node of true inherits the parent permission.
A child node of false inherits the inverse parent permission.

Am I setting this up wrong? Should I actually just specify only one layer of children, and any further layers would require the parent permissions to be redefined at the permissions root?

In other words, this still confuses me even after coding with Bukkit for over a year...

I don't think my permissions need much context here to interpret, but if for some reason it is needed, I will gladly provide more details.

Thanks in advance

#

One thing that confuses me the most is "inverse parent permission."

#

I don't understand what that really means

#

I think it means the opposite of "inherits the parent permission"

#

so inherits all the child permissions?

#

but that can't be the case, because if you set the value of that key in the yaml to true rather than specifying a section with keys/values, it cant have children... because children are defined using key/value pairs

#

It looked like the article was last touched near the end of June

#

not too long ago

#

Okay, so I figured out a surefire way to find the truth

#

yes, that is right

#

I have a gigantic brain

#
locationsplugin.*:
        children:
            locationsplugin.setlocation.*:
                children:
                    locationsplugin.setlocation.others:
                        children:
                            locationsplugin.setlocation.self: true
            locationsplugin.getlocation.*:
                children:
                    locationsplugin.getlocation.others:
                        children:
                            locationsplugin.getlocation.self: true
            locationsplugin.remlocation.*:
                children:
                    locationsplugin.remlocation.others:
                        children:
                            locationsplugin.remlocation.self: true
#

I will test it

open herald
#

!help

#

!asl

#

!ask

lone fog
#

?ask

worldly heathBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

frigid ember
#

Whats the best way to go about taking the integer, subtracting 1 and repeating if still 1 or higher:

public void animatronix(int hmd11) {
        if (hmd11 >= 1) {
            //run spinners
            int hmd11 = hmd11 - 1; //THIS is where im havin issues
            new BukkitRunnable() {
                @Override
                public void run() {
                    animatronix(hmd11);
                }
            }.runTaskLater(Main.getInstance(), 4);
        }
    }```
vernal spruce
#

Do a simple while loop?

undone narwhal
#

Recursive java method oops

patent monolith
#

r/IncreasinglyVerbose except for programming

sage summit
#

plz help

@EventHandler
    public void onCommand(PlayerCommandPreprocessEvent e){
        if(getConfig().getStringList("disabled-commands").contains(e.getMessage().toLowerCase().substring(1))) {
            e.getPlayer().sendMessage(Objects.requireNonNull(getConfig().getString("disabled-message")));
            e.setCancelled(true);
        }
    }

config

disabled-message: "You don't have access to this command"

#Commands to disable
disabled-commands:
  - tps
  - kill

It does not cancel the commands:/

warped coyote
#

...I built my own config class...
That verbosity scares me...

bleak pond
#

so noob question here. been years since ive last ran a server and im helping a friend with his. how do i OP myself and others? i also set up essentialsX and luck perms

sage summit
#

op <name?

#

op <name>

bleak pond
#

not showing anything for it

sage summit
#

in the console

bleak pond
#

hahahahaha

sage summit
#

is in on their computer or a hosting place?

bleak pond
#

thanks

sage summit
#

np

cyan kelp
#

How can I get a config value in a command executor?

bleak pond
#

wow i cant believe i forgot about the console, i even had it open on a different monitor 🤦🏻‍♂️

sage summit
#

i ake mistakes like that all the time lol

bleak pond
#

im losing my sides right now lmfao. i was supposed to be a jr sys admin a few months ago and im fing up something like this

#

corona saved that company for sure lmao

sage summit
#

Lol

#

plz help

@EventHandler
    public void onCommand(PlayerCommandPreprocessEvent e){
        if(getConfig().getStringList("disabled-commands").contains(e.getMessage().toLowerCase().substring(1))) {
            e.getPlayer().sendMessage(Objects.requireNonNull(getConfig().getString("disabled-message")));
            e.setCancelled(true);
        }
    }

config

disabled-message: "You don't have access to this command"

#Commands to disable
disabled-commands:
  - tps
  - kill

It does not cancel the commands:/
I think it needs to be getList not getStringList lol

echo path
#

how do i change the perms so all players can use the command i jus made?

wispy pewter
#

Dont add the permission

#

😂

solar spade
#

hi folks, sorry if my question is stupid easy, but i've been googling for an answer and found nothing.

#

i'm trying to set up a 1.16.1 spigot server and when i start it up, it gets to the world setup part and freezes at

Tile Max Tick Time: 50ms Entity max Tick Time: 50ms

i've tried increasing the ram flag to -Xmx6G, but no luck

wispy pewter
#

Uuuuh

solar spade
#

for reference, i've run servers before on 1.12.2, and i still have all those folders from back then. tried running them, and they function exactly as they used to, no issues

marsh hawk
#

where did you get your spigot jar from

solar spade
#

used BuildTools

#

it's spigot-1.16.1.jar

marsh hawk
#

have you monitored your cpu usagE?

#

could be that

#

doubt its ram

solar spade
#

hmm ok i'll try it again and take a look

#

oh wow yeah CPU goes through the roof. what could be causing that?

wispy pewter
#

When something takes that long to process its usually the process or ram

marsh hawk
#

could be background apps. What cpu you using?

solar spade
#

as in the processor?

marsh hawk
#

yeah

solar spade
#

Intel Core i7. it's a MacBook Pro

marsh hawk
#

hm that's strange

wispy pewter
#

Which one

solar spade
#

this MacBook Pro is from like 2015

marsh hawk
#

It shouldn't be throttling like that

wispy pewter
#

Then that shouldn't be bottlenecking

#

How much ram you got?

solar spade
#

yeah when i started it up, "java" CPU went to like 640% or something, and then disappeared. everything else is fine

marsh hawk
#

ram shouldnt be much of an issue with world gen

solar spade
#

i have 16GB of ram but i can try closing all the other stuff

wispy pewter
#

Generating worlds can take up allot of ram

solar spade
#

Discord actually seems to take up way more ram than it should, my hunch is that it isn't optimized for mac

wispy pewter
#

Chrome is worse

solar spade
#

but i'll just try closing out a bunch of stuff on my computer anyway

#

i'm using Firefox, switched from chrome for that reason haha

marsh hawk
#

could just restart

#

if thats not a problem

wispy pewter
#

I use fire fox and opera

solar spade
#

mk yeah i'll try restarting and get back to ya 🙂

#

restarted the computer and tried it again, max ram allocated is 6GB, and yep same problem

#

i've noticed that my laptop seems to run quite high on ram, and the battery needs to be replaced, so i'm wondering if that has to do with the performance. but would a lack of ram make it impossible to run, or just slow?

#

cause i'm also wondering if it will take a lot of ram to run the server, or only the first time when it's generating the worlds

alpine yoke
#

#general any1?

sage summit
#
@EventHandler
    public void onCommand(PlayerCommandPreprocessEvent e){
        if(Objects.requireNonNull(getConfig().getList("disabled-commands")).contains(e.getMessage().toLowerCase().substring(1))) {
            e.getPlayer().sendMessage(Objects.requireNonNull(getConfig().getString("disabled-message")));
            e.setCancelled(true);
        }
        else{
            e.getPlayer().sendMessage("not working");
        }
    }

config

disabled-message: "You don't have access to this command"

#Commands to disable
disabled-commands:
  - tps
  - kill

It does not do anything at all, no matter what command i run

umbral dirge
#

How do i stop scoreboard flickering

fading frost
#

What would be the best way to "intercept" plugin class loading for instrumentation?

#

As far as I'm aware, spigot will always use PluginClassLoader to load the plugin main

wheat mirage
#

Is there any way to stop the randomness in the Particle.REDSTONE colors?

#

I've tried an i of both 0 and 1

#

But there is always noticeable color variation

#

When I want them to be pure tones

tiny dagger
#

@umbral dirge by using teams instead of scores

umbral dirge
#

thx

warped coyote
#

I'm implementing something with advancements....how do I get the advancements name from an advancement object in Spigot?

Say I have the advancement
Hanro50 had made the advancement [Getting an Upgrade]

How do I get the "Getting an Upgrade" text in that advancement?

fossil shoal
#

@warped coyote Maybe advancement.getKey().getKey()

warped coyote
#

Mmm...let me test that

wraith thicket
#

Probably not - I'd guess that's actually handled client side - you'll see a different message depending on the client language

bronze acorn
#

@sage summit

#

wait no

#

nvm

#

i'd say do a for loop

#

and

#

if

#

message equalsignore case "/" + commandname

#

then do this

warped coyote
#

Huh...the server prints out the message so I know the server processes it at some stage.

As for the advancement.getkey().getkey() messages... I get story/smelt_iron for Acquiring Hardware....

wraith thicket
#

He'd actually just need to split at the first " " and use the 0th element in the resulting array

warped coyote
#

Maybe I can check for a story achievement type. And then check the chat log for the achievement text?

copper star
#

Is there any way I could make a queue system to get into my multiverse world

#

and /queue on in the world to turn on queue

edgy cove
#

If I send a plugin message to bungeecord every two ticks will the server lag?

copper star
#

I have found a plugin that does what I want

#

Nvm it is buggy

warped coyote
#

Wait Minecraft is a multi language game...so I'd need to access the language files to translate the advancements IDs into readable names.... now to figure out how to do that

rare prairie
#

crowdin

mellow wave
#

@warped coyote You can get the advancement name id and to display it send it as a translatable text component and the client will get the correct name for you

#

But it depends on what you are trying to do, it doesn't work with everything

warped coyote
#

I'm outputting it to Discord

copper star
#

Do you know a queue system plugin for my multiverse worlds

warped coyote
#

So... won't work.

@copper star
I think you'd have better luck with doing something like that in bungee rather than using multiword.

#

Although luckily the Spigot jar contains a copy of the language jars

alpine yoke
#

How do i check if block under player is chest? xd

wraith thicket
#

Get the player's location, get the block the location represents, get the block below (the #getRelative method) check it's type or state (whichever better suits your situation)

empty salmon
#

hey, anyone know why it sends the command sender /command when someone executes my command in-game?

wraith thicket
#

That's what you've specified in the usage: bit in your plugin.yml and you're returning false in the onCommand method

#

Clearly stated in the javadocs as well

copper star
#

I am getting this error:

Local variable queueposition defined in an enclosing scope must be final or effectively final

wraith thicket
#

You cannot use a non-final local variable in a lambda that gets run at a later time

#

That's because it would be unclear which instance the variable is supposed to refer to at the time at which the lambda is run

#

You can simply create a new (final or effectively final) variable referring to the instance you need

vernal spruce
#

@wraith thicket teaching young minds over here

empty salmon
#

Thank you @wraith thicket

strong lantern
#

how do I spawn tnt with a coustom fuse length?

warped coyote
#

Ok I ended up with a solution....so my planned solution is this.

Spigot will take the player UUID and advancement ID and ship them off to Bungee. Bungee has a language file which I can use to convert that ID into readable text.

I can then ship that off to Discord. And considering the Lang files contain item descriptions. It can lead to some fancy embeds along the way

strong lantern
#

ok...

#

BrUhhHHh

warped coyote
#

Tbf there is probably a better solution... but I'm more familiar with JDA then Spigot or Bungee.

strong lantern
#

😑

#

is SQL not an option???

#

🤦 🤦‍♂️

warped coyote
#

I... forgot how to use SQL tbh

strong lantern
#

🤦‍♂️ 🤦 🤦‍♂️

#

ooooofff

#

oh well rip

warped coyote
#

But I'll look into that

cerulean musk
#

\u78af\u309d\u3b31\ubff3\u972a\ue6fd\uf43b\u0d9a\u2324 . Guys What are they ?

strong lantern
#

idfk

#

try decoding it

#

like is it UTF-8?

#

it's probably byte data @cerulean musk

cerulean musk
#

İdk what means \u78af....

strong lantern
#

probably byte data of some non-english charachters

#

like chinese or korean or something

#

in utf-8

#

it should be stored in the format of byte data

bold anchor
#

It's chinese shit

#

Wait no

#

sec

#

Well yes

#

It's just a unicode format

strong lantern
#

idfk

cerulean musk
#

İ have a bedwars plugin and source codes is like this

strong lantern
#

there should be a decode function in java to decode bit encodings of text

subtle blade
#

İ have a bedwars plugin and source codes is like this
are you opening a class file? because that's not source. that's compiled bytecode

tiny dagger
#

looks like someone was decompiling classes

cerulean musk
#

İ found them with decomplier

tiny dagger
#

those chars are what java translates them internally

subtle blade
#

knowing this community its probably just obfuscated

strong lantern
#

bruh

#

excuse me

#

but your not exactly being... helpful

vernal spruce
#

bruh dont try to read a source without knowing what ur doing

subtle blade
#

why not? it's more than likely an obfuscated string in decompiled source? i just told you exactly what it is...

#

in what fucking way is that not helpful?

vernal spruce
#

also he didnt rly post anything

strong lantern
#

whoah may I ask if I'm allowed to swear?

subtle blade
#

obfuscators translate strings into seemingly random utf characters and pass them to a heavily obfuscated decoder method

#

with as little information as we were given, that is my best observation. characters with no discernible meaning found in decompiled source generally serve no purpose other than to hide text

#

you may continue to translate and try to decode them all you want but unless you have that decoding function, it's useless

strong lantern
#

in what fucking way is that not helpful?
@subtle blade AM I ALLOWED TO SWEAR?

subtle blade
#

why wouldn't you?

lone fog
#

No

#

Choco ban yourself >:c

subtle blade
#

keep it in moderation

strong lantern
#

wow ur toxic

#

geez

#

😑

subtle blade
#

far from it. i just don't like being told i'm not being helpful when i've given, so far, the most amount of information while being provided nothing more than "what is this"

#

i've been in this community for 6 years now. the last thing I need is "you're not helpful"

strong lantern
#

wow yeah last time instead of helping u said to me was
"you should learn the basics of java before asking for help here"
and wouldn't bother explaining ANYTHING.

#

I just made a stupid mistake in my code and that's what u said

rare prairie
#

read javadocs, done

strong lantern
#

🤦‍♂️

#

gee

subtle blade
#

because we're not here to teach you basic Java. If you're failing to understand a basic concept, you should take your time learning it before approaching the Spigot API

#

That has been the case since day one and that ideology extends far beyond myself

strong lantern
#

every time u give an answer to an inexperienced person it's usually really offensive.

rare prairie
#

It’s really offensive when a lot of people ask for basic things that google or something else can search for.

river cradle
#

Is launchpad a good NamespacedKey name? Or should I use a name like <my plugin>.customitems.launchpad?

subtle blade
#

You're fine to use simple key values. Realistically it's up to you because your key is namespaced. Hence the name

#

All your keys are prefixed with your plugin's name

river cradle
#

Thank you, I don't need many of them so I guess I'll just keep it short and simple

half badge
#

You mean new String(byte[])

edgy ridge
#

I'm trying to migrate my server from using a proxy to just using a plain spigot server, but there is an issue with the UUIDs when we are not in online mode, as bungee assigned the players a different UUID to their real one. How do I fix this?

frigid ember
#

Hey 🙂 I got a weird bug

vernal spruce
#

online mode = uuid are taken from mojang

#

offline mode = uuid are generated by name

frigid ember
edgy ridge
#

Thanks stellrow, I'm wanting to migrate from offline to online mode, do you have any advice on that?

vernal spruce
#

you cant without breaking everything

frigid ember
#

I spawning a PrimedTNT, and a Bat, then making the tnt riding the bat. The problem is the position of the bat (so of the tnt), the X and Z axis a good, but the Y is not good, because I can't adjust it properly:

vernal spruce
#

also i hope you know,changing from offline will also block every cracked player,meaning most players without a premium account wont be able to join @edgy ridge

trail hare
#

Something is very wrong with my /give command. I have tried multiple current-version item generators, and all of them are giving me what my game is insisting is an invalid item name.

/give @s minecraft:turtle_helmet{Unbreakable:1,display:{Name:"{\"text\":\"Grippli\"}",Lore:["You can't wear helmets, but you can breathe underwater longer!"]},Enchantments:[{id:"minecraft:binding_curse",lvl:1},{id:"minecraft:vanishing_curse",lvl:1},{id:"minecraft:respiration",lvl:1}]} 1

^With this item it fails at "You" because it sees a space. If I put a space in the name it fails there instead.

#

that's direct from a generator, no modifications. I've tried it with 3 of them 😦

#

Even commands that people in forums insist work for them have this problem. If there's a space in the name or lore it fails.

edgy ridge
#

@vernal spruce Yes, I am aware, we are moving off using a proxy, as it is too expensive to maintain it, and we would like to make sure cracked players cannot join, and make it so that we can grab skins too

vernal spruce
#

Well no way to change to online without losing every possible data

#

might as well just wipe and start fresh again

edgy ridge
#

Thanks for the help!

frigid ember
#

When I change the spawn position of the bat to b.getPosition().add(0.5, 0, 0.5) it's way too high:

#

And when I set to b.getPosition().add(0.5, -0.1, 0.5) it's too low:

trail hare
#

For simplicity's sake, I generated a barebones one:

/give @p turtle_helmet{display:{Name:'[{"text":"Name with a space","italic":false}]'}} 1
#

returns:

Error: Unknown item name: turtle_helmet{display:{name:'[{"text":"name.
#

It appears it's not escaping spaces that are within quotes?

frigid ember
#

witch version

#

which

trail hare
#

Paper 131, 1.16.1

frigid ember
trail hare
#

I used that generator, yes.

#

As well as 2 others.

bold anchor
#

Reproduce on spigot else go to paper issue tracker and report it.

trail hare
#

that last one was from THAT generator.

#

alright.

dry horizon
#

how can i zoom in in Intelliji?

trail hare
#

@dry horizon CTRL+Mousewheel I believe.

#

You may have to enable it in settings.

sturdy oar
#

Yes

#

Editor

dry horizon
#

aight

#

thanks

formal nimbus
#

hey guys

#

is there a way to tag an inventory?

#

like how you can give an itemstack a namespacedkey?

#

because essentially I need a way for a listener to detect an inventory

#

now I could do this by doing a bunch of itterations

#

however it would be much simpler if I could just tag the inventory

#

and would imporve the performance of the plugin

#

because those itterations would run every single click that a player makes in an invent

#

and that could get quite performance heavy

dry horizon
#

where can i find a copy of the Spigot file that doesnt say its outdated in the console?

shell zephyr
#

I'm looking for a developer

formal nimbus
#

I think there's a place on the forums

shell zephyr
#

May anybody help me with a question?

formal nimbus
#

for hiring devs

shell zephyr
#

that's ok

#

I have a question

#

...

dry horizon
#

just say your question and dont ask if we can answer it

formal nimbus
#

^^

shell zephyr
#

How to do it, that when a player do for example /skull , but he hasn't the needed perms , he'll get a customizable message?

#

How to do that?

odd knoll
#

if (!player.hasPermission("permission")) {
player.sendMessage("message");
return;
}

shell zephyr
#

But I will make it general for all plugins

#

So that it isn't important which Command you execute the message will appears

wispy pewter
#

use the code above

shell zephyr
#

I don't want to do that for any PERMISSION

formal nimbus
#

oi Michiel

shell zephyr
#

I will do it for all in one code

wispy pewter
#

"How to do it, that when a player do for example /skull , but he hasn't the needed perms , he'll get a customizable message?
How to do that?
"

formal nimbus
#

do u know of a way to uniquely identify an inventory?

wispy pewter
#

You need to be more obvious then

formal nimbus
#

like a custom tag

#

like how you have nameSpacedKey for itemstacks

wispy pewter
#

do u know of a way to uniquely identify an inventory?
@formal nimbus Could you give a explenation?

formal nimbus
#

sure

shell zephyr
#

?

formal nimbus
#

so imagine I have a group of inventories

#

they're all really similar

#

and I want them to have the exact same functionality

shell zephyr
#

How to do it for all Permission in one code?

formal nimbus
#

except there's one or 2 items different

shell zephyr
#

Not for every single perm

formal nimbus
#

so in a listener

#

on an InventoryClickEvent

wispy pewter
#

@shell zephyr You can make a list of permissions used in your plugin

formal nimbus
#

I want to check ifthe clicked inventory has a certain tag

wispy pewter
#

then check if the player has one of the stored permissions

shell zephyr
#

@wispy pewter I don't understand. Please explain

formal nimbus
#

that way I know it's an inventory which is meant to have the particular functionality

wispy pewter
#

that way I know it's an inventory which is meant to have the particular functionality
@formal nimbus You mean a table of inventories with keys?

#

so like _inventories["Inv_1"]

formal nimbus
#

I don't know lol

#

sure

#

imagine all the inventories are in a list

#

but I don't want to have to iterate through the list

#

I just want to check fi they have a particular field

wispy pewter
#

but what field

#

😂

formal nimbus
#

like you do with ItemStacks and a nameSpaceKey

#

anything

#

just an identifier

wispy pewter
#

You mean a key that holds a value inside a table

shell zephyr
#

I'm desperate

formal nimbus
#

I don't know xD

wispy pewter
#

Figure out what you want to do

formal nimbus
#

I know what I want to do ):

wispy pewter
#

I cant really help you with the provided information

formal nimbus
#

I'll show you the nameSpacedKey example

wispy pewter
#

Oke

#

@shell zephyr Provide a comprehensive explanation.

formal nimbus
shell zephyr
#

ok

formal nimbus
#

so that for example

shell zephyr
#

So

formal nimbus
#

rather than checkinf if the itemsatck is in a list, I just checked if it has my particualr identifier

#

therefore i know it's a crate ItemStack

wispy pewter
#

what is crate.getkey

#

what does it return

formal nimbus
#

a namespackedKety

#

*Namespacedkey

#

I'll show that

wispy pewter
#

Just use a table i suppose

formal nimbus
#

by table do you mean a list?

wispy pewter
#

No

formal nimbus
#

o?

wispy pewter
#

hashmaps

formal nimbus
#

oh right

wispy pewter
#

or whatever they are called in java

#

Ljoy:

formal nimbus
#

yep, hashmap

#

so how would I implement a hasmap?

shell zephyr
#

When the Player type /skull , but he hasn't the needed perms, he should get a message about the deny. But I don't want to make a plugin for every single deny message, I will resume it. So what to do? How to do it in general for all the deny messages?

hollow thorn
#

do titles accept certain texts

wispy pewter
#
  private final Map<SomeType> _inventories = new HashMap<SomeType>();
hollow thorn
#

also where can i get the vannila text thingies(such as the pickaxe)

shell zephyr
#

When the Player type /skull , but he hasn't the needed perms, he should get a message about the deny. But I don't want to make a plugin for every single deny message, I will resume it. So what to do? How to do it in general for all the deny messages?

wispy pewter
#

@shell zephyr So lets your plugin contains 10 commands with permissions. and you dont want to add a perm check for each of those commands?

shell zephyr
#

Nooooo.

formal nimbus
#

why would you need to make a plugin for every deny message??

#

heh

shell zephyr
#

That's the question

formal nimbus
#

?????????????/

shell zephyr
#

I don't want to do it

wispy pewter
#

Bro that's literally what you are saying.

shell zephyr
#

ok

#

Can you help me?

formal nimbus
#

yes, but only if you make it clear what you need help with lol

shell zephyr
#

Which code I need to type

formal nimbus
#

what you're saying doesn't exaclty make sense

shell zephyr
#

YES

wispy pewter
#

I recommend making one super permission which controls all the commands

#

like "MyAwesomePlugin.use"

shell zephyr
#

I GO NUTS!

#

I'M GOING CRAZY...

wispy pewter
#

You are going nuts with your own explanation

shell zephyr
#

No, i don't

#

I'm not a Dev or something else

#

I also can't send you a picute

wispy pewter
#

Listen. What you want is one super permissions which controls all the commands in your plugin

shell zephyr
#

*picture

hollow thorn
#

how do i add symobls to text

shell zephyr
#

Listen. What you want is one super permissions which controls all the commands in your plugin
@wispy pewter It shouldn't control the commands. It should only send everytime the same message that the player doesn't have the needed perm

wispy pewter
#
Example Permissions:

1. skull.use = if a user has this permission he can execute all commands related to the skull plugin.

2. skull.destroy = Allows a player to destroy a skull
shell zephyr
#

?

#

May I send a pic to you ?

wispy pewter
#

your statement is contradictory

formal nimbus
#

Can you not put a primative tpye inside of a hasmap?

wispy pewter
#

if you want to use a int as key do Integer

#

int is just a alias for Integer

formal nimbus
#

oh

#

lol I love how you read my mind

wispy pewter
#

That is called Experience

#

🤓

formal nimbus
#

so ur saying I have a hasmap like this one:

#

I then put every special inventory I want in that map

#

with the same code

#

then when I want to test it

#

I stick in the click inventory

#

*clicked inventory

wispy pewter
#

Yes and use the integer as unique ID

formal nimbus
#

and if it returns they key

#

yep

#

gotcha

wispy pewter
#

But then instead of int use UUID

formal nimbus
#

o?

wispy pewter
#

Which is specially designed for creating unique id's i reckon

formal nimbus
#

cool

shell zephyr
#

....

#

:c

wispy pewter
#

oh and change inventory to _inventory

#

so you always know you are working with the field

#

because variables could also be called inventory

#

and then it can cause conflicts

#

#NamingConvention

#

Always make private fields start with _

daring oracle
#

does anyone know a placeholder for mob hp or a plugin that gives me that placeholder or something

#

i want to put the mob hp in the name of the mob

wispy pewter
#

You mean a new field inside the mob class?

formal nimbus
#

oh and change inventory to _inventory
@wispy pewter I haven't been following that naming convention, so I'm not gonna start now lol

#

I'll implement it in future though

wispy pewter
#

Its good to start with

formal nimbus
#

before my next project I'll learn it all

#

hubuubigwuhuiehg

wispy pewter
#

otherwise you will eventually get lost inside your own code

formal nimbus
#

but that means renaming EVERY VARIABLLLELELLE

#

I'm on eclipse and it doesn't make it easy ):

wispy pewter
#

Welll the IDE supports refactoring

#

and InteliJI is better

formal nimbus
#

I don't think eclipse does?

wispy pewter
#

😂

formal nimbus
#

yeah ik

tiny dagger
#

ctrl 1

#

do it for entire workplace

wispy pewter
#

^

formal nimbus
#

wut doth it do?

tiny dagger
#

after you're done press enter

#

ez eclipse refactor

formal nimbus
#

??

#

how do I do it for the entire workplace?

tiny dagger
#

a popup appears

#

with quickfixes

#

choose the rename in entire project option

formal nimbus
#

o

#

I see that now

#

cool 😮

#

ok

#

still it's gonna be a pain x_x

tiny dagger
#

just make sure to press enter

#

to reg the changes

wispy pewter
#

its not going to be a pain

tiny dagger
#

ofc not

formal nimbus
#

it is going to be big pain

tiny dagger
#

that's an ide for you

wispy pewter
#

Or your lazy 😉

formal nimbus
#

yeah prob the later

#

ok so where can i find the naming convension scheme?

tiny dagger
#

google type java convention

formal nimbus
#

k

tiny dagger
#

or java best practices

#

in 2 hrs max you're knowing it all

wispy pewter
#

even quicker lol

tiny dagger
#

prob a lot quicker

wispy pewter
#

easy see xD

formal nimbus
#

Im still gonna have to find every object and check it ;-;

#

so instances and hashmaps begin with an _

wispy pewter
#

Well if you keep coding then it will take longer to change all of them 😉

formal nimbus
#

or I could just not change them :0

wispy pewter
#

Only if they are private lol

formal nimbus
#

wait wat

#

wait so private things begin with an _

#

ok I need to find a different link

wispy pewter
#

You know the difference between the public and private access modifier?

formal nimbus
#

yes obviously I do

wispy pewter
#

Alright

formal nimbus
#

it just didn't say on the document to name privaate things with an _

wispy pewter
#

private fields should start with _

#

public start with Uppercase

formal nimbus
#

...

ancient ridge
#

wat

formal nimbus
#

even if it's a variable?

#

wut is this wack

ancient ridge
#

lmao

wispy pewter
#

so

private:
private String _name = "big doddo";

public:

public String Name = "Big doddo";

ancient ridge
#

no

formal nimbus
#

yuck

ancient ridge
#

where the fuck did you learn that

wispy pewter
#

atleast thats how i used to do it

#

Maybe in java _ isnt in its naming convenation

ancient ridge
#

that's wrong

shell zephyr
#

???

#

I give up

#

Nothing works

ancient ridge
#

cool

wispy pewter
#

probably should only be lowecase in java then

ancient ridge
#

what doesn't work

wispy pewter
#

No under-score

formal nimbus
#

OH SNAP

#

OH SHIT SON

#

xD

wispy pewter
#

😂

formal nimbus
#

OFFICIAL java docs

#

my bi

#

*boi

#

I aint following this wackk

ancient ridge
#

Maybe in java _ isnt in its naming convenation
@wispy pewter what language is it then?

wispy pewter
#

C#, C++

#

I'm used to write on those languages

ancient ridge
#

I see

wispy pewter
#

So thats why i thought it was in java to

ancient ridge
#

I've only experimented with c# a bit

#

I only know Java

formal nimbus
#

I'd like to learn c at some point

#

probably better for making games with

subtle blade
#

private fields should start with _
what is this? Python?

wispy pewter
#

The reason why we create private fields _ is to identify the diffrence between variables and private fields

formal nimbus
#

what is this? Python?
@subtle blade C

#

as far as I know python naming convention is basically save as Java

#

*same

#

but I've only done basic stuff in Python

ancient ridge
#

oh yeah python I've done a fair bit of that

formal nimbus
#

so I don't realyl know

subtle blade
#

yeah, only python's encapsulation is a joke in that in order to privatize something you prefix it with _ or __

formal nimbus
#

The reason why we create private fields _ is to identify the diffrence between variables and private fields
@wispy pewter sure it makes sense

wispy pewter
#

I don't like the way you type in python

subtle blade
#

then it name mangles it

#

im not even kidding. look into python encapsulation. its terrible

ancient ridge
#

i find python a bit weird

wispy pewter
#

Because it is 😂

subtle blade
#

the most half-assed OOP language i've ever seen in my life

ancient ridge
#

ahah

formal nimbus
#

I started off coding in python, when I started Java a couple of months ago I instantly preffered Java

#

python is just eh

wispy pewter
#

let me created a quick example of what i mean with the _ naming convention in C#, C++

formal nimbus
#

the most half-assed OOP language i've ever seen in my life
@subtle blade that's literally cause it is

#

it's like, you can do OOP or functional

#

and it's just odd

#

probably why many like it

#

for those who don't understand the glory of OOP D-:<

wispy pewter
#
public class Test
{
    private Map<Integer, String> _data = new HashMap<Integer, String>();


    public static void main(String[] args) {
        var data = _data[1];
        
    }
}
cerulean musk
#

Guys how can i make killer heart? (Esat was slain by Mustafa 8.5HP)

wispy pewter
#

if the field is just called data i cannot create a var called data

#

The _ allows us to determine whenever we are working with a field or not

formal nimbus
#

cool

#

Michiel do u even make spigot plugins lol

hollow thorn
#

for some reason i need to reload my plugin before it works

wispy pewter
#

I'm planning on creating one

formal nimbus
#

cause it seems you mainly code in C?

#

oh nice

#

it's remarkable how much help you can give despite the fact you've never made one 😮

wispy pewter
#

@ancient ridge Go learn PHP 😂

subtle blade
#

Go learn PHP 😂
we don't tolerate threats here Kappa

wispy pewter
#

it's remarkable how much help you can give despite the fact you've never made one 😮
@formal nimbus Thanks ahah, I only looked at the docs of spigot yet. But after learning couple languages its easy to understand the next one.

#

Its just called Experience

#

thats all

formal nimbus
#

👍

wispy pewter
#

@subtle blade COBOL

#

Erlang

#

Fortran

#

ASSEMBLER

formal nimbus
#

bruhhe fortran oldd

wispy pewter
#

The entire economy of the USA runs on COBOL

#

Want to know whats even worse?

#

VISUAL BASIc

formal nimbus
#

I don't know what that is ;-;

wispy pewter
#
Module Module1

    Sub Main()

        Dim insult = "You suck"
        Console.WriteLine(insult)
    End Sub

End Module

#

That

#
Public Class Person
    Public Name As String
    Public Gender As String
    Public Age As Integer

    Public Sub New(name As String, gender As String, age As Integer)
        Me.Name = name
        Me.Gender = gender
        Me.Age = age
    End Sub
End Class

fossil shoal
#

What language is that?

wispy pewter
#

Visual Basic

#

You like it?

#

Please dont

#

Lua is my third fav language

#

XD

#
function love.load()
    math.randomseed(os.time())
    width = love.graphics.getWidth()
    height = love.graphics.getHeight()

end

function love.draw()
    for y = 0, height do
        for x = 0, width do
            if y <= 15 or y >= height - 15 then
                love.graphics.setColor(1,185 / 255,15 / 255)
                love.graphics.rectangle("fill", x, y, 1, 1)
            else if x <= 15 or x >= width - 15 then
                love.graphics.setColor(191 / 255,62 / 255,1)
                love.graphics.rectangle("fill", x, y, 1, 1)
            else
                    local color = {
                       r = x / 255,
                       g = 0,
                       b = y/ 255
                    }        
                    love.graphics.setColor(color.r, color.g, color.b)
                    love.graphics.rectangle("fill", x, y, 1, 1)
                end
            end
        end
    end
end
#

xD

fossil shoal
#

You like it?
Not really xd

balmy sentinel
#

This channel is for help only please take it to general

wispy pewter
#

Messing with pixels

#

This channel is for help only please take it to general
@balmy sentinel oh oops, ssst

#

Lua is faster then C#

#

lol

stiff oasis
#

How can I thunder someone with a script

formal nimbus
#

my use of static here is fine right?

#

or is there a better way of doing things

wispy pewter
#

Dont see a reason to use static

#

Static should not be used when storing data

#

Just make it private

#

thats all

formal nimbus
#

but I don't want multiple maps

wispy pewter
#

You dont need

formal nimbus
#

?

wispy pewter
#

Wait

#

can this class be instantiated more then one time?

formal nimbus
#

and I only want 1 UUID

#

yes

#

it's instantiated lots

#

should I store the info in a class which is only instantiated once?

balmy sentinel
#

if you only want one map than yes.

wispy pewter
#

No this is fine

#

You can make it static

formal nimbus
#

I;m getting mixed responses...

#

but I trust Michiel

wispy pewter
#

I thought you were working with Singetons again 😂

formal nimbus
#

mainly because he's saying I don't need to change anything

#

I thought you where working with Singetons again 😂
@wispy pewter nope

wispy pewter
#

Altough you could create a class called ItemStore

#

that stores all the data

#

Which i would recommend

#

And that DataStorage class is a singleton

formal nimbus
#

awwwwwwwww ):

wispy pewter
#

understand?

formal nimbus
#

yes

#

but that meanss efffoooorrtttt

wispy pewter
#

Rather spend more time in writing clean code

#

then making spaghetti code

odd knoll
#

You'll save time/effort in the future.

wispy pewter
#

Yep

#

And now you know that the Items are being stored in the ItemStorage class

#

This will make your project more readable

formal nimbus
#

it has begun

hollow thorn
#

for some reason my plugin only works when reloaded

wispy pewter
#

Yes

formal nimbus
#

it does mean I'm going to end up with names like these xD

wispy pewter
#

good job

#

Now put the data field in there

formal nimbus
#

what if I abreviate it but leave a comment saying wut it is

wispy pewter
#

Its always better to sort your stuff

balmy sentinel
#

it’s your plugin name it what you want. Naming conventions are really just for you to understand what it is. However you should pick a name where someone else could read your code and understand what it is and used for.

wispy pewter
#

^

hollow thorn
#

?paste

worldly heathBOT
hollow thorn
wispy pewter
#

Seems the jar isnt added

hollow thorn
#

as in?

#

the plugin only works after a reload

wispy pewter
#

Ooh then i think i know

#

If your plugin loads before the other does you cannot call it

cerulean musk
rare prairie
#

Player#getAttribute

hollow thorn
#

If your plugin loads before the other does you cannot call it
@wispy pewter what?

formal nimbus
#

is there a wat I can clone an inventory?

#

*way

fringe shore
#

@here

formal nimbus
#

wot

fringe shore
#

idk

#

just board

#

lol

formal nimbus
#

bruhhe

#

why would u ping people like that

#

r o o d

fringe shore
#

any way go to restart my pc bye

hollow thorn
#

If your plugin loads before the other does you cannot call it
@wispy pewter what does that mean

rare prairie
#

is there a wat I can clone an inventory?
What inventory you want to clone? Why you not listens to inventory events, like InventoryOpenEvent?

hollow thorn
#

i think he ment way

high path
#

Is a way to remove a resource?

rare prairie
#

report that resource with "delete" or sgh text

hollow thorn
#

?paste

worldly heathBOT
shell zephyr
#

Where can I create a thred?

hollow thorn
#

halp

shell zephyr
#

Where can I create a Post/ Thread

#

help

rare prairie
#

on spigot

odd knoll
#

You just go into the forum section and click Post New Thread.

#

Make sure you're logged in and if the button isn't there, you can't post there. Some sections have requirements such as 50 posts.

shell zephyr
#

I can't post it

rare prairie
#

halp
halp?

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.8.0_241]
        at `java.uti`l.ArrayList.get(Unknown Source) ~[?:1.8.0_241]
        at com.javaminecraft.Elytra.<init>(Elytra.java:212) ~[?:?]

com.javaminecraft.Elytra.<init>(Elytra.java:212)

#

I can't post it
login/register to spigot

shell zephyr
#

I did it

odd knoll
#

Where are you trying to post specifically?

shell zephyr
odd knoll
#

You need to go into a specific section as I said.

shell zephyr
#

Which?+

odd knoll
#

What are you going to post?

shell zephyr
#

I want to post a offer

#

I want to hire a dev

odd knoll
#

But remember there are requirements to post there.

You require at least 20 posts and a 1 week old account to post within this section
All threads within this section are moderated until they are found to be in line with the section rules.```
shell zephyr
#

I understand

#

But I can't post something, so I can't reach that GOAL

ionic hound
#

anyone wana help me learn how to program spigot plugins

odd knoll
#

So you post in other sections about something else.

shell zephyr
#

I can't

odd knoll
#

Participate in other discussions.

#

Ok, I CBA. It's extremely intuitive.

unkempt ridge
#

whats the best way to store player achievements like how do the big servers do it? I was thinking an achievement database, but I'm not sure if I should make each achievement it's own field and use a tinyint (1 or 0 for achieved and not achieved) or use an array in the database so it'd just store their uuid and and array of achievements. Lmk what you all think is the best way of accomplishing this. I was thinking like 20+ achievements with room to add more. (Still trying to find a way to store progress tho 🤔

cerulean musk
#

Guys who can help me for coding issues? Dm me please

rare prairie
#

you want errors to code?

lone fog
#

?ask

worldly heathBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

plush kraken
#

how do I delete my account?

vital copper
shell zephyr
rare prairie
#

what you do before you got banned?

static echo
#

How do i fix Lighting lag (TPS) when i place a block above void in spigot 1.8.8?

vernal spruce
#

Tried cancelling physics update

#

on it?

static echo
#

how?

vernal spruce
#

you could check if a block is right above 0-1

lone fog
#
            Inventory inv = chest.getInventory();

            if (!(inv instanceof DoubleChestInventory)) {
                event.getDrops().addAll(drops);
                return;
            }

            DoubleChest doubleChest = (DoubleChest) inv.getHolder();
            for (ItemStack item : drops) {
                doubleChest.getInventory().addItem(item);
            }```
#

Anyone know why this won't work

#

Doesn't put anything in the chest but Chest chest = (Chest) chestBlock.getState(); for (ItemStack item : drops) { chest.getInventory().addItem(item); } does, however only into one half of the inventory

vernal spruce
#

In what context/event/way

#

put the hole class in paste

#

?paste

worldly heathBOT
patent monolith
#

This is more of a general Java question than a question pertaining to Bukkit, but it is still somewhat related to Bukkit based on the situation.
I have some library jars that I would like to add to the classpath for the JVM, so I will use the -classpath argument to specify the folder\*. The problem I am having has to do with the fact that the Spigot jar has some of these libraries with the exception that they are on a lower version. If I were to specify these dependency jars using -classpath, would the classes loaded from these jars take priority over classes with the same name loaded from the Spigot jar? I assume it wouldn't from a maintenance perspective, because the code in the Spigot jar does not expect any other version than the one packaged with it.

lone fog
vernal spruce
#

@lone fog also yes it puts only in half

#

because you can cast a doublechest to only 1 chest

#

i believe doublechest has methods for both inventorys

#

or check first if the instance is a doublechest

#

before using only chest

lone fog
#

That is what if (!(inv instanceof DoubleChestInventory)) { is for

vernal spruce
#

not rly sure why are you working with holders

#

also

#

how can a chest be instance of doublechest

#

??

#

Chest chest = (Chest) chestBlock.getState(); Inventory inv = chest.getInventory(); into inv instanceof DoubleChestInventory

lone fog
#

Alright changed it to ```Chest chest = (Chest) chestBlock.getState();
InventoryHolder holder = chest.getInventory().getHolder();

        if (holder instanceof DoubleChest) {
            DoubleChest doubleChest = (DoubleChest) holder;
            for (ItemStack item : drops) {
                doubleChest.getInventory().addItem(item);
            }
        }``` as per <https://www.spigotmc.org/threads/add-item-to-double-chest.431341/>
vernal spruce
#

im sure i already know the answer but test it yourself

lone fog
#

Still empty

vernal spruce
#

as expect you cant turn a chest into a doublechest straight like that

#

let me get the spoon quick

umbral dirge
#

What plugin would u suggest to stop exploiters?

vernal spruce
#

a good staff

#

exploits can be anywhere,including in other plugins

#

you cant prevent them

umbral dirge
#

ik

#

but i check them

vernal spruce
#

there are some not even the developer is aware of

#
        if(chest.getState() instanceof DoubleChest) {
            DoubleChest dchest = (DoubleChest)chest.getState();
            HashMap<Integer,ItemStack> left = dchest.getInventory().addItem(item);
            if(!left.isEmpty()) {
            for(ItemStack items : left.values()) {
                addToChest2(chest.getLocation(),items);
            }
            }
            return;
        }
        if(chest.getState() instanceof Chest) {
            Chest cchest = (Chest) chest.getState();
            HashMap<Integer,ItemStack> left = cchest.getInventory().addItem(item);
            if(!left.isEmpty()) {
                for(ItemStack items : left.values()) {
                    addToChest2(chest.getLocation(),items);
                }
                }
            return;
        }
        
    }```
#

@lone fog

#

as simple as checking first if its a doublechest

#

like why go through holders and shit

#

ignore the hashmap and stuff as thats just a simple go next chest if current one is full

lone fog
#
            if (chest instanceof DoubleChest) {
                Bukkit.broadcastMessage("double");
            } else {
                Bukkit.broadcastMessage("not double");
                return;
            }``` chest instanceof DoubleChest doesn't pass
urban wharf
#

Has anyone know about MySql Placeholder i kinda need help

vernal spruce
#

you know that..

#

you are trying to check if a chest is a instance of doublechest right?

lone fog
#

I know it is a double chest

vernal spruce
#

i told you stop casting it straight to chest in the beggining

#

Chest chest = (Chest) chestBlock.getState(); this should not exist only before checking if its a doublechest

#

first

lone fog
#

Ah

#

I thought doubleChest extended chest

#

It does not, my bad

static echo
#

How i fix lighting TPS lag at spigot 1.8.8?

vernal spruce
#

alrdy told you to cancel blockphysics after placing it

#

this should ignore light update or anything about the block

static echo
#

ok, so this can work?
@EventHandler
public void test(BlockPhysicsEvent p) {
p.setCancelled(true);
}

vernal spruce
#

you check if the block meet your condition

#

you dont cancel every physic holy shit..

static echo
#

;-;

vernal spruce
#

You do check if the block location is at level 0/1 y

#

no need to care about anything way above void

static echo
#

ok

lone fog
#

Nope if (chestBlock.getState() instanceof DoubleChest) still fails

#

Infact, DoubleChest does not even extend BlockState

static echo
#

ok Stellrow

#

how i check if the block is exposed to the sky?

vernal spruce
#

you check light level

#

if it has clear sky it will always be 14 if i remember

static echo
#

but if is night the light level go be the same?

vernal spruce
#

yes

static echo
#

Thanks for help bro

vernal spruce
#

Infact, DoubleChest does not even extend BlockState
@lone fog yet ide throws nothing when i do this?

lone fog
#

Guess not

vernal spruce
#
        if(b.getState() instanceof DoubleChest){

        }```
lone fog
#

Ah I see

vernal spruce
#

its not gonna magically only work for me..

#

you know,you can simply copy paste the code i posted

#

and just change it to fit

vernal spruce
#

so you didnt even look at the fully functional code i posted.. i see

fossil shoal
#
        if(b.getState() instanceof DoubleChest){

        }```

@vernal spruce DoubleChest does not extend BlockState

lone fog
#

I mean if(chest.getState() instanceof DoubleChest) can never be true so...

static echo
#

Don't work Stellrow, the TPS lag its the same

lone fog
#

tps or fps

static echo
#

server TPS

#

when i place a block in a hight place

#

the lighting loop put the tps down

lone fog
#

Well you only checked if you are placing a block right above the void

#

You do check if the block location is at level 0/1 y
Assuming you did that

static echo
#

i made for check if the block y its above 30

alpine spindle
#

Any1 Hv Good Plugin to Warp Menu = Inventory to select item to teleport?

ionic hound
#

How do i Color Codes work?

#

System.out.println("only player Can use this command");

jagged torrent
#

See the ChatColor class

static echo
#

@ionic hound do sender.sendMessage(ChatColor.<Color>"<Message>")

jagged torrent
#

you can either use the constants or use ChatColor#translateAlternateColorCodes()

frigid ember
#

is there a pste thingy

#

paste*

lone fog
#

?paste

worldly heathBOT
frigid ember
#

ok

ionic hound
#

@static echo do i need to import anthying?

static echo
#

Import ChatColor

frigid ember
#

Can you disable disconnect.spam in the spigot source code or something?

coarse anchor
#

how do I post on the forums?

#

I cant find the place to do so

lunar widget
#

I saw some plugins that tell the owner if there is a new update for the plugin, how do I make that

ionic hound
#

so @static echo import org.bukkit.ChatColor;

lunar widget
#

just press CTRL+Shift+o to import everything

static echo
#

@ionic hound Yes, but is more eazy you try press CTRL + Space

hardy cedar
#

hey i need a big help in something
my bungeecord suck

#

:/

mellow wave
#

What do you mean?

#

What's wrong with it

coarse anchor
#

how do I post on the forums?
I cant find the place to do so

quick arch
#

!newthread

#

.

#

?howtopostathread

quick arch
#

yes, good gif

bold anchor
#

Okay bot

#

Can you stop idiot

void hawk
#

hey guys, im trying to set rewards for voting, I currently have the rewards file as the following but nothing is given. Could you let me know what im doing wrong? Thanks

#

MinecraftServerListings:
Enabled: true
Name: Minecraft Server Listings
ServiceSite: minecraft-server-list.com
VoteURL: https://minecraft-server-list.com/server/465613/vote/
VoteDelay: 24
Item:
Material: TRIPWIRE_HOOK
Amount: 1
Chance: 100
Name: '&aPirates Chance Key'
Enchants:
fortune: 1
Rewards:
Commands:
- /eco give {player} 1000
- /xp give {player} 1l
Messages:
Player: '&aThanks for voting on %ServiceSite%!'

restive granite
subtle blade
#

dead code. you have a return true the line above your error

quick arch
#

e.e

subtle blade
#

you should (1) fix your indentation and (2) use braces where appropriate. Just because you don't have to use them for single-lined statements doesn't mean you should

restive granite
#

i dont really understand what ur saying if u dont mind explaining where i should put the return true line

wispy pewter
#

Why are you creating the same variable 2 times

frigid ember
#

Choco, can anyone learn how to program?

#

Someone told me to give up because I asked a question about Java.

wispy pewter
#

Anyone can learn

quick arch
#

^

wispy pewter
#

Aslong you take the time to learn it

#

And dont give up if your code doesnt work

frigid ember
#

I don't want to give up, but someone else told me to.

restive granite
#

same

#

but meh i just ignored them

wispy pewter
#

If you want to figure something out then search that particular feature on google

restive granite
#

oh well now im stuck not knowing what to do

mellow wave
#

Some people can be rude

wispy pewter
#

he told you to give up because he probably doesn't know how to program himself.

quick arch
#

If you want to figure something out then search that particular feature on google
unless it's complex stuff i.e. packets, nms, etc then you probably will have to ask

wispy pewter
#

Every beginner will ask questions

#

That with everything the same

#

You can't learn to drive a car without getting help

#

or asking questions

#

@frigid ember he told you to give up because he probably doesn't know how to program himself.

#

probably just a wanna be kid who tries to flex with a hello World program

frigid ember
#

Well I mean he does know how to program, he's in this discord right now, but I don't know if I should say his name.

quick arch
#

🤔

mellow wave
#

Don't give up and keep going :)

wispy pewter
#

Good that hes here

void hawk
#

name and shame him

wispy pewter
#

😂

restive granite
#

hey so @wispy pewter can u help me with my problem i dont know what do

wispy pewter
#

Yeah sure

#

whats the isue?

restive granite
mellow wave
#

You're returning and trying to run code after

#

That won't work

restive granite
#

hmm so what im i

#

supossed to do

mellow wave
#

The return statement cancels the code after it causing dead code

wispy pewter
#

You can put code under a return statement in the same scope

#

The returns statements prevents the program for executing any further code in its scope

restive granite
#

hey ill send the script and can u show me what to do here is the script

package me.valid.event;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {
  public void onEnable() {}
  
  public void onDisable() {}
  
  public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    if (!label.equalsIgnoreCase("setevent"))
      return false; 
    if (!(sender instanceof Player)) {
      sender.sendMessage(ChatColor.DARK_RED + "You do not have Permission to access this command!");
      return true;
    } 
    Player player = (Player)sender;
    if (!player.hasPermission("event.set"))
      return true; 
        Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', args[0]));
        String message = "";
        message = message + args[0] + " ";
        return true;
        
        if (!label.equalsIgnoreCase("getevent"))
          return false; 
        if (!(sender instanceof Player)) {
          sender.sendMessage(ChatColor.DARK_RED + "You do not have Permission to access this command!");
          return true;
        } 
        Player p = (Player) sender;
        if (!p.hasPermission("event.get"))
          return true; 
        p.sendMessage(ChatColor.DARK_GREEN + ""+ message );
        
    return true;
  }
}


wispy pewter
#

discord indention sucks

mellow wave
#

?paste

worldly heathBOT
wispy pewter
#

send us the .java file

mellow wave
#

Paste it there and send the link

wispy pewter
#

^

quick arch
#

why do people use label 🤔

wispy pewter
#

?

quick arch
frigid ember
#

^ was going to point that out too, should be the opposite

#

otherwise any other command that is not setevent wont run

restive granite
frigid ember
#

turn

if (!label.equalsIgnoreCase("setevent"))
            return false;
//code here

into

if (label.equalsIgnoreCase("setevent")) {
//code here
restive granite
#

okey

frigid ember
#

same for getevent

restive granite
frigid ember
#

if (label.equalsIgnoreCase("setevent")) {

#

no "!"

restive granite
#

ohhh

warped coyote
#

That return true before the second if is to blame for the ide complaining.

The highlighted code beneath it will essentially never run basically.

restive granite
#

oooooooooo

#

tysmm

frigid ember
#

not necessarily

#

in his case he should have it there and end the first if statement

#

so that setevent is one block, and getevent is one block

warped coyote
#

If there is a chance for a return not to run the ide won't complain. So if you do

If(x){
Return;
}
//Code here

It won't complain

If you do

If(x){
Return;
//Code here
}

It'll highlight anything after the return block in red that's still within the if block.

#

.
Sorry, bit slow and messy with my explanation😅

tiny dagger
#

ye

#

oups

#

oh nvm

#

it was still this topic

odd knoll
#

Wha.

#

And Hanro, probably not and I don't see any point of doing that.

warped coyote
#

Was that for the thing from earlier?

odd knoll
#

Wait, I misread.

#

I'm tired lol.

#

I'll go mess up hashing on 2FA tokens. Back in a bit. Just realised that's even more of a tired thing to say coz I can't hash em 🤦‍♂️.

warped coyote
#

I solved my issue from earlier btw

#

Thank you Bungeecord devs for including a language file in the server jar...

lunar widget
mellow wave
#

Invalid config

#

Send the full one

lunar widget
#

what?

mellow wave
#

Send the full config file so we can help you with what's wrong with it

lunar widget
fading frost
#

spigot applies certain transformations when loading classes, such as replacing legacy materials if applicable. does anyone know where the code for this is located?

#

can't find it in PluginClassLoader

quick arch
#

doesn't look like a colon 🤔

mellow wave
#

Looks like ; to me

quick arch
#

yeah

lunar widget
#

oh f-

#

didnt notice that

mellow wave
#

Yeah minor mistakes can and will mess up your config file

humble venture
#

hey does anyone know if there is a way to access the global nbt storage that was added in 1.14?

mellow wave
#

You could force a command to be run and grab the data

quick arch
#

you can't grab global nbt with Persistent Data Containers

mellow wave
#

Don't know of anothe way

humble venture
#

is that the only way?

#

dang

mellow wave
#

Anyway why do you need to use that?

humble venture
#

I heard it's faster

drifting herald
#

anyone know how to change my name on Spigot

#

I need to donate right?

humble venture
#

because it doesn't deserialize and reserialize everytime

quick arch
#

and can only get/set stuff from there

mellow wave
#

It's not worth it mess

humble venture
#

I know you are able to store with an entity

#

or itemstack

#

yeah alright

#

I couldn't find a way to do it with api, just wanted to confirm that it was the case

subtle blade
#

spigot applies certain transformations when loading classes, such as replacing legacy materials if applicable. does anyone know where the code for this is located?
@fading frost Commodore

fading frost
#

what's that?

fading frost
#

ok thank you, that looks promising

#

are there any further transformations being made?

#

Or does it all happen in convert

subtle blade
#

to my knowledge, all is done through Commodore

fading frost
#

awesome

#

It's a real hassle to hook into plugin class loading.

subtle blade
#

There's nothing more than the SimplePluginManager, PluginClassLoader and Commodore

#

At least with regards to managing class instances

fading frost
#

Sure

#

I mean there is no api for custom class loading as far as I'm aware

#

I'm doing it with a really hacky solution right now

subtle blade
#

All you need to load a class is a URLClassLoader

fading frost
#

well there's a little more to do than that if you want to intercept it

#

And I'm talking about the plugins themselves, not some plugin system of my own

#

unless there is a way to change the class loader that's used to load the plugin main.

#

wait, when does this commodore stuff happen?

#

it replaces the jar file, is that correct?

subtle blade
#

In the PluginClassLoader

fading frost
#

so before anything is loaded

subtle blade
#

Reads the class' bytes, processes them through Commodore to convert what needs to be converted using ASM, defines the class

fading frost
#

ok, good

#

I think I can work with that

#

You have been of great help so far, thank you

subtle blade
#

o/