#help-archived

1 messages · Page 201 of 1

agile girder
#

it's enabled

#

25565

tiny dagger
#

then use that ip

agile girder
#

but its not working

celest current
#

turn off firewall

tiny dagger
#

your pc ip to the router

agile girder
#

firewall is off

tiny dagger
#

IPv4 Address. . . . . . . . . . . : 192.168.1.100(Preferred)

limber summit
#

What is this error please?

agile girder
#

i use UFW on ubuntu, the firewall for 25565 is turned off and anyone can pass through it

limber summit
tiny dagger
#

i hope you used your ipv4 ip

limber summit
#

sometimes it disconnects like 100 players

agile girder
#

I used my Ipv4 ip

tiny dagger
#

then put that ipv4 ip in the server

#

and see what happens

agile girder
#

it's in the server

tiny dagger
#

try to join your server

#

with your ipv4

agile girder
#

i can join with my ipv4, but not with my public ip

tiny dagger
#

then it's an issue in port forwarding

agile girder
#

i use Spectrum

#

does it have to do something with that?

tiny dagger
#

is that your router?

agile girder
#

company

#

and router

tiny dagger
#

for example me

#

i had to enable both with this new router

#

weird naming and very confusing

#

so make sure you haven't forgot a step

agile girder
#

i havent, i disabled firewall, i have ipv4 on the proxy config, and port forwarded the ip's on my router

odd knoll
#

Please show the code.

balmy sentinel
#

post it here

#

?paste

worldly heathBOT
tough kraken
#

someone who uses intellij

sometimes i get something like "freelook", idk how to call it

why do i get this? its trash

odd knoll
#

It says the issue is with a replace method and there's no replace method there... so.

hollow thorn
#

how do i make a bukkitrunnable run 20 times a tick

tough kraken
#

Bukkit.getScheduler().runTaskTimer(this, () -> {
//do whatever you want

}, 20L);

#

nvm, i see

#

whats the difference?

odd knoll
#

@tranquil plaza getVite returns a double and .replace doesn't want a double to replace %vite% with. It probably wants a String

tough kraken
#

ahh

balmy sentinel
#

@tranquil plaza One of your issues is you never close the statement or the result set... resultset.close(); statement.close();

tough kraken
#

but it actually does the same right? or are there any performance etc. issues?

#

i am using the scheduler everytime. idk, i just know it longer

nova badge
#

hey guys, how do I host a public server if I am on a wifi?

tough kraken
#

host it on your pc, and do portforwarding

#

i think

tiny dagger
#

why is port forwarding so hard in 2k20 😼

limber summit
#

@frigid ember

tough kraken
#

it actually isnt

limber summit
#

Disable connection throttle in bungee?

tough kraken
#

there even are tools for

nova badge
#

I can't actually visit the gateway

tiny dagger
#

but i wan't seeing so many before

tough kraken
#

yeah then you cant do anything without hamachi/etc

#

imagine hamachi in 2020 lol

nova badge
#

I used hamachi when I was a kid lol

#

2011 days oof

tough kraken
#

same

tiny dagger
#

pretty sure it's still good

tough kraken
#

so fucking unsafe

tiny dagger
#

oh yeah

nova badge
#

I can portforward a router

#

ofc

tiny dagger
#

you can't i think

#

if you don't have

nova badge
#

but sometimes I use internet from my phone hotspot

balmy sentinel
#

port forwarding itself isn’t that hard, however, some routers/internet providers don’t allow you to actually open the port to the public Internet.

tiny dagger
#

what it's connected to

nova badge
#

when I am home

#

I have LAN

tough kraken
#

i dont even have the access data lol

nova badge
#

which I can portforward

#

but sometimes I use mobile data via hotspot

tough kraken
#

go into your router interface

nova badge
#

no no no

tough kraken
#

and forward it

nova badge
#

I am talking about mobile data

#

if I am using hotspot

tough kraken
#

wtf

#

you wanna host from your mobile data?

nova badge
#

no ofc not

tough kraken
#

if you dont have unlimited traffic... good luck haha

nova badge
#

when I am not home

#

and I am coding a plugin for someone

#

I want to test with them

#

ofc I can buy a server online

#

but I was just wondering

tough kraken
#

with which internet? yours over the mobile hotspot?

nova badge
#

if it was possible

tough kraken
#

i dont get it

limber summit
#

@frigid ember I put connection_throttle: 4000 to connection_throttle: -1 in my bungee config? And how is it possible that it disconnects like 60 players every 1 hour

nova badge
#

yeah the mobile internet

tough kraken
#

well....

#

uhm...

#

idk if thats even possible

balmy sentinel
#

don’t use mobile internet to create a server.

tough kraken
#

-1 means off.

balmy sentinel
#

Learn how to port forward and if your router and/or ISP doesn’t allow you to port forward consider changing providers.

tough kraken
#

idk how you can at us, but we at germany cant even change our provider if we are not 18+

#

and imagine go to mom

mom? can we change our internet provider?

why? its working good

i want to free a port to make a minecraft server

#

my mom would laught at me lol

tiny dagger
#

we have internet at home meme

limber summit
#

on my bungee

#

yes

tiny dagger
#

i can only imagine the poor security measures

tough kraken
#

just buy a virtual machine for 5$ or so.

or even a gameserver with about 2-3gb isnt so expensive

limber summit
#

I have BungeeQueue, JPRemium, LiteBans, LuckPerms, TCPShield, MoveMeNow @frigid ember

tough kraken
#

lol

limber summit
#

it doesn't happen on the main server

#

only on the queues server

tough kraken
#

BungeeQueue sounds like it could be the issue

subtle wedge
limber summit
#

Do you have any other good queue's plugin?

rare prairie
#

InvalidConfigurationException

tough kraken
#

26.07 18:35:29 [Server] WARN [CoreLogging] Your worlds.yml is invalid!

its the first line

rare prairie
#

yesn't

limber summit
#

Could you accept me as friend I want to send you a screenshot

#

look in 1 sec

tough kraken
#

is there a better way as a config?

rare prairie
#

mongodb

tough kraken
#

i dont use databases lol

#

and have no knowledge about them

celest current
#

will getServer().getPluginManager().registerEvents(new listeners(null), this); still register events from listeners class with the listeners(null)

tough kraken
#

i like tutorials (dont hate me, lol) maybe anyone know one good about databases, related to bungeecord?

still raptor
celest current
sinful spire
#

do you have a class named listeners?

tough kraken
#

btw, is there a way in intellij to show and handle projects like in eclipse? so i dont have to re-open it manually

subtle blade
#

Your classpath is fine, sure, but that class is not loaded at runtime, tedders

celest current
#

yes KM

subtle blade
#

You have to shade in that dependency with a build system like Maven

still raptor
#

I have to use Maven for this?

subtle blade
#

Or Gradle, whatever

still raptor
#

ok thx

tough kraken
#

@tough kraken Don't kick a player in PlayerJoinEvent. You can use listen for AsyncPlayerPreLoginEvent and use AsyncPlayerPreLoginEvent#disallow to disallow the player from logging in.
@frigid ember and how to check for the Player? there is no player on the event

celest current
#

@frigid ember but im using that for a config file

tough kraken
#

is that event.getName

#

ah yeah

#

ty

balmy sentinel
#

@celest current use registerEvents(new listeners(this), this); You can't have a constructor that requires the main instance and then not pass it to the class.

formal yoke
#

Anyone have a good worth.yml for 1.15 or 1.16? 😅

#

The essentialsX one is kinda crap

nova badge
#

InventoryType of a custom inventory made from a plugin is CHEST right?

celest current
#

getConfig().getString("effects.speed") doesnt give me any errors anywhere but it doesnt work. getKeys accepts boolean parameters and not strings. How am I supposed to get a strign from a key?

rare prairie
#

ConfigurationSection#getString

grim halo
#

getConfig().getString("effects.speed") This is literally how you get a String from a key

celest current
#

So anyways my IQ may be that of a rock but I know how to add loading in configs

#

I just gotta do that...

urban wharf
#

How can i change my forums name xDD

celest current
#

i felt that

urban wharf
#

Heheheh

balmy sentinel
#

I'm pretty sure sure you have to request to get it changed.

urban wharf
#

I made my account like 6 years ago

#

was using my friend's account all along but now when i finally had to buy plugin myself xD

quick arch
#

pretty sure you have to donate $10 and then request for a name change

urban wharf
#

I did

#

I also never badge my badge T.T 💔

quick arch
#

o

urban wharf
#

hurts my heart so much

quick arch
urban wharf
#

OwO

quick arch
#

then wait a bit

urban wharf
#

Good idea xD

quick arch
#

then request the name change

urban wharf
#

I mean i donated like 2 days ago soooo o o o

celest current
#

big brain man

urban wharf
#

probs just gonna take time that's all i guees xD

#

Hahaha

#

Joined:Apr 26, 2014, i Still don't remember why made account that long ago but cool

#

You don't need to make a thread, you can change your username yourself and wait for it to be approved.
@frigid ember Yeaaa

#

Ima just wait for reward to show up byself

#

ah thx

#

It says it'll take about 24-48 hrs anyway so eh

#

now that makes lot of sense

tough kraken
#

installing mysql on a virtual machine... i literally hate my whole life

#

NOTHING WORKS lmao

odd knoll
#

Are you just trying to run a MySQL database?

#

If so, if you install XAMPP it makes it rly easy. Mac and Windows.

tough kraken
#

doesnt i have it then running on my own system?

#

so on my computer

odd knoll
#

Yes. Are you using it for something permanent?

tough kraken
#

i cant portforward

#

thats the big problem

odd knoll
#

I mean, if you're running it on a VM on your machine then well... that's exactly the same basically.

#

Just more overhead.

tough kraken
#

nah

#

the vm is rent

odd knoll
#

Oh, completely separate.

tough kraken
#

yep

#

thats the problem

celest current
#

I remember I tried running minecraft servers, minecraft client, XAMPP, and skype all at once on my old laptop. RIP Mikey's-Laptop

tough kraken
#

and i cant portforward, so xampp won't work i think

odd knoll
#

Lolll.

#

And yep, it won't.

#

Took me like 2 years to find my port forwarding settings.

tough kraken
#

well i just can't

#

its not my router

#

and tell that my mother... RIP

odd knoll
#

Oof.

tough kraken
#

thats why i use a virtual

#

i have 64gb ram... i would run it on my own if i could

odd knoll
#

MySQL doesn't use much at all.

tough kraken
#

i meant my whole server

#

network

#

whatever

#
E: Paket php7.0-cli kann nicht gefunden werden.
E: Mittels des Musters »php7.0-cli« konnte kein Paket gefunden werden.
E: Mittels regulÀrem Ausdruck »php7.0-cli« konnte kein Paket gefunden werden.
E: FĂŒr Paket »php7.0-curl« existiert kein Installationskandidat.
E: Paket php7.0-gd kann nicht gefunden werden.
E: Mittels des Musters »php7.0-gd« konnte kein Paket gefunden werden.
E: Mittels regulÀrem Ausdruck »php7.0-gd« konnte kein Paket gefunden werden.
E: Paket php7.0-intl kann nicht gefunden werden.
E: Mittels des Musters »php7.0-intl« konnte kein Paket gefunden werden.
E: Mittels regulÀrem Ausdruck »php7.0-intl« konnte kein Paket gefunden werden.
E: Paket php7.0-json kann nicht gefunden werden.
E: Mittels des Musters »php7.0-json« konnte kein Paket gefunden werden.
E: Mittels regulÀrem Ausdruck »php7.0-json« konnte kein Paket gefunden werden.
E: Paket php7.0-mbstring kann nicht gefunden werden.
E: Mittels des Musters »php7.0-mbstring« konnte kein Paket gefunden werden.
E: Mittels regulÀrem Ausdruck »php7.0-mbstring« konnte kein Paket gefunden werden.
#

it just cant find the whole packages

#

idk why

odd knoll
#

Why u installing php 7.0?

tough kraken
#

tutorial

#

idk

odd knoll
#

What OS?

tough kraken
#

linux

odd knoll
#

What distro tho?

tough kraken
#

ehh what? xd

#

ubuntu?

odd knoll
#

Ubuntu, CentOS, etc..

tough kraken
#

ubuntu

odd knoll
#

PHP 7.2 is the most common IIRC sooo. I guess use this:

apt install -y php7.2 php7.2-{cli,gd,json,mbstring}
#

Do you need any other php addons other than those?

tough kraken
#

E: Paket php7.2-cli kann nicht gefunden werden.
E: Mittels des Musters »php7.2-cli« konnte kein Paket gefunden werden.
E: Mittels regulÀrem Ausdruck »php7.2-cli« konnte kein Paket gefunden werden.
E: Paket php7.2-gd kann nicht gefunden werden.
E: Mittels des Musters »php7.2-gd« konnte kein Paket gefunden werden.
E: Mittels regulÀrem Ausdruck »php7.2-gd« konnte kein Paket gefunden werden.
E: Paket php7.2-json kann nicht gefunden werden.
E: Mittels des Musters »php7.2-json« konnte kein Paket gefunden werden.
E: Mittels regulÀrem Ausdruck »php7.2-json« konnte kein Paket gefunden werden.
E: Paket php7.2-mbstring kann nicht gefunden werden.
E: Mittels des Musters »php7.2-mbstring« konnte kein Paket gefunden werden.
E: Mittels regulÀrem Ausdruck »php7.2-mbstring« konnte kein Paket gefunden werden.

lmao

#

idk

odd knoll
#

Is ur repo list messed or something lol

tough kraken
#

IDK

odd knoll
#

U running ubuntu 20.04? They might have changed it there, IDK.

tough kraken
#

literally have no plan of that server shit

frigid ember
#

Heyo, how do I get a player's connected host?
in bungee

tough kraken
#

how i see it?

odd knoll
#

A player's IP?

#

Or their actual hostname.

frigid ember
#

no, the hostname they used to connect to the server... @odd knoll

tough kraken
#

yes i want to

odd knoll
#

Not sure about that, I only know how to get their hostname.

frigid ember
#

but i want to use it for my plugin

tough kraken
#

E: No installation candidate for package "MySQL server" experience.

#

it literally cant find anything

frigid ember
#

Yes. @frigid ember

tough kraken
#

did both

#

before

frigid ember
#

Thank you

tough kraken
#

i asked my host, i'll wait for an answer. i think he can do that for me

#

he literally installed that whole thing for me, so i think he knows the best lol

frigid ember
#

@frigid ember
Cannot resolve method 'getVirtualHost' in 'PostLoginEvent'

#

I used the PostLoginEvent but I guess it doesnt work like that, I tried PreLoginEvent and it just broke everything

#

getPlayer() cant be resolved in pre
getVirtualHost() cant be resolved in post

#

oh

#
PendingConnection connecting = (PendingConnection) e.getPlayer().getPendingConnection().getVirtualHost();
#

i tried that, would that work?

#

forget the getVirtualHost(); as i removed that

#

i will just do connecting.getVirtualHost();

#

So would this work?

PendingConnection connecting = (PendingConnection) e.getPlayer().getPendingConnection().getVirtualHost();
#

thats not

#

i swear this computer is slow

#
TextComponent textComponent = new TextComponent(ChatColor.translateAlternateColorCodes('&', "&7[*] &b[network] &e" + e.getPlayer().getName() + "&f has joined the network using &d" + connecting.getVirtualHost() + "&e."));
#

ok, I will try that

#
PendingConnection connecting = (PendingConnection) e.getPlayer().getPendingConnection();
InetSocketAddress address = connecting.getVirtualHost();
TextComponent textComponent = new TextComponent(ChatColor.translateAlternateColorCodes('&', "&7[*] &b[network] &e" + e.getPlayer().getName() + "&f has joined the network using &d" + address.getHostName() + "&e."));
#

@frigid ember No.

PendingConnection connection = (PendingConnection) event.getPlayer().getPendingConnection();
InetSocketAddress address = connection.getVirtualHost();```

@frigid ember Is that good?

#

Ok.

#

InetSocketAddress#getHostName returns the hostname, would you like me to try the other one?

#

They both return the same

#

@frigid ember

#

thanks

meager lantern
#

Hey, I've got some issues regarding the new 1.16 RGB colors.
While the RGB colors work just fine on the header and footer of the player list and when using titles, the colors are all kinds of messed up when using them on the Scoreboard and as an actionbar message. I'm using packets to build and display the Scoreboard for the user, so I might be missing out some changes, that Spigot has implemented to display these colors to the user, but for the actionbar message, I'm Spigot's own API.

Do anyone know what the cause of this is? Thanks!

crimson sandal
#

Is there an event for the creative pick block?

#

I want to replace the item that gets added to the inventory when it's used

frigid ember
#

Heyo, had an issue here...
https://paste.md-5.net/sujaxuboya.bash
Here was my code

@Override
public void execute(CommandSender commandSender, String[] strings) {
  ProxiedPlayer player = getProxy().getPlayer(String.valueOf(strings));
    if (!player.isConnected()) {
    commandSender.sendMessage(new TextComponent(ChatColor.translateAlternateColorCodes('&', "&cThe player you entered is offline.")));
    return;
    }
  PendingConnection connecting = (PendingConnection) player.getPendingConnection();
  InetSocketAddress address = connecting.getVirtualHost();
  commandSender.sendMessage(new TextComponent(ChatColor.translateAlternateColorCodes('&', "&d" + player.getName() + "&e was found online at &d" + player.getServer().getInfo().getName() + "&e connected with the address &d" + address.getHostName())));
}
crimson sandal
#

Hmm, I can't get the clicked block with that

#

I need to be able to tell the location of the block that was picked

#

Yeah

#

Hmm okay, guess I'll leave that idea then 😛

frigid ember
#

how do i prevent that?

#

do i just do
if (player == null)
?

worldly heathBOT
frigid ember
meager lantern
#

I mean, it's a pretty large projects and everything is pretty well abstracted, but I'll try to find a few links that show the code

sick robin
#

Hi, I'm not sure if I can ask about that here.. But, if so, anyone can tell me why this code not working?
When a I use the player location the block it's placed correctly, but when I use the block location nothing happens.

@EventHanlder
public void onBreak(BlockBreakEvent event)
{
Block block = event.getBlock();
Player player = event.getPlayer();

block.getLocation().getBlock().setType(Material.DIAMOND_BLOCK);
}

frigid ember
#
if (player == null) {
  commandSender.sendMessage(new TextComponent(ChatColor.translateAlternateColorCodes('&', "&cThe player you entered is offline.")));
  return;
}
#

wrong thing

#

same thing just replacing the if

meager lantern
#

@frigid ember
I actually managed to figure out what the issue was for the Actionbars I was using new ChatComponent("My text here with RGB colors") rather than ChatComponent.fromLegacy("My text with RGB colors") I presume it might be the same issue with the Scoreboard, but I'll need to take a look at that first

celest current
#

How can I call a method from another class

pastel nacelle
#

by learning java

frigid ember
#

maybe because ProxiedPlayer player = getProxy().getPlayer(String.valueOf(strings));

#

@pastel nacelle Thats not helping but ok

celest current
#

i tired and google doesnt like talking like people do

pastel nacelle
#

it's the only advice I can give

#

it's clear that you have no idea what you are doing or how the language works

#

you need to start with the basics

frigid ember
#

Talking to the wrong guy

#

Unless you where talking about my issue with bungee

pastel nacelle
#

How can I call a method from another class

frigid ember
#

Thats not me.

pastel nacelle
#

i know

#

but you pinged me

celest current
#

Alright ill reiterate: whats the most efficient way to call a method from another class

pastel nacelle
#

having an instance of the other class and invoking the method on it

#

or if it's a static method, just invoking the method directly

frigid ember
#

ah

meager lantern
#

@frigid ember Well the logic is that it'll convert a plain string with color codes into an array of BaseComponents, since the server hasn't been sending out plain strings for years now. The strange thing is however, that up until trying to support RGB colors, simply calling the constructor with a legacy text string worked, but now you're required to call the #fromLegacyText method instead.

tough kraken
graceful vigil
#

when in doubt use the default

meager lantern
#

@frigid ember
That's because of the way that the color code looks, when it's converted into the legacy format.
Color used: #FF0000
Output: §x§f§f§0§0§0§0

tough kraken
#

unpacking mysql-apt-config (0.8.13-1) ... mysql-apt-config (0.8.13-1) configuring ... Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config) OK

#

is that right? i think

meager lantern
#

No worries

celest current
#

@celest current I already showed you that earlier.
@frigid ember U rite I got it. I was on W3Schools looking at ways to do it and I forgot u showed me lmao

sudden juniper
#

hello

#

why when another player enters the section do we both get kicked?

#

1.16.1

#

[21:03:26 INFO]: Plugins (21): BuildBattlePro, Essentials, EssentialsChat, EssentialsSpawn, HideStream*, HolographicDisplays, LiteBans, LuckPerms, Multiverse-Core, MyCommand*, NametagEdit*, PlaceholderAPI, PlugMan, SkinsRestorer, TitleManager, Vault, ViaBackwards, ViaRewind, ViaVersion, WorldEdit, WorldGuard

tough kraken
#
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; bad; manufacturer default: activated)
   Active: failed (result: exit code) since Sun 2020-07-26 21:03:52 CEST; 9ms ago
     Docs: man: mysqld (8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 37994 ExecStartPre = / usr / share / mysql-8.0 / mysql-systemd-start pre (code = ended, status = 0 / SUCCESS)
  Process: 38029 ExecStart = / usr / sbin / mysqld (code = finished, status = 1 / FAILURE)
 Main PID: 38029 (code = completed, status = 1 / ERROR)
   Status: "MySQL 5.7 data dictionary upgrade in progress"

July 26 21:03:50 vm132 systemd [1]: Start MySQL Community Server ...
July 26 21:03:52 vm132 systemd [1]: mysql.service: main process terminated, code = terminated, status = 1 / FAILURE
July 26 21:03:52 vm132 systemd [1]: mysql.service: Error with result 'exit code'.
July 26 21:03:52 vm132 systemd [1]: MySQL Community Server could not be started.
dpkg: Error editing package mysql-community-server (--configure):
 "Installed Mysql community server script of package after installation" subprocess returned error 1
dpkg: Conflict problems information configuration from mysql-server:
 mysql-server true from mysql-community-server (= 8.0.21-1debian10); but:
  Package mysql-community-server is not done yet.

WTF

sudden juniper
#
[21:07:50 WARN]: [NametagEdit] Loaded class me.clip.placeholderapi.PlaceholderAPI from PlaceholderAPI v2.10.6 which is not a depend, softdepend or loadbefore of this plugin.
[21:07:50 INFO]: Eleches lost connection: Disconnected
tough kraken
#

i'll give it up. such bullshit

sudden juniper
#
ViaRewind v1.5.1-SNAPSHOT
ViaVersion v3.0.2-SNAPSHOT```
inner sinew
#

plz help

#

đŸ‘šâ€đŸŠŒ

balmy sentinel
#

just ask your question..

inner sinew
#

ahahah okay

tough kraken
#

?help

love this command lol

#

wow

grim halo
#

?help

tough kraken
#

fuck my life

balmy sentinel
#

broke

grim halo
#

Looks like CafeBabe will take its time...

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.

balmy sentinel
#

ayyyyy

tough kraken
#

better

inner sinew
#

i've got a server aternos and i would install some spigot plugin and i don't know how

#

?

tough kraken
#

you are stuck to their accepted plugins

#

and they accept about 5% of requested plugins

inner sinew
#

oh

grim halo
#

They have a pluigin list. Go there and click on the plugins you want to install.

inner sinew
#

okay idk where is that but i will find

tough kraken
#

if you dont find the plugin, they dont have it in their list

celest current
#
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_251]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        ... 8 more
Caused by: java.lang.NoSuchMethodException: net.xubels.zipcore.Main.<init>()
        at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_251]
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_251]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
#

who is big brain and can explain what the issue is

bold anchor
#

Did you make a non default constuctor?

#

Don't do that.

worldly heathBOT
celest current
proper rune
#

Hello, i need a release build of Spigot 1.9. I can't find one, only a snapshot build... Does anyone have this build?

celest current
#

when? which one? I had it working then i added new stuff

balmy sentinel
#

why do you have a constructor for your main class?

subtle wedge
graceful vigil
#

?buildtools

#

hmph

#

should be a command

pastel nacelle
#

?bt

graceful vigil
#

?build

#

smh

pastel nacelle
#

no? i'm 100% sure bt was a command

graceful vigil
#

there

worldly heathBOT
pastel nacelle
#

garbage bot

graceful vigil
#

okay sir

celest current
#

Im trying to call a method from crafting.java in main

graceful vigil
#

I've made bots that work better than that and I have no idea what I'm doing

subtle wedge
celest current
#

Dang I liked them. Aight

#

So if I cant use that constructor in Main.java how else am i supposed to call toggleExpbottle() from crafting.java?

pastel nacelle
#

he can't create the object

#

the bukkit environment enforces the plugin main class to be a singleton

#

he needs to learn java and figure out how he's going to access an instance of the main class from a different class

celest current
#
MyClass.java

public class MyClass {
  int x = 5;
}

OtherClass.java

class OtherClass {
  public static void main(String[] args) {
    MyClass myObj = new MyClass();
    System.out.println(myObj.x);
  }
#

SO basically imma do that

pastel nacelle
#

nope

#

also, stop pinging me

#

i have a thing called common sense which allows me to magically understand whether you are talking to me or not

celest current
#

from the examples? that was a generic one from w3 schools lmao

pastel nacelle
#

you can also like say NNY or remove the @ before the ping

#

that is called basic decency

dusky sigil
#

so im doing this -

      UUID pUUID = p.getUniqueId();
      String pUUIDS = pUUID.toString();
      File filetotal = new File(getDataFolder(), "factionsandplayers.yml");
      FileConfiguration cfgtotal = YamlConfiguration.loadConfiguration(filetotal);```
to set values into the config. than this - 
```if (label.equalsIgnoreCase("f") && args[0].equals("create")) {
          if (cfgtotal.contains(pUUIDS) || cfgtotal.contains(args[1])) {
              sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&e&lFlash&a&lPlex &e>>") + ChatColor.RED + "Sorry, either the faction name is taken, or you are already in a faction..");
          }
          else {
              sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&e&lFlash&a&lPlex &e>>") + ChatColor.GREEN + "You have created the faction " + args[1] + " successfully!");
              cfgtotal.set("faction."+args[1] + ".leader", pUUIDS);
              List<String> MemberNames = new ArrayList<String>();
              MemberNames.add(pUUIDS);
              try {
                  cfgtotal.save(filetotal);
              } catch (IOException e1) {
                  // TODO Auto-generated catch block
                  e1.printStackTrace();
              }```
to see if there is such value in the config.
config looks great: 
```faction:
test5:
  leader: dfac08af-af88-42ff-8509-8f441bca858b
test3:
  leader: dfac08af-af88-42ff-8509-8f441bca858b
test4:
  leader: dfac08af-af88-42ff-8509-8f441bca858b```
but its still not being detected that my UUID is in the config
i can do /f create with the same name of the faction, too, that just overwrites it
umbral dirge
#

How to prevent nullpinging

#

wait

#

Bungeecord crasher

#

something like this

dusky sigil
#

I didnt know they can make clickbait out of code

umbral dirge
#

Yes

celest current
#
[Zip-Core] Enabling Zip-Core v1.2
[15:45:18] [Server thread/ERROR]: Error occurred while enabling Zip-Core v1.2 (Is it up to date?)
java.lang.NullPointerException: null
        at net.xubels.zipcore.crafting.toggleExpbottle(crafting.java:18) ~[?:?]
        at net.xubels.zipcore.Main.onEnable(Main.java:26) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugin(CraftServer.java:493) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugins(CraftServer.java:407) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:438) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:219) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:810) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.1.jar:git-Spigot-0509002-6b95d59]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_251]
``` whats this? I don't see a caused by so i dunno
umbral dirge
#

It has to do with Bungeecord

#

I wanna fix it

#

But idk how

celest current
#

ngl the music in the nullping video is FIRE

umbral dirge
#

lol

dusky sigil
#

anyone has any idea about my problem?

umbral dirge
#

No, sorry

celest current
#

?paste

worldly heathBOT
dusky sigil
#

the who- who are you people?

#

sure

mellow wave
#

?paste

worldly heathBOT
mellow wave
#

Please

dusky sigil
#

i just want to check all of it

#

to see if the player's UUID is in there

celest current
dusky sigil
#

but maybe i didnt understand, what do you mean?

celest current
#

ILikeToCode I cant tag u D:

dusky sigil
#

because that is RUDE

celest current
#

I like it

dusky sigil
#

than youre RUDE

celest current
#

To myself?

dusky sigil
#

to him

balmy sentinel
#

Please don't have side conversations here.

dusky sigil
#

yeah, fair point

sudden juniper
#

Anything in the BungeeCord log when the players sent to the fallback server?
@frigid ember [21:51:23 ERROR]: [/41:13600|Eleches] <-> DownstreamBridge <-> [BuildBattle] - encountered exception
java.lang.IllegalArgumentException: Team already exists in this scoreboard

celest current
dusky sigil
#

soo about my problem.. what did you mean?

celest current
#
        @SuppressWarnings("unused")
        crafting craftingclass = new crafting(null);
    }```
umbral dirge
#

@umbral dirge You'd have to use the crasher and listen for the packets being sent. Do you know how to packet listen on BungeeCord?
@frigid ember no

celest current
#

thats in main

#

waits for Frogsoups roast

umbral dirge
#

null ping packages

#

Handshake Packets

#

I never worked with bungeecord

#

only spigot

balmy sentinel
#

I was going to say the same thing ILikeToCode said. Except you really should learn some java before trying to make a plugin because it's quite clear you don't know anything about objects.

dusky sigil
#

well... a null isnt a object

umbral dirge
#

ChannelWrapper?

dusky sigil
#

so im just saying, he has to NOT know about objects

celest current
#

Yeah I dont know anything aside from basic structuring. I figured I could do the same thing with Java that I did with JavaScript and HTML: Dive in head first and learn how to swim

coral kraken
#

null ping packages
@umbral dirge Use -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkAccessible=false

dusky sigil
#

its called MASTER MULTITASKING, and what did you mean by what you said to me beforehand?

umbral dirge
#

@coral kraken ..?

coral kraken
#

(Command line)

umbral dirge
#

k

#

ill try

sudden juniper
#

does not exist

balmy sentinel
#

@celest current thats not how it works. You should really learn some basic java before doing this and you'll have a much easier time. It shouldn't be that hard to learn a new language either if you already have programming experience.

dusky sigil
#

by now im pretty sure no one wants to answer my question, and thats fine because i was a bit annoying

#

I didnt understand the answer

#

What should i check?

#

but

#

im checking for the whole config

celest current
#

AT Frogsoup Yeaaaahhhh I know you are right but this is how I learned the other languages. Hell it's how I learned to swim! I know it's a different situation and its really stupid

dusky sigil
#

to see if hes already in a faction

pastel nacelle
#

do it sensibly and build sets of taken names instead of using the garbage bukkit config api for anything

dusky sigil
#

uh

#

okay

pastel nacelle
#

serialize the set to a file on autosave/shutdown and deserialize it on startup for persistence

umbral dirge
#

sure ill try it next day

balmy sentinel
#

I'm sorry @celest current but that is a really dumb way of learning. Go on youtube and watch some bukkit/spigot coding tutorials they'll get you started with the API and you'll learn a thing or two about java as well.

celest current
#

I have done that and most parts do click with me. I have commands and stuff work, hover and click events over some. I come here to bug you guys about the things those videos don't explain, or explain in a way I understand lol

balmy sentinel
#

If you want someone to answer you question seriously you’ll need to do some of your own research or some people here will just tell you to google it. The javadocs are also a great place to learn if you don’t understand a class and/or method

celest current
#

Noted

balmy sentinel
#

Not trying to come off as mean or rude I’m all for helping you if you have any questions or errors you can’t solve, but you’ll learn so much more if you do the research yourself and find the issues. If you can’t find the issue after a bit of research then you come here and we’ll be more than willing to help. I remember when I was like you not knowing a thing about Java

celest current
#

Nono I completely understand. I came up here like half a dozen times asking how to do stuff I didn't even know the terminology for. You totally have a point. Once I find out how to fix this issue imma go and learn the basic javastuffs

hoary elbow
#

how do i change the amount of ram my server can use

celest current
#

java -Xms1024M -jar spigot-1.16.1.jar change 1024 higher or lower

mellow wave
#

You can also use whole gb by setting 1G instead of 1024M

#

(That's the same amount)

celest current
#

it looks cooler in Mb tho 😎

hoary elbow
#

mine says this
@echo off
java -Xms1G -Xmx1G -XX:+UseConcMarkSweepGC -jar spigot.jar nogui
pause

#

when i change the 1G to higher it doesnt work

mellow wave
#

Make sure you replace the -Xmx not the Xms and that you have enough ram on your system

#

oh no I mixed them up

hoary elbow
#

so i replace which on

celest current
#

Xms

mellow wave
#

You can replace both if you want

celest current
#

make X lower and S higher

#

X is minimum and X is Maximum

hoary elbow
#

it says invalid initial heap size

celest current
#

Ayyye someone used my emoji

keen compass
#

@celest current Xms is for initial heap size, Xmx is for max heap size

hoary elbow
#

when i change the Xms to 10G

celest current
#

i was close enough

#

not really. but close enough

hoary elbow
#

then it says invalid max heap size when i change Xmx

celest current
#

How much ram does ur pc have? 10Gb is a nice chunk

hoary elbow
#

24

keen compass
#

@hoary elbow You can't put Xmx higher then the amount of ram you have available. conversely you can not set Xms higher then Xmx either lower or equal to it.

#

the amount of ram available isn't the same as the amount of ram you have total, it is the amount of ram the system has left free at the current time of trying to start the server

celest current
#

24 Gb? i thought memory was multiples of 4?

mellow wave
#

:/

keen compass
#

you can have odd numbers of ram

#

there is no spec that dictates otherwise

hoary elbow
#

i make them both 10G and it says invalid initial heap size

#

the only number i can use is 1

keen compass
#

because the system doesn't have 10G available or you are using the 32bit version of Java

#

sounds more like you have 32bit java installed

hoary elbow
#

how do i check

mellow wave
#

Run java -version

#

in cmd

hoary elbow
#

only tells me the version of java such as 1.8.0_251

mellow wave
#

My output is:

java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
#

You can see 64-Bit there

#

And yes I'm a bit outdated I believe

hoary elbow
#

mine just says Client VM

#

no 64 or 32

#

java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) Client VM (build 25.251-b08, mixed mode, sharing)

mellow wave
#

um that might actually be my jdk values hold up xd

#

hm

#

Alright run java -d64

hoary elbow
#

doesnt have required version aha

keen compass
#

You are using the 32bit version

#

that is your issue

hoary elbow
#

i am installing better version now!

keen compass
#

if you were using the 64bit version it would have specified you were

#

I recommend btw

#

to use Java 11

#

it is better then Java 8 and spigot/plugins compiled for Java 8 will work on Java 11 🙂

mellow wave
#

^^

#

I use java 8 because I'm lazy and haven't updated it in like 4 years

#

I also run java 8 jdk xd

hoary elbow
#

it says recommended is java 8 and i cant find java 11

sturdy oar
#

bro don't download Oracle stuff

hoary elbow
#

i got it to work boys!

keen compass
#

recommended where?

hoary elbow
#

dont trip chocolate chip my game works again on 10G

keen compass
#

or don't listen that is fine too -.-

hoary elbow
#

lmao

#

i couldnt find a other versions of java button anywhere

hoary elbow
#

ew oracle wtf is wrong with you that browser gives me viruses everytime i use it

keen compass
#

o.O

#

Oracle giving you viruses? lmao

lilac flume
#

Hello, I am making a plugin, it is about when you kill a player, you receive a kill key, I do not know how to make the player receive the key, I thought that the console would send him the key, but I do not know how to do that, I don't know how to make the console execute a command.

mellow wave
#

o.O

keen compass
#

Oracle is the one that creates Java just fyi

mellow wave
#

^^

pastel nacelle
#

get the player inventory and put the key in it

tough kraken
#

took me now about 6 hours lmao

keen compass
#

need to listen to two events if you want to ensure you have the proper player. First listen to the death event so you know which player died, second listen for the player spawn event and with that event use it to interact with the player inventory

pastel nacelle
#

pretty sure he wants to give it to the player who killed the other player

keen compass
#

players remain dead until they respawn. And it isn't instant. They respawn whenever they click the button

pastel nacelle
#

so you'd just listen to player death event, get killer and if it isn't null grab the inventory and shove in ze key

keen compass
#

but the reason that is important is because while the player is dead, there is no player inventory to interact with

#

But, yeah the death event will give you the killer too if that is what you want

lilac flume
#

get the player inventory and put the key in it
@pastel nacelle yes, i did it,
I don't know how to add the key

pastel nacelle
#

look at the inventory javadoc i guess

balmy sentinel
#

you should probably check if their inventory is full before adding an item and you created an ItemStack but never did anything with it.

keen compass
#

worse that happens is the item gets dropped on the ground if that is the case

#

or at least it should last I recalled

lilac flume
#

Better that instead of receiving it, that it be dropped

blazing burrow
#

Is it possible for a player to play as a mob?

#

like a parrot?

keen compass
#

as a parrot probably not, as other types of mobs yes

blazing burrow
tiny dagger
#

can't you spectate parrots?

blazing burrow
#

oh wait ok so u can

tiny dagger
#

đŸ€”

#

even so

#

he can mount the player

#

and just desync it from the parrot

blazing burrow
#

so what would you use? like what thing on the javadoc?

tiny dagger
#

Player#setSpectator(entity)

blazing burrow
#

okay so they spectate the parrot?

#

and then they sync the health and stuff?

#

like mob.health = player.health and mob.location = player.location?

#

just like how the guys did it in the video above

balmy sentinel
#

He wants the player to basically turn into a parrot and fly like one, have the same health, etc.

#

(I think at least)

blazing burrow
#

yes

#

frogs correct

#

nope i do not

#

so its above my level i see

#

ohhh okay

#

so i downlaod that then build a path?

sturdy oar
#

m8 why does everyone want to replicate Skeppy's plugins

quick turtle
#

probably one of his hundred trolling kids in a box or whatever videos

#

its stupid /shrug

sturdy oar
#

nah it's Skeppy

quick turtle
#

yes exactly

#

Skeppy is "a man-child playing with children."

sturdy oar
#

?

lilac flume
#

@frigid ember

wraith thicket
#

@lilac flume You need to do an instanceof check before casting. The way you've set it up now, you're going to see a lot of errors in console

lilac flume
#

Can I make that item open in a CrazyCrates or CratesPlus box?

mellow wave
#

You can if you use their API

lilac flume
#

so

#

instead of addEnchant, addItemFlag?

pearl vector
#

not entirely related to spigot, but what would be the best way to communicate between a spigot server and a bungee server?
I'm going to be sending game status data, mutes & bans, and player data between then and will have back and forth communication

#

I don't want to use the channels built into bungee because it requires a player to be online

balmy sentinel
#

you still have to add the enchant. What ILikeToCode is suggesting @lilac flume is that you use an ItemFlag to hide the enchant (This way the item is enchanted but you won’t see like the Unbreaking I in the lore).

sturdy oar
#

not entirely related to spigot, but what would be the best way to communicate between a spigot server and a bungee server?
I'm going to be sending game status data, mutes & bans, and player data between then and will have back and forth communication
@pearl vector Socket

#

Or use someone else's library

pearl vector
#

a socket seems janky and I would manually have to deal with SSL

#

I'm looking for library recommendations

#

all I've come across so far is use netty

sturdy oar
#

Ok i have one let me find it

pearl vector
#

aight

lilac flume
#

@frigid ember
Do you know how I can open the key? with the CrazyCrates plugin?

#

Okey

#

Thanks

pearl vector
#

rip

#

I want to avoid using netty since it looks complex and it'll probably be hard to write clean code with it

#

since I don't have any experience with the library

#

when all the starter guides immediately have 10 different classes that they barely explain, you know you're in for a wild ride

celest current
#

Oh my bad mate. What did you say

#

I was on w3schools learning how objects interact and everything. From my understanding its saying that the method im trying to call in crafting.java cant be picked up in Main.java even though I made an object in Main that references to crafting

lapis kestrel
#

@celest current what is crafting.java:19

celest current
#

I thought I did? I didnt use ``` private final Main instance;

public listeners(Main instance) {
    this.instance = instance;
}```

and used public void main(String[] args) { new crafting(this); }

#

@lapis kestrel line 19 in crafting.java is if (instance.getConfig().getBoolean("crafting.xp-bottle") == true) {

pearl vector
#

the lower case class names are giving me anxiety lmao

#

I can't stand when I see that

#

the only thing worse is dropped brackets

#

mfs be writing ifs like this:

if (true)
{
//do something
}
lapis kestrel
#

@celest current u didnt initialize crafting, crafting.instance is null

celest current
lapis kestrel
#
public crafting(Main instance) {
        crafting.instance = instance;
    }
``` only runs when crafting is instantiated
celest current
#

then how am i supposed to do it?

lapis kestrel
#

either make it un-static and define an instance of crafting or add a parameter to toggleExpbottle for the instance

#

and run crafting.toggleExpbottle(this);

celest current
#

But it wants to be static

tiny dagger
#

oop has left the room

celest current
#

Ill rename them

lapis kestrel
#

crafting has to be instantiated

#
crafting Crafting = new crafting(this); 
crafting.togglExpbottle(); ```
#

something like that

tough kraken
#

small question, how can i set this to my config? i mean just adding a new player on join
config#set replaces the old, i think

halcyon snow
#

get the list, modify it, after that set it again using config#set

crimson sandal
#

Weird, if you create a DoubleChest with two blocks on top of it, the inventory holder for it isn't a DoubleChest like normal

tough kraken
#

what is even the string format for it?
"ranks.admin,", "player" ?

halcyon snow
#

the path would be ranks.admin

tough kraken
#

or am i dumb

lapis kestrel
#

config.getList("ranks.admin");

#

then modify the list and set using config#set

tough kraken
#

how do i do that? never did

lapis kestrel
#
List<String> rankList = config.getList("ranks.admin"); 
rankList.add(""); // add stuff
config.set("ranks.admin", rankList); ```
#

i think

tough kraken
#

ahh lol.

halcyon snow
#

use getStringList instead of getList

tough kraken
#

and if i just add the joined player, it gest added, and not replaced?

#

in the config later

celest current
#

Mission accomplished boi: we got em. Thank you for your patience and cooperation

tough kraken
#

lol

celest current
#

Half the server might think I have the IQ of a Belgian waffle... and they are right

trail hare
#

I was told to ask this here: The features I want are in an existing plugin, but nobody I talked to can remember the name, and searching by keywords isn't working out since "remove prefix from plugin-generated messages" brings up dozens of chat mods that mess with prefix permissions, not that. Anyone know what plugin it is?

tough kraken
#

it thats right:

List<String> players = RankConfig.getStringList("ranks.admin");
        players.add(player.getName());
        RankConfig.set("ranks.admin", players);

it gives a NullpointerException at add

lapis kestrel
#

Isn’t it better to use UUIDs?

tough kraken
#

on bungeecord?

#

it gives wrong uuids because of offline-mode

lapis kestrel
#

Oh

tough kraken
#

i hear that so often...

quick arch
#

Bungeecord will correct their uuids I think đŸ€”

odd knoll
#

And is bungeecord set to true?

#

Should be fine if you set bungeecord to true in the spigot.yml.

tough kraken
#

nope it isnt, because if i do so, on rejoin the location and inv of players gets resetted

#

dont ask why, i dont know

odd knoll
#

Probably because all their UUIDs are broken right now.

tough kraken
#

probably

#

and a nullpointer here

java List<String> players = new ArrayList<>(RankConfig.getStringList("rank.admin"));

#

ah i see the problem

#

rank.admin

#

ranks.admin

quick arch
#

config file permission đŸ€”

tough kraken
#

nvm still

#

looks right

#

for me

#

thats the config atm

ranks:
  admin: 
    - player1
    - player2
    - player3
    - ...
    - ...```
#

lol

#

idk, is it wrong formatted?

bold anchor
#

Looks fine

tough kraken
#

yep

#

thats the config - if its wrong

#
public static List<String> getStringList(String path) {
        config.getStringList(path);
        try {
            config.save(file);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
sturdy oar
#

Bruh you're dereferencing a null pointer

#

😂 😂

tough kraken
#

what lol

#

that works for everything

quick arch
#

đŸ€”

keen compass
#

shouldn't return null if it isn't necessary to return null

#

no wonder you are having a hard time debugging this NPE

tough kraken
#

nvm

#

why is it returning null lol

#

yeah i copy/pasted it

#

but WTF

quick arch
#

you made it return null

keen compass
#

It is returning null because the list you are obtaining is most likely not a list

tough kraken
#

no i didnt, for real

quick arch
#

or that, yeah

bold anchor
#

Did you do saveDefaultConfig()?

tough kraken
#

i copy pasted this and edited the important stuff

public static void createSection(String path) {
        config.createSection(path);
        try {
            config.save(file);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
#

thats why im wondering lol

bold anchor
#

IF so go delete the old config

keen compass
#

This method will attempt to cast any values into a String if possible, but may miss any values out if they are not compatible.

tough kraken
#

well

this should work then? lol

public static List<String> getStringList(String path) {
        config.getStringList(path);
        try {
            config.save(file);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return getStringList(path);
    }
keen compass
#

stop pasting the same thing over and over please

#

kind of pointless don't you think?

#

Your issue is that what you believe to be a list

#

isn't a list according to yaml

tough kraken
#

wtf

#

i dont get anything

bold anchor
#

Stop saving the shit

#

wtf

#

That shit code will do nothing wtf

tough kraken
#

ah lol nvm

bold anchor
#

StackOverflowError incoming

keen compass
#

this is why you need to understand java, not just the API -.-

tough kraken
#

dude, i understand java

#

i copypasted it, and i am fucking tired , its 1 am

tiny dagger
#

that's what you call @NotNull

#

đŸ€”

tough kraken
#

i didnt saw that wtf

keen compass
#

first issue, you are assuming what is being fetched is a valid list. You don't bother checking if it returns null, second issue, you are saving the file in the same method you are trying to fetch in, third you are returning null when it fails. That last part screws you over in debugging since you purposely return null when instead you can return anything else that provides more details, IE throw a new exception with a stack 😛

#

Wish more developers would understand you are allowed to throw new exceptions of any kind just about and in that new exception have it provide a lot of detail including a custom message.

sturdy oar
#

@tough kraken

public List<String> getStringList(String path) {
    List<String> list = config.getStringList(path);

    return list == null ? new ArrayList<>() ? list;
}```

@frigid ember I think Collections.EMPTY_LIST is better

tough kraken
#

oh yeah, sorry that not everyone can be as good as you lmao

keen compass
#

even if the method can throw an NPE, you can catch the NPE and throw a different exception 😉

#

it isn't about being as good as me, it is about learning the basics

#

learning about exceptions and the ability to throw them where you want to provide more detail is basic java

tough kraken
#

isnt done from now to tomorrow

quick arch
#

👀

keen compass
#

yes Java 14 provides even more details if you want it too

#

but I mean, Java technically has always had that ability to an extent

#

just Java 14 makes it more automated if you want it to be

tough kraken
#

tomorrow i got to drive lesson and tell the learning guys "i wish there would be more drivers who know how to drive"

best would be, if they are there since 1 day

keen compass
#

Well, most of the bad drivers isn't due to not learning, rather it is more due to ignorance and arrogance

quick arch
#

yeah like texting while driving 😐

keen compass
#

ignorance in following the laws and doing what you are suppose to on the road, and arrogance in believing they are the best driver on the road there is

#

most end up learning they are not the best drivers when they fail to do them super cool maneuvers that never work 😛

tough kraken
#

i mean

i am coding since a half year with java, and i am not doing it the whole day

i even have a life

if i would understand everything, i would not be here

#

well 3/4 year lol

keen compass
#

doesn't mean you can't bother to learn the basics when you can

#

Since Java keeps changing more rapidly I even have to revisit the java documentation from time to time to learn new things

#

some of those new things become part of the basics

#

Many people who master anything will tell you that to become one, all it really takes is just mastering the basics

#

sure, learning advanced stuff is cool, but mastering the basics and you can always do that thing regardless

#

all the advanced stuff does, is allows you to use slick stuff in certain situations and are not meant to be used everywhere

#

fun fact to relate to this, you can drift around a corner and look cool, but braking and turning the corner safely takes the same amount of time as drifting around it does. Doesn't make it faster 😛

bronze acorn
#

me sitting here at java 8 still đŸ˜Ș

keen compass
#

you can use java 11 safely btw

bronze acorn
#

o

keen compass
#

Java 14 can be used too, just some plugins that use reflection may not work on java 14

#

But Java 11 is compatible with anything java 8

bronze acorn
#

on an ubuntu server i tried to compile 1.8 w java 11 wbut it can only go up to java 8

#

o

keen compass
#

well that is just you using outdated server software

bronze acorn
#

lmao the server i work for uses 1.8 bc the players prefer it me or smthhn

#

bc the combat and stuff was superior

#

certain gamemodes that dont involve combat on there are 1.12 tho

keen compass
#

1.8 pvp isn't superior

#

it is inferior

steady cedar
#

Minecraft isn't a pvp game

keen compass
#

spam clicking takes 0 skills, the newer pvp takes more skills in planning

steady cedar
#

both pvp systems suck

#

waiting game or spam click

#

both suck

bronze acorn
#

yeah i tried to convince them to use 1.13+ also bc its way easier to use

#

but i wasnt able to convince them xd

keen compass
#

I wouldn't say it is easier. Just it really does require more skill to be good at it

#

most people don't like that

#

and would rather the easy way 😛

bronze acorn
#

i mean like its apii

steady cedar
#

more skill?

bronze acorn
#

its easy for me i mean

#

đŸ€·đŸœâ€â™‚ïž

keen compass
#

and its not just a waiting game on the new pvp

quick arch
#

more features 👀

bronze acorn
#

i love the custom model data stuff 😎

steady cedar
#

Wait, right click with shield. Attack. Right click with shield. Press F to equip new shield when broken. Attack. Right click. Repeat

bronze acorn
#

xd

keen compass
#

if you want to compare how fast you can click sure, but there is more to pvp then just clicking to attack

steady cedar
#

Yeah, like spam equipping new shields or having potions.

#

Or having totems of undying.

#

New pvp is amazing and very strategic.

#

Minecraft isn't a pvp game.

#

I've quit on making pvp servers for that very reason.

keen compass
#

No wasn't designed to be strictly pvp you are right. However that doesn't mean the newer combat system doesn't require more skills then the previous either

steady cedar
#

It really doesn't. Same principle, just takes longer to finish fights. Both of them suck

keen compass
#

If you want to dumb down your pvp experience to a few simple things that is on you. Most just don't bother with strategy

steady cedar
#

There is no strategy in the new or old combat system. I'm not sure if you think "strategy" is just a waiting game, and having a lot of shields and totems of undying. Both combat systems are bad because Minecraft isn't a combat game.

keen compass
#

you are the one saying to play it that way

steady cedar
#

Might as well target other player demographics not focused on one, boring, un-intentional mechanic.

#

Because that's the new combat system.

keen compass
#

I am saying you can choose to pvp in other ways that are just as good 😉

steady cedar
#

It's either that or spam clicking. Neither is fun

keen compass
#

yes because you choose to do that

steady cedar
#

I mean, you can modify combat sure, maybe make a chess game out of clicking pixels but it won't make it any more fun

keen compass
#

you can battle in leather armor successfully quite fun actually

steady cedar
#

¯_(ツ)_/¯

keen compass
#

But that is a choice to do that. So if you choose to make your pvp experience dull that was on you

#

that is not strategy

#

rather you are trying to go for efficiency instead

lilac flume
#

@frigid ember i added meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);

frigid ember
#

if i have a lambda forEach() in a method and i use return in that lambda, it will exit out of the forEach() but not the method right?

keen compass
#

correct

#

forEach is just a for loop but for lambda

#

so exiting out of it doesn't mean the method ends unless you don't do anything else afterwards

frigid ember
#

ok, so does that also mean in the case of forEach(), would it act like a break; or a continue; (like does it skip all of the remaining iterations?)

keen compass
#

it is like a break

#

it will immediately stop the loop if you return

frigid ember
#

ah i see

#

aight thanks

crimson sandal
#

What can cause this error when saving a yml đŸ€” java.lang.NullPointerException: Nodes must be provided.

void owl
#

Java.yml

tiny dagger
#

what's a node

#

in yml

#

đŸ€”

#

prob the dots

keen compass
#

its part of a list if I recall

#

or it could be that

#

@crimson sandal show the code you are using?

tiny dagger
#

the best way is to open the config code and see where it triggers

crimson sandal
#

I mean when I reload everything seems to be fine after that and it works fine

#

I serialize a lot of stuff

quick arch
#

Node is the keys isn't it đŸ€”

#

i.e. set("test.test", 1)
test.test would be the node

keen compass
#

So its quite possible that what you are serializing

#

is being mistaken as the path

#

only certain characters are allowed to be in the path, so since because of the serializing depending which method you are using. IE bukkits method. You would have spaces and other things listed. Not exactly a true serialization.

void owl
#

Im sexy

crimson sandal
#

Hmm okay, must be from corrupted saves whilst im developing

#

Also, is there a method to get the xp store in a furnace?

keen compass
#

yes

#

get the BlockState of the furnace block

#

or the BlockData

pastel nacelle
#

xp store is most likely under state

#

data deals with things like orientation

crimson sandal
keen compass
#

Because it is going to be in the metadata

 RecipeLocationN: N is the number of the recipe, starting at 0. The recipe name that has been used, used to calculate experience given to the player when taking out the resulting item.
 
RecipeAmountN: N is the number of the recipe, starting at 0. How many times recipe N has been used, used to calculate experience given to the player when taking out the resulting item.
 
RecipesUsedSize: How many recipes have been used, creates corresponding RecipeLocationN and RecipeAmountN tags, used to calculate experience given to the player when taking out the resulting item.```
quick arch
keen compass
#

yes you can use NMS to get the NBT tags directly

#

but metadata is the same, just without using NMS

quick arch
#

o

keen compass
#

also generally metadata doesn't persist sometimes

quick arch
#

yeah

#

It should be stored with PersistentDataContainers 👀
Wouldn't work cause PersistentDataContainers require a plugin instance đŸ€”

keen compass
#

but don't always need to modify it if you just need the data to do your own thing however 😉

#

would work because what else are you going to use other then a plugin? o.O

#

I mean I suppose you could make use of mc commands to modify nbt stuff, but then persistentDataContainers are not an issue at that point 😛

quick arch
#

đŸ€” We can't get the instance of Bukkit/Spigot can we

keen compass
#

yes you can with Spigot() or Bukkit()

quick arch
#

o

keen compass
#

but I mean if it requires a plugin instance

quick arch
#

I don't use those methods ._.

keen compass
#

you can just reference your plugin o.O

quick arch
#

bukkit:exp đŸ€”

keen compass
#

not hard to grab an instance of another plugin

#

so as long as that plugin exists

#

you can use the PluginManager() to fetch other plugin instances

quick arch
#

ah yes, I can just create a fake "Bukkit" plugin for the instance 😉

keen compass
#

Well if its bukkit itself you can always grab a bukkit reference regardless

#

since bukkit is well always loaded with the server 😛

quick arch
#

Creating an empty plugin seems easier

keen compass
#

I don't see how

#

literally in the API to get a Bukkit reference either via static or a method

quick arch
#

I'm too lazy to do that

#

I can just create the plugin with the Minecraft Development plugin for IntelliJ and then build it :D

keen compass
#

lmao

quick arch
#

Yup, done very quick

crimson sandal
#

Wait so is the exp stored in the PersistentDataContainer? 😄

quick arch
#

no it's stored in regular ol' nbt

graceful vigil
#

I'm storing a URL in a string (used to send a post request on an event), and I'm wondering if it'd be better to not make it static. I want to avoid static abuse, but I'm not really sure when to and when not to use static for a variable

narrow pier
#

i need code help can someone help me

graceful vigil
#

?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.

quick arch
#

Choco told me that if it's a utility, static is fine

#

ignore "Paper" 👀

keen compass
#

one of the easiest ways to know if something is safe to be static is if the object or class is needed to exist throughout the plugins existance of being loaded. If the answer is no it doesn't always need to exist, it is better that it not be static. But if it will persist IE maybe like a manager class for instance that will always be there, it is safe to be static. The reason static can be bad is because it prevents classes or objects from being GC'ed when they could be. So it will retain resources for as long as the plugin is loaded. @graceful vigil

narrow pier
#

can someone help me with some spigot code pls i need help my brain hurt

keen compass
#

that isn't the only reason for static, but it is the easiest way to know if you should or should not use static

graceful vigil
#

@narrow pier

#

?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.

narrow pier
#

oh

quick arch
#

oh so static doesn't allow the GC to remove them đŸ€”

#

good thing I only have around 20 or something static fields from Choco

buoyant path
#

thoughts on how I can get the current date for a player who just joined. I want to do this with it based on their timezone if possible

quick arch
#

current date?

buoyant path
#

like 5/20

#

or whatever

graceful vigil
#

@keen compass so I'm storing a URL in a string, and I have a class that listens for events, it would be ideal to make it non-static (the variable storing the URL)?

quick arch
#

Player#getFirstJoin something like that

#

that should be in unix iirc

buoyant path
#

not getFirstJoin

quick arch
#

o

buoyant path
#

I want something like this

keen compass
#

@graceful vigil yes because the URL can be changed at some point. And the URL doesn't always need to be around in memory all the time either. Not usually anyways.

#

the other thing static does, is it doesn't allow the object/class reference to change

#

it will always point to the same reference regardless if you assign it to another variable

graceful vigil
#

Alright, thanks for the help!

quick arch
#

The dates are for new players, yeah?

buoyant path
#

nah it shows the current date, today is 7/26 when I took that screenshot, tomorrow it will show as 7/27 etc

quick arch
#

o

buoyant path
#

I could just do it in UTC but it feels better to do it based on timezone

narrow pier
#

?ask I am making a plugin that allows you to instantly sleep, so I can right click on my bed and it becomes day. I also have added the ability to sleep until nighttime. In chat, it says who is sleeping. The only problem is you can go into the nether or the end and right click on a bed, and the bed explodes. I want to add a feature where if you try doing this in the nether or end it will still explode, but the announcement of who is sleeping will not show and the plugin will basically be disabled.

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.

narrow pier
#

well that was useful

quick arch
#

Just do an hourly timezone check or something

graceful vigil
#

đŸ€Šâ€â™‚ïž

narrow pier
#

.?ask did nothing

#

@frigid ember why

keen compass
#

just check the players location and get the world. If the world isn't the overworld then do nothing @narrow pier

narrow pier
#

how tho

keen compass
#

how are you checking for players sleeping?

narrow pier
#

can i just post my code?

keen compass
#

player objects have location method

frigid ember
#

?paste

worldly heathBOT
graceful vigil
#

?paste

frigid ember
#

go for it

graceful vigil
#

smh

#

beat me to it potato

quick arch
#

Lets.. not enable slowmode on here with the bot commands... (if it even can)

#

That would be horrible

frigid ember
#

wait what

narrow pier
#

ok so i just post the pastebin link here?

graceful vigil
#

yessir

narrow pier
frigid ember
#

uh

keen compass
#

@quick arch bots can enable slow mode. Everything in discord that hits the API, counts towards it.

#

that even means removing messages ironically

narrow pier
#

am i just idiot

quick arch
#

đŸ€”

#

looks like a mess

narrow pier
#

my code?

#

yeah makes sense

#

just started a few days ago

frigid ember
#

wait so any time a player clicks a bed it swaps between day and night?

quick arch
#

You can do that ^

narrow pier
#

if is day then becomes night

#

if night then becomes day

quick arch
#

But you can spam it and give people epilepsy

frigid ember
#

that sounds like epilepsy simulator

narrow pier
#

thats what my code does

#

well

#

uh

#

ill add a thingy later

keen compass
#
if(e.getPlayer().getLocation().getWorld().getName().equalsIgnoreCase(Bukkit.getServer().getWorld("World name here")) {
  //do something here if it matches. Conversely you can flip it around for the check if it doesn't equal as well
}
narrow pier
#

to prevent spamming

#

wat

#

so

#

if it is the world name

frigid ember
#

whoa hold up

narrow pier
#

my brain hurts

frigid ember
#

wait so what did uw ant to do?

#

not allow them to do it if its in the nether?

narrow pier
#

yeah

#

and not in the end either

keen compass
#

they don't want the message to display if they are in other worlds

#

but still keep vanilla functionallity

#

so the way you do that, is check the world they are in

#

location gives that

quick arch
#

Couldn't it just be done with one condition đŸ€”

tiny dagger
#

frostalf

frigid ember
#

wouldnt it be better to do

tiny dagger
#

what's that

quick arch
#

well, atleast 2

frigid ember
#
e.getPlayer().getWorld().getEnvironment().equals(World.Environment.NORMAL)```
narrow pier
#

that code sounds like smart

keen compass
#

both essentially do the same thing

#

just a bit differently

narrow pier
#

one looks simpler

keen compass
#

they are both simple

narrow pier
#

one makes my brain not hurt

keen compass
#

Because you don't understand Java which I highly recommend brushing up on

frigid ember
#

but u should probably assign e.getPlayer() to a variable since ur using it a lot

narrow pier
#

?

#

that seems like a good idea

#

ill do that... once i learn how

frigid ember
#

o_O u dont know how to assign variables?

narrow pier
#

i tried

#

it did not work

frigid ember
#

yea i recommend learning basics of java first then before diving into spigot stuff

quick arch
#
if (world check){
    long time = e.getPlayer().getWorld().getTime();
    String type = time > 12542 ? "DAY" : "NIGHT";
    String oppositeType = time < 12542 ? "NIGHT" : "DAY";
    e.getPlayer().getWorld().setTime(time + 12610);
    Bukkit.getServer().broadcastMessage(ChatColor.RED + e.getPlayer().getDisplayName() + ChatColor.GOLD + " is sleeping in a bed. We are skipping to " + type + ". To counter this and make it " + oppositeType + " again, just sleep in your own bed!");
}```
#

Couldn't it just be done like that or something

narrow pier
#

maybe

frigid ember
#

i can only imagine this on a server with like 100 people

#

but thats besides the point

narrow pier
#

lol

#

im gonna add a permission so only some people can do it

#

thank you

#

it works

frigid ember
#

Hey guys!

Do you know of any good hibernate plugins? I would like my server to hibernate when there is no players around.

odd knoll
#

A plugin aint gonna do that.

#

I assume by hibernate you mean turn off, otherwise it's near pointless.

inland oxide
#

anyone know what causes this error

#

[11:36:18 WARN]: Unable to resolve BlockEntity for ItemStack: minecraft:spawner[11:36:18 WARN]: Unable to resolve BlockEntity for ItemStack: minecraft:spawner

wheat mirage
#

Is there any way a to spawn an enderdragon, and link it up to a portal?

#

without the AI being broken

#

doesnt even need to link to a portal

#

But normal enderdragons just dont work very well

odd knoll
#

Could be coz there isn't a material called spawner kludgemonkey.

#

Wait, it is spawner in post 1.12.2, mob_spawner pre 1.13.