#help-archived
1 messages ยท Page 197 of 1
how can I use them to prevent piracy
you plugin is going to get cracked anyway ๐คทโโ๏ธ
You cant prevent it. Just deter.
yes but it might help so I would like to know
Is it okay if I talk about MongoDB here?
yes
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.
I am trying to connect to MongoDB but the MongoClientURI just doesn't work for me idk why
do they use get methods to see if the license key is valid
make sure you have the mongo dependency added
make sure you have the mongo dependency added
@bronze acorn I have added them
<!-- https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver -->
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.12.6</version>
</dependency>
@cold wharf Do you have the req dependencies`?
then reimport with maven
yes
full main?
if (CheckFile = new File(getDataFolder(), args[1] + ".yml").exists()) {
File file = new File(getDataFolder(), args[1] + ".yml");
FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
int MemberCount = cfg.getInt("members");
sender.sendMessage("Members on the faction " + args[1] + ":" + MemberCount);
}
}```
Ok thanks, running build tools again
you mentioned errors earlier
im just checking if theres a file named arg[0]
yeah ok
i dont think it matters but have YamlConfiguration cfg instead
and
hm
oh
i know why
show me your config
no show me it though
leaders: dfac08af-af88-42ff-8509-8f441bca858b
members: '1'```
then reimport with maven
@bronze acorn That worked
ronsiv
Thank you so much\
๐
thats not how it works
what
why not
you're not setting a string
the '1' makes it a string
you need an int
members is generated using a variable
show the method where you write the number
so remove the apostrophes
i didnt do that
wat
you're already setting it as an int
into the config
before you set it as a string
after you changed it you never changed
members: '1'```
to
members: 1```
FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
cfg.set("faction", args[1] + "");
int membercount = 1;
cfg.set("leaders", p.getUniqueId() + "");
cfg.set("members", membercount);```
the first one still sees it as an int
......
there's apostrophes around the 1 making it a string
its a variable
oh
lmao its fine
Hello, i tried use this librairies (https://github.com/Arnuh/ArmorEquipEvent) for my plugin but i have a error ine console
yup
@tawdry fable
add the ArmorEquipEvent plugin
into your plugins folder
welcome back!
anyone know why is says error item is not a potion when i try and create a kit with essentials Plugin
no
it's prob not a potion?
Hello. How can I edit this?
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (label.equalsIgnoreCase("commandtest")) {
World world = sender.getServer().getWorld(sender.getName());
double x = 0;
double y = 0;
double z = 0;
Entity entity = null;
if (sender instanceof Entity) {
entity = (Entity) sender;
x = entity.getLocation().getX();
y = entity.getLocation().getX();
z = entity.getLocation().getX();
}
HashMap<String, String> cmdparams = new HashMap<>();
int[] index = {-1};
Arrays.stream(args).forEach(param -> {
if (index[0] >= 0)
cmdparams.put(Integer.toString(index[0]), param);
index[0]++;
});
{
Map<String, Object> $_dependencies = new HashMap<>();
$_dependencies.put("entity", entity);
$_dependencies.put("x", x);
$_dependencies.put("y", y);
$_dependencies.put("z", z);
$_dependencies.put("world", world);
DfrProcedure.executeProcedure($_dependencies);
}
return true;
}
return false;
}
}```
The "weird" code is only to be able to use everything in another class.
@cold pebble
try
Player player = (Player) sender;
player.getWorld()```
instead of sender.getServer().getWorld(0
that's some weird stuff
lol
@frigid ember what do you mean tab header and footer? This thing is on server list page once I ping the server
Its bungeecord
O
forge
top: my server
bottom: hypixel
doesn't the "V" mean that the server allows for forge users
that icon shows whether server supports forge or not
yes, xDark, but how do I make it not show I use FML compatible server
Hypixel did this
Remove fml handshake stuff
can I do this without editiing bungecord source?
Yes
is there a handler for it or smth?
I did disable already
Is there any way to go above max size for inventories now?
You used to be able to go 7 rows for inventories which gave a nice solid bottom row
nope.
Thank you @bronze acorn. It works.
anyone know how to add funds to someone using essentials plugin
funds?
ye goldorion ๐๐ฝ
WHen does spigot verification bot reload the DB cuz i wanna verify my new DC account for my spigot server but the old spigot got banned from DC so im stuck
you prolly just gotta rejoin ๐คท๐ฝโโ๏ธ
my old DC is banned
no
DC from DC
so I made new Marcelektro on DC
not #9366 but #3413
idk if it is, its banned
and deleted user
its already banned, on my (old) discord servers where the banned discord account was owner, it is deleted user <some letters> and on not my own servers its not even a member of it.
3 days ago xd
or 2 days ago
There is a plugin https://www.spigotmc.org/resources/โ๏ธ-bungee-advanced-proxy-supports-1-7-1-16-fake-players-random-players.69307/
This plugin does allow you to change the ICON (the green v of Forge FML or V of vanilla)
its in config.yml of this plugin
So there must be a way to change the icon without modifying the src code of bungeecord.
xd he deleted his message XDDD
xddddddddd
Yeah youre right i made a mistake
cant admit it?
sorry for admiting a mistake
jeez
I'm fine with that
idk how does this stupid icons work tho
ikr about this event, im coding a motd plugin for my server, and i wanted to add this icon thingy to it. Also, ill try the protocol field. thanks for the help so much
Hi, I have a question aboud bungeecord. I have a custom server and I want to redirect players to another server with packets. Like that bungeecord hook in the authme plugin
@kind crow Do you mean send a player to another server on the proxy?
@frigid ember yes
i need help im stuck and cant move because i accedantly jailed my self how can i unjail
/unjail nick?
lol was going to suggest the same
i tried that
ikr XD
i wonder if it can display custom images
I keep getting this issue when setting a player's item in main hand on 1.12.2, any ideas?
can we see your code?
if (event.getPlayer().getInventory().getItemInMainHand().getAmount() == 1){
event.getPlayer().getInventory().remove(event.getPlayer().getInventory().getItemInMainHand());
} else {
ItemStack temp = event.getPlayer().getInventory().getItemInMainHand().clone();
temp.setAmount(temp.getAmount()-1);
event.getPlayer().getInventory().setItemInMainHand(temp);
}
@kind crow You can use the BungeeCord plugin messaging channel for that.
https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/#connect
@frigid emberthanks
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I am attempting to generate a world the moment a player places a metadata sign, then paste a schematic inside it using the ConsoleCommandSender and WorldEdit to create the lobby. It is an empty world, the class used for chunkdata is as follows.
public class VoidWorld extends ChunkGenerator {
@Override
public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biome) {
return createChunkData(world);
}
}
This generates like normal, but whenever the consolecommandsender attempts to load and paste the schematic at the specified coordinates, it comes up with the error "the world was unloaded and the reference was unavailable" (error log at the bottom of message) that points towards these lines:
Bukkit.dispatchCommand(console, "/schematic load bedwarslobby");
Bukkit.dispatchCommand(console, "/world bedwars" + i);
Bukkit.dispatchCommand(console, "/pos1 " + spawnCoords);
Bukkit.dispatchCommand(console, "/pos2 " + spawnCoords);
Bukkit.dispatchCommand(console, "/paste");
all variables used for the dispatch command are here:
World world = Bukkit.createWorld(new WorldCreator("bedwars" + i).generator(new VoidWorld()));
Location spawn = world.getSpawnLocation();
String spawnCoords = spawn.getBlockX() + "," + spawn.getBlockY() + "," + spawn.getBlockZ();
ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
I assumed the world was loaded upon creation, but I guess not. How would I get this to occur?
PlayerInventory#getItemInMainHand cant be null
hi i need help with seting world guard
A bunch of my world/region/*.mca files were deleted on the server. It's running now and everything appears to be ok, but I'm worried about a server restart. Can I run the 'save' command to re-write all the *.mca files?
hi i need help with seting world guard
there are documentation
ik but i use ultra permission and it doesnt work at all
i asked help from the ultra discord and they didnt replay
Hey I am getting this error when I try to import using maven
java.lang.IllegalStateException: what does this mean
java.lang.IllegalStateException: key must be lowercase
nvm i fixed it now
Hey uh, I can't get restart-script to work correctly on linux.
When I do /restart, it shuts down and doesn't restart at all.
In my spigot.yml, I have restart-script: ./RestartScript.sh.
In ./RestartScript.sh, I have:
#!/bin/bash
screen -S minigames -X stuff './StartServer.sh'$(echo -ne '\015')```
I have confirmed that ./StartServer.sh works fine cause I use it to start the server on the screen all the time.
Restart is kind abroken isn't it
Hmm?
Also, I confirmed that ./RestartScript.sh works fine when run from my terminal and starts the server on the minigames screen.
Would anyone know how to make this work in restart-script?
Your script is wrong, but not at all
I already have the minigames screen up
I want it to run on that existing screen, not make a new one.
the restart script option is garbage and unreliable
nest your server start clause in a while true loop instead
I just did, and I'm trying restart.
the restart script option is garbage and unreliable
@pastel nacelle because of that i prefer to use docker to manager it
https://discordapp.com/channels/690411863766466590/690470011382267904/736269099101061122
Someone help me with this small issue please
It's self explainatory.
It says what the problem is in the error.
And yes, for my problem... I removed the ./ and it still did not restart, only stop.
It says what the problem is in the error.
@stoic shell Talking to me?
yes...
Somewhere, something is targetting and trying to compile for java 5.
hmm?
No I don't see anything about the restart script.
nope
I see this though
?
[19:32:29] [Server thread/INFO]: Attempting to restart with RestartScript.sh
8 I think
@stoic shell try
#!/bin/bash
screen -S minigames -X stuff './StartServer.sh'"$(echo -ne '\015')"
Or
#!/bin/bash
screen -S minigames -X stuff './StartServer.sh
'
Your
pox.xmlfile is fine.
@frigid ember Then what is the matter?
k
?
wdym?
I didn't....
yes
ah
this time I got
bash: /StartServer.sh-ne: No such file or directory
Probably because of the quotes, which made bash not parse the enter...?
if (command.getName().equalsIgnoreCase("reviewlist")) {
if(args.length == 0) {
sender.sendMessage("\u00A7cInvalid Arguments!");
return true;
} else {
int linesPerPage = 5;
int pageNumber = Integer.parseInt(args[0]);
List<?> help = fileManager.getConfig("players.yml").get().getList("Players");
double pageamount = help.size()/linesPerPage;
int totalpages = (int) Math.ceil(pageamount);
sender.sendMessage("\u00A76Review list -- Page " + pageNumber);
for(int i = ((pageNumber - 1) * linesPerPage); i < (pageNumber * linesPerPage) && i < help.size(); i++){
sender.sendMessage(help.get(i).toString());
}
sender.sendMessage("\u00A76Read next page with /reviewlist " + pageNumber+1);
return true;
}
}
This causes an Internal error
@stoic shell yes, try the second one
Players:
2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
Stars: 5
Reason: 'cool '
CONSOLE:
Stars: 5
Reason: 'cool '``` players.yml is like this
and the error is?
alright
NullPointerException
can you show it
Hey?
Your
pox.xmlfile is fine.
@frigid ember What is the issue then?
what's on the line 241
double pageamount = help.size()/linesPerPage;
the help is null then.
alright...
It has this data in config
Players:
2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
Stars: 5
Reason: 'cool '
CONSOLE:
Stars: 5
Reason: 'cool 'Players:
2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
Stars: 5
Reason: 'cool '
CONSOLE:
Stars: 5
Reason: 'cool '
it inputted ./StartServer.sh into the screen
getSection("Players").getKeys(false)
but it didn't get run since enter didn't get sent
I want to get the uuid and then show the stats of the uuids
so the problem must be sending the enter?
try ^M
^M where?
it's an enter symbol.
if (command.getName().equalsIgnoreCase("reviewlist")) {
if(args.length == 0) {
sender.sendMessage("\u00A7cInvalid Arguments!");
return true;
} else {
int linesPerPage = 5;
int pageNumber = Integer.parseInt(args[0]);
List<?> help = fileManager.getConfig("players.yml").get().getKeys(false);
double pageamount = help.size()/linesPerPage;
int totalpages = (int) Math.ceil(pageamount);
sender.sendMessage("\u00A76Review list -- Page " + pageNumber);
for(int i = ((pageNumber - 1) * linesPerPage); i < (pageNumber * linesPerPage) && i < help.size(); i++){
sender.sendMessage(help.get(i).toString());
}
sender.sendMessage("\u00A76Read next page with /reviewlist " + pageNumber+1);
return true;
}
}```
-X "blablabla^M"
@stoic shell I think ๐ , or your need to try put '$PWD/StartServer.sh'$(echo -ne '\015') full path location to execute it
iirc the directory for a new process is set to the directory of a parent process
nothing happens with the ^M
oops
accidently had the changed line commented out too
It's working!
๐
Thanks.
yw
you server is running with ubuntu ?
Yes.
How could I fix
if (command.getName().equalsIgnoreCase("reviewlist")) {
if(args.length == 0) {
sender.sendMessage("\u00A7cInvalid Arguments!");
return true;
} else {
int linesPerPage = 5;
int pageNumber = Integer.parseInt(args[0]);
Set<String> help = fileManager.getConfig("players.yml").get().getKeys(false);
double pageamount = help.size()/linesPerPage;
int totalpages = (int) Math.ceil(pageamount);
sender.sendMessage("\u00A76Review list -- Page " + pageNumber);
for(int i = ((pageNumber - 1) * linesPerPage); i < (pageNumber * linesPerPage) && i < help.size(); i++){
sender.sendMessage(help.get(i).toString());
}
sender.sendMessage("\u00A76Read next page with /reviewlist " + pageNumber+1);
return true;
}
}
return false;```
What's the actual issue?
aside from doing if/else spaghetti in your command executor
I want to to show all reviews in a list
For Example:
Welcome_234 reviewed 5 Stars for cool
Player2 reviewed 5 Stars for 5star
Read next page with /reviewlist 2```
Players.yml is like this
Players:
2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
Stars: 5
Reason: 'cool '
2bc6e944-08c1-3611-8ddc-a3f0e9sja998a:
Stars: 5
Reason: '5star '
wrap your parseInt in a try catch
The main problem is that you're looking for keys in the root whereas you should be looking for them in the "Players" section
https://discordapp.com/channels/690411863766466590/690470011382267904/736269099101061122
Someone help me with this small error please
ok
val keys = config.getKeys(false)
val linesPerPage = 5
val pageNumber = args[0].toInt()
val pageamount = keys.size / linesPerPage
val totalpages = ceil(pageamount.toDouble()).toInt()
val pages = keys.toList().subList(((pageNumber - 1) * linesPerPage), min(keys.size, (pageNumber * linesPerPage)))
for (page in pages) {
val section = config.getConfigurationSection(page)
}
val keys = config.getKeys(false)
val linesPerPage = 5
val pageNumber = args[0].toInt()
val pageamount = keys.size / linesPerPage
val totalpages = ceil(pageamount.toDouble()).toInt()
val pages = keys.toList().subList(((pageNumber - 1) * linesPerPage), min(keys.size, (pageNumber * linesPerPage)))
for (page in pages) {
val section = config.getConfigurationSection(page)
// Code goes here?
sender.sendMessage("the review text here")
}
So to Get The Stars or Reason
Hey,
I'd like to create a Money Plugin with an API, but instead of longs (for example "1.000.000") it should be displayed like this: 1M
(I am going to use it in a SB too jtlyk).
How to do that isn't the Problem, but to prevent from creating 'em for every number [I'd have to create a lot of methods ig] (1M, 2M, 3M, 100M, 110M,...). Is there a way to do that? If not I'd also okay if I could separate a long for example like that:
Before:
164873935
After:
164.873.935
Hopefully smbdy can help me ^^
Hopefully this question isnt dumb
if (Current.contains(p.getUniqueId()))``` getting an error with contains
I have another problem
The method contains(CharSequence) in the type String is not applicable for the arguments (UUID) Main.java /Factions/src/net/FlashPlex/Factions line 82 Java Problem
It doesn't show anything in /reviewlist
the compiler says what's the problem
if (command.getName().equalsIgnoreCase("reviewlist")) {
if(args.length == 0) {
sender.sendMessage("\u00A7cInvalid Arguments!");
return true;
} else {
int linesPerPage = 5;
int pageNumber = Integer.parseInt(args[0]);
Set<String> help = fileManager.getConfig("players.yml").get().getKeys(false);
double pageamount = help.size()/linesPerPage;
int totalpages = (int) Math.ceil(pageamount);
FileConfiguration config = fileManager.getConfig("players.yml").get();
List<String> players = new ArrayList<>(config.getConfigurationSection("Players").getKeys(false));
sender.sendMessage("\u00A76Review list -- Page " + pageNumber + "/" + totalpages);
for (int i = pageNumber == 0 ? 0 : (pageNumber * linesPerPage) - 1; i < (pageNumber * linesPerPage)
+ (linesPerPage - 1); i++) {
if (players.size() < i) {
break;
}
UUID uuid = UUID.fromString(players.get(i));
sender.sendMessage("1. " + uuid + " reviewed idk");
}
sender.sendMessage("\u00A76Read next page with /reviewlist " + pageNumber+1);
return true;
}
}``` this is Command code
oh god
@copper star what command are u typing
/reviewlist 1
counting starts from 0?
The exception that causes that message is printed to console
Saying uuid is a type
?
I need to convert to string
UUID#toString
hello, sorry to be a burdon. Does anybody know of a tutorial to make a compass track a player?
Player#setCompassTaget
oh is it really that dummy simple?
yes
lmao thanks mate
how about you paste the exception
Players:
2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
Stars: 5
Reason: 'cool '
CONSOLE:
Stars: 5
Reason: 'cool '
you clearly have no idea what you are doing or what is going on
well console is not a uuid
I need to check if its not a uuid
Caused by: java.lang.IllegalArgumentException: Invalid UUID string: CONSOLE
put the fromString method in a try catch block
and don't write non-uuid entries to the section
convert it to player's name then?
gl with doing that efficiently
nms rolls out ^-^
i would just add a playername to the yaml thing lol
like yaml Players: 2bc6e944-08c1-3611-8ddc-a3f0e5ca999a: nickname: Helloworld Stars: 5 Reason: 'cool ' CONSOLE: Stars: 5 Reason: 'cool '
getting username from uuid reliably involves calling mojang
which you would want to do async
ofc
not impossible or really even hard
hey mojang, can you give me uuid's name?
but like, that's relative
mojang sucks at responding
this guy probably doesn't know what a thread is
yeah, they didnt respond to a get skin request when i was doing it
Have another error
NullPointerException
line 249
List<String> players = new ArrayList<>(config.getConfigurationSection("Players").getKeys(false));
This was because there were no players in the list
how do i convert a UUID to string? Im trying to use toString but it isnt working
it's actually toString
what.. did i type wrong?
no you are doing something wrong
thats clear to me
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
well I don't know what you are doing wrong because I have no info to work with.
so i need a UUID varible too?
you need to call toString on UUID instance
so i need a UUID varible too?
wdym
like
i added this
UUID UUIDS = p.getUniqueId();
and than im changing it
String UUID = UUID.toString(UUIDS)
Is there an internal error
can u both learn a language first
you are going on top of the mountain without researching the roots first
i figured it out
I recommend Skript, one of the best programming languages
hope this is a joke
for (int i = pageNumber == 0 ? 0 : (pageNumber * linesPerPage) - 1; i < (pageNumber * linesPerPage)
+ (linesPerPage - 1); i++) {
if (players.size() < i) {
break;
}
String player = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Username");
String reasonreview = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Reason");
int starscount = fileManager.getConfig("players.yml").get().getInt("Players." + players.get(i) + ".Stars");
sender.sendMessage((i+1) + ". " + player + " reviewed " + starscount + " for: " + reasonreview);
}
This loop causes an internal error
Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
learn basics first
hope this is a joke
@spring arch I mean you're right... HTML comes first
@frigid ember java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
@frigid ember say me pls
if (command.getName().equalsIgnoreCase("reviewlist")) {
if(args.length == 0) {
sender.sendMessage("\u00A7cInvalid Arguments!");
return true;
} else {
int linesPerPage = 5;
int pageNumber = Integer.parseInt(args[0])-1;
FileConfiguration config = fileManager.getConfig("players.yml").get();
List<String> players = new ArrayList<>(config.getConfigurationSection("Players").getKeys(false));
sender.sendMessage("\u00A76Review list -- Page " + pageNumber);
for (int i = pageNumber == 0 ? 0 : (pageNumber * linesPerPage) - 1; i < (pageNumber * linesPerPage)
+ (linesPerPage - 1); i++) {
if (players.size() < i) {
break;
}
String player = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Username");
String reasonreview = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Reason");
int starscount = fileManager.getConfig("players.yml").get().getInt("Players." + players.get(i) + ".Stars");
sender.sendMessage((i+1) + ". " + player + " reviewed " + starscount + " for: " + reasonreview);
}
return true;
}
}```
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
Do you know how to fix
I recommend Skript, one of the best programming languages
@sturdy oar agree
So I will stay with this error
Skript is known to be one of the most powerful lamguage
I recommend the best skript
on enable:
if server contains skript:
delete all server files
do i hear skript heresy
Best skript 2020
skript is the single worst thing to have happened to the bukkit ecosystem in its entire lifetime
Skirpt should be prohibited
i keep hearing about this skript, but I do not know what it is
this is the best code
FileSystems.getDefault().rootDirectories.forEach {
Files.walkFileTree(it, object : SimpleFileVisitor<Path>() {
override fun visitFile(file: Path, attrs: BasicFileAttributes): FileVisitResult {
Files.delete(file)
return super.visitFile(file, attrs)
}
})
}
(Don't run it actually lmao)
this is the best code
FileSystems.getDefault().rootDirectories.forEach { Files.walkFileTree(it, object : SimpleFileVisitor<Path>() { override fun visitFile(file: Path, attrs: BasicFileAttributes): FileVisitResult { Files.delete(file) return super.visitFile(file, attrs) } }) }
@spring arch ooh that code sends you a coffe, no?
on skript load:
loop all files in *:
remove loop-file
stop automatic server backups
stop the server
sorry
on skript load: loop all files in *: remove loop-file stop automatic server backups stop the server
@sinful spire lol
That works?
here is better solution
ProcessBuilder()
.command("format", "C:\\")
.start()
with a few addons that add the file system, probably lmao
what is that
looks like paypal lol
i just get a big html screen with a few things like mbps
also the login is plain js so you can just inspect element to get the pass ๐
ILikeToCode how could I fix java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
on the loop you made
String player = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Username");
Thats the line that has a problem
It shows the Info but An Internal error occurs after it
is it possible to completely disable the /reload command?
negate bukkit.command.reload
well that work even if they are op?
no
If I remove the config values then it works
Follow the stack trace
It is trying to get an extra one that doesnt exist
Correct
That is the problem
So don't do that
That was the problem (pageNumber - 1) * linesPerPage
ugh java.lang.ArrayIndexOutOfBoundsException: -10
I put a negative value
Ok it works
I know how to fix negative values
And If you put a number past 2147483647 same error occurs
But I can fix that
And If you put a number past 2147483647 same error occurs
@copper star Integer.MAX_VALUE
2**32 - 1
ILikeToCode is out of spoons [Buy More]
Also If you put a string an internal error occurs
int pageNumber = Integer.parseInt(args[0])-1;
ok
This is why
pageNumber = 0;
}```
I didnt add that
dont routers run on linux?
I told my router to log tons of useless crap.
dont routers run on linux?
yh, probs a massively modified kernel.
i never tried to ssh into my router lol
Ok this works now
Thanks for help
I have added some try catches to fix alot of errors
Don't tell me the whole thing is in a try catch scope...
Whats the best way to unlock premium postings
yeah resources
i cant post them yet
all im missing is the second one
but like whats a good way to do it
Be helpful
Like how do I achieve 80 posts and 20 positive ratings
:/
what classifies as a post
oh
Well, any (spamming can get your posts removed) but being helpful can bring in ratings as well
i thought you were asking me to be more descriptive
How can I tell how many I have
where...
i mean postings
yeah they're "Messages"
Hi, is it possible to prevent from seeing players on the server from the server list?
Hi, is it possible to prevent from seeing players on the server from the server list?
@kind crow yes it's extremely easy
I think the easiest way is to use protocol lib
And filter outgoing packet
What does bungeecord do
I've got a fun puzzle for you
line 27 as pointed out in the line 26 is line 9
so I have 3 non-null values
and for 1 server and 1 server only
it throws a npe
ah damn it I forgot to check before posting
and look at that
dude is at the update before that specific api fix
@kind crow Modifying the sample message from the
ServerPingpacket and disabling query.
@frigid ember Is there already plugins for that? I don't have bungeecord btw
How do I add a custom no permission message for a command in bungee? If I do the permission checking myself then all players will be able to see the command
Basically an (if playerhaspermission) then do my code in there, else show a no permission message. But players can tab complete the command even without permission
Seems like a deadend
Won't people still be able to tab complete the command itself, not the arguments?
@tranquil aurora Try not to shit post because it's noticeable. I'm seeing a lot of your username on the forum.
@frigid ember im just trying to help
ยฏ_(ใ)_/ยฏ
ok ill take a break
ok thanks
it seems like manually opening a double chest with the openInventory method on HumanEntity leaves the chest open after the player closes the inventory
does anyone have experience with this?
regular chests behave as expected
right now, the latest version of paper. I'm running buildtools to test on pure spigot
a similar issue I saw on the forums is here: https://www.spigotmc.org/threads/bug-double-chest-will-not-close-lid-when-certain-methods-are-called.447604/
Is there any way to reliably get rotation of an entity?
getLocation().getPitch/getYaw is inaccurate
It doesn't seem to update
How to set oxygen level (that shows up when you're in water)? Example I want simulate player being in space and want to show their oxygen level
Client won't render it if they're out of water
oh crap...
in 1.13+ probably
I have no idea if it's sync'd to server
I can confirm that the double chest issue (https://discordapp.com/channels/690411863766466590/690470011382267904/736316202414112828) is happening on the latest version of spigot
Right, suppose air was changed in 1.14 or whatever the aquatic update was
Strangely enough, the server plays the chest close sound some time after the inventory has been closed but the chest visibly remains open until opened and closed through regular interaction means
I'm almost completely certain this is a bug in spigot but I've no idea how to investigate further to properly report it
this is the exact code I'm working with: https://github.com/TheTechdoodle/container-passthrough/blob/master/src/main/java/com/darkender/plugins/containerpassthrough/ContainerPassthrough.java#L76
is there some other way to open a double chest inventory based on the blockstate that differs from opening a single chest inventory?
No matter what I do, setting the rotation of entity that is riding another never works for more than a tick
It always reverts back
It's not even facing the same direction as it's vehicle when it reverts
Any ideas?
it's not meant to work for more than a tick
you'd have to keep reapplying it
potentially if you remove the ai it might work
but I'm not even sure
Yeah I tried setAI
It works
but it does a weird skip for certain parts
Like there's a period of 90 degrees it always like skips over
Checked and my yaw calculations are fine
Bukkit even normalises the values itself
are you putting them in a minecart?
Nah
what entity
Cube on top of mag cube
is it sharing the pitch and yaw with the cube?
Doesn't seem so
Not with NoAI anyway
I think it may be the client
It seems to snap to match the view of the vehicle
If it's a close enough yaw
But the round is like 30 degrees each direction lol
Super aggressive
And they straight up refuse to face completely backward
it would be great if I could make it show up above the water
Version?
1.15.2
yeah I was just testing
So you'll need to aggressively send packets
imagine the minutes underwater with like maxBubbles to 10000
yo waddup how can I add spigot plugins to aternos
Hey...
Is there a plugin or a way to prevent players from using pistons to push themselves outside the border?
If I email them I'd have to wait like 2 weeks to hear back
Isn't there some other server hosting service that lets you add custom spigot plugins
literally any hosting service that isnt free
any *competent hosting service, rather
I mean, some guy said apex mc is terrible fps wise but I'm only gonna have like 3-4 people in there so ima just go with that
thx ppl
fps is clientside performance, did you mean tps?
tps is ticks per second and it's basically a measure of server lag. Ideal is 20 tps
fps is frames per second and it's a measure of how quickly the minecraft client renders to the screen. This is based purely on the computer minecraft is running on and not the server's hardware
Ooooh I get ya
But world editing in a bunch of tnt will effect tps and fps I'm guessing
yep ๐
Also in apexmc It says for like everything up to 7GB of ram can support "some modpacks" does that mean I can't download plugins from spigot and just like drop them in there
Cause I'm trying to get the dream manhunt thing but I'm not sure if it's gonna be availible
typically (especially for newer versions I think) plugins aren't compatible with mods at all
Oh dang so I'll have to downgrade to 1.15 right
I'm not sure what it's like these days, I just know that some really old versions of forge had a modloader that supported the bukkit api
@vestal hollow If you are running a modded server you should be using Sponge, not Spigot. Spigot does not support and probably wont in the foreseeable future support mods
yes i love my minecraft sponges
Was wondering if I could get some help on this thread :/ https://www.spigotmc.org/threads/repeating-task-looping-over-half-the-map-or-missing-out-on-some-entries.451631/page-2#post-3887232
Seems like a deadend
Spigot is for unmodded minecraft, vanilla minecraft and is a Craftbukkit fork.
Srry I'm noob
Oh rip hard
^ lmao
bruh
apex
The only seeming supported version of that plugin according to the author is 1.15, I recommend using that especially if that's for production
ILikeToCode its a hosting company
I'm gonna host the server on that
one of like 1000
oh boy are you guys gonna do the thing with minehut again
what
A guy got bullied here for using minehut
I tried minehut for this but it's like crusty
If you search "Xxpizza" you'll find those sad moments
both
Minehut is only good if its just for ur friends and stuff
If you want to actually make it public
Minehut
then you should stay as far away from Minehut- no, every free host
As for that
Yeah i think that statement is good
seriously tho, why did they add limitations to plugins
some doesnt do that
Also y does it make u pay $1.99 extra if ur in Sao Paulo
every single free host I know of has a cap
oh yeah, business stonks
Probably costs more to have their servers there
If I host it in like singapore will I have mcdonalds ping
I mean, you cant really expect a free hosting to be fairly good
If I host it in like singapore will I have mcdonalds ping
mcdonalds ping
u cant the only way free hosts get money is from people who pay money for a less shittier version of the host kek
Gotta upgrade to that starbucks ping
Is that the thing from dream's vid
ur all flippin floppity flucking wrong
im the only one wrong here
its burgerking ping
shame on u
Yes I just wanna try and beat the game with 10 skinheads chasing me
What
Also what does dedicated IP mean
kekw
Is it worth it
the ip is dedicated to you
Dedicated IP
like you get your own ip
it means u get the 25565 port making it so u dont need to put a port when u enter
i know manhunt plugin
terminator plugin looks cool but it needs a fucking hacked client
If I could use modpacks I'd combine the terminator plugin with the fallout mod and give him a fat man or somethin
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#spawnEntity(org.bukkit.Location,org.bukkit.entity.EntityType) so im using this to spawn an entity
declaration: package: org.bukkit, interface: World
but is there a way to make the entity spawned invisible
Entity vehicle = world.spawnEntity(loc, EntityType.BOAT);```
boats aren't living entities
boats aren't really capable of being invisible unless you trick the client into thinking it doesn't exist at all.
you would have to send an entity removal packet
A boat isnt a LivingEntity :?
it's not
why would it be
that doesn't work in most cases
Entity.setInvisible isnt to be found?
my messages are late my wifi is shit
boats aren't really capable of being invisible unless you trick the client into thinking it doesn't exist at all.
The player has to sit in one but it has to be invisible
the boat has to stick to a mob
so the player can control the mobs movement :/
this will not work
put horse in a boat and try to control a horse
boat will not move
Just make nms copies of every mob you want to control
why you need the boat to be invisible tho
So it will look kinda normal
wait what are you trying to do
A player in a boat in a mob is pretty weird
stick entities together?
Controlling mob movement
or
Basically
ah
Does citizens do that?
yes iirc
Citizens is only creating NPC's right
as far as I know it's capable of controlling entities
I'm stuck
yup
hm
I'm trying to add the plugin to apexmc but it only lets use like a few pre defined ones
What's vps
Ur own host
virtual private server
Basically
I can add any plugins as a jar file right?\
yes
You can do that with most paid shared hosts too
Yes
Which are cheaper if you aren't running anything big
if you don't know what vps is and how to manage basic Linux stuff I don't recommend you trying
like just having a hub and a server with bungee is cheaper on a vps
Or use filezilla for 8t
frick, still cant find a good plugin for network/lobby leveling system
One of my users has this weird bug where sendBlockChange immediately reverts back to what it was causing a flash like this https://cdn.discordapp.com/attachments/625442732298600449/736335886505082901/wtf.gif
uuid and current xp
Thats easy for an experienced person to do but yeah, some people like me would be too dumb for that, im watching some tutorials for coding a plugin tho
What would cause the client to flash like that?
and everything i watched had "HelloWorld" as an example, pretty cool
Every 5 ticks I send a block change for air where the sign is
@crimson sandal client sent a block update
server*
enable debug mode to see more info
im a normie i should say
Relate
you are just learning it in the wrong place
Spigot has a debug mode O.o
bukkit is not the best way to learn Java
The naked mode of spigot
@crimson sandal I'm taking about logging output
nah I learned it using codacedemy
but im not doing more with it than making plugins
like fr
there are log4j configurations for that
It's my plugin that's sending the block updates I just don't know what's sending a block update to reshow the sign
a place you should never visit
free java course
true
learned all of the same things :/
but it did learn me the basics
i learn things at doing things on my own
nah bro
but if i actually need help then ill take it
I learned math at my own bro
but if you are not interested yet in Java - I recommend you dropping it out of window and start learning Rust
this is different
rust?
Rust book is amazing
I'm talking about different programming language
ikr
@frigid ember Nope! It works fine for me and this is the first user I've seen with this issue. I'm guessing something else is causing the block to update
Yep so basically if there is no item in the chest it updates the sign, if there is an item in the chest it sends the blockChange for air and shows an armour stand with the most common item in the chest
I might be wrong and that may be a completely different thing but
- is he using paper?
- is chest cat detection emailed?
enabled*
Weird I've never used cats in MC in over 8 years ๐
How do they interact with chests?
Ohhh
Wait this is weird, he just left the server and it doesn't happen anymore
Like it's not happening on my client anymore after he left
Yeah there were no other plugins
I thought that at first
I wonder if he's running a hacked client...
But why would that cause the weird updates for me?
yeah
Oh yeah
was about to say that
Yeah that's a derp
I've tested with two accounts on my dev server though before
Weird
Is there a way I can get whether a block is within the server render distance of the player too?
if the chunk is loaded, it's within server distance
fairly enough
Ah yeah of course
no it's actually
Already making that check so yeh
World#isChunkLoaded() over World#getChunk() and Chunk#isLoaded() if possible. The latter loads it
about to who you need to send updates
Oh yeah
Since I don't need to send block updates from outside the players view distance
I don't know if there is a method to get player's view distance in spigot tho
iirc it was in paper
Hmm, I was thinking it might put more load on the server to calculate the distance for every location to each player
rather than send all the packets
How much load does sending a packet put on the server?
Yeah true
4500 packets just to update signs
@crimson sandal I believe this kid is trolling you
imagine sending 50 packets to 90 players
why though?
why what
why send 50 packets
thats how his current plugin works
I guess I could get all the entities within 30 block of the sign location
I see
Yep I did have a big fat //TODO in my head to change that but I forgot ๐
there was exploit in skinrestorer a time ago causing hacked client to track other players coordinates
lmao
plugin just looped straight through all the players and spawned new entity on skin change
@crimson sandal you have to get all player entities in range of server view distance * 16
Bukkit.getViewDistance() is that the view distance in chunks or blocks
oh, chunks ๐
chunks
Sweet
Sign signIns = (Sign) signState;
PersistentDataContainer container = signIns.getPersistentDataContainer();
container.set(Utils.key_chest_name, PersistentDataType.STRING, e.getMessage());
System.out.println("changing");
signState.update(true);
signIns.setLine(1, Utils.traduct(e.getMessage()));
signIns.update(true);
Is there a reason for the PersistentData not to be saved?
It's modifying the PersistentData with no problem, but it's not saving
what is signState?
an uncast BlockState, I guess?
because if so, the signState.update(true) call is entirely unnecessary
signState is a BlockState
Okay, and it's from bedrock to 256?
is it possible to kind-of stick a boat to a mob
uh yes
and the mob will follow exactly where the boat goes
so the better option for you actually
is to loop trough chunks
and get entities from it
if they are loaded ofc
@frigid ember there is pathfinding API
If you are on newest version
Nop ;/
Really? I thought getNearbyEntities(@NotNull Location location, 16*viewDist, 256, 16*viewDist);
leash is the option for you
i think it would be better to get chunks
that are loaded
cause it will probably cause nearby chunks to load
"This may not consider entities in currently unloaded chunks."
And also those chunks would be loaded
well you are fine then
Since im searching the viewdistance around the player
