#help-archived
1 messages · Page 201 of 1
then use that ip
but its not working
turn off firewall
your pc ip to the router
firewall is off
IPv4 Address. . . . . . . . . . . : 192.168.1.100(Preferred)
What is this error please?
i use UFW on ubuntu, the firewall for 25565 is turned off and anyone can pass through it
i hope you used your ipv4 ip
sometimes it disconnects like 100 players
I used my Ipv4 ip
it's in the server
i can join with my ipv4, but not with my public ip
then it's an issue in port forwarding
is that your router?
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
i havent, i disabled firewall, i have ipv4 on the proxy config, and port forwarded the ip's on my router
Please show the code.
someone who uses intellij
sometimes i get something like "freelook", idk how to call it
why do i get this? its trash
It says the issue is with a replace method and there's no replace method there... so.
how do i make a bukkitrunnable run 20 times a tick
Bukkit.getScheduler().runTaskTimer(this, () -> {
//do whatever you want
}, 20L);
nvm, i see
whats the difference?
@tranquil plaza getVite returns a double and .replace doesn't want a double to replace %vite% with. It probably wants a String
ahh
@tranquil plaza One of your issues is you never close the statement or the result set... resultset.close(); statement.close();
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
hey guys, how do I host a public server if I am on a wifi?
why is port forwarding so hard in 2k20 đź
@frigid ember
it actually isnt
Disable connection throttle in bungee?
there even are tools for
I can't actually visit the gateway
but i wan't seeing so many before
same
pretty sure it's still good
so fucking unsafe
oh yeah
but sometimes I use internet from my phone hotspot
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.
what it's connected to
i dont even have the access data lol
go into your router interface
no no no
and forward it
no ofc not
if you dont have unlimited traffic... good luck haha
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
with which internet? yours over the mobile hotspot?
if it was possible
i dont get it
@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
yeah the mobile internet
donât use mobile internet to create a server.
-1 means off.
Learn how to port forward and if your router and/or ISP doesnât allow you to port forward consider changing providers.
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
we have internet at home meme
i can only imagine the poor security measures
just buy a virtual machine for 5$ or so.
or even a gameserver with about 2-3gb isnt so expensive
I have BungeeQueue, JPRemium, LiteBans, LuckPerms, TCPShield, MoveMeNow @frigid ember
lol
BungeeQueue sounds like it could be the issue
Do you have any other good queue's plugin?
InvalidConfigurationException
26.07 18:35:29 [Server] WARN [CoreLogging] Your worlds.yml is invalid!
its the first line
yesn't
mongodb
will getServer().getPluginManager().registerEvents(new listeners(null), this); still register events from listeners class with the listeners(null)
i like tutorials (dont hate me, lol) maybe anyone know one good about databases, related to bungeecord?
Can someone please tell me why I'm receiving a NoClassDefFoundError when my classpath is fine? http://puu.sh/Gbcql/5adb3c61ba.png http://puu.sh/Gbcrk/e890397783.png
@frigid ember http://prntscr.com/totvgx
do you have a class named listeners?
btw, is there a way in intellij to show and handle projects like in eclipse? so i dont have to re-open it manually
Your classpath is fine, sure, but that class is not loaded at runtime, tedders
yes KM
You have to shade in that dependency with a build system like Maven
I have to use Maven for this?
Or Gradle, whatever
ok thx
@tough kraken Don't kick a player in
PlayerJoinEvent. You can use listen forAsyncPlayerPreLoginEventand useAsyncPlayerPreLoginEvent#disallowto disallow the player from logging in.
@frigid ember and how to check for the Player? there is no player on the event
@frigid ember but im using that for a config file
@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.
Anyone have a good worth.yml for 1.15 or 1.16? đ
The essentialsX one is kinda crap
InventoryType of a custom inventory made from a plugin is CHEST right?
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?
ConfigurationSection#getString
getConfig().getString("effects.speed") This is literally how you get a String from a key
So anyways my IQ may be that of a rock but I know how to add loading in configs
I just gotta do that...
How can i change my forums name xDD
i felt that
Heheheh
I'm pretty sure sure you have to request to get it changed.
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
pretty sure you have to donate $10 and then request for a name change
o
hurts my heart so much
Make a thread in here, https://www.spigotmc.org/forums/donation-enquiries.47/
OwO
then wait a bit
Good idea xD
then request the name change
I mean i donated like 2 days ago soooo o o o
big brain man
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
installing mysql on a virtual machine... i literally hate my whole life
NOTHING WORKS lmao
Are you just trying to run a MySQL database?
If so, if you install XAMPP it makes it rly easy. Mac and Windows.
Yes. Are you using it for something permanent?
I mean, if you're running it on a VM on your machine then well... that's exactly the same basically.
Just more overhead.
Oh, completely separate.
I remember I tried running minecraft servers, minecraft client, XAMPP, and skype all at once on my old laptop. RIP Mikey's-Laptop
and i cant portforward, so xampp won't work i think
Oof.
MySQL doesn't use much at all.
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
Why u installing php 7.0?
What OS?
linux
What distro tho?
Ubuntu, CentOS, etc..
ubuntu
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?
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
Is ur repo list messed or something lol
IDK
U running ubuntu 20.04? They might have changed it there, IDK.
literally have no plan of that server shit
Heyo, how do I get a player's connected host?
in bungee
how i see it?
no, the hostname they used to connect to the server... @odd knoll
yes i want to
Not sure about that, I only know how to get their hostname.
E: No installation candidate for package "MySQL server" experience.
it literally cant find anything
Yes. @frigid ember
Thank you
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
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.
it seems to have worked!
InetSocketAddress#getHostName returns the hostname, would you like me to try the other one?
They both return the same
@frigid ember
thanks
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!
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
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())));
}
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 đ
https://discordapp.com/channels/690411863766466590/690470011382267904/737011928983142490
Didnt want to double post
how do i prevent that?
do i just do
if (player == null)
?
@frigid ember I tried your method and /whereis'd myself (my command) and this
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
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);
}
if (player == null) {
commandSender.sendMessage(new TextComponent(ChatColor.translateAlternateColorCodes('&', "&cThe player you entered is offline.")));
return;
}
wrong thing
same thing just replacing the if
@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
How can I call a method from another class
by learning java
maybe because ProxiedPlayer player = getProxy().getPlayer(String.valueOf(strings));
@pastel nacelle Thats not helping but ok
i tired and google doesnt like talking like people do
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
How can I call a method from another class
Thats not me.
Alright ill reiterate: whats the most efficient way to call a method from another class
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
ah
@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.
guys? đ what should i select?
when in doubt use the default
@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
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
No worries
@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
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
â 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
[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
i'll give it up. such bullshit
ViaRewind v1.5.1-SNAPSHOT
ViaVersion v3.0.2-SNAPSHOT```
just ask your question..
ahahah okay
?help
fuck my life
broke
Looks like CafeBabe will take its time...
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.
ayyyyy
better
i've got a server aternos and i would install some spigot plugin and i don't know how
?
you are stuck to their accepted plugins
and they accept about 5% of requested plugins
oh
They have a pluigin list. Go there and click on the plugins you want to install.
okay idk where is that but i will find
if you dont find the plugin, they dont have it in their list
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
Hello, i need a release build of Spigot 1.9. I can't find one, only a snapshot build... Does anyone have this build?
when? which one? I had it working then i added new stuff
why do you have a constructor for your main class?
When I kill a mob with my fist that does like 300+ dmg, it pops up with this https://hastebin.com/suwahalovi.sql
?bt
no? i'm 100% sure bt was a command
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
there
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
garbage bot
okay sir
Im trying to call a method from crafting.java in main
I've made bots that work better than that and I have no idea what I'm doing
When I kill a mob with my fist that does like 300+ dmg, it pops up with this https://hastebin.com/suwahalovi.sql
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?
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
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
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
from the examples? that was a generic one from w3 schools lmao
you can also like say NNY or remove the @ before the ping
that is called basic decency
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
How to prevent nullpinging
wait
Bungeecord crasher
My discord: https://discord.gg/MBwmjE4
Etiketler
kingnw,
kingnw survival,
kingnw faction,
kingnw opskyblock,
kingnw plugin paketi,
opfaction plugin paketi,
opskyblock plugin paketi,
ridepvp faction,
ridepvp,
ridepvp opskyblock,
minecraft ddos atma,
minecraft bot atma,
minecra...
something like this
I didnt know they can make clickbait out of code
Yes
[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
ngl the music in the nullping video is FIRE
lol
anyone has any idea about my problem?
No, sorry
?paste
?paste
Please
but maybe i didnt understand, what do you mean?
ILikeToCode I cant tag u D:
because that is RUDE
I like it
than youre RUDE
To myself?
to him
Please don't have side conversations here.
yeah, fair point
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
ILikeToCode https://paste.md-5.net/giciwidoru.java
soo about my problem.. what did you mean?
@SuppressWarnings("unused")
crafting craftingclass = new crafting(null);
}```
@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
null ping packages
Handshake Packets
I never worked with bungeecord
only spigot
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.
well... a null isnt a object
ChannelWrapper?
so im just saying, he has to NOT know about objects
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
null ping packages
@umbral dirge Use -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkAccessible=false
its called MASTER MULTITASKING, and what did you mean by what you said to me beforehand?
@coral kraken ..?
(Command line)
does not exist
@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.
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
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
to see if hes already in a faction
do it sensibly and build sets of taken names instead of using the garbage bukkit config api for anything
serialize the set to a file on autosave/shutdown and deserialize it on startup for persistence
sure ill try it next day
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.
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
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
Noted
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
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
how do i change the amount of ram my server can use
java -Xms1024M -jar spigot-1.16.1.jar change 1024 higher or lower
it looks cooler in Mb tho đ
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
Make sure you replace the -Xmx not the Xms and that you have enough ram on your system
oh no I mixed them up
so i replace which on
Xms
You can replace both if you want
it says invalid initial heap size
Ayyye someone used my emoji
@celest current Xms is for initial heap size, Xmx is for max heap size
when i change the Xms to 10G
then it says invalid max heap size when i change Xmx
How much ram does ur pc have? 10Gb is a nice chunk
24
@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
24 Gb? i thought memory was multiples of 4?
:/
i make them both 10G and it says invalid initial heap size
the only number i can use is 1
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
how do i check
only tells me the version of java such as 1.8.0_251
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
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)
doesnt have required version aha
i am installing better version now!
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 đ
^^
I use java 8 because I'm lazy and haven't updated it in like 4 years
I also run java 8 jdk xd
it says recommended is java 8 and i cant find java 11
bro don't download Oracle stuff
i got it to work boys!
recommended where?
dont trip chocolate chip my game works again on 10G
or don't listen that is fine too -.-
ew oracle wtf is wrong with you that browser gives me viruses everytime i use it
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.
o.O
Oracle is the one that creates Java just fyi
^^
get the player inventory and put the key in it
took me now about 6 hours lmao
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
pretty sure he wants to give it to the player who killed the other player
players remain dead until they respawn. And it isn't instant. They respawn whenever they click the button
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
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
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
look at the inventory javadoc i guess
you should probably check if their inventory is full before adding an item and you created an ItemStack but never did anything with it.
worse that happens is the item gets dropped on the ground if that is the case
or at least it should last I recalled
Better that instead of receiving it, that it be dropped
as a parrot probably not, as other types of mobs yes
https://www.youtube.com/watch?v=lfOakuOT5dY @keen compass then howd they do it
Minecraft, But My Friend Is A Parrot...
I turned my friend into a Minecraft parrot! He had to be by my side and help me fend off mobs attacking me but he could not break or place blocks. This was crazy fun...
Follow my socials âââ
Twitter/Instagram: @GeorgeNotFound
Merch: ht...
can't you spectate parrots?
oh wait ok so u can
so what would you use? like what thing on the javadoc?
Player#setSpectator(entity)
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
He wants the player to basically turn into a parrot and fly like one, have the same health, etc.
(I think at least)
yes
frogs correct
nope i do not
so its above my level i see
ohhh okay
so i downlaod that then build a path?
m8 why does everyone want to replicate Skeppy's plugins
probably one of his hundred trolling kids in a box or whatever videos
its stupid /shrug
nah it's Skeppy
?
@frigid ember
@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
Can I make that item open in a CrazyCrates or CratesPlus box?
You can if you use their API
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
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).
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
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
Ok i have one let me find it
aight
@frigid ember
Do you know how I can open the key? with the CrazyCrates plugin?
Okey
Thanks
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
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
@celest current what is crafting.java:19
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) {
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
}
@celest current u didnt initialize crafting, crafting.instance is null
http://prntscr.com/toy793 this just makes this
public crafting(Main instance) {
crafting.instance = instance;
}
``` only runs when crafting is instantiated
then how am i supposed to do it?
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);
oop has left the room
Ill rename them
crafting has to be instantiated
crafting Crafting = new crafting(this);
crafting.togglExpbottle(); ```
something like that
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
get the list, modify it, after that set it again using config#set
Weird, if you create a DoubleChest with two blocks on top of it, the inventory holder for it isn't a DoubleChest like normal
what is even the string format for it?
"ranks.admin,", "player" ?
the path would be ranks.admin
or am i dumb
how do i do that? never did
List<String> rankList = config.getList("ranks.admin");
rankList.add(""); // add stuff
config.set("ranks.admin", rankList); ```
i think
ahh lol.
use getStringList instead of getList
and if i just add the joined player, it gest added, and not replaced?
in the config later
Mission accomplished boi: we got em. Thank you for your patience and cooperation
lol
Half the server might think I have the IQ of a Belgian waffle... and they are right
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?
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
Isnât it better to use UUIDs?
Oh
i hear that so often...
Bungeecord will correct their uuids I think đ€
And is bungeecord set to true?
Should be fine if you set bungeecord to true in the spigot.yml.
nope it isnt, because if i do so, on rejoin the location and inv of players gets resetted
dont ask why, i dont know
Probably because all their UUIDs are broken right now.
probably
and a nullpointer here
java List<String> players = new ArrayList<>(RankConfig.getStringList("rank.admin"));
ah i see the problem
rank.admin
ranks.admin
config file permission đ€
nvm still
looks right
for me
thats the config atm
ranks:
admin:
- player1
- player2
- player3
- ...
- ...```
lol
idk, is it wrong formatted?
Looks fine
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;
}
đ€
shouldn't return null if it isn't necessary to return null
no wonder you are having a hard time debugging this NPE
you made it return null
It is returning null because the list you are obtaining is most likely not a list
no i didnt, for real
or that, yeah
Did you do saveDefaultConfig()?
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
IF so go delete the old config
This method will attempt to cast any values into a String if possible, but may miss any values out if they are not compatible.
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);
}
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
ah lol nvm
StackOverflowError incoming
this is why you need to understand java, not just the API -.-
i didnt saw that wtf
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.
@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
oh yeah, sorry that not everyone can be as good as you lmao
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
isnt done from now to tomorrow
Should've used Java 14 and it's helpful NPE errors, https://i.imgur.com/3cX2WCR.png
đ
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
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
Well, most of the bad drivers isn't due to not learning, rather it is more due to ignorance and arrogance
yeah like texting while driving đ
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 đ
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
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 đ
me sitting here at java 8 still đȘ
you can use java 11 safely btw
o
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
on an ubuntu server i tried to compile 1.8 w java 11 wbut it can only go up to java 8
o
well that is just you using outdated server software
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
Minecraft isn't a pvp game
spam clicking takes 0 skills, the newer pvp takes more skills in planning
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
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 đ
i mean like its apii
more skill?
and its not just a waiting game on the new pvp
more features đ
i love the custom model data stuff đ
Wait, right click with shield. Attack. Right click with shield. Press F to equip new shield when broken. Attack. Right click. Repeat
xd
if you want to compare how fast you can click sure, but there is more to pvp then just clicking to attack
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.
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
It really doesn't. Same principle, just takes longer to finish fights. Both of them suck
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
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.
you are the one saying to play it that way
Might as well target other player demographics not focused on one, boring, un-intentional mechanic.
Because that's the new combat system.
I am saying you can choose to pvp in other ways that are just as good đ
It's either that or spam clicking. Neither is fun
yes because you choose to do that
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
you can battle in leather armor successfully quite fun actually
ÂŻ_(ă)_/ÂŻ
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
@frigid ember i added meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
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?
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
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?)
What can cause this error when saving a yml đ€ java.lang.NullPointerException: Nodes must be provided.
Java.yml
its part of a list if I recall
or it could be that
@crimson sandal show the code you are using?
the best way is to open the config code and see where it triggers
I mean when I reload everything seems to be fine after that and it works fine
I serialize a lot of stuff
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.
Im sexy
Hmm okay, must be from corrupted saves whilst im developing
Also, is there a method to get the xp store in a furnace?
I don't see any XP methods here https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Furnace.html
declaration: package: org.bukkit.block, interface: Furnace
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.```
This plugin uses nms and calculates the exp https://www.spigotmc.org/resources/furnace-xp-1-14.69397/ đ€
yes you can use NMS to get the NBT tags directly
but metadata is the same, just without using NMS
o
also generally metadata doesn't persist sometimes
yeah
It should be stored with PersistentDataContainers đ
Wouldn't work cause PersistentDataContainers require a plugin instance đ€
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 đ
đ€ We can't get the instance of Bukkit/Spigot can we
yes you can with Spigot() or Bukkit()
o
but I mean if it requires a plugin instance
I don't use those methods ._.
you can just reference your plugin o.O
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
ah yes, I can just create a fake "Bukkit" plugin for the instance đ
Well if its bukkit itself you can always grab a bukkit reference regardless
since bukkit is well always loaded with the server đ
Creating an empty plugin seems easier
I don't see how
literally in the API to get a Bukkit reference either via static or a method
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
lmao
Yup, done very quick
Wait so is the exp stored in the PersistentDataContainer? đ
no it's stored in regular ol' nbt
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
i need code help can someone help me
?ask
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.
Choco told me that if it's a utility, static is fine
exp nbt must be hidden, https://i.imgur.com/EBg4W5l.png
ignore "Paper" đ
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
can someone help me with some spigot code pls i need help my brain hurt
that isn't the only reason for static, but it is the easiest way to know if you should or should not use static
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.
oh
oh so static doesn't allow the GC to remove them đ€
good thing I only have around 20 or something static fields from Choco
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
current date?
@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)?
not getFirstJoin
o
@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
Alright, thanks for the help!
The dates are for new players, yeah?
nah it shows the current date, today is 7/26 when I took that screenshot, tomorrow it will show as 7/27 etc
o
I could just do it in UTC but it feels better to do it based on timezone
?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.
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.
well that was useful
Just do an hourly timezone check or something
đ€Šââïž
just check the players location and get the world. If the world isn't the overworld then do nothing @narrow pier
how tho
how are you checking for players sleeping?
can i just post my code?
player objects have location method
?paste
?paste
go for it
Lets.. not enable slowmode on here with the bot commands... (if it even can)
That would be horrible
wait what
ok so i just post the pastebin link here?
yessir
uh
@quick arch bots can enable slow mode. Everything in discord that hits the API, counts towards it.
that even means removing messages ironically
am i just idiot
wait so any time a player clicks a bed it swaps between day and night?
You can do that ^
But you can spam it and give people epilepsy
that sounds like epilepsy simulator
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
}
whoa hold up
my brain hurts
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
Couldn't it just be done with one condition đ€
frostalf
wouldnt it be better to do
what's that
well, atleast 2
e.getPlayer().getWorld().getEnvironment().equals(World.Environment.NORMAL)```
that code sounds like smart
one looks simpler
they are both simple
one makes my brain not hurt
Because you don't understand Java which I highly recommend brushing up on
but u should probably assign e.getPlayer() to a variable since ur using it a lot
o_O u dont know how to assign variables?
yea i recommend learning basics of java first then before diving into spigot stuff
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
maybe
i can only imagine this on a server with like 100 people
but thats besides the point
Hey guys!
Do you know of any good hibernate plugins? I would like my server to hibernate when there is no players around.
A plugin aint gonna do that.
I assume by hibernate you mean turn off, otherwise it's near pointless.
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