Java Help | Scoreboard

Status
This thread has been locked.

Taleeko

Server Owner | Developer
Banned
Feedback score
10
Posts
446
Reactions
264
Resources
0
Note: This is iHCF Scoreboard.

Trying to make the scoreboard do nothing if there is nothing after the specified line of code but if there is then it will add another line for example:

MC-Market
--------------------
Test: 10:00
--------------------


Nothing after, but with something after-

MC-Market
--------------------
Test: 10:00
--------------------
Enderpearl: 10.3s
--------------------

Im very VERY new to coding and am currently just messing around with iHCF till stuff works and learning from it and learning a lot of java from books etc.


MC-Market
--------------------
Test: 10:00
--------------------
--------------------
 
Last edited:
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Christopher

Floating around
Supreme
Feedback score
8
Posts
2,048
Reactions
1,120
Resources
0
Note: This is iHCF Scoreboard.

Trying to make the scoreboard do nothing if there is nothing after the specified line of code but if there is then it will add another line for example:

MC-Market
--------------------
Test: 10:00
--------------------


Nothing after, but with something after-

MC-Market
--------------------
Test: 10:00
--------------------
Enderpearl: 10.3s
--------------------

Im very VERY new to coding and am currently just messing around with iHCF till stuff works and learning from it and learning a lot of java from books etc.
https://hastebin.com/ohimaqojeg.vbs
Here is the code I tried and sort of worked but the line is there when nothing is after it also making it look like so:


MC-Market
--------------------
Test: 10:00
--------------------
--------------------
Can we have the entire section please.
 

Taleeko

Server Owner | Developer
Banned
Feedback score
10
Posts
446
Reactions
264
Resources
0
1913454ke.png

I see nothing.

Can we have the entire section please.


I cant give the full section of code publicly but if you PM me ill be happy to but thats the code I tried.
 
Banned forever. Reason: Scamming (https://builtbybit.com/threads/taleeko-scam-report.684526/)

Taleeko

Server Owner | Developer
Banned
Feedback score
10
Posts
446
Reactions
264
Resources
0
Anyone know how what I can do to get this done?
 
Banned forever. Reason: Scamming (https://builtbybit.com/threads/taleeko-scam-report.684526/)

tassu

taavi.wtf
Premium
Feedback score
6
Posts
76
Reactions
11
Resources
0
Code:
if (lines.isEmpty()) {
    lines.add(add("§8§m-------------------------"));
}
 

Taleeko

Server Owner | Developer
Banned
Feedback score
10
Posts
446
Reactions
264
Resources
0
Code:
if (lines.isEmpty()) {
    lines.add(add("§8§m-------------------------"));
}
Yea that's the code I made and tried. It did this:

MC-Market
--------------------
Test: 10:00
--------------------
--------------------
 
Banned forever. Reason: Scamming (https://builtbybit.com/threads/taleeko-scam-report.684526/)

tassu

taavi.wtf
Premium
Feedback score
6
Posts
76
Reactions
11
Resources
0
Yea that's the code I made and tried. It did this:

MC-Market
--------------------
Test: 10:00
--------------------
--------------------
That isn't your code. I replaced ; with { in end of if statement.
 

Taleeko

Server Owner | Developer
Banned
Feedback score
10
Posts
446
Reactions
264
Resources
0
Well, found my silly mistake! In java an exclamation mark means the logical opposite so making the code as shown below basically means if the lines aren't empty :)

if (!lines.isEmpty()) {
lines.add(add("§8§m-------------------------"));
}[DOUBLEPOST=1492666304][/DOUBLEPOST]Although only thing is now it picks up on my last line on the scoreboard for the footer as a line so now there is always the spacer lol
 
Last edited:
Banned forever. Reason: Scamming (https://builtbybit.com/threads/taleeko-scam-report.684526/)

LordOfTime

Feedback score
15
Posts
602
Reactions
245
Resources
0

Ritzzzez

Feedback score
0
Posts
83
Reactions
26
Resources
0
Try this super key feature. Learn to code the generic Java language before trying to do Bukkit or Spigot...
 
Status
This thread has been locked.
Top