Minecraft Server not letting people in even after port forwaring
Good evening, i have tried setting up a minecraft server for few months now, just for me and my friends to play on . I downloaded the server file and set it up properly and allowed inbound and outbound rules through my windows firewall to the specific port (25565) but its not letting my friends in, and online port checker tools says that my port is closed. Any help would be greatly appreciated, thank you.
See also questions close to this topic
-
Methods to remove Time Limit exceeded error from my code?
https://www.codechef.com/MARCH21C/problems/COLGLF4
This is the question, for which I have written the solution.
It shows Time Limit Exceeded(TLE) error.
Pls suggest how do I optimise it further.
I have optimised it to some extent. How do I Optimise it further. Pls Help!
Here in my code: e-> egg, h-> choclate
#define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #include <bits/stdc++.h> using namespace std; // help returns the min cost for n items int help(int n, int e, int h, int& a, int& b, int& c, int *** dp){ if(n==0) return 0; if(dp[h][e][n]!=-1) return dp[h][e][n]; int p1=INT_MAX,p2=INT_MAX,p3=INT_MAX; if(e>=2){ int ans = help(n-1,e-2,h,a,b,c,dp); // dp[h][e-2] = ans; if(ans != INT_MAX) p1=ans + a; } if(h>=3){ int ans = help(n-1,e,h-3,a,b,c,dp); // dp[h-3][e] = ans; if(ans != INT_MAX) p2 = ans + b; } if(e>=1&&h>=1){ int ans = help(n-1, e-1,h-1,a,b,c,dp); // dp[h-1][e-1] = ans; if(ans != INT_MAX) p3= ans + c; } int f = min(p1,min(p2,p3)); dp[h][e][n] = f; return f; } int main() { // your code goes here fastio(); int T; cin>>T; for(int t=0;t<T;t++){ int n,e,h,a,b,c; cin>>n>>e>>h>>a>>b>>c; // scanf("%d",&n); // scanf("%d",&e); // scanf("%d",&h); // scanf("%d",&a); // scanf("%d",&b); // scanf("%d",&c); int*** dp = new int**[h+1]; for(int i=0;i<=h;i++){ dp[i] = new int*[e+1]; for(int j=0;j<=e;j++){ dp[i][j] = new int[n+1]; for(int k=1;k<=n;k++) dp[i][j][k]=-1; } } for(int i=0;i<=h;i++){ for(int j=0;j<=e;j++){ dp[i][j][0]=0; } } int ans = help(n,e,h,a,b,c,dp); if(ans == INT_MAX) cout<<-1<<'\n'; else cout<<ans<<'\n'; // for(int i=0;i<=h;i++){ // for(int j=0;j<=e;j++){ // cout<<dp[i][j]<<" "; // }cout<<endl; // } for(int i=0;i<=h;i++){ for(int j=0;j<=e;j++){ delete [] dp[i][j]; } delete dp[i]; } delete [] dp; } return 0; }
-
how to change search icon, hint and text color in Android SearchView?
So I was working with this
SearchView
and everything looked fine in the emulator. when I tested it in the actual device, all of the icons turned white.I looked up on some of the sources on how to style the
SearchView
but most of them are maybe outdated and nothing seems to work.Current SearchView XML:
<SearchView android:id="@+id/lead_search_view" style="@style/AppTheme.SearchView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="10dp" android:layout_marginLeft="10dp" android:layout_marginTop="20dp" android:layout_marginEnd="10dp" android:layout_marginRight="10dp" android:layout_marginBottom="10dp" android:background="@drawable/custom_background_spinner" android:iconifiedByDefault="false" android:queryBackground="@android:color/transparent" android:queryHint="Enter a keyword" android:theme="@style/AppTheme.SearchView" />
The style that I followed on some solutions:
<style name="AppTheme.SearchView" parent="Widget.AppCompat.SearchView"> <item name="android:textColor">@color/colorPrimary</item> <item name="android:textColorHint">@color/colorHint</item> <item name="searchIcon">@drawable/ic_search_field_icon</item> </style>
-
I want to relationship between two table using room persistence library?
I want to implement the 1-N relationship between the two tables using the Room persistence library but below are not working for me where I am going to be wrong if anyone knows please correct me. There is a lot of question asking about the relationship in the room but no one correct so please don't add my question to duplicate. Thanks in advance
parent table
package com.example.musicplayer.Room; import androidx.room.Entity; import androidx.room.PrimaryKey; @Entity public class AlbumModel { @PrimaryKey (autoGenerate = true) private int albumId; private String albumName; public int getAlbumId() { return albumId; } public void setAlbumId(int albumId) { this.albumId = albumId; } public String getAlbumName() { return albumName; } public void setAlbumName(String albumName) { this.albumName = albumName; } }
child table
package com.example.musicplayer.Room; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.ForeignKey; import androidx.room.PrimaryKey; import static androidx.room.ForeignKey.CASCADE; @Entity(foreignKeys = {@ForeignKey(entity = AlbumModel.class, parentColumns = "albumId", childColumns = "albumListID", onDelete = ForeignKey.CASCADE) }) public class AlbumListModel { @PrimaryKey(autoGenerate = true) private int listID; @ColumnInfo(index = true) public int albumListID; private String path; public int getListID() { return listID; } public void setListID(int listID) { this.listID = listID; } public int getAlbumListID() { return albumListID; } public void setAlbumListID(int albumListID) { this.albumListID = albumListID; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } }
Relationship
package com.example.musicplayer.Room; import androidx.room.Embedded; import androidx.room.Relation; import java.util.List; public class OneToManyRModel { @Embedded public AlbumModel albumModel; // this below line code for one foreign key handle(1-N Relationship) @Relation(parentColumn = "albumId" ,entityColumn = "albumListID") public List<AlbumListModel> playList; }
DAO
package com.example.musicplayer.Room; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import androidx.room.Transaction; import java.util.List; @Dao public interface AlbumDao { @Query("Select * from AlbumModel") List<AlbumModel> getAllAlbums(); @Insert void insertAlbum(AlbumModel albumModel); @Transaction @Query("SELECT * FROM AlbumModel") List<OneToManyRModel> getUsersWithPlaylists(); @Insert void insertSongListAlbum(List<AlbumListModel> albumListModelList); }
-
Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute
when I run my web-devlopment project in my localhost it show a error message "whether to send cookie"
-
Heroku Server Not Pulling Latest Info From Local File?
I have a simple express server and uploaded it on Heroku. The server reads the datetime from
date.json
and displays it. A file calledupdate.js
writes the current datetime to a file calleddate.js
. I'm using Heroku Scheduler to callnode update.js
to update thedate.json
file every 10 minutes.Essentially, the API should show the latest Datetime string that is updated every 10 minutes.
When I access the API... the date never gets updated. I also tried
node update.js && npm start
to restart the server on every update. It works when running locally. Any idea why the datetime string never changes when uploaded on Heroku?server.js
// importing const express = require('express'); const cors = require('cors'); const fs = require('fs'); // app config const app = express(); const port = process.env.PORT || 9000; // middleware app.use(cors()); app.use(express.json()); // api routes // ------- BEGIN RELEVANT PART OF CODE ------- app.get('/', (req, res) => { const json = fs.readFileSync('./date.json'); latestDate = JSON.parse(json); res.status(200).send(latestDate); }); // ------- END RELEVANT PART OF CODE ------- // listener app.listen(port, () => console.log(`Listening on http://localhost:${port}`));
update.js
const fs = require('fs'); const update = () => { const dateObj = {Date: new Date().toISOString()} fs.writeFileSync('./date.json',JSON.stringify(dateObj)); } update();
date.json
{"Date":"2021-03-08T01:56:15.714Z"}
-
Proxy Data Between Servers Dynamically
Suppose I have servers A, B, and C in my network.
'A' can speak to 'B', but not 'C'. 'C' can speak to 'B', but not 'A'.
How do I get data from A to C, via B? How do I do so dynamically?
Can I run server Z, which acts as a pathfinder of some kind? Does each server require a daemon in some form?
Down the line, I would ideally be able to get data from A to Z through an arbitrarily long chain of servers; I simply have no idea where to start.
The only constraint is that the OS is Linux and the networking is software.
-
Kicked with "io.netty.channel.AbstractChannel$AnnotatedConnectException" error
[21:59:36] [main/INFO]: [CHAT] Impossibile connettersi al server. Errore: io.netty.channel.AbstractChannel$AnnotatedConnectException [22:05:04] [main/INFO]: [CHAT] [22:05:04] [main/FATAL]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_51] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_51] at h.a(SourceFile:47) [h.class:?] at bib.az(SourceFile:991) [bib.class:?] at bib.a(SourceFile:419) [bib.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] Caused by: java.lang.NullPointerException at bhk.d(SourceFile:228) ~[bhk.class:?] at brz.a(SourceFile:1694) ~[brz.class:?] at kl.a(SourceFile:117) ~[kl.class:?] at kl.a(SourceFile:13) ~[kl.class:?] at hv$1.run(PacketThreadUtil.java:20) ~[hv$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_51] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_51] at h.a(SourceFile:46) ~[h.class:?] ... 9 more
When I try to connect in the Prison mode, it kicks me out and give me the exception "io.netty.channel.AbstractChannel$AnnotatedConnectException". The main server (so the Hub) lets me connect properly, but this particular submode not.
-
Trying to make an banking deposit with player input
I'm fairly new to coding spigot but I am trying to make a banking script where the player would click the deposit button and be prompted to type in the amount of money they want to deposit. However, when this happens in game, it automatically determines the input as 0 and doesn't give the player enough time to type in their message. Here is the code:
private void deposit(Player p, String gang) { deposited.add(p); p.closeInventory(); p.sendMessage(ChatManager.Feedback("jahseh", "Please type how much money you want to deposit")); int input = (int) MyListener.typed; if (Main.getEconomy().getBalance(p) >= input){ Main.getEconomy().bankDeposit(gang, input); p.sendMessage(ChatManager.Feedback("jahseh", "You have deposited " + input + " stonebucks into your gang's bank.")); } if (Main.getEconomy().getBalance(p) < input){ p.sendMessage(ChatManager.Feedback("alert", "You are trying to deposit more money than you currently have!")); } } public void input (AsyncPlayerChatEvent event){ Player p = event.getPlayer(); String typed = event.getMessage(); if(Bank.deposited.contains(p)) { Bank.deposited.remove(p); event.setCancelled(true); }
} }
-
Lootdrop forge minecraft
First time working with java & json in the Minecraft forge developer environment, does someone knows why loot table is not working? supposed to drop a mod item when you break a mod block, but nothing happens when i test, i mean nothing drops when i break the block.(Theres differences between block/and block item "opalo_ore" and "opalo")
{ "type": "minecraft:block", "pools": [ { "rolls": 1, "bonus_rolls": 2, "entries": [ { "type": "minecraft:item", "name": "curseduwu2920:opalo" } ] } ] }