#general

1 messages Β· Page 204 of 1

grave nymph
#

or have i really butchered that

#

the context part would be the worlds name?

potent prawn
#

you can ignore context, it's optional

#

/lp user <user> parent settrack <track name> <group name>

#

so whatever you named the track

#

and the group on that track

grave nymph
#

and group name would be the track position?

potent prawn
#

yeah

grave nymph
#

ok i get that

#

right let me see if i can get it to work thank you for your help

#

user i wouldnt chnage tho

potent prawn
#

you're forcing the position, instead of blindy throwing them up the ladder (what if they weren't in the group you expect them to be)

grave nymph
#

i keep everything inbetween these things <>

#

i dont delte those

#

or chnage this part <user>?

potent prawn
#

always replace the brackets

#

< > means required
[ ] means optional

#

top of every command page

grave nymph
#

in the user section what do i do about that with the <> so it would just be user user

potent prawn
#

/lp user turbotailz parent settrack staff admin

grave nymph
#

so i would have to add in the config everyones names?

#

seems odd or could i just use &p

modest compass
#

Your auto rank plugin should be about to parse a placeholder to an actual username

#

For commands that run through auto rank plugin

grave nymph
#

so this will work?

modest compass
#

What’s with the 1 at the end of the lp command?

grave nymph
#

thats the position of the track the rank is

modest compass
#

Ohh yea

#

Try and see then

grave nymph
#

ok crossing my fingers

#

its all setup right but this still hapenns

modest compass
#

Screenshot lp track timeplayed info

potent prawn
#

what a load of lies!

#

wait are you using the group name or a number in the command

grave nymph
#

number

#

would this be an autorank issue

potent prawn
#

use the group name

grave nymph
#

ok will do

#

works with the name not the number

potent prawn
#

πŸ‘

grave nymph
#

why wouldnt that work tho its weird

potent prawn
#

idk, could make a suggestion for it :P

gilded nova
#

Ever migrated hosts and every single jar magically grows 500kB in size?

#

.----------.

modest compass
#

it sounds... just like magic

gilded nova
#

Lol

fallow talon
potent prawn
#

should look at the console logs

fallow talon
#

it just throws a big long error but at the top it just says this plug in is disabled

potent prawn
#

share the error log

#

no one can help without it

gilded nova
#

Errors are your friends when trying to solve issues.

#

If something doesn't work but there is no error... oh boy, you don't even know where to look at

fallow talon
#

ok one sec

outer vesselBOT
modest compass
#

i hink startup log will be better

#

can be found in logs/latest.log

fallow talon
outer vesselBOT
gilded nova
#

> [SimplePets Debug] This version is not supported, be sure you are between 1.11 and 1.14

#

Make sure you're using the latest version of the plugin tho

languid gale
#

ive been so incative in the offtopic

#

sad

#

@violet rivet u almost have a stack of subsctivers on Not Enough Lights

outer vesselBOT
#

Hey olli! Please don't tag helpful/staff members directly.

languid gale
#

oop

wanton verge
#

i am trying to sell perks ingame such as /fly etc but i want to do this with ingame money, does anyone know a plugin that can do this? preferably with a GUI

deft thistle
#

Most likely an economy plugin

#

Like vault

#

Idk though

#

I plan on doing that aswell

glass thunder
#

Does anyone knows good antibot ?

#

For cracked/premium server

drowsy quest
#

There's no "premium"

languid gale
#

did u search on google?

drowsy quest
#

Only those who bought the game and those who cracked it

glass thunder
#

Well kinda since premium since supports premium and cracked users πŸ‘€

languid gale
#

is it called cracked tho

#

its called free?

drowsy quest
#

There's no such thing as premium accounts

languid gale
#

oh ur talking about the price

#

not*

drowsy quest
#

No it's cracked. There are no free MC accounts

languid gale
#

unless ur given one

drowsy quest
#

That wasn't free regardless

languid gale
#

ah yes

#

I thought u were talking about the plugin

drowsy quest
#

Free for the person who uses the account, but not for the person who gifted it

languid gale
#

like free or paied

drowsy quest
#

No

#

I mean MC

languid gale
#

then i realised

#

yeah ik

deft thistle
#

hey

#

im thinking about upgrading my servers

drowsy quest
#

Ok

deft thistle
#

lga 1150 cpus though

drowsy quest
#

What?

deft thistle
#

would it be better to go for a higher clocked i3 or pentium or a 4 core 8 thread xeon

drowsy quest
#

If you're running MC you want high single core performance

#

Check the single core benchmarks of those CPUs

deft thistle
#

but i mean haswell's single threaded is pretty good and way better than nahelem

#

or yorkfield rather

drowsy quest
#

The thing is you haven't given me any information on the CPUs. Like a current gen i3 beats a the best first gen Xeon by miles

deft thistle
#

no

#

im looking for haswel cpus

#

i have an i3 4340

drowsy quest
#

In any case, look for benchmarks of the CPUs

deft thistle
#

but im saying would a lower clocked xeon with more cores and threads be better for running a server

drowsy quest
#

And prioritize single core peformance over everything else

#

No it wouldn't

#

MC is essentially a single core application

deft thistle
#

not servers

#

they use most of the cores

drowsy quest
#

Yes even MC servers

deft thistle
#

i use paper

#

its multicore

drowsy quest
#

While they are multithreaded the actual game runs on a single thread

deft thistle
#

yes

#

i know

drowsy quest
#

And the main thread is what bottle necks

#

That's why I'm saying you want single core performance over anything else

deft thistle
#

im not willing to spend more than 30 dollars on haswell

#

its not worth it

drowsy quest
#

You should have enough cores though so that every MC server that generates load has a core "to itself"

#

You're asking for what's better

#

And I'm saying single core

deft thistle
#

keep in mind these are bungee servers

drowsy quest
#

So the i-series is better

deft thistle
#

i know the i series is better

drowsy quest
#

Bungee servers are irrelevant. You only care about backend servers

deft thistle
#

like the proxy?

drowsy quest
#

The proxy servers themselves are irrelevant

#

Only the backend servers matter

#

Like say you have a bungeecord server, 4 backend servers where there are lots of players on constantly (excluding lobbies) and 10 with lower loads.

#

Then you want at least 4 cores and the stronger the cores the better

#

If you get an 8 core CPU with weaker cores your performance will be worse

deft thistle
#

unless im running more than one server per computer

drowsy quest
#

No

#

Doesn't matter here

#

Even if you have two of those servers

#

You'll still be off worse than with that 4 core

#

And btw CPUs with hyperthreading. You actually care about the physical cores, not the virtual ones

deft thistle
#

yea

drowsy quest
#

Though what I mentioned is how you get optimal performance

#

Not the most cost effectice setup

deft thistle
#

a xeon e3 1230 looks pretty good

#

yeah

#

haswell systems are cheap

#

but not the cpus

#

even though they are so old

#

its a scam

drowsy quest
#

Β―_(ツ)_/Β―

deft thistle
#

an athlon 3000g would be a better alternative lmao

drowsy quest
#

If you want a cost effective server (ignoring energy cost) I'd recommend AMD's Ryzens

#

Even for servers

deft thistle
#

but i dont have extra power supplys and motherboards laying around

#

or enough ram to put in those systems

#

i have plenty of ddr3 though

#

and dell systems are cheap

drowsy quest
#

Oh. So you're talking about building a physical server

deft thistle
#

si

#

what did you think?

drowsy quest
#

Ok. Then yes. I retract the recommendation for Ryzens

#

They need way too much power

deft thistle
#

not really

drowsy quest
#

I thought you wanted to rent a server at a server hoster

deft thistle
#

ryzen is pretty power efficient

#

oh no

#

thats way too much money

#

why would a server hoster even have haswell cpus

drowsy quest
#

ryzen is pretty power efficient
@deft thistle They're still one of the worst in terms of modern CPUs

deft thistle
#

not compared to haswell they arent

#

and my 3600 is great

#

4.3ghz

drowsy quest
#

thats way too much money
@deft thistle Are you sure? Did you do the calculations? Especially in what it costs you in energy/power

deft thistle
#

3733mhz ram

#

i have free nights

#

from 9 to 7 free energy

drowsy quest
#

That means you still pay during the day

#

Not sure where you live, but I came out double what I pay for a server with twice the power

deft thistle
#

tx

#

plus

#

only 60w per system

#

at most

#

less than a light bulb

drowsy quest
#

Time to get better bulbs xD

deft thistle
#

i use led

drowsy quest
#

Then they're not 60W

deft thistle
#

im saying better than most bulbs

#

not the ones i have

drowsy quest
#

They're equivalent to 60W incandescant

deft thistle
#

yeah

#

ok well the current haswell cpus i have are the i3 4340 and the pentium g3220

drowsy quest
#

But 60W is pretty good

#

I crunched the numbers for me running 200W worth of servers is 50€/month xD

deft thistle
#

but they arent under load 100% of the time

#

so they will use even less power

#

its not an avx work load

drowsy quest
#

Sure. It's still better to calculate with the upper estimate

#

And be aware of your average estimate

deft thistle
#

yes

drowsy quest
#

But yes in your case that's actually cheaper

deft thistle
#

this is better than both of my cpus

#

boosts to 3.7

#

and 8 threads

#

wait

#

4 threads

drowsy quest
#

Oh?

deft thistle
#

so an i5-4590s roughly

#

same price

#

rip

drowsy quest
#

That one doesn't have hyperthreading

#

So you have 4 cores

deft thistle
#

ik

drowsy quest
#

That one looks ok

#

But you need a better power supply

deft thistle
#

i would want a e3 1230 v3 then

drowsy quest
#

That one peaks above 60W

deft thistle
#

not in the dell systems

#

its not like they use 100w power supplys

#

plus dell uses gold power supplys

drowsy quest
#

Funnily enough both are about the same in terms of single core

deft thistle
#

yeah

#

they boost to the same frequency

#

just the 1230 has hyperthreading

deft thistle
#

they are basically the same

drowsy quest
#

Hyperthreading hardly does anything for MC

deft thistle
#

just one has hyperthreading

#

windows

drowsy quest
#

So you can savely go for the weaker one

#

windows
Why?

deft thistle
#

windows uses the hyperthreading for background tasks

drowsy quest
#

I mean why throw half the power out the window for the OS?

#

Sure

#

But again your bottle neck is the main thread in the MC servers

deft thistle
#

yes

#

but currently they are using core 2 quad q6600 and q9505

#

so even a pentium g3220 is better

#

which i have

drowsy quest
#

Yes

deft thistle
#

all i need is the system

#

ill just stick with my 2 cpus until i need an upgrade

drowsy quest
#

I mean all I'm saying you're not gaining much by getting the 1230 over the 1226

deft thistle
#

no one on ebay is willing to part out the dell for some reason

drowsy quest
#

A few percent points in performance on your whole system

#

The MC servers will be the same

deft thistle
#

i connect to them remotely

drowsy quest
#

So?

deft thistle
#

so it will be better in the long run

#

but

#

im not buying it yet

drowsy quest
#

How's how you connect to the servers relevant?

deft thistle
#

no

#

i connect to windows remotely

drowsy quest
#

Ok.

deft thistle
#

cpu power

#

anyways

#

the fastest single core performant haswell cpu is the 4790k

#

at 4.4

#

but thats way too much

drowsy quest
#

In terms of money?

lofty compass
#

Less than 200 usd used

deft thistle
#

thats more than the dell system itself

#

the lowest buy it now is 167 + shipping

#

with that money i could get a i3 10100

lofty compass
#

What are you looking for

#

New pc?

deft thistle
#

no

#

new cpus for the server

#

for the future

#

not right now

#

the cpus i currently have are the i3 4340 and a pentium g3220

lofty compass
#

How many players

deft thistle
#

which is still better than my old yorkfield systems

#

maybe at most 10-15

lofty compass
#

Oh. You don't need anything too powerful then

deft thistle
#

i have like 20 plugins on some of the servers

#

or more

#

idk

lofty compass
#

I bought a server with E3-1240 16GB RAM and 500GB HDD for like $180 2 years ago

deft thistle
#

nice

#

im trying to get 2 optiplex 9020 usff

#

for less than 110

#

but no seller is willing to part out

#

:/

#

wait

#

does the xeons need a specific chipset?

lofty compass
#

They work in same ones as desktop counterpart

deft thistle
#

or can it work with q87

#

oh

lofty compass
#

You'd just have to verify which family it belongs to on Intel ark website

deft thistle
#

seems to be compatible

clever swan
#
package DuderItems;

import java.util.ArrayList;

import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

import net.md_5.bungee.api.ChatColor;

public class DuderItems implements Listener {
    
    public void giveItems(Player player) {
        ItemStack item = new ItemStack(Material.YELLOW_FLOWER, 1);
        ItemMeta meta = item.getItemMeta();
        
        meta.setDisplayName(ChatColor.YELLOW + "THIS IS A TEST");
        ArrayList<String> lore = new ArrayList<String>();
        lore.add(ChatColor.WHITE + "THIS IS ANOTHER TEST");
        meta.setLore(lore);
        meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
        item.setItemMeta(meta);
        
        player.getInventory().addItem(item);
    }
}

Whats wrong with my code?

#

please ping me if you can help

rigid widget
#

Looks like you need to be listening for something specific @clever swan

clever swan
#

I am, am I not?

#
package Events;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;

import DuderItems.DuderItems;

public class EventsClass implements Listener {
    
    private DuderItems di = new DuderItems();
    
    @EventHandler
    public void onPunch(PlayerInteractEvent event){
        Player player = event.getPlayer();
        di.giveItems(player);    
    }
}

Here is my Events class

vast isle
#

what about it doesn't work

rigid widget
#

It implements listener

#

Instead implement the listener for what you're listening for

clever swan
#

how would I go about doing that?

rigid widget
#

there should be a listener for the event

#

Ok here's some example code

gilded nova
#

Are you registering the Listener?

rigid widget
#

it's not my code either, all credit to _11

clever swan
#

there is a listener

rigid widget
#

But see how the class implements MessageCreateListener

#

Not Listener

gilded nova
#

Are you registering the Listener?

clever swan
#

yes @gilded nova

outer vesselBOT
#

Hey TheShinyLizard! Please don't tag helpful/staff members directly.

gilded nova
#

That class looks fine to me tho

clever swan
#

yeah same here

#

those are the errors I get

deft thistle
#

oo

#

where can i learn to make plugins?

clever swan
#

watch videos

rigid widget
#

Doesn't look like you're importing the events package either

deft thistle
#

i have a decent understanding of java

rigid widget
#

And also what kinda IDE is that

clever swan
#

eclipse

rigid widget
#

Noooo

clever swan
#

?

rigid widget
#

:(

clever swan
#

use inteliij?

rigid widget
#

Yes

clever swan
#

xD

deft thistle
#

whats wrong with eclipse

vast isle
#

everything

clever swan
#

everything

deft thistle
#

lmao

gilded nova
#

Lmfao

clever swan
#

eclipse is garbage but i like it

rigid widget
#

It's not as good as intellij and that's what matters

clever swan
#

yeah

rigid widget
#

Especially when you're new

deft thistle
#

microsoft visualstudio

clever swan
#

ew

#

vsc is also bad

rigid widget
#

It's free, it's great, just do it

clever swan
#

ok

#

back to the bug

#

how do I fix it?

deft thistle
#

so what would i use then

lofty compass
#

I use mspaint

vast isle
#

intellij idea

deft thistle
#

there we go

rigid widget
#

IntelliJ!

clever swan
#

how do I fix the error?

gilded nova
#

Make plugins on a redstone computer

rigid widget
#

@clever swan you aren't from the snippets you sent importing the events class

deft thistle
#

Make plugins on a redstone computer
yes

rigid widget
#

And you aren't telling the class when to do the thing

clever swan
#

everything looks to be imported correctly

#

join V1 i'll show you

#

nvm

#

screensharing isnt allowed

gilded nova
#

Lmao

clever swan
#

but yes, everything seems to be imported correctly

rigid widget
#

I see

lofty compass
#

Create an AI that can make your plugin. Ez

rigid widget
#

It's backwards from what I was seeing

#

Nevermind that bit

clever swan
deft thistle
#

Create an AI that can make your plugin. Ez
@lofty compass make an ai that makes an ai to make any plugin

clever swan
#

those are the only errors

rigid widget
#

Events class needs to implement the event listener for the thing you're doing @clever swan

#

Can't just implement generic Listener afaik

lofty compass
#

Endless AIs making each other

vast isle
#

I don't think they're trying to listen in that class they just made it implement listener for no reason?

clever swan
#

so I should just remove it?

rigid widget
#

This line

#

See how it implements specific listeners for events that happen

deft thistle
#

its open source?

#

pog

rigid widget
#

This bot is not the Clippy we have now

#

@deft thistle

deft thistle
#

oh

rigid widget
#

Luck doesn't wanna swap :(

gilded nova
#

For Bukkit events, you need to implement Listener, there is not a specific listener class/interface for each event

rigid widget
#

Really?

gilded nova
#

Yep

lofty compass
#

He doesn't want clippy to be self-aware

rigid widget
#

Stupid bukkit

gilded nova
#

Β―_(ツ)_/Β―

vast isle
#

what version are you using btw?

clever swan
#

so if I don't need a specific listener, then what should i do?

rigid widget
#

Welp I'm out of ideas and on mobile lol

clever swan
#

what version are you using btw?
Spigot 1.8.8

vast isle
#

ah

clever swan
#

larry all good ty for the help

#

I'll send a screenshot of the project hold on

#

sorry for the light mode

vast isle
#

did you register the eventsclass listener

gilded nova
#

As long as you don't use discord in light mode, it's okay

deft thistle
#

what if you use the sidebar in dark mode

clever swan
#

yes Jordan I did

gilded nova
#

Lizard show your onEnable method

clever swan
#

wdym, onEnable?

vast isle
#

...

gilded nova
#

..

clever swan
#

when the plugin loads?

#

that onEnable?

gilded nova
#

The entry point of your plugin

#

yea

clever swan
#

holy shit

gilded nova
#

...........

clever swan
#

I forgot to set that up...

gilded nova
#

LMAO

clever swan
#

i'll be right back....

gilded nova
#

then you are NOT registering your listeners

#

smh

clever swan
#

im smol brain sorry

deft thistle
#

ahh

#

i need to understand

clever swan
#

this is my 2nd plugin btw

deft thistle
#

time to watch vids

#

anyone recommend a good video/videos?

gilded nova
#

aa don't worry, I've been making plugins for months and I still forget to register my listeners

vast isle
#

also maybe you should have a main package

clever swan
#

is there any way to change the names?

#

I forgot to put the me.FlameDuder.

gilded nova
#

can't you just

#

like

#

drag n drop?

#

idk eclipse

clever swan
#

idk

#

but is there anyway to rename the packages and classes?

gilded nova
#

right click -> rename?

#

idk

clever swan
#

im so stupid

#

i hate eclipse

deft thistle
#

lmao

clever swan
#

whats that other ide u guys use? Intellij?

deft thistle
#

yea

#

time to learn java

clever swan
#
package me.FlameDuder.DuderItems;

import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

    public void onEnable() {
        System.out.println("Enabling DuderItems");

    }
    public void onDisable() {
        System.out.println("Disabling DuderItems");
    }
}
#

what's the problem now?

vast isle
#

you didn't register the listener

#

sec

#

Bukkit.getPluginManager().registerEvents(new EventsClass(), this);

#

something like that

clever swan
#

now it's saying I need to attach a source?

#
package me.FlameDuder.DuderItems;

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

import me.FlameDuder.Events.EventsClass;

public class Main extends JavaPlugin {

    public void onEnable() {
        System.out.println("Enabling DuderItems");
        Bukkit.getPluginManager().registerEvents(new EventsClass(), this);

    }
    public void onDisable() {
        System.out.println("Disabling DuderItems");
    }
}
gilded nova
#

attach a source?

#

tf

clever swan
#

idk thats what its sayin

gilded nova
#

"it's saying", what is?

clever swan
#

eclipse

deft thistle
#

eclipse

clever swan
#

eclipse is telling me i need a source

vast isle
#

uh from a quick google you probably added the jar to your build path instead of using gradle or maven?

clever swan
gilded nova
#

yes no shit, but where exactly

#

hmm

clever swan
#

uh from a quick google you probably added the jar to your build path instead of using gradle or maven?
@vast isle how would I check this?

gilded nova
#

Did you manually add the jar as a library?

#

"Add library JARs" or something

clever swan
#

no

#

Extended Jar

gilded nova
#

gradle or maven
ever heard of these two?

clever swan
#

yes

gilded nova
#

do you have a file named "build.gradle" or "pom.xml" somewhere in the project?

clever swan
gilded nova
#

Could've said no but okay

clever swan
#

and at that moment

#

he knew

#

he fucked up

vast isle
woeful willow
#

I see the ossue

clever swan
#

yeah I used graddle im pretty sure

woeful willow
#

You're using ecplise

clever swan
#

xD

vast isle
#

lmao

gilded nova
#

*links maven tut* I recommend gradle

vast isle
#

it has the gradle tutorial on there too

clever swan
#

im gana switch to intelij after im done

#

ok boys

gilded nova
#

I see the ossue
You're using ecplise
ikr

clever swan
#

here is the problem rn

#

i need to figure out how to import gradle to the project

drowsy quest
#

Gradle is a build system

#

Nothing you import

clever swan
#

ok, so then I should be good, no?

drowsy quest
#

Kinda

#

I think what they meant is that you haven't configured gradle to download source jars

#

That's why you can't see the source file

clever swan
#

I see

#
org.bukkit.plugin.InvalidPluginException: main class `me.FlameDuder.DuderItems.DuderItems' does not extend JavaPlugin
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:73) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_211]
Caused by: java.lang.ClassCastException: class me.FlameDuder.DuderItems.DuderItems
        at java.lang.Class.asSubclass(Unknown Source) ~[?:1.8.0_211]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:71) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        ... 7 more```
#

this is the error I get whilst loading the plugin

vast isle
#

you set the wrong class as your main class

gilded nova
#

^

vast isle
#

the main class should be the one with your onEnable method

gilded nova
#

^^

clever swan
#

i see thank you

#

i swear to god you guys are so nice the coding community is epic thank you.

gilded nova
#

the coding community is epic
just don't ask for help in HelpChat lmao

#

they'll tell you this and that about your code, how you should do and shouldn't do things, to change everything and rewrite things

#

And you'll walk out with your main issue unsolved

#

πŸ‘Œ

clever swan
#

lol

#

sounds like fun

#

Time to test out the plugin...

deft thistle
#

why is spigot 1.16 downloading at 12KB/s

#

can someone give me a mirror link

#

bukkit's servers are slow

clever swan
#
org.bukkit.plugin.InvalidPluginException: main class `me.FlameDuder.DuderItems.DuderItems' does not extend JavaPlugin
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:73) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_211]
Caused by: java.lang.ClassCastException: class me.FlameDuder.DuderItems.DuderItems
        at java.lang.Class.asSubclass(Unknown Source) ~[?:1.8.0_211]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:71) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        ... 7 more```
#

New error

#

Nice

gilded nova
#

@deft thistle are you talking about getbukkit?

clever swan
#

For reference that is my main

#
package me.FlameDuder.DuderItems;

import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {
    
    public void onEnable() {
        System.out.println("Enabling DuderItems");

    }
    public void onDisable() {
        System.out.println("Disabling DuderItems");
    }
}
gilded nova
#

Lizard, in your plugin.yml, set main: me.FlameDuder.DuderItems.Main

#

remember

#

the main class, the one that extends JavaPlugin, is the one that contains your onEnable

deft thistle
#

u used the wrong @

#

and yes

gilded nova
#

LMFAO

deft thistle
#

im trying to learn how to make a plugin

gilded nova
#

πŸ‘€

#

fixed πŸ‘€ πŸ’¦

deft thistle
#

but i cant use paper.jar

#

and getbukkit is slow

gilded nova
#

Use buildtools

deft thistle
#

pog

gilded nova
#

Let's say that getbukkit is doing not so legal things by letting you download the server jar directly

deft thistle
#

wut

clever swan
#

ok the plugin loaded!

gilded nova
#

neat

clever swan
#

but it's not doing anything...

gilded nova
#

Check point 1.4)

deft thistle
#

its still downloading at 20KB/s

clever swan
#

no errors in the plugin

gilded nova
#

lmao well idk

clever swan
#

and its not doing anything

gilded nova
deft thistle
#

u @ ur self lmao

clever swan
#

ok

#

I'll check it out

gilded nova
#

yea cause of the quote

clever swan
#
package me.FlameDuder.Events;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;

import me.FlameDuder.DuderItems.DuderItems;

public class EventsClass implements Listener {
    
    private DuderItems di = new DuderItems();
    
    @EventHandler
    public void onPunch(PlayerInteractEvent event){
        Player player = event.getPlayer();
        di.giveItems(player);    
    }
}
#

I believe I did everything correctly

gilded nova
#

Check point 1.4)

clever swan
#

ok

vast isle
#
package me.FlameDuder.DuderItems;

import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {
    
    public void onEnable() {
        System.out.println("Enabling DuderItems");

    }
    public void onDisable() {
        System.out.println("Disabling DuderItems");
    }
}

you don't register the event here

clever swan
#

wdym?

#

where did I register the event?

gilded nova
#

CHECK THE DAMN LINK I SENT

clever swan
#

I AM

#

TY

gilded nova
#

😀

#

1.4) Registering your listener

clever swan
#

yes

#

im reading

#

it seems to work in eclipse time to export, thank you Fefo.

gilded nova
#

"it seems to work in eclipse"

#

wut

#

like

#

it compiles

clever swan
#

yeah

#

it complied with no errors

gilded nova
#

naisu

clever swan
#

ok, no errors, no nothing, the event just doesn't work

#
package me.FlameDuder.DuderItems;

import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {
    @Override
    
    public void onEnable() {
        System.out.println("Enabling DuderItems");
        getServer().getPluginManager().registerEvents(new DuderItems(), this);


    }
    public void onDisable() {
        System.out.println("Disabling DuderItems");
    }
}

here is the main

#
package me.FlameDuder.Events;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;

import me.FlameDuder.DuderItems.DuderItems;

public class EventsClass implements Listener {
    
    private DuderItems di = new DuderItems();
    
    @EventHandler
    public void onPunch(PlayerInteractEvent event){
        Player player = event.getPlayer();
        di.giveItems(player);    
    }
}

Events class

gilded nova
#

registerEvents(new DuderItems()

#

Your listener is called EventsClass

clever swan
#

im going to kms

gilded nova
#

The one you're pointing out at least

#

don't

#

:(

clever swan
#

im kidding

gilded nova
#

Hi kidding

#

I'm fefo

clever swan
#

this is just very stressful

#

xD

gilded nova
#

Welcome to the world of programming

clever swan
#

lol ty

#

IT WORKS!!!

#

LETS GO!

gilded nova
#

πŸ‘

clever swan
#

time to make the code more complex

#

meta.setDisplayName(ChatColor.YELLOW (ChatColor.BOLD) + "Miner Shard");

#

any way to do this?

gilded nova
#

yep

#

remember to itemStack.setMeta(meta)

clever swan
#

ah true

#

thank you

#

meta.setDisplayName(ChatColor.YELLOW + "" + ChatColor.BOLD + "Miner Shard");
While you can do what you mentioned above, I figured this would be easier

gilded nova
#

wait what

#

ChatColor.YELLOW (ChatColor.BOLD)

#

I don't think that should work . _.

violet rivet
#

read that as ChatColor.blind

#

Not bold

vast isle
#

I would just make a util function that uses the translateAlternateColorCodes or whatever and use & with the colour code

gilded nova
#

^

clever swan
#

Why doesn't this work?

rigid widget
#

That is not enough info lol

clever swan
#

wdym?

deft thistle
#

my test plugin isnt being loaded by paper

gilded nova
#

Any errors?

deft thistle
outer vesselBOT
deft thistle
#

pog

gilded nova
#

Thanks, Clippy

#

Oh

#

i c

deft thistle
#

what

gilded nova
#

You're probably running the server with Java 8

#

But compiled the plugin with Java 14 (most probably)

deft thistle
#

si

#

yup

clever swan
#

Why doesn't this work?

deft thistle
clever swan
gilded nova
#

That is not enough info lol
@clever swan

#

Muhammad you using maven or gradle?

clever swan
#

what should I include?

gilded nova
#

The whole class

#

lmao

clever swan
#

done

deft thistle
#

Muhammad you using maven or gradle?
uh

#

idk

gilded nova
#

You're not importing the event class

deft thistle
#

where can i get the java 8 jdk

gilded nova
#

Go to the project settings

deft thistle
#

which vendor

gilded nova
#

wat

deft thistle
#

i just used oracle openJDK

gilded nova
#

where

deft thistle
#

idk

gilded nova
#

that's okay

#

dw

clever swan
#

Fefo, with eclipse you can auto import and it's not working

#

it doesn't bring up any imports from the harvest event

gilded nova
#

Import it manually idk

deft thistle
gilded nova
#

import org.bukkit.event.player.PlayerHarvestBlockEvent

#

yea that's fine Muhammad

clever swan
#

still doesn't work

deft thistle
#

brb

sleek niche
#

What does it say when you hover over it?

clever swan
gilded nova
#

Which jar did you import, the server version

clever swan
#

1.8.8

gilded nova
#

It probably didn't exist by then

#

The event

clever swan
#

im using javadocs 1.8.8

gilded nova
#

It probably didn't exist by then

fallow talon
#

is it possible to add a plugin without restarting the server?
im running paper

gilded nova
#

It got added in 1.16

#

It is, but it's not recommendable

clever swan
#

is it possible to add a plugin without restarting the server?
im running paper
@fallow talon no

fallow talon
#

ok

clever swan
#

BlockBreakEvent I'll just use this I guess

#

it's basically the same thing

deft thistle
#

ok im back

#

what option

#

does it even matter

gilded nova
#

yea leave it with openjdk

vast isle
#

try leaving it as oracle openjdk and just changing the version

clever swan
#

Anyway to fix the setItem being red?

deft thistle
#

yea leave it with openjdk
@gilded nova but it doesnt have java 8

outer vesselBOT
#

Hey Muhammadβœ“α΅›α΅‰Κ³αΆ¦αΆ αΆ¦α΅‰α΅ˆ! Please don't tag helpful/staff members directly.

deft thistle
#

oop

#

object oriented programming

gilded nova
#

That's once you download the jdk

deft thistle
#

ah

woeful willow
#

JetBrains Academy (free online course): https://www.jetbrains.com/academy/
Codeacademy (free online course): https://www.codecademy.com/learn/learn-java
University of Helsinki (free online course): https://java-programming.mooc.fi/
Basic Java Tutorials: https://docs.oracle.com/javase/tutorial/
Beginner Help: https://discord.gg/hVtnwGd

These links may serve some use to java novices

JetBrains

Introducing JetBrains Academy – a hands-on platform for learning to program. Learn to program by creating working applications step by step in an interactive environment integrated with JetBrains IDEs.

gilded nova
#

JEUSS

#

GET RID OF THEM EMBEDS AAAAHJHH

woeful willow
#

Hard to do on mobile

vocal rivet
#

Write the links in <>

gilded nova
#

pff mobile

#

impossible

woeful willow
#

I copied and pasted its I really dont want to rewrite it at this point

clever swan
#

Anyway to fix the setItem being red?

vast isle
#

you can't put a method inside a method?...

clever swan
#

yeah i figured...

#

im smol brian

deft thistle
#

ayy

#

it show something

clever swan
#

nice!

deft thistle
#

now i need it to print something in chat

#

aAa

clever swan
#

public void setItem(ItemStack item)
How can I use the setItem to edit a diamond ore drop?

#
    @EventHandler
    
    public void setItem(ItemStack item) {
        BlockEvent event;
        Block diamond = event.getBlock();
        if (diamond instanceof ItemStack(Material.DIAMOND_ORE, 1); {
            
        }```
#

This does not work

rigid widget
#

What part

clever swan
rigid widget
#

Try == perhaps?

#

Not sure if Block can be an instance of ItemStack cause I really don't know bukkit enough

clever swan
#

What im trying to do is just edit the diamond ore drop table

gilded nova
#

diamond.getType() == Material.DIAMOND_ORE

#

by the way

#

that method isn't an event handler

#

I mean, it isn't taking an event as parameter

sleek niche
#

Also, not sure, but I think check your brackets again

teal sun
#

You're right, his brackets are also mangled

gilded nova
#

And a ;

clever swan
#

ok thank you all again!

#

This is what I came up with, and it doesn't seem to be working

gilded nova
#

because it doesn't make sense lol

vocal rivet
#

are you trying to write a boolean to Block ?

clever swan
#

No

vocal rivet
#

Then why the hell are you writing something into block while trying to do a comparison in the same line?

clever swan
#

where I can find oldand new name of minecraft blocks for config, no id list
@sand mountain java docs materials

#

np

vocal rivet
#

what are you trying to accomplish here?

Block block = event.getType() == Material.DIAMOND_ORE;
clever swan
#

im trying to make it so when the player mines a diamond ore, it drops a different item

vocal rivet
#

But the first part is making Block equal what follows, and the second part is comparing the type with Material_DIAMOND_ORE

clever swan
#

oh ok

vocal rivet
#
String var = "String" // variable var is now "String"
if(var == "String"){ //compares if var equals "String"
  // If it equals, do the code put in here
} else {
  // if it doesnt equal, do the code in here
}
frozen grotto
#

Wait why do I see strings compared with == πŸ‘€

vocal rivet
#

shhh

#

My java is bad

#

I bet there is some kind of equals function

frozen grotto
#

.equals()

vocal rivet
#

Ha

#

called it XD

#

But this was so he understands what double = means

clever swan
#

ok I see now what it is

#

and now i realize i was dumb

#

time to slap my keyboard

vocal rivet
#

I wish I could help more with Java xP
I am more of a web based languages type and sum c++, bash, sql and lua

clever swan
#

oh cool

vocal rivet
#

If I say what web language I get punched again XD

sleek niche
#

Assembly?

vocal rivet
sleek niche
#

Omg

vocal rivet
#

XD

#

I agree, php 7.0 and 7.1 were horrible, but up from 7.2 they implemented OOP really well

sleek niche
#

I still don't understand #equals in Java. You need to use it for strings but the rest works pretty fine with ==

vocal rivet
#

No idea either

#

( wait until they find out about === )

clever swan
#

...

vocal rivet
#

Well not in java ( I think )

#

In languages without a hard variable type you sometimes also need to equal if the variable is the same value and the same type

clever swan
#
package me.FlameDuder.Events;

import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockEvent;
import org.bukkit.inventory.ItemStack;

import me.FlameDuder.DuderItems.DuderItems;

public class EventsClass implements Listener {
    
    private DuderItems di = new DuderItems();
    
    @EventHandler
    public void onBreak(BlockBreakEvent event) {
        
        Player player = event.getPlayer();
        di.giveItems(player);
        
    }
}```
Ok, how would I make it that it only gives it when the player mines diamond_ore?
#

it now works for mining

vocal rivet
#

I would say

if(event.getType() == Material.DIAMOND_ORE){
  Player player = event.getPlayer();
  di.giveItems(player);
}
clever swan
#

wait

#

why would it need to be ==?

vocal rivet
#

because you want to check if the type equals a DIAMOND_ORE

sleek niche
#

( wait until they find out about === )

Afaik Java doesn't has this (and so no spongebob meme :(

vocal rivet
#

Ah, guessed it, wasnt sure thought XD

#

remember JS?

"1" == 1 >>> true
clever swan
#

because you want to check if the type equals a DIAMOND_ORE
ok thank you

#

it says getType() isn't a thing for BlockBreakEvent

vocal rivet
#

getBlock is propably the function you actually searched for

clever swan
#

bold of you to assume I use 1.16.2

vast isle
#

it's still event.getBlock().getType()

clever swan
#

this is the one I use

vocal rivet
#

its still getBlock

sleek niche
#

The old JavaDoc theme tho, great HelpChat

clever swan
#

then why do I need getType()?

vocal rivet
#

because you need to get the type of the block

#

what jordan said is correct

clever swan
#

ok thank you

vocal rivet
#

( I think at least XD )

clever swan
#

yeah it is

#

I just wanted to know WHY it worked so I wont make the same mistake

vocal rivet
#

Because you first need to get the block from the event, and then you need to get the type of that block, to not waste unecessary RAM space you just run the function directly on the return of the previous function

clever swan
#

sounds epic

clever swan
#

I already tried dropItem()

sleek niche
#

And?

clever swan
#

and it doesn't seem to be working hold on

vast isle
#

no

#

it's world.dropItem

vocal rivet
#

you implemented your own class and it doesnt have that method

clever swan
#

ok, I'll just keep it as is, I would have to change a lot of the code. I'll get to changing it after I get the basics down. Thank you for the help!

gilded nova
#

Is that... eclipse

#

Or vs code

#

Use

#

Intellij

vast isle
#

it's eclipse

gilded nova
#

🀒🀒🀒

deft thistle
#

why does this happen

#

Unreachable Statement

vocal rivet
#

because it always returns true

sleek niche
#

Not just because of that

deft thistle
#

oh shoot

vocal rivet
#

yes because he messes up the if statement :3

deft thistle
#

there we go

#

time to test

#

[17:26:27 ERROR]: Error occurred while enabling Tutorial v0.0.2 (Is it up to date?) java.lang.NullPointerException: null at muhammad001.tut.commands.HelloCommand.<init>(HelloCommand.java:15) ~[?:?] at muhammad001.tut.Tutorial.onEnable(Tutorial.java:10) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.1.jar:git-Paper-133] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.1.jar:git-Paper-133] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.1.jar:git-Paper-133] at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugin(CraftServer.java:500) ~[patched_1.16.1.jar:git-Paper-133] at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugins(CraftServer.java:414) ~[patched_1.16.1.jar:git-Paper-133] at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:471) ~[patched_1.16.1.jar:git-Paper-133] at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:241) ~[patched_1.16.1.jar:git-Paper-133] at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:941) ~[patched_1.16.1.jar:git-Paper-133] at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-133] at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]

#

oop

#

what happened

sleek niche
#

The best friend of every Java programmer

deft thistle
#

oh wow

#

the ide told me this will happen

#

Method invocation 'setExecutor' may produce 'NullPointerException'

#

pog

sleek niche
#

IJ ❀

deft thistle
#

aa

#

idk how to fix

vast isle
#

did you set the command in your plugin.yml

deft thistle
#

no

#

oop

#

instead of main

#

what would i put

sleek niche
#

Main?

deft thistle
#

hold on

#

i meant where

#

its "commands:"

#

how would i make it to where it doesnt over write the old jar file

sleek niche
#

Hm?

deft thistle
#

like when i build artifact

#

how do i make it not overwrite the old version

sleek niche
#

Why?

deft thistle
#

archive

sleek niche
#

Move the old jar file to somewhere else?

deft thistle
#

rip

#

oh well

gilded nova
#

or rename it

deft thistle
sleek niche
#

Congrats

deft thistle
#

baby steps

gilded nova
#

Hmm

#

Im not sure cause i know nothing about java or that stuff

#

Also u might want to use waterfall instead of bungeecotd

#

And paper instead of spigot

rigid widget
#

Yes for both, though them both register in places as their base types

#

And to change that you need to change the server brand in the jar file

#

Basically get paper source from GH and change the one part

#

No idea where that is though

gilded nova
#

Both waterfall and paper are open source and u can get the source code on github

#

You just need to change the thing and compile it

#

It's a bit scary that Hypixel has it so it only shows "Vanilla server " + the version YOU are connecting with

#

spooky

#

I mean it's not hard to achieve

#

but damn

#

what they have is FAAAR from vanilla

#

Hypixel has a heavily modified version of spigot

#

And bungeecord

#

Yeah

#

Rumor has it that, their "frontend" of proxy, what handles the connections themselves on a lower level, runs under some node.js or something, I don't quite remember

#

Then of course for the packets processing, plugins, commands and all that it's bungeecord

#

There's no way around that part

#

Not much is really known about hypixels backend

#

why does this happen
@deft thistle Learn basic Java before spigot api

deft thistle
#

silence

gilded nova
#

smh

#

Is it weird that the only js i know is node.js

#

And i only know how to use discord.js with it

#

No its not weird because a lot of people dive straight into actually using APIs and such before learning the basics

#

Yeah

#

and 9 times out of 10 it fucks them over when they cant solve basic errors

#

Discord api was the first api i learned

#

Well its the only api i know

#

Did you learn off youtube?

#

Yeah

#

Classic

#

I haven't touched js

#

I have attempted to make a spigot plugin before

#

And it didnt work

#

Once you can make a helloworld, it's honestly not that hard

#

Until you try to make luckperms

#

and other big plugins

#

lol

#

Lol

#

Luckperms is mainly a temp plugin

#

For me

#

Temporary?

#

Cause i do plan to get a custom perms system made

deft thistle
#

Until you try to make luckperms
@gilded nova but multiple people worked on this plugin not one person

gilded nova
#

Multiple people for a helloworld??

#

Oh dear

deft thistle
#

bruh

#

read the quote

gilded nova
#

What quote

#

A perms plugin is deff a very advanced thing

vast isle
#

why do you need a custom perm plugin?

gilded nova
#

Probably not too hard to make a basic one. But one remotely close to luckperms would be a nightmare for any beginner

#

Probably not too hard to make a basic one
Ever checked GroupManager's code?

#

I could probably make that and better lmfao

#

True haha never looked at the code because I've never used that pile of shit

#

Groupmanager is simple

#

But trash

#

And absolutely horrid for a real server

#

You can literally set a normal, a negated and an "exclusive" node all on the same holder

#

Plus, you can mark several groups as default

#

Or none!!

#

My pc parts a fkn delayed because Australia post is held up as a result of covid lockdowns πŸ™‚

#

Plus, you can mark several groups as default
My brain

#

Fun part is, I wanted to make a PR to LP so, when migrating from GM, the group marked as default would be moved to the default group

#

That's how I found out

#

Pex is somewhat good

#

I think it’s out of date tho

#

LP is highly inspired on it

#

Yeah

#

I mean, look at the commands syntax

#

Pex's page literally says to just use luckperms doesnt it?

#

It does lmao

#

Yikes

#

Well yea they are making a PEX v2

#

They even have a section in MOSS discord

#

(as well as many other plugins do)

deft thistle
#

lmao they are telling you to get LuckPerms

gilded nova
#

Luckperms is a very good plugin

#

@deft thistle make a permissions plugin now

#

(dont skid)

#

"in the meantime"

#

Many big servers use luckperms

deft thistle
#

im not that advanced in java

#

bruh

gilded nova
#

Learn basic java first man

#

you wont regret it

deft thistle
#

danng

#

like what am i doing rn then

gilded nova
#

no

#

youre using the spigot api

deft thistle
#

i already know basic java

gilded nova
#

if you did, you'd know spigot api isnt basic java

deft thistle
#

it isnt

gilded nova
#

πŸ€¦β€β™€οΈ

deft thistle
#

im saying it isnt basic

#

ik that already

gilded nova
#

Some apis are pretty advanced

#

what does || mean

#

@deft thistle

deft thistle
#

or

gilded nova
#

good

#

what about

#

^^

deft thistle
#

uh

gilded nova
#

trick question, if you knew your logical operators (basic java) you'd know thats not a thing

deft thistle
#

well i never said it was

gilded nova
deft thistle
#

uh means idk

gilded nova
#

Anyway im just trying to be annoying

#

imma leave now

deft thistle
#

! dont be annoying

gilded nova
#

Good luck with spigot api

deft thistle
#

yes

gilded nova
#

I mean, IIRC, ^ is an operator in c++, unsure but

deft thistle
#

dang

gilded nova
#

Fefo are you from Australia?

#

Not that I know of

#

lol

#

You seem to always be online (during the time im awake)

#

That's because I'm always online

#

So you don't sleep?

#

Not that I know of

#

Truth

#

Sleep is for the weak

#

Yep

#

So is for java

#

But it's not for a condition, it's an arithmetic operator

#

XOR

#

for math