#help-archived
1 messages ยท Page 177 of 1
i am getting this eror when loading my plugin-config:
https://hastebin.com/udozupoyit.pl
here is my yml:
https://hastebin.com/epibafihep.http
@tough kraken maybe anyone from you knows whats the problem?
actually i really dont get it
don't quote me on this but i have a feeling it needs double quotes instead of single quotes if it it's a string? yaml configs are really weird to deal with
that's the thing
with yml files when i had something automatically add to the yml, it added it in single quotes although it was an object
nap, still the same
seems to be at de:
yeah i see
Hi! I'm having some troubles Im trying to get an ngrok ip to work, it keeps saying unknown host, I'm on 1.16, I just updated my server
never
i believe my issue was formatting.
I had something like:
SectionA:
SectionB: 'Value'
SectionC: 'Value'
SectionBA:
...
It was yelling at me because SectionB had a value yet was also a section. I know this has nothing to do with your problem but it could maybe give you some idea about formatting
its because its an custom yaml
really?
well nvm
wait
my dc-integration plugin doesnt likes reloads
so much erros ahhhh
Hi! I'm having some troubles Im trying to get an ngrok ip to work, it keeps saying unknown host, I'm on 1.16, I just updated my server
@civic ruin idk if im dumb, but what is ngrok ๐ฎ
nah lol idk either
was there a folder holding the yaml configs?
well the folder named by the plugin
oh i see
the default configs folder
@civic ruin idk if im dumb, but what is ngrok ๐ฎ
@tough kraken idk how to port forward, so I use a program called ngrok to share an ip with friends, which I have to change everytime I close the program, meaning Ill give them a diff ip everytime
never touched hamachi never will
better idea
would recommend looking up a tutorial for port forwarding
the problem is i am from germany, i think its different in other countries
I did, idk how to unlock my router, the password isnt available and neither is the manual, the recommended password for my router didnt work either :/
what would really interest me, you english/american/etc guys,
is it actually important you if for example don't is wrote with or without '?
i forget this thing everytime xd
eh proper grammar is don't but nobody really cares
I did, idk how to unlock my router, the password isnt available and neither is the manual, the recommended password for my router didnt work either :/
@civic ruin well you need your router password etc
better for me haha
yeah it doesn't really matter how it's written, we understand either way. just a habit for me tbh
I don't understand though, ngrok worked with my friends in 1.15 before I updated, and I can get on my server just fine by localhost
Why not get a server from a host, you can easily get one for $2-4
well thats the thing on localhost
I'm really cheap lmaoo, plus I'm a teen and I don't have a job :/
i have a full vServer, 24gb 6core 20โฌ, what means about 20$ too
i dont think 3 dollars at month would be so hard to get... but idk your situation, i think its different for everyone
Nope. A relatively decent server setup can be paid for the whole year with just an 8 hour shift
Yeah, my parents don't really like me using money for games, so buying a server even for $3 per month would be a hard pass :/
That's fair. My parents were the same way when I was younger and that's honestly probably for the better
servers are very cheap for now
Plus I barely use mc as much nowadays since I got another game
welcome to development lmao
well, what was your problem @unborn jewel
trial and error, get used to it
welcome to development lmao
@graceful vigil yeah lmao
the bossbar isn't work
describe not working
no errors anywhere?
nope
@civic ruin https://www.spigotmc.org/wiki/port-forwarding/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
enabling/joining/etc
contains a program called beacon that does the work for you
Albeit off topic, is there a way to have an entity that's extending EntityPlayer be... an EntityCreature as well? Basically I want to be able to use the PathfinderGoalRandomStroll for an entity that well.. has the shape of a player haha
Edit: Or if there's some sort of navigation system EntityPlayer has other than being controlled by the user (maybe something similar to NavigationAbstract, as my goal is to copy PathfinderGoalRandomStroll if I can't use it)
wym vngc
and yes i am referring to nms territory ^
if you dont have errors, its hard to know whats the problem
without an error i cant help
as well i never used a bossbar
always using the actionbar
ah
btw, tanku maybe the config problem really was because of the '
but never heard to use " in yml's
thats not good
@civic ruin https://www.spigotmc.org/wiki/port-forwarding/
@keen compass thanks! I'll try it now
yeah yml's work really weirdly
trust me, i am coding since about 6 months, i know it if stuff doesnt work
my timer RRRRRRRR
could rage again
but still keep on, if not, you never would get it
yeah yml's work really weirdly
yaml is a bitch when it comes to indentation and quotation
json ftw!
i do enjoy json but not for user-friendly configurations ๐
.ini ๐
then ask at the forums at spigotmc.org
there maybe they can help you, if you send your code.
yaml is a bitch when it comes to indentation and quotation
@frigid ember aahhh never...
https://hastebin.com/epibafihep.http
really like this config
not...
@unborn jewel temporarily rename the class file and only show them that class file? shrug
well, before 2 days i got ignore-status at this channel
because of such stuff
lmao
or dont even show the class file? ๐
just show all after public class ...
and you're good
refactor ๐
if you would know how often i remove static from my code, just to send it here hahaha
uhmm
no one heard me ๐
i dont know the proper way to use static so i dont use it all too often unless im trying to do nms stuff
f
I just suck at coding
and how you want to change that? by deleting projects?
that will really make you better...
I started java 3 days ago
oh boy
When I started, which wasn't all that long ago, I gave up on projects too.
All it did was make the process of learning more grueling. I tried to find projects that were easy at first, and then build up from there. Working with others is also really helpful, and this Discord is a great community to get help. Just specify that you're new and they won't treat you like garbage ๐
I don't even understand 99% what I was doing
i was at the exact situation like you
gave up after a week, didnt got anything.
after about a month i tried it again, and stayed on it. now i can code much more than on beginning
You should probably learn the basics of java before starting on plugins
problem is i can't learn by my self
i talked with someone here, coding about 10 years, still learning stuff
you're never out of learning-stuff
youtube and google
wait a moment
probably the best i know
https://www.youtube.com/channel/UCNXt2MrZaqfIBknamqwzeXA
if I don't then I won't remember anything
trust me I tried
about 3 days? wow
you dont learn coding in a week
i've been learning for about 3-4 months and i'm still pretty bad at coding
i tried for a week
It takes way more than a week to learn
Tanku you have a koala as picture
dont talk shit ๐
had a whole class look like:
if() {
if() {
if() {
if() {
.. and so on
} else {
} else {
} else {
}
and i learned nothing from it
im not talking shit? im talking shit about myself lmfao
tanku i could show you i am whacker than you
if if if if
yes it was literally if else statements within each other
?paste
man idk if we wanna go down the path of insulting ourselves lmfao
much fun at raging Tanku :)
ever heard of switch statements
oh boy
thats where i am dumb
Where did yall learn
seems like something i would do tho tbh
google, videos, documentation
A lot of people learn by dissecting open source projects
w3schools.com ๐
almost everything from youtube lmao
youtube too
well tanku lets hope my config works, if not...
IT WORKS YAAA
10 Hours just changing strings...
uhmmm idk
about a half year maybe? then i started spigot
now i am so good, i coded a plugin that communicates with my discord server
and if i can do that, you can too
but you need time
thats all
thats impressive
Java is designed to not be complicated
really the whole point of Higher abstracted languages
all i've done is code a new permissions system, highly configurable and (hopefully) user-friendly
although now im screwing with nms
Java is designed to not be complicated
and people are still struggling with it ๐ค
you will struggle with anything if you don't bother to learn the basics
can't learn advanced stuff without them
A lot don't bother to read the javadocs ._.
all i've done is code a new permissions system, highly configurable and (hopefully) user-friendly
although now im screwing with nms
@tiny pebble NMS...i would really like to make a pvp bot... but i never will touch nms
can Player#setResourcePack take a local file location or only takes a website link?
i feel you
i've made it so there is a player entity that can be damaged and just... chills there. exists. thats it. cant get them to move.
website link, or i think it can use a server-file
well you see frostalf
you don't need game profiles if the player isn't real you know ๐
oh great how would i reference the server file one though
just get the default directory or what?
i want them to basically work just like creatures, I want them to have the ability to use pathfinders
but i can't do that since they don't extend EntityCreature
well place the pack somewhere, and load it from its placed path i think
idk how Server-resourcepacks works
create a custom Player class that extends that @tiny pebble
hmm
so implement Player extend Creature ๐
Couldn't you just... y'know, spawn a Zombie and Disguise them as a Player?
That's a Zombie disguised as a Player
Shows attack animation and everything
yeah i was thinking about doing something like that as well
but how do i disguise them lmfao
Packets
libs disguise api
or use a disguise api ^
if u use an api use libs
guys
i have a hashmap with a player, and Concrete as value
every player has another color in the map.
how can i now check, if a player stands on a concrete-line, that is not linked with himself?
concrete line?
wait
coding "snake", everyone has its own line
i want to kill the player, if he stands on a line of another player, or his own line
ima try to do it with packets
use the playermoveevent to get the block below the coords they are moving to
yeah i know thats not the problem
then the player cannot stand on ANY concrete anymore
stuff a hashmap in your hashmap. First one associates concrete to locations, second hashmap associates the players with the hashmap of concrete
ehmm
so the Value of the hashmap for players is UUID of the player for the key or name, Value is HashMap<ConcreteMaterial, Location>
think I had that other one backwards lol
@tiny pebble ProtocolLib with the wrapper, https://paste.md-5.net/ulajiyoret.cpp
should be HashMap<Location, ConcreteMaterial>
FakePlayer(player).build()
well i just disable concrete...is easier
so the second hasmap has a key of location and associated with it is the concrete block/material
You'll have to edit it to show it for other people
and concrete isnt a block like dirt, where you stands-on so often
oh sweet, thank you so much!
๐
not sure what that has to do with tracking it to know if a player stands on another players line of concrete @tough kraken
i think i cant follow you
well wait... on start, every player gets linked with an sort of concrete... cant i add them to a simple ArrayList
and then just check if the block , the player stands on is in the list
would be easier
@quick arch
net.prosavage.yarpg.utils.packets.wrapper
Where does this part exactly come from ๐ค
I know it isn't directly from ProtocolLib but if it is some sort of wrapper for it I dunno where to look lol
oh, it's from my plugin
ohhhh i see
you can change it to the PacketWrapper's imports if you want
Alright haha, sorry didn't realize
thanks
Probably should just shade in the classes one by one (like I did)
cause no one's going to fully use the PacketWrapper
or you could shade with maven and turn minimizing on
in maven-shade-plugin configuration <minimizeJar>true</minimizeJar>
if you only use one wrapper it will just shade that one
Will this recursively search for classes that my used classes depend on?
Ye
Ah nice. I was just searching for something like this.
What's a good introduction to maven using Eclipse? I normally just export, but everyone says maven is better
SQL question, if I use ResultSet result = statement.executeQuery() followed by if(result.next()) that'll get the first occurrence correct?
cant you just use SELECT TOP 1 FROM <DATABASE>?
@grim halo never knew about TOP lol, but from what I just read it should work! thanks
how is this d ```java
char c = '1' + '3';
System.out.println(c);
@tough kraken yes you can do it that way if you want, just the hashmap method allows for faster comparison/lookup
char indexes dont start at 0 for a
if you are wanting the numbers for characters you might want to use codePointOf() instead
ok so i'm making a vanish plugin and the bit that hides the player is a method in the main class. since you can't use static how would i use the method in a class other than my main.
public void showPlayer(Player player){
//Loops through all online players, unvanishng the player.
for(Player people : Bukkit.getOnlinePlayers()) {
people.showPlayer(this, player);
}
}
pass a reference of your plugin to the other class
so that the other class can get the methods from the main class
how do i do that
@vapid zodiac Dependency injection or Singleton design
Pass a reference of your main class instance to your target class that contains showPlayer
Oh i see.
public class Main {
public void onEnable() {
new Something(this);
}
public void doSomething(){}
}
public class Something {
private Main plugin;
public Something(Main plugin) {
this.plugin = plugin;
plugin.doSomething();
}
}
I think you should at least learn the basics before you get into Spigot programing but ill show you an example.
I use main as an example, please don't actually use it for your class names
is my example not good enough @grim halo ? lol
If you have no idea whats all this you need to get the absolute basics first.
for the
Vanish someInstance = new Vanish(this);
it says it expects 0 arguments in the arguments for new Vanish()
Then create a constructor that accepts an instance of your core class
whats that
Pls... Only the basics of Java. You wont get anything done. Learn the basics and the rest comes naturally.
ok
Its not that much. One week and you can switch to spigot and improve there.
hi
hi...
sure...
Anyone knows here if the plugin ClearLagg should clear hoppers or pistons (placed not dropped) because in my server that keeps happening
yes it does, that's why it's a shitty plugin
it also gets rid of tamed npcs lol
use a stacker, not a clear lag plugin
Thank you!
%EF%B8%8F
Ok
Hi
hi
public void onBlockBreak(BlockBreakEvent event) {
int percent = 99;
double calcPercent = percent / 100;
Block b = (Block) event.getBlock();
Player p = (Player) event.getPlayer();
Material m = b.getType();
Location centerOfBlock = b.getLocation().add(0.5, 0.5, 0.5);
if (m == Material.MOB_SPAWNER) {
ItemStack itemPickaxe = p.getItemInHand();
if (itemPickaxe.getType().toString().toLowerCase().contains("pickaxe")) {
if (itemPickaxe.containsEnchantment(Enchantment.SILK_TOUCH)) {
if (Math.random() <= 0.99) {
final EntityType type = ((CreatureSpawner) b.getState()).getSpawnedType();
b.getWorld().dropItemNaturally(centerOfBlock,
(ItemStack) b.getWorld().dropItemNaturally(centerOfBlock,
new ItemStack(Material.MOB_SPAWNER, 1, type.getTypeId())));
}
}
}
} else {
p.sendMessage("Lol chelou");
}
return;
}
```
I want to get the spawner that the player break
But actually i have everytime a normal pig spawner ๐ฆ
what version is this
1.7.10
well
I hope the plugin does not stack villagers tho
well im not too sure but i can help debug this a bit
try to give the player new ItemStack(Material.MOB_SPAWNER, 1, EntityType.CREEPER.getTypeId());
and see if that gives a creeper spawner
actually wait hmm
hmm
why do you have two nested dropItemNaturally
that doesnt make much sense
(ItemStack) b.getWorld().dropItemNaturally(centerOfBlock,
new ItemStack(Material.MOB_SPAWNER, 1, type.getTypeId())));```
instead of b.getWorld().dropItemNaturally(centerOfBlock,new ItemStack(Material.MOB_SPAWNER, 1, type.getTypeId()));
not even sure why it lets you cast Item to ItemStack
...ok
does anyone here made a scoreboard and released it online
@unborn jewel I used this tutorial when I was learning, it was very helpful and all you need to do is figure out how often you want to update it. https://www.spigotmc.org/wiki/making-scoreboard-with-teams-no-flicker/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I suggest you read the tutorial first. It goes over how to set everything up besides updating it with a scheduler.
How do I build/export a project in IntelliJ (i'm using maven)?
You have a panel on the right side?
yessir
Frog
File > Project Structure > Artifacts @graceful vigil
how come im getting board cannot be resolved
Lifecycle -> install is the simplest way.
at Team onlineCounter = board.registerNewTeam("onlineCounter");
Just doubleclick install. If you want to clean before compiling: clean -> install
wait
I don't have the lifecycle option
@unborn jewel I meant all of your code. If that is truly all you have you never created a scoreboard.
Do you have this stuff?
@unborn jewel Please read the tutorial fully... Team onlineCounter needs to be within your setScoreboard method otherwise the plugin has no idea what "board" is. You also never called the setScoreboard method and/or even assigned it to a player.
oh sorry
My recommendation is add the scoreboard onJoin using PlayerJoinEvent and then learn about schedulers to figure out how to constantly update it every x seconds.
I mean it will update the first time you send the player the scoreboard. Create a new method to update the scoreboard I've seen a lot of tutorials suggest to just call the setScoreboard method over again and, in my opinion, that is terrible practice.
how would i add it on join
like this
@EventHandler
public void onJoin(PlayerJoinEvent event) {
setScoreboard(event.getPlayer());
}
```` ?
It depends what is in your setScoreboard and start events
Guys
you also have to make sure you register that event
Is there a command to check a world for a specific block?
Frog wym
send a paste of your updated setScoreboard method
I read over it quickly, but I think it should work your only problem is a) you never registered your event in onEnable and you never called updateScoreboard so therefore your scoreboard will never update.
iirc, stuff like that inside of JoinEvent is basically asking for oddball issues
ok
@wet bronze What do you mean check a world for a specific block? You mean a location?
so how should i add it to onEnable
wait
i got an idea
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
if(Bukkit.getOnlinePlayers().isEmpty())
for (Player online : Bukkit.getOnlinePlayers()) {
setScoreboard(online);
}
}
like that?
don't set the scoreboard onEnable
Also you miss a '!'
yes you do...
First of all you dont need a condition check there
@unborn jewel do you know any java?
if I needed a ! i would of put it but i don't
Then you can delete everything but the first line because its obsolete.
Your logic:
If no player is online -> add scoreboard to every player online
...
it won't show up because your code right now is doing what 7smile7 just said! If no players are online, give all players online a scoreboard
@unborn jewel I'm sorry, but no one is going to spoon feed you the code. I highly suggest if you need more practice with Java Youtube some videos. If you feel confident in your Java knowledge than Youtube some videos on the Bukkit/Spigot API. You can also refer to the documentation https://hub.spigotmc.org/javadocs/spigot/index.html
package index
im on 1.8
Did you import craftbukkit and check if the method exists?
yes
if it was sent when you said its already been looked at
what was the subject or email
I don't do DMs
or the subject line
uh
@brave vector did you make sure to run the server on 1.16.1?
if youre not comfortable discussing it here then just resend the email
because there are no unhandled emails as far back as you suggest you sent it
yeah that was replied to
@wet bronze What do you mean check a world for a specific block? You mean a location?
@grim halo Yeah I want to check my entire map for chests and their locations.
2 July
this work
@wet bronze You cant do that with a command. But you can write code that does it for you.
idk
Uhh I've never coded before.
@wet bronze What version are you on?
1.16.1
[06:04:47 WARN]: [HubScoreBoard] Task #73 for HubScoreBoard vBETA generated an exception
java.lang.NullPointerException
at me.jtx.hubscoreboard.Main$1.run(Main.java:69) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:352) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:783) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [patched.jar:git-PaperSpigot-"4c7641d"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
https://minecraft.gamepedia.com/Commands/testforblock , but you need to know the coords.
No the point is that I need to find chests throughout every single block on my map.
Underground and in the sky
And it's a 40,000 x 20,000 map
Then ill write you a quick command that does it for you.
Ill write the locations in a txt file.
Be aware that depending on your map size this could take a while.
Then it will take some days.
Christ
why do you need to know all the chest locations
it'll be handled in order with the rest of the emails now
please i need help here https://www.spigotmc.org/threads/commands-not-working-after-i-restart-server.451726/ its a lot of text
Did you try to stop the server and the start it back up? Thatโs my only guess. Instead of /reload
thats what breaks it
Using the PlayerInteractEvent, how do I replace what the player has in their hand with another ItemStack?
Player#getInventory#setItemInMainHand
you might be able to alternatively use PlayerInteractEvent#getItem#setType
getHand tells you the hand if you want to allow offhand interactions
thank you ๐
please i need help here https://www.spigotmc.org/threads/commands-not-working-after-i-restart-server.451726/ its a lot of text
so everything was working before i restarted the server then i restarted it and it stopped working
it's null
you're getting a world from a string
that world isn't loaded
check that the world exists
before using it to teleport
how do i check if it exists?
learn java
World world = Bukkit.getWorld(name);
if (world != null) {do stuff}
^
ill try it now
it no longer gives an error but it does not teleport you there, do i need to load the world of something?
@brave vector
https://hastebin.com/ put your code in here
my new code?
yes
repalce
Location lock = new Location(Bukkit.getWorld(visituuid), 0.5, 95, 0.5);
player.teleport(lock);```
to
World world = WorldCreator.name(visituuid).createWorld();
Location lock = new Location(world, 0.5, 95, 0.5);
player.teleport(lock);```
Your welcome
Guys, in my server players can't pickup items sometimes. It doesn't work for me too if I am in survival mode
It fixes if we open any chest or any other GUI
List plugins?
May be CMI
Im trying to check if the players uuid is in the config but it keeps saying the uuid is not in the config but when i check it, its in the config
Code inside the command
tring visituuid = Bukkit.getOfflinePlayer(args[0]).getUniqueId().toString();
if (getConfig().getStringList("Players").contains(visituuid)) {
World world = Bukkit.getWorld(visituuid);
if (world != null) {
player.sendMessage("Teleporting you to " + args[0] + "'s cell!");
WorldCreator.name(visituuid).createWorld();
Location lock = new Location(Bukkit.getWorld(visituuid), 0.5, 95, 0.5);
player.teleport(lock);
}
}
Did you config contains it?
its in the config, i checked
if you add it manually you should reload first
May be CMI
@brave vector I had CMI from starting and it didn't affect anything
its added buy this code
String uuid = player.getUniqueId().toString();
getConfig().createSection("Players." + uuid + ".size");
getConfig().createSection("Players." + uuid + ".perms");
getConfig().set("Players." + uuid + ".size", "1");
saveConfig();
Also this problem was after I changed my server version from 1.15.2 to 1.16.1
ok
try (getConfig().getConfigurationSection("Players").getKeys(false))
Also this problem was after I changed my server version from 1.15.2 to 1.16.1
@cold wharf --forceUpdates?
do you have any backup
gtg ill try tomorrow
Infact I started from scratch
removed everything?
yes
try to make a clear server and use all plugin above
try to make a clear server and use all plugin above
@brave vector This all plugins are from my 1.15.2 server
They were not causing any problems there
did you try to remove all data folders?
did you try to remove all data folders?
@brave vector Yes I just shifted the jars and not the data
Try to upgrade it to the latest version
@brave vector Did already
I thought the same before
So I upgraded all of them
But it was still not fixed
Redis pubsub is one way right? I can't communicate back and forth?
My attempt to parse a date is failing. Could someone help me understand why?
Here is the print statement and code
[15-07-2020 01:38:47] Something went wrong parsing timestamp ?f07/15/2020 08:00:00 with pattern MM/dd/yyyy HH:MM:SS
But it was still not fixed
Create your server again from scratch
May be this is the last choice
@rotund orbit try DateTimeFormatter
Does that also require a pattern?
I'll try cutting off the first two characters of timestamp through the return statement of getTimeFormat()
IT WORKED!
That was the last thing I needed to know my Food Spoilage system would work. Thank you @brave vector!
np
try {
DateTimeFormatter formatter =
DateTimeFormatter.ofPattern("MMM d yyyy");
LocalDate date = LocalDate.parse(input, formatter);
System.out.printf("%s%n", date);
}
catch (DateTimeParseException exc) {
System.out.printf("%s is not parsable!%n", input);
throw exc; // Rethrow the exception.
}```
that is the correct way to do it
and if you want time zones
ZoneId leavingZone = ...;
ZonedDateTime departure = ...;
try {
DateTimeFormatter format = DateTimeFormatter.ofPattern("MMM d yyyy hh:mm a");
String out = departure.format(format);
System.out.printf("LEAVING: %s (%s)%n", out, leavingZone);
}
catch (DateTimeException exc) {
System.out.printf("%s can't be formatted!%n", departure);
throw exc;
}```
Can someone tell me what I've done wrong here? I'm trying to get a Player object from a String
your offlineplayers loop is unnecessary
you can instead just specifically get a specific offline player
but technically it should still work right?
technically it should, but that is assuming they are in the list
I would recommend maybe not using the static method though
well it's not and the player I'm trying to get has definitely joined the server
which could probably be throwing it off
try passing a reference to your main class and instead do plugin.getServer().getOfflinePlayers();
ok I'll try that
yeah that is the other thing
when getting offline players should use the UUID's instead
player data files are saved with the UUID
Create your server again from scratch
@brave vector As I said I started from scratch
but that UUID fetcher class isn't necessary though
True, but it works lol
@brave vector As I said I started from scratch
ik but i can't do anything else for you, sorry
It's okay thank you for trying
I did plugin.getServer() and it's still not working, apparently my OfflinePlayers[] is empty because it nullpointered
What's the difference between Material.POTATO and Material.POTATOES?
You can parse usercache.json
@rotund orbit The former is the item (which you can eat and cook) and the latter is the block (which grows)
ah thank you
What is the event for when a player picks up an item?
ah PlayerPickupItemEvent should've googled my bad looks like its deprecated
Is there another event I can use besides PlayerPickupItemEvent?
can i ask for something not related to spigot?
gonna try to use ItemSpawnEvent instead
EntityPickupItemEvent
@rotund orbit
ahhhh thank you
if you only want the player just need to do
if(event.getEntity() instanceOf Player)```
for your check
I want to get and set the item
Not sure I can use EntityPickupItemEvent for that but I believe I can use ItemSpawnEvent
yes you can
declaration: package: org.bukkit.event.entity, class: EntityPickupItemEvent
event has getItem() ๐
it worked! ๐
I don't think it had setItem()
I appreciate the help though thank you @keen compass
even if it doesn't have it, you could still do it
It turned out I was mistaken and it did not work ๐ฆ I can't seem to remove the '?f'
https://discordapp.com/channels/690411863766466590/690470011382267904/732865626884014181
oh wait maybe it should be mm:ss that was not it
I managed to remove the '?f' and I believe it is working now ๐
How do I get and set an item when it gets smelted in a furnace?
I think it is the FurnaceBurnEvent, I was using the FurnaceSmeltEvent
It looks like I can only get the fuel, not the item being burned...
FurnaceSmeltEvent?
There is FurnaceSmeltEvent, FurnaceBurnEvent and FurnaceExtractEvent
Smelt event gives you the item being smelted, burn event gives you the item being used for fuel and extract event gives you the resulting item
Thank you guys ๐
The smelt event appeared to only let me get the block, not the item.
Are items considered blocks when they're in a furnace?
hi
Guys
I have an question
strings:
already-banned: '&c%player% is already banned!'
ban-check-message: '&4%player% is banned!%NL%&cBan issued by: &6%banned-by%%NL%&cBan
length: &6%ban-length% %NL%&cBan reason: &6%reason%'
ban-exempt: '&c%player% is not bannable!'
ban-message: '&4You have been banned!%NL% %NL%&cBan issued by: &6%banned-by%%NL%&cBan
length: &6%ban-length% %NL%&cBan reason: &6%reason%%NL% %NL%&cYou may appeal on
our site if your ban is permanent.%NL%&bhttp://mywebsite.com/unbans'
default-perm: '&6Forever'
default-reason: '&6None'
expired-ban: Ban expired!
no-time: '&6None'
player-not-found: '&cPlayer %player% not found!'
player-not-banned: '&c%player% is not banned!'
perm-banned-notif: '&6%player% &cwas permanently banned by &6%banned-by%&c.%NL%&cReason:
&6%reason%'
temp-banned-notif: '&6%player% &cwas temporarily banned by &6%banned-by%&c for &6%ban-length%&c.%NL%&cReason:
&6%reason%'
unban-notif: '&6%player% &cwas unbanned by &6%unbanned-by%&c!'```
How can i do that so if player is op can't be banned ?
well, it's probably in another section of the config.yml file, not a strings section of a config.yml
player.isOp()?
Can someone explain me wtf is this error about? https://pastebin.com/PKygthR6
Looks like some protocolAPI error.
How can I return nearby entities Sync? Because I am calling this from async context:
https://i.imgur.com/oqsksyD.png
Looks like some protocolAPI error.
@grim halo
I have ProtocolLib
Is it because of that?
@tacit trellis What exactly are you calling async and what do you want to return/use sync
I want to get the list
@cold wharf Make sure you have the latest version
@tacit trellis So you call this method async?
yes
but getNearbyEntites only works sync
or i get this Caused by: java.lang.IllegalStateException: Asynchronous getNearbyEntities!
You need to synchronize with the mainthread. For example with the BukkitScheduler
I tried but I cannot return the list with a scheduler
You can not call API methods async
Most API methods*
is there not a way to call that method sync?
Scheduler, as was said
Show me how you call the method and i might write you an example on how get a usable return value.
thats not working for me, I know its wrong: https://i.imgur.com/nnH4Shs.png
k?
@cold wharf Make sure you have the latest version
@grim halo Latest version of?
Hi, when i die i keep getting "You don't have a home bed or a charged respawn anchor, or it was obstructed." but my friends don't get that message when they die, is there a way to fix this?
edit: i dont have a bed or a respawn anchor
i think it is a bug because i tried recreating it in a single player world and i couldn't
I have problem with nametagVisibility (its set to Always), the prefixes wont showing up above player heads Im running spigot 1.16.1 connected to bungee anyone know what might cause this?
how tf does this make any sense?
o
wait I think I just realised the issue -_-
yup
I'm just a dumb %ยฃWยฃ
anyone knows how to fix this i updated frm 1.15 to 1.16
Hello when i write /hub in chat
say me "You do not have permission to exectue this command!"
Anyone can help me for solve?
@frigid ember Just let the server run for a while, it'll clear out and stop appearing.
can anyone help me download and use bungee cord
@frigid ember Just let the server run for a while, it'll clear out and stop appearing.
@bold anchor ohh thanks
how do i download bungeecord for mc
Google it.
trying
Use velocity tho, it's the new thing.
ok
helo
can anyone help me?
with what
im tryna compile a git project
Eclipse probably has a gradle plugin.
but its not showing the build folder
Did you run ./gradlew build ?
it keeps bringing me to this https://ci.md-5.net/job/BungeeCord/
Yes.
jantruck im compiling it through eclipse
ty
it downloads bungeecords latest version
im trying to set a server with the main as paper mc
main?
like
you mean you want the main server to run paperspigot?
the hub
you want the hub to run paperspigot or what
ye i understand but what do you mean by paper
paper mc is a server
Hello when i write /hub in chat
say me "You do not have permission to exectue this command!"
Anyone can help me for solve?
wdym
ye
1 sec aura
ok
@opaque swan go into console and do /op <your ign>
BungeePlugins?
alright aura
Just setup the paper server for bungeecoord just like you would for spigot.
no i think
they mean
they wanna name it paper mc
your gonna have to play around with bungee yourself for a bit
then what
I'm op but say You do not have permission to execute this command
@opaque swan what plugin do you use for the /hub command
SIMP no, Paper is the name of the fork.
ah
Nothing Simp
.... What?
ok so
you are running a /hub command
you say theres no plugins
so im guessing youre using bungeecord?
Yes.
i need help how i can prot my spawn from the players
who have plugin for that
@golden perch You can make the spawn protection higher or make eventss that cancel if they take place in certain locations
W o r l d g u a r d
^
Worldguard + Worldedit
@visual kiln you don't help me
man worldguard its hard
you say me all useless things
@opaque swan i cant help you if youre being so vague about your issue
What do you mean it's not work
the pvp not work
ok i safe the spawn
Just a quick question, how would I ckeck if a player is holding an item in therir incventory and clicking on another item with a item?
and when i jump
what?
just use worldguard, define spawn region, and apply flags as you see fit
When i'm on my servers when i type /hub say i don't have permission for do it
How i can fix this?
This problem came out when i install BungeePerms but i remove it
And set spawnProtection to 0 for the love of god....
any1 know how to compile in eclipse?
@opaque swan there is a plugin in your bungeecord proxy that takes care of the /hub command, you'll need to add the permission for that command into the default group
(if you want everyone to use it, that is)
Ok thank you
hello there
Where i can modify it Fefo?
In bungeecord's config.yml
there's a part that's something like this:
permissions:
default:
- ...
- ...
In that list, you add the perm node for the plugin that lets you use /hub
permissions:
default:
- bungeecord.command.list
admin: - bungeecord.command.server
- bungeecord.command.alert
- bungeecord.command.end
- bungeecord.command.ip
- bungeecord.command.reload
- bungeecord.command.hub
ok?
ok
which plugin did you install to use /hub?
Nothing i think
FlameCord is a plugin?
Yes
Wasn't it a bungeecord fork
If you installed none, then it should say "Unknown command. Type "/help" for help."
Unless you installed a plugin for /hub in the spigot/paper servers
I wouldn't know about that, I have never used that plugin
Its bungeeAuth thank you
I don't think BA has a /hub command...
there's /lobby lol
permissions:
default:
- bungeecord.command.list
admin:- bungeecord.command.server
- bungeecord.command.alert
- bungeecord.command.end
- bungeecord.command.ip
- bungeecord.command.reload
well, in that list, under the default entry add- auth.lobby
sounds like an offline server
go into the bungee server
and op yourself there
or is that not how it works lmao
@visual kiln no that's not how it works lol
Ok thank you
sounds like an offline server
@subtle blade Hypixel is not an offline server and yet staff uses 2fa ๐คทโโ๏ธ
Do you expect anybody to be the next Hypixel? Because I most certainly don't
99 times out of 100, anybody using an authentication plugin is running an offline server
Do you expect anybody to be the next Hypixel?
lol hell no, but there's always that 1 in 100
Especially considering that plugin literally has a command to toggle an account between cracked and premium mode
Hey! Since when I give an enchanted book a cvustom enchantment, for some reason it doesn't work when you try combining it in an anvil, so I 've decided to use a separate method where I check if the book with the enchantment was clicked on an item in the inventory though for some reason, itemStack and itemStackSlot are the same, does anyone know how I could get the other item? Here's what I have so far: https://hastebin.com/igisehupuc.cs
getCurrentItem is the item you're "pointing" at, the one the cursor is hovering over
the one the cursor is currently holding is getCursorItem
Ohh ok thanks!
np ๐
Can someone confirm whether or not this is an issue with the server being able to connect to my MariaDB database?
[09:34:07 ERROR] [LiteBans]: Failed to connect to [jdbc:mariadb://localhost:3306/litebans;useSSL=false&serverTimezone=UTC] using mariadb driver.
[09:34:07 ERROR] [LiteBans]: Error: Failed to initialize pool: Could not connect to address=(host=localhost)(port=3306)(type=master) : Socket fail to connect to host:localhost, port:3306. Connection refused (Connection refused)
[09:34:07 ERROR] [LiteBans]: Cause: Could not connect to address=(host=localhost)(port=3306)(type=master) : Socket fail to connect to host:localhost, port:3306. Connection refused (Connection refused)
[09:34:07 ERROR] [LiteBans]: Cause: Socket fail to connect to host:localhost, port:3306. Connection refused (Connection refused)
[09:34:07 ERROR] [LiteBans]: Cause: Connection refused (Connection refused)
It is a connection problem yes
It's happening to all plugins that have a database to connect to or sockets to connect to. We tried disabling firewall and nothing changed
hello
It's happening to all plugins that have a database to connect to or sockets to connect to. We tried disabling firewall and nothing changed
Are you on windows or Linux?
Linux
is your MySql Service started?
ok
Anyone know where I can get in touch with protocollib devs? their maven builds are broke
It's started yeah^^
!paste
is your MySql Service started?
Yeah, it is
We'll try that
i got the same problem with Skin Restorer
and i solved it with 127.0.0.1
Because localhost is Unix Socket
why use skin restorer? :/
you only have to use it when you set up your bungeecord like shit
It's doing the problem on sockets using specific ips too, not just localhost
[10:07:46 ERROR] [LiteBans]: Failed to connect to [jdbc:mariadb://127.0.0.1:3306/litebans;useSSL=false&serverTimezone=UTC] using mariadb driver.
[10:07:46 ERROR] [LiteBans]: Error: Failed to initialize pool: Could not connect to address=(host=127.0.0.1)(port=3306)(type=master) : Socket fail to connect to host:127.0.0.1, port:3306. Connection refused (Connection refused)
[10:07:46 ERROR] [LiteBans]: Cause: Could not connect to address=(host=127.0.0.1)(port=3306)(type=master) : Socket fail to connect to host:127.0.0.1, port:3306. Connection refused (Connection refused)
[10:07:46 ERROR] [LiteBans]: Cause: Socket fail to connect to host:127.0.0.1, port:3306. Connection refused (Connection refused)
[10:07:46 ERROR] [LiteBans]: Cause: Connection refused (Connection refused)```
same issue
hey guys Im running 1.16.1 spigot server connected to bungee and I can't see the nametags I tried to "decompile" scoreboard.dat and here is the result https://prnt.sc/tice2l
this is database issue i suppose
I am waiting like half an hour on that spigot irc chat thing. No-one answers there. Atleast here is someone willing to help with my issue? I got a spigot 1.16 server, with bungeecord enabled. When i click to join the server i get kicked with reason outdated version but bungee's version is the latest. + On console i only see an initial handler has pinged spamming and then the server auto restarts.
use 7.0.4-SNAPSHOT
Is teleporting thread safe?
No but there is a library can do this
Lets say I am listening to packets and already am in an async context, do I need to switch threads for this?
Do I need to schedule it sync
Like in an anticheat to lagback
That is my config btw if u spot any issues https://paste.md-5.net/mewukogocu.makefile
JustMango did u told about the snapshot to me?
let me try
@frigid ember
7.0.0 won't work either
i get kicked with reason outdated version
@delicate nymph maybe try joining the server with the proper client version? unless you're using ViaVersions or ProtocolSupport, you must join with the client version that matches the server
remove .m2 cache
whats .m2 cache?
you can change this to 127.0.0.1
@brave vector that would just break it unless the server is hosted locally....
N
may be the connection to the local server got broken?
.m2 is your local Maven repository
i have tried the public ip and the firewall block it :|
All dependencies pulled from Maven or files that have been locally installed are thrown into your .m2 directory so Maven doesn't have to fetch them every single time
I can send my whole POM.xml
C:\Users<User>.m2\repository
Greetings. I have a question that's not directly related to plugins- Were the spigot forums created from scratch, or was there any kind of page that helped in the creation of the forums?
or ~/.m2/repository
I am not using the ViaVersions nor protocol, server on 1.16, client also on 1.16 + as i said on console the only thing i see is this: https://pastebin.com/5h7kUP52 and the initial handler keeps spamming. No worlds are loading, nothing. (When i disable bungeecord i join the server with no probs). I believe its or jar issue or config side.
placeholderapi
?
just read the docs
or on featherboard MvDwPlaceholderAPI
kb
oof
= kiteboard i suppose
JustMango i did change the ip as you said, but i got the fallback server error, and the default fall back server is true as u saw
I changed it back to false just in case but same fallback error
can't find default fallback server?
yes
u must change the ip in backend server too
but the 127.0.0 isnt my server ip, should i change to that too ?
put the 127.0.0 on the fallback
127.0.0.1 point to the local machine
i usually use that to protect my backend server because i disable the online-mode
That's your first mistake
again the fallback error
On console i see only this: https://pastebin.com/5h7kUP52 and the initial handler keeps spamming then a restart follows. Server is not loading at all other than what you see on the pastebin. My bungee config is this with the ips changed as JustMango said: https://paste.md-5.net/wijutozefi.makefile
Because i didnt try to connect this time
but i get this
[KotsosTrela] disconnected with: [0;31;1mCould not connect to a default or fallback server, please try again later: io.netty.channel.AbstractChannel$AnnotatedConnectException
with the old config (https://paste.md-5.net/mewukogocu.makefile) i was getting "outdated version 1.7.10" and the server actually is on 1.16 with latest version bungeecord
The spigot server being on 1.16.1 and your client too? ๐ค that's odd
try enable ip_forward
Yes version is 1.16. When i disable bungee i can connect normally
Plugins are made with JavaScript right?
i try that now mango
No, they are made on Java
so that I learn the right thing
I am doing a JavaScript course
what
NooO
Whats the difference
Java and JavaScript are two completely different things
ohw
Bukkit based on Java
With ipforward i get again the fallback error
@delicate nymph leave ip_forward set to true and change the IP back to 5.whatever
but everyone like to call it js
who knows a good java course
google?
everyone asking about course but they have never taken it seriously
and a lotta sites
I will
I want to be a programmer
as job
I am 13 now
I want to learn it
I'm 14
you guys make me feel old .-.
almost everyone in here are older than 15
but wich one is the best
learn basic then learn advance
I would recommend reading https://www.tutorialspoint.com/java/java_quick_guide.htm. But keep in mind that you need to test things yourself and experiment with different easy programs yourself
do you know java well @brave vector ?